diff --git a/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_content_list.json b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..8b8a81458dd99f76c46f149a07686246c899b499
--- /dev/null
+++ b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d54ebf5269832095905af786b3a1602692697a1e345352bb8602691cb4bdaca6
+size 79747
diff --git a/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_model.json b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..42fcccd7efad1732e1827916f0a3d23c36be388f
--- /dev/null
+++ b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6295c1a968b50797ed45ca07032b9879079269df375ffecc6bb31563a4e61a48
+size 97161
diff --git a/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_origin.pdf b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..b3b91e095e42bbf26dd27cdec135de7f031e7c3b
--- /dev/null
+++ b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:753b93cfa78dce5e2f0a63c2d1b8b604a0680ba44077bc50713c0dba2840f8cd
+size 898797
diff --git a/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/full.md b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..25ae746ecd93b31040953fb21a9585873855fc50
--- /dev/null
+++ b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/full.md
@@ -0,0 +1,384 @@
+# Sparsity and Sentence Structure in Encoder-Decoder Attention of Summarization Systems
+
+Potsawee Manakul and Mark J. F. Gales
+Department of Engineering, University of Cambridge
+pm574@cam.ac.uk, mjfg@eng.cam.ac.uk
+
+# Abstract
+
+Transformer models have achieved state-of-the-art results in a wide range of NLP tasks including summarization. Training and inference using large transformer models can be computationally expensive. Previous work has focused on one important bottleneck, the quadratic self-attention mechanism in the encoder. Modified encoder architectures such as LED or LoBART use local attention patterns to address this problem for summarization. In contrast, this work focuses on the transformer's encoder-decoder attention mechanism. The cost of this attention becomes more significant in inference or training approaches that require model-generated histories. First, we examine the complexity of the encoder-decoder attention. We demonstrate empirically that there is a sparse sentence structure in document summarization that can be exploited by constraining the attention mechanism to a subset of input sentences, whilst maintaining system performance. Second, we propose a modified architecture that selects the subset of sentences to constrain the encoder-decoder attention. Experiments are carried out on abstractive summarization tasks, including CNN/DailyMail, XSum, Spotify Podcast, and arXiv.
+
+# 1 Introduction
+
+The Transformer architecture (Vaswani et al., 2017) with large-scale pre-training has become the defacto approach for a wide range of NLP tasks, from classification (Devlin et al., 2019) to seq2seq (Raffel et al., 2020). Training and inference using large transformer models can be computationally expensive because the self-attention's time and memory grow quadratically with sequence length. Hence, there has been significant interest in efficient transformer architectures. A number of approaches have
+
+been proposed to tackle the quadratic complexity, and a comprehensive survey on efficient transformers has been compiled in Tay et al. (2020). Most existing approaches are developed for encoder-only architectures. For seq2seq tasks, efficient models such as BigBird (Zaheer et al., 2020) or LED (Beltagy et al., 2020) consist of an efficient encoder with the vanilla decoder. For long-document summarization, this combination has been shown effective because the major bottleneck is the encoder self-attention (Manakul and Gales, 2021). The attention mechanisms in the decoder consist of self-attention and encoder-decoder attention. Techniques such as local attention are applicable to self-attention in both the encoder and decoder, while this work focuses on the encoder-decoder attention.
+
+When humans produce a summary, the information conveyed by each word/part in the summary is likely drawn from some key sentences in the original document. Inspired by this, we hypothesize that if the encoder-decoder attention is constrained dynamically to salient sentences, the computation cost will be reduced. For instance, sentence-level structures for the encoder-decoder attention have been shown effective in the traditional RNN encoder-decoder attention (Cohan et al., 2018; Li et al., 2019; Manakul et al., 2020)
+
+In this work, first, we compare the decoder's cost in the training and inference stages. We study the sparsity of the encoder-decoder attention in a common transformer-based abstractive summarization model. An approximation method to exploit this sparsity is described, and an empirical upper bound performance is given. Second, we propose a modified decoder architecture that can dynamically select salient input sentences to constrain the encoder-decoder attention without having to compute complete attention at inference time. Techniques to train our proposed model are described, and compared to the full attention baseline performance and empirical upper bound.
+
+# 2 Models and Data
+
+Vanilla Transformers. We use BART (Lewis et al., 2020) and local-attention BART (LoBART) (Manakul and Gales, 2021) as our base models. BART's maximum input length is 1024, while that of LoBART is 4096 with attention width of 1024. BART is fine-tuned to CNN/DailyMail and XSum, and LoBART is fine-tuned to Podcast and arXiv.
+
+Data. CNN/DailyMail (Hermann et al., 2015) and XSum (Narayan et al., 2018) are used with BART, while long-document arXiv (Cohan et al., 2018) and Spotify Podcast (Clifton et al., 2020) are used with LoBART. More details about models, data, and training are provided in Appendix A.
+
+# 3 Attention in the Transformer
+
+Time and memory are dominated by the encoder self-attention, and models such as LoBART adopt local attention in its encoder to mitigate this bottleneck, while keeping the original decoder (Manakul and Gales, 2021). Training is fast because attention is highly parallelizable. However, during inference, the decoder uses its histories, becoming less parallelizable. To understand when the decoder might become a bottleneck, we fix the input length $N$ and measure the computational time as a function of the target length $M$ :
+
+$$
+\mathrm {t i m e} = \bar {c} _ {1} + \bar {c} _ {2} M + \bar {c} _ {3} M ^ {2} \tag {1}
+$$
+
+in three operating modes: i) Forward+Backward, e.g. at training time; ii) Forward only, e.g. forward-pass where the input to the decoder is provided in advance; iii) Inference, e.g. the decoder using its own back histories as the input.
+
+Through a curve-fitting method, the results in Table 1 show that the relative decoder cost during inference is almost one order of magnitude larger than that during training, e.g. forward+backward or forward only. More details are provided in Appendix B, where we also show that the encoder-decoder attention cost is greater than the decoder self-attention cost. Therefore, this work will focus on the encoder-decoder attention.
+
+# 3.1 Encoder-Decoder Attention
+
+Let $M =$ the summary length, $N =$ the input length, $N_{1} = \#$ sentences, and $N_{2} =$ the average number of words in a sentence, e.g. $N = N_{1}N_{2}$ . The standard encoder-decoder attention in Eq. 2 (scaling factor omitted) where $\mathbf{Q}\in \mathcal{R}^{M\times D}$ and $\mathbf{K},\mathbf{V}\in \mathcal{R}^{N\times D}$
+
+
| Mode | c2/¯1(10-3) | ¯3/¯1(10-6) |
| Forward+Backward | 1.08 | 0.17 |
| Forward only | 1.14 | 0.25 |
| Inference | 9.96 | 1.30 |
+
+Table 1: Empirical computational time as a function of the target length $M$ where ${\bar{c}}_{1},{\bar{c}}_{2},{\bar{c}}_{3}$ are the coefficients in Eq. 1. The analysis is based on BART from Wolf et al. (2020) and the input length is 1024 .
+
+has the complexity: $\mathcal{O}(MN) = \mathcal{O}(MN_1N_2)$ . Note that we fix the representation dimension $D$ , so $D$ is omitted in our complexity notation.
+
+$$
+\mathbf {A} = \operatorname {s o f t m a x} \left(\mathbf {Q K} ^ {T}\right) \mathbf {V} \tag {2}
+$$
+
+If the attention is concentrated on some $r$ sentences, by selecting appropriate $r$ , the speed of the encoder-decoder attention can be improved by a factor of $N_{1} / r$ in average. This is equivalent to:
+
+$$
+\mathbf {A} \approx \hat {\mathbf {A}} = \operatorname {s o f t m a x} \left(\mathbf {Q} \hat {\mathbf {K}} ^ {T}\right) \hat {\mathbf {V}} \tag {3}
+$$
+
+where $\hat{\mathbf{K}},\hat{\mathbf{V}}\in \mathcal{R}^{rN_2\times D}$ , resulting in $\mathcal{O}(MrN_2)$
+
+# 3.2 Sparsity of Encoder-Decoder Attention
+
+Let the subscript $(i,j)$ denote the position of the $j$ -th word in the $i$ -th input sentence, e.g. $\mathbf{K} = [\underbrace{\mathbf{k}_{1,1},\mathbf{k}_{1,2},\mathbf{k}_{1,J_1}}_{\text{sent1}},\dots,\underbrace{\mathbf{k}_{i,1},\mathbf{k}_{i,J_i}}_{\text{sent} i},\dots,\underbrace{\mathbf{k}_{N_1,1},\mathbf{k}_{N_1,J_{N_1}}}_{\text{sent} N_1}]$ .
+
+At inference time, the outputs are generated sequentially: $\mathbf{a}_m = \mathrm{softmax}(\mathbf{q}_m\mathbf{K}^T)\mathbf{V}$ , so $r$ sentences can be determined independently for each $\mathbf{q}_m$ . Consider the following sum of attention weights as the saliency at decoding step $m$ of sentence $i$ :
+
+$$
+\alpha_ {m, i} ^ {\mathbf {s}} = \frac {1}{Z _ {m}} \sum_ {j = 1} ^ {J _ {i}} \exp \left(\mathbf {q} _ {m} \cdot \mathbf {k} _ {i, j}\right) \tag {4}
+$$
+
+where $Z_{m} = \sum_{\forall i^{\prime}}\sum_{\forall j^{\prime}}\exp (\mathbf{q}_{m}\cdot \mathbf{k}_{i^{\prime},j^{\prime}})$ . We then compute $\sum_{i}\alpha_{m,i}^{\mathrm{s}}$ up to $r$ sentences ranked by $\alpha_{m,i}^{\mathrm{s}}$ . The results in Fig. 1a show that $r = 25$ is required to achieve the sum of attention weights at $90\%$ . In addition to the vanilla model, we can fine-tune BART explicitly to make the attention sparse using:
+
+$$
+\mathcal {L} _ {\mathrm {A}} = \mathcal {L} _ {\text {x e n t}} + \gamma \mathcal {L} _ {\text {s p a r s e}} \tag {5}
+$$
+
+where $\mathcal{L}_{\mathrm{xent}}$ is the teacher-forced cross entropy loss, $\mathcal{L}_{\mathrm{sparse}} = \frac{1}{M}\sum_{m=1}^{M}\mathrm{H}(\pmb{\alpha}_m^{\mathrm{s}})$ , and entropy
+
+$\mathrm{H}(\pmb{\alpha}_{m}^{\mathbf{s}}) = -\sum_{i=1}^{N_{1}} \alpha_{m,i}^{\mathbf{s}} \log \alpha_{m,i}^{\mathbf{s}}$ . We show in Fig. 1b that the fine-tuned models ( $\gamma = 0.1$ & $\gamma = 1.0$ ) retain close to $100\%$ of attention weights for small $r$ . Subsequently, we investigate how selecting $r$ sentences impacts the summarization performance.
+
+
+(a) Layers 1,4,8,12
+
+
+(b) $\mathcal{L}_{\mathrm{A}}$ -tuned (Layer1)
+Figure 1: The sum of attention weights against the number of retained sentences $(r)$ evaluated on CNNDM.
+
+To obtain an empirical upper bound performance of Eq. 3, for each $\mathbf{q}_m$ , we can get ideal $\mathbf{k}, \mathbf{v}$ corresponding to the top $r$ sentences ranked by $\alpha_{m,i}^{\mathrm{s}}$ :
+
+$$
+\mathcal {I} _ {m} ^ {r} = \left[ (i, j) \text {s . t .} i \in \operatorname {t o p} - r \left(\alpha_ {m, i} ^ {\mathbf {s}}\right) \right] \tag {6}
+$$
+
+$\hat{\mathbf{K}}_m = [\mathbf{k}_{i,j}:(i,j)\in \mathcal{I}_m^r ],$ and the same method is applied to obtain $\hat{\mathbf{V}}_m$
+
+| System | r | Irmr | R1 | R2 | RL |
| Vanilla (γ = 0.0) | All | N/A | 44.03 | 20.92 | 40.99 |
| 5 | Ideal | 43.94 | 20.82 | 40.81 |
| 5 | Random | 39.06 | 14.32 | 36.07 |
| γ = 0.1 | 5 | Ideal | 44.22 | 21.01 | 41.19 |
| γ = 1.0 | 5 | Ideal | 43.61 | 20.46 | 40.60 |
+
+Table 2: Sparsity and Selection $(\mathcal{I}_m^r)$ on CNNDM.
+
+The results in Table 2 show that:
+
+- For the vanilla model, despite the sum of attention weights being around $50\%$ at $r = 5$ (Fig. 1a), the model is sufficiently sparse, and constraining to $r$ ideal sentences $(\mathrm{All} \to \mathcal{I}_m^{r,\mathrm{Ideal}})$ results in a small performance degradation.
+- Forcing for sparsity (Fig.1b) does not yield a significant performance improvement; but this forcing also makes the model more sensitive to random selection (results in Appendix C).
+
+Thus, for summarization, there is an observable sparsity, which allows us to reduce the cost of encoder-decoder attention with a minimal degradation. Next, we investigate how to build an efficient form of approximator to obtain salient sentences.
+
+# 4 Sentence-Level Structure for Encoder-Decoder Attention
+
+In Section 3.1, we use ideal selection $\mathcal{I}_m^r$ (Eq. 6), which requires computing $\alpha_{m,i}^{\mathrm{s}}$ (Eq. 4) using all input words. This process cannot make the decoder more efficient. By exploiting the sentence structure in the document, we propose the following partition for the sentence-level attention score (Eq. 4) to allow a compact approximation:
+
+$$
+\alpha_ {m, i} ^ {\mathbf {s}} \approx \tilde {\alpha} _ {m, i} ^ {\mathbf {s}} = \operatorname {s o f t m a x} \left(f _ {1} \left(\mathbf {q} _ {m}\right) \cdot f _ {2} \left(\mathbf {k} _ {i, 1}, \dots , \mathbf {k} _ {i, J _ {i}}\right)\right) \tag {7}
+$$
+
+where $\sum_{i=1}^{N_1} \tilde{\alpha}_{m,i}^{\mathbf{s}} = 1.0$ . Essentially, we modify the standard encoder-decoder attention such that it performs sentence selection based on $\tilde{\alpha}_{m,i}^{\mathbf{s}}$ (Eq. 7) and computes subset attention $\hat{\mathbf{A}}$ (Eq. 3).
+
+# 4.1 Complexity of Modified Attention
+
+The modified encoder-decoder attention consists of two components: i) sentence-level attention over $N_{1}$ sentences; ii) word-level attention over $rN_{2}$ words. Let $p$ denote a unit of matrix multiplication cost and $q$ denote a unit of softmax cost. The costs associated with attention are:
+
+i) Sentence-level (Eq.7): $pMN_{1}D + qMN_{1}$
+ii) Word-level (Eq.3): $2pMrN_{2}D + qMrN_{2}$
+
+The additional cost associated with the sentence-level representation on the encoder side grows with the input length $N = N_{1}N_{2}$ . Thus, as opposed to $\mathcal{O}(MN_1N_2)$ in the case of vanilla encoder-decoder attention, the overall complexity of the modified attention is $\mathcal{O}(MN_1 + k_wMrN_2 + k_eN_1N_2)$ , where $k_w\approx \frac{2pD + q}{pD + q}$ and $k_{e}$ depends on the exact form of sentence-level representation computation.
+
+# 4.2 Model-based Neural Approximator
+
+To utilize the simple partition and sentence-level structure in Eq. 7, we use a linear mapping for $f_{1}$ and a bidirectional RNN for $f_{2}$ as follows:
+
+$$
+f _ {1} \left(\mathbf {q} _ {m}\right) = \mathbf {q} _ {m} \mathbf {W} ^ {\mathbb {Q}} \tag {8}
+$$
+
+$$
+f _ {2} \left(\mathbf {k} _ {i, 1}, \dots , \mathbf {k} _ {i, J _ {i}}\right) = \mathbf {y} _ {i} \mathbf {W} ^ {\mathrm {K}} \tag {9}
+$$
+
+$$
+\mathbf {y} _ {i} = \operatorname {R N N} \left(\mathbf {k} _ {i, 1}, \dots , \mathbf {k} _ {i, J _ {i}}\right) \tag {10}
+$$
+
+As illustrated in Fig. 3, the base transformer model is extended by augmenting two layers: i) sentence-level encoder-decoder attention computing $\tilde{\alpha}_{m,i}^{\mathrm{s}}$ in Eq. 7; ii) sentence encoder computing the sentence-level representation in Eq. 10. The details about model parameters are provided in Appendix A.
+
+
+(a) BART(1k) & CNNDM
+
+
+(b) BART(1k) & XSum
+
+
+(c) LoBART(4k) & Podcast
+
+
+(d) LoBART(4k) & arXiv
+
+
+Figure 2: Performance (ROUGE-1) of BART & LoBART. The integrated training is based on $\mathcal{I}_m^{r,\mathrm{Apx}}$ .
+Figure 3: Modified architecture with model-based approximator where the base model is BART/LoBART. Model-based neural approximator is shown in orange.
+
+# 4.3 KL Loss and Integrated Training
+
+Let $\theta_{\mathrm{dec}}$ denote the original decoder, and $\tilde{\theta}$ denote the neural approximator. We train $\tilde{\theta}$ by minimizing:
+
+$$
+\mathcal {L} _ {\mathrm {K L}} = \frac {1}{M} \sum_ {m = 1} ^ {M} \mathrm {K L} \left(\boldsymbol {\alpha} _ {m} ^ {\mathrm {s}} | | \tilde {\boldsymbol {\alpha}} _ {m} ^ {\mathrm {s}}\right) \tag {11}
+$$
+
+where $\mathrm{KL}(.) = \sum_{i=1}^{N_1} \alpha_{m,i}^{\mathsf{s}} \log (\alpha_{m,i}^{\mathsf{s}} / \tilde{\alpha}_{m,i}^{\mathsf{s}})$ . In addition, we can integrate $\theta_{\mathrm{dec}}$ in the training process. With the teacher-forced cross entropy loss $\mathcal{L}_{\mathrm{xent}}$ , we define the integrated training loss:
+
+$$
+\mathcal {L} _ {\mathrm {I}} = \mathcal {L} _ {\mathrm {x e n t}} + \lambda \mathcal {L} _ {\mathrm {K L}} \tag {12}
+$$
+
+We cannot optimize $\mathcal{L}_{\mathrm{I}}$ in an end-to-end fashion because the top- $r$ operation in Eq. 6 is not differentiable. Hence, we interleave the training, i.e., update $\theta_{\mathrm{dec}}$ at fixed $\tilde{\theta}$ and update $\tilde{\theta}$ using $\mathcal{L}_{\mathrm{KL}}$ only:
+
+$$
+\begin{array}{l} \Delta \boldsymbol {\theta} _ {\mathrm {d e c}} = \nabla_ {\boldsymbol {\theta} _ {\mathrm {d e c}}} \mathcal {L} _ {\mathrm {I}} | _ {\tilde {\boldsymbol {\theta}}} = \nabla_ {\boldsymbol {\theta} _ {\mathrm {d e c}}} \mathcal {L} _ {\mathrm {x e n t}} | _ {\tilde {\boldsymbol {\theta}}} + \lambda \nabla_ {\boldsymbol {\theta} _ {\mathrm {d e c}}} \mathcal {L} _ {\mathrm {K L}} | _ {\tilde {\boldsymbol {\theta}}} \\ \Delta \tilde {\boldsymbol {\theta}} = \nabla_ {\tilde {\boldsymbol {\theta}}} \mathcal {L} _ {\mathrm {I}} = \underbrace {\nabla_ {\tilde {\boldsymbol {\theta}}} \mathcal {L} _ {\text {x e n t}} ^ {- 1}} _ {+} + \lambda \nabla_ {\tilde {\boldsymbol {\theta}}} \mathcal {L} _ {\mathrm {K L}} \tag {13} \\ \end{array}
+$$
+
+Because during training, we compute both $\alpha_{m,i}^{\mathrm{s}}$ (ideal) and $\tilde{\alpha}_{m,i}^{\mathrm{s}}$ (approx), we can use either in the top- $r$ selection. Also, inspired by scheduled sampling (Bengio et al., 2015), we try mixing them: $\alpha_{m,i}^{\mathrm{s}}$ with probability $1 - \frac{\text{step}}{\text{epoch\_size}}$ , otherwise $\tilde{\alpha}_{m,i}^{\mathrm{s}}$ .
+
+# 4.4 System Performance
+
+In Table 3, we provide two vanilla baselines: random $(\mathcal{I}_m^{r,\mathrm{Rnd}})$ obtained by random selection; ideal
+
+| System | Train | Inference | R1 | R2 | RL |
| Vanilla | X | IrrnD | 39.06 | 14.32 | 36.07 |
| Vanilla | X | IrrdIdl | 43.94 | 20.82 | 40.81 |
| KL-only | LKL | IrrApx | 43.02 | 20.02 | 39.89 |
| Int-Idl | Ll(ImrIdl) | IrrApx | 43.03 | 20.04 | 40.05 |
| Int-Apx | Ll(ImrApx) | IrrApx | 43.72 | 20.40 | 40.70 |
| Int-Mix | Ll(Mix) | IrrApx | 43.31 | 20.21 | 40.35 |
+
+Table 3: Performance on CNNDM where $r = 5$ for both training and inference. KL-only $= \tilde{\theta}$ trained on $\mathcal{L}_{\mathrm{KL}}$ ; Int $= (\theta_{\mathrm{dec}} \& \tilde{\theta})$ trained on $\mathcal{L}_{\mathrm{I}}$ . Rnd=random, Idl=ideal, Apx=approximation, Mix=scheduled(Idl/Apx).
+
+$(\mathcal{I}_m^{r,\mathrm{Idl}})$ obtained by Eq. 6. The results show that the KL-only system clearly outperforms the random selection baseline, and the performance degradation of the KL-only system can be reduced by our integrated training. The results verify the effectiveness of our modified decoder that attends to a subset of sentences. Also, Table 3 shows that it is best to use $\mathcal{I}_m^{r,\mathrm{Apx}}$ as reference in integrated training. This result is likely because we initialized integrated training from the KL-only model. In addition, we apply the modified architecture to BART trained on XSum ( $\leq 1\mathrm{k}$ words), and to LoBART trained on Podcast and arXiv ( $\leq 4\mathrm{k}$ words). The results in Fig. 2 confirm that the performance of our proposed method converges to that of the full attention baseline across all models and datasets.
+
+In addition, $r^* \approx 5,10,30,30$ , respectively. Although XSum has fewer sentences in average compared to CNNDM, $r_{\mathrm{XSum}}^* > r_{\mathrm{CNNDM}}^*$ as XSum is more abstractive. For longer summarization tasks as shown by Podcast and arXiv, the performance degradation appears larger, meaning that the task of constraining to salient sentences in longer tasks is more challenging, and larger $r$ is required.
+
+# Sensitivity of $r$ in Integrated Training
+
+We train BART in three settings: $r^{\mathrm{train}} = 2,5,10$ , and we show the performance level w.r.t. the model with $r^{\mathrm{train}} = 5$ in Fig. 4. The results show that setting $r^{\mathrm{train}}$ beyond $r^{*}$ is not necessarily beneficial as shown by the model with $r^{\mathrm{train}} = 10$ in the CNNDM result, and it is best to set $r^{\mathrm{train}}$ close to $r^{\mathrm{inference}}$ .
+
+
+(a) CNNDM
+
+
+(b) XSum
+Figure 4: $\Delta \mathrm{R}1$ (Y-axis) against $r$ at inference (X-axis).
+
+# 4.5 Further Discussion on Sentence-Level Encoder-Decoder Attention
+
+The results in Section 4.4 demonstrate empirically that a neural network can predict sparsity, therefore, allowing sentence selection. Our novel framework requires an addition of modules to the original attention mechanism, and the real gain in speed will depend on the balance of the sparsity against the computational cost of the additional modules. Consequently, the challenge is to make these additional modules highly efficient. Because the particular network realization selected in this paper is to show the feasibility of our framework, its limitations and possible improvements are discussed as follows.
+
+# Limitations and Possible Improvements
+
+The model choice of using RNN for the sentence encoder in Eq. 10 leads to a large additional computational cost (specifically large $k_{e}$ ) because the computational cost of RNN grows with $N_{1}N_{2}D^{2}$ . Because the goal is to obtain a sentence-level representation, there is an opportunity to replace RNN by a hierarchical attention that runs over sentences, which could instead lead to a computational cost that grows with $N_{1}N_{2}D$ . Additional sentence-level query and key mappings in Eq. 8 and Eq. 9 also incur a large computational cost.
+
+# Model-free Approximator
+
+Lastly, we re-visit the sentence-level attention in Eq. 4, which have been approximated by Eq. 7 and the model-based approximator. It is a challenge to attempt via a model-free algebraic approximation, which does not require any training and has
+
+little additional inference-time cost. We examined various forms, and we present one model-free approach as well as experimental results in Appendix D, but the current form has worse summarization performance than our model-based approach.
+
+# 5 Related Work
+
+The discrepancy between low/moderate attention weight sparsity and good sparse approximation could be because a considerable amount of the attention weight is assigned to special tokens, e.g. ‘.’ in all sentences, but their vector norm is small, which was observed in Kobayashi et al. (2020).
+
+The sparse attention (Eq. 3) with ideal selection (Eq. 6) can be considered as content selection, which has been shown to improve summarization (Gehrmann et al., 2018; Hsu et al., 2018). Recently, head-wise masks are applied to encoder-decoder attention at inference time, and a performance improvement is reported (Cao and Wang, 2021).
+
+Voita et al. (2019) observed that heads are redundant, and Clark et al. (2019) found that a head in BERT rarely attends to several consecutive tokens. Based on these, Huang et al. (2021) applies a stride pattern in the encoder-decoder attention, reducing its cost by a factor of the stride size, and this method is likely complementary to our work.
+
+# 6 Conclusion
+
+We show that the computational cost of the transformer decoder becomes more significant at inference time. Towards reducing this cost, first, we show that there is sparsity in the encoder-decoder attention that allows us to reduce the computational cost with a minimal degradation. Second, we partition the sentence-level attention score, and we augment the standard decoder by adding a neural network to approximate the attention over sentences, allowing sentence selection. We show that the summarization performance of our approach converges to that of the full attention baseline, while switching the complexity from $\mathcal{O}(MN_1N_2)$ to $\mathcal{O}(MN_1 + k_wMrN_2 + k_eN_1N_2)$ .
+
+# Acknowledgments
+
+This paper reports on research supported by ALTA institute, Cambridge Assessment English, University of Cambridge, and Cambridge International & St John's College Scholarship. Thanks to Yiting Lu for interesting discussions. Thanks to the anonymous reviewers for their helpful comments.
+
+# References
+
+Iz Beltagy, Matthew E Peters, and Arman Cohan. 2020. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150.
+Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. 2015. Scheduled sampling for sequence prediction with recurrent neural networks. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 1171-1179.
+Shuyang Cao and Lu Wang. 2021. Attention head masking for inference time content selection in abstractive summarization. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5008-5016, Online. Association for Computational Linguistics.
+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.
+Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D. Manning. 2019. What does BERT look at? an analysis of BERT's attention. In Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 276-286, Florence, Italy. Association for Computational Linguistics.
+Ann Clifton, Sravana Reddy, Yongze Yu, Aasish Pappu, Rezvaneh Rezapour, Hamed Bonab, Maria Eskevich, Gareth Jones, Jussi Karlgren, Ben Carterette, and Rosie Jones. 2020. 100,000 podcasts: A spoken English document corpus. In Proceedings of the 28th International Conference on Computational Linguistics, pages 5903-5917, Barcelona, Spain (Online). International Committee on Computational Linguistics.
+Arman Cohan, Franck Dernoncourt, Doo Soon Kim, Trung Bui, Seokhwan Kim, Walter Chang, and Nazli Goharian. 2018. A discourse-aware attention model for abstractive summarization of long documents. 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 615-621, New Orleans, Louisiana. Association for Computational Linguistics.
+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.
+Sebastian Gehrmann, Yuntian Deng, and Alexander Rush. 2018. Bottom-up abstractive summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4098-4109, Brussels, Belgium. Association for Computational Linguistics.
+Karl Moritz Hermann, Tomás Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. 2015. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 1693-1701.
+Wan-Ting Hsu, Chieh-Kai Lin, Ming-Ying Lee, Kerui Min, Jing Tang, and Min Sun. 2018. A unified model for extractive and abstractive summarization using inconsistency loss. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 132-141, Melbourne, Australia. Association for Computational Linguistics.
+Luyang Huang, Shuyang Cao, Nikolaus Parulian, Heng Ji, and Lu Wang. 2021. Efficient attentions for long document summarization. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1419-1436, Online. Association for Computational Linguistics.
+Rosie Jones, Ben Carterette, Ann Clifton, Maria Eskevich, Gareth J. F. Jones, Jussi Karlgren, Aasish Pappu, Sravana Reddy, and Yongze Yu. 2020. Trec 2020 podcasts track overview. In The 29th Text Retrieval Conference (TREC) notebook.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Goro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, and Kentaro Inui. 2020. Attention is not only a weight: Analyzing transformers with vector norms. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7057-7075, Online. Association for Computational Linguistics.
+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, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational
+
+Linguistics, pages 7871-7880, Online. Association for Computational Linguistics.
+Manling Li, Lingyu Zhang, Heng Ji, and Richard J. Radke. 2019. Keep meeting summaries on topic: Abstractive multi-modal meeting summarization. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2190-2196, Florence, Italy. Association for Computational Linguistics.
+Chin-Yew Lin. 2004. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out, pages 74-81, Barcelona, Spain. Association for Computational Linguistics.
+Potsawee Manakul and Mark Gales. 2021. Long-span summarization via local attention and content selection. 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 6026-6041, Online. Association for Computational Linguistics.
+Potsawee Manakul, Mark J.F. Gales, and Linlin Wang. 2020. Abstractive Spoken Document Summarization Using Hierarchical Model with Multi-Stage Attention Diversity Optimization. In Proc. Interspeech 2020, pages 4248-4252.
+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, Brussels, Belgium. Association for Computational Linguistics.
+Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 8024-8035.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
+Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. 2020. Efficient transformers: A survey. arXiv preprint arXiv:2009.06732.
+
+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.
+Elena Voita, David Talbot, Fedor Moiseev, Rico Senrich, and Ivan Titov. 2019. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5797-5808, Florence, Italy. Association for Computational Linguistics.
+Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, 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.
+Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. 2016. Google's neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144.
+Manzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Otanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, and Amr Ahmed. 2020. Big bird: Transformers for longer sequences. In Advances in Neural Information Processing Systems, volume 33, pages 17283-17297. Curran Associates, Inc.
+
+# A Reproducibility Details
+
+# A.1 Models
+
+BART/LoBART: We use the HuggingFace's implementation (Wolf et al., 2020), including BART models fine-tuned to CNNDM and XSum. We take LoBART from Manakul and Gales (2021), including LoBART(4k)+MCS fine-tuned to Podcast and arXiv. MCS is the multitask content selection system for handling the Podcast/arXiv input documents that exceed 4096 words.
+
+Modified Architecture: As shown in Fig. 3, the modified architecture consists of a sentence encoder and a sentence-level encoder-decoder attention. The sentence encoder, which approximates $f_{2}(.)$ in Eq. 7, is a two-layer bi-directional GRU (Cho et al., 2014) with hidden dimension of 1024. The sentence-level encoder-decoder attention has linear mapping weights $\mathbf{W}^{\mathbb{Q}}$ (query) and $\mathbf{W}^{\mathrm{K}}$ (key), and both weights have the same dimension as and are initialized from their corresponding word-level encoder-decoder attention's linear mapping weights in the base model. The total number of additional parameters is 58.8M.
+
+# A.2 Data
+
+CNNDM: We follow the standard train-valid/test split of 287,113/13,368/11,490.
+
+XSum: We follow the standard train-valid/test split of 204,045/11,332/11,334.
+
+Spotify Podcast: We follow the data processing and split in Jones et al. (2020), resulting in train-valid/test splits of 60,415/2,189/1,027.
+
+arXiv: We follow the standard train-valid/test split of 203,037/6,436/6,440.
+
+Our data processing is based on the byte-pair encoding (BPE) tokenizer same as the BART-large tokenizer, and we use the NLTK toolkit for sentence splitting. **In Fig. 2 and Fig. 4, to reduce computational cost, we use first 2,000 samples of each test set, except Podcast which contains less than 2,000 samples.
+
+# A.3 Training and Inference
+
+We use PyTorch (Paszke et al., 2019) in our experiments. All training experiments use the Adam
+
+| Dataset | N | N1 | M | N/M |
| CNNDM | 870 | 28.7 | 67.4 | 14.2 |
| XSum | 489 | 17.4 | 27.9 | 18.2 |
| Podcast | 5727 | 330.8 | 86.6 | 143.9 |
| arXiv | 8584 | 237.0 | 364.9 | 45.3 |
+
+Table 4: Data statistics (average over corpus). $N=$ input length, $N_{1}=$ #sentences, $M=$ summary length.
+
+optimizer (Kingma and Ba, 2015) with $\beta_{1} = 0.9$ , $\beta_{2} = 0.999$ , and the learning rate is:
+
+$$
+\mathrm {l r} = 0. 0 0 2 \times \min (\text {s t e p} ^ {- 0. 5}, \text {s t e p} \times \text {w a r m u p} ^ {- 1. 5})
+$$
+
+where we use 20,000 warmup steps. In all experiments, we set batch size to 1, and gradient accumulation to 2 steps. We evaluate the training loss on the validation set every 20,000 steps, and stop the training if the validation loss does not improve 3 times. All training experiments converged within 1 epoch. All experiments were carried out in 32-bit precision on either one V100 (32GB) GPU, or one RTX 2080Ti (11GB) GPU.
+
+At inference time, we use the standard setting: beam search of width 4, and length penalty of 2.0 (Wu et al., 2016) for all experiments. The ROUGE (Lin, 2004) scoring tool is pyrouge. $^7$
+
+# A.4 Multi-head attention
+
+In all of the equations and expressions in the paper, we omit the heads for simplicity. Both BART and LoBART models have 16 heads. In Fig. 1, we average $\alpha_{m,i}^{\mathrm{s}}$ over heads, before the summation. When computing an uncertainty measure such as entropy $\mathrm{H(.)}$ or KL-divergence $\mathrm{KL(.)}$ , we compute the measure for each head separately and take the average. In obtaining $\mathcal{I}_m^r$ , we average $\alpha_{m,i}^{\mathrm{s}}$ over heads, before the top- $r$ operation, i.e. all heads get assigned the same subset of sentences, but the differences are across layers and decoding timesteps.
+
+# A.5 KL Loss and Integrated Training
+
+The target $\alpha_{m,i}^{\mathbf{s}}$ is re-normalized to encourage higher sparsity as follows:
+
+$$
+\boldsymbol {\alpha} _ {m} ^ {\mathrm {s}} \leftarrow \operatorname {s o f t m a x} \left(\frac {\log \left(\boldsymbol {\alpha} _ {m} ^ {\mathrm {s}}\right)}{T}\right) \tag {15}
+$$
+
+where temperature $T$ is set to 0.5. For integrated training, we set $\lambda$ in $\mathcal{L}_{\mathrm{I}}$ to 0.2. We initialize integrated training experiments from KL-only models.
+
+# B Time Analysis
+
+For each mode in Table 1, we take 6 samples of $M$ and the average time of 100 iterations. Curve fitting yields R-squared of at least 0.994.
+
+Computational time as function of $M$ and $N$ is time $= c_{1} + c_{2}M + c_{3}N + c_{4}MN + c_{5}M^{2} + c_{6}N^{2}$ . The coefficients are obtained by a least-squares regression, e.g. $\mathbf{c}^{*} = (\mathbf{P}^{T}\mathbf{P})^{-1}\mathbf{P}^{T}\mathbf{t}$ where $\mathbf{P}$ is the matrix of $M, N$ associated with the coefficients, and $\mathbf{t}$ contains the time measures. We collect 30 samples of the average time of $100\mathrm{F} + \mathrm{B}$ passes, spanning $N \in [256, 1024]$ and $M \in [50, 300]$ . The normalized coefficients are: $c_{1} = 1.00$ , $c_{2} = 3.78 \times 10^{-3}$ , $c_{3} = 3.15 \times 10^{-3}$ , $c_{4} = 1.47 \times 10^{-6}$ , $c_{5} = 7.26 \times 10^{-7}$ , $c_{6} = 7.79 \times 10^{-7}$ . Because $c_{4} \approx 2c_{5}$ and $N > M$ , the enc-dec attention cost is greater than the decoder self attention cost.
+
+# C Sensitivity to Random Selection
+
+| System | R1 | R2 | RL |
| Vanilla (γ = 0.0) | 39.06 | 14.32 | 36.07 |
| LA-tuned (γ = 0.1) | 28.43 | 7.72 | 24.00 |
| LA-tuned (γ = 1.0) | 21.38 | 4.22 | 17.69 |
+
+# D Model-free Approximation for Eq. 4
+
+Since $\alpha_{m,i}^{\mathbf{s}} = \frac{1}{Z_m}\sum_{j = 1}^{J_i}\exp (\mathbf{q}_m\cdot \mathbf{k}_{i,j})$ is used to rank input sentences, the normalization term, $Z_{m}$ can be dropped. The encoder-decoder attention has $\mathcal{O}(MN_1N_2)$ complexity because $\mathbf{q}_m\cdot \mathbf{k}_{i,j}$ is computed for every $m$ and $(i,j)$ pair. Hence, if we can group $\mathbf{k}_{i,j}$ into sentences, the complexity could potentially be reduced. We try the following approximation of unnormalized $\alpha_{m,i}^{\mathbf{s}}$ :
+
+$$
+\begin{array}{l} \sum_ {j = 1} ^ {J _ {i}} \exp (\mathbf {q} _ {m} \cdot \mathbf {k} _ {i, j}) \\ = \sum_ {j = 1} ^ {J _ {i}} \prod_ {d = 1} ^ {D} \exp \left(q _ {m, d} k _ {i, j, d}\right) (16) \\ \approx \sum_ {j = 1} ^ {J _ {i}} \sum_ {d = 1} ^ {D} \exp \left(q _ {m, d} k _ {i, j, d}\right) (17) \\ \approx \sum_ {j = 1} ^ {J _ {i}} \sum_ {d = 1} ^ {D} \phi \left(q _ {m, d}\right) \phi \left(k _ {i, j, d}\right) (18) \\ = \phi (\mathbf {q} _ {m}) \cdot \left(\sum_ {j = 1} ^ {J _ {i}} \phi (\mathbf {k} _ {i, j})\right) (19) \\ \end{array}
+$$
+
+where $d = \{1,\dots,D\}$ is the hidden dimension, and $\phi(.)=\mathrm{ELU}(.)+1$ (or other form such as exp and ReLU). The model-free method reduces complexity from $\mathcal{O}(MN_1N_2)$ to $\mathcal{O}(MN_1 + k_wMrN_2 + k_eN_1N_2)$ where $k_{e}$ is now much smaller compared to the model-based approach. Based on Eq. 19, we provide model-free results in Table 6.
+
+Table 5: Impact of sparsity on the sensitivity to random selection based on CNNDM with $r = 5$ .
+
+| Selection Method | R1 | R2 | RL |
| Ideal (Eq.6) | 43.94 | 20.82 | 40.81 |
| Best Model-based | 43.72 | 20.40 | 40.70 |
| Random | 39.06 | 14.32 | 36.07 |
| Model-free (Eq.19) | 40.01 | 17.28 | 36.95 |
+
+Table 6: Model-free results on CNNDM $\left( {r = 5}\right)$ .
+
+Our model-free approach is better than the random selection baseline, but it is significantly worse than both the ideal selection baseline and the model-based approach. The reasons for this poor performance are: (i) the approximation from (16) to (17) requires the following condition to be true: $A_{1}A_{2} > B_{1}B_{2} \rightarrow A_{1} + A_{2} > B_{1} + B_{2}$ , so it is inaccurate when the values are not in a similar range; (ii) the approximation from (17) to (18) is inaccurate for non-positive values. In conclusion, this experiment investigates an alternative challenging method, which would not require any training and would be computationally cheaper at inference time. Although the current algebra does not work well, we hope that our initial study might draw more interests into this type of model-free approach to exploit the sentence structure in seq2seq tasks such as abstractive summarization.
+
+# E Word-level and Sentence-level Attention Weight Plots
+
+Constraining the encoder-decoder attention to $r$ sentences is motivated by the observations of sentence-level attention (in Fig. 5b, 6b, 7b, 8b). Note that we average over all heads for the plots.
+
+For instance, Fig. 5 shows that the decoder attends particularly to input sentences #1,#2,#13 in the summary generation. Compared to Fig. 5, Fig. 6 shows a wider spread of the attention over sentences in a more abstractive task. When using LoBART, Fig. 7 and Fig. 8 show a similar trend of the sparsity to BART scenarios. These figures also explain Fig. 1a (Section 3) that $\sum_{i}^{\mathcal{T}_m^r}\alpha_{m,i}^s$ is only low/moderate because most sentences get assigned some attention weights, despite being non-salient.
+
+
+(a) Word-Level
+
+
+(b) Sentence-Level $(\alpha_{m,i}^{\mathrm{s}})$
+
+
+Figure 5: Example of BART's encoder-decoder attention evaluated on CNNDM test set.
+(a) Word-Level
+
+
+(b) Sentence-Level $(\alpha_{m,i}^{\mathrm{s}})$
+
+
+(a) Word-Level
+Figure 7: Example of LoBART's encoder-decoder attention evaluated on Podcast test set.
+
+
+Figure 6: Example of BART's encoder-decoder attention evaluated on XSum test set.
+(b) Sentence-Level $(\alpha_{m,i}^{\mathrm{s}})$
+
+
+(a) Word-Level
+Figure 8: Example of LoBART's encoder-decoder attention evaluated on arXiv test set.
+
+
+(b) Sentence-Level $(\alpha_{m,i}^{\mathrm{s}})$
\ No newline at end of file
diff --git a/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/images.zip b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..1668815d20f1942489debf78f102920b8d6f4019
--- /dev/null
+++ b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:654ac3d2f0935e8d4ea27952a15d58f107773bd05f89b029c2cfe113b0e67033
+size 575950
diff --git a/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/layout.json b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..d72715e30cb88d9da1b3b82999d7325cabd69219
--- /dev/null
+++ b/sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:404872c139e383f9fedc8fee16a1ea101c114e4c152c95b90fca08f64c8234ea
+size 489136
diff --git a/speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_content_list.json b/speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..8031ab6d34f3be68a042588a254739316213b877
--- /dev/null
+++ b/speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a2df98b8646873781633b66e4ff1e61bdcb56bd0363b0e34604ac000cabcadf6
+size 56605
diff --git a/speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_model.json b/speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..77d791b9ab088caf39cdd62e8144fe7bbe5c8d86
--- /dev/null
+++ b/speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dabe55848b9def35c4264050c0e2fffbe1fe9c80bb39da5c208e1c8d2860cb77
+size 67394
diff --git a/speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_origin.pdf b/speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..db2a4de1aeec2e65e13bab4e651f207c144db8db
--- /dev/null
+++ b/speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d9512e6608bd95c776686d937f5b1ef3795e730cff9291852d31f4e6ae7576bc
+size 507991
diff --git a/speechformerreducinginformationlossindirectspeechtranslation/full.md b/speechformerreducinginformationlossindirectspeechtranslation/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..469a279853e57ff4d08f1a8a215999ebce56919b
--- /dev/null
+++ b/speechformerreducinginformationlossindirectspeechtranslation/full.md
@@ -0,0 +1,184 @@
+# Speechformer: Reducing Information Loss in Direct Speech Translation
+
+Sara Papi $^{1,2}$ , Marco Gaido $^{1,2}$ , Matteo Negri $^{1}$ , Marco Turchi $^{1}$ $^{1}$ Fondazione Bruno Kessler
+ $^{2}$ University of Trento
+{spapi,mgaido,negri,turchi} $@$ fbk.eu
+
+# Abstract
+
+Transformer-based models have gained increasing popularity achieving state-of-the-art performance in many research fields including speech translation. However, Transformer's quadratic complexity with respect to the input sequence length prevents its adoption as is with audio signals, which are typically represented by long sequences. Current solutions resort to an initial sub-optimal compression based on a fixed sampling of raw audio features. Therefore, potentially useful linguistic information is not accessible to higher-level layers in the architecture. To solve this issue, we propose Speechformer, an architecture that, thanks to a reduced memory usage in the attention layers, avoids the initial lossy compression and aggregates information only at a higher level according to more informed linguistic criteria. Experiments on three language pairs (en→de/es/nl) show the efficacy of our solution, with gains of up to 0.8 BLEU on the standard MuST-C corpus and of up to 4.0 BLEU in a low resource scenario.
+
+# 1 Introduction
+
+Speech-to-text translation (ST) has been traditionally approached with cascade architectures consisting of a pipeline of two sub-components (Stentiford and Steer, 1988; Waibel et al., 1991): an automatic speech recognition (ASR), which transforms the audio input into a textual representation, and a machine translation (MT) model, which projects the transcript into the target language. A more recent approach consists in directly translating speech into target text using a single model (Bérard et al., 2016; Weiss et al., 2017). This direct solution has interesting advantages (Sperber and Paulik, 2020): $i$ ) it can better exploit audio information (e.g. prosody) during the translation phase, $ii$ ) it has lower latency, and $iii$ ) it is not affected by error propagation.
+
+Thanks to these advantages, the initially huge performance gap with cascade systems has gradually closed (Ansari et al., 2020), motivating research towards further improvements.
+
+Direct ST models are fed with features extracted from the audio with high frequency (usually every 10ms). This, on average, makes the resulting input sequence of vectors $\sim 10$ times longer than the corresponding text, leading to an intrinsically redundant (i.e. long and repetitive) representation. For this reason, it is not possible to process speech data with a vanilla Transformer encoder (Vaswani et al., 2017), whose self-attention layers have quadratic memory complexity with respect to the input length. State-of-the-art architectures tackle the problem by collapsing adjacent vectors in a fixed way, i.e. by mapping a predefined number of vectors (usually 4) into a single one, either using strided convolutional layers (Bérard et al., 2018; Di Gangi et al., 2019; Wang et al., 2020a) or by stacking them (Sak et al., 2015). As a positive side effect, these length reduction solutions lower input redundancy. As a negative side effect, they disregard the variability over time of the amount of linguistic and phonetic information in audio signals (e.g. due to pauses and speaking rate variations) by giving equal weight to all features. In doing this, relevant features are penalized and considered equally important to the irrelevant ones, resulting in an information loss.
+
+Recently, Salesky et al. (2019) obtained considerable translation quality gains by collapsing consecutive vectors with the same phonetic content instead of compressing them in a fixed way. Zhang et al. (2020) also showed that selecting a small percentage $(\sim 16\%)$ of input time steps based on their informativeness improves ST quality. On the downside, these approaches respectively require adding a model that performs phoneme classification and a pre-trained adaptive feature selection layer on top of an ASR encoder, losing the compactness of direct solutions at the risk of error propagation.
+
+In direct ST, Liu et al. (2020) and Gaido et al. (2021) addressed the problem with a transcript/phoneme-based compression leveraging Connectionist Temporal Classification (CTC - Graves et al. 2006). However, since these methods are applied to the representation encoded by Transformer layers, the initial content-unaware down-sampling of the input is still required for memory reasons, at the risk of losing important information.
+
+To avoid initial fixed compression, we propose Speechformer: the first Transformer-based architecture that processes full audio content maintaining the original dimensions of the input sequence. Inspired by recent work on reducing the memory complexity of the attention mechanism (Wang et al., 2020b), we introduce a novel attention layer – the ConvAttention – whose memory requirements are reduced by means of convolutional layers. As the benefits of avoiding the initial lossy compression might be outweighed by the increased redundancy of the encoded audio features, we aggregate the high-level representation of the input sequence in a linguistically informed way, as in (Liu et al., 2020; Gaido et al., 2021). In other words, we collapse vectors representing the same linguistic atomic content (words, sub-words, pauses) into a single element, since they express the same linguistic information. The usage of the ConvAttention and of the linguistically motivated compression produces a considerably shorter, yet informative, sequence that fits the memory requirements of vanilla Transformer encoder layers. Experiments on three language directions (en→de/es/nl) show that the proposed architecture outperforms a state-of-the-art ST model by up to 0.8 BLEU points on the standard MuST-C corpus and obtains significantly larger gains (up to 4.0 BLEU) in a low resource setting where the amount of training data is reduced to 100 hours.
+
+# 2 Model
+
+In this section, we first introduce a novel attention layer that enables to process raw audio features without downsampling (§2.1). Then, we present an architecture that leverages this attention mechanism in the first encoder layers and reduces the redundancy of the more informative but longer resulting sequences with CTC compression (§2.2).
+
+# 2.1 ConvAttention layer
+
+State-of-the-art ST models employ convolutional neural networks to sample the feature sequence
+
+
+Figure 1: Attention mechanism with the proposed convolutional compression of $K$ and $V$ .
+
+to a lower dimension (typically by a factor of 4), enabling the use of Transformer layers otherwise impossible given their memory consumption. Outside ST, the Linformer architecture (Wang et al., 2020b) has been recently proposed to reduce the quadratic complexity of the product between the attention matrix (resulting from the product of the query $-Q$ and key $-K$ matrices) and the value $(V)$ matrix by applying a linear projection to $K$ and $V$ . These projections bring the dimension of the sequence length of $K$ and $V$ to a fixed value, yielding a linear memory complexity. However, a direct application of this architecture to ST is problematic due to the high variability in audio lengths. On one side, mapping those sequences to a fixed dimension can cause an excessive information loss, with a consequent performance drop. On the other, it poses technical issues: the linear projection matrix has size $n \times k$ , where $n$ is the maximum input length and $k$ is the fixed dimension. If the input has a length $n'$ shorter than $n$ , which is a common case due to the high variability in length of audio sequences, only the first $n'$ weights of the matrix are updated. This results in gradients of different dimensions across GPUs, leading to training failures due to inconsistencies.
+
+To avoid the aforementioned problems, we propose the adoption of ConvAttention (Figure 1), in which the linear projections of the Linformer architecture are substituted, both in $K$ and $V$ , with a single 1D convolutional layer. Hence, the length of the sequences used in the scaled dot-product attention depends on the stride of the convolution, a hyper-parameter we named compression factor $(\chi)$ , which controls the memory complexity of the ConvAttention. Namely, being $n$ the temporal dimension of $K$ and $V$ , the convolution output length is $\frac{n}{\chi}$ and the complexity of the ConvAttention is
+
+$O\left(\left(\frac{n}{\chi}\right)^{2}\right)$ , i.e. a $\frac{1}{\chi^2}$ factor lower than a vanilla Transformer self-attention. For instance, setting $\chi$ to 4 leads to the same memory consumption as standard ST models with an initial $\times 4$ subsampling (i.e. with two initial convolutional layers with stride 2).
+
+Notice that the output sequence length is still equal to the input sequence length as it depends on the length of $Q$ that is not modified.
+
+# 2.2 Speechformer
+
+The introduction of ConvAttention layers allows us to avoid sub-optimal fixed compressions that disregard the variability over time in the amount of audio information. However, since an encoder consisting only of ConvAttention layers does not compress the length of the original input sequence, the decoder will be fed with long and redundant sequences that are difficult to attend, leading to potential performance degradation.
+
+To overcome this problem, as in (Liu et al., 2020; Gaido et al., 2021), we apply a content-informed compression to high-level hidden states trained using the CTC loss (Graves et al., 2006) to represent the linguistic content. Specifically, the CTC loss produces a prediction for each input time step and then merges equal predictions for consecutive time steps. The resulting sequence is compared with the reference, which is the sequence of subwords representing the transcript of the input utterance. CTC compression, similarly to the loss computation, collapses consecutive features corresponding to the same predictions, averaging them. After this operation, the sequence is reduced to a representation dimensionally closer to its textual content, which can be processed by the original attention mechanism without the need of approximations.
+
+Speechformer (see Figure 2), is composed of $E_{L}$ ConvAttention layers up to a CTC compression layer, after which there are $E_{T}$ Transformer encoder layers. The $E_{L}$ ConvAttention layers are meant to learn the linguistic content of the input audio while the $E_{T}$ Transformer encoder layers are in charge of learning higher-level semantic representations, i.e. the encoder outputs, which the decoder has to convert into a text in the target language. We also maintain the two 1D convolutional layers before the ConvAttention layers but without striding, so that no sub-sampling is applied to the input. We make this choice both to keep the number of parameters comparable to the existing architectures, and to let the model learn a better representation of the
+
+
+Figure 2: Speechformer architecture with $E_{L}$ ConvAttention Layers and $E_{T}$ Transformer Encoder Layers.
+
+| kernel | 16 | 16 | 8 | 8 | 4 |
| χ | 16 | 8 | 8 | 4 | 4 |
| BLEU | 19.7 | 20.6 | 20.5 | 21.3 | 20.2 |
+
+Table 1: BLEU on MuST-C en-de dev set varying the compression factor $\chi$ and 1D convolutional kernel size. The scores are obtained without label smoothing.
+
+input before feeding it to the attention mechanism.
+
+# 3 Experimental Settings
+
+We experimented on three languages of MuST-C (Cattoni et al., 2021): English-German, English-Spanish, and English-Dutch. To ensure the reproducibility of our work, all training details are provided in the Appendix and the code - based on fairseq (Ott et al., 2019) - is released open source.
+
+Following (Wang et al., 2020b), we share the convolution parameters of the ConvAttention layers both among $K$ and $V$ and among the attention heads. We select the compression factor and the 1D convolution kernel size with a set of preliminary experiments on the en-de validation set. The compression factor $(\chi)$ is chosen among 4, 8, and 16, since 4 is the minimum value that avoids out-of-memory issues. The kernel size is set either equal to or twice as the value of $\chi$ . Table 1 shows that the combination of a compression factor of 4 and a kernel size of 8 leads to better performance compared to the other combinations. Consequently, in all our experiments we use this setting.
+
+We initialize the ConvAttention weights of Speechformer with those of a pre-trained ST model
+
+| Model | en-de | en-es | en-nl | Inference Time |
| dev | tst-COMMON | dev | tst-COMMON | dev | tst-COMMON |
| (Inaguma et al., 2020) | - | 22.9 | - | 28.0 | - | 27.4 | - |
| (Wang et al., 2020a) | - | 22.7 | - | 27.2 | - | 27.3 | - |
| Our baseline + compression | 22.5 | 22.8 | 31.2 | 27.9 | 24.2 | 27.2 | 1.0x |
| 22.3 | -0.2 | 22.8 | +0.0 | 31.1 | -0.1 | 27.9 | +0.0 | 24.2 | +0.0 | 27.0 | -0.2 | 0.9x |
| Plain ConvAttention | 23.1* | +0.6 | 23.2 | +0.4 | 31.5 | +0.3 | 27.7 | -0.2 | 24.8* | +0.6 | 26.9 | -0.3 | 1.8x |
| Speechformer | 23.3* | +0.8 | 23.6* | +0.8 | 31.8* | +0.6 | 28.5* | +0.6 | 24.9* | +0.7 | 27.7* | +0.5 | 1.3x |
+
+Table 2: BLEU score (average over 3 runs) on English→Dutch (en-nl), English→German (en-de), and English→Spanish (en-es) of MuST-C tst-COMMON (tst) and the dev (validation) set. The * symbol indicates statistically significant improvements over the baseline. Statistical significance is computed with a t-test (Student, 1908), whose null hypothesis is that the mean of the considered experiment is not higher than the mean of the baseline. We consider the result statistically significant if we can reject the null hypothesis with $95\%$ confidence.
+
+having only ConvAttention layers in the encoder, since, in the initial random state, the CTC-based compression might not properly reduce the input sequence, leading to out-of-memory issues in the following Transformer encoder layers. Notice that the pre-training does not improve performance. Indeed, Gaido et al. (2021) already showed that the encoder pre-training improves the baseline performance only without the additional CTC loss and that the results obtained by training without CTC loss and with encoder pre-training are identical to those achieved with the additional CTC loss. These findings have been confirmed in our experiments: $i$ ) initializing the encoder of the baseline with either an ASR or an ST encoder did not bring any improvement, and $ii$ ) our results are on par with those obtained with encoder pre-training and no additional CTC loss. We do not include the results with encoder pre-training of the baselines, as they do not bring any additional insight.
+
+# 4 Results
+
+We compare our proposed model to a strong baseline represented by a Transformer-based model with initial fixed sub-sampling (Wang et al., 2020a) and its baseline+compression variant that includes the average CTC compression strategy, as per (Gaido et al., 2021). We choose to also develop the second baseline to make the comparison with Speechformer fair since they both use the CTC compression strategy. Table 2 reports the results computed with SacreBLEU $^2$ (Post, 2018). For each experiment, we report the average over 3 runs to ensure that performance differences do not depend on the fluctuations of particularly good or bad runs.
+
+First, it can be noticed that our baseline is in line with state-of-the-art architectures trained only
+
+on MuST-C (Wang et al., 2020a; Inaguma et al., 2020). Second, the addition of CTC compression to the baseline model does not bring benefits. This confirms the findings of Gaido et al. (2021), who showed that applying CTC compression using transcripts produces differences in score that are not statistically significant. Speechformer, instead, results in statistically significant improvements over the baseline in all language directions, with BLEU gains ranging from 0.5 (for en-nl) to 0.8 (for ende). As the CTC compression is not helpful for the baseline, we also evaluate a model (Plain ConvAttention) whose encoder is a stack of ConvAttention layers, i.e. without vanilla Transformer-encoder layers and any form of compression. The drop in performance with respect to Speechformer varies between 0.4 and 0.8 BLEU on all language pairs, supporting our hypothesis that a non-compressed encoder output is too redundant to be effectively attended by the decoder.
+
+Low-Resource Settings. We suppose that the higher gains on en-de may be related to the size of the training data. Indeed, the en-de section of MuST-C used for training is the smallest one, containing $20\%$ fewer data than the en-es section and $10\%$ less than the en-nl one. Thus, we study Speechformer's performance in different data conditions by progressively reducing the amount of training data. For this analysis, we select the enes section of MuST-C as it contains the highest number of hours (478h) among the three languages, and we experiment with three subsets, respectively containing 385h (corresponding to the amount of training data for en-de), 200h, and 100h (which can be considered a limited quantity given that the number of hours is respectively less than half and one fourth of the available data). Figure 3 shows that the gains obtained by Speechformer over the baseline do not vary significantly between 385h
+
+and 478h (0.5 vs 0.6 BLEU). We can then conclude that the gain variation between en-de and en-es does not depend on the smaller size of the en-de training set. However, in the low resource settings (200h and 100h), the gains obtained by the Speechformer are much larger, amounting to 1.1 BLEU with 200h and 4.0 BLEU with 100h. To validate the robustness of these results, we also experimented on the en-de language pair and obtained consistent results: Speechformer outperforms the baseline by 1.5 BLEU (19.6 vs 18.1 BLEU) with 200h of training data and by 1.9 BLEU (9.7 vs 7.8 BLEU) with 100h of training data, achieving a considerable relative improvement of more than $24\%$ . Although it brings consistent and significant gains in higher resource scenarios, these experiments show that Speechformer is particularly fruitful in low-resource settings. We leave to future work the assessment of the behavior of Speechformer in unrestricted data conditions (e.g. when using large ASR corpora to generate pseudo-labelled ST training data).
+
+
+Figure 3: Architecture comparison varying the amount of en-es training data (478h, 385h, 200h, and 100h).
+
+Inference Time. The ConvAttention layers process the whole input sequences, which are 4 times larger than those elaborated by the baseline attention mechanism. Thereby, a slow-down at inference time is expected, especially for the Plain ConvAttention, whose encoder layers are all ConvAttention layers. The last column of Table 2 confirms that the Plain ConvAttention architecture is 1.8 times slower than the baseline, i.e. the inference time is nearly twice. Speechformer is also slower than the baseline, but the overhead amounts to only $30\%$ instead of $80\%$ . Moreover, it can be noticed that the size of the attention matrix – and therefore the corresponding computational cost – can be
+
+controlled in the Speechformer with the compression factor $(\chi)$ hyper-parameter. We leave to future studies the analysis of the trade-off between overall translation quality and inference time, which is usually irrelevant in offline ST, but becomes critical in simultaneous scenarios.
+
+Manual Analysis. Lastly, we inspected the baseline and Speechformer outputs to better understand the reason behind the improvements brought by our architecture. This qualitative analysis was conducted on a sample of 200 sentences of the ende test set – the language direction showing the largest gap between the systems (+0.8, see Table 2) – by a professional linguist with C2 German level. It emerged (see the Appendix for examples) that Speechformer tends to have better word-ordering, a typical problem arising when translating from an SVO language like English to an SOV language like German. Furthermore, Speechformer outputs display a better punctuation positioning – attributable to an improved handling of pauses and prosody – and a reduction of the number of audio misunderstandings and omissions. Together with the overall BLEU gains, these findings provide us with interesting hints about the potential of Speechformer.
+
+# 5 Conclusion
+
+In the wake of previous works showing the benefits of a content-informed compression over fixed downsampling of the audio features, we proposed Speechformer: the first ST Transformer-based model able to encode the whole raw audio features without any sub-optimal initial subsampling typical of current state-of-the-art models. Our solution is made possible by the introduction of a modified attention mechanism – the ConvAttention – that reduces the memory complexity to $O\left(\left(\frac{n}{\chi}\right)^2\right)$ . As the plain application of ConvAttention layers leads to redundant sequences, high-level hidden states are compressed with a CTC-based strategy to obtain a compact, yet informative representation that can be processed by vanilla Transformer encoder layers. Experiments on three language pairs show that Speechformer significantly outperforms a state-of-the-art ST model by 0.5-0.8 BLEU, reaching a peak of 4 BLEU points in a low resource scenario.
+
+# Acknowledgements
+
+The authors would like to thank Alina Karakanta for the support and help with the manual analysis.
+
+# References
+
+Ebrahim Ansari, Amittai Axelrod, Nguyen Bach, Ondrej Bojar, Roldano Cattoni, Fahim Dalvi, Nadir Durrani, Marcello Federico, Christian Federmann, Jiatao Gu, Fei Huang, Kevin Knight, Xutai Ma, Ajay Nagesh, Matteo Negri, Jan Niehues, Juan Pino, Elizabeth Salesky, Xing Shi, Sebastian Stüker, Marco Turchi, Alexander Waibel, and Changhan Wang. 2020. FINDINGS OF THE IWSLT 2020 EVALUATION CAMPAIGN. In Proceedings of the 17th International Conference on Spoken Language Translation, pages 1-34, Online. Association for Computational Linguistics.
+Parnia Bahar, Tobias Bieschke, and Hermann Ney. 2019. A Comparative Study on End-to-end Speech to Text Translation. In Proceedings of International Workshop on Automatic Speech Recognition and Understanding (ASRU), pages 792-799, Sentosa, Singapore.
+Alexandre Bérard, Laurent Besacier, Ali Can Kocabiyikoglu, and Olivier Pietquin. 2018. End-to-End Automatic Speech Translation of Audiobooks. In Proceedings of ICASSP 2018 - IEEE International Conference on Acoustics, Speech and Signal Processing, Calgary, Alberta, Canada.
+Alexandre Bérard, Olivier Pietquin, Christophe Servan, and Laurent Besacier. 2016. Listen and Translate: A Proof of Concept for End-to-End Speech-to-Text Translation. In NIPS Workshop on end-to-end learning for speech and audio processing, Barcelona, Spain.
+Roldano Cattoni, Mattia Antonino Di Gangi, Luisa Bentivogli, Matteo Negri, and Marco Turchi. 2021. Must-c: A multilingual corpus for end-to-end speech translation. Computer Speech & Language, 66:101155.
+Mattia A. Di Gangi, Matteo Negri, Roldano Cattoni, Roberto Dessi, and Marco Turchi. 2019. Enhancing Transformer for End-to-end Speech-to-Text Translation. In Proceedings of Machine Translation Summit XVII Volume 1: Research Track, pages 21-31, Dublin, Ireland. European Association for Machine Translation.
+Marco Gaido, Mauro Cettolo, Matteo Negri, and Marco Turchi. 2021. CTC-based Compression for Direct Speech Translation. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 690-696, Online. Association for Computational Linguistics.
+Alex Graves, Santiago Fernández, Faustino J. 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 (ICML), pages 369-376, Pittsburgh, Pennsylvania.
+
+Hirofumi Inaguma, Shun Kiyono, Kevin Duh, Shigeki Karita, Nelson Yalta, Tomoki Hayashi, and Shinji Watanabe. 2020. ESPnet-ST: All-in-One Speech Translation Toolkit. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 302-311, Online. Association for Computational Linguistics.
+Suyoun Kim, Takaaki Hori, and Shinji Watanabe. 2017. Joint CTC-attention based end-to-end speech recognition using multi-task learning. In Proceedings of the 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 4835-4839, New Orleans, Louisiana.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Philipp Koehn. 2004. Statistical Significance Tests for Machine Translation Evaluation. In Proceedings of the 2004 Conference on Empirical Methods in Natural Language Processing, pages 388-395, Barcelona, Spain. Association for Computational Linguistics.
+Taku Kudo. 2018. Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidates. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 66-75, Melbourne, Australia. Association for Computational Linguistics.
+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.
+Yuchen Liu, Junnan Zhu, Jiajun Zhang, and Chengqing Zong. 2020. Bridging the Modality Gap for Speech-to-Text Translation.
+Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. *fairseq: 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.
+Daniel S. Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D. Cubuk, and Quoc V. Le. 2019. SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognition. In Proceedings of Interspeech 2019, pages 2613-2617, Graz, Austria.
+
+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, Belgium, Brussels. Association for Computational Linguistics.
+Hasim Sak, Andrew Senior, Kanishka Rao, and Françoise Beaufays. 2015. Fast and Accurate Recurrent Neural Network Acoustic Models for Speech Recognition. In Proceedings of Interspeech 2015, Dresden, Germany.
+Elizabeth Salesky, Matthias Sperber, and Alan W. Black. 2019. Exploring Phoneme-Level Speech Representations for End-to-End Speech Translation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1835–1841, Florence, Italy. Association for Computational Linguistics.
+Matthias Sperber and Matthias Paulik. 2020. Speech translation and the end-to-end promise: Taking stock of where we are. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7409-7421, Online. Association for Computational Linguistics.
+Frederick W. M. Stentiford and Martin G. Steer. 1988. Machine Translation of Speech. British Telecom Technology Journal, 6(2):116-122.
+Student. 1908. The probable error of a mean. Biometrika, 6(1):1-25.
+Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. 2016. Rethinking the Inception Architecture for Computer Vision. In Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2818-2826, Las Vegas, Nevada, United States.
+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 Proceedings of Advances in Neural Information Processing Systems 30 (NIPS), pages 5998-6008, Long Beach, California.
+Alex Waibel, Ajay N. Jain, Arthur E. McNair, Hiroaki Saito, Alexander G. Hauptmann, and Joe Tebelskis. 1991. JANUS: A Speech-to-Speech Translation System Using Connectionist and Symbolic Processing Strategies. In Proceedings of the International Conference on Acoustics, Speech and Signal Processing, ICASSP 1991, pages 793-796, Toronto, Canada.
+Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Dmytro Okhonko, and Juan Pino. 2020a. Fairseq S2T: Fast Speech-to-Text Modeling with Fairseq. In Proceedings of the 1st Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 10th International Joint Conference on Natural Language Processing: System Demonstrations, pages 33–39, Suzhou, China. Association for Computational Linguistics.
+
+Sinong Wang, Belinda Z. Li, Madian Khabsa, Han Fang, and Hao Ma. 2020b. Linformer: Self-Attention with Linear Complexity.
+Ron J. Weiss, Jan Chorowski, Navdeep Jaitly, Yonghui Wu, and Zhifeng Chen. 2017. Sequence-to-Sequence Models Can Directly Translate Foreign Speech. In Proceedings of Interspeech 2017, pages 2625-2629, Stockholm, Sweden.
+Biao Zhang, Ivan Titov, Barry Haddow, and Rico Senrich. 2020. Adaptive Feature Selection for End-to-End Speech Translation. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 2533–2544, Online. Association for Computational Linguistics.
+Chang-Bin Zhang, Peng-Tao Jiang, Qibin Hou, Yunchao Wei, Qi Han, Zhen Li, and Ming-Ming Cheng. 2021. Delving Deep Into Label Smoothing. IEEE Transactions on Image Processing, 30:5984-5996.
+
+# A Training Details
+
+All our models are composed by 12 encoder layers and 6 decoder layers with 8 attention heads and are trained using label smoothed cross entropy (Szegedy et al., 2016) with the auxiliary CTC loss (Kim et al., 2017; Bahar et al., 2019) and Adam optimizer (Kingma and Ba, 2015). The number of parameters is $\sim 77\mathrm{M}$ for the baseline and $\sim 79\mathrm{M}$ for the Speechformer. The CTC is computed at the 8th encoder layer and its role is to predict the source transcription (lowercased and without punctuation), as in (Liu et al., 2020). The learning rate is set to 1e-3 with an inverse square-root scheduler and 10,000 warm-up updates. Mini-batches contain up to 5,000 tokens and we update gradients every 16 mini-batches. We apply SpecAugment (Park et al., 2019) and utterance-level cepstral mean and variance normalization. We filter out samples with duration exceeding 30s. The text is segmented in sub-word units with transcript and target Sentencepiece (Kudo and Richardson, 2018) unigram language models (Kudo, 2018) with size 5,000 and 8,000 respectively. We average 7 checkpoints around the best on the validation loss. Trainings were performed with 4 GPUs NVIDIA Tesla K-80 with 12GB of RAM and lasted about 3 days.
+
+# B Output examples
+
+Table 3 provides examples of the German translations generated by the baseline and by Speechformer for four utterances of the MuST-C test set, chosen among 200 sentences manually inspected by a C2 German speaker. These sentences have
+
+| (a) Word ordering |
| Audio Reference | It was a way that parents could figure out which were the right public schools for their kids.
+Es ging um eine Methode, mit der Eltern hersausfinden konnen, welche die richtigen öffentlichen Schulen für ihre Kinder sind. |
| Baseline | Es war eine Möglichkeit, dass Eltern hersausfinden konnen, welche für ihre Kinder die richtige öffentliche Schule war.
+It was an opportunity for the parents to find out which were for their children the right public schools.
+Es war eine Methode, mit der Eltern hersausfinden konnen, welche die richtigen öffentlichen Schulen für ihre Kinder waren.
+It was a method with which the parents could find out which were the right public schools for their children. |
| (b) Punctuation handling |
| Audio Reference | So, sir, can you help me? I need help.
+Also, mein Herr, konnen Sie mir halten? Ich brauche Hilfe. |
| Baseline | Es ist also möglich, mir zu halten.
+So it is possible to help me. |
| Speechformer | Also, konnen Sie mir halten? Ich habe keine Hilfe.
+So can you help me? I have no help. |
| (c) Audio misunderstanding |
| Audio Reference | You see Aluminum was the most valuable metal on the Planet, worth more than Gold and Platinum.
+Aluminium war zu dieser Zeit das wertvollste Metall auf dem Planeten, wertvoller als Gold und Platinum. |
| Baseline | Aluminium war die wertvollste Metallart auf dem Planeten, mehr als Gold und Pflanzen.
+Aluminum was the most valuable type of metal on the planet, more than gold and plants. |
| Speechformer | Aluminium war das wertvollste Metall auf dem Planeten, mehr als Gold und Platin.
+Aluminum was the most valuable metal on the planet, more than gold and platinum. |
| (d) Omission |
| Audio Reference | But the amazing thing about cities is they're worth so much more than it costs to build them.
+Aber das Erstaunliche an Städten ist, dass sie so viel mehr wert sind, als es kostet sie zu bauen. |
| Baseline | Aber das Faszinierende an Städten ist, dass es viel mehr wert ist, als es zu bauen.
+But the fascinating thing about cities is that it's worth a lot more than building it. |
| Speechformer | Aber das Erstaunliche an Städten ist, dass sie viel mehr wert sind als sie es kostet, sie zu bauen.
+But the amazing thing about cities is that they are worth a lot more than it costs to build them. |
+
+Table 3: Examples of translation problems $- ( a ) , ( b ) , ( c ) -$ and omissions $- ( d ) -$ that Speechformer does not suffer from while baseline does.
+
+been selected to highlight the specific aspects that are better handled by Speechformer.
+
+Example $(a)$ exhibits a wrong word ordering present in the baseline output, i.e. it anticipates "für ihre Kinder" (for their kids) with respect to "die richtigen öffentlichen Schulen" (the right public schools). Our proposed architecture, instead, translates the sentence in the correct order, making the translation easier to be read and understood.
+
+Example $(b)$ displays that Speechformer shows better punctuation handling, which – we hypothesize – is the result of an improved representation of prosody and pauses. In this example, for instance, our architecture is capable of detecting a question (i.e. So can you help me?) and translating it, while the baseline does not translate the input in question form and omits the last part of the audio content. Listening to the audio, we noticed a long pause after the question. We suppose that this pause led the baseline to conclude the sentence, while Speechformer managed to translate the remaining part of the utterance by going beyond that pause.
+
+Our architecture shows an improved encoding of audio features that is reflected in its superior
+
+understanding of audio content. This emerges, indeed, from example (c), where the word Platinum is correctly recognized and translated by our system, while the baseline misunderstands and translates it in another word, "Pflanzen" (plants), with a completely different meaning. The better audio understanding of Speechformer is present in example (d) as well. On the contrary, the baseline omits part of the original sentence (i.e. it costs), with a huge impact on the meaning of the resulting sentence, while Speechformer does not lose audio details and produces a complete translation. In this example, we can also notice that our system better solves pronominal resolution as it chooses sie, which follows the grammatical gender and number of Staedten (i.e. plural feminine), while the baseline uses es, which wrongly agrees with das Faszinierende (i.e. singular neuter).
+
+# C Effect of Label Smoothing
+
+Label smoothing (Szegedy et al., 2016) is a widely adopted regularization factor (Zhang et al., 2021). As such, a more complex architecture that pro
+
+| Model | en-de | en-es | en-nl |
| baseline | 21.2 | | 26.2 | | 25.5 | |
| + compression | 21.2 | +0.0 | 26.0 | -0.2 | 25.1 | -0.4 |
| Plain ConvAttention | 21.6 | +0.4 | 25.6* | -0.6 | 25.6 | +0.1 |
| Speechformer | 22.3* | +1.1 | 26.7* | +0.5 | 26.2* | +0.7 |
+
+Table 4: BLEU score on three language pairs of MuST-C tst-COMMON. The * symbol indicates statistically significant improvements over the baseline computed with bootstrap resampling (Koehn, 2004) with 10,000 samples, 1,000 sample size and $95\%$ significance level.
+
+cesses longer and potentially more redundant inputs – like our proposed Speechformer – can benefit more from its adoption. Hence, to validate that our gains are not due to a better regularization of the models and to assess the effect of label smoothing, we run experiments using the cross entropy loss without smoothing factor. The results are reported in Table 4. Compared with the scores reported in Section 4 of the paper, we can see that label smoothing brings significant gains for all the systems (ranging from 1.5 to 2.0 BLEU points). Most importantly, the improvements of the Speechformer architecture (0.5-1.1 BLEU) are similar to those achieved with label smoothing (0.5-0.8 BLEU). The minimal difference can be explained by statistical variations of the results, considering that those obtained without label smoothing are computed on a single run. We can conclude that these results confirm the efficacy of our architecture and the validity of our experiments, showing that they are not biased by a higher regularization that might favor our solution over the baseline.
\ No newline at end of file
diff --git a/speechformerreducinginformationlossindirectspeechtranslation/images.zip b/speechformerreducinginformationlossindirectspeechtranslation/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..254a4ece924ca45dd6d6b71baa8f75d29133437c
--- /dev/null
+++ b/speechformerreducinginformationlossindirectspeechtranslation/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:61918619f9686266db1296786ffb9f4d3074a46cf4a3a372051eb53169a6d773
+size 349032
diff --git a/speechformerreducinginformationlossindirectspeechtranslation/layout.json b/speechformerreducinginformationlossindirectspeechtranslation/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..14b63ff1acbefbe1c1bf81ebc910641a5b61d807
--- /dev/null
+++ b/speechformerreducinginformationlossindirectspeechtranslation/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7066c89479735781ab7f3bc3d9db622d499f8c4fe5efe92ff6aba75223ea56c6
+size 245901
diff --git a/spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_content_list.json b/spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..b4cc16f7f993faff2f5779406ce15c366633f5c6
--- /dev/null
+++ b/spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8093a4f7e26b3967e6c563c5f0e622b9ad064cef65ef881ad62cd73622e22867
+size 52253
diff --git a/spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_model.json b/spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..af219fc2fffe25f00b7966336f0d3f17b43056c1
--- /dev/null
+++ b/spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3661d150a01bee2e35c30d2f84cb998f449be64ab55ac5e5436b7e9855002566
+size 64662
diff --git a/spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_origin.pdf b/spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..6fb0c624e9493569a5d423b533e570ad475d94c4
--- /dev/null
+++ b/spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ee1463d547395898e7cae0166f751d3a24e9188154937ac21731c8a904dc4ff9
+size 501696
diff --git a/spellbertalightweightpretrainedmodelforchinesespellingcheck/full.md b/spellbertalightweightpretrainedmodelforchinesespellingcheck/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..4da672ef7982b157eafe43d6cdc98479dbaf05d6
--- /dev/null
+++ b/spellbertalightweightpretrainedmodelforchinesespellingcheck/full.md
@@ -0,0 +1,219 @@
+# SpellBERT: A Lightweight Pretrained Model for Chinese Spelling Check
+
+Tuo Ji, Hang Yan, Xipeng Qiu*
+
+School of Computer Science, Fudan University
+
+Shanghai Key Laboratory of Intelligent Information Processing, Fudan University
+
+{tji19, hyan19, xpqiu}@fudan.edu.cn
+
+# Abstract
+
+Chinese Spelling Check (CSC) is to detect and correct Chinese spelling errors. Many models utilize a predefined confusion set to learn a mapping between correct characters and its visually similar or phonetically similar misuses but the mapping may be out-of-domain. To that end, we propose SpellBERT, a pretrained model with graph-based extra features and independent on confusion set. To explicitly capture the two erroneous patterns, we employ a graph neural network to introduce radical and pinyin information as visual and phonetic features. For better fusing these features with character representations, we devise masked language model alike pre-training tasks. With this feature-rich pre-training, SpellBERT with only half size of BERT can show competitive performance and make a state-of-the-art result on the OCR dataset where most of the errors are not covered by the existing confusion set
+
+# 1 Introduction
+
+Spelling Check is to detect and correct Chinese spelling errors in sentences. However, it is a nontrivial task for Chinese spelling check because of the nature of ideographic language. Chinese has a large vocabulary including at least 3,500 common characters which leads to huge search space and an unbalanced distribution of errors.
+
+Though hard to cover most of the misuses, their patterns could be roughly reduced to visual or phonetic errors (Chang, 1995) as shown in Figure 1. The former type of errors have similar shapes as correct ones and they are often caused by optical character recognition (OCR) or morphology-based input method. The other type of errors have similar pronunciation as original ones and they are usually caused by automatic speech recognition (ASR) or phonetic-based input method.
+
+Previous work (Hsieh et al., 2013; Yu and Li, 2014; Wang et al., 2019a; Cheng et al., 2020) tend
+
+
+Figure 1: The two erroneous patterns. (a) is a phonetic error and its pinyin have overlap with the correct ones. (b) is a visual error and its radicals also have overlap
+
+
+
+to employ a predefined confusion set to find and filter correction candidates. Confusion set is constructed by incorrect stats (Liu et al., 2010) and it has a mapping between visually similar pairs and phonetically similar pairs in accord with erroneous patterns. However, these models only learn a shallow mapping from confusion set and their performance is heavily dependent on the quality of confusion set. But it is hard to find an up-to-date and in-domain confusion set.
+
+In this paper, we devise two pre-training tasks to model the two aforementioned erroneous patterns explicitly. To model visual errors, we introduce radical features. Chinese characters can be decomposed into various components namely radical. As for phonetic errors, we employ pinyin as features which are descriptions of pronunciation. We fuse these visual and phonetic features with character representations by relational graph convolutional network (Schlichtkrull et al., 2018). Likewise masked language model in BERT (Devlin et al., 2019), we randomly replace some characters and then predict the original visual and phonetic features with false input. Our model, SpellBERT, can intrinsically learn to correct errors based on visual or phonetic patterns rather than simple mapping. On the OCR dataset, where only a few errors are covered by confusion set, we make a state-of-the-art result and this indicates that SpellBERT can generalize well without depending on confusion set.
+
+On resource-constrained scenarios for deployment, making a model lightweight is necessary. SpellBERT only has half size of BERT and is more efficient for these scenarios.
+
+In summary, SpellBERT is independent on confusion set in training and inference phase. With only half size of BERT, SpellBERT can show competitive performance and generalize well.
+
+# 2 Related Work
+
+Current methods consider CSC as sequence generation problem or sequence labeling problem. Wang et al. (2019b) introduce copy mechanism to generate corrected sequence. Bao et al. (2020) unify single-character and multi-character correction by a chunk-based generative model.
+
+Pretrained models (PTMs) have made a success on sequence labeling tasks (Qiu et al., 2020). Masked language model (MLM) is introduced as pre-training task to predict masked or replaced words conditioned on context. The mode of MLM is intuitively appropriate to be transformed to predict spelling errors and correct them. Significant progress has been made by power of PTM (Hong et al., 2019). Based on MLM, confusion set is applied to narrow search space for predicting correct characters. Cheng et al. (2020) constructed a graph by confusion set to help final prediction. Nguyen et al. (2020) raised an adaptable confusion set but its training process is not end-to-end.
+
+Ideally, CSC corpus can be infinitely constructed by replacing words based on confusion set. Wang et al. (2018) generated 270k data by OCR- and ASR-based approaches. Zhang et al. (2020) created 5 million augmented data and Li et al. (2021) created 9 million augmented data by substitution-based method. Zhang et al. (2021) corrupted input sentence by randomly replacing characters with noisy-pinyin and the new pre-training task fitted well for CSC.
+
+More recently, some methods also utilized phonetic and visual features in CSC. Liu et al. (2021) employed a GRU(Bahdanau et al., 2014) to encode pinyin sequence and Chinese strokes sequence as extra features. Xu et al. (2021) had similar design but they encoded pictures of characters to get visual features. Huang et al. (2021) enriched character representations by knowledge of audio and visual modalities. Our method is different from all of these work. For phonetic features, we regard pinyin as a whole but not a sequence. For visual features, we used radicals which are higher-level features than strokes. And we incorporate these extra features by graph neural network.
+
+# 3 Approach
+
+We treat CSC as a sequence labeling problem. An input sequence with $n$ characters is represented as $\mathbf{X} = \{x_{1}, x_{2}, \dots, x_{n}\}$ . Our goal is to transform it into a target sequence $\mathbf{Y} = \{y_{1}, y_{2}, \dots, y_{n}\}$ . During which, incorrect characters will be detected and corrected. Obviously, the input and output share the same vocabulary and most of the output characters can be directly copied from input. The framework of our model is shown in Figure 2. It contains three parts, i.e., a BERT-based encoder, a feature-fusing module and a component for pretraining. We will progressively elaborate our design in detail.
+
+# 3.1 An MLM-based Backbone
+
+Many attribute the success of BERT (Devlin et al., 2019) to its MLM pre-training task. BERT randomly masked or replaced some tokens and then predict the original tokens. Regarding the masked and replaced tokens as spelling errors, BERT is properly adapted to be a spelling checker. Each input character $x_{i}$ is indexed to its embedding representation $\mathbf{e}_i$ by the BERT-embedding-layer. Then $\mathbf{e}_i$ will be passed to BERT-encoder-layers to get a representation $\mathbf{h}_i$ as follows:
+
+$$
+\mathbf {e} _ {i} = \operatorname {B E R T E m b e d d i n g} (\mathbf {x} _ {i}), \tag {1}
+$$
+
+$$
+\mathbf {h} _ {i} = \operatorname {B E R T E n c o d e r} \left(\mathbf {e} _ {i}\right), \tag {2}
+$$
+
+where $\mathbf{e}_i, \mathbf{h}_i \in \mathbb{R}^{1 \times d}$ and $d$ is the hidden dimension. After that, the $\mathbf{h}_i$ will be computed similarities with all character embeddings to get a predicted distribution $\hat{\mathbf{y}}_i$ over vocabulary as follows:
+
+$$
+\hat {\mathbf {y}} _ {\mathbf {i}} = \operatorname {S o f t m a x} \left(\mathbf {h} _ {i} \mathbf {E} ^ {T}\right), \tag {3}
+$$
+
+where $\mathbf{E} \in \mathbb{R}^{V \times d}$ ; $\hat{\mathbf{y}}_{\mathbf{i}} \in \mathbb{R}^{1 \times V}$ and $V$ is the vocabulary size. Here $\mathbf{E}$ refers to the BERT-embedding-layer and the $\mathrm{i}_{\mathrm{th}}$ row of $\mathbf{E}$ corresponds to $\mathbf{e}_i$ in Equation 1. Finally we use the character $x_{k}$ as the correction result for $x_{i}$ whose $\mathbf{e}_k$ has the highest similarity with $\mathbf{h}_i$ .
+
+# 3.2 Fusing Visual and Phonetic Features
+
+The above backbone lacks special modeling for this task. Chinese spelling errors can be roughly classified into two patterns. Visual errors have similar shapes as correct characters while phonetic errors have similar pronunciation. Some work utilize an external confusion set that has predefined mappings between visually similar pairs and phonetically similar pairs (Yu and Li, 2014; Wang et al.,
+
+
+Figure 2: The architecture of SpellBERT. Green denotes correct characters while red denotes errors. Pinyin and radical features are fused by graph and then passed to a 4-layer BERT. We expect the model to do MLM, pinyin prediction and radical prediction of correct characters with false input.
+
+2019a; Cheng et al., 2020). These models relied on confusion set to filter candidates but the confusion set might be out-of-date or out-of-domain.
+
+To model the two erroneous patterns, we infuse character representations $\mathbf{e}_i$ with visual and phonetic features by incorporating radical and pinyin information. Chinese characters can be decomposed into components namely radicals and visual errors often have overlap radicals with the correct character. Pinyin is a sequence of pronunciation descriptions for Chinese characters and phonetic errors often have overlap pinyin. Based on the extra features, our model can automatically learn visually similar and phonetically similar mappings.
+
+We employ a relational graph convolutional network (Schlichtkrull et al., 2018) short as R-GCN to infill multiple types of features into character representations $\mathbf{e}_i$ in Equation 1. We view characters as nodes and input sequence $\mathbf{X}$ can be organized as a line graph naturally. Both radicals and pinyin are viewed as nodes of graph as well. If a radical or pinyin belong to a certain character, we construct connections between them as edges. We regard these connections as different depending on the pair of nodes between them. Besides,
+
+we construct edges between neighboring characters because local context information is beneficial for better-incorporating pinyin and radical features. As a result, We define the following types of edges:
+
+- An edge between a character and a radical
+- An edge between a character and a pinyin
+- An edge between a character and a neighboring character within a fixed-length context
+- An edge between a character and itself
+
+We initialize feature of character-node by character-embedding $\mathbf{e}_i$ in Euqation 1. To represent and update features of radical-node and pinyin-node, we also construct an extra embedding table which is initialized by averaging their most related character-embeddings. As shown in Figure 2, these features diffuse on a relational graph as following:
+
+$$
+\hat {\mathbf {e}} _ {i} = \sigma \left(\sum_ {r \in \mathcal {R}} \sum_ {j \in \mathcal {N} _ {i} ^ {r}} \frac {1}{c _ {i , r}} \mathbf {W} _ {r} \mathbf {e} _ {j} + \mathbf {W} _ {0} \mathbf {e} _ {i}\right), \tag {4}
+$$
+
+where $\mathbf{e}_i$ means character-embedding of $x_{i}$ and $\mathbf{e}_j$ means feature of connected node j; $r$ denotes the type of edge; $\mathcal{N}_i^r$ refers to the set of connected nodes for edge type $r$ ; $\mathbf{W}_r$ is the transformation layer of edge type $r$ and $\mathbf{c}_{i,r}$ is a problem-specific normalization constant which is set as $|\mathcal{N}_i^{\mathrm{r}}|$ here. The final $\hat{\mathbf{e}}_i$ can be viewed as character representation enhanced by radical and pinyin information. Finally, we combine enhanced representation and original character-embedding and Equation 3 can be updated as following:
+
+$$
+\mathbf {h} _ {i} = \operatorname {B E R T E n c o d e r} \left(\mathbf {e} _ {i} + \hat {\mathbf {e}} _ {i}\right), \tag {5}
+$$
+
+where $\mathbf{h}_i$ denote the final representation of each character.
+
+# 3.3 Enhanced Pretraining Tasks for CSC
+
+It has been shown that external information can be better integrated into BERT by pre-training alike tasks (Peters et al., 2019; Zhang et al., 2019; Sun et al., 2020; Ma et al., 2020). Considering the radical and pinyin features are externally added by design, we devise two more pre-training alike tasks which are radical prediction and pinyin prediction.
+
+In MLM, Devlin et al. (2019) randomly masked a percentage of input tokens and then predict these tokens. In radical and pinyin prediction, we randomly mask connections from characters to their radicals and pinyin and then predict the masked
+
+connections. Through reconstructing connections, the model can learn a better representation that contains not only contextual information but also visual and phonetic information.
+
+Same as MLM, we randomly choose $15\%$ of characters to process. If a character is chosen, our potential practices are shown below:
+
+- Keep it unchanged $10\%$ of the time. Then predict the character itself, its radicals, and its pinyin. This is to match downstream fin-tuning where each character can directly see all of its radicals and pinyin.
+- Replace it with [MASK] $60\%$ of the time and mask all of its connections with a probability of $80\%$ . Then predict the masked character and the masked connections.
+- Replace it with a confusing word sampled from confusion set $30\%$ of the time and mask all of its connections with a probability of $80\%$ . Then predict the original character and its connections. This is to force our model to correct characters based on false radicals and pinyin of errors. Note that we only use confusion set in this stage to construct misspellings.
+
+In our graph, edges have no representations and the graph is utilized only between BERT-embedding-layer and BERT-encoder-layers. So we transform the task of edge-prediction into token-classification. For each character $\mathbf{x}_i$ , we take one of its pinyin and radicals as ground-truth and negatively sample other pinyin and radicals that do not belong to the character. We use feature-embeddings of these pinyin and radicals as a classified layer to compute their similarities with $\mathbf{h}_i$ from BERT-encoder-layer in Equation 2. Related embeddings will be drawn close to each other, and unrelated embeddings will be pulled away from each other.
+
+# 3.4 Reducing Parameters
+
+Given the need of computational efficiency for deployment, it is necessary to get a lightweight model. We only use 4 layers of BERT to initialize, pre-train, and fine-tune our model and which reduces the total number of parameters from $110\mathrm{M}$ to $55\mathrm{M}$ . We also measure the inference speed of our lightweight model and the experiments result show that it has better time-efficiency compared with a 12-layer BERT.
+
+# 4 Experiments
+
+# 4.1 Pre-training Setup
+
+We use BERT (Devlin et al., 2019) base as initialization and only the first 4 layers are utilized. Our model is implemented by PyTorch (Paszke et al., 2019) and DGL (Wang et al., 2019c). We randomly select 1M sentences provided by Xu (2019) as pretraining corpus and pad the sentences to a max length of 128. We set the learning rate as 5e-5, batch size as 1024, and pre-train 10K steps on 4 RTX 3090 for around 2 days.
+
+# 4.2 Dataset and Fine-tuning Setup
+
+We conduct CSC experiments on three widely used datasets SIGHAN14 (Yu et al., 2014), SIGHAN15 (Tseng et al., 2015), OCR (Hong et al., 2019) and mark them as $\mathrm{csc}_{14}$ , $\mathrm{csc}_{15}$ andOCR.
+
+The original corpus of $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ was collected from essays written by learners of Chinese as a foreign language and it was in Traditional Chinese. Wang et al. (2019a), Zhang et al. (2020), and Nguyen et al. (2020) transformed it into Simplified Chinese and used augmented data provided by Wang et al. (2018). Because our pre-training corpus was in Simplified Chinese, we use the latter setting. We directly use the corpus provided by Cheng et al. (2020). Under this setting, the training set of $\mathrm{csc}_{14}$ , $\mathrm{csc}_{15}$ and the augmented data provided by Wang et al. (2018) are combined as a new training set. We fine-tune our model on the test set of $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ separately.
+
+ocr is a Simplified Chinese dataset of which the sentences are much shorter and extracted from the entertainment domain. We only use the data fromOCR to train and test and it has 4575 sentences in total.
+
+For different datasets, we find the following ranges of hyperparameters work well: the batch size is set to among $\{32, 64\}$ , the learning rate is set to among $\{1e-5, 2e-5, 3e-5\}$ and the number of epochs is ranging from 5 to 20.
+
+On $\csc_{14}$ and $\csc_{15}$ , we evaluate our model in sentence-level by the official tool (Tseng et al., 2015). And onOCR, the metric is in edit-level by a different official tool (Wu et al., 2013).
+
+# 4.3 Results and Analysis
+
+Main Results As shown in Table 1, we compare SpellBERT with recent work and a 4-layer BERT baseline. All of them are BERT-based which means that their number of parameters are at least twice
+
+| Model | Detection Level | Correction Level | |
| ocr | csc14 | csc15 | ocr | csc14 | csc15 | |
| P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 |
| Nguyen et al. (2020) (BERT 12 layers) | - | - | - | 82.5 | 61.6 | 70.5 | 84.5 | 71.8 | 77.6 | - | - | - | 82.1 | 60.2 | 69.4 | 84.2 | 70.2 | 76.5 |
| Bao et al. (2020) (BERT 12 layers) | 77.6 | 63.3 | 69.7 | - | - | - | - | - | - | 46.5 | 37.9 | 41.7 | - | - | - | - | - | - |
| Cheng et al. (2020) (BERT 12 layers) | - | - | - | 83.1 | 69.5 | 75.7 | 85.9 | 80.6 | 83.1 | - | - | - | 82.8 | 67.8 | 74.5 | 85.4 | 77.6 | 81.3 |
| BERT (4 layers) | 67.8 | 35.2 | 46.4 | 82.6 | 59.0 | 68.8 | 85.2 | 68.9 | 76.2 | 43.2 | 22.4 | 29.5 | 82.4 | 58.0 | 68.1 | 84.8 | 66.9 | 74.8 |
| SpellBERT (4 layers) | 83.5 | 60.4 | 70.1 | 83.1 | 62.0 | 71.0 | 87.5 | 73.6 | 80.0 | 66.0 | 47.7 | 55.4 | 82.9 | 61.2 | 70.4 | 87.1 | 71.5 | 78.5 |
| w/o graph | 81.2 | 61.4 | 69.9 | 81.8 | 62.0 | 70.5 | 87.8 | 73.1 | 79.8 | 61.1 | 46.2 | 52.6 | 81.5 | 60.5 | 69.4 | 87.5 | 71.1 | 78.4 |
| w/o pre-training | 67.6 | 36.1 | 47.1 | 81.3 | 60.5 | 69.3 | 86.4 | 70.7 | 77.8 | 51.7 | 27.6 | 36.0 | 81.0 | 59.3 | 68.5 | 86.0 | 68.0 | 75.9 |
+
+Table 1: Results in detection-level and correction-level. For baselines, we use their reported results. Hong et al. (2019) and Bao et al. (2020) used the Traditional Chinese corpus on $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ , and which makes their results incomparable to ours.
+
+| Dataset | Noises | Errors covered by confusion sets |
| ocr test | 0/1000 (0%) | 302/1303 (23.2%) |
| csc14test | 16/1062 (1.5%) | 663/792 (83.7%) |
| csc15test | 10/1100 (0.9%) | 605/715 (84.6%) |
+
+as many as ours. However, by fusing pinyin and radical features and the feature-rich pre-training, SpellBERT still has the best performance on the OCR dataset. Compared with Nguyen et al. (2020), our work has better results on both $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ . However, there is still a gap between SpellBERT and SpellGCN (Cheng et al., 2020) which means that our devised extra modules can not completely make up for the reduced size of model.
+
+Effectiveness of Modules We also remove graph and pre-training stage respectively to test their effectiveness. The results showed that pre-training can generally bring significant improvements on all datasets which suggests that pre-training is an effective way on CSC. The contribution of the graph mechanism is not that impressive but this makes it possible to only transfer our encoder parameters to other architectures.
+
+Impact of Confusion Set Notice that our improvements over previous work are more obvious onOCR than that on $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ . Firstly, there are inevitable noises when converting data into Simplified Chinese and the noisy ratio is $1.5\%$ and $0.9\%$ for $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ . The other reason is that previous work such as Nguyen et al. (2020) and Bao et al. (2020) relied on confusion set to filter candidates. $83.7\%$ and $84.6\%$ of test errors in $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ are covered by confusion set which is an ideal and infrequent situation. OnOCR which has much fewer errors covered by confusion set, they
+
+Table 2: Stats of datasets. Noises denote the noisy data when converting data to Simplified Chinese. The rightmost column refers to the number of errors covered by confusion set (Wu et al., 2013) on test data
+
+| Dataset | Ave Length | Time per Sent | Speedup |
| Ours | 12-layer BERT |
| ocr test | 10.2 | 48 | 76 | 1.58x |
| csc14test | 50.0 | 98 | 153 | 1.56x |
| csc15test | 30.6 | 77 | 119 | 1.54x |
+
+Table 3: Speed comparison (ms/sentence). Preprocessing time is excluded. We set batch size as 1 and do experiments on 4 cores of a Intel(R) Xeon(R) Silver 4114T CPU following Hong et al. (2019).
+
+naturally performed worse.
+
+OnOCR, confusion set can simply cover $23.2\%$ of errors and the average length of sentences are much shorter. The confusion set can be viewed as out-of-domain onOCR. SpellBERT substantially improves the performance on this dataset which indicates that SpellBERT can generalize well on different corpus without dependence on confusion set. The ablation studies further demonstrate that our proposed modules help deal with unseen errors.
+
+Efficiency Analysis With only half the number of parameters of a 12-layer BERT, SpellBERT has the best space efficiency compared to BERT-based work. To verify time efficiency, we incorporate a speed measure in terms of absolute time consumption per sentence mentioned in Hong et al. (2019). Results in Table 3 indicate that SpellBERT can speed up at least 1.5 times.
+
+# 5 Conclusion
+
+In this work, we propose a lightweight pretrained model, SpellBERT, for Chinese spelling check. We incorporate pinyin and radicals as phonetic and visual features and design two pre-training tasks to encourage the pre-trained model to explicitly capture erroneous patterns. Experiments show that SpellBERT has competitive performance compared to the large pretrained models. Besides, SpellBERT can be directly used without confusion set in the fine-tuning and inference phase, which is more
+
+convenient to use and easier to deal with the errors uncovered by the existing confusion sets.
+
+# Acknowledgement
+
+This work was supported by the National Key Research and Development Program of China (No. 2020AAA0108702) and National Natural Science Foundation of China (No. 62022027).
+
+# References
+
+Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473.
+Zuyi Bao, Chen Li, and Rui Wang. 2020. Chunk-based chinese spelling check with global optimization. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, EMNLP 2020, Online Event, 16-20 November 2020, pages 2031-2040. Association for Computational Linguistics.
+Chao-Huang Chang. 1995. A new approach for automatic chinese spelling correction. In Proceedings of Natural Language Processing Pacific Rim Symposium, volume 95, pages 278-283. CiteSeer.
+Xingyi Cheng, Weidi Xu, Kunlong Chen, Shaohua Jiang, Feng Wang, Taifeng Wang, Wei Chu, and Yuan Qi. 2020. Spellgen: Incorporating phonological and visual similarities into language models for Chinese spelling check. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 871-881. Association for Computational Linguistics.
+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, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186. Association for Computational Linguistics.
+Yuzhong Hong, Xianguo Yu, Neng He, Nan Liu, and Junhui Liu. 2019. Faspell: A fast, adaptable, simple, powerful chinese spell checker based on dae-decoder paradigm. In Proceedings of the 5th Workshop on Noisy User-generated Text, W-NUT@EMNLP 2019, Hong Kong, China, November 4, 2019, pages 160-169. Association for Computational Linguistics.
+Yu-Ming Hsieh, Ming-Hong Bai, and Keh-Jiann Chen. 2013. Introduction to CKIP chinese spelling check system for SIGHAN bakeoff 2013 evaluation. In Proceedings of the Seventh SIGHAN Workshop on Chinese Language Processing, SIGHAN@IJCNLP
+
+2013, Nagoya, Japan, October 14-18, 2013, pages 59-63. Asian Federation of Natural Language Processing.
+Li Huang, Junjie Li, Weiwei Jiang, Zhiyu Zhang, Minchuan Chen, Shaojun Wang, and Jing Xiao. 2021. PHMOSpell: Phonological and morphological knowledge guided Chinese spelling check. 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 5958-5967, Online. Association for Computational Linguistics.
+Chong Li, Cenyuan Zhang, Xiaoqing Zheng, and Xuanjing Huang. 2021. Exploration and exploitation: Two ways to improve Chinese spelling correction models. 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 441-446, Online. Association for Computational Linguistics.
+Chao-Lin Liu, Min-Hua Lai, Yi-Hsuan Chuang, and Chia-Ying Lee. 2010. Visually and phonologically similar characters in incorrect simplified chinese words. In COLING 2010, 23rd International Conference on Computational Linguistics, Posters Volume, 23-27 August 2010, Beijing, China, pages 739-747. Chinese Information Processing Society of China.
+Shulin Liu, Tao Yang, Tianchi Yue, Feng Zhang, and Di Wang. 2021. PLOME: Pre-training with misspelled knowledge for Chinese spelling correction. 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 2991-3000, Online. Association for Computational Linguistics.
+Wentao Ma, Yiming Cui, Chenglei Si, Ting Liu, Shijin Wang, and Guoping Hu. 2020. Charbert: Character-aware pre-trained language model. In Proceedings of the 28th International Conference on Computational Linguistics, COLING 2020, Barcelona, Spain (Online), December 8-13, 2020, pages 39-50. International Committee on Computational Linguistics.
+Minh Nguyen, Gia H. Ngo, and Nancy F. Chen. 2020. Adaptable filtering using hierarchical embeddings for chinese spell check. CoRR, abs/2008.12281.
+Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing
+
+Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 8024-8035.
+Matthew E. Peters, Mark Neumann, Robert L. Logan IV, Roy Schwartz, Vidur Joshi, Sameer Singh, and Noah A. Smith. 2019. Knowledge enhanced contextual word 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 2019, Hong Kong, China, November 3-7, 2019, pages 43-54. Association for Computational Linguistics.
+Xipeng Qiu, TianXiang Sun, Yige Xu, Yunfan Shao, Ning Dai, and Xuanjing Huang. 2020. Pre-trained models for natural language processing: A survey. _SCIENCE CHINA Technological Sciences_, 63(10):1872-1897.
+Michael Sejr Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. 2018. Modeling relational data with graph convolutional networks. In *The Semantic Web - 15th International Conference*, ESWC 2018, Heraklion, Crete, Greece, June 3-7, 2018, Proceedings, volume 10843 of Lecture Notes in Computer Science, pages 593-607. Springer.
+Tianxiang Sun, Yunfan Shao, Xipeng Qiu, Qipeng Guo, Yaru Hu, Xuanjing Huang, and Zheng Zhang. 2020. Colake: Contextualized language and knowledge embedding. In Proceedings of the 28th International Conference on Computational Linguistics, COLING 2020, Barcelona, Spain (Online), December 8-13, 2020, pages 3660-3670. International Committee on Computational Linguistics.
+Yuen-Hsien Tseng, Lung-Hao Lee, Li-Ping Chang, and Hsin-Hsi Chen. 2015. Introduction to SIGHAN 2015 bake-off for chinese spelling check. In Proceedings of the Eighth SIGHAN Workshop on Chinese Language Processing, SIGHAN@IJCNLP 2015, Beijing, China, July 30-31, 2015, pages 32-37. Association for Computational Linguistics.
+Dingmin Wang, Yan Song, Jing Li, Jialong Han, and Haisong Zhang. 2018. A hybrid approach to automatic corpus generation for chinese spelling check. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 2517-2527. Association for Computational Linguistics.
+Dingmin Wang, Yi Tay, and Li Zhong. 2019a. Confusionset-guided pointer networks for Chinese spelling check. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5780-5785.
+Dingmin Wang, Yi Tay, and Li Zhong. 2019b. Confusionset-guided pointer networks for chinese
+
+spelling check. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28-August 2, 2019, Volume 1: Long Papers, pages 5780-5785. Association for Computational Linguistics.
+Minjie Wang, Lingfan Yu, Da Zheng, Quan Gan, Yu Gai, Zihao Ye, Mufei Li, Jinjing Zhou, Qi Huang, Chao Ma, Ziyue Huang, Qipeng Guo, Hao Zhang, Haibin Lin, Junbo Zhao, Jinyang Li, Alexander J. Smola, and Zheng Zhang. 2019c. Deep graph library: Towards efficient and scalable deep learning on graphs. CoRR, abs/1909.01315.
+Shih-Hung Wu, Chao-Lin Liu, and Lung-Hao Lee. 2013. Chinese spelling check evaluation at SIGHAN bake-off 2013. In Proceedings of the Seventh SIGHAN Workshop on Chinese Language Processing, SIGHAN@IJCNLP 2013, Nagoya, Japan, October 14-18, 2013, pages 35-42. Asian Federation of Natural Language Processing.
+Bright Xu. 2019. Nlp chinese corpus: Large scale chinese corpus for nlp.
+Heng-Da Xu, Zhongli Li, Qingyu Zhou, Chao Li, Zizhen Wang, Yunbo Cao, Heyan Huang, and XianLing Mao. 2021. Read, listen, and see: Leveraging multimodal information helps Chinese spell checking. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 716-728, Online. Association for Computational Linguistics.
+Junjie Yu and Zhenghua Li. 2014. Chinese spelling error detection and correction based on language model, pronunciation, and shape. In Proceedings of The Third CIPS-SIGHAN Joint Conference on Chinese Language Processing, Wuhan, China, October 20-21, 2014, pages 220-223. Association for Computational Linguistics.
+Liang-Chih Yu, Lung-Hao Lee, Yuen-Hsien Tseng, and Hsin-Hsi Chen. 2014. Overview of SIGHAN 2014 bake-off for chinese spelling check. In Proceedings of The Third CIPS-SIGHAN Joint Conference on Chinese Language Processing, Wuhan, China, October 20-21, 2014, pages 126-132. Association for Computational Linguistics.
+Ruiqing Zhang, Chao Pang, Chuanqiang Zhang, Shuo-huan Wang, Zhongjun He, Yu Sun, Hua Wu, and Haifeng Wang. 2021. Correcting Chinese spelling errors with phonetic pre-training. In Findings of the Association for Computational Linguistics: ACLIJCNLP 2021, pages 2250-2261, Online. Association for Computational Linguistics.
+Shaohua Zhang, Haoran Huang, Jicong Liu, and Hang Li. 2020. Spelling error correction with soft-masked BERT. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 882-890. Association for Computational Linguistics.
+
+Zhengyan Zhang, Xu Han, Zhiyuan Liu, Xin Jiang, Maosong Sun, and Qun Liu. 2019. ERNIE: enhanced language representation with informative entities. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pages 1441-1451. Association for Computational Linguistics.
\ No newline at end of file
diff --git a/spellbertalightweightpretrainedmodelforchinesespellingcheck/images.zip b/spellbertalightweightpretrainedmodelforchinesespellingcheck/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..efc82358fb1b9572a4a35378c4675099ac07d0fc
--- /dev/null
+++ b/spellbertalightweightpretrainedmodelforchinesespellingcheck/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:43ed3a2fc496adbf9fe48fc941e71f3c5919dbd7377dda00f163097171ceab31
+size 223383
diff --git a/spellbertalightweightpretrainedmodelforchinesespellingcheck/layout.json b/spellbertalightweightpretrainedmodelforchinesespellingcheck/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..3fb45013fb58cd11542c4a28bf0770b1ec23ca53
--- /dev/null
+++ b/spellbertalightweightpretrainedmodelforchinesespellingcheck/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fbb81df53a6f14bbad4447dd5552497f3eabb01e33d38169d690e78b46598521
+size 262221
diff --git a/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_content_list.json b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..a4fcbcd07079dfbf821b9db08b35a845107bd6f9
--- /dev/null
+++ b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2fb0e08ed5f4703b7c30530d3395cdca5fb4c61d706c4d7342a52d7bc8ae0f92
+size 103822
diff --git a/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_model.json b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..db8ec736c350a9be77d45a6cb22cdcbfe68199e2
--- /dev/null
+++ b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:671d413837e784938cb3fe951e69d8ab4d619b9eeec67c9c958f4adc2847d8e0
+size 127528
diff --git a/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_origin.pdf b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..79534d445547d013a569e4b5ad040aa9867c7d7a
--- /dev/null
+++ b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b291161ed66d3e85fa6195df89ff19e24fd77efcdaa73dd8d8a7caa37be79bf0
+size 15921518
diff --git a/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/full.md b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..2f32ace38cefb0d42583185df0e923c4c2241ff8
--- /dev/null
+++ b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/full.md
@@ -0,0 +1,449 @@
+# Stepmothers are mean and academics are pretentious: What do pretrained language models learn about you?
+
+Rochelle Choenni
+
+University of Amsterdam
+
+r.m.v.k.choenni@uva.nl
+
+Ekaterina Shutova
+
+University of Amsterdam
+
+e.shutova@uva.nl
+
+Robert van Rooij
+
+University of Amsterdam
+
+r.a.m.vanrooij@uva.nl
+
+# Abstract
+
+Warning: this paper contains content that may be offensive or upsetting.
+
+In this paper, we investigate what types of stereotypical information are captured by pretrained language models. We present the first dataset comprising stereotypical attributes of a range of social groups and propose a method to elicit stereotypes encoded by pretrained language models in an unsupervised fashion. Moreover, we link the emergent stereotypes to their manifestation as basic emotions as a means to study their emotional effects in a more generalized manner. To demonstrate how our methods can be used to analyze emotion and stereotype shifts due to linguistic experience, we use fine-tuning on news sources as a case study. Our experiments expose how attitudes towards different social groups vary across models and how quickly emotions and stereotypes can shift at the fine-tuning stage.
+
+# 1 Introduction
+
+Pretraining strategies for large-scale language models (LMs) require unsupervised training on large amounts of human generated text data. While highly successful, these methods come at the cost of interpretability as it has become increasingly unclear what relationships they capture. Yet, as their presence in society increases, so does the importance of recognising the role they play in perpetuating social biases. In this regard, Bolukbasi et al. (2016) first discovered that contextualized word representations reflect gender biases captured in the training data. What followed was a suite of studies that aimed to quantify and mitigate the effect of harmful social biases in word (Caliskan et al., 2017) and sentence encoders (May et al., 2019). Despite these studies, it has remained difficult to define what constitutes "bias", with most work focusing on "gender bias" (Manela et al., 2021; Sun et al., 2019) or "racial bias" (Davidson et al., 2019;
+
+Sap et al., 2019). More broadly, biases in the models can comprise a wide range of harmful behaviors that may affect different social groups for various reasons (Blodgett et al., 2020).
+
+In this work, we take a different focus and study stereotypes that emerge within pretrained LMs instead. While bias is a personal preference that can be harmful when the tendency interferes with the ability to be impartial, stereotypes can be defined as a preconceived idea that (incorrectly) attributes general characteristics to all members of a group. While the two concepts are closely related i.e., stereotypes can evoke new biases or reinforce existing ones, stereotypical thinking appears to be a crucial part of human cognition that often emerges implicitly (Hinton, 2017). Hinton (2017) argued that implicit stereotypical associations are established through Bayesian principles, where the experience of their prevalence in the world of the perceiver causes the association. Thus, as stereotypical associations are not solely reflections of cognitive bias but also stem from real data, we suspect that our models, like human individuals, pick up on these associations. This is particularly true given that their knowledge is largely considered to be a reflection of the data they are trained on. Yet, while we consider stereotypical thinking to be a natural side-effect of learning, it is still important to be aware of the stereotypes that models encode. Psychology studies show that beliefs about social groups are transmitted and shaped through language (Maass, 1999; Beukeboom and Burgers, 2019). Thus, specific lexical choices in downstream applications not only reflect the model's attitude towards groups but may also influence the audience's reaction to it, thereby inadvertently propagating the stereotypes they capture (Park et al., 2020).
+
+Studies focused on measuring stereotypes in pretrained models have thus far taken supervised approaches, relying on human knowledge of common stereotypes about (a smaller set of) social groups
+
+(Nadeem et al., 2020; Nangia et al., 2020). This, however, bears a few disadvantages: (1) due to the implicit nature of stereotypes, human defined examples can only expose a subset of popular stereotypes, but will omit those that human annotators are unaware of (e.g. models might encode stereotypes that are not as prevalent in the real world); (2) stereotypes vary considerably across cultures (Dong et al., 2019), meaning that the stereotypes tested for will heavily depend on the annotator's cultural frame of reference; (3) stereotypes constantly evolve, making supervised methods difficult to maintain in practice. Therefore, similar to Field and Tsvetkov (2020), we advocate the need for implicit approaches to expose and quantify bias and stereotypes in pretrained models.
+
+We present the first dataset of stereotypical attributes of a wide range of social groups, comprising $\sim 2\mathrm{K}$ attributes in total. Furthermore, we propose a stereotype elicitation method that enables the retrieval of salient attributes of social groups encoded by state-of-the-art LMs in an unsupervised manner. We use this method to test the extent to which models encode the human stereotypes captured in our dataset. Moreover, we are the first to demonstrate how training data at the fine-tuning stage can directly affect stereotypical associations within the models. In addition, we propose a complementary method to study stereotypes in a more generalized way through the use of emotion profiles, and systematically compare the emerging emotion profiles for different social groups across models. We find that all models vary considerably in the information they encode, with some models being overall more negatively biased while others are mostly positive instead. Yet, in contrast to previous work, this study is not meant to advocate the need for debiasing. Instead, it is meant to expose varying implicit stereotypes that different models incorporate and to bring awareness to how quickly attitudes towards groups change based on contextual differences in the training data used both at the pretraining and fine-tuning stage.
+
+# 2 Related work
+
+Previous work on stereotypes While studies that explicitly focus on stereotypes have remained limited in NLP, several works on bias touch upon this topic (Blodgett et al., 2020). This includes, for instance, studying specific phenomena such as the infamous 'Angry Black Woman' stereotype and the 'double bind' (Heilman et al., 2004) theory (Kir
+
+itchenko and Mohammad, 2018; May et al., 2019; Tan and Celis, 2019), or relating model predictions to gender stereotype lexicons (Field and Tsvetkov, 2020). To the best of our knowledge, Nadeem et al. (2020); Nangia et al. (2020) and Manela et al. (2021) are the first to explicitly study stereotypes in pretrained sentence encoders. While Manela et al. (2021) focus on gender stereotypes using the Winobias dataset (Zhao et al., 2018), the other works propose new crowdsourced datasets (i.e. StereoSet and Crowspair) with stereotypes that cover a wide range of social groups. All datasets, however, have a similar set-up: they contain pairs of sentences of which one is more stereotypical than the other. Working in the language modeling framework, they evaluated whether the model "prefers" the stereotypical sentence over the anti-stereotypical one. In contrast, we propose a different experimental setup and introduce a new dataset that leverages search engines' autocomplete suggestions for the acquisition of explicit stereotypical attributes. Instead of indirectly uncovering stereotypes through comparison, our elicitation method directly retrieves salient attributes encoded in the models. Our technique is inspired by Kurita et al. (2019), but while they measure the LM probability for completing sentences with the pronouns she and he specifically, we study the top $k$ salient attributes without posing any restrictions on what these could be. Moreover, we are the first to include both monolingual and multilingual models in our analysis.
+
+Stereotype-driven emotions Stereotypes are constantly changing and identifying negative ones in particular, is an inherently normative process. While some stereotypes clearly imply disrespect (e.g., women are incompetent), others emerge from excessive competence instead (e.g., Asians are good at math). Moreover, stereotypical content is heavily influenced by the social pressures of society at the time. Cuddy et al. (2009) argue that no stereotype remains stable and predictable from theoretical principles. Hence, many social psychologists have abandoned the study of stereotype content to focus on systematic principles that generalize across different specific instances of stereotypes instead, presumably making them more stable over time and place (Cuddy et al., 2009; Mackie et al., 2000; Weiner, 1993). Similarly, we explore a more robust approach to uncovering stereotypes in pretrained LMs by studying how stereotypes are more generally manifested as varying emotion profiles in
+
+| Search query | Category | Social group | Stereotypical attributes | Search engine |
| Why are black people so | race | black people | fast, athletic, hated, angry, loud | Yahoo |
| Why are british people so | race | british people | polite, pale, tall, reserved, cold | DuckDuckGo |
| Why are californians so | lifestyle | californians | entitled, rich, flaky, backstabby | multiple |
| Why are comedians so | profession | comedians | funny, sad, intelligent, depressed | Google |
| Why are millennials so | age | millennials | fragile, nostalgic, lonely, broke | Google |
| Why is Norway so | country | Norway | healthy, wealthy, happy, rich | multiple |
| Why are conservatives so | political | conservatives | angry, controlling, racist | Yahoo |
| Why are mortons so | religion | mormons | misunderstood, rich, successful, nice | multiple |
+
+Table 1: A few (random) examples of stereotypical attributes sampled from the dataset. Note that the number of attributes vary as we do not retrieve the same number for each social group per search engine.
+
+the models. Previous works show that groups evoke different emotional profiles (Cottrell and Neuberg, 2005; Tapias et al., 2007; Mackie et al., 2000), and a variety of theories link particular intergroup relations to distinct stereotype-driven emotions such as disgust and anger (Harris and Fiske, 2006, 2009).
+
+# 3 Stereotypes from search engines
+
+Retrieving human stereotypes in an implicit manner can be useful as people are likely to give more politically correct answers when asked for stereotypes explicitly. Questions we ask to search engines are often done in the comfort of our own homes, making them likely to reflect true stereotypes that are out there in the real world (Stephens-Davidowitz, 2018). When feeding search engines queries that already imply a stereotype about a specific social group, the suggested completions are often salient (i.e. stereotypical) attributes of that particular group e.g., search query: 'Why are Asian parents so' $\rightarrow$ completion: 'strict'. As the auto-complete suggestions are based on popular human generated queries, we exploit this property for the acquisition of stereotypical attributes.
+
+Social groups We use 382 social groups which we divide into 9 categories: age (11), gender (26), profession (115), race (99), country (73), religion (10), political (9), sexuality (12) and lifestyle (19). See Appendix C for the full lists of social groups per category. The social groups include, but are not limited to, the ones used by Nadeem et al. (2020) who collected Wikidata relation triples to automatically retrieve target terms.
+
+Templates To increase coverage, we design 5 slightly varying templates to retrieve autocomplete suggestions for. For groups pertaining to people we use the templates:
+
+- 'Why are [TGT] so [ATTR]?'
+- 'What makes [TGT] so [ATTR]?'
+How come [TGT] are so [ATTR]?
+
+- 'Why are [TGT] always so [ATTR]?'
+- 'Why are all [TGT] so [ATTR]?
+
+For countries we use:
+
+- 'Why is [TGT] so [ATTR]?'
+- 'What makes [TGT] so [ATTR]?'
+- 'How come [TGT] is so [ATTR]?'
+- 'Why is [TGT] always so [ATTR]?'
+- 'Why are all people in [TGT] so [ATTR]?'
+
+where [TGT] are social groups for which we search stereotypes and [ATTR] is the salient attribute with which the search engine completes the sequence. We tested other (longer and more elaborate) templates but we found that they did not produce many autocomplete suggestions. In fact, we believe that the above queries are so successful precisely because of their simplicity, given that people are likely to keep search queries concise.
+
+Search engines Due to Google's hate speech filtering system the autocomblection feature is disabled for frequently targeted groups e.g. black people, Jewish people and members of the LGBTQ+ community. Thus, we retrieve autocompactee suggestions from 3 search engines: Google, Yahoo and DuckDuckGo. In many cases, identical completions were given by multiple search engines. We sort these duplicate samples under the category 'multiple engines'. We find that most negative (offensive) stereotypes are retrieved from Yahoo.
+
+Pre-processing We clean up the dataset manually, using the following procedure:
+
+1. Remove noisy completions that do not result in a grammatically correct sentence e.g. non adjectives.
+2. Remove specific trend-sensitive references: e.g. to video games 'why are asians so good at league of legends'.
+3. Remove neutral statements not indicative of stereotypes e.g. 'why are [TGT] so called'.
+4. We filter out completions consisting of mul
+
+tiple words.1 Yet, when possible, the input is altered such that only the key term has to be predicted by the model e.g., 'Why are russians so $x$ ,where $\mathrm{x} =$ good at playing chess $\rightarrow$ 'Why are russians so good at $x$ , $\mathrm{x} =$ chess.
+
+The final dataset contains $\sim 2\mathrm{K}$ stereotypes about 274 social groups. The stereotypes are distributed across categories as follows - profession: 713, race: 412, country: 396, gender: 198, age: 171, lifestyle: 123, political: 50, religion: 36. None of the search engines produce stereotypical autocomplete suggestions for members of the LGBTQ+ community. In Table 1 we provide some examples from the dataset. See Appendix B for more details on the data acquisition and search engines. The full code and dataset are publicly available.
+
+# 4 Correlating human stereotypes with salient attributes in pretrained models
+
+To test for human stereotypes, we propose a stereotype elicitation method that is inspired by cloze testing, a technique that stems from psycholinguistics. Using our method we retrieve salient attributes from the model in an unsupervised manner and compute recall scores over the stereotypes captured in our search engine dataset.
+
+Pretrained models We study different types of pretrained LMs of which 3 are monolingual and 2 multilingual: BERT (Devlin et al., 2019) uncased trained on the BooksCorpus dataset (Zhu et al., 2015) and English Wikipedia; RoBERTa (Liu et al., 2019), the optimized version of BERT that is in addition trained on data from CommonCrawl News (Nagel, 2016), OpenTextCorpus (Gokaslan and Cohen, 2019) and STORIES (Trinh and Le, 2018); BART, a denoising autoencoder (Lewis et al., 2020) that while using a different architecture and pretraining strategy from RoBERTa, uses the same training data. Moreover, we use mBERT, that apart from being trained on Wikipedia in multiple languages, is identical to BERT. We use the uncased version that supports 102 languages. Similarly, XLM-R is the multilingual variant of RoBERTa (Conneau et al., 2020) that is trained on cleaned CommonCrawl data (Wenzek et al., 2020) and
+
+supports 100 languages. We include both versions of a model (i.e. Base and Large) if available. Appendix A provides more details on the models.
+
+Table 2: Ranking: 'why are old people so bad with'.
+Prior Post
+
+| 1. memory | 1. memory |
| 2. math | 2. alcohol |
| 3. money | 3. technology |
| 4. children | 4. dates |
+
+Stereotype elicitation method For each sample in our dataset we feed the model the template sentence and replace [ATTR] with the [MASK] token. We then retrieve the top $k = 200$ model predictions for the MASK token, and test how many of the stereotypes found by the search engines are also encoded in the LMs. We adapt the method from Kurita et al. (2019) to rank the top $k$ returned model outputs based on their typicality for the respective social group. We quantify typicality by computing the log probability of the model probability for the predicted completion corrected for by the prior probability of the completion e.g.:
+
+$$
+P _ {\text {p o s t}} (y = \text {s t r i c t} | \text {W h y a r e p a r e n t s} y?) \tag {1}
+$$
+
+$$
+P _ {p r i o r} (y = \text {s t r i c t} | \text {W h y a r e [ M A S K ] s o} y?) \tag {2}
+$$
+
+$$
+p = \log \left(P _ {\text {p o s t}} / P _ {\text {p r i o r}}\right) \tag {3}
+$$
+
+i.e., measuring association between the words by computing the chance of completing the template with 'strict' given 'parents' corrected by the prior chance of 'strict' given any other group. Note that Eq. 3 has been well-established as a measure for stereotypicality in research from both social psychology (McCauley et al., 1980) and economics (Bordalo et al., 2016). After re-ranking by typicality, we evaluate how many of the stereotypes are correctly retrieved by the model through recall@ $k$ for each of the 8 target categories.
+
+Results Figure 1 shows the recall@ $k$ scores per model separated by category, showcasing the ability to directly retrieve stereotypical attributes of social groups using our elicitation method. While models capture the human stereotypes to similar extents, results vary when comparing across categories with most models obtaining the highest recall for country stereotypes. Multilingual models obtain relatively low scores when recalling stereotypical attributes pertaining to age, gender and political groups. Yet, XLMR-L is scoring relatively high on stereotypical profession and race attributes.
+
+
+
+
+
+
+
+
+
+
+Figure 1: Recall@k scores for recalling the human-defined stereotypes captured in our dataset using our stereotype elicitation method on various pretrained LMs.
+
+
+
+
+
+
+
+The suboptimal performance of multilingual models could be explained in different ways. For instance, as multilingual models are known to suffer from negative interference (Wang et al., 2020), their quality on individual languages is lower compared to monolingual models, due to limited model capacity. This could result in a loss of stereotypical information. Alternatively, multilingual models are trained on more culturally diverse data, thus conflicting information could counteract within the model with stereotypes from different languages dampening each other's effect. Cultural differences might also be more pronounced when it comes to e.g. age and gender, whilst profession and race stereotypes might be established more universally.
+
+# 5 Quantifying emotion towards different social groups
+
+To study stereotypes through emotion, we draw inspiration from psychology studies showing that stereotypes evoke distinct emotions based on different types of perceived threats (Cottrell and Neuberg, 2005) or perceived social status and competitiveness of the targeted group (Fiske, 1998). For instance, Cottrell and Neuberg (2005) show that both feminists and African Americans elicit anger, but while the former group is perceived as a threat to social values, the latter is perceived as a threat to property instead. Thus, the stereotypes that underlie the emotion are likely different. Whilst strong emotions are not evidence of stereotypes per se, they do suggest the powerful effects of subtle biases captured in the model. Thus, the study into emotion profiles provides us with a good starting point to identify which stereotypes associated with
+
+the social groups evoke those emotions. To this end, we (1) build emotion profiles for social groups in the models and (2) retrieve stereotypes about the groups that most strongly elicit emotions.
+
+Model predictions To measure the emotions encoded by the model, we feed the model the 5 stereotype eliciting templates for each social group and retrieve the top 200 predictions for the [MASK] token (1000 in total). When taking the 1000 salient attributes retrieved from the 5 templates, we see that there are many overlapping predictions, hence we are left with only approx. between 300-350 unique attributes per social group. This indicates that the returned model predictions are robust with regard to the different templates.
+
+Emotion scoring For each group, we score the predicted set of stereotypical attributes $W_{TGT}$ using the NRC emotion lexicon (Mohammad and Turney, 2013) that contains $\sim 14\mathrm{K}$ English words that are manually annotated with Ekman's eight basic emotions (fear, joy, anticipation, trust, surprise, sadness, anger, and disgust) (Ekman, 1999) and two sentiments (negative and positive). These emotions are considered basic as they are thought to be shaped by natural selection to address survival-related problems, which is often denoted as a driving factor for stereotyping (Cottrell and Neuberg, 2005). We use the annotations that consist of a binary value (i.e. 0 or 1) for each of the emotion categories; words can have multiple underlying emotions (e.g. selfish is annotated with 'negative', 'anger' and 'disgust') or none at all (e.g. vocal scores 0 on all categories). We find that the coverage for the salient attributes in the NRC lexicon is $\approx 70 - 75\%$ per group.
+
+We score groups by counting the frequencies with which the predicted attributes $W_{TGT}$ are associated with the emotions and sentiments. For each group, we remove attributes from $W_{TGT}$ that are not covered in the lexicon. Thus, we do not extract emotion scores for the exact same number of attributes per group (number of unique attributes and coverage in the lexicon vary). Thus, we normalize scores per group by the number of words for which we are able to retrieve emotion scores ( $\approx 210 - 250$ per group). The score of an emotion-group pair is computed as follows:
+
+$$
+\mathrm {s} _ {e m o} (\mathrm {T G T}) = \sum_ {i = w} ^ {| W _ {T G T} |} \mathrm {N R C} _ {e m o} (i) / \left(| W _ {T G T} |\right) \tag {4}
+$$
+
+We then define emotion vectors $\hat{v} \in \mathcal{R}^{10}$ for each group $TGT$ : $\hat{v}_{TGT} = [s_{\text{fear}}, s_{\text{joy}}, s_{\text{sadness}}, s_{\text{trust}}]$ .
+
+$s_{surprise}, s_{anticipation}, s_{disgust}, s_{anger}, s_{negative}, s_{positive}]$ , which we use as a representation for the emotion profiles within the model.
+
+Analysis Figure 2, provides examples of the emotion profiles encoded for a diverse set of social groups to demonstrate how these profiles allow us to expose stereotypes. For instance, we see that in RoBERTa-B religious people and liberals are primarily associated with attributes that underlie anger. Towards homosexuals, the same amount of anger is accompanied by disgust and fear as well. As a result, we can detect distinct salient attributes that contribute to these emotions e.g.: Christians are intense, misguided and perverse, liberals are phony, mad and rabid, whilst homosexuals are dirty, bad, filthy, appalling, gross and indecent. The finding that homosexuals elicit relatively much disgust can be confirmed by studies on humans as well (Cottrell and Neuberg, 2005). Similarly, we find that Greece and Puerto Rico elicit relatively much fear and sadness in RoBERTa-B. Whereas Puerto Rico is turbulent, battered, armed, precarious and haunted, for Greece we find attributes such as failing, crumbling, inefficient, stagnant and paralyzed.
+
+Emotion profiles elicited in BART-B differ considerably, showcasing how vastly sentiments vary across models. In particular, we see that overall the evoked emotion responses are weaker. Moreover, we detect relative differences such as liberals being more negatively associated than homosexuals, encoding attributes such as cowardly, greedy and hypocritical. We also find that BART-B encodes more positive associations e.g., committed,
+
+
+Figure 2: Examples of emotion profiles for a diverse set of social groups from RoBERTa-B and BART-B.
+
+reliable, noble and responsible contributing to trust for husbands. Interestingly, all multilingual models encode vastly more positive attributes for all social groups (see Appendix D). We expect that this might be an artefact of the training data, but leave further investigation of this for future work.
+
+Comparison across models We systematically compare the emotion profiles elicited by the social groups across different models by adapting the Representational Similarity Analysis (RSA) from Kriegeskorte et al. (2008). We opted for this method as it takes the relative relations between groups within the same model into account. This is particularly important as we have seen that some models are overall more negatively or positively biased. Yet, when it comes to bias and stereotypicality, we are less interested in absolute differences across models, but rather in how emotions differ towards groups in relation to the other groups. First, the representational similarity within each model is defined using a similarity measure to construct a representational similarity matrix (RSM). We define a similarity vector $\hat{w}_{TGT}$ for a social group such that every element $\hat{w}_{ij}$ of the vector is determined by the cosine similarity between $\hat{v}_i$ , where $i = \mathrm{TGT}$ , and the vector $\hat{v}_j$ for the j-th group in the list. The RSM is then defined as the symmetric matrix consisting of all similarity vectors. The resulting matrices are then compared across models by computing the Spearman correlation $(\rho)$ between the similarity vectors corresponding to the emotion profiles for a group in a model $a$ and $b$ . To express the similarity between the two models we take the mean correlation over all social groups in our list.
+
+Results Computing RSA over all categories combined, shows us that RoBERTa-B and BART-B ob
+
+
+Figure 3: Correlations in emotion profiles for gender and age groups across news sources (BERT-B).
+
+
+Figure 4: Effect on recall@k when fine-tuning BERT-B on 10, 25, 50 and $100\%$ of the data
+
+tain the highest correlation $(\rho = 0.44)$ . While using different architectures and pretraining strategies, the models rely on the same training data. Yet, we included base and large versions of models in our study and find that these models show little to no correlation (see Appendix E, Fig.10). This is surprising, as they are pretrained on the same data and tasks as their base versions (but contain more model parameters e.g. through additional layers). This shows how complex the process is in which associations are established and provides strong evidence that other modelling decisions, apart from training data, contribute to what models learn about groups. Thus, carefully controlling training content can not fully eliminate the need to analyze models w.r.t. the stereotypes that they might propagate.
+
+# 6 Stereotype shifts during fine-tuning
+
+Many debiasing studies intervene at the data level e.g., by augmenting imbalanced datasets (Manela et al., 2021; Webster et al., 2018; Dixon et al., 2018; Zhao et al., 2018) or reducing annotator bias (Sap et al., 2019). These methods are, however, dependent on the dataset, domain, or task, making new mitigation needed when transferring to a new setup (Jin et al., 2020). This raises the question of how emotion profiles and stereotypes are established through language use, and how they might shift due to new linguistic experience at the fine-tuning stage. We take U.S. news sources from across the political spectrum as a case study, as media outlets are known to be biased (Baron, 2006). By revealing stereotypes learned as an effect of fine-tuning on a specific source, we can trace the newly learned stereotypes back to the respective source.
+
+We rely on the political bias categorisation of news sources from the AllSides $^{3}$ media bias rating website. These ratings are retrieved using multiple
+
+
+
+
+
+
+Figure 5: Decrease in Spearman correlation $(\Delta \rho)$ after fine-tuning the pretrained models compared to no fine-tuning $(\Delta \rho = 1)$ (no correlation left: $\Delta \rho = -1$ ). We show results for models trained on varying proportions of the data. Results are averaged over categories and standard deviations are indicated by error bars.
+
+methods, including editorial reviews, blind bias surveys, and third party research. Based on these ratings we select the following sources: New Yorker (far left), The Guardian (left), Reuters (center), FOX News (right) and Breitbart (far right). From each news source we take 4354 articles from the All-The-News $^{4}$ dataset that contains articles from 27 American Publications collected between 2013 and early 2020. We fine-tune the 5 base models $^{5}$ on these news sources using the MLM objective for only 1 training epoch with a learning rate of 5e-5 and a batch size of 8 using the HuggingFace library (Wolf et al., 2020). We then quantify the emotion shift after fine-tuning using RSA.
+
+Results We find that fine-tuning on news sources can directly alter the encoded stereotypes. For instance, for $k = 25$ , fine-tuning BERT-B on Reuters informs the model that Croatia is good at sports and Russia is good at hacking, at the same time, associations such as Pakistan is bad at football, Romania is good at gymnastics and South Africa at
+
+
+Figure 6: A few interesting examples of emotional profiles for a diverse set of social group after fine-tuning RoBERTa-B for only 1 training epoch on articles from Guardian, Reuters and FOX news respectively.
+
+
+Figure 7: Stereotypical attribute shifts when finetuning RoBERTa-B on New Yorker (left) and FOX news (right). Removed attributes are red and those added green. Attributes that persisted are grey.
+
+rugby are lost. Moreover, from fine-tuning on both Breitbart and FOX news the association emerges that black women are violent, while this is not the case when fine-tuning on the other sources.
+
+In fact, Guardian and Breitbart are the only news sources that result in the encoding of the salient attribute racist for White Americans. We find that such shifts are already visible after training on as little as $25\%$ of the original data $(\sim 1K$ articles). When comparing to human stereotypes, we find that fine-tuning on Reuters decreases the overall recall scores (see Figure 4). Although New Yorker exhibits a similar trend, fine-tuning on the other sources have little effect on the number of stereotypes recalled from the dataset. As Reuters has a
+
+center bias rating i.e., it does not predictably favor either end of the political spectrum, we speculate that large amounts of more nuanced data helps transmit fewer stereotypes.
+
+Figure 5 shows the decrease in correlation between the emotion profiles from pretrained BERT-B and BERT-B fine-tuned on different proportions of the data. Interestingly, fine-tuning on less articles does not automatically result in smaller changes to the models. In fact, in many cases, the amount of relative change in emotion profiles is heavily dependent on the social category as indicated by the error bars. This is not unexpected as news sources might propagate stronger opinions about specific categories. Moreover, we find that emotions towards different social categories cannot always be distinguished by the political bias of the source. Figure 3, shows how news sources compare to each other w.r.t. different social categories, exposing that e.g. Guardian and FOX news show lower correlation on gender than on age.
+
+Computing correlation between all pretrained and fine-tuned models, we find that emotion profiles are prone to change irrespective of model or news source (see Appendix E). In Figure 6, we showcase the effect of fine-tuning from the model that exhibits the lowest change in correlation, i.e. RoBERTa-B, to highlight how quickly emotions shift. We find that while Reuters results in weaker emotional responses, Guardian elicits stronger negative emotions than FOX news e.g. towards conservatives and academics. Yet, while both sources result in anger towards similar groups, for FOX news anger is more often accompanied with fear while for Guardian this seems to more strongly stems from disgust (e.g. see Christians and Iraq).
+
+Lastly, Figure 7 shows specific stereotype shifts found on the top 15 predictions per template. We
+
+illustrate the salient attributes that are removed, added and remained constant after fine-tuning. For instance, the role of news media in shaping public opinion about police has received much attention in the wake of the growing polarization over high-profile incidents (Intravia et al., 2018; Graziano, 2019). We find clear evidence of this polarization as fine-tuning on New Yorker results in attributes such as cold, unreliable, deadly and inept, yet, fine-tuning on FOX news yields positive associations such as polite, loyal, cautious and exceptional. In addition, we find evidence for other stark contrasts such as the model picking up on sexist (e.g. women are not interesting and equal but late, insecure and entitled) and racist stereotypes (e.g. black people are not misunderstood and powerful, but bitter, rude and stubborn) after fine-tuning on FOX news.
+
+# 7 Conclusion
+
+We present the first dataset containing stereotypical attributes of a range of social groups. Importantly, our data acquisition technique enables the inexpensive retrieval of similar datasets in the future, enabling comparative analysis on stereotype shifts over time. Additionally, our proposed methods could inspire future work on analyzing the effect of training data content, and simultaneously contribute to the field of social psychology by providing a testbed for studies on how stereotypes emerge from linguistic experience. To this end, we have shown that our methods can be used to identify stereotypes evoked during fine-tuning by taking news sources as a case study. Moreover, we have exposed how quickly stereotypes and emotions shift based on training data content, and linked stereotypes to their manifestations as emotions to quantify and compare attitudes towards groups within LMs. We plan to extent our approach to more languages in future work to collect different, more culturally dependent, stereotypes as well.
+
+# 8 Ethical consideration
+
+The examples given in the paper can be considered offensive but are in no way a reflection of the authors' own values and beliefs and should not be taken as such. Moreover, it is important to note that for the fine-tuning experiments only a few interesting examples were studied and showcased. Hence, more thorough research should be conducted before drawing any hard conclusions about the news papers and the stereotypes they propagate. In ad
+
+dition, our data acquisition process is completely automated and did not require the help from human subjects. While the stereotypes we retrieve stem from real humans, the data we collect is publicly available and completely anonymous as the specific stereotypical attributes and/or search queries can not be traced back to individual users.
+
+# References
+
+David P Baron. 2006. Persistent media bias. Journal of Public Economics, 90(1-2):1-36.
+Camiel J Beukeboom and Christian Burgers. 2019. How stereotypes are shared through language: a review and introduction of the social categories and stereotypes communication (scsc) framework. Review of Communication Research, 7:1-37.
+Su Lin Blodgett, Solon Barocas, Hal Daumé III, and Hanna Wallach. 2020. Language (technology) is power: A critical survey of "bias" in nlp. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5454-5476.
+Tolga Bolukbasi, Kai-Wei Chang, James Zou, Venkatesh Saligrama, and Adam Kalai. 2016. Man is to computer programmer as woman is to homemaker? debiasing word embeddings. In Proceedings of the 30th International Conference on Neural Information Processing Systems, pages 4356-4364.
+Pedro Bordalo, Katherine Coffman, Nicola Gennaioli, and Andrei Shleifer. 2016. Stereotypes. The Quarterly Journal of Economics, 131(4):1753-1794.
+Aylin Caliskan, Joanna J Bryson, and Arvind Narayanan. 2017. Semantics derived automatically from language corpora contain human-like biases. Science, 356(6334):183-186.
+Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.
+Catherine A Cottrell and Steven L Neuberg. 2005. Different emotional reactions to different groups: a sociofunctional threat-based approach to prejudice". Journal of personality and social psychology, 88(5):770.
+Amy JC Cuddy, Susan T Fiske, Virginia SY Kwan, Peter Glick, Stephanie Demoulin, Jacques-Philippe Leyens, Michael Harris Bond, Jean-Claude Croizet, Naomi Ellemers, Ed Sleebos, et al. 2009. Stereotype content model across cultures: Towards universal similarities and some differences. British Journal of Social Psychology, 48(1):1-33.
+
+Thomas Davidson, Debasmita Bhattacharya, and Ingmar Weber. 2019. Racial bias in hate speech and abusive language detection datasets. In Proceedings of the Third Workshop on Abusive Language Online, pages 25-35.
+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.
+Lucas Dixon, John Li, Jeffrey Sorensen, Nithum Thain, and Lucy Vasserman. 2018. Measuring and mitigating unintended bias in text classification. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, pages 67-73.
+MeiXing Dong, David Jurgens, Carmen Banea, and Rada Mihalcea. 2019. Perceptions of social roles across cultures. In International Conference on Social Informatics, pages 157-172. Springer.
+Paul Ekman. 1999. Basic emotions. Handbook of Cognition and Emotion, pages 45-60.
+Anjalie Field and Yulia Tsvetkov. 2020. Unsupervised discovery of implicit gender bias. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 596-608.
+Susan T Fiske. 1998. Stereotyping, prejudice, and discrimination. The handbook of social psychology, 2(4):357-411.
+Aaron Gokaslan and Vanya Cohen. 2019. Openwebtext corpus. https://skylion007.github.io/OpenWebTextCorpus/.
+Lisa M Graziano. 2019. News media and perceptions of police: a state-of-the-art-review. Policing: An International Journal.
+Lasana T Harris and Susan T Fiske. 2006. Dehumanizing the lowest of the low: Neuroimaging responses to extreme out-groups. *Psychological science*, 17(10):847-853.
+Lasana T Harris and Susan T Fiske. 2009. Social neuroscience evidence for dehumanised perception. *European review of social psychology*, 20(1):192-231.
+Madeline E Heilman, Aaron S Wallen, Daniella Fuchs, and Melinda M Tamkins. 2004. Penalties for success: reactions to women who succeed at male gender-typed tasks. Journal of applied psychology, 89(3):416.
+Perry Hinton. 2017. Implicit stereotypes and the predictive brain: cognition and culture in "biased" person perception. *Palgrave Communications*, 3(1):1-9.
+
+Jonathan Intravia, Kevin T Wolff, and Alex R Piquero. 2018. Investigating the effects of media consumption on attitudes toward police legitimacy. Deviant Behavior, 39(8):963-980.
+Xisen Jin, Francesco Barbieri, Brendan Kennedy, Aida Mostafazadeh Davani, Leonardo Neves, and Xiang Ren. 2020. On transferability of bias mitigation effects in language model fine-tuning. arXiv preprint arXiv:2010.12864.
+Svetlana Kiritchenko and Saif Mohammad. 2018. Examining gender and race bias in two hundred sentiment analysis systems. In Proceedings of the Seventh Joint Conference on Lexical and Computational Semantics, pages 43-53.
+Nikolaus Kriegeskorte, Marieke Mur, and Peter A Bandettini. 2008. Representational similarity analysis connecting the branches of systems neuroscience. Frontiers in systems neuroscience, 2:4.
+Keita Kurita, Nidhi Vyas, Ayush Pareek, Alan W Black, and Yulia Tsvetkov. 2019. Measuring bias in contextualized word representations. In Proceedings of the First Workshop on Gender Bias in Natural Language Processing, pages 166-172.
+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, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880.
+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.
+Anne Maass. 1999. Linguistic intergroup bias: Stereotype perpetuation through language. In Advances in experimental social psychology, volume 31, pages 79-121. Elsevier.
+Diane M Mackie, Thierry Devos, and Eliot R Smith. 2000. Intergroup emotions: Explaining offensive action tendencies in an intergroup context. Journal of personality and social psychology, 79(4):602.
+Daniel de Vassimon Manela, David Errington, Thomas Fisher, Boris van Breugel, and Pasquale Minervini. 2021. Stereotype and skew: Quantifying gender bias in pre-trained and fine-tuned language models. arXiv preprint arXiv:2101.09688.
+Chandler May, Alex Wang, Shikha Bordia, Samuel Bowman, and Rachel Rudinger. 2019. On measuring social biases in sentence encoders. 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 622-628.
+
+Clark McCauley, Christopher L Stitt, and Mary Segal. 1980. Stereotyping: From prejudice to prediction. Psychological Bulletin, 87(1):195.
+Saif M Mohammad and Peter D Turney. 2013. Nrc emotion lexicon. National Research Council, Canada, 2.
+Moin Nadeem, Anna Bethke, and Siva Reddy. 2020. Stereoset: Measuring stereotypical bias in pretrained language models. arXiv preprint arXiv:2004.09456.
+Sebastian Nagel. 2016. Cc-news dataset. https://commoncrawl.org/2016/10/news-dataset-available/.
+Nikita Nangia, Clara Vania, Rasika Bhalerao, and Samuel Bowman. 2020. Crows-pairs: A challenge dataset for measuring social biases in masked language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1953-1967.
+Chan Young Park, Xinru Yan, Anjalie Field, and Yulia Tsvetkov. 2020. Multilingual contextual affective analysis of lgbt people portrayals in wikipedia. arXiv preprint arXiv:2010.10820.
+Maarten Sap, Dallas Card, Saadia Gabriel, Yejin Choi, and Noah A Smith. 2019. The risk of racial bias in hate speech detection. In Proceedings of the 57th annual meeting of the association for computational linguistics, pages 1668-1678.
+Seth Stephens-Davidowitz. 2018. Everybody Lies: What the internet can tell us about who we really are. In Bloomsbury Publishing Plc.
+Tony Sun, Andrew Gaut, Shirlyn Tang, Yuxin Huang, Mai ElSherief, Jieyu Zhao, Diba Mirza, Elizabeth Belding, Kai-Wei Chang, and William Yang Wang. 2019. Mitigating gender bias in natural language processing: Literature review. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1630-1640.
+Yi Chern Tan and L Elisa Celis. 2019. Assessing social and intersectional biases in contextualized word representations. arXiv preprint arXiv:1911.01485.
+Molly Parker Tapias, Jack Glaser, Dacher Keltner, Kristen Vasquez, and Thomas Wickens. 2007. Emotion and prejudice: Specific emotions toward outgroups. Group Processes & Intergroup Relations, 10(1):27-39.
+Trieu H Trinh and Quoc V Le. 2018. A simple method for commonsense reasoning. arXiv preprint arXiv:1806.02847.
+Zirui Wang, Zachary C Lipton, and Yulia Tsvetkov. 2020. On negative interference in multilingual language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4438-4450.
+
+Kellie Webster, Marta Recasens, Vera Axelrod, and Jason Baldridge. 2018. Mind the gap: A balanced corpus of gendered ambiguous pronouns. Transactions of the Association for Computational Linguistics, 6:605-617.
+Bernard Weiner. 1993. On sin versus sickness: A theory of perceived responsibility and social motivation. American psychologist, 48(9):957.
+Guillaume Wenzek, Marie-Anne Lachaux, Alexis Conneau, Vishrav Chaudhary, Francisco Guzmán, Armand Joulin, and Édouard Grave. 2020. Ccnet: Extracting high quality monolingual datasets from web crawl data. In Proceedings of The 12th Language Resources and Evaluation Conference, pages 4003-4012.
+Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi 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 M. 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.
+Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2018. Gender bias in coreference resolution: Evaluation and debiasing methods. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, volume 2.
+Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pages 19-27.
+
+# A Pretrained model details
+
+| Model | tokenization | L | dim | H | params | V | D | task | #lgs |
| BERT-B | WordPiece | 12 | 768 | 12 | 110M | 30K | 16GB | MLM+NSP | 1 |
| BERT-L | WordPiece | 24 | 1024 | 16 | 336M | 30K | 16GB | MLM+NSP | 1 |
| RoBERTa-B | BPE | 12 | 768 | 12 | 125M | 50K | 160GB | MLM | 1 |
| RoBERTa-L | BPE | 24 | 1024 | 16 | 335M | 50K | 160GB | MLM | 1 |
| BART-B | BPE | 12 | 768 | 16 | 139M | 50K | 160GB | Denoising | 1 |
| BART-L | BPE | 24 | 1024 | 16 | 406M | 50K | 160GB | Denoising | 1 |
| mBERT | WordPiece | 12 | 768 | 12 | 168M | 110K | - | MLM+NSP | 102 |
| XLMR-B | SentencePiece | 12 | 768 | 8 | 270M | 250K | 2.5TB | MLM | 100 |
| XLMR-L | SentencePiece | 24 | 1024 | 16 | 550M | 250K | 2.5TB | MLM | 100 |
+
+Table 3: Summary statistics of the model architectures: tokenization method, number of layers $L$ , hidden state dimensionality $dim$ , number of attention heads $H$ , number of model parameters $params$ , vocabulary size $V$ , training data size $D$ , pretraining tasks, and number of languages used $\# lgs$ .
+
+# B Data acquisition
+
+For the collection of autocomplete suggestions we rely on the free publicly available API's from the respective engines using the following base url's:
+
+- Google: http://suggestqueries.google.com/complete/search
+- Yahoo: http://sugg.search.yahoo.net/sg
+- DuckDuckGo: https://duckduckgo.com/ac
+
+All search engine suggestions are automatically generated by an algorithm without human involvement. These suggestions are supposed to be based on factors like popularity and similarity. We enter the search queries anonymously such that the resulting suggestions are mainly based on common queries from other people's search histories. Unfortunately, however, exact details about the workings of the algorithms are not publicly available, but an extensive explanation of Google's search predictions can be found here: Google's documentation on autocomplete suggestions. Moreover, Figure B illustrates the contribution of each search engine to the datasets. We see that while each search engine relies on a different algorithm, in many cases the engines predict similar stereotypical attributes regardless. Moreover, the dataset was constructed during the period January-May 2021. However, given that the algorithms behind these engines are constantly evolving, it is not guaranteed that the same approach will yield identical results in the future. We will make the dataset and corresponding code available upon publication.
+
+
+Figure 8: Distribution of the contribution of each search engine to the final dataset.
+
+# C Lists of social groups per category
+
+# Age (11)
+
+"elders", "kids", "millenials", "teens", "boomers", "old people"
+
+"old women", "children", "teenagers", "daughters", "sons"
+
+# Gender (25)
+
+"girls,"women", "men", "females", "males", "boys"
+
+"boyfriends", "girlfriends", "stepmothers", "stepfathers", "ladies", "gentlemen"
+
+"brothers", "sisters", "mothers", "fathers", "grandfathers", ""grandmothers
+
+"wives", "husbands", "brides", "grooms", "schoolgirls", "schoolboys"
+
+"mommies", "daddies"
+
+# Race (99)
+
+"Asians", "Americans", "Europeans", "Jews", "Indians", "Russians", "Africans", "Black people"
+
+"Mexicans", "Whites" "Blacks", "White people", "Germans", "blondes", "blonde girls", "Arabs"
+
+"White Americans", "Black Americans" "Hispanics", "Native Americans", "Black men", "White men"
+
+"Asian women", "Asian men" Black women", "the Dutch", "Irish people", "Irish men", "White women"
+
+"Indian men", "Indian women", "Chinese men", "Chinese women", "Japanese women", "Japanese men"
+
+"Indian parents", "Asian parents", "White parents", "Black parents", "Black fathers", "Latinas", "Latinos"
+
+"Latin people", "Brazilian women", "Asian kids", "Black kids", "White kids", "African Americans"
+
+"Nigerians", "Ethiopians", "Ukrainians", "Sudanese people", "Afghans", "Iraqis", "Hispanic
+
+"Hispanic women", "Italians", "Italian men", "Italian women", "Somalis", "Iranian people", "Iranians"
+
+"Australians", "Australian men", "Australian women", "Aussies", "Ghanaians", "Swedes", "Finns"
+
+"Venezuelans", "Moroccans", "Syrians", "Pakistanis", "British people", "French people", "Greeks"
+
+"Indonesians", "Vietnamese people", "Romanians", "Ecuadorians", "Norwegians", "Nepalis", "Scots"
+
+"Bengalis", "Polish people", "Taiwanese people", "Albanians", "Colombians", "Egyptians", "Koreans"
+
+"Persian people", "Portuguese men", "Portuguese women", "Turkish people", "Austrians"
+
+"South Africans", "Dutch people", "Chileans", "Lebanese people"
+
+# Countries (73)
+
+"Ethiopia", "Europe", "Ukraine", "Sudan", "Afghanistan", "Iraq", "Yemen", "Russia", "Italy", "Somalia"
+
+"Iran", "Venezuela", "Oman", "Syria", "China", "India", "Britain", "France", "Greece", "Scotland"
+
+"Paraguay", "Brazil", "Africa", "Jordan", "Indonesia", "Vietnam", "Pakistan", "Romania, Ecuador"
+
+"Mexico", "Puerto Rico", "Cameroon", "Kenya", "Liberia", "Sierra Leon", "Qatar", "Syria", "Kenya"
+
+"Saudi Arabia", "Lebanon", "South Africa", "Korea", "Singapore", "Germany", "Ireland", "Morocco"
+
+"Turkey", "Laos", "Bangladesh", "Guatemala", "Ghana", "Nepal", "Albania", "Spain", "Sweden"
+
+"Argentina", "Chile", "Taiwan", "Finland", "Australia", "Egypt", "Peru", "Poland", "Columbia", "Bolivia"
+
+"Japan", "Norway", "Cape Verde", "Portugal", "Austria", "the Netherlands"
+
+"Croatia", "Malta", "Belgium"
+
+# Profession (115)
+
+"students", "politicians", "doctors", "business men", "librarians", "artists", "professors", "priests"
+
+"bosses", "police", "police officers", "soldiers", "scientists", "physicians", "cashiers" "housekeepers"
+
+"teachers", "janitors", "models", "actresses", "pilots", "strippers" "brokers", "hairdressers", "bartenders"
+
+"diplomats", "receptionists", "realtors", "mathematicians", "barbers", "coaches", "business people"
+
+"construction workers", "managers", "accountants", "commanders", "firefighters", "movers", "attorneys"
+
+"Bakers", "athletes", "dancers", "carpenters", "mechanics", "handymen", "musicians", "detectives"
+
+"entrepreneurs", "opera singers", "chiefs", "lawyers", "software developers", "farmers", "writers"
+
+"real-estate developers", "butchers", "electricians", "prosecutors", "bankers", "cooks", "plumbers"
+
+"football players", "boxers", "chess players", "swimmers", "tennis players", "supervisors", "attendants"
+
+"producers", "researchers", "economists", "physicists", "psychologists", "sales people", "assistants"
+
+"engineers", "comedians", "painters", "civil servants", "guitarists", "linguists", "laborers", "historians"
+
+"chemists", "pensioners", "performing artists", "singers", "secretaries", "auditors", "counselors"
+
+"dentists", "analysts", "nurses", "waiters", "authors", "architects", "academics", "directors", "illustrators"
+
+"clerks", "photographers", "cleaners", "composers", "pharmacists", "sociologists", "journalists"
+
+"guards", "actors", "midwives", "sheriffs", "editors", "designers", "judges", "poets", "maids"
+
+# Religion (10)
+
+"Religious people", "Muslims", "Christians", "Hindus", "atheists", "Buddhists"
+
+"Catholics", "Protestants", "Sikhs", "Mormons"
+
+# Political (9)
+
+"immigrants", "conservatives", "liberals", "trump supporters", "voters", "communists" "capitalists", "populists", "socialists"
+
+# Sexuality (12)
+
+"gay people", "lesbians", "queer people", "transgenders", "homosexuals", "pansexual people" "queers", "faggots", "bisexual people", "asexual people", "crossdressers", "fags"
+
+# Lifestyle (19)
+
+"hipsters", "nerds", "rednecks", "homeless people", "feminists", "rich people", "poor people", "criminals"
+"frats", "frat boys", "sorority girls", "hippies", "geeks", "goths", "punks", "Californians"
+"celebrities", "redheads", "gingers"
+
+# D Emotion profiles from multilingual models
+
+
+Figure 9: Examples of emotion profiles for the multilingual models. It showcases that these models are much more positive about all social groups in comparison to the monolingual models. Whereas we observed that monolingual models primarily encode negative associations for most groups, associations encoded within the multilingual models are more balanced between positive and negative sentiments.
+
+
+
+
+
+# E Additional quantitative results of systematic shifts in emotion profiles across models
+
+
+Figure 10: Spearman correlation between each pair of models computed over all social groups. This figure illustrates that there is fairly little correlation between any of the models when it comes to the emotion profiles that they capture.
+
+| Δρ | Source | Religion | Profession | Lifestyle | Sexuality | Race | Gender | Country | Age | Political |
| BERT-B | NewYorker | -.56 | -.34 | -.25 | -.23 | -.39 | -.47 | -.47 | -.43 | -.72 |
| Guardian | -.49 | -.34 | -.08 | -.23 | -.37 | -.31 | -.43 | -.31 | -.49 |
| Reuters | -.71 | -.53 | -.43 | -.65 | -.53 | -.63 | -.69 | -.60 | -.54 |
| FOX news | -.46 | -.30 | -.16 | -.22 | -.35 | -.30 | -.44 | -.33 | -.51 |
| BreitBart | -.39 | -.25 | -.11 | -.21 | -.33 | -.23 | -.40 | -.34 | -.66 |
| RoBERTa-B | NewYorker | -.20 | -.22 | -.20 | -.29 | -.21 | -.24 | -.16 | -.08 | -.38 |
| Guardian | -.19 | -.20 | -.19 | -.20 | -.22 | -.18 | -.16 | -.13 | -.24 |
| Reuters | -.25 | -.32 | -.33 | -.21 | -.33 | -.49 | -.37 | -.24 | -.40 |
| FOX news | -.10 | -.18 | -.14 | -.37 | -.16 | -.12 | -.16 | -.25 | -.25 |
| BreitBart | -.15 | -.23 | -.21 | -.41 | -.18 | -.27 | -.22 | -.18 | -.43 |
| BART-B | NewYorker | -.56 | -.48 | -.40 | -.60 | -.44 | -.55 | -.43 | -.48 | -.49 |
| Guardian | -.49 | -.48 | -.32 | -.41 | -.37 | -.50 | -.47 | -.67 | -.33 |
| Reuters | -.43 | -.51 | -.45 | -.51 | -.53 | -.54 | -.54 | -.70 | -.29 |
| FOX news | -.27 | -.50 | -.32 | -.44 | -.37 | -.44 | -.42 | -.65 | -.50 |
| BreitBart | -.37 | -.48 | -.42 | -.35 | -.37 | -.51 | -.44 | -.56 | -.50 |
| mBERT | NewYorker | -.58 | -.64 | -.33 | -.44 | -.64 | -.63 | -.80 | -.59 | -.38 |
| Guardian | -.58 | -.49 | -.30 | -.50 | -.63 | -.72 | -.77 | -.53 | -.37 |
| Reuters | -.50 | -.56 | -.29 | -.46 | -.37 | -.59 | -.85 | -.33 | -.42 |
| FOX news | -.35 | -.64 | -.36 | -.54 | -.68 | -.71 | -.71 | -.49 | -.60 |
| BreitBart | -.39 | -.66 | -.36 | -.43 | -.51 | -.61 | -.75 | -.40 | -.55 |
| XLMR-B | NewYorker | -.44 | -.76 | -.45 | -.66 | -.61 | -.86 | -.66 | -.72 | -.58 |
| Guardian | -.52 | -.72 | -.49 | -.46 | -.68 | -.83 | -.53 | -.63 | -.38 |
| Reuters | -.53 | -.74 | -.69 | -.55 | -.67 | -.73 | -.53 | -.69 | -.57 |
| FOX news | -.40 | -.71 | -.47 | -.57 | -.58 | -.69 | -.51 | -.69 | -.30 |
| BreitBart | -.60 | -.76 | -.47 | -.56 | -.75 | -.79 | -.60 | -.65 | -.51 |
+
+Table 4: Emotion shifts after fine-tuning for 1 training epoch on $\pm$ 4.5K articles from the respective news sources. We quantify shift as the decrease in similarity after fine-tuning, i.e. change in averaged Spearman correlation $(\Delta \rho)$ , between the pretrained and fine-tuned model respectively. If the emotion profiles do no change $\rho = 1$ and thus $\Delta \rho = 0$ , on the other hand, if no correlation remains after fine-tuning $\Delta \rho = -1$ . Biggest changes are indicated by bold letters.
\ No newline at end of file
diff --git a/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/images.zip b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..59d4d202718489d6176de8041f0d690796176737
--- /dev/null
+++ b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3f8cadbd11690c3f1f99e3c118f4b26fc59db8dae3c3289137d9765276678627
+size 849631
diff --git a/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/layout.json b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..a8b7d82412198db79668e3c099d8afb9475d6f32
--- /dev/null
+++ b/stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e9e822b638d5a56c3d39e6b302db8c6d4ece1606f7ac42fef9aeb0361d020bfe
+size 466455
diff --git a/streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_content_list.json b/streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..606ddf8758257dd7959a4eda893cedf05430e5db
--- /dev/null
+++ b/streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ea7877ae56161bf268c026ba4a800f565739df4cadfc3c1fd485748278ef9cff
+size 176122
diff --git a/streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_model.json b/streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..6e2d346d6420219b0eb335df6f4907cac86eaec5
--- /dev/null
+++ b/streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b434ac95003d942e1c69037dd2e8ac0981be1039f61bb59e330c10a3f5fb2e7f
+size 258404
diff --git a/streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_origin.pdf b/streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..abcb2c6ded0004ace56a448fe837fb322015ee6e
--- /dev/null
+++ b/streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8a3a15c3a4f9f4a5af63618bbb7ef5418d8804e493f2cd1940987cb95acd8f31
+size 2841944
diff --git a/streamhoverlivestreamtranscriptsummarizationandannotation/full.md b/streamhoverlivestreamtranscriptsummarizationandannotation/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..46d7789df5faae510bf60c647f14e18c2514c00f
--- /dev/null
+++ b/streamhoverlivestreamtranscriptsummarizationandannotation/full.md
@@ -0,0 +1,984 @@
+# StreamHover: Livestream Transcript Summarization and Annotation
+
+Sangwoo Cho, $^{\dagger}$ Franck Dernoncourt, $^{\ddagger}$ Tim Ganter, $^{\ddagger}$ Trung Bui, $^{\ddagger}$ Nedim Lipka, $^{\ddagger}$ Walter Chang, $^{\ddagger}$ Hailin Jin, $^{\ddagger}$ Jonathan Brandt, $^{\ddagger}$ Hassan Foroosh, $^{\dagger}$ Fei Liu $^{\dagger}$
+
+†University of Central Florida ‡Adobe Research
+
+swcho@knights.ucf.edu {foroosh, feiliu}@cs.ucf.edu {dernonco,timganter,bui,lipka,wachang,hljin,jbrandt}@adobe.com
+
+# Abstract
+
+With the explosive growth of livestream broadcasting, there is an urgent need for new summarization technology that enables us to create a preview of streamed content and tap into this wealth of knowledge. However, the problem is nontrivial due to the informal nature of spoken language. Further, there has been a shortage of annotated datasets that are necessary for transcript summarization. In this paper, we present StreamHover, a framework for annotating and summarizing livestream transcripts. With a total of over 500 hours of videos annotated with both extractive and abstractive summaries, our benchmark dataset is significantly larger than currently existing annotated corpora. We explore a neural extractive summarization model that leverages vector-quantized variational autoencoder to learn latent vector representations of spoken utterances and identify salient utterances from the transcripts to form summaries. We show that our model generalizes better and improves performance over strong baselines. The results of this study provide an avenue for future research to improve summarization solutions for efficient browsing of livestreams.
+
+# 1 Introduction
+
+One of the most powerful communication mediums is livestreaming. New platforms such as YouTube Live, Twitch, Instagram Live and TikTok encompass a variety of topics, ranging from video games to social media to professional sports. We are particularly interested in livestreams that are distinguished by three characteristics: Excessive length, the recordings could last from several minutes to several hours; Verbal communication, the use of natural language is the primary means of communication, in contrast to gestures or facial expressions; Informal nature, the streamers' language is mostly informal and unplanned, unlike news broadcasts. Without an effective mechanism to summarize such streamed content, livestreaming platforms may not fully meet the needs of their customers.
+
+
+Figure 1: An example of streamed content on Behance, a streaming platform for artists and designers to showcase creative work related to Adobe Photoshop, Illustrator, Fresco, UI/UX, photography and more. TOP: The videos are each 27 minutes long. BOTTOM: One video is being broadcast live, the other is $>2$ hours long.
+
+Our goal in this work is to create a text preview of the streamed content. When a user hovers over the thumbnail or scrolls past a video, they are shown a preview of the content. We present a dataset of over 500 hours of video footage, which were streamed live on a social media platform (behance.net) created to showcase and discover creative work. Figure 1 shows an example of the streams, where the artists showcase the use of Adobe Photoshop and Illustrator in designing holiday cards and posters. It is necessary to point out that video analysis is not suitable here, as the video only mirrors the artists' screen content. As a first step towards automatic creation of a text preview, we focus on identifying salient utterances to produce an extract from the livestream transcript.
+
+We make use of vector-quantized variational autoencoders (VQ-VAE; van den Oord et al., 2017) to identify salient utterances. The model has been applied successfully to opinion summarization that learns in-domain sentence representations (Angelidis et al., 2021), which is essential for adaptation of general-domain models. We refrain from using sequential methods for utterance selection. First,
+
+it is difficult to scale up sequential prediction to process transcripts that exceed the maximum allowed length, even with models that handle long text (Beltagy et al., 2020; Zhao et al., 2020). Second, sequential methods (Narayan et al., 2018b; Xiao and Carenini, 2019) may not give enough flexibility to select salient utterances on-the-fly when content is being streamed live, thus they are unsuitable for our case.
+
+There has been a shortage of annotated datasets that are necessary for livestream transcript summarization. We build a browser-based user interface for summary annotation that provides to the annotators a clip of the livestream recording alongside a synchronized display of the transcript. The interface allows annotators to conveniently label summary utterances and write an abstractive summary using their own words (Figure 3). With a total of 500 hours of annotated video footage, our dataset is notably larger than existing annotated corpora for transcript summarization (Janin et al., 2003; Carletta et al., 2006). We compare our summarization approach with strong baselines on the dataset and shed light on the task of livestream transcript summarization. Our contributions are as follows.
+
+- We create a detailed annotation interface and new benchmark dataset for automatic summarization of livestream transcripts. An informative preview of streamed content is of crucial importance to users when considering whether to hit play.
+- We present StreamHover, a unsupervised model based on VQ-VAE to identify salient utterances from livestream transcripts to form preview summaries. We evaluate the method across multiple dimensions and discuss its strengths and weaknesses. Empirical results show that our method outperforms strong summarization baselines. $^{1}$
+
+# 2 Related Work
+
+Closed captions are often provided onscreen, turning streaming videos into text on an unprecedented scale (Besik, 2020). However, there are very few summarization studies that attempt to generate text previews of streaming videos to help users browse or refind information that has been watched before. Neural text summarizers have focused primarily on written text, including news articles, reviews, scientific papers and book chapters (See et al., 2017; Tan
+
+07:35
+
+OK. It looks like we are live. How is everyone today good morning Good afternoon good evening? Wherever you are in the world my name is Jason Levine and for today's brief live stream go to be talking about a topic which to be honest. I didn't think I'd revisit again seeing as I've got some archive videos on this. But in the last week alone, I had probably 3 or 4 different customers on YouTube and a couple more on Twitter and even if you on Facebook asked me how the heck do you burn an audio CD in Adobe audition?
+
+08:10
+
+And specifically what else do you need to do to make sure that you know everything is right when you're burning it to CD so that's what I thought I would take the opportunity to do today, so as always. We are coming to you live on Facebook YouTube be hands and Twitter Periscope, so we've got our live interactive chat. Thank you so much for joining as always, I will of course, be checking the chats at the end of the broadcast, but we got it just really it's a couple of quick things to cover here? What is up Catherine Lacoste. An it's a really simple process but there's definitely a few things that you need to be aware of the need to know.
+
+Figure 2: A transcript snippet from "How to Create an Audio CD in Adobe Audition." Most utterances are off-topic, except for the one marked in blue, suggesting the information density of livestream transcripts is low.
+
+et al., 2017; Chen and Bansal, 2018; Narayan et al., 2018a; Gehrmann et al., 2018; Cohan et al., 2018; Liu and Lapata, 2019; Fabbri et al., 2019; Bražinskas et al., 2020; Ladhak et al., 2020; Song et al., 2021). Despite their success, it remains unclear as to if and how the summarizers can be extended to spoken text, whose utterances may have very low information density.
+
+It is crucial to identify salient content from transcripts where a substantial number of utterances are devoted to informal chit-chats in an attempt to connect with the audience (Figure 2). We investigate extractive rather than abstractive approaches as the latter are prone to generate hallucinated content that does not exist in the source text (Cao et al., 2017; Kryscinski et al., 2019; Lebanonff et al., 2019; Maynez et al., 2020). The problem could be exacerbated by ungrammatical spoken utterances and transcription errors. Instead, we consider VQ-VAE, an unsupervised representation learning technique (van den Oord et al., 2017; Jin et al., 2020; Angelidis et al., 2021) for content extraction. Unsupervised training of the VQ-VAE model and its inference could potentially be performed at the same time, allowing important utterances to be extracted from a transcript segment on-the-fly during streaming, without interrupting the learning process. It is also easier to tailor the model to specific domains compared to contemporary extractive methods (Yasunaga et al., 2017; Dong et al., 2018; Xu and Durrett, 2019; Wang et al., 2020).
+
+Our work contributes to a refined understanding of transcript summarization, which is understudied relative to its importance and potential. The transcripts may be obtained from channels such as movies and TVs (Papalampidi et al., 2020; Chen et al., 2021), interviews (Zhu et al., 2021), multi-party meetings (Murray and Carenini, 2008; Wang and Cardie, 2013; Li et al., 2019b; Koay et al., 2020, 2021; Zhong et al., 2021), telephone speech (Kafle and Huenerfauth, 2018) and more. The main thrust distinguishing our work with others is the combination of a benchmark summarization dataset, novel summarization methods and a challenging new domain where salient content is scattered throughout the transcript and mixed with substantial chit-chats. We do not make use of video event detection or multi-modal fusion (Zhu et al., 2018; Palaskar et al., 2019; Li et al., 2020) as little information could be gleaned from videos that mirror the artists' desktop. Instead, we focus on generating short descriptions from transcripts and leave for future work cross-modality research. We describe our data annotation process in the following section.
+
+# 3 Our Dataset
+
+We aim to create a large and representative corpus containing transcripts and summaries of streamed videos. We explore a leading social media platform (Behavior.net) supported by Adobe Creative Cloud that features livestreams of creative work by artists and designers. The website boasts over 10 million users, who watch artists and designers livestream when they create. Our data are extracted from this website, containing a large quantity of streamed videos (>5,000), the length of which ranges from minutes to several hours. The streamers' language is unplanned, instead of rehearsed as that of TED talks (Hernandez et al., 2018).
+
+We obtain a total of 5,398 streamed videos. The metadata of a video includes its ID, duration, title, a short description and the transcript. Automatic transcription was provided by Microsoft Automatic Speech Recognition which helps make videos accessible to a wide audience. Each transcript contains a set of segments, each corresponds to about 30 seconds of audio. Each segment contains a set of utterances. Figure 2 shows an example of the segments and utterances. The offset of the segment
+
+
+VIEW INSTRUCTIONS
+
+Task A) Select sentences that best summarize a 5 minute transcript. Please do NOT select chit-chat or greetings as summary sentences.
+
+A little too many. But okay if they are good sentences.
+
+Task B) Write a summary based on the selected sentences. A minimum length of 100 characters is required. Characters written: 163
+
+Maddy talks about digital painting photo studies. The references are two fairytale themed images. The second image is a woman sitting in a field holding a branch.
+
+# Selected Sentences
+
+[ "We're going to be doing some digital painting photo studies, but we have a little bit of a theme today which I hope you're going to like.", "I was lot of searching for some references for us to do photo studies of, and I found a couple that have like a nice cohesive theme.", "So the first one is this one right here, which I've had for awhile and wanted to paint.", "And another one is this woman sitting in a field holding a branch, and this one is really pretty too." ]
+
+Selected Sentence Numbers [7, 8, 11, 12]
+
+Figure 3: An example of our browser-based annotation interface. It includes a clip of the streamed video alongside a display of the transcript (omitted for space). The streamer talks about Digital Painting with Maddy Bellwoar to create fairytale themed images. The annotators are asked to write a concise summary of this clip using their own words (Task A) and identify summary utterances (Task B).
+
+indicates the number of minutes since the beginning of the recording.
+
+When a user hovers over the thumbnail or scrolls past a video, we expect a textual summary to give a glimpse of the verbal content. This view of summarization leads us to annotate salient content across the video in an equally detailed manner. It naturally avoids lead bias that is ubiquitous in news (Grenander et al., 2019). We segment a video into 5-minute clips and annotate each clip for summary-worthy content. A clip contains an average of 51 utterances and 460 words. Due to time and budget constraints, we select 370 streamed video for summary annotation. Table 1 provides a detailed comparison of our annotated corpus with previous datasets, including Switchboard (Godfrey et al., 1992), ICSI (Janin et al., 2003) and AMI (Carletta et al., 2006) that contain both transcripts and human-annotated ex
+
+| Dataset | Type | Duration | Extr. | Abst. |
| Switchboard | Telephone | 300 Hrs | No† | No |
| ICSI | Meeting | 75 Hrs | Yes | Yes |
| AMI | Meeting | 100 Hrs | Yes | Yes |
| StreamHover | Livestream | 500 Hrs | Yes | Yes |
+
+Table 1: A comparison of the transcript summarization datasets with manually annotated extractive/abstractive summaries. "Yes/No" indicate a summary type is available or not. $\dagger$ suggests only small pilot summary annotations are available for the Switchboard dataset (Penn and Zhu, 2008). With a total duration of over 500 hours, our dataset is notably larger than similar datasets.
+
+tractive/abstractive summaries. With a combined duration of 500 hours, our dataset is substantially larger than previously released datasets.
+
+We recruit 12 workers from Upwork.com and validate their language skills for summary annotation. Upwork is a freelancing platform that allows us to reach out to workers directly to ensure our instructions are fully understood. Each worker is asked to write a concise summary for a given clip using their own words (Task A) and identify summary utterances (Task B) using the graphical user interface (Figure 3), which shows a clip of the streamed video alongside a synchronized display of the transcript. Additionally, our guidelines suggest a good summary of Task A should have at least 100 characters and that of Task B should have between 50 and 80 words ( $\sim 15\%$ compression). As is the case with meeting summaries (Janin et al., 2003), a clip is annotated by a single worker owing to an expensive annotation process. The worker can also identify a clip to be chitchat, in which case it will not be annotated for summaries.
+
+Table 2 shows our dataset statistics. On average, a human abstract contains 3 sentences (36 words) and a human annotated extract contains 5.5 utterances (80 words). Moreover, summary utterances constitute $8.9\%$ and $8.6\%$ of all utterances in terms of number and duration. We study inter-annotator agreement by inviting three workers to each annotate 8 hours of video that contains a total of 96 clips. Using 10-second intervals as measuring units, the Fleiss' Kappa on identifying summary utterances is 0.13. We note that the score is within the range of what is normally found in annotating speech transcripts for extractive summaries $(0.1\sim 0.3)$ ; Marge
+
+| The Bēhance Corpus |
| Total number of annotated videos | 370 |
| Total annotated duration in hours | 500 |
| Total number of utterances | 331,928 |
| Average number of utterances in a clip | 61.23 |
| Average duration of utterances in seconds | 3.04 |
| Average number of words in an utterance | 9.48 |
| Total number of annotated clips | 6,003 |
| Total number of chitchat clips | 582 |
| Total number of human annotators | 12 |
| Avg. # of (sentences) words in a human abstract | (3.0) 36 |
| Avg. # of (utterances) words in a human extract | (5.5) 80 |
| Percentage of duration of summary utterances | 8.57% |
+
+Table 2: Statistics of our dataset.
+
+et al., 2010), as annotating spoken text is a highly challenging task. We find that annotators tend to perceive the same region as salient but they may disagree as to which utterances should be included in the summary due to veracity of spoken text. We refer the reader to (Artstein and Poesio, 2008) for interpretations and improvements to IAA.
+
+# 4 Summarization
+
+Let $\mathcal{X}$ denote a sequence of spoken utterances from a segment of the transcript. Our summarizer aims to extract a subset of utterances $\mathcal{Y} \subset \mathcal{X}$ that convey the essential content of the input. We experiment with an unsupervised summarizer that leverages vector-quantized variational autoencoders (VQVAE; van den Oord et al., 2017) to learn utterance representations and identifies summary utterances. The method was explored for opinion summarization (Angelidis et al., 2021) and machine translation (Prato et al., 2020). We are interested in using the method to account for domain characteristics of livestreams, which showcase new and creative work of artists and designers on their use of Photoshop, Illustrator, and other tools.
+
+VQ-VAE is a powerful framework for learning latent variable models using deep neural networks. It learns discrete vector representations for an utterance, which is then used to categorize the utterance along various dimensions. E.g., "Good morning Hi Everybody" suggests a greeting and opens up a dialogue; "I had probably 3 or 4 different customers on YouTube and ... on Facebook asked me how the heck do you burn an audio CD in Adobe Audition" engages the audience and introduces the
+
+
+Figure 4: Our summarizer embeds an input utterance using BERT, transforms BERT's semantic space to a set of latent codes, then reconstructs the utterance using the code embeddings. We identify summary utterances as those associated with prominent latent codes/topics. The model is trained using a dictionary learning algorithm for code embeddings (E) and backpropagation with a straight-through estimator for model parameters $\theta$ , $\varphi$ and $\phi$ .
+
+main topic. The VQ-VAE method groups utterances based on their discrete representations and selects salient utterances to form a summary.
+
+We employ an embedding function $\mathsf{Embed}_{\theta}(\cdot)$ to map an input utterance $x$ into a semantically meaningful space. The space is subsequently discretized according to a codebook. To achieve this, we prefix $x$ with a [CLS] token and append a [SEP] token, pass it into a BERT model, then obtain the vector corresponding to [CLS] as a pooled representation of the utterance, denoted by $\mathbf{h}\in \mathbb{R}^{H}$ (Eq. (1)). We use a ConvEncoder $\varphi (\cdot)$ with a set of $D$ filters to convolve the input $\mathbf{h}$ . The output is a sequence of feature vectors $[\mathbf{q}_1,\dots ,\mathbf{q}_H]$ where $\mathbf{q}_i\in \mathbb{R}^D$ (Eq. (2)). We define a codebook $\mathbf{E} = [\mathbf{e}_1,\dots ,\mathbf{e}_K]$ , where $K$ is the number of latent codes and $\mathbf{e}_k\in \mathbb{R}^D$ is the $k$ -th code embedding. The $i$ -th feature $\mathbf{q}_i$ is assigned to the latent code $z_{i}$ whose embedding $\mathbf{e}_{z_i}$ has the minimum Euclidean distance with it (Eq. (3)). Our method essentially discretizes the $H$ -dimensional semantic space by producing latent codes $\{z_i\}_{i = 1}^H$ , one for each dimension of the semantic space.
+
+$$
+\mathbf {h} = \operatorname {E m b e d} _ {\theta} (x) \in \mathbb {R} ^ {H} \tag {1}
+$$
+
+$$
+[ \mathbf {q} _ {1}, \dots , \mathbf {q} _ {H} ] = \operatorname {C o n v E n c o d e r} _ {\varphi} (\mathbf {h}), \mathbf {q} _ {i} \in \mathbb {R} ^ {D} \tag {2}
+$$
+
+$$
+z _ {i} = \underset {k} {\arg \max } - \| \mathbf {q} _ {i} - \mathbf {e} _ {k} \| _ {2}, i \in [ H ] \tag {3}
+$$
+
+With the latent code embeddings $[\mathbf{e}_{z_1},\dots ,\mathbf{e}_{z_H}]$ we seek to reconstruct the input utterance, which is achieved by generating a dense vector $\widetilde{\mathbf{h}}$ using a ConvDecoder $\varphi (\cdot)$ (Eq.4)). $\widetilde{\mathbf{h}}$ is then fed to a Transformer decoder to reconstruct the original utterance $\widetilde{x}$ (Eq.5). In this process, the code embeddings serve as "topic vectors" that group dimensions of the semantic space into clusters relevant to the application domain. Our model parameters include those used by the BERT encoder and Transformer decoder $(\theta$ and $\phi$ ), the convolutional encoder and
+
+decoder that use tied parameters $(\varphi)$ , and embeddings of the codebook $\mathbf{E}$ .
+
+$$
+\widetilde {\mathbf {h}} = \operatorname {C o n v D e c o d e r} _ {\varphi} \left(\left[ \mathbf {e} _ {z _ {1}}, \dots , \mathbf {e} _ {z _ {H}} \right]\right) \in \mathbb {R} ^ {H} \tag {4}
+$$
+
+$$
+\widetilde {x} = \operatorname {G e n e r a t e} _ {\phi} (\widetilde {\mathbf {h}}) \tag {5}
+$$
+
+We next describe the loss function used to learn these parameters. The loss function of our model comprises of three parts, including a cross-entropy term between the original and reconstructed utterance $\mathsf{XEnt}(x, \widetilde{x})$ that optimizes the BERT embedder $\theta$ , Transformer generator $\phi$ , and convolutional encoder and decoder $\varphi$ , as shown in Figure 4. The gradients will, however, bypass the latent code embeddings due to the straight-through estimator (Bengio et al., 2013). To learn code embeddings in an end-to-end manner, we use a dictionary learning algorithm (van den Oord et al., 2017) that moves code embeddings $\mathbf{e}_{z_i}$ towards feature vectors $\mathbf{q}_i$ by minimizing the $l_2$ -distance between the two vectors $\| \mathbf{e}_{z_i} - \mathsf{sg}(\mathbf{q}_i) \|_2^2$ , where $\mathsf{sg}(\cdot)$ is a stop-gradient operator that constrains its operand to be a non-updated constant during backpropagation, i.e., it stops $\mathbf{q}_i$ from being updated. As illustrated in Eq. (6), we additionally apply a commitment loss to encourage the feature vector $\mathbf{q}_i$ to commit to a code embedding. $\| \mathsf{sg}(\mathbf{e}_{z_i}) - \mathbf{q}_i \|_2^2$ prevents $\mathbf{q}_i$ from deviating too much from the code embedding $\mathbf{e}_{z_i}$ . This loss term is associated with a coefficient $\beta \in [0,1]$ .
+
+$$
+\begin{array}{l} \mathcal {L} (\theta) = \mathrm {X E n t} (x, \widetilde {x}) + \sum_ {i} \| \mathbf {e} _ {z _ {i}} - \operatorname {s g} (\mathbf {q} _ {i}) \| _ {2} ^ {2} \\ + \beta \sum_ {i} \| \operatorname {s g} \left(\mathbf {e} _ {z _ {i}}\right) - \mathbf {q} _ {i} \| _ {2} ^ {2} \tag {6} \\ \end{array}
+$$
+
+At test time, we define summary utterances as those associated with prominent latent codes/topics. Given a set of $N$ utterances, we obtain latent codes from the $n$ -th utterance using Eq. (3), denoted by $\{z_i^{(n)}\}_{i = 1}^H$ . This gives a total of $N\times H$ codes from which we find prominent ones. They are denoted by
+
+$\mathcal{P}$ which contains a set of most frequently occurring codes. A score $S(x_{n})$ is assigned to utterance $x_{n}$ that computes how often it is associated with those prominent codes $\mathcal{P}$ . In Eq. (7), $\sum_{i=1}^{H} \mathbb{1}[z_i^{(n)} = k]$ indicates the number of times the $n$ -th utterance is assigned to code $k$ , where $k$ belongs to $\mathcal{P}$ . Finally, we extract $K$ highest-scoring utterances to form an extractive summary of the input.
+
+$$
+\mathcal {S} (x _ {n}) = \sum_ {k \in \mathcal {P}} \sum_ {i = 1} ^ {H} \mathbb {1} [ z _ {i} ^ {(n)} = k ] \qquad (7)
+$$
+
+Our method draws on the convolutional encoder and decoder to transform BERT's semantic space to map each dimension to a latent code. The summary selection process is deterministic and our encoder takes full advantage of a large, pre-trained model to produce initial utterance representations. This design sets our method apart from that of Angelidis et al. (2021). Moreover, the method has the potential for modelling topic transitions between utterances to improve summarization of livestreams, which we leave for future work.
+
+# 5 Experiments
+
+Dataset. Finding salient content from livestream transcripts is a "needle-in-the-haystack" problem. Our summarization dataset contains a total of 370 videos split into short clips of 5 minutes each. The annotators manually annotated 5,421 clips ( $\sim$ 451 hours) with extractive and abstractive summaries. 582 clips ( $\sim$ 49 hours) are removed because they are identified to contain only chit-chats. The dataset is divided into training, validation and test splits:
+
+- 3,884 clips (320 videos / 323 hours) in training,
+- 728 clips (25 videos / 61 hours) in validation,
+- 809 clips (25 videos / 67 hours) in test split.
+
+We call our summarizer "StreamHover." When a user hovers their mouse over a video's timeline, a summary preview is shown and keeps updating. As a first attempt, StreamHover focuses on extracting salient utterances from individual clips instead of whole streams to encourage selected utterances to be mostly evenly distributed across the stream. When the content is provided live, the stream can be divided into short clips and our algorithm consumes one clip at a time to produce summaries on-the-fly. It is important to note that extracting summary utterances remains challenging even for modern neural summarizers. E.g., Kedzie et al. (2018) reveal that summarizers may not effectively identify summary content without a dependency on intentional
+
+lead bias in news writing. Our setting is challenging as not only are there few utterances deemed to be summary-worthy but such utterances can occur anywhere in a video clip.
+
+Baselines. We compare StreamHover with state-of-the-art extractive and abstractive summarizers. The abstractive summarizers generate an abstract from the transcript of a clip without tuning. These include BART-large, BART-large-cnn (Lewis et al., 2020) and T5 (Raffel et al., 2020), which are some of the strongest performing neural abstractive summarizers that are pre-trained on language modeling and summarization tasks.
+
+The unsupervised extractive summarizers extract salient utterances from a clip. LexRank (Erkan and Radev, 2004) and TextRank (Mihalcea and Tarau, 2004) are graph-based models that extract relevant sentences based on eigenvector centrality. SumBasic (Vanderwende et al., 2007) assigns higher scores to sentences containing frequently occurring content words. We further compare to a novel unsupervised graph-based summarization method for speech transcripts: FluCovRank (Shang et al., 2018) groups utterances into clusters, generates an abstractive sentence from each cluster, then selects the best elements from abstractive sentences under a budget constraint. Finally, we compare our approach with the Quantized Transformer (Angelidis et al., 2021), which uses a clustering interpretation of the quantized space and two-step sampling algorithm to extract summary sentences from reviews.
+
+Settings. We use pretrained BERT-BASE as our embedder $\mathsf{Embed}_{\theta}(\cdot)$ . The model has 12 layers, 12 heads per layer and a hidden size $(H)$ of 768. A 6-layer Transformer decoder is used as the generator $\mathsf{Generate}_{\phi}(\cdot)$ to reconstruct the original utterance. The model has 8 heads per layer, a hidden size of 768, and randomly initialized parameters. The convolutional encoder and decoder use a kernel size of 3. Because our embedder is pretrained and the remaining parameters are not, we divide them into two groups $\mathcal{E} = \{\theta\}$ and $\mathcal{R} = \{\phi, \varphi\}$ , then apply separate training schedules. Following Liu and Lapata (2019) we use two Adam optimizers:
+
+$$
+\begin{array}{l} l r _ {\mathcal {E}} = \widetilde {l r} _ {\mathcal {E}} \cdot \min (\operatorname {s t e p} ^ {- 0. 5}, \operatorname {s t e p} \cdot \operatorname {w a r m u p} _ {\mathcal {E}} ^ {- 1. 5}), \\ l r _ {\mathcal {R}} = \widetilde {l r} _ {\mathcal {R}} \cdot \min (\operatorname {s t e p} ^ {- 0. 5}, \operatorname {s t e p} \cdot \operatorname {w a r m u p} _ {\mathcal {R}} ^ {- 1. 5}) \\ \end{array}
+$$
+
+where the learning rate for the embedder $\widetilde{lr}_{\varepsilon} = 7e^{-4}$
+
+| System | 3-Sentence Output | 4-Sentence Output | 5-Sentence Output |
| P (%) | R (%) | F (%) | #Wrds | P (%) | R (%) | F (%) | #Wrds | P (%) | R (%) | F (%) | #Wrds |
| LEAD-N | 18.83 | 9.57 | 12.5 | 38.53 | 18.63 | 12.61 | 14.77 | 51.35 | 18.71 | 15.76 | 16.82 | 64.04 |
| SumBasic | 8.32 | 4.15 | 5.45 | 29.44 | 8.47 | 5.61 | 6.63 | 39.97 | 8.83 | 7.44 | 7.92 | 51.54 |
| QuantizedTran | 10.40 | 13.35 | 11.07 | 80.09 | 10.44 | 17.67 | 12.60 | 104.66 | 10.58 | 21.86 | 13.72 | 128.35 |
| LexRank | 23.94 | 12.14 | 15.86 | 59.51 | 23.34 | 15.96 | 18.57 | 77.33 | 23.47 | 20.03 | 21.19 | 94.43 |
| TextRank | 30.45 | 15.37 | 20.10 | 73.35 | 28.18 | 18.92 | 22.24 | 92.46 | 27.00 | 22.59 | 24.17 | 110.42 |
| StreamHover | 36.18 | 18.21 | 23.87 | 88.04 | 34.86 | 23.29 | 27.52 | 113.40 | 33.92 | 28.42 | 30.47 | 137.02 |
+
+Table 3: Classification performance of extractive summarizers on identifying ground-truth summary utterances.
+
+ | System | R-1 | R-2 | R-L | #Wrds |
| Abstract | BART-large | 22.98 | 8.35 | 15.04 | 123.05 |
| BART-large-cnn | 23.03 | 8.03 | 16.62 | 43.13 |
| T5-large | 24.20 | 8.55 | 17.56 | 50.98 |
| FluCovRank | 25.29 | 10.93 | 16.28 | 50.00 |
| Extract | LEAD-5 | 24.65 | 9.54 | 17.59 | 64.04 |
| SumBasic | 23.15 | 5.57 | 14.76 | 51.54 |
| QuantizedTran | 23.90 | 7.90 | 15.37 | 128.35 |
| LexRank | 26.14 | 10.18 | 18.24 | 94.43 |
| TextRank | 25.94 | 11.44 | 18.89 | 110.42 |
| StreamHover | 25.62 | 12.70 | 19.33 | 137.02 |
| Oracle (Extract) | 43.42 | 30.58 | 37.99 | 110.51 |
+
+Table 4: Results of extractive and abstractive summarizers evaluated by ROUGE. Extractive summarizers generate a 5-utterance summary for each clip. Oracle contains ground-truth summary utterances. StreamHover achieves the highest scores on R-2 and R-L.
+
+ | System | Fluency | Informa. | Overall |
| Human | FluCovRank | -0.95 | -0.93 | -0.97 |
| LexRank | 0.25 | 0.11 | 0.17 |
| BART-large | 0.28 | 0.31 | 0.28 |
| StreamHover | 0.42 | 0.52 | 0.52 |
+
+Table 5: Results of human evaluation regarding fluency, informativeness and the overall quality of system summaries using Best-Worst Scaling.
+
+is smaller than that of the rest params $\widetilde{lr}_{\mathcal{R}} = 4e^{-2}$ . Its warmup period is longer: $\mathrm{warmup}_{\mathcal{E}} = 3,000$ for the embedder and $\mathrm{warmup}_{\mathcal{R}} = 1,500$ for the rest. It allows the pretrained embedder to be updated in a slower pace until other model parameters start to generate accurate gradients.
+
+All of our models are trained for 30 epochs on dual NVIDIA V100 GPUs with gradient accumulation every ten steps. We experiment with different numbers of filters, $D = \{64, \underline{100}, 128\}$ , for the convolutional encoder and decoder. The number of latent codes are varied in $K = \{512, \underline{1024}, 2048\}$ . The coefficient $\beta$ used for commitment loss is set to 0.25 (Eq. (6)). These hyperparameters are tuned on the validation set. We keep only utterances that contain $>5$ words in consideration. The final training set contains 168,111 utterances.
+
+
+Figure 5: The proportion of times a system is selected as the "Best." FluCovRank is omitted as it is $< 1\%$ .
+
+# 5.1 Results
+
+In Table 3, we analyze the performance of extractive summarizers on identifying ground-truth summary utterances and report their precision, recall and $F_{1}$ -measure scores. We vary the length of their output to yield {3, 4, 5}-utterance summaries. In comparison, a ground-truth extract contains 5.5 utterances. The Lead-N baseline selects the first N utterances of a clip. It gives low scores because our data do not present strong lead bias as that of news articles. We find that StreamHover consistently outperforms other summarization systems across all lengths. Its length, when measured by number of words, is comparable to that of LexRank and TextRank. The highest $F_{1}$ score of $30.47\%$ is achieved when StreamHover generates a 5-utterance summary for each 5-minute clip. This amounts to rendering one utterance per one-minute segment when a user scrolls past the video.
+
+In Table 4, we compare extractive and abstractive summarizers and report ROUGE scores (Lin, 2004) that measure content overlap between system and reference summaries. We use human abstracts as the reference. All extractive summarizers produce 5-utterance summaries and Oracle Extract contains ground-truth utterances. It places an upper bound on the performance of extractive summarizers. We observe that StreamHover yields the highest scores on both R-2 and R-L metrics.
+
+# FluCovRank
+
+- top left bottom / cloud studies today / find links to their original posts / hey jennifer saw the images / love the top left and bottom / info tab and i uploaded / colors are beautiful but im partial through colorful sky scenes / pretty large about 4000 by 4000 pixels / photo studies of today / moment
+
+# LexRank
+
+- I hope you guys are having a good day so far.
+- So I'm going to be painting from these images and these beautiful photos are from various photographers.
+- Those yeah well top right also is like very Contra high contrast that tends to like grab my attention when I look at the sheet but I would say top left and bottom right give me the most like happy feels.
+- So yeah, if you guys want to grab the reference images, you can find them in the stream description below the individual images...
+
+# BART-Large
+
+- Hello good morning everybody welcome to the stream. I hope you guys are having a good day so far. Is there a lot of buffering or are we doing alright? I got a little message that there was some connectivity issue. For a moment there, so I hope I hope it's OK. Yeah, I'll just keep going. So yeah, if you guys want to grab the reference images, you can find them in the stream description below the individual images...
+
+# Quantized Transformer
+
+- Good to see you were going to be doing cloud studies today.
+- The stream in the description.
+- One of them is from Morguefile, One is from unsplash, well, two are from Unsplash and one is from pixels there a little bit from all over the place, but you can find the photographers below if you'd like.
+- Hey Jennifer, saw the images.
+- Let's see top left, bottom right...
+
+# StreamHover (Ours)
+
+- So if anybody is interested in joining in, if you want to work on some skies for your landscapes for future landscapes, this is what we're going to be doing.
+- One of them is from Morguefile, One is from unsplash, well, two are from Unsplash and one is from pixels there a little bit from all over the place, but you can find the photographers below if you'd like.
+- Those yeah well top right also is like very Contra high contrast that tends to like grab my attention when I look at the sheet but I would say top left and bottom right give me the most like happy feels.
+
+- So yeah, if you guys want to grab the reference images, you can find them in the stream description below the individual images...
+
+Table 6: Example system summaries for Digital Painting Studies with Maddy Bellwoar-Clouds. The BART summary is fluent but its content lacks specificity, as is the case for LexRank. The summary segments selected by FluCovRank are ungrammatical. StreamHover identifies on-topic and informative utterances related to digital painting. Their relevant spans of text are manually underlined for readability.
+
+We show example system summaries in Table 6. The abstractive summaries generated by BARTLarge are fluent but their content lacks specificity, so are the summaries produced by LexRank and Quantized Transformer. Particularly, QT does not seem to perform well on this task despite that the model has been retrained on livestream transcripts. We believe this is partly because words and phrases tend to repeat themselves in review documents, and while spoken utterances are verbose, there is little repetition found in the transcripts. We observe that summary segments selected by FluCovRank are ontopic but they are ungrammatical and difficult to
+
+# Utterances
+
+# C1 C2 C3
+
+0 Hello good morning everybody welcome high foster highly art.
+
+# 1 Hi Lisa, welcome everyone.
+
+2 I hope you guys are having a good day so far.
+3 Good to see you were going to be doing cloud studies today.
+4 So if anybody is interested in joining in, if you want to work on some skies for your landscapes for future landscapes, this is what we're going to be doing.
+
+# 5 Photo studies of today.
+
+6 So I'm going to be painting from these images and these beautiful photos are from various photographers.
+
+7 You can find links to their original posts below.
+
+8 The stream in the description.
+
+9 One of them is from Morguefile, One is from unsplash, well, two are from Unsplash and one is from pixels there a little bit from all over the place, but you can find the photographers below if you'd like.
+
+0 Hey Jennifer, saw the images.
+
+1 I really love the top left and bottom right.
+
+2 The colors are beautiful but I'm partial through colorful Sky scenes.
+
+# 3 Yeah, I totally agree.
+
+4 Let's see top left, bottom right.
+5 Those yeah well top right also is like very Contra high contrast that tends to like grab my attention when I look at the sheet but I would say top left and bottom right give me the most like happy feels.
+
+Table 7: A snippet from Digital Painting Studies with Maddy Bellwoar-Clouds. We show the most prominent latent codes and their representative utterances ('X'). Human annotated summary utterances are colored gray and ultra-short utterances are crossed out.
+
+interpret without context. In contrast, StreamHover can identify on-topic and informative utterances related to digital painting. We provide more examples in the supplementary materials.
+
+In Table 7, we study the most prominent latent codes (C1-3) and their associated utterances. We define representative utterances as those frequently assigned to these codes (Eq. (3)). We observe that C1 usually contains a skewed number of utterances that are commonly seen in the data and not representative of the input; C2 contains lengthy but not necessarily summary-worthy utterances. In our experiments, we exclude C1/C2 before performing grid search on all codes to find the set of prominent codes: we use $\mathcal{P} = 50$ tuned on the valid set which is effective in helping identify summary utterances.[9]
+
+We conduct a human evaluation to assess how StreamHover compares to strong extractive and abstractive baselines. They are (a) LexRank (Erkan and Radev, 2004), (b) FluCovRank (Shang et al., 2018) and (c) BART-Large (Lewis et al., 2020); the latter two are abstractive systems. Each evaluator is shown a video clip with a synchronized display of the transcript followed by four system summaries, shown in random order to remove any positional
+
+bias. The evaluator is asked to select the best and worst of the summaries according to each of these criteria: Fluency/Coherence: is the summary well-presented, grammatically correct and easy to read? Informativeness: does the summary provide useful information about the video clip? Overall Quality: is the summary of good quality considering both content and linguistic aspects?
+
+We randomly sample 100 clips from the test set. Each clip and its summaries are judged by five evaluators that we recruit from Amazon mechanical turk. Table 5 shows the performance of all systems measured by Best-Worst Scaling (Kiritchenko and Mohammad, 2016), where the score of a system is computed as the percentage of times it was selected as the best minus the worst. The range of scores is [-1,1]. Figure 5 shows how frequently a system is chosen to produce the "best summary." We observe that StreamHover achieves an overall score of 0.52 and it is selected as the best summary in over half of the times.
+
+# 6 Conclusion
+
+We present StreamHover, a new framework for annotating and summarizing livestream transcripts. Our dataset contains over 500 hours of videos annotated with extractive and abstractive summaries. We explored an extractive method leveraging VQVAE to identify salient summary utterances and obtained strong results. Future work includes boosting summarization solutions to provide users a concentrated overview of streamed content.
+
+# References
+
+Stefanos Angelidis, Reinald Kim Amplayo, Yoshihiko Suhara, Xiaolan Wang, and Mirella Lapata. 2021. Extractive opinion summarization in quantized transformer spaces. Transactions of the Association for Computational Linguistics (TACL).
+Ron Artstein and Massimo Poesio. 2008. Survey article: Inter-coder agreement for computational linguistics. Computational Linguistics.
+Iz Beltagy, Matthew E. Peters, and Arman Cohan. 2020. Longformer: The long-document transformer.
+Yoshua Bengio, Nicholas Léonard, and Aaron Courville. 2013. Estimating or propagating gradients through stochastic neurons for conditional computation.
+
+Levent Besik. 2020. Google named a leader in the Gartner 2020 magic quadrant for cloud AI developer services. In https://cloud.google.com/blog/products/ai-machine-learning/google-named-leader-gartner-2020-magic-quadrant-cloud-ai-developer-services.
+Arthur Bražinskas, Mirella Lapata, and Ivan Titov. 2020. Few-shot learning for opinion summarization. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4119-4135, Online. Association for Computational Linguistics.
+Ziqiang Cao, Furu Wei, Wenjie Li, and Sujian Li. 2017. Faithful to the original: Fact aware neural abstractive summarization. CoRR, abs/1711.04434.
+Jean Carletta, Simone Ashby, Sebastien Bourban, Mike Flynn, Mael Guillemot, Thomas Hain, Jaroslav Kadlec, Vasilis Karaiskos, Wessel Kraaij, Melissa Kronenthal, Guillaume Lathoud, Mike Lincoln, Agnes Lisowska, Iain McCowan, Wilfried Post, Dennis Reidsma, and Pierre Wellner. 2006. The ami meeting corpus: A pre-announcement. In Machine Learning for Multimodal Interaction, pages 28-39, Berlin, Heidelberg. Springer Berlin Heidelberg.
+Mingda Chen, Zewei Chu, Sam Wiseman, and Kevin Gimpel. 2021. Summscreen: A dataset for abstractive screenplay summarization. CoRR, abs/2104.07091.
+Yen-Chun Chen and Mohit Bansal. 2018. Fast abstractive summarization with reinforce-selected sentence rewriting. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 675-686, Melbourne, Australia. Association for Computational Linguistics.
+Arman Cohan, Franck Dernoncourt, Doo Soon Kim, Trung Bui, Seokhwan Kim, Walter Chang, and Nazli Goharian. 2018. A discourse-aware attention model for abstractive summarization of long documents. 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 615-621, New Orleans, Louisiana. Association for Computational Linguistics.
+Yue Dong, Yikang Shen, Eric Crawford, Herke van Hoof, and Jackie Chi Kit Cheung. 2018. BanditSum: Extractive summarization as a contextual bandit. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3739-3748, Brussels, Belgium. Association for Computational Linguistics.
+Günes Erkan and Dragomir R. Radev. 2004. LexRank: Graph-based lexical centrality as salience in text summarization. Journal of Artificial Intelligence Research.
+
+Alexander Fabbri, Irene Li, Tianwei She, Suyi Li, and Dragomir Radev. 2019. Multi-news: A large-scale multi-document summarization dataset and abstractive hierarchical model. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1074-1084, Florence, Italy. Association for Computational Linguistics.
+Sebastian Gehrmann, Yuntian Deng, and Alexander Rush. 2018. Bottom-up abstractive summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4098-4109, Brussels, Belgium. Association for Computational Linguistics.
+J. J. Godfrey, E. C. Holliman, and J. McDaniel. 1992. Switchboard: telephone speech corpus for research and development. In [Proceedings] ICASSP-92: 1992 IEEE International Conference on Acoustics, Speech, and Signal Processing, volume 1, pages 517-520 vol.1.
+Matt Grenander, Yue Dong, Jackie Chi Kit Cheung, and Annie Louis. 2019. Countering the effects of lead bias in news summarization via multi-stage training and auxiliary losses. 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 6019-6024, Hong Kong, China. Association for Computational Linguistics.
+François Hernandez, Vincent Nguyen, Sahar Ghannay, Natalia Tomashenko, and Yannick Esteve. 2018. Ted-lium 3: Twice as much data and corpus repartition for experiments on speaker adaptation. Lecture Notes in Computer Science, page 198-208.
+A. Janin, D. Baron, J. Edwards, D. Ellis, D. Gelbart, N. Morgan, B. Peskin, T. Pfau, E. Shriberg, A. Stolcke, and C. Wooters. 2003. The icsi meeting corpus. In 2003 IEEE International Conference on Acoustics, Speech, and Signal Processing, 2003. Proceedings (ICASSP '03), volume 1, pages I-I.
+Shuning Jin, Sam Wiseman, Karl Stratos, and Karen Livescu. 2020. Discrete latent variable representations for low-resource text classification. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4831-4842, Online. Association for Computational Linguistics.
+Sushant Kafle and Matt Huenerfauth. 2018. A corpus for modeling word importance in spoken dialogue transcripts. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018), Miyazaki, Japan. European Language Resources Association (ELRA).
+Chris Kedzie, Kathleen McKeown, and Hal Daume III. 2018. Content selection in deep learning models of summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1818-1828, Brussels, Belgium. Association for Computational Linguistics.
+
+Svetlana Kiritchenko and Saif M. Mohammad. 2016. Capturing reliable fine-grained sentiment associations by crowdsourcing and best-worst scaling. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 811-817, San Diego, California. Association for Computational Linguistics.
+Jia Jin Koay, Alexander Roustai, Xiaojin Dai, Dillon Burns, Alec Kerrigan, and Fei Liu. 2020. How domain terminology affects meeting summarization performance. In Proceedings of the 28th International Conference on Computational Linguistics, pages 5689-5695, Barcelona, Spain (Online). International Committee on Computational Linguistics.
+Jia Jin Koay, Alexander Roustai, Xiaojin Dai, and Fei Liu. 2021. A sliding-window approach to automatic creation of meeting minutes. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Student Research Workshop, pages 68-75, Online.
+Wojciech Kryscinski, Nitish Shirish Keskar, Bryan McCann, Caiming Xiong, and Richard Socher. 2019. Neural text summarization: A critical evaluation. 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 540-551, Hong Kong, China. Association for Computational Linguistics.
+Faisal Ladhak, Bryan Li, Yaser Al-Onaizan, and Kathleen McKeown. 2020. Exploring content selection in summarization of novel chapters. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5043-5054, Online. Association for Computational Linguistics.
+Logan Lebanoff, John Muchovej, Franck Dernoncourt, Doo Soon Kim, Seokhwan Kim, Walter Chang, and Fei Liu. 2019. Analyzing sentence fusion in abstractive summarization. In Proceedings of the 2nd Workshop on New Frontiers in Summarization, pages 104-110, Hong Kong, China. Association for Computational Linguistics.
+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, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880, Online. Association for Computational Linguistics.
+Bohan Li, Junxian He, Graham Neubig, Taylor Berg-Kirkpatrick, and Yiming Yang. 2019a. A surprisingly effective fix for deep latent variable modeling of text. 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 3603-3614, Hong Kong, China. Association for Computational Linguistics.
+Manling Li, Lingyu Zhang, Heng Ji, and Richard J. Radke. 2019b. Keep meeting summaries on topic: Abstractive multi-modal meeting summarization. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2190-2196, Florence, Italy. Association for Computational Linguistics.
+Mingzhe Li, Xiuying Chen, Shen Gao, Zhangming Chan, Dongyan Zhao, and Rui Yan. 2020. VMSMO: Learning to generate multimodal summary for videobased news articles. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 9360-9369, Online. Association for Computational Linguistics.
+Chin-Yew Lin. 2004. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out, pages 74-81, Barcelona, Spain. Association for Computational Linguistics.
+Feifan Liu and Yang Liu. 2008. Correlation between ROUGE and human evaluation of extractive meeting summaries. In Proceedings of ACL-08: HLT, Short Papers, pages 201-204, Columbus, Ohio. Association for Computational Linguistics.
+Yang Liu and Mirella Lapata. 2019. Text summarization with pretrained encoders. 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 3730-3740, Hong Kong, China. Association for Computational Linguistics.
+Matthew Marge, Satanjeev Banerjee, and Alexander Rudnicky. 2010. Using the Amazon Mechanical Turk to transcribe and annotate meeting speech for extractive summarization. In Proceedings of the NAACL HLT 2010 Workshop on Creating Speech and Language Data with Amazon's Mechanical Turk, pages 99-107, Los Angeles. Association for Computational Linguistics.
+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.
+Rada Mihalcea and Paul Tarau. 2004. TextRank: Bringing order into text. In Proceedings of the 2004 Conference on Empirical Methods in Natural Language Processing, pages 404-411, Barcelona, Spain. Association for Computational Linguistics.
+Gabriel Murray and Giuseppe Carenini. 2008. Summarizing spoken and written conversations. In Proceedings of the 2008 Conference on Empirical Meth
+
+ods in Natural Language Processing, pages 773-782, Honolulu, Hawaii. Association for Computational Linguistics.
+Shashi Narayan, Shay B. Cohen, and Mirella Lapata. 2018a. 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, Brussels, Belgium. Association for Computational Linguistics.
+Shashi Narayan, Shay B. Cohen, and Mirella Lapata. 2018b. Ranking sentences for extractive summarization with reinforcement learning. 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 1747-1759, New Orleans, Louisiana. Association for Computational Linguistics.
+Shruti Palaskar, Jindrich Libovický, Spandana Gella, and Florian Metze. 2019. Multimodal abstractive summarization for how2 videos. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6587-6596, Florence, Italy. Association for Computational Linguistics.
+Pinelopi Papalampidi, Frank Keller, Lea Frermann, and Mirella Lapata. 2020. Screenplay summarization using latent narrative structure. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1920-1933, Online. Association for Computational Linguistics.
+Gerald Penn and Xiaodan Zhu. 2008. A critical reassessment of evaluation baselines for speech summarization. In Proceedings of ACL-08: HLT, pages 470-478, Columbus, Ohio. Association for Computational Linguistics.
+Gabriele Prato, Ella Charlaix, and Mehdi Rezagholizadeh. 2020. Fully quantized transformer for machine translation. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 1-14, Online. Association for Computational Linguistics.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
+Abigail See, Peter J. Liu, and Christopher D. Manning. 2017. Get to the point: Summarization with pointer-generator networks. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1073-1083, Vancouver, Canada. Association for Computational Linguistics.
+Thibault Sellam, Dipanjan Das, and Ankur Parikh. 2020. BLEURT: Learning robust metrics for text
+
+generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7881-7892, Online. Association for Computational Linguistics.
+Guokan Shang, Wensi Ding, Zekun Zhang, Antoine Tixier, Polykarpos Meladianos, Michalis Vazirgiannis, and Jean-Pierre Lorre. 2018. Unsupervised abstractive meeting summarization with multisentence compression and budgeted submodular maximization. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 664-674, Melbourne, Australia. Association for Computational Linguistics.
+Kaiqiang Song, Bingqing Wang, Zhe Feng, and Fei Liu. 2021. A new approach to overgenerating and scoring abstractive summaries. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1392-1404, Online.
+Jiwei Tan, Xiaojun Wan, and Jianguo Xiao. 2017. Abstractive document summarization with a graph-based attentional neural model. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1171-1181, Vancouver, Canada. Association for Computational Linguistics.
+Aaron van den Oord, Oriol Vinyals, and koray kavukcuoglu. 2017. Neural discrete representation learning. In Advances in Neural Information Processing Systems, volume 30, pages 6306-6315. Curran Associates, Inc.
+Lucy Vanderwende, Hisami Suzuki, Chris Brockett, and Ani Nenkova. 2007. Beyond SumBasic: Task-focused summarization with sentence simplification and lexical expansion. Information Processing and Management, 43(6):1606-1618.
+Danqing Wang, Pengfei Liu, Yining Zheng, Xipeng Qiu, and Xuanjing Huang. 2020. Heterogeneous graph neural networks for extractive document summarization. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6209-6219, Online. Association for Computational Linguistics.
+Lu Wang and Claire Cardie. 2013. Domain-independent abstract generation for focused meeting summarization. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics, pages 1395-1405, Sofia, Bulgaria.
+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 M. 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.
+Wen Xiao and Giuseppe Carenini. 2019. Extractive summarization of long documents by combining global and local context. 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 3011-3021, Hong Kong, China. Association for Computational Linguistics.
+Jiacheng Xu and Greg Durrett. 2019. Neural extractive text summarization with syntactic compression. 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 3292-3303, Hong Kong, China. Association for Computational Linguistics.
+Michihiro Yasunaga, Rui Zhang, Kshitijh Meelu, Ayush Pareek, Krishnan Srinivasan, and Dragomir Radev. 2017. Graph-based neural multi-document summarization. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), pages 452-462, Vancouver, Canada. Association for Computational Linguistics.
+Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. 2020. *Bertscore: Evaluating text generation with bert*.
+Chen Zhao, Chenyan Xiong, Corby Rosset, Xia Song, Paul Bennett, and Saurabh Tiwary. 2020. Transformer-xh: Multi-evidence reasoning with extra hop attention. In International Conference on Learning Representations.
+Ming Zhong, Da Yin, Tao Yu, Ahmad Zaidi, Mutethia Mutuma, Rahul Jha, Ahmed Hassan Awadallah, Asli Celikyilmaz, Yang Liu, Xipeng Qiu, and Dragomir Radev. 2021. QMSum: A new benchmark for query-based multi-domain meeting summarization. In Proceedings of the North American Chapter of the Association for Computational Linguistics (NAACL).
+Chenguang Zhu, Yang Liu, Jie Mei, and Michael Zeng. 2021. MediaSum: A large-scale media interview dataset for dialogue summarization. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5927-5934, Online.
+Junnan Zhu, Haoran Li, Tianshang Liu, Yu Zhou, Ji-jun Zhang, and Chengqing Zong. 2018. MSMO: Multimodal summarization with multimodal output. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4154-4164, Brussels, Belgium. Association for Computational Linguistics.
+
+# A Behance Dataset
+
+We collect a total of 5,398 streamed videos from *Behance*. net. Some streamers opt-out of the transcription service provided by Microsoft Automatic Speech Recognition, so transcripts are not available for these videos. We create a list of domain keywords by finding 50 most frequently appearing words from video titles (stopwords are excluded). Examples include 'fresco', 'adobe', 'photoshop', 'illustration', 'art', 'painting', 'drawing', 'illustrator', 'character', 'design.' The keywords are used to select videos for human annotation. 2,360 videos have transcripts available and contain at least one of our domain keywords in their titles. These videos are split into clips of 5-minute each. Some clips contain little or no verbal content. We thus remove clips that contain very few words ( $\leq$ 333 words) or utterances ( $\leq$ 38 utterances). These thresholds are determined using the average values of all clips. Videos with less than 5 valid clips are also removed from consideration. This preprocessing step gives 6,003 clips from 381 videos. During annotation, our annotators find 582 clips to contain only chitchats, suggesting that these clips are uninformative. 11 videos contain only chit-chat clips, they are subsequently removed from the dataset, yielding a total of 5,421 clips from 370 videos that are split into train, validation and test sets.
+
+# B Baseline Summarizers
+
+Our neural abstractive baselines include pre-trained BART-large (Lewis et al., 2020), BART-large-cnn, and T5-large (Raffel et al., 2020). We follow the HuggingFace implementation (Wolf et al., 2020). Utterances that are longer than 5 words are concatenated into a flat sequence, which is used as the input to each summarizer. The model parameters include: the maximum and minimum summary lengths are 150 and 15 tokens, respectively. We use a beam size of 5 with early stopping. The length penalty is 1.0. "norepeat_ngram_size" is set to 3, such that a trigram cannot occur more than once in the summary.
+
+Our extractive baselines include LexRank (Erkan and Radev, 2004), TextRank (Mihalcea and Tauru, 2004), and SumBasic (Vanderwende et al., 2007). They are implemented using the Sumy library where we adopt the default text parser and stemmer. Our unsupervised summarizer for speech transcript summarization (Shang et al., 2018) uses the following settings: we report the FluCovRank
+
+scores. The number of components used in LSA is 25. The number of utterance communities is 35. The number of clusters is 6, with a scaling factor of 1.3 and lambda of 0.4. The size of the summary is set to 50 words.
+
+# C Example Summaries
+
+We show example summaries generated by different summarizers: FluConvRank (Shang et al., 2018), LexRank (Erkan and Radev, 2004), BARTlarge (Lewis et al., 2020) and StreamHover. We also show the top-3 most prominent latent codes and their associated utterances. We choose 5 representative utterances for each code that are most frequently assigned to this code. We observe that C1 utterances are frequently seen in the data (chitchats) and not representative of the input. C2 is associated with lengthy but not necessarily summary-worthy utterances. C3 utterances are both comprehensive and contain diverse information. In our experiments, we exclude C1/C2 before performing grid search on all codes to find the set of prominent codes. It allows us to effectively identify summary utterances without biasing towards the lengthy ones.
+
+# FluCovRank
+
+- digital painting today / 3 hours minimum / explain my painting process / starbucks florida cup / really really cheerful scene / prob hey welcome hi kumar / canvas sizes 3000 by 2000 pixels / sore throat so todays stream might be a tiny bit shorter / otherwise just sit back and relax and enjoy the painting / find
+
+# LexRank
+
+- If you guys are interested in painting along with me or doing a little sketch or whatever, you have time for your always welcome to my reference.
+- Is what I have planned to work on this if I'm feeling good, we might go on or do another painting, but I'm drinking some tea with honey and I have to kind of be careful with my voice a little bit talking so much, but I'm otherwise I'm good.
+- So again, that's where you can find my references below in the stream description.
+- You guys are welcome to paint along if you're interested in doing that.
+- I've lived in a few different states, but where I spent most of my life was in Florida so.
+
+# BART-Large
+
+- Good afternoon, good evening, good morning, good day, good afternoon, how are you? Good morning, hi Mohammed, hi kumar, hi muhammad, hi hi kumar, hi hello hi hi Mohammed. I hope you've had a good day so far. I'm doing pretty good pro to be honest. I have a little bit of a sore throat, so today's stream might be a tiny bit shorter than some of the others. It's still going to be around 3 hours minimum. Is what I have planned to work on this if I'm feeling good, we might go on or do another painting, but I'm drinking some tea with honey and I have to kind of
+
+# Quantized Transformer
+
+- We're going to be doing some digital painting today.
+- As usual, I'm going to be working from this photo as a reference.
+- I hope you're all doing well.
+- Image is below in the stream description and above the chat.
+- It's still going to be around 3 hours minimum.
+- Is what I have planned to work on this if I'm feeling good, we might go on or do another painting, but I'm drinking some tea with honey and I have to kind of be careful with my voice a little bit talking so much, but I'm otherwise I'm good.
+Um prob hey welcome Hi Kumar.
+- You guys are welcome to paint along if you're interested in doing that.
+I hope it's going to be good.
+- My canvas sizes 3000 by 2000 pixels.
+
+# StreamHover (Ours)
+
+- It's like a little cafe table in Spain, with some dappled lighting coming through these trees.
+- I really like the pattern of light on the building over here, and the just overall feeling the different colors.
+- If you guys are interested in painting along with me or doing a little sketch or whatever, you have time for your always welcome to my reference.
+- Is what I have planned to work on this if I'm feeling good, we might go on or do another painting, but I'm drinking some tea with honey and I have to kind of be careful with my voice a little bit talking so much, but I'm otherwise I'm good.
+- I am using pure ref to put the little reference image up here so we can see a thumbnail view of it while we're painting.
+
+Table 8: Example system summaries from Digital Painting with Maddy Bellwoar. BART summary is fluent but its content lacks specificity, as is the case for LexRank. Summary segments selected by FluCovRank are ungrammatical. StreamHover identifies on-topic and informative utterances related to digital painting.
+
+# Utterances
+
+# C1 C2 C3
+
+0 Hi-everybody, good morning.
+
+1 Good afternoon, good evening whatever time it is for you.
+2. Thanks for being here.
+
+3 Hi Fernando Allison, Welcome.
+
+4 I hope you've had a good day so far.
+
+5 I hope you've all been well.
+
+6 If I haven't seen you since last week, I hope you had a good weekend.
+
+7 We're going to be doing some digital painting today.
+
+8 As usual, I'm going to be working from this photo as a reference.
+
+9 I think it's really beautiful.
+
+0 It's like a little cafe table in Spain, with some dappled lighting coming through these trees.
+
+1 I really like the pattern of light on the building over here, and the just overall feeling the different colors.
+
+2 the Blues and pinks and yellows on the wall here.
+
+3 It's really, really cheerful scene.
+
+4 Hi Mohammed, high pro, how are you?
+
+5 I hope you're all doing well.
+
+6 If you guys are interested in painting along with me or doing a little sketch or whatever, you have time for your always welcome to my reference.
+
+7 Image is below in the stream description and above the chat.
+
+8 Also, if you check the info panel it should be there as well so this photo is from Unsplash.
+
+9 You can find a link to the original post from the photographer below.
+
+# 20 The stream.
+
+21 I'm doing pretty good pro to be honest.
+
+22 I have a little bit of a sore throat, so today's stream might be a tiny bit shorter than some of the others.
+
+23 It's still going to be around 3 hours minimum.
+
+24 Is what I have planned to work on this if I'm feeling good, we might go on or do another painting, but I'm drinking some tea with honey and I have to kind of be careful with my voice a little bit talking so much, but I'm otherwise I'm good.
+
+25 Um prob hey welcome Hi Kumar.
+
+26 So again, that's where you can find my references below in the stream description.
+
+27 You guys are welcome to paint along if you're interested in doing that.
+
+28 Otherwise, just sit back and relax and enjoy the painting.
+
+29 I'll try to do a nice job with this one.
+
+30 I hope it's going to be good.
+
+31 I really like the reference so.
+
+# 32 Hi Dante.
+
+33 So I'm going to explain my painting process as we go through here.
+34 And if you guys have any questions you can let me know.
+35 I am using pure ref to put the little reference image up here so we can see a thumbnail view of it while we're painting.
+36 My canvas sizes 3000 by 2000 pixels.
+37 If you're curious.
+38 Yes, I'm using a different Cup today.
+39 This is my Starbucks Florida Cup.
+40 Maybe more information than you need, but yeah, so I'm I grew up in Florida.
+I've lived in a few different states, but where I spent most of my life was in Florida so.
+42 I don't live there now.
+
+Table 9: A transcript snippet from Digital Painting with Maddy Bellwoar. We show the most prominent latent codes and their representative utterances ('X'). Human annotated summary utterances are colored gray and ultra-short utterances are crossed out.
+
+# FluCovRank
+
+- view is created by them stitching images / maps years was a fitness studio yeah / image stitching just has some weird that happens team / oh if you want to share a link for map crunch / leave so weird parts / hope achieve that feeling of the water is really moving / yeah its
+
+# LexRank
+
+- So I'm going to start to work on the foreground now and this is going to be tricky, so this is one of the things that made me choose to paint this reference.
+- The rushing water in the foreground kind of coming towards us and the ripples that it creates an the little bubbles and all that kind of stuff.
+- Sometimes the image stitching just has some weird stuff that happens, Oh team.
+- Oh, if you want to share a link for map crunch.
+- Alright that should work this time.
+
+# BART-Large
+
+- Trying to figure out those relationships near the end or like when you're trying to like if you're going to try to get the one or like if the one is like if I'm working on the one I'm going to do it's like if it's not working. I'm ready for some dog like with half his body has been overlapped by a boat. Yeah, it's always really satisfying the color combination in these kind of desert scenes, the nice blue Sky and like the Warm Reds and oranges. It's like you get the extra bonus of like some purple thrown in there and that's just perfect. You know, I've seen people like riding camels and stuff, he's taking pictures
+
+# Quantized Transformer
+
+- So I hope I can achieve that feeling of the water is really moving there.
+- You have to click the share button and then copy the link that is there if you copy the link from the URL above it's not going to send the right image.
+- So what you can do is click right here where it says share and then copy this.
+- OK, so these so right now, I'm just going to start with a darker shadows.
+- Of where I see the ripples.
+- Alright that should work this time.
+- You know where some of the really, really fantastic ones come from.
+- But people will be on the boat on foot.
+- Maps years was a fitness studio, yeah, there's all kinds of stuff.
+I've painted with references with stuff like that.
+
+# StreamHover (Ours)
+
+- So I'm going to start to work on the foreground now and this is going to be tricky, so this is one of the things that made me choose to paint this reference.
+- The rushing water in the foreground kind of coming towards us and the ripples that it creates an the little bubbles and all that kind of stuff.
+- Yeah, it's always really satisfying the color combination in these kind of desert scenes, the nice blue Sky and like the Warm Reds and oranges.
+
+- I'm ready for some dog like with half his body has been overlapped by a boat.
+- People are in a car traveling there, you get a lot of side of the road like kind of bland images, but then you also get like the most amazing pictures and people also upload images and stuff, I think that might be.
+
+Table 10: Example system summaries from Virtual Plein Air Landscape Painting. The BART summary is fluent but its content lacks specificity, as is the case for LexRank. The summary segments selected by FluCovRank are ungrammatical. StreamHover identifies on-topic and informative summary utterances.
+
+# Utterances
+
+# C1 C2 C3
+
+0 Trying to figure out those relationships near the end or like force them if they're not working.
+1 So I'm going to start to work on the foreground now and this is going to be tricky, so this is one of the things that made me choose to paint this reference.
+2 'cause I wanted to figure out how to paint this kind of situa- tion.
+3 The rushing water in the foreground kind of coming towards us and the ripples that it creates an the little bubbles and all that kind of stuff.
+4 So I hope I can achieve that feeling of the water is really $\square$ $\square$ $\square$ moving there.
+5 Might give some inspiration alright let's see got an artstation $\square$ $\square$ $\square$ link.
+6 Oh, cool. 7 Good- vibes good vibes.
+8 Other desert desert scene. $\square$ $\square$ $\square$
+9 Yeah, it's always really satisfying the color combination in these kind of desert scenes, the nice blue Sky and like the Warm Reds and oranges.
+10 I like the one I'm working on 2 'cause.
+It's like you get the extra bonus of like some purple thrown in there and that's just perfect.
+12 For me. 13 Yeah, that's cool thanks.
+14 Team I says, I was looking for a nice location on map French and I found this alright.
+15 I'm ready for some dog like with half his body has been overlapped by a boat.
+16 Sometimes the image stitching just has some weird stuff that happens, Oh team.
+17 Oh, if you want to share a link for map crunch.
+18 You have to click the share button and then copy the link
+that is there if you copy the link from the URL above it's not going to send the right image.
+19 So what you can do is click right here where it says share $\square$ $\square$ $\square$ and then copy this.
+20 And then that will be the right one, 'cause I think it sent the wrong one from you.
+21 Yeah. 22 Alright cool.
+23 Will get back to painting?
+24 OK, so these so right now, I'm just going to start with a $\square$ $\square$ $\square$ darker shadows.
+25 Of where I see the ripples.
+26 I'm not worried about putting like every ripple in the right spot.
+27 But we couldn't get the overall feel this.
+28 Some more Brown here. 29 Alright that should work this time.
+30 What's wrong with that picture?
+31 Does actually seems nice?
+32 I don't see anything wrong with that landscape Timo?
+33 When you when you're using map crunch you're going to $\square$ $\times$ $\square$ get a lot of like side of the road road views because you know if you think about where the car is going.
+34 Order fact that it's your in the Google Maps.
+□ □ □
+35 People are in a car traveling there, you get a lot of side of the road like kind of bland images, but then you also get like the most amazing pictures and people also upload images and stuff, I think that might be.
+36 You know where some of the really, really fantastic ones come from.
+37 But people will be on the boat on foot.
+38 You know, I've seen people like riding camels and stuff, he's taking pictures for Google.
+39 Maps years was a fitness studio, yeah, there's all kinds of stuff.
+40 Yeah, but sometimes you get something weird because the 3D or the 360 Panorama.
+41 View is created by them stitching images together.
+42 So, sometimes you have weird situations where stuff over-laps.
+
+Table 11: A snippet from Virtual Plein Air Landscape Painting. We show the most prominent latent codes and their representative utterances ('X'). Human annotated summary utterances are colored gray and ultra-short utterances are crossed out.
+
+# FluCovRank
+
+- drawing diesel letters / surface pen 4 i have the 3 / latest song version of the surface / pin so i got a surface pen / uhm this pan to check / avoid these artifacts in astana / file ready an complete im just listening / early in octber 20th 19th / bump on phone so yeah
+
+# LexRank
+
+- Thank you for sticking around wanna show you some real cool stuff, not right there.
+- Bump on Phone so yeah, that's the wrong letter, but let's go.
+- But I thought we fresco does not have good, um Palm rejection and so when you using the pen and drawing whether you're on the iPad or surface.
+- We go come on come here pin so I got a Surface Pen here.
+
+- Pan's had details that were missing right now, I'm using the vector pen the vector brushes are in.
+
+# BART-Large
+
+- Thank you for sticking around wanna show you some real cool stuff, not right there. I'm on the Surface Pro. That's the latest song version of the surface. It just came out early in October 20th 19th. The app and it's working it's a work in progress OK is constantly being updated with the features and bugs. They sent me umh this pan to check out. Pan's had details that were missing right now, I'm using the vector pen the vector brushes are in. So I'm doing this little dots and what happens is we on with Adobe fresco is there. But I thought we fresco does not have good, um Palm rejection and so when you using the
+
+# Quantized Transformer
+
+- I do have my Surface Pen somewhere it's up there.
+I'm on the Surface Pro.
+- That's the latest song version of the surface.
+- You end up with all these little artifacts that when your Palm lays on the screen.
+- And so as I was drawing diesel letters.
+- I got to the point where.
+- I just cannot avoid these artifacts in Astana kept them.
+- I need to do some of these lines here is geared is closeout all.
+- If this doesn't have a pain
+- Just did good thing is I have extra pants, not only do I have all here's one, not only do I have extra pants.
+- OK, here, we go ever it is yeah, some of these.
+
+# StreamHover (Ours)
+
+- It's gotta stay and the same letter so they was the letter C and I'm just using my hands my fingers.
+- The app and it's working it's a work in progress OK is constantly being updated with the features and bugs.
+- But I thought we fresco does not have good, um Palm rejection and so when you using the pen and drawing whether you're on the iPad or surface.
+- I kept them in the drawing and now they are part of the look of each of these letters, which is crazy.
+- Just did good thing is I have extra pants, not only do I have all here's one, not only do I have extra pants.
+
+Table 12: Example system summaries from Creating ABC Childrens Book Art on Adobe Fresco and Adobe Illustrator Part 18. BART summary is fluent but its content lacks specificity, as is the case for LexRank. Summary segments selected by FluCovRank are ungrammatical. StreamHover identifies on-topic and informative summary utterances.
+
+# Utterances
+
+# C1 C2 C3
+
+0 Thank you for sticking around wanna show you some real cool stuff, not right there.
+
+1 It's gotta stay and the same letter so they was the letter C $\square$ X $\square$ and I'm just using my hands my fingers.
+2 I do have my Surface Pen somewhere it's up there.
+3 I'm on the Surface Pro.
+47 5 That's the latest song version of the surface. 6 It just came out early in October 20th 19th.
+7 I know that in a few days were gonna be in 2020, which is why I want to have.
+8 This file ready an complete I'm just listening. 9 Bump on Phone so yeah, that's the wrong letter, but let's go.
+
+# 10 It's just he gone.
+
+11 So I'm doing this little dots and what happens is we on with □ □ □ Adobe fresco is there.
+12 It doesn't do a good job.
+13 The app and it's working it's a work in progress OK is constantly being updated with the features and bugs.
+14 But I thought we fresco does not have good, um Palm rejection and so when you using the pen and drawing whether you're on the iPad or surface.
+15 You end up with all these little artifacts that when your Palm lays on the screen.
+16 And so as I was drawing diesel letters.
+17 I got to the point where. $\boxed{\mathbf{X}}$ $\boxed{\square}$ 18 I just cannot avoid these artifacts in Astana kept them. $\boxed{\square}$ $\boxed{\square}$
+19 I kept them in the drawing and now they are part of the look of each of these letters, which is crazy.
+20 And then there's some of these letters that don't have detail like this one.
+21 So now I am going to use my pen there.
+22 We go come on come here pin so I got a Surface Pen here.
+23 Anthony my glasses. 24 But the lightless terrible OK here we go let me.
+25 I need to do some of these lines here is geared is closeout all.
+26 Define. $\square \square \square$ 27 If this doesn't have a pain.
+28 Come on, it does have a pen.
+29 Usually. 30 I guess the battery. 31 Just did good thing is I have extra pants, not only do I have all here's one, not only do I have extra pants.
+32 There we go. 33 I am I have the Surface Pen 4 I have the 3.
+34 I have □ □ □
+35 I also have other pins with other brands like the Wacom, the bamboo adanet and this other.
+36 Pam brand. 37 They sent me umh this pan to check out.
+38 They mean the company. $\square$ $\square$ $\square$
+39 At the Renaissance so it's pretty cool. $\times$ $\square$ $\square$
+40 OK, here, we go ever it is yeah, some of these. $\square$ $\square$ $\square$
+41 Pan's had details that were missing right now, I'm using the vector pen the vector brushes are in.
+42 There we go. 43 I'm try not to yell but I know I can hear. 44 Just a big bounce in my voice and Missy Volume.
+45 OK, so now we're back we're back 'cause I could hear the sound an it was very loud.
+46 I'm sorry I already have a loud voice.
+
+Table 13: A transcript snippet from Creating ABC Childrens Book Art on Adobe Fresco and Adobe Illustrator Part 18. We show the most prominent latent codes and their representative utterances ('X'). Human annotated summary utterances are colored gray and ultra-short utterances are crossed out.
+
+# FluCovRank
+
+- learning process proceed / draw this out and post it where people / sit down an just trying to draw a picture / spent like 3 hours / alot like ill draw something like old man i want to draw / consistently draw this character and erase and restart and you cant necessarily / practice will
+
+# LexRank
+
+- The practice will do a lot more for you than drawing a picture.
+- You might get one picture that might turn out really cool and you can post it and stuff like that, but if you work on your practice and you get that practice the way that you want it, you can use that practice forever for more than one picture.
+- You stop trying to make the picture and get back to practice.
+- So if there's things that you need to practice and stuff like that, you stand to gain a lot more from that practice then.
+- Sit down an just trying to draw a picture.
+
+# BART-Large
+
+- I do I like to do more practice in anything. Practices gives me this feel that I've never had when I was younger. You know, of course, everybody will tell you. You might get one picture that might turn out really cool and you can post it and stuff like that, but if you work on your practice and you get that practice the way that you want it, you can use that practice forever for more than one picture. So that's generally would always tell myself when I'm drawing, and I'm like. Oh crap, here I go again. I should draw this into a picture and then I end up skipping practice to save whatever I'm doing as a picture so that I can. Just 'cause
+
+# Quantized Transformer
+
+- Trying to make a picture, right?
+- And then I'm like OK alright I gotta I gotta center myself You know I gotta always gotta check myself every now and again or back that was kind of how it wasn't back then but now I don't really like to draw pictures.
+- I do I like to do more practice in anything.
+- You sit up and you put on like references for the superhero be in movies or something like that.
+- You pull up references on whatever social media or wherever you get your images from.
+- Whereas if you were just trying to practice, you would realize that all of that stuff that you're about to throw away or disregard was actually what you were actually searching for.
+
+# StreamHover (Ours)
+
+- Doesn't matter what styles you draw, so don't overly complicated by like Oh my God, you know now you could draw it.
+- I used to do that a lot when I was younger where I would do something and be like holy crap, didn't think that would come out that way.
+- And then I'm like OK alright I gotta I gotta center myself You know I gotta always gotta check myself every now and again or back that was kind of how it wasn't back then but now I don't really like to draw pictures.
+- They don't see it happening until it's too late where it's like. Oh Man, I could totally practice this right now, or I could Draw Something Super Duper cool, you know, a piece of fan art or something like that.
+- You're going to struggle with for a couple of days or couple minutes and then figure out you can't draw it or you have a hard time drawing it and then just giving up.
+
+Table 14: Example system summaries from Call me Derek: Value Study. The BART summary is fluent but its content lacks specificity, as is the case for LexRank. Summary segments selected by FluCovRank are ungrammatical. StreamHover identifies on-topic and informative summary utterances.
+
+# Utterances
+
+# C1 C2 C3
+
+0 And then once I get my general OK this is what the hairstyle is gonna be right here.
+
+1 I definitely want to condom mark the flow.
+2 Well, I'll do that later.
+
+3 And now I just kind of relax and just.
+
+4 Draw hairstyles as long as there as long as his long hair.
+
+5 Doesn't matter what styles you draw, so don't overly complicated by like Oh my God, you know now you could draw it.
+
+# 6 Now you can draw.
+
+# 7. Fases and stuff.
+
+8 If you want, I try not to draw too much of the face.
+9 Just 'cause I don't want to.
+10 I don't want to get caught up in that thing that I always do where when I'm drawing a face or I'm doing practice.
+11 I always do that thing where it's like holy crap you know this is a really good face.
+12 I should draw this into a picture and then I end up skipping practice to save whatever I'm doing as a picture so that I can.
+
+# 13 You know?
+
+14 Posted on Instagram or something like that.
+I used to do that a lot when I was younger where I would do something and be like holy crap, didn't think that would come out that way.
+16 I don't want to waste this in practice.
+
+17-21 ...
+
+22 You might get one picture that might turn out really cool and you can post it and stuff like that, but if you work on your practice and you get that practice the way that you want it, you can use that practice forever for more than one picture.
+23 So that's generally would always tell myself when I'm drawing, and I'm like.
+
+24 Oh crap, here I go again.
+
+25 Trying to make a picture, right?
+
+26 You stop trying to make the picture and get back to practice.
+
+27 And then I'm like OK alright I gotta I gotta center myself. You know I gotta always gotta check myself every now and again or back that was kind of how it wasn't back then but now I don't really like to draw pictures.
+
+28 I do I like to do more practice in anything.
+
+29 Practices gives me this feel that I've never had when I was younger.
+
+30 When I was younger, which is so eager to get people to see my work that I wasn't necessarily thinking about the overall count, their overall.
+
+31 Affect that, we're going to have on.
+
+# 32 My learning process proceed.
+
+33 And it had a big big, big big like effect on it took me longer to learn stuff because when you sit down you feel like you don't want to do anything unless you're actually drawing something to show off, which is something you don't necessarily want to get caught up in, which happens a lot of people they don't.
+
+35-36 ...
+
+37 Get way more out of practice because practice is more focused on getting you better at art where doing a picture or whatever is cool, but it's more focused on showing off what you can do or what you already know.
+
+38 So if there's things that you need to practice and stuff like that, you stand to gain a lot more from that practice then.
+
+# 39 You know?
+
+40 Sit down an just trying to draw a picture.
+41 You're going to struggle with for a couple of days or couple minutes and then figure out you can't draw it or you have a hard time drawing it and then just giving up.
+42 Which is something that would happen alot like I'll Draw Something like old man, you know I want to draw this.
+43 Superhero, I've had a problem with drawing the superhero forever, but today is going to be the day I'm going to nail it.
+
+# □□□
+
+#
+
+# □□□
+
+# X□□
+
+# #
+
+# #
+
+# #
+
+#
+
+# #
+
+# #
+
+# #
+
+# #
+
+# □□□
+
+#
+
+# #
+
+#
+
+# #
+
+#
+
+#
+
+# □□□
+
+# #
+
+# #
+
+# #
+
+# #
+
+# □□□
+
+# #
+
+# #
+
+#
+
+#
+
+# #
+
+# #
+
+# #
+
+# □□□
+
+# #
+
+# #
+
+#
+
+#
+
+# □□□
+
+# □□□
+
+# #
+
+#
+
+# #
+
+# #
+
+# #
+
+# $\left( {x - 1}\right) \left( {x + 3}\right) = 0$
+
+# #
+
+# #
+
+#
+
+#
+
+# #
+
+#
+
+# #
+
+# #
+
+# #
+
+#
+
+#
+
+# #
+
+#
+
+# #
+
+Table 15: A transcript snippet from Call me Derek: Value Study. We show the most prominent latent codes and their representative utterances ('X'). Human annotated summary utterances are colored gray and ultra-short utterances are crossed out.
+
+# FluCovRank
+
+- people start off always drawing characters / favorite characters from sailor moon / mohammed roller show / yeah people are different or personalities / example prefer environment designed the character design and even though i like looking at character art by prefer to make environments / advice with a grain of salt / people specialized the
+
+# LexRank
+
+- Some people like to have things mixed up all the time where they get bored and other people find that one thing they like and never tire of it.
+- Or what I meant is that some people start off always drawing characters, for example like they just from.
+- An anyway, some artists just like for example, love drawing characters and always draw them and never get into environments, and they go on and become a good working concepts are it could work in visual development as a character artist who knows what.
+- Just because someone specializes, it doesn't necessarily mean that they like tried all the other things first.
+- Some people sort of specialized the whole time just because that was their preference, you know.
+
+# BART-Large
+
+- I really works good to see you. Yeah, people are different or personalities. What might work for them isn't necessarily right right for you for any number of reasons, like what David said just from person to person, those preferences can be really different. I for example, prefer environment designed the character design, and even though I like looking at character art by prefer to make environments, and that's not. I think that's why you have to take advice with a grain of salt like. See I do think people do though Omar, like maybe maybe you're not relating to it 'cause it's just not what your preferences are but. Definitely, I think it's important to seek out advice from professional artists and from people
+
+# Quantized Transformer
+
+- It's about what you like doing.
+- I really works good to see you.
+- A specialist most of the time is someone with more experience.
+- I mean I like for example, I started drawing in like when I was a kid and when I was in middle school and high school was drawn.
+- Just because someone specializes, it doesn't necessarily mean that they like tried all the other things first.
+This was the first study.
+- We're doing cloud studies for part of the art club were doing clouds in different scenarios, this time different.
+- This was the second one.
+- See I do think people do though Omar, like maybe maybe you're not relating to it 'cause it's just not what your preferences are but.
+- All thanks claires you thank you.
+So I do hope that it helps.
+
+# StreamHover (Ours)
+
+- Some people like to have things mixed up all the time where they get bored and other people find that one thing they like and never tire of it.
+- An anyway, some artists just like for example, love drawing characters and always draw them and never get into environments, and they go on and become a good working concepts are it could work in visual development as a character artist who knows what.
+- We're doing cloud studies for part of the art club were doing clouds in different scenarios, this time different.
+- See I do think people do though Omar, like maybe maybe you're not relating to it 'cause it's just not what your preferences are but.
+- I for example, prefer environment designed the character design, and even though I like looking at character art by prefer to make environments, and that's not.
+
+Table 16: Example system summaries for Digital Painting Studies with Maddy Bellwoar-Clouds. The BART summary is fluent but its content lacks specificity, as is the case for LexRank. The summary segments selected by FluCovRank are ungrammatical. StreamHover identifies on-topic and informative summary utterances.
+
+# Utterances
+
+# C1 C2 C3
+
+1 David says, I also think if you were a person who really likes doing all sorts of different things, you wouldn't be happiness.
+2 Specialist role.
+3 Yeah, people are different or personalities.
+4 Some people like to have things mixed up all the time where they get bored and other people find that one thing they like and never tire of it.
+5 And it really depends.
+6 It really depends.
+
+8 Definitely, I think it's important to seek out advice from professional artists and from people that have sort of gone down the path that you're trying to go down.
+9 That's going to make things easier for you, but you know, take the advice with a grain of salt because.
+
+0Pence Maybe I'll wait on that.
+7 I think that's why you have to take advice with a grain of salt like.
+10 What might work for them isn't necessarily right right for you for any number of reasons, like what David said just from person to person, those preferences can be really different.
+11 Exactly Pablo is at the end of the day.
+12 It's about what you like doing.
+13 Alright, I'm gonna grab a little more textured brush again.
+14 I'm kind of going back and forth with harder brushes and textured brushes.
+15 I really works good to see you.
+16 It's not about that.
+17 A specialist most of the time is someone with more experience.
+18 That's why he's a specialist.
+19 Oh, I understand your thoughts on that.
+20 I would agree for the most part, but I guess the part I would disagree on is that.
+21 Or what I meant is that some people start off always drawing characters, for example like they just from.
+22 I mean I like for example, I started drawing in like when I was a kid and when I was in middle school and high school was drawn.
+23 All my favorite characters from Sailor Moon and all that kind of stuff.
+24 An anyway, some artists just like for example, love drawing characters and always draw them and never get into environments, and they go on and become a good working concepts are it could work in visual development as a character artist who knows what.
+25 Just because someone specializes, it doesn't necessarily mean that they like tried all the other things first.
+26 Maybe they did.
+27 It's possible they did, but I don't think that it has to be that you have to do everything before you specialize.
+28 Some people sort of specialized the whole time just because that was their preference, you know.
+29 From the beginning.
+30 If anybody is just coming in.
+31 Mohammed roller, I can show you what we did so far.
+32 This was the first study.
+33 We're doing cloud studies for part of the art club were doing clouds in different scenarios, this time different.
+34 Like lightings, different times of day.
+35 This was the second one.
+36 And:
+37 This is what we're working on right now.
+38 See I do think people do though Omar, like maybe maybe you're not relating to it 'cause it's just not what your preferences are but.
+39 I for example, prefer environment designed the character design, and even though I like looking at character art by prefer to make environments, and that's not.
+40 You know, that's just my preference.
+41 All thanks claires you thank you.
+
+Table 17: A snippet from Digital Painting Studies with Maddy Bellwoar-Clouds. We show the most prominent latent codes and their representative utterances ('X'). Human annotated summary utterances are colored gray and ultra-short utterances are crossed out.
\ No newline at end of file
diff --git a/streamhoverlivestreamtranscriptsummarizationandannotation/images.zip b/streamhoverlivestreamtranscriptsummarizationandannotation/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..3af8b0347b7edf7039d285d826d8011535e45d4b
--- /dev/null
+++ b/streamhoverlivestreamtranscriptsummarizationandannotation/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3e93c951e3f893e39bab964366983da715623ca336741de7effd6c762ab32bdf
+size 393579
diff --git a/streamhoverlivestreamtranscriptsummarizationandannotation/layout.json b/streamhoverlivestreamtranscriptsummarizationandannotation/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..db44a1954033390efd0562d26fae316e67f80423
--- /dev/null
+++ b/streamhoverlivestreamtranscriptsummarizationandannotation/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b25cbd16f239e3260e7c13d546affe64d7771294e44ff8b828741aaee235c64c
+size 1062562
diff --git a/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_content_list.json b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..51d91049f47f7c91f417720d41fbcd2a755da8bf
--- /dev/null
+++ b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2756e25cc8182908ac87de2a82ff5b90337e0ca043e7c0aefe551b524bc44866
+size 102836
diff --git a/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_model.json b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..62633a26dec894598d54e6ba442dddcdb6bf948c
--- /dev/null
+++ b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0198d1f8b6e94278cb7d5b39904dacfd9ab67100caf6b82289852bd1f0e7adf8
+size 124617
diff --git a/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_origin.pdf b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..bb8eb6b928e457de90fbe550dbb7b8aa8b17c27a
--- /dev/null
+++ b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4fe2c1e33ae5804a952c1d3cff676a6ac6f13f4793fbb50730f05b4325461ce2
+size 546202
diff --git a/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/full.md b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..b058acb847c2e92d45f892a581fa0fc503e697f1
--- /dev/null
+++ b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/full.md
@@ -0,0 +1,397 @@
+# Structural Adapters in Pretrained Language Models for AMR-to-Text Generation
+
+Leonardo F. R. Ribeiro†, Yue Zhang‡ and Iryna Gurevych†
+
+†Ubiquitous Knowledge Processing Lab, Technical University of Darmstadt ‡School of Engineering, Westlake University ribeiro@aiphes.tu-darmstadt.de
+
+# Abstract
+
+Pretrained language models (PLM) have recently advanced graph-to-text generation, where the input graph is linearized into a sequence and fed into the PLM to obtain its representation. However, efficiently encoding the graph structure in PLMs is challenging because such models were pretrained on natural language, and modeling structured data may lead to catastrophic forgetting of distributional knowledge. In this paper, we propose STRUCTADAPT, an adapter method to encode graph structure into PLMs. Contrary to prior work, STRUCTADAPT effectively models interactions among the nodes based on the graph connectivity, only training graph structure-aware adapter parameters. In this way, we incorporate task-specific knowledge while maintaining the topological structure of the graph. We empirically show the benefits of explicitly encoding graph structure into PLMs using STRUCTADAPT, outperforming the state of the art on two AMR-to-text datasets, training only $5.1\%$ of the PLM parameters. $^{1}$
+
+# 1 Introduction
+
+Data-to-text tasks aim to generate meaningful and coherent natural language text that faithfully conveys structured data. Some examples of structured information include tables (Parikh et al., 2020), Knowledge Graphs (KGs) (Gardent et al., 2017; Vougiouklis et al., 2018) and Abstract Meaning Representation (AMR) (Banarescu et al., 2013). In this work, we focus on AMR-to-text generation where the goal is to generate a fluent and grammatical sentence that is faithful to a given AMR graph (See Figure 1a). AMR is a semantic formalism that has received much research interest (Song et al., 2018; Guo et al., 2019; Ribeiro et al., 2019; Opitz et al., 2020, 2021; Fu et al., 2021) and has been shown to benefit downstream tasks
+
+
+Figure 1: (a) AMR for the sentence More power to her for her achievements. While in (b) the pretrained model gets as input the graph linearization, in (c) it additionally receives the graph connectivity information.
+
+such as text summarization (Liao et al., 2018) and machine translation (Song et al., 2019). Both statistical (Flanigan et al., 2016; Pourdamghani et al., 2016) and neural methods (Bai et al., 2020; Cai and Lam, 2020) have been investigated for AMR-to-text generation, and dominant methods make use of Graph Neural Networks (GNNs) (Kipf and Welling, 2017) or Transformers (Vaswani et al., 2017) for representing the input graph.
+
+Pretrained language models (PLMs) (Devlin et al., 2019; Liu et al., 2020; Radford et al., 2019; Lewis et al., 2020) have been shown useful as a general text representation method, giving much improved results on a wide range of tasks (Wang et al., 2018, 2019). However, they cannot be directly leveraged to benefit AMR-to-text generation, and more generally graph-to-text generation, due to the structural nature of the input. One solution is to transform the structured input into a se
+
+quence, which can be directly fed into PLMs (See Figure 1b). Recent studies (Mager et al., 2020; Harkous et al., 2020; Ribeiro et al., 2020a, 2021) transform AMRs into sequences by top-down linearization (Konstas et al., 2017). It has been shown that such linearized graph representation can be used to fine-tune a PLM and improve graph-to-text generation performances (Kale, 2020).
+
+The above methods, however, suffer from two salient limitations. First, linearized graph structures are different in nature from natural language. As a result, knowledge from large-scale pretraining intuitively cannot be fully transferred, and finetuning a sentence representation using linearized graphs can lead to catastrophic forgetting of such distributional knowledge (Goodfellow et al., 2014; Kirkpatrick et al., 2017). Second, a linearized representation weakens structural information in the original graphs by diluting the explicit connectivity information (i.e., which nodes are connected to each other), and PLMs must infer how edge connections are specified in the sequence. This fact was also observed by Song et al. (2018), Beck et al. (2018) and Ribeiro et al. (2019), who show that GNN encoders outperform sequential encoders for AMR-to-text generation without pretraining.
+
+To mitigate the issues, we aim to explicitly encode the graph data into a PLM without contaminating its original distributional knowledge. To this end, we propose STRUCTADAPT, a novel structure-aware adapter that effectively allows leveraging the input graph structure into PLMs (See Figure 1c). The main idea is to add layer-wise modules, which extract information from the pretrained layers and make use of it in a graph-structure encoding. As shown in Figure 2, STRUCTADAPT employs a graph convolution in order to learn representations built upon the graph connectivity over the PLM encoder. Because STRUCTADAPT is added to each encoder layer, deep integration of linguistic knowledge and graph knowledge can be achieved. During finetuning, only the adapter parameters are trained, whereas the PLM parameters remain unchanged, in contrast to previous methods based on the graph linearizations that fine-tune all model parameters.
+
+Empirically we show that STRUCTADAPT significantly outperforms linearized fine-tuning baselines and naive sequential adapters (Houlsby et al., 2019). Moreover, STRUCTADAPT is more robust to different graph linearizations, better treats reentrancies (nodes with more than one entering edge) and long-
+
+range node dependencies. Our proposed models, based on STRUCTADAPT, surpass the current state of the art on LDC2017T10 and LDC2020T02 datasets by up to 3.1 BLEU points, training only $5.1\%$ of the original PLM parameters.
+
+# 2 Related Work
+
+Fine-tuning for Graph-to-text Generation. While previous approaches (Song et al., 2018; Ribeiro et al., 2019; Cai and Lam, 2020; Schmitt et al., 2021; Zhang et al., 2020b) have shown that explicitly encoding the graph structure is beneficial, fine-tuning PLMs on linearized structured data has established a new level of performance in data-to-text generation (Nan et al., 2021; Kale, 2020; Ribeiro et al., 2021). Our work can be seen as integrating the advantage of both graph structure encoding and PLMs, using a novel adapter module.
+
+Mager et al. (2020) employ cycle consistency to improve the adequacy of generated texts from AMRs using GPT-2 (Radford et al., 2019), whereas Harkous et al. (2020) train a classifier to rank candidate generations based on the semantic fidelity. Ribeiro et al. (2020a) investigate encoder-decoder PLMs for graph-to-text generation, and show that task-specific pretraining can lead to notable improvements and that PLMs benefit much more from the graph structure of AMRs than of KGs. Hoyle et al. (2021) explore the extent to which PLMs are invariant to graph linearization, finding that models trained on canonical linearizations fail to generalize to meaning-preserving alternatives. Compared to this line of work, which tunes all PLM parameters, our method obtains a further $19\mathrm{x}$ reduction in task-specific parameters, tuning only $5.1\%$ of the parameters while achieving state-of-the-art performance, being more robust to permutations of the graph representation and better encoding larger graphs.
+
+Lightweight Fine-tuning. Recently, different approaches have emerged as an alternative training strategy in order to avoid fine-tuning all parameters of a PLM. Zhang et al. (2019) train a lightweight "side" network that is fused with the pretrained model via summation. Li and Liang (2021) propose to prepend a trainable continuous prefix as an alternative to adapters, maintaining comparable performance in data-to-text tasks using fewer trained parameters. Liu et al. (2021) develop a method to automatically search prompts in the continuous space and evaluate it in few-shot NLU tasks. Ham-
+
+bardzumyan et al. (2021) propose adversarial reprogramming attempts to learn task-specific word embeddings to customize the language model for the downstream task.
+
+Adapter-based approaches (Houlsby et al., 2019; Rebuffi et al., 2017; Lauscher et al., 2020; Pfeiffer et al., 2020a, 2021) introduce a small number of task specific parameters, keeping the underlying pretrained model fixed. Pfeiffer et al. (2020b) propose an adapter method to arbitrary tasks and languages by learning modular language and task representations. The above works are related to STRUCTADAPT as it trains much fewer parameters, but also different because they do not explicitly encode the input structure, whereas STRUCTADAPT directly aims to encode it.
+
+# 3 Graph-to-Text Model
+
+Let $\mathcal{G}_0 = (\mathcal{V}_0, \mathcal{E}_0, \mathcal{R}_0)$ denote a rooted and directed AMR graph with a node set $\mathcal{V}_0$ and labeled edges $(u, r, v) \in \mathcal{E}_0$ , where $u, v \in \mathcal{V}_0$ and $r \in \mathcal{R}_0$ is a relation type. An example of an AMR graph and its corresponding sentence is shown in Figure 1a.
+
+# 3.1 Encoder-Decoder Architecture
+
+Consider a conditional generation task where the input is a context $x$ and the output $y = \langle y_1, \ldots, y_{|y|} \rangle$ is a sequence of tokens. In AMR-to-text generation, the context $x$ is the AMR graph and $y$ is the sentence that describes the AMR graph in natural language.
+
+Let $p_{\phi}(y \mid x)$ denote a PLM parametrized by $\phi$ , where $x$ is encoded by a bidirectional encoder, and the decoder predicts $y$ autoregressively, conditioned on the encoded $x$ and its left context. We focus on PLMs based on the Transformer encoder-decoder architecture (Vaswani et al., 2017), as they are suitable for conditional text generation. We define $x = \mathrm{LIN}(\mathcal{G}_0)$ , where LIN is a function that linearizes $\mathcal{G}_0$ into a sequence of tokens. Following Damonte and Cohen (2019), as shown in Figure 1b, we linearize the AMR into a sequence of nodes and edges using the depth-first traversal of the canonical human-created AMR. In a nutshell, the hidden representation $\mathbf{h}_i^l \in \mathbb{R}^d$ , for all $x_i \in x$ , is computed by the encoder layer $l$ , where $d$ is the hidden dimension. The decoder hidden representation $\hat{\mathbf{h}}_i^l \in \mathbb{R}^d$ is computed by the layer $l$ of the
+
+
+
+
+
+
+Figure 2: Integration of the adapter modules with the (a) encoder and (b) decoder layers of the Transformer; layer normalization and residual connections are omitted for clarification. (c) ADAPT with two feed-forwards layers. (d) STRUCTADAPT encodes the graph structure using a graph convolutional layer.
+
+
+
+autoregressive decoder at time step $i$ .
+
+# 3.2 Fine-tuning
+
+The model is initialized with pretrained parameters $\phi$ (e.g. using T5, Raffel et al., 2019) and fine-tuned to optimize the following log-likelihood objective over each gold instance $(x,y)$ :
+
+$$
+\max _ {\phi} \log p _ {\phi} (y \mid x) = \sum_ {i = 1} ^ {| y |} \log p _ {\phi} \left(y _ {i} \mid y _ {1: i - 1}, x\right). \tag {1}
+$$
+
+# 3.3 Baseline Adapter
+
+We employ an adapter module after the feedforward sub-layer of each layer on both encoder (Figure 2a) and decoder (Figure 2b) of the PLM. We modify the adapter architecture from Houlsby et al. (2019), computing the adapter representation at each layer $l$ , given the encoder layer representation $\mathbf{h}_i^l$ (or $\hat{\mathbf{h}}_i^l$ in the decoder), as follows:
+
+$$
+\hat {\mathbf {z}} _ {i} = \mathbf {W} _ {o} ^ {l} \left(\sigma \left(\mathbf {W} _ {p} ^ {l} \sqcup \mathbb {N} \left(\mathbf {h} _ {i} ^ {l}\right)\right)\right) + \mathbf {h} _ {i} ^ {l}, \tag {2}
+$$
+
+where $\sigma$ is the activation function and $\mathsf{LN}(\cdot)$ denotes layer normalization. $\mathbf{W}_o^l\in \mathbb{R}^{d\times m}$ and $\mathbf{W}_p^l\in$ $\mathbb{R}^{m\times d}$ are adapter parameters, and $m$ is the hidden dimension of the adapter. Figure 2c illustrates the baseline adapter module, which we call ADAPT.
+
+Training. Let the set of adapters' parameters for the encoder and decoder layers be parametrized by $\theta$ . The training objective is the same as Equation (1), but the set of trainable parameters changes: the PLM parameters $\phi$ are frozen and the adapter parameters $\theta$ are the only trainable parameters. In contrast to fine-tuning, adapters substantially reduce the number of trainable parameters that are used to adapt the PLM to the downstream task.
+
+# 3.4 Limitation
+
+Intuitively, the connection between nodes in the input graph can influence the encoding of $x$ by guiding what to extract from $x$ in order to generate $y$ . Note that in both fine-tuning and ADAPT approaches, the self-attention mechanisms of the encoder layers treat the sequence of nodes and edges $x$ essentially as a fully connected graph, greatly diluting the original graph structure. In this way, the model has to retrieve the original connectivity of the graph from $x$ . For example, the AMR linearization in Figure 1b has two mentions of the node she, and the model should capture that both mentions belong to the same node in the original graph.
+
+# 4 Structural Adapter
+
+We propose STRUCTADAPT, a lightweight alternative to injecting structural inductive bias into PLMs.
+
+We first describe the intuition in §4.1 and define our method formally in §4.3.
+
+# 4.1 Intuition
+
+Injecting graph structural bias into graph-to-text models trained from scratch improves the performance compared to linearized approaches (Damonte and Cohen, 2019; Ribeiro et al., 2019). However, it is not straightforward how to effectively model the input graph structure when fine-tuning PLMs, which usually are pretrained using natural language and not structured data.
+
+Our key idea is modeling the graph connectivity in the encoder utilizing an adapter module, using information flows between adjacent nodes in a message-passing update, employing a graph convolution (see Figure 2d). In this way, the graph structure substantially impacts the node representations, better encoding the input graph without impacting the knowledge learned during pretraining. This can
+
+
+
+
+e)
+
+
+
+
+Figure 3: An example of (a) an AMR graph structure, (b) its unlabeled version and three different subword representations: (c) rep1, (d) rep2 and (e) rep3.
+
+
+
+lead to more efficient and better AMR-to-text generation as we will show in §5 and §6. Moreover, different adapters for distinct graph domains can be used with the same PLM, yielding a high degree of parameter sharing for graph-to-text tasks.
+
+# 4.2 Graph Representation
+
+We convert each $\mathcal{G}_0$ into a bipartite graph $\mathcal{G}_1 = (\mathcal{V}_1, \mathcal{E}_1)$ , replacing each labeled edge $(u, r, v) \in \mathcal{E}_0$ with two unlabeled edges $e_1 = (u, r)$ and $e_2 = (r, v)$ . Similar to Beck et al. (2018), this process converts the graph into its unlabeled version. Figure 3 shows an (a) AMR subgraph and (b) its unlabeled representation.
+
+Note that PLMs typically use a vocabulary with subword units (Sennrich et al., 2016). This presents a challenge in how to represent such a graph using subword tokens. Inspired by Ribeiro et al. (2020b), we transform each $\mathcal{G}_1$ into a new token graph $\mathcal{G} = (\mathcal{V},\mathcal{E})$ , where each token of a node in $\mathcal{V}_1$ becomes a node $v\in \mathcal{V}$ . We convert each edge $(u_{1},v_{1})\in \mathcal{E}_{1}$ into a set of edges and connect every token of $u_{1}$ to every token of $v_{1}$ . That is, an edge $(u,v)$ will belong to $\mathcal{E}$ if and only if there exists an edge $(u_1,v_1)\in \mathcal{E}_1$ such that $u\in u_{1}$ and $v\in v_{1}$ , where $u_{1}$ and $v_{1}$ are seen as sets of tokens. Figure 3c shows an example of the token graph.
+
+# 4.3 Method
+
+STRUCTADAPT employs a two-layer architecture in order to re-purpose the PLM for the graph-to-text task using a small number of new parameters. Formally, for each node $v \in \mathcal{V}$ , given the hidden representation $\mathbf{h}_v^l$ from the encoder layer $l$ , STRUCTADAPT computes:
+
+$$
+\begin{array}{l} \mathbf {g} _ {v} ^ {l} = \operatorname {G r a p h C o n v} _ {l} (\mathsf {L N} \left(\mathbf {h} _ {v} ^ {l}\right), \{\mathsf {L N} \left(\mathbf {h} _ {u} ^ {l}\right): u \in \mathcal {N} (v) \}) \\ \mathbf {z} _ {v} ^ {l} = \mathbf {W} _ {e} ^ {l} \sigma \left(\mathbf {g} _ {v} ^ {l}\right) + \mathbf {h} _ {v} ^ {l}, \end{array} \tag {3}
+$$
+
+where $\mathcal{N}(v)$ is the immediate neighborhood of $v$ in $\mathcal{G}$ . GraphConv $_l(\cdot)$ is the graph convolution that computes the node representation based on the local neighborhood of $v$ , and $\mathbf{W}_e^l \in \mathbb{R}^{d \times m}$ is a parameter. Figure 2d illustrates STRUCTADAPT.
+
+Graph Convolution. The graph convolutional layer allows exploration of distinct strategies for neighborhood aggregation in order to model structural information of the input graph. Different GNN architectures (Velickovic et al., 2018; Xu et al., 2019) can be employed as the graph convolution. Moreover, in this way, we avoid changing the self-attention mechanism of the current pretrained encoder, allowing to also capture global information based on the pretrained knowledge.
+
+Our graph convolution is based on the Graph Convolutional Network (GCN) proposed by Kipf and Welling (2017). At each layer $l$ , we compute the representation of a node $v \in \mathcal{V}$ as follows:
+
+$$
+\mathbf {g} _ {v} ^ {l} = \sum_ {u \in \mathcal {N} (v)} \frac {1}{\sqrt {d _ {v} d _ {u}}} \mathbf {W} _ {g} ^ {l} \mathbf {h} _ {u} ^ {l}, \tag {4}
+$$
+
+where $\mathcal{N}(v)$ is a set of nodes with incoming edges to $v$ and $v$ itself, $d_v$ is the degree of $v$ , and $\mathbf{W}_g^l \in \mathbb{R}^{m \times d}$ is a parameter.
+
+We also consider the variant relational GCN (RGCN) (Schlichtkrull et al., 2018) as graph convolution. RGCN allows capturing the reverse edge direction so that we can consider the differences in the incoming and outgoing relations, which has shown to be beneficial (Beck et al., 2018). In particular, the node representation is computed as:
+
+$$
+\mathbf {g} _ {v} ^ {l} = \sum_ {r \in \mathcal {R}} \sum_ {u \in \mathcal {N} _ {r} (v)} \frac {1}{| \mathcal {N} _ {r} (v) |} \mathbf {W} _ {r} ^ {l} \mathbf {h} _ {u} ^ {l}, \tag {5}
+$$
+
+where $\mathcal{R}$ denotes the set of relations, i.e., the edge types default and reverse, $\mathcal{N}_r(v)$ denotes the set of neighbors under relation $r\in \mathcal{R}$ , and $\mathbf{W}_r^l\in \mathbb{R}^{m\times d}$ encodes the edge type between the nodes $u$ and $v$ .
+
+Note that $\mathbf{STRUCTADAPT}$ computes the refined structural node representation $\mathbf{z}_v^l$ based on the local node context, using as input the global representation $\mathbf{h}_v^l$ generated by the current PLM encoder layer. In this way, the model is able to capture both the global context based on the PLM linguistic knowledge and the local context based on the graph knowledge. Finally, we employ ADAPT into the decoder in order to adapt the language model to the graph-to-text task.
+
+ | BLEU | chrF++ | M | BERT |
| Mager et al. (2020) | 33.0 | 63.9 | - | - |
| Zhang et al. (2020b) | 33.6 | 63.2 | - | - |
| Harkous et al. (2020) | 37.7 | - | - | - |
| Hoyle et al. (2021) | 44.9 | - | 76.54 | - |
| Ribeiro et al. (2020a) | 45.8 | 72.5 | - | - |
+
+ | T5base |
| FINE-TUNE | 38.3±0.3 | 68.6±0.1 | 77.8±0.3 | 95.5±0.1 |
| FT-TOP2(14.8%) | 29.9±0.1 | 63.0±0.1 | 74.1±0.2 | 94.4±0.2 |
| FT-Bottom2(14.8%) | 35.9±0.3 | 67.0±0.2 | 76.9±0.1 | 95.3±0.1 |
| ADAPT(8.5%) | 38.7±0.4 | 69.2±0.2 | 78.3±0.1 | 95.6±0.1 |
| STRUCTADAPT-GCN(2.1%) | 39.0±0.3 | 69.1±0.2 | 78.4±0.2 | 95.7±0.2 |
| STRUCTADAPT-GCN(8.5%) | 41.0±0.5 | 70.0±0.2 | 78.4±0.1 | 95.7±0.1 |
| STRUCTADAPT-RGCN(6.3%) | 44.0±0.3 | 71.2±0.2 | 79.4±0.1 | 95.9±0.2 |
+
+ | T5large |
| FINE-TUNE | 41.2±0.5 | 70.2±0.2 | 78.0±0.1 | 95.8±0.2 |
| FT-TOP2(7.9%) | 28.8±0.4 | 61.8±0.5 | 73.9±0.2 | 94.1±0.2 |
| FT-Bottom2(7.9%) | 37.6±0.3 | 68.0±0.2 | 77.2±0.2 | 95.5±0.1 |
| ADAPT(6.8%) | 42.9±0.3 | 71.6±0.2 | 78.9±0.1 | 96.1±0.1 |
| STRUCTADAPT-GCN(1.7%) | 44.1±0.4 | 71.8±0.3 | 79.1±0.1 | 96.1±0.2 |
| STRUCTADAPT-GCN(6.8%) | 45.8±0.2 | 72.5±0.1 | 79.3±0.2 | 96.2±0.1 |
| STRUCTADAPT-RGCN(5.1%) | 46.6±0.3 | 72.9±0.2 | 79.6±0.1 | 96.3±0.1 |
+
+Table 1: Results on the LDC2017T10 test set. Mean (±s.d.) over 4 seeds.
+
+# 5 Experiments
+
+Our models are initialized with pre-trained T5 (Raffel et al., 2019), but our approach can be combined with other PLMs such as BART (Lewis et al., 2020). Our implementation is based on Hugging Face Transformer models (Wolf et al., 2019). We use $\mathrm{T}5_{\mathrm{base}}$ for all experiments and report results with $\mathrm{T}5_{\mathrm{large}}$ for the test sets. We use the Adam optimizer (Kingma and Ba, 2015) and employ a linearly decreasing learning rate schedule without warm-up. BLEU is used for the stopping criterion. Following recent work (Mager et al., 2020; Zhang et al., 2020b), we evaluate our proposed models on LDC2017T10 and LDC2020T02 corpora.
+
+Evaluation. We evaluate the results with BLEU (Papineni et al., 2002) and $\mathrm{chrF}++$ (Popovic, 2015) metrics. We also report the meaning $(\mathcal{M})$ component of the $\mathcal{MF}$ -score (Opitz and Frank, 2021), which measures how well the source AMR graph can be reconstructed from the generated sentence. We use BERTScore (Zhang et al., 2020a) allowing a semantic evaluation that depends less on the surface forms. Finally, we also perform a human evaluation ( $\S 5.2$ ).
+
+# 5.1 Main Results
+
+We compare STRUCTADAPT with four methods: finetuning (FINE-TUNE), fine-tuning only the top or bottom 2 layers (FT-TOP2, FT-BOTTM2) and ADAPT. All
+
+ | BLEU | chrF++ | M | BERT |
| Zhang et al. (2020b) | 34.3 | 63.7 | - | - |
| Bevilacqua et al. (2021) | 44.9 | 72.9 | - | - |
| T5large |
| FINE-TUNE | 41.6±0.6 | 70.4±0.5 | 78.5±0.2 | 96.0±0.1 |
| FT-TOP2(7.9%) | 33.4±0.5 | 63.5±0.3 | 73.4±0.4 | 94.3±0.1 |
| FT-Bottom2(7.9%) | 38.2±0.2 | 68.3±0.1 | 78.1±0.2 | 95.6±0.1 |
| ADAPT(6.8%) | 43.0±0.2 | 71.3±0.2 | 79.3±0.1 | 96.2±0.1 |
| STRUCTADAPT-GCN(1.7%) | 46.2±0.2 | 71.8±0.2 | 79.4±0.3 | 96.0±0.2 |
| STRUCTADAPT-GCN(6.8%) | 47.1±0.4 | 72.5±0.1 | 79.7±0.2 | 96.2±0.1 |
| STRUCTADAPT-RGCN(5.1%) | 48.0±0.2 | 73.2±0.1 | 80.1±0.3 | 96.3±0.1 |
+
+models use the same graph linearization generated by the depth-first traversal. We also report recent state-of-the-art results on both datasets. Tables 1 and 2 show the results.
+
+We find that training only $5.1\%$ task-specific parameters, STRUCTADAPT-RGCN achieves a BLEU score of 46.6 in LDC2017T10, substantially improving over FINE-TUNE and other lightweight baselines (ADAPT, FT-TOP2, FT-BOTTM2), and outperforming Ribeiro et al. (2020a) and Hoyle et al. (2021) which fine-tune T5 updating significantly more parameters. STRUCTADAPT also achieves state-of-the-art performance on LDC2020T02, considerably improving over Bevilacqua et al. (2021), which implicitly models the graph structure information using linearization techniques.
+
+In general, STRUCTADAPT is better than ADAPT when training the same number of parameters, and slightly better even when training only $1.7\%$ of the parameters for both datasets. This highlights that the gains not only come from using an adapter architecture, but from considering the graph connectivity. STRUCTADAPT-RGCN is more effective than STRUCTADAPT-GCN using fewer parameters, demonstrating that considering reverse relations is advantageous. ADAPT is consistently better than FINETUNE, agreeing with our intuition of catastrophic forgetting when fine-tuning. Interestingly, in contrast to popular strategies that focus on upper layers in fine-tuning (Howard and Ruder, 2018; Houlsby et al., 2019; Li and Liang, 2021), FT-BOTTM2's performance is better than FT-TOP2's, suggesting that lower layers have a significant impact in adapting the PLM to structured data.
+
+Different from our work, both Mager et al. (2020) and Ribeiro et al. (2020a) use the PENMAN notation which makes the input much longer (containing more tokens), and demonstrate that this representation is able to achieve strong results – this is orthogonal to our STRUCTADAPT representation and
+
+Table 2: Results on the LDC2020T02 test set.
+
+| Graph Size | ADAPT | STRUCTADAPT-RGCN |
| All | 5.6A | 6.1B |
| 01-30 | 6.1A | 6.2A |
| 31-60 | 5.4A | 5.4A |
| >60 | 5.2A | 6.2B |
+
+Table 3: Meaning similarity obtained in the human evaluation. The ranking was determined by Mann-Whitney tests with $p < 0.05$ . Difference between systems which have a letter in common is not statistically significant.
+
+can be incorporated in future work.
+
+Overall, the results indicate that explicitly considering the graph structure using an adapter mechanism is effective for AMR-to-text generation, significantly reducing the number of trained parameters while improving generation quality.
+
+# 5.2 Human Evaluation
+
+To further assess the quality of the generated texts by the adapter-based models in LDC2020T02, we conduct a human evaluation via crowdsourcing using Amazon Mechanical Turk. We follow previous work (Ribeiro et al., 2019; Castro Ferreira et al., 2019) and evaluate the meaning similarity, i.e., how close in meaning is the generated text to the reference sentence.7 We divide the datapoints into 3 different sets by the graph size, i.e., the number of nodes, after converting edges into nodes (cf. §4.2). This setting allows us to evaluate the performance of the models based on the complexity of the AMR graph.
+
+We randomly select 100 generated texts for each set and each model (total of 600), which annotators then rate on a 1-7 Likert scale. For each text we collect scores from 3 annotators and use MACE (Hovy et al., 2013), a Bayesian model that incorporates the reliability of individual workers, to merge sentence-level labels. Table 3 shows that STRUCTADAPT improves the meaning similarity over ADAPT with statistically significant margins $(p < 0.05)$ . Note that the gains mainly come from datapoints with $>60$ nodes, indicating that STRUCTADAPT is better when encoding larger graphs.
+
+# 5.3 Detailed Discussion
+
+Parameter/Performance Trade-off. We investigate how the number of parameters affects the models. A higher hidden dimensionality means more
+
+
+Figure 4: (a) Impact (measure with BLEU) of the number of parameters in the LDC2017T10 dev set. (b) Performance in the LDC2017T10 test set when experimenting with different amounts of training data.
+
+trainable parameters, and smaller adapters introduce fewer parameters at a possible cost to performance. That is, the adapter size controls the parameter efficiency. Figure 4a shows the effect of the number of trained parameters in the performance measured using BLEU. Each point in the ADAPT and STRUCTADAPT curves represents a hidden dimension in the range [8, 16, . . ., 2048]. STRUCTADAPT-GCN is consistently better than ADAPT over all model capacities, even though both approaches train the same number of parameters. STRUCTADAPT-RGCN achieves similar performance than FINE-TUNE when training only $0.8\%$ of the parameters whereas ADAPT achieves similar performance to $8.5\%$ , demonstrating the effectiveness of injecting the graph structure into the PLM.
+
+Low-data Setting. Previous work (Li and Liang, 2021) has shown that lightweight fine-tuning has an advantage in some generation tasks when the training size is smaller. Therefore, we investigate how STRUCTADAPT behaves in a low-data setting. We subsample the LDC2017T10 training set to analyze different smaller training sets. For each size, we sample 5 different datasets and average over 2 training random seeds. Thus, we average over 10 models to get an estimate for each low-data setting. Figure 4b shows the results. First note that both adapter-based approaches improve over FINETUNE. When training with only 1000 datapoints, STRUCTADAPT outperforms FINETUNE by 8.2 BLEU points. Also note that the gap between ADAPT and FINETUNE decreases when the size of the training set increases. In general, STRUCTADAPT outperforms FINETUNE and ADAPT in low-resource scenarios by 7.3 and 4.8 BLEU points on average, respectively, whereas requiring much fewer trained parameters
+
+
+
+| REFERENCE: Me and my son's father have been broken up since August. |
| FINE-TUNE-2000: I've broken up with my son and father since August. |
| FINE-TUNE: I've been with my son's father since August. |
| STRUCTADAPT-2000: Since August 8 I have broken up with my son's father. |
| STRUCTADAPT: I've been breaking up with my son's father since August. |
+
+Table 4: An example of an AMR graph and generated sentences by different models trained on full data and on a low-data setting with 2000 datapoints.
+
+than FINE-TUNE and fewer number of parameters than ADAPT.
+
+Case Study. We perform a case study to provide a better understanding of the STRUCTADAPT's performance. Table 4 shows an AMR graph in PENMAN notation containing reentrancies (marked in bold) and sentences generated by FINE-TUNE and STRUCTADAPT trained on the LDC2017T10 full training set and in a low-data setting where the models are trained with 2000 data points. FINE-TUNE fails in generating a sentence with the correct concept break-up whereas STRUCTADAPT correctly generates a sentence that describes the input graph. The incorrect verb tense is due to lack of tense information in AMR. FINE-TUNE-2000 mixes the semantic relation between $I$ and $son$ (i.e., mistranslation of the edges in the graph) whereas STRUCTADAPT-2000 generates a correct sentence (except by generating the number 8). Overall, STRUCTADAPT produces a more accurate text output than FINE-TUNE by generating correct pronouns and mentions when control verbs and reentrancies are involved, in both full and low-data scenarios.
+
+Model Variations. In Table 5, we report an ablation study on the impact of distinct adapter components, using adapters only in the encoder or decoder. We evaluate different architecture configurations keeping the same number of parameters for a fair comparison. We find that only training adapters in
+
+ | BLEU | BERT |
| FINE-TUNE | 38.5 | 95.6 |
| ADAPT ONLY ENC | 38.5 | 95.7 |
| ADAPT ONLY DEC | 11.6 | 90.3 |
| ADAPT ENC + DEC | 38.6 | 95.6 |
| STRUCTADAPT-GCN ONLY ENC | 40.3 | 95.9 |
| STRUCTADAPT-GCN ENC + DEC | 41.7 | 96.0 |
+
+the decoder is not sufficient for a good performance, even having the same number of parameters. This suggests that adapting the PLM encoder to handle graph structures is key in AMR-to-text tasks. Interestingly, the model that only employs STRUCTADAPT in the encoder (i.e., no ADAPT is used in the decoder) has a better performance (+1.7 BLEU) than using ADAPT in both encoder and decoder, highlighting STRUCTADAPT's strong graph encoding abilities. Finally, the best performance is achieved when we employ STRUCTADAPT in the encoder and ADAPT in the decoder, reaching 41.7 BLEU points.
+
+# 6 Graph Representation Evaluation
+
+In this section, we explore how different graph properties impact the models' abilities to encode the input graph structure.
+
+# 6.1 Impact of the Graph Representation
+
+Inspired by Damonte and Cohen (2019), we investigate two different approaches when linearizing the AMR: (i) only nodes have explicit representations, whereas edge relations are represented by the adapter parameters using the RGCN;[10] and (ii) the sequence of nodes and edges using depth-first traversal of the graph.
+
+We also propose and evaluate three different graph structures based on subwords (cf. §4.2): rep1: for each edge, we connect every token from the source node to every token of the target node; rep2: we connect the last token of the source node to the first token of the target node and connect the tokens of a node sequentially; rep3: we connect the first token of the source node to the first token of the target node and connect the token of a node sequentially. Figure 3 shows an example of the three representations for an AMR graph structure.
+
+Table 5: Impact of the adapter modules in the encoder or decoder in the LDC2017T10 dev set. All adapter-based models have the same number of parameters.
+
+| Linearization | Graph Representation | BLEU | BERT |
| (i) only nodes | rep1 | 39.1 | 95.8 |
| rep2 | 38.5 | 95.6 |
| rep3 | 38.9 | 95.7 |
| (ii) nodes and edges | rep1 | 41.7 | 96.0 |
| rep2 | 40.4 | 95.8 |
| rep3 | 40.8 | 95.9 |
| complete graph | 39.4 | 95.8 |
+
+Table 6: Performance on the LDC2017T10 dev set when using different graph representation strategies.
+
+Additionally, we also investigate a fully connected graph structure (complete graph), that is, similarly to the self-attention mechanism in Transformers, all nodes and edges are connected.
+
+As shown in Table 6, explicitly considering nodes and edges in the graph linearization is beneficial. This approach has the advantage of allowing the model to handle new edge relations during inference, as they are not encoded as model parameters. Note that the complete graph representation has relatively inferior performance, again demonstrating the advantage of explicitly encoding the input graph connectivity.
+
+Finally, we observe that the best configuration is using nodes and edges with $rep1$ (see an example in Figure 3c). We believe that this is because $rep1$ allows direct interactions between all source and target tokens, making all token representations of an AMR node directly influenced by the neighbouring tokens.
+
+# 6.2 Robustness to Graph Linearization
+
+A critical advantage of modeling the graph structure is to be less dependent on linearization strategies because the graph connectivity is invariant to the graph linearization. We thus are interested in measuring the impact of the graph linearization in the models.
+
+Following Hoyle et al. (2021), we investigate three different graph linearizations: (i) CANON: the original order of the canonical human-created linearizations in AMR corpora; (ii) RECONF: the order from the canonical graph linearization is ignored, except for the top node;[11] and (iii) RANDOM: constructs a linearization from a random node in the graph, disregarding all order information from the canonical format, but it remains a valid traversal of the graph. All linearizations are converted to a
+
+ | CANON | RECONF | RANDOM |
| FINE-TUNE | 38.0 | 35.6 | 31.3 |
| ADAPT | +0.9 | +0.8 | +0.9 |
| STRUCTADAPT-RGCN | +4.1 | +3.6 | +5.9 |
+
+sequence of node and edge labels using depth-first traversal and used for both training and evaluation. Examples of such graph linearizations are shown in Appendix C.
+
+Table 7 presents the results. Note that while RECONF has a negative impact on all models, STRUCTADAPT has the best performance. ADAPT has similar performance gains over FINE-TUNE in all graph linearizations. Finally, note that for RANDOM, there is a drastic performance drop in FINE-TUNE and the gap between STRUCTADAPT and FINE-TUNE is widest $(+5.9$ BLEU), demonstrating that explicitly encoding the graph structure is beneficial and that STRUCTADAPT is much less impacted by different graph linearizations.
+
+# 6.3 Graph Properties
+
+Table 8 shows the effects of the graph size, graph diameter and reentrancies in the performance. First, note that the BLEU scores decrease as the graph size increases since larger graphs often are more complex. The performance gap between STRUCTADAPT and FINE-TUNE becomes larger for relatively larger graphs, showing that STRUCTADAPT is able to better encode complex graphs. As ADAPT is not aware of the graph connectivity, it has much worse scores compared to STRUCTADAPT, especially for larger graphs.
+
+It is expected that the benefit of the STRUCTADAPT will be more evident for AMR graphs containing larger diameter as the encoder is aware of the input graph structure. As seen in Table 8, similarly to the graph size, the scores decrease as the graph diameter increases. STRUCTADAPT achieves a clear improvement when handling graphs with $\geq 20$ diameter, with a improvement of $+4.2$ BLEU points over FINE-TUNE.
+
+Previous work (Damonte and Cohen, 2019; Szubert et al., 2020) showed that reentrancies (nodes with multiple parents) pose difficulties in encoding AMRs correctly. Because STRUCTADAPT is the only approach to model reentrancies explicitly, we expect it to deal better with these structures. The
+
+Table 7: Differences, with respect to FINE-TUNE, in the BLEU score of the LDC2017T10 test set as a function of different graph linearizations.
+
+| graph size | 1-30 | 31-60 | >60 |
| # datapoints | 548 | 537 | 286 |
| FINE-TUNE | 40.6 | 37.3 | 38.1 |
| ADAPT | +0.5 | +1.4 | +1.1 |
| STRUCTADAPT-RGCN | +2.3 | +4.0 | +4.6 |
| graph diameter | 1-10 | 11-20 | >20 |
| # datapoints | 384 | 769 | 218 |
| FINE-TUNE | 43.3 | 37.6 | 38.5 |
| ADAPT | -0.1 | +1.7 | +0.3 |
| STRUCTADAPT-RGCN | +0.5 | +4.3 | +4.2 |
| # reentrancies | 0 | 1-3 | 4-20 |
| # datapoints | 619 | 664 | 88 |
| FINE-TUNE | 42.9 | 38.0 | 31.3 |
| ADAPT | +0.2 | +1.7 | +0.8 |
| STRUCTADAPT-RGCN | +3.4 | +4.4 | +4.4 |
+
+Table 8: Differences, with respect to FINE-TUNE, in the BLEU score of the LDC2017T10 test set as a function of the graph size, graph diameter and number of reentrancies.
+
+gap between StractADAPT and the other models is widest for examples with more reentrancies, confirming our hypothesis. In particular, when graphs contain $\geq 4$ reentrancies, StractADAPT has an improvement of $+3.6$ BLEU points compared to ADAPT.
+
+# 7 Conclusion
+
+We presented STRUCTADAPT, a novel adapter architecture to explicitly model graph structures into pretrained language models, providing an extensive evaluation of our approach and showing that it achieves state-of-the-art results on two AMR-to-text benchmarks, training much fewer parameters. We also found that STRUCTADAPT is more effective when encoding complex graphs, when trained on fewer datapoints, and is more robust to different graph linearizations and reentries. In future work, we plan to consider other graph-to-text tasks, such as those based on Knowledge Graphs.
+
+# Acknowledgments
+
+We thank our anonymous reviewers for their thoughtful comments. We also would like to thank Jonas Pfeiffer, Jorge Cardona, Juri Opitz, Kevin Stowe, Thy Tran, Tilman Beck and Tim Baumgartner for their feedback on this work. This work has been supported by the German Research Foundation (DFG) as part of the Research Training Group "Adaptive Preparation of Information form Heterogeneous Sources" (AIPHES, GRK 1994/1) and as part of the DFG funded project UKP-SQuARE with the number GU 798/29-1.
+
+# References
+
+Xuefeng Bai, Linfeng Song, and Yue Zhang. 2020. Online back-parsing for AMR-to-text generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1206-1219, Online. Association for Computational Linguistics.
+Laura Banarescu, Claire Bonial, Shu Cai, Madalina Georgescu, Kira Griffith, Ulf Hermjakob, Kevin Knight, Philipp Koehn, Martha Palmer, and Nathan Schneider. 2013. Abstract Meaning Representation for sembanking. In Proceedings of the 7th Linguistic Annotation Workshop and Interoperability with Discourse, pages 178-186, Sofia, Bulgaria. Association for Computational Linguistics.
+Daniel Beck, Gholamreza Haffari, and Trevor Cohn. 2018. Graph-to-sequence learning using gated graph neural networks. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 273-283, Melbourne, Australia. Association for Computational Linguistics.
+Michele Bevilacqua, Rexhina Blloshmi, and Roberto Navigli. 2021. One spring to rule them both: Symmetric amr semantic parsing and generation without a complex pipeline. Proceedings of the AAAI Conference on Artificial Intelligence, 35(14):12564-12573.
+Deng Cai and Wai Lam. 2020. Graph transformer for graph-to-sequence learning. Proceedings of the AAAI Conference on Artificial Intelligence, 34(05):7464-7471.
+Thiago Castro Ferreira, Chris van der Lee, Emiel van Miltenburg, and Emiel Krahmer. 2019. Neural data-to-text generation: A comparison between pipeline and end-to-end architectures. 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 552-562, Hong Kong, China. Association for Computational Linguistics.
+Marco Damonte and Shay B. Cohen. 2019. Structural neural encoders for AMR-to-text generation. 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 3649-3658, Minneapolis, Minnesota. Association for Computational Linguistics.
+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.
+Jeffrey Flanigan, Chris Dyer, Noah A. Smith, and Jaime Carbonell. 2016. Generation from Abstract Meaning Representation using tree transducers. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 731-739, San Diego, California. Association for Computational Linguistics.
+Qiankun Fu, Linfeng Song, Wenyu Du, and Yue Zhang. 2021. End-to-end AMR corefence resolution. 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 4204-4214, Online. Association for Computational Linguistics.
+Claire Gardent, Anastasia Shimorina, Shashi Narayan, and Laura Perez-Beltrachini. 2017. The WebNLG challenge: Generating text from RDF data. In Proceedings of the 10th International Conference on Natural Language Generation, pages 124-133, Santiago de Compostela, Spain. Association for Computational Linguistics.
+Ian J. Goodfellow, Mehdi Mirza, Da Xiao, Aaron Courville, and Yoshua Bengio. 2014. An empirical investigation of catastrophic forgetting in gradient-based neural networks. In Proceedings of International Conference on Learning Representations (ICLR).
+Zhijiang Guo, Yan Zhang, Zhiyang Teng, and Wei Lu. 2019. Densely connected graph convolutional networks for graph-to-sequence learning. Transactions of the Association for Computational Linguistics, 7:297-312.
+Karen Hambardzumyan, Hrant Khachatrian, and Jonathan May. 2021. WARP: Word-level Adversarial ReProgramming. 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 4921-4933, Online. Association for Computational Linguistics.
+Hamza Harkous, Isabel Groves, and Amir Saffari. 2020. Have your text and use it too! end-to-end neural data-to-text generation with semantic fidelity. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2410-2424, Barcelona, Spain (Online). International Committee on Computational Linguistics.
+Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019. Parameter-efficient transfer learning for NLP. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings
+
+of Machine Learning Research, pages 2790-2799.
+PMLR.
+Dirk Hovy, Taylor Berg-Kirkpatrick, Ashish Vaswani, and Eduard Hovy. 2013. Learning whom to trust with MACE. In Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1120-1130, Atlanta, Georgia. Association for Computational Linguistics.
+Jeremy Howard and Sebastian Ruder. 2018. Universal language model fine-tuning for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 328-339, Melbourne, Australia. Association for Computational Linguistics.
+Alexander Miserlis Hoyle, Ana Marasovic, and Noah A. Smith. 2021. Promoting graph awareness in linearized graph-to-text generation. In *Findings of the Association for Computational Linguistics: ACL-IJCNLP* 2021, pages 944–956, Online. Association for Computational Linguistics.
+Mihir Kale. 2020. Text-to-text pre-training for data-to-text tasks. arXiv e-prints.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Thomas N. Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulouse, France, April 24-26, 2017, Conference Track Proceedings.
+James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell. 2017. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521-3526.
+Ioannis Konstas, Srinivasan Iyer, Mark Yatskar, Yejin Choi, and Luke Zettlemoyer. 2017. Neural AMR: Sequence-to-sequence models for parsing and generation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 146-157, Vancouver, Canada. Association for Computational Linguistics.
+Anne Lauscher, Olga Majewska, Leonardo F. R. Ribeiro, Iryna Gurevych, Nikolai Rozanov, and Goran Glavaš. 2020. Common sense or world knowledge? investigating adapter-based knowledge injection into pretrained transformers. In Proceedings of Deep Learning Inside Out (DeeLIO): The First Workshop on Knowledge Extraction and Integration for Deep Learning Architectures, pages 43-49, Online. Association for Computational Linguistics.
+
+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, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880, Online. Association for Computational Linguistics.
+Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. 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 4582-4597, Online. Association for Computational Linguistics.
+Kexin Liao, Logan Lebanoff, and Fei Liu. 2018. Abstract Meaning Representation for multi-document summarization. In Proceedings of the 27th International Conference on Computational Linguistics, pages 1178-1190, Santa Fe, New Mexico, USA. Association for Computational Linguistics.
+Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. 2021. GPT understands, too. CoRR, abs/2103.10385.
+Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2020. Roberta: A robustly optimized bert pretraining approach. arXiv e-prints.
+Manuel Mager, Ramón Fernandez Astudillo, Tahira Naseem, Md Arafat Sultan, Young-Suk Lee, Radu Florian, and Salim Roukos. 2020. GPT-too: A language-model-first approach for AMR-to-text generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1846-1852, Online. Association for Computational Linguistics.
+Linyong Nan, Dragomir Radev, Rui Zhang, Amrit Rau, Abhinand Sivaprasad, Chiachun Hsieh, Xiangru Tang, Aadit Vyas, Neha Verma, Pranav Krishna, Yangxiaokang Liu, Nadia Irwanto, Jessica Pan, Faiaz Rahman, Ahmad Zaidi, Mutethia M tuma, Yasin Tarabar, Ankit Gupta, Tao Yu, Yi Chern Tan, Xi Victoria Lin, Caiming Xiong, Richard Socher, and Nazneen Fatema Rajani. 2021. DART: Open-domain structured data record to text generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 432-447, Online. Association for Computational Linguistics.
+Juri Opitz, Angel Daza, and Anette Frank. 2021. Weisfeiler-leman in the bamboo: Novel amr graph metrics and a benchmark for amr graph similarity. Transactions of the Association for Computational Linguistics.
+
+Juri Opitz and Anette Frank. 2021. Towards a decomposable metric for explainable evaluation of text generation from AMR. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1504-1518, Online. Association for Computational Linguistics.
+Juri Opitz, Letitia Parcalabescu, and Anette Frank. 2020. AMR similarity metrics from principles. Transactions of the Association for Computational Linguistics, 8:522-538.
+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.
+Ankur Parikh, Xuezhi Wang, Sebastian Gehrmann, Manaal Faruqui, Bhuwan Dhingra, Diyi Yang, and Dipanjan Das. 2020. ToTTo: A controlled table-to-text generation dataset. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1173-1186, Online. Association for Computational Linguistics.
+Jonas Pfeiffer, Aishwarya Kamath, Andreas Rückle, Kyunghyun Cho, and Iryna Gurevych. 2021. AdapterFusion: Non-Destructive Task Composition for Transfer Learning. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics (EACL), Online. Association for Computational Linguistics.
+Jonas Pfeiffer, Andreas Rückle, Clifton Poth, Aishwarya Kamath, Ivan Vulic, Sebastian Ruder, Kyunghyun Cho, and Iryna Gurevych. 2020a. AdapterHub: A framework for adapting transformers. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 46-54, Online. Association for Computational Linguistics.
+Jonas Pfeiffer, Ivan Vulic, Iryna Gurevych, and Sebastian Ruder. 2020b. MAD-X: An Adapter-Based Framework for Multi-Task Cross-Linguual Transfer. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7654–7673, Online. Association for Computational Linguistics.
+Maja Popovic. 2015. *chrF: character n-gram F-score* for automatic MT evaluation. In *Proceedings of the Tenth Workshop on Statistical Machine Translation*, pages 392–395, Lisbon, Portugal. Association for Computational Linguistics.
+Nima Pourdamghani, Kevin Knight, and Ulf Hermjakob. 2016. Generating English from Abstract Meaning Representations. In Proceedings of the 9th International Natural Language Generation conference, pages 21-25, Edinburgh, UK. Association for Computational Linguistics.
+
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. In Technical report, OpenAI.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2019. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv e-prints.
+Sylvestre-Alvise Rebuffi, Hakan Bilen, and Andrea Vedaldi. 2017. Learning multiple visual domains with residual adapters. In Advances in Neural Information Processing Systems, volume 30, pages 506-516. Curran Associates, Inc.
+Leonardo F. R. Ribeiro, Claire Gardent, and Iryna Gurevych. 2019. Enhancing AMR-to-text generation with dual graph 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 3183-3194, Hong Kong, China. Association for Computational Linguistics.
+Leonardo F. R. Ribeiro, Jonas Pfeiffer, Yue Zhang, and Iryna Gurevych. 2021. Smelting gold and silver for improved multilingual amr-to-text generation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Punta Cana, November 7-11, 2021.
+Leonardo F. R. Ribeiro, Martin Schmitt, Hinrich Schütze, and Iryna Gurevych. 2020a. Investigating pretrained language models for graph-to-text generation. arXiv e-prints.
+Leonardo F. R. Ribeiro, Yue Zhang, Claire Gardent, and Iryna Gurevych. 2020b. Modeling global and local node contexts for text generation from knowledge graphs. Transactions of the Association for Computational Linguistics, 8:589-604.
+Michael Sejr Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. 2018. Modeling relational data with graph convolutional networks. In ESWC 2018, Heraklion, Crete, Greece, June 3-7, 2018, Proceedings, pages 593-607.
+Martin Schmitt, Leonardo F. R. Ribeiro, Philipp Dufter, Iryna Gurevych, and Hinrich Schütze. 2021. Modeling graph structure via relative position for text generation from knowledge graphs. In Proceedings of the Fifteenth Workshop on Graph-Based Methods for Natural Language Processing (TextGraphs-15), pages 10-21, Mexico City, Mexico. Association for Computational Linguistics.
+Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational
+
+Linguistics (Volume 1: Long Papers), pages 1715-1725, Berlin, Germany. Association for Computational Linguistics.
+Linfeng Song, Daniel Gildea, Yue Zhang, Zhiguo Wang, and Jinsong Su. 2019. Semantic neural machine translation using amr. Transactions of the Association for Computational Linguistics, 7:19-31.
+Linfeng Song, Yue Zhang, Zhiguo Wang, and Daniel Gildea. 2018. A graph-to-sequence model for AMR-to-text generation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1616-1626, Melbourne, Australia. Association for Computational Linguistics.
+Ida Szubert, Marco Damonte, Shay B. Cohen, and Mark Steedman. 2020. The role of reentrancies in Abstract Meaning Representation parsing. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 2198-2207, Online. Association for Computational Linguistics.
+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 I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 5998-6008. Curran Associates, Inc.
+Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. 2018. Graph attention networks. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings.
+Pavlos Vougiouklis, Hady Elsahar, Lucie-Aimée Kaffee, Christophe Gravier, Frédérique Laforest, Jonathon Hare, and Elena Simperl. 2018. Neural wikipedian: Generating textual summaries from knowledge base triples. Journal of Web Semantics, 52-53:1 - 15.
+Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2019. Superglue: A stickier benchmark for general-purpose language understanding systems. In H. Wallach, H. Larochelle, A. Beygelzimer, F. Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 3266-3280.
+Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353-355, Brussels, Belgium. Association for Computational Linguistics.
+
+Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funpowicz, and Jamie Brew. 2019. Huggingface's transformers: State-of-the-art natural language processing.
+Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. 2019. How powerful are graph neural networks? In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019.
+Jeffrey O. Zhang, Alexander Sax, Amir Zamir, Leonidas J. Guibas, and Jitendra Malik. 2019. Sidetuning: Network adaptation via additive side networks. arXiv e-prints.
+Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. 2020a. *Bertscore: Evaluating text generation with BERT.* In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020.
+Yan Zhang, Zhijiang Guo, Zhiyang Teng, Wei Lu, Shay B. Cohen, Zuozhu Liu, and Lidong Bing. 2020b. Lightweight, dynamic graph convolutional networks for AMR-to-text generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2162-2172, Online. Association for Computational Linguistics.
+
+# Appendices
+
+In this supplementary material, we detail experiments' settings and additional information about the human evaluation and graph representations.
+
+# A Details of Models and Hyperparameters
+
+The experiments were executed using the version 3.3.1 of the transformers library released by Hugging Face (Wolf et al., 2019). In Table 9, we report the hyperparameters used to train the models presented in this paper. We train until the development set BLEU has not improved for 5 epochs.
+
+ | learning rate | batch size | beam search size |
| FINE-TUNE | 3e-05 | 4 | 5 |
| FT-TOP2 | 1e-04 | 4 | 5 |
| FT-Bottom2 | 1e-04 | 4 | 5 |
| ADAPT | 1e-04 | 4 | 5 |
| STRUCTADAPT | 1e-04 | 4 | 5 |
+
+# B Details on the Human Evaluation
+
+The human evaluation was conducted via Amazon Mechanical Turk. We randomly select 100 generated texts for each of the 3 sets and each adapter model (ADAPT, STRUCTADAPT-GCN), with a total of 600 texts to be evaluated. The annotators then rate the meaning similarity on a 1-7 Likert scale. For each text, we collect scores from 3 annotators. We use MACE (Hovy et al., 2013) to further improve upon these raw answers by unsupervised estimation of worker trustworthiness and subsequent recovery of the most likely score. Models are ranked according to the mean of sentence-level scores. We defined a filter for all our evaluations, allowing to participate only workers who have more than 5000 HITs approved and with an acceptance rate of $95\%$ or higher. The task took workers a median time of 1.6 minutes per pair of sentences. We apply a quality control step filtering workers who do not score some faked and known sentences properly or did the experiment in a very short time.
+
+# C Example of Graph Linearizations
+
+In Table 10, we present three different linearizations for the same AMR graph and its corresponding reference sentence. Figure 5 shows the two possible graphs that are represented by the linearizations. In particular, Figure 5a shows a graph that is represented by CANON and RECONF linearizations
+
+and Figure 5b shows a graph that is represented by RANDOM. Note that whereas the linearizations can greatly differ from each other, the graph structure for all linearizations remains very similar.
+
+
+Figure 5: Two AMR graphs with the same meaning.
+
+
+
+Table 9: Hyperparameter settings for our methods.
+
+| CANON |
| (s / subsidize-01
+:ARG1 (u / utility
+:poss (s2 / she)
+:mod (a / all))) |
| RECONF |
| (s / subsidize-01
+:ARG1 (u / utility
+:mod (a / all)
+:poss (s2 / she))) |
| RANDOM |
| (s2 / she
+:poss-of (u / utility
+:ARG1-of (s / subsidize-01)
+:mod (a / all))) |
| SENTENCE: Her utilities are all subsidized. |
+
+Table 10: Different linearizations for an AMR graph.
\ No newline at end of file
diff --git a/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/images.zip b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..a8f8e7322a70c0248fb18df8e881f77f2d33d70a
--- /dev/null
+++ b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f041651dcea2d9cc2a5cfa68f5ae3f06ccb2c44d4be1d1d4d6f916e8ad788cce
+size 533900
diff --git a/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/layout.json b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..41b6fb79ecb683e4b12dd4928605a989b8620a69
--- /dev/null
+++ b/structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:26bd6b12f14ec7356ff43c91797b9620a6e7ce689feeacf0504219ab8974a06f
+size 491691
diff --git a/structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_content_list.json b/structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..941123e7adf8bb87792207c464b30c09e4357469
--- /dev/null
+++ b/structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a03db2f7400babe2a820d4aef38412b6781c2c04f5d41eacb1ed0d284609969a
+size 89839
diff --git a/structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_model.json b/structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..f3c7afc07439aab44e810307845ad912042dc881
--- /dev/null
+++ b/structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e613578537dfb0441cdff096ba3d21f087695acea21de0661c12bf8038e522c1
+size 106639
diff --git a/structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_origin.pdf b/structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..86c27691d5ae71dee8907aa4bdb1975b767a3671
--- /dev/null
+++ b/structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3ef4326dc1c031d5cefbab3c48968940d82deeb42ebbb3307fcb8bd35ecae129
+size 393517
diff --git a/structureaugmentedkeyphrasegeneration/full.md b/structureaugmentedkeyphrasegeneration/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..cad79bd39cd193a203c7f0d60c46e04ed7a9dac7
--- /dev/null
+++ b/structureaugmentedkeyphrasegeneration/full.md
@@ -0,0 +1,370 @@
+# Structure-Augmented Keyphrase Generation
+
+Jihyuk Kim
+
+Yonsei University
+
+jihyukkim@yonsei.ac.kr
+
+Seungtaek Choi
+
+Yonsei University
+
+hist0613@yonsei.ac.kr
+
+Myeongho Jeong
+
+Yonsei University
+
+wag9611@yonsei.ac.kr
+
+Seung-won Hwang*
+
+Seoul National University
+
+seungwonh@snu.ac.kr
+
+# Abstract
+
+This paper studies the keyphrase generation (KG) task for scenarios where structure plays an important role. For example, a scientific publication consists of a short title and a long body, where the title can be used for de-emphasizing unimportant details in the body. Similarly, for short social media posts (e.g., tweets), scarce context can be augmented from titles, though often missing. Our contribution is generating/augmenting structure then encoding these information, using existing keyphrases of other documents, complementing missing/incomplete titles. Specifically, we first extend the given document with related but absent keyphrases from existing keyphrases, to augment missing contexts (generating structure), and then, build a graph of keyphrases and the given document, to obtain structure-aware representation of the augmented text (encoding structure). Our empirical results validate that our proposed structure augmentation and structure-aware encoding can improve KG for both scenarios, outperforming the state-of-the-art1.
+
+# 1 Introduction
+
+Keyphrases not only help human readers to gain immediate insights about a given document, but also make documents queryable, e.g., by hashtagging social posts with predicted keyphrases. Among keyphrase tasks, we focus on tasks that allow words that are not present in the given document, which often be called absent words, to be keyphrases, as the input document can be often context-scarce: Many potentially relevant keyphrases are missing in the given document, since the keyphrase can be expressed in terms different from those present in the document (i.e., vocabulary mismatch).
+
+Our goal is to generate keyphrases that are likely to be words absent from the document, especially
+
+| Field | Text |
| Title | Methods to tell if a question can be answered from a paragraph |
| Question | ... Is there any existing research in telling whether or not a question is answerable? ...
+...
+... I considered textual entailment, but it doesn’t seem to be exactly what I’m looking for ... |
| Existing Keyphrases | ..., “natural language processing”, “formal languages”, ... |
| Gold Keyphrases | “question answering”, “natural language processing” |
+
+Table 1: An example of a social Q&A post consisting of a title and the main body question: We present gold keyphrases labeled by the user, and existing keyphrases labeled for other related posts. **Bold-face** words can indicate the topic of the post.
+
+in the following scenarios: (a) scientific publications with diverse vocabularies, or (b) short social posts, where we found that, from public and real-life datasets we used in our evaluation, $37\%$ of keyphrases in scientific publications, $67\%$ of hashtags, on average, in social media posts are absent in the given document. Thus, we formulate our problem as keyphrase generation (KG) (Meng et al., 2017) of predicting keyphrases, including absent words as well as present words, adopting encoder-decoder architecture.
+
+A recent trend is leveraging document structure for KG (Chen et al., 2019b), where metadata in documents, e.g., document title, clarifies the meaning of documents (Kim et al., 2021). For illustration, Table 1 shows a social Q&A post consisting of title (the first row) and main body question (the second row), where we need to predict gold keyphrases "question answering" and "natural language processing" (the last row). The concise title enables readers to focus on important parts of the main question (bold-face words), while ignoring details. However, titles often exclude meaningful keyphrases (e.g., "natural language processing" in Table 1) due to their inherent length limitation, and
+
+making matters worse, titles may not exist at all in some social media posts (e.g., tweets).
+
+Our contribution is to construct a structured document $\mathcal{X}^{+}$ , even when the structure is not given, by leveraging observed keyphrases from other documents in the training dataset, to improve both encoding and decoding. For encoding, keyphrases can be used to emphasize relevant parts in $\mathcal{X}$ , similarly done with the title. For decoding, the keyphrases can augment vocabulary, e.g., "natural language processing", from which the decoder can copy words. We stress that our work is designed to work for both closed and open set scenarios, represented by social and scientific document scenario respectively, with the following distinctions:
+
+- Closed set: Hashtags in social media posts are frequently reused (i.e., keyphrases can be copied from observed keyphrases from the training set for decoding).
+- Open set: A significant amount of keyphrases of scientific publications (about $20\%$ in our target scenario) have never been observed in the training dataset (i.e., keyphrases candidate set is open-ended).
+
+Our proposed solution is two-phased: The first phase, to construct a structured document $\mathcal{X}^+$ , augments the given document $\mathcal{X}$ by retrieving relevant keyphrases $\mathcal{R}$ from existing keyphrases in the training dataset. Then, the second phase follows, to encode structure-aware representations on $\mathcal{X}^+$ . We use graph representation to effectively integrate $\mathcal{X}$ and $\mathcal{R}$ , where the graph can be flexibly designed depending on closed/open set scenarios.
+
+Our empirical results validate that generating and encoding document structures significantly improve performance, outperforming the state-of-the-art, for both social and scientific documents.
+
+# 2 Related Work
+
+We briefly explain our target task of KG and introduce our distinction of leveraging structures.
+
+Observing words in the document is a crucial signal for keyphrase tasks, especially for keyphrase extraction (KE) requiring keyphrases to appear in the given document. In contrast, we focus on KG, as our target scenarios require not having such restrictions. KG, to generate absent words, is often modeled as neural encoder-decoder architecture (Sutskever et al., 2014), which generates the keyphrase sequence given the input document (Meng et al., 2017). KG approaches can be
+
+further categorized into two settings: one-to-one (O2O) and one-to-seq (O2S) (Yuan et al., 2020; Ye et al., 2021). In O2O, a model is trained to generate a single keyphrase for each document, and then, for evaluation, the model generates multiple keyphrases using beam search decoding with a large beam size (e.g., 200). On the other hand, in O2S, a model is trained to generate multiple keyphrases where multiple keyphrases for each document are concatenated into a single sequence with a predefined delimiter. Our model follows O2O, as O2O is known to be better for predicting absent keyphrases (Meng et al., 2021) and as absent keyphrases are frequently observed in our target scenario with scarce context. The distinction of our proposal for KG is to leverage structures in documents, to improve both encoder and decoder.
+
+Structures in documents are essential sources of prediction signals (Kim et al., 2021). For example, for a scientific publication consisting of a title and the main body, the structured document enjoys the complementary strength of the two fields: While the main body contains many keywords (i.e., high recall), title, though much shorter, concisely describes the main focus of the paper (i.e., high precision). To leverage such structure, TGNet (Chen et al., 2019b) uses the title to guide the encoder to accurately capture core contents. However, the given title is observed to be often insufficient due to length limitation (Li et al., 2010), which we consistently observed in our evaluations.
+
+As a further extreme, short social media posts may not have titles. Furthermore, because of the length limitation (e.g., 140 character tweets), most keywords may not appear in the given post (i.e., low recall). In such scenarios, one can construct structured posts, to augment posts with missing keywords. For example, TAKG (Wang et al., 2019) utilizes topic modeling, where topics shared across other documents enable the encoder to leverage contexts observed in other related posts. However, a small, fixed number of topics (e.g., 15 or 30) are limited in differentiating diverse documents with similar topics.
+
+Our distinction is overcoming incomplete or missing structure, by generating a virtual structure from existing keyphrases (keyphrases in the train set), from which we "retrieve" terms that can serve as titles or topics for encoding. KG-KE-KR (Chen et al., 2019a) similarly leverages keyphrase retrieval, but they do not use this for structure-aware
+
+encoding and use only for decoding. In contrast, we jointly contextualize the given document and the retrieved keyphrases, to allow both fields to exchange contexts from each other. We empirically validate that our proposed structure-augmented encoding significantly boosts performance.
+
+# 3 Approach
+
+Given a document $\mathcal{X} = \{x_i\}_{i=1}^{N_{\mathcal{X}}}$ with $N_{\mathcal{X}}$ unique words, KG models aim to output a set of target keyphrases, which can be implemented using encoder-decoder architecture. We train a model to predict a single keyphrase, then, for inference, we generate multiple keyphrases using beam search decoding. We denote a single keyphrase with length $T$ by $\mathcal{Y} = [y_1, \ldots, y_T]$ .
+
+In the following sections, we first describe a baseline encoding targeting plain text $\mathcal{X}$ (§3.1), and then, we explain our distinction of generating structure (§3.2.1) and encoding structure (§3.2.2).
+
+In this section, we do not consider pre-existing title $\mathcal{T}$ , but our framework straightforwardly extends for such titles, as we later discuss in §4.4.1.
+
+# 3.1 Baseline: Plain Text Encoding
+
+Targeting plain texts, a novel graph-based encoder was proposed in DivGraphPointer (Sun et al., 2019), outperforming sequence-based encodings such as GRU (Cho et al., 2014) or LSTM (Hochreiter and Schmidhuber, 1997).
+
+For graph construction, a fully connected graph is used, where nodes are unique words in $\mathcal{X}$ . For edges, two adjacency matrices $\overleftarrow{\mathbf{A}}_{ij}^{\mathcal{X}}$ and $\overrightarrow{\mathbf{A}}_{ij}^{\mathcal{X}}$ , using position-based proximity, are obtained for forward and backward direction respectively:
+
+$$
+\begin{array}{l} \overset {\prime} {\mathbf {A}} _ {i j} ^ {\mathcal {X}} = \sum_ {p _ {i} ^ {\mathcal {X}}} \sum_ {p _ {j} ^ {\mathcal {X}}} m a x ((p _ {i} ^ {\mathcal {X}} - p _ {j} ^ {\mathcal {X}}) ^ {- 1}, 0) \\ \overrightarrow {\mathbf {A}} _ {i j} ^ {\mathcal {X}} = \sum_ {p _ {i} ^ {\mathcal {X}}} \sum_ {p _ {j} ^ {\mathcal {X}}} \max \left(\left(p _ {j} ^ {\mathcal {X}} - p _ {i} ^ {\mathcal {X}}\right) ^ {- 1}, 0\right), \tag {1} \\ \end{array}
+$$
+
+where $p_{[i / j]}^{\mathcal{X}}\in \mathcal{P}(x_{[i / j]})$ is a position offset of a unique word $x_{[i / j]}$ in $\mathcal{X}$ .
+
+Given the graph, to contextualize node representations, Graph Convolutional Network (GCN) (Kipf and Welling, 2017) is adopted. We denote the number of stacked graph convolution layers by $L$ , the number of node features by $D$ , and contextualized representations of nodes for $l$ -th layer by $\mathbf{H}_l^{\mathcal{X}} \in \mathbb{R}^{N_{\mathcal{X}} \times D}$ where $\mathbf{H}_1^{\mathcal{X}}$ is obtained from a word embedding matrix. As comprehensive notations, we denote learnable parameters by
+
+$\mathbf{v}$ for vector and $\mathbf{W}$ for matrix, with different super/subscripts.
+
+Starting from $\mathbf{H}_1^{\mathcal{X}}$ , context vectors $\mathbf{C}_l^{\mathcal{X}} \in \mathbb{R}^{N_{\mathcal{X}} \times D}$ are gathered from neighbor nodes using graph convolution, then combined with $\mathbf{H}_l^{\mathcal{X}}$ to produce $\mathbf{H}_{l+1}^{\mathcal{X}}$ (Dauphin et al., 2017):
+
+$$
+\begin{array}{l} \mathbf {C} _ {l} ^ {\chi} = \overleftarrow {\mathbf {A}} ^ {\chi} \mathbf {H} _ {l} ^ {\chi} \overrightarrow {\mathbf {W}} _ {l} ^ {\chi} + \overrightarrow {\mathbf {A}} ^ {\chi} \mathbf {H} _ {l} ^ {\chi} \overrightarrow {\mathbf {W}} _ {l} ^ {\chi} \tag {2} \\ + \mathbf {H} _ {l} ^ {\boldsymbol {\chi}} \tilde {\mathbf {W}} _ {l} ^ {\boldsymbol {\chi}} \\ \end{array}
+$$
+
+$$
+\mathbf {H} _ {l + 1} ^ {\mathcal {X}} = \mathbf {H} _ {l} ^ {\mathcal {X}} + \mathbf {C} _ {l} ^ {\mathcal {X}} \times \sigma \left(\mathbf {G} _ {l} ^ {\mathcal {X}}\right), \tag {3}
+$$
+
+where $\sigma$ denotes sigmoid function, and $\stackrel{\leftrightarrow}{\hat{\mathbf{A}}}^{\mathcal{X}}$ , $\stackrel{\rightarrow}{\hat{\mathbf{A}}}^{\mathcal{X}}$ are normalized matrices with eigenvalues close to 1 for stable training (Kipf and Welling, 2017). In Eq (3), residual addition is employed with $\mathbf{G}_l^{\mathcal{X}} \in \mathbb{R}^{N_{\mathcal{X}} \times D}$ , which helps gradient back-propagation through deep layers (He et al., 2016; Dauphin et al., 2017). $\mathbf{G}_l^{\mathcal{X}}$ is obtained in the same way to $\mathbf{C}_l^{\mathcal{X}}$ in Eq (2) but with different learnable parameters.
+
+We adopt the same graph construction and GCN contextualization, for encoding $\mathcal{X}$ . Built upon the GCN encoder, our distinction is to generate and encode structure for $\mathcal{X}$ .
+
+# 3.2 Proposed: Structure-Augmented KG
+
+Beyond plain text, we aim to leverage structures in documents. Though leveraging the title-body structure in scientific publications has been shown effective (Chen et al., 2019b), the given titles are often found to be incomplete because of limited length (Li et al., 2010), or unavailable (e.g., tweets).
+
+Our goal is, given incomplete or missing structure, to generate and encode structures, to replace missing titles or complement incomplete titles.
+
+# 3.2.1 Generating Structure
+
+To generate structured document $\mathcal{X}^+$ , we leverage existing keyphrases of other documents, specifically similar documents to $\mathcal{X}$ , by adopting an assumption that similar documents tend to have similar keyphrases. Specifically, for each keyphrase $r$ in the training dataset, we first collect supporting documents, having $r$ as one of the ground-truth keyphrases, then concatenate them as a single document, denoted by $\mathcal{S}_r$ , and use $\mathcal{S}_r$ to index $r$ . We then use BM25 search (Robertson and Walker, 1994) with $\mathcal{X}$ as a query, to retrieve top- $K$ relevant keyphrases $\mathcal{R} = [r_1, \dots, r_K]^2$ . Finally, we extend $\mathcal{X}$ with $\mathcal{R}$ , to construct a structured document $\mathcal{X}^+$ .
+
+
+Figure 1: Overall approach: Red-colored words or phrases are texts included in decoded keyphrases. Black edges and blue edges are proximity between nodes, obtained from $\mathcal{X}$ and $\mathcal{R}$ respectively, where the thickness indicates the degree of relatedness between nodes. To construct an integrated graph for social posts, we connect two graphs (from $\mathcal{X}$ and $\mathcal{R}$ ), using green edges, and for scientific articles, we construct a multigraph with two types of edges (for $\mathcal{X}$ and $\mathcal{R}$ ), by merging nodes having the same words, depicted by green nodes.
+
+Having relevant keyphrases $\mathcal{R}$ enhances both encoding and decoding phases, as described next.
+
+# 3.2.2 Encoding Structure
+
+Once we augment $\mathcal{X}$ with $\mathcal{R}$ , our next step is to integrate $\mathcal{X}$ and $\mathcal{R}$ into $\mathcal{X}^+$ , and jointly contextualize contents in $\mathcal{X}^+$ by exchanging contexts between the two fields.
+
+For effective integration, we represent $\mathcal{X}^+$ as an integrated graph, that can be flexibly designed, based on the following principle: A pair of two highly related nodes should be connected by an edge or merged into a single node, while unrelated nodes should be separated from each other.
+
+For encoding $\mathcal{X}$ , we adopt the GCN contextualization, described in §3.1. On the other hand, for $\mathcal{R}$ , graphs are differently encoded for open- and closed-set scenarios, as below.
+
+- Closed set $\mathcal{V}$ : Keyphrases in $\mathcal{R}$ are likely to be reused for the target keyphrases $\mathcal{V}$ , where keyphrase in $\mathcal{R}$ is assigned as a node. The keyphrase can be copied as $\mathcal{V}$ based on the node representation.
+- Open set $\mathcal{V}$ : Keyphrases may not be reused, such that words in $\mathcal{R}$ should be combined with other words to generate novel keyphrases, for which we assign the node with a keyword in $\mathcal{R}$ .
+
+In the following two sections, we introduce our Graph-based Structured Document Encoder, or
+
+GSEnc, specifically for closed (§3.2.3) and open set $\mathcal{V}$ (§3.2.4) respectively.
+
+# 3.2.3 GSEnc for closed set $\mathcal{V}$
+
+Targeting closed set keyphrases, we jointly contextualize word nodes from $\mathcal{X}$ and keyphrase nodes from $\mathcal{R}$ , by building a graph each, then generate connecting edges between the two for propagating contexts across graphs.
+
+Constructing and encoding graph for $\mathcal{X}$ follow §3.1. On the other hand, for $\mathcal{R}$ , we set a single phrase node for each keyphrase, instead of multiple word nodes, to enable a decoder to copy the keyphrase as-is based on the node features. For edge construction, instead of position-based proximity in Eq (1) which is not available for keyphrase nodes, we adopt co-occurrence-based proximity, as frequently co-occurred keyphrases tend to have similar topics3. Specifically, we compute adjacency matrix $\mathbf{A}^{\mathcal{R}}$ as conditional probabilities based on co-occurrence between keyphrases, then, contexts are gathered using graph convolution, similar to Eq (2).
+
+$$
+\mathbf {A} _ {j k} ^ {\mathcal {R}} = p \left(r _ {k} \mid r _ {j}\right) \tag {4}
+$$
+
+$$
+\mathbf {C} _ {l} ^ {\mathcal {R}} = \hat {\mathbf {A}} ^ {\mathcal {R}} \mathbf {H} _ {l} ^ {\mathcal {R}} \hat {\mathbf {W}} _ {l} ^ {\mathcal {R}} + \mathbf {H} _ {l} ^ {\mathcal {R}} \tilde {\mathbf {W}} _ {l} ^ {\mathcal {R}}, \tag {5}
+$$
+
+where $\mathbf{H}_l^{\mathcal{R}}\in \mathbb{R}^{K\times D}$ is node features for $\mathcal{R}$ in $l$ -th layer, $p(r_k|r_j)$ is the probability that $r_k$ co
+
+occurs given $r_j$ , which is computed using the training dataset, and $\hat{\mathbf{A}}^{\mathcal{R}}$ is normalized matrix from $\mathbf{A}^{\mathcal{R}}$ , as in $\hat{\mathbf{A}}^{\mathcal{X}}$ from $\mathbf{A}^{\mathcal{X}}$ .
+
+We now discuss how to connect the two graphs for $\mathcal{X}$ and $\mathcal{R}$ (green edges in Figure1). For such connection, we are inspired by connecting query (keyphrase in our case) and document, using relevance feedbacks, such as clicks on matching query-document pair. As we have no such feedback between each keyphrase $r_j \in \mathcal{R}$ and $\mathcal{X}$ , we can adopt zero-shot query log synthesis (Ma et al., 2021), by using pseudo-relevance feedback (Rocchio, 1971): We treat supporting documents $S_{r_j}$ as feedback documents with pseudo-relevance to $r_j$ , to connect $r_j$ with $\mathcal{X}$ using top- $M$ overlapped words, denoted by $S_{r_j}^*$ , between $S_{r_j}$ and $\mathcal{X}$ . For selecting top- $M$ , an unsupervised signal frequently used is tfidf, to favor words appearing frequently in $S_{r_j}$ (i.e., representative words) but infrequently in other documents (i.e., discriminative words) (Xu and Croft, 2017). Alternatively, query generators can be supervised as a separate task, requiring additional training data, so we adopt the former.
+
+Given $S_{r_j}^*$ , we construct an edge between $x_i$ and $r_j$ , if and only if $x_i$ is included in $S_{r_j}^*$ , then we enable the encoder to estimate a proper edge weight $\overleftrightarrow{\mathbf{A}}_{ij}$ , using graph attention network (Veličković et al., 2018) $^4$ , such that only relevant contexts are exchanged between $\mathcal{X}$ and $\mathcal{R}$ .
+
+$$
+\overleftrightarrow {\mathbf {A}} _ {i j} = f \left(\overleftrightarrow {\mathbf {v}} ^ {\top} \left[ \overleftrightarrow {\mathbf {W}} \mathbf {H} _ {i, l} ^ {\mathcal {X}} \right| \left| \overleftrightarrow {\mathbf {W}} \mathbf {H} _ {j, l} ^ {\mathcal {R}} \right]\right) \tag {6}
+$$
+
+$$
+\mathbf {C} _ {l} ^ {\mathcal {X} \rightarrow \mathcal {R}} = \operatorname {s o f t m a x} \left(\stackrel {\leftrightarrow} {\mathbf {A}} ^ {\top}\right) \stackrel {\leftrightarrow} {\mathbf {W}} \mathbf {H} _ {l} ^ {\mathcal {X}} \in \mathbb {R} ^ {K \times D} \tag {7}
+$$
+
+$$
+\mathbf {C} _ {l} ^ {\mathcal {R} \rightarrow \mathcal {X}} = \operatorname {s o f t m a x} (\overleftrightarrow {\mathbf {A}}) \overleftrightarrow {\mathbf {W}} \mathbf {H} _ {l} ^ {\mathcal {R}} \in \mathbb {R} ^ {N _ {\mathcal {X}} \times D}, \tag {8}
+$$
+
+where $f(\cdot)$ is LeakyReLU nonlinearity (Maas et al., 2013), and $\lvert\lvert\rvert$ denotes concatenation. In addition, we further leverage pseudo-relevance feedbacks, to augment contexts of $r_j$ , by using $\mathcal{S}_{r_j}$ to initialize node features for $r_j$ : $\mathbf{H}_{1,j}^{\mathcal{R}} = \mathbf{E}^\top f(\mathcal{S}_{r_j}) \in \mathbb{R}^D$ , where $\mathbf{E}$ is a trainable word embedding matrix, and $f$ weighs each word in $\mathcal{S}_{r_j}$ . For $f$ , we adopt tfidf5.
+
+Finally, we add all gathered contexts and com
+
+bine these with $\mathbf{H}_l^{[\mathcal{X} / \mathcal{R}]}$ , similar to Eq (3).
+
+$$
+\begin{array}{l} \mathbf {H} _ {l + 1} ^ {\mathcal {X}} = \mathbf {H} _ {l} ^ {\mathcal {X}} + \mathbf {C} _ {l} ^ {\mathcal {X}} \times \sigma (\mathbf {G} _ {l} ^ {\mathcal {X}}) \\ + \mathbf {C} _ {l} ^ {\mathcal {R} \rightarrow \mathcal {X}} \times \sigma \left(\mathbf {G} _ {l} ^ {\mathcal {R} \rightarrow \mathcal {X}}\right) \\ \end{array}
+$$
+
+$$
+\begin{array}{l} \mathbf {H} _ {l + 1} ^ {\mathcal {R}} = \mathbf {H} _ {l} ^ {\mathcal {R}} + \mathbf {C} _ {l} ^ {\mathcal {R}} \times \sigma (\mathbf {G} _ {l} ^ {\mathcal {R}}) \\ + \mathbf {C} _ {l} ^ {\mathcal {X} \rightarrow \mathcal {R}} \times \sigma (\mathbf {G} _ {l} ^ {\mathcal {X} \rightarrow \mathcal {R}}), \\ \end{array}
+$$
+
+where the $\mathbf{G}\mathbf{s}$ are obtained in the same way to Cs but with different learnable parameters.
+
+# 3.2.4 GSEnc for open set $\mathcal{V}$
+
+Targeting open set keyphrases, we jointly contextualize word nodes from both $\mathcal{X}$ and $\mathcal{R}$ .
+
+Since nodes for $\mathcal{X}$ and $\mathcal{R}$ have the same granularity (i.e., word-level nodes), instead of connecting two graphs (for $\mathcal{X}$ and $\mathcal{R}$ ) using edges, we construct a single integrated graph, by merging a node for $\mathcal{X}$ and a node for $\mathcal{R}$ whenever the two nodes correspond to the same word (green nodes in Figure1). Such integration enables contexts scattered across the two fields to be effectively gathered into the merged node, from which other nodes connected to the merged node also can exchange their contexts with each other through the merged node. Though sharing nodes, we use separate edges for $\mathcal{X}$ and $\mathcal{R}$ , for structure-aware encoding. That is, the merged graph becomes a multigraph; we connect a pair of nodes with two types of edges (black edges for $\mathcal{X}$ and blue edges for $\mathcal{R}$ in Figure1). We denote the contextualized features for nodes on the merged graph, including nodes from both $\mathcal{X}$ and $\mathcal{R}$ , by $\mathbf{H}_l^{\mathcal{X}^+_{\mathrm{merged}}}$ .
+
+As in Eq (2), using graph convolution and the two types of edges, we aggregate neighbor contexts from $\mathcal{X}$ and $\mathcal{R}$ , into $\mathbf{C}_l^{\mathcal{X}_{\mathrm{merged}}}$ and $\mathbf{C}_l^{\mathcal{R}_{\mathrm{merged}}}$ respectively, while obtaining $\mathbf{G}_l^{\mathcal{X}_{\mathrm{merged}}}, \mathbf{G}_l^{\mathcal{R}_{\mathrm{merged}}}$ similarly. For adjacency matrix for keywords in $\mathcal{R}$ , we use position-based proximity between two keywords within each keyphrase in $\mathcal{R}$ , as in Eq (1). Then, we combine both contexts to update $\mathbf{H}_l^{\mathcal{X}_{\mathrm{merged}}^{+}}$ .
+
+$$
+\begin{array}{l} \mathbf {H} _ {l + 1} ^ {\mathcal {X} _ {\text {m e r g e d}} ^ {+}} = \mathbf {H} _ {l} ^ {\mathcal {X} _ {\text {m e r g e d}} ^ {+}} \\ + \mathbf {C} _ {l} ^ {\mathcal {X} _ {\text {m e r g e d}}} \times \sigma \left(\mathbf {G} _ {l} ^ {\mathcal {X} _ {\text {m e r g e d}}}\right) \tag {11} \\ + \mathbf {C} _ {l} ^ {\mathcal {R} _ {\mathrm {m e r g e d}}} \times \sigma (\mathbf {G} _ {l} ^ {\mathcal {R} _ {\mathrm {m e r g e d}}}). \\ \end{array}
+$$
+
+Given the contextualized node features at the last GCN layer, such as $(\mathbf{H}_L^{\mathcal{X}},\mathbf{H}_L^{\mathcal{R}})$ or $\mathbf{H}_L^{\mathcal{X}^+}$ , for closed set $\mathcal{V}$ or open set $\mathcal{V}$ respectively, we feed the features into the decoder, to generate keyphrases.
+
+# 3.3 Decoder
+
+The goal of the decoder is to generate a target keyphrase $\mathcal{V} = [y_1,\dots ,y_T]$ with length $T$ , based on the contextualized features on $\mathcal{X}^+$ from the encoder. While standard KG models either copy words from $\mathcal{X}$ or generate words from the predefined vocabulary $\mathcal{V}$ , we have $\mathcal{R}$ as an additional source, which provides valid keyphrase candidates already used for similar documents. To leverage $\mathcal{R}$ for decoding, depending on the application, we allow the decoder to copy either (a) keyphrases (closed set $\mathcal{V}$ ) or (b) words (open set $\mathcal{V}$ ), from $\mathcal{R}$ .
+
+(a) Closed set $\mathcal{V}$ : copying keyphrases In social media posts, a few keyphrases (e.g., trending hashtags) cover most of the potential target keyphrases. Thus, when $\mathcal{V}$ is included in $\mathcal{R}$ , copying a keyphrase (e.g., "natural language processing" in Figure 1) from $\mathcal{R}$ makes efficient decoding.
+
+To copy relevant keyphrases, we compute relevance score $\phi_j$ of each $r_j \in \mathcal{R}$ to $\mathcal{X}$ , using inner product between $\mathbf{H}_{L,j}^{\mathcal{R}}$ and the summarized features for $\mathcal{X}$ , denoted by $\tilde{\mathbf{h}}^{\mathcal{X}}$ :
+
+$$
+\phi_ {j} = \mathbf {H} _ {L, j} ^ {\mathcal {R}} ^ {\top} \tilde {\mathbf {h}} ^ {\mathcal {X}}, \tilde {\mathbf {h}} ^ {\mathcal {X}} = \sum_ {i = 1} ^ {N _ {\mathcal {X}}} \alpha_ {i} \mathbf {H} _ {L, i} ^ {\mathcal {X}} \tag {12}
+$$
+
+$$
+\alpha_ {i} = \operatorname {s o f t m a x} _ {i} \left(\mathbf {v} _ {\text {p o o l}} ^ {\top} \tanh \left(\mathbf {W} _ {\text {p o o l}} \mathbf {H} _ {L, i} ^ {\mathcal {X}}\right)\right). \tag {13}
+$$
+
+Given $\{\phi_j\}_{j = 1}^K$ , we copy top-ranked keyphrases among $\mathcal{R}$ , regarding $\{\phi_j\}_{j = 1}^K$ . For training, we use mean square error (MSE) as the objective function: $\mathcal{L}_{\mathrm{MSE}} = \sum_{j = 1}^{K}||\phi_{j} - \phi_{j}^{*}||_{2}^{2}$ where $\phi_j^* = 1$ if $r_j = \mathcal{V}$ and $\phi_j^* = 0$ otherwise.
+
+(b) Open set $\mathcal{V}$ : copying keywords On the other hand, in scientific publications, copying a word from $\mathcal{R}$ (e.g., "element", "method" in Figure 1) enables the decoder to generate novel keyphrases (e.g., "energetic Galerkin boundary element method"), by combining the word with words from the other two sources (e.g., "energetic Galerkin" from $\mathcal{X}$ ).
+
+We adopt a single layer GRU decoder equipped with copy mechanism (See et al., 2017). For simplicity, we denote $\mathbf{H}_L^{\chi_{\mathrm{merged}}^+}$ by $\mathbf{H}$ and the number of nodes in the merged graph by $N$ . For $t$ -th word (i.e., $y_{t}$ ) decoding, copy scores $p_t^{\mathrm{copy}}$ are computed using attention: $p_{t,k}^{\mathrm{copy}} = \mathrm{softmax}(\mathbf{v}_1^\top \mathbf{W}_1[\mathbf{H}_k||\mathbf{o}_t])$ ,
+
+where $\mathbf{o}_t$ denotes the decoder hidden state. However, $p_t^{\mathrm{copy}}$ only covers $y_{t}$ present in $\mathcal{X}^{+}$ . To predict arbitrary $y_{t}$ using $\nu$ , generation scores $p_t^{\mathrm{gen}}$ are computed by $p_t^{\mathrm{gen}} = \mathrm{softmax}(\mathbf{E}_{\mathcal{V}}(\mathbf{W}_2[\hat{\mathbf{h}}_t||\mathbf{o}_t])$ , where $\mathbf{E}_{\mathcal{V}}\in \mathbb{R}^{|\mathcal{V}|\times D}$ is a learnable word embedding matrix for $\nu$ , and $\hat{\mathbf{h}}_t$ ( $= \sum_{k = 1}^{N}p_{t,k}^{\mathrm{copy}}\mathbf{H}_k$ ) summarizes relevant contexts from $\mathcal{X}^{+}$ , using $p_t^{\mathrm{copy}}$ as relevance scores. The final score $p_t^{\mathrm{final}}$ is computed as a combination of the two scores using a gate value $z_{t}$ : $p_t^{\mathrm{final}} = p_t^{\mathrm{copy}}\times z_t + p_t^{\mathrm{gen}}\times (1 - z_t)$ , and $z_{t} = \sigma (\mathbf{v}_{3}^{\top}[\hat{\mathbf{h}}_{t}||\mathbf{o}_{t}])$ . Once $y_{t}$ is decoded according to $p_t^{\mathrm{final}}$ , we update the decoder hidden state $\mathbf{o}_t$ : $\mathbf{o}_{t + 1} = \mathrm{GRU}(\mathbf{y}_t,\mathbf{o}_t)$ , where $\mathbf{y}_t\in \mathbb{R}^D$ is the feature vector for the decoded token $y_{t}$ .
+
+For $\mathbf{y}_t$ , previous work uses a word embedding matrix. However, when $y_t$ is a rare word, which is often replaced by "[UNK]" symbol, $\mathbf{y}_t$ from the embedding matrix contains little information on the word. We thus leverage structure-aware representation $\mathbf{H}$ , to capture the meaning of $y_t$ based on the contexts within $\mathcal{X}^+$ . Specifically, when $y_t$ is copied from $\mathcal{X}^+$ , similar to $p_t^{\mathrm{final}}$ , we compute $\mathbf{y}_t$ as combination of $\mathbf{H}$ and $\mathbf{E}_{\mathcal{V}}$ from $\mathcal{X}^+$ and $\mathcal{V}$ respectively: $\mathbf{y}_t = \mathbf{H}_{y_t \in \mathcal{X}^+} \times z_t + \mathbf{E}_{y_t \in \mathcal{V}} \times (1 - z_t)$ , where $\mathbf{H}_{y_t \in \mathcal{X}^+}$ , $\mathbf{E}_{y_t \in \mathcal{V}}$ are corresponding vectors for $y_t$ from $\mathbf{H}$ and $\mathbf{E}_{\mathcal{V}}$ respectively.
+
+Following convention (Meng et al., 2017), to predict multiple keyphrases, we use beam search with beam size 200, and then use top-ranked keyphrases as final predictions. For training, we use cross entropy loss on $y_{t}$ as the objective function.
+
+# 4 Experiment
+
+# 4.1 Dataset
+
+| Dataset | # of D | # of unique KP | # of KP per D | % of abs KP |
| Twitter | 44K | 4K | 1.13 | 71.4 |
| Weibo | 46K | 2K | 1.06 | 75.7 |
| SE | 49K | 12K | 2.43 | 54.3 |
| KP20k | 510K | 670K | 2.94 | 36.7 |
+
+Table 2: Statistics for three social datasets and a scientific publication dataset. "D" and "KP" are short for document and keyphrases respectively. "abs KP" denotes absent keyphrases. SE denotes StackExchange.
+
+We conducted experiments on social media posts and scientific publication, with missing or incomplete structures. We present statistics on the datasets in Table 2.
+
+For social media posts, we used three public datasets including not only microblog posts such
+
+as Twitter and Weibo, but also a Q&A platform such as StackExchange (Wang et al., 2019). In the Twitter and Weibo datasets, user-assigned hashtags are treated as keyphrases of a corresponding post. Hashtags in the middle of a post were treated as present keyphrases, and hashtags either before or after a post were treated as absent keyphrases and are removed from the post. For the StackExchange dataset, a given document is a question, and keyphrases are manually annotated by users. Different from microblogs, for each question, there is a title and a description such that the given document is a concatenation of the title and the description for the question. For training and evaluation, document-keyphrase pairs are partitioned into train, validation, and test splits consisting of $80\%$ , $10\%$ , and $10\%$ of the entire data respectively.
+
+As in (Wang et al., 2019), we adopted macroaveraged F1@k and mean average precision (mAP) as evaluation metrics. To compute F1@k, we count the number of correct keyphrases among the top-k predictions (denoted by hit@k), then, precision and recall are computed as hit@k divided by the number of predictions (i.e., k) and the number of gold keyphrases respectively. We report F1@1/3 for Twitter/Weibo and F1@3/5 for StackExchange considering the average number of keyphrases in datasets (1.13, 1.06, and 2.43 respectively). For all datasets, we report mAP over the top-5 predictions.
+
+For scientific publication, we use KP20k dataset (Meng et al., 2017). Since the original dataset includes duplicates between train/test documents, we use a preprocessed dataset without duplicates, released by (Chen et al., 2019a) $^{8}$ . The dataset has 510K, 20K, 20K documents for train, validation, and test datasets respectively. As in the baselines, we use F1@5/10 as evaluation metrics.
+
+For all datasets, following (Meng et al., 2017), we applied stemming using Porter Stemmer (Porter, 1980) as preprocessing, where duplicate keyphrases were removed after stemming.
+
+# 4.2 Baselines
+
+We compared our models with previous state-of-the-art KG baselines as well as KE baselines.
+
+For KE baselines, we use TextRank (Mihalcea and Tarau, 2004) and TF-IDF which are the most
+
+popular unsupervised keyword ranking models, and a neural sequence tagging model (Zhang et al., 2016) (denoted by Seq-Tag) that predicts keyphrase spans within the given document.
+
+For KG baselines, we use CopyRNN (Meng et al., 2017) and CorrRNN (Chen et al., 2018) in common for both social media posts and scientific publication. CopyRNN adopts standard encoder-decoder architecture with copy mechanism. CorrRNN exploits correlation between keyphrases to predict diverse keyphrases. We compare our proposed model with the previous state-of-the-art baselines, including TAKG (Wang et al., 2019) for social media post datasets, that augments contexts of the given posts using topic modeling, and KG-KEKR-M (Chen et al., 2019a) for KP20k, that uses the retrieved keyphrases $\mathcal{R}$ to provide the decoder with additional contexts. Note that, different from ours, KG-KE-KR-M separately encodes $\mathcal{X}$ and $\mathcal{R}$ , thus do not enjoy structure-aware representations.
+
+To validate the effectiveness of joint contextualization of $\mathcal{X}$ and $\mathcal{R}$ on the graph, we also conduct an ablation study, where we compare our proposed model to the ablation model that separately encodes the graph for $\mathcal{X}$ and the graph for $\mathcal{R}$ (denoted by w/o integration). For social media posts, we exclude all edges between $\mathcal{X}$ and $\mathcal{R}$ (green edges in Figure 1). For scientific publication, we separately encode two graphs (each for $\mathcal{X}$ or $\mathcal{R}$ ) instead of a merged multigraph. The ablation model is similar to KG-KE-KR-M that also separately encodes $\mathcal{X}$ and $\mathcal{R}$ , while differing in the encoder (graph encoder, instead of sequence encoder).
+
+# 4.3 Implementation Details
+
+For fair comparisons, we use the same hyperparameters and training strategy to the baselines, such as the size of the predefined vocabulary $\mathcal{V}$ , batch size of 64, Adam optimizer (Kingma and Ba, 2015) with 0.001 initial learning rate, and gradient clipping (Pascanu et al., 2013) with 1.0 threshold.
+
+As exceptions, we set the best value for $D$ , $L$ , $K$ , and $M$ , based on validation performance. The best $D$ , among $\{150,300\}$ , was 300 for all datasets. The best $L$ , among $\{2,3,4,5\}$ , was 2 for social datasets and 3 for KP20k. The best $K$ , among $\{10,20,30,40,50\}$ , was 20/20/30, for Twitter/Weibo/StackExchange respectively. Because of the larger number of keyphrases per document in StackExchange (2.43) than Twitter (1.13) and Weibo (1.06), $K$ should be larger in StackEx
+
+| Model | Social media post | Scientific articles |
| Twitter | Weibo | StackExchange | KP20k |
| F1@1 | F1@3 | mAP | F1@1 | F1@3 | mAP | F1@3 | F1@5 | mAP | F1@5 | F1@10 |
| KE baselines | | | | | | | | | | | |
| TF-IDF | 1.2 | 1.1 | 1.9 | 1.9 | 1.5 | 2.5 | 13.5 | 12.7 | 12.6 | 8.7 | 11.3 |
| TextRank | 1.7 | 1.9 | 1.9 | 0.2 | 0.5 | 0.6 | 6.0 | 8.3 | 4.8 | 15.1 | 13.2 |
| Seq-Tag | 22.83 | 12.32 | 22.43 | 16.32 | 9.01 | 16.53 | 17.616 | 12.812 | 19.013 | - | - |
| KG w/o structure | | | | | | | | | | | |
| CopyRNN | 36.611 | 26.85 | 43.112 | 32.03 | 22.72 | 38.01 | 31.53 | 27.42 | 33.51 | 30.61 | 27.30 |
| CorrRNN | 35.08 | 26.14 | 41.65 | 31.67 | 22.25 | 37.58 | 30.93 | 27.02 | 32.96 | 29.12 | 26.42 |
| KG-KE-KR-M | - | - | - | - | - | - | - | - | - | 31.70 | 28.20 |
| KG w/ structure | | | | | | | | | | | |
| TAKG (topic) | 38.53 | 27.80 | 45.12 | 35.03 | 24.42 | 41.34 | 33.42 | 29.21 | 35.51 | - | - |
| TGNet (title) | - | - | - | - | - | - | 32.03 | 27.83 | 34.14 | 31.43 | 28.13 |
| KG w/ structure (ours) | | | | | | | | | | | |
| GSEnc (keyphrase) | 38.87 | 28.12 | 45.56 | 42.86 | 29.53 | 50.04 | 35.23 | 30.92 | 37.83 | 32.93 | 29.02 |
| w/o integration | 36.84 | 27.05 | 43.32 | 38.64 | 27.03 | 45.73 | 33.23 | 29.32 | 35.52 | 31.93 | 27.92 |
+
+Table 3: Keyphrase prediction performance. Bold-face indicates the best performance with significance $(p < 0.05$ using Student's paired t-test). We report average performance with standard deviation with different random seeds of 5 runs (e.g., $29.4_{1}$ indicates $29.4\pm 0.1$ ).
+
+change. For fair comparison with KG-KE-KR-M that uses the retrieved keyphrases, we used the same $\mathcal{R}$ used in KG-KE-KR-M, for KP20k. For $M$ for social media posts (§3.2.3), we search the best value among $\{10, 25, 50, 100\}$ . The best $M$ was 50 for both Twitter and Weibo, while it was 25 for StackExchange. Since documents are longer in StackExchange (88 words on average) than Twitter (20) and Weibo (33) with length limitation, smaller $M$ makes more conservative edge construction.
+
+Our experiments were conducted using a single GeForce RTX 2080Ti NVIDIA GPU. We used Pytorch (Paszke et al., 2019) for implementation.
+
+# 4.4 Evaluation
+
+In this section, we confirm the effectiveness of structures in documents for KG, and validate the superiority of the proposed structure over other structures. Results are shown in Table 3.
+
+Since large portion of ground-truth keyphrases are absent keyphrases (i.e., context-scarce $\mathcal{X}$ ), KE models show significantly worse performances compared to KG models, on both datasets.
+
+Among KG models, structures in document significantly improve performances, for both datasets, where TAKG with latent topics and TGNet with title significantly outperform the other KG models without structures, except KG-KE-KR-M on KP20k. However, both a small number of latent topics and short titles have limited information. In contrast, by retrieving relevant keyphrases from existing keyphrases, we augment the given document with sufficient topical information. As a result, GSEnc outperforms all baselines, except TAKG on
+
+Twitter with comparable performance.
+
+For social datasets, in addition to having superior or comparable performance over baselines, our proposed model, by avoiding sequential decoding, requires much lower computational costs than other KG models. Regarding computational efficiency, our model can process each text in about $22\mathrm{ms}$ (21 ms for retrieving $\mathcal{R}$ and less than 1 ms for the rest) while other KG approaches consume about $90~\mathrm{ms}$ .
+
+Meanwhile, we stress that it is important to jointly contextualize $\mathcal{X}$ and $\mathcal{R}$ , to enjoy mutual benefits between them; we found that performance significantly decrease on all datasets, when we separately encode them (w/o integration in Table 3).
+
+4.4.1 Integrating $\mathcal{R}$ with given titles
+
+| Model | Input | KP20k | SE |
| F1@3 | F1@5 |
| TGNet | X+T | 31.4 | 32.0 |
| GSEnc (ours) | X+R | 32.9 | 35.4 |
| X+R+T | 32.9 | 36.3 |
+
+Table 4: Evaluation results using different structures: SE denotes for StackExchange dataset.
+
+When titles are available, we can use $\mathcal{R}$ , to complement concise, but incomplete titles (high precision, low recall), by providing missing terms in the title (increasing recall). In this section, we explain how to integrate $\mathcal{R}$ and title (denoted by $\mathcal{T}$ ), for better structured documents, and evaluate the effectiveness of such integration. We use KP20k and StackExchange datasets where titles of documents are written by the authors of the documents.
+
+Since the title words are already represented as nodes in $\mathcal{X}$ , we can simply add another edge type,
+
+as similarly done in §3.2.4, to make three types of edges for the same node pair: edges from $\mathcal{X}$ , $\mathcal{R}$ , and the given title respectively. As in edges for $\mathcal{X}$ , we use position-based proximity between title words, for edge weights. Given the title edges, we use contexts gathered from the title, to update contextualized representations, similar to Eq (3,9). The results are shown in Table 4.
+
+We observe that $\mathcal{R}$ is more representative in KP20k than StackExchange, where the F1 accuracy of $\mathcal{R}$ on gold keywords was 22.3 and 11.5, for KP20k and StackExchange respectively. This can be explained by the document length difference: When $\mathcal{R}$ is less relevant, for shorter documents in StackExchange, titles with high precision capture relevant keyphrases in $\mathcal{R}$ , such that $\mathcal{X} + \mathcal{R} + \mathcal{T}$ outperforms $\mathcal{X} + \mathcal{R}$ , while $\mathcal{X} + \mathcal{R}$ is sufficiently accurate, otherwise. Our proposed approach, by leveraging both fields, work well in both cases, outperforming TGNet that uses only title structure.
+
+# 4.4.2 Future work
+
+| Model (Input) | ID test | OOD test |
| KP20k | Inspec |
| CopyRNN(X) | 30.6 | 25.1 |
| GSEnc(X+R) | 32.9 | 24.4 |
+
+Table 5: Different effects of leveraging $\mathcal{R}$ , for in-distribution (ID) and out-of-distribution (OOD) test datasets. We present F1@5 performance of CopyRNN and GSEnc (ours), that uses $\mathcal{X}$ and $\mathcal{X} + \mathcal{R}$ as inputs, respectively.
+
+Leveraging existing keyphrases in train set is specifically effective when test distribution is similar to the train distribution, i.e., in-distribution test set, as we validated in our experiments. On the other hand, for out-of-distribution test set, where train/test distributions are different from each other, existing keyphrases may not be helpful. We empirically tested different effects of leveraging $\mathcal{R}$ by training models using KP20k training dataset and evaluating the models on KP20k test set (in-distribution) and Inspec (Hulth, 2003) test set (out-of-distribution). While, in KP20k datasets, keyphrases are labeled by authors of documents, keyphrases in Inspec are labeled by third-party annotators. In Table 5, we can observe that $\mathcal{R}$ does not improve on out-of-distribution test set, while showing significant improvements on indistribution test set.
+
+To overcome, as a future work, our retriever can be extended to use external sources such as
+
+open-domain knowledge graphs (Shi et al., 2017) or Wikipedia texts (Yu and Ng, 2018), that generalize well to out-of-distribution data. However, such external sources will be less effective than internal sources (e.g., existing keyphrases), when most of target documents are in-distribution documents. We will explore effective integration strategies between internal/external sources, to enjoy complementary strengths of those, for better performance on both in-distribution and out-of-distribution documents.
+
+# 5 Conclusion
+
+We studied the problem of KG for scientific text and social posts, representing context-scarce scenarios with open and closed keyphrase set, respectively. Our work is two-phased, for augmenting and encoding missing/incomplete structure. Empirical evaluation results validate that our proposed model outperforms the state-of-the-art in both problems.
+
+# Acknowledgments
+
+This work is supported by IITP grants (ITRC, 2021-2020-0-01789, 2021-2016-0-00464) and SNU AI Graduate School Program (2021-0-01343).
+
+# References
+
+Jun Chen, Xiaoming Zhang, Yu Wu, Zhao Yan, and Zhoujun Li. 2018. Keyphrase generation with correlation constraints. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4057-4066, Brussels, Belgium. Association for Computational Linguistics.
+Wang Chen, Hou Pong Chan, Piji Li, Lidong Bing, and Irwin King. 2019a. An integrated approach for keyphrase generation via exploring the power of retrieval and extraction. 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 2846-2856, Minneapolis, Minnesota. Association for Computational Linguistics.
+Wang Chen, Yifan Gao, Jiani Zhang, Irwin King, and Michael R Lyu. 2019b. Title-guided encoding for keyphrase generation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 6268-6275.
+Kyunghyun Cho, Bart van Merrienboer, Caglar Gul- cehre, 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.
+Yann N Dauphin, Angela Fan, Michael Auli, and David Grangier. 2017. Language modeling with gated convolutional networks. In International conference on machine learning, pages 933-941.
+Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778.
+Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735-1780.
+Anette Hulth. 2003. Improved automatic keyword extraction given more linguistic knowledge. In Proceedings of the 2003 conference on Empirical methods in natural language processing, pages 216-223.
+Jihyuk Kim, Young-In Song, and Seung-won Hwang. 2021. Web document encoding for structure-aware keyphrase extraction. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 1823-1827.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Thomas N. Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulouse, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net.
+Decong Li, Sujian Li, Wenjie Li, Wei Wang, and Weiguang Qu. 2010. A semi-supervised key phrase extraction approach: learning from title phrases through a document semantic network. In Proceedings of the ACL 2010 conference short papers, pages 296-300.
+Jimmy Lin, Xueguang Ma, Sheng-Chieh Lin, Jheng-Hong Yang, Ronak Pradeep, and Rodrigo Nogueira. 2021. Pyserini: An easy-to-use python toolkit to support replicable in research with sparse and dense representations. arXiv preprint arXiv:2102.10073.
+Ji Ma, Ivan Korotkov, Yinfei Yang, Keith Hall, and Ryan McDonald. 2021. Zero-shot neural passage retrieval via domain-targeted synthetic question generation. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1075-1088.
+
+Andrew L Maas, Awni Y Hannun, and Andrew Y Ng. 2013. Rectifier nonlinearities improve neural network acoustic models. In Proc. icml, volume 30, page 3. Citeseer.
+Rui Meng, Xingdi Yuan, Tong Wang, Sanqiang Zhao, Adam Trischler, and Daqing He. 2021. An empirical study on neural keyphrase generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4985-5007, Online. Association for Computational Linguistics.
+Rui Meng, Sanqiang Zhao, Shuguang Han, Daqing He, Peter Brusilovsky, and Yu Chi. 2017. Deep keyphrase generation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 582-592, Vancouver, Canada. Association for Computational Linguistics.
+Rada Mihalcea and Paul Tarau. 2004. Textrank: Bringing order into text. In Proceedings of the 2004 conference on empirical methods in natural language processing, pages 404-411.
+Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. 2013. On the difficulty of training recurrent neural networks. In Proceedings of the 30th International Conference on International Conference on Machine Learning - Volume 28, ICML'13, page III-1310-III-1318. JMLR.org.
+Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024-8035. Curran Associates, Inc.
+Martin F Porter. 1980. An algorithm for suffix stripping. Program.
+Stephen E Robertson and Steve Walker. 1994. Some simple effective approximations to the 2-poisson model for probabilistic weighted retrieval. In SI-GIR'94, pages 232-241. Springer.
+Joseph Rocchio. 1971. Relevance feedback in information retrieval. The Smart retrieval system-experiments in automatic document processing, pages 313-323.
+Abigail See, Peter J. Liu, and Christopher D. Manning. 2017. Get to the point: Summarization with pointer-generator networks. In Proceedings of the 55th Annual Meeting of the Association for Computational
+
+Linguistics (Volume 1: Long Papers), pages 1073-1083, Vancouver, Canada. Association for Computational Linguistics.
+Wei Shi, Weiguo Zheng, Jeffrey Xu Yu, Hong Cheng, and Lei Zou. 2017. Keyphrase extraction using knowledge graphs. Data Science and Engineering, 2(4):275-288.
+Zhiqing Sun, Jian Tang, Pan Du, Zhi-Hong Deng, and Jian-Yun Nie. 2019. Divgraphpointer: A graph pointer network for extracting diverse keyphrases. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 755-764.
+Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104-3112.
+Petar Velicković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. 2018. Graph attention networks. In International Conference on Learning Representations.
+Yue Wang, Jing Li, Hou Pong Chan, Irwin King, Michael R. Lyu, and Shuming Shi. 2019. Topi- aware neural keyphrase generation for social media language. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2516-2526, Florence, Italy. Association for Computational Linguistics.
+Jinxi Xu and W Bruce Croft. 2017. Query expansion using local and global document analysis. In Acm SIGIR forum, volume 51, pages 168-175. ACM New York, NY, USA.
+Jiacheng Ye, Tao Gui, Yichao Luo, Yige Xu, and Qi Zhang. 2021. One2Set: Generating diverse keyphrases as a set. 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 4598-4608, Online. Association for Computational Linguistics.
+Yang Yu and Vincent Ng. 2018. Wikirank: Improving keyphrase extraction based on background knowledge. arXiv preprint arXiv:1803.09000.
+Xingdi Yuan, Tong Wang, Rui Meng, Khushboo Thaker, Peter Brusilovsky, Daqing He, and Adam Trischler. 2020. One size does not fit all: Generating and evaluating variable number of keyphrases. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7961-7975, Online. Association for Computational Linguistics.
+Qi Zhang, Yang Wang, Yeyun Gong, and Xuanjing Huang. 2016. Keyphrase extraction using deep recurrent neural networks on twitter. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 836-845,
+
+Austin, Texas. Association for Computational Linguistics.
\ No newline at end of file
diff --git a/structureaugmentedkeyphrasegeneration/images.zip b/structureaugmentedkeyphrasegeneration/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..a0a7e513e6368c8c3a9bc9f6c679b543369bdcc4
--- /dev/null
+++ b/structureaugmentedkeyphrasegeneration/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:572bf259531d20e70583de00e93d4e62f092445873a9b62290523696f7b22d29
+size 419155
diff --git a/structureaugmentedkeyphrasegeneration/layout.json b/structureaugmentedkeyphrasegeneration/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..27eb885627ec9d849cdc89f96f7960860f69b8aa
--- /dev/null
+++ b/structureaugmentedkeyphrasegeneration/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8dc92e937b1d655811e48ba07829a752ff9a41c6bddef193e9c65c828f141eed
+size 585116
diff --git a/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_content_list.json b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..991d4064d582212cc41cb381f556b772d257352b
--- /dev/null
+++ b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d6c1a70013d8e507eeb3802be90ea4ed7d2a42be8b35675f56019773cd0b4f7a
+size 85052
diff --git a/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_model.json b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..31c8bf40bca7fb7b43b3faf23b9aed5c60c18a5a
--- /dev/null
+++ b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f80cdd4b379109fcb42f1b59180a939b72ee4a37dfdc1466f0fc7a5f009ee980
+size 101172
diff --git a/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_origin.pdf b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..38fb98c541ff15e1f22fa838a8394880faded951
--- /dev/null
+++ b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4f2f1a0b03091b94d11dbfe7cc63269acb0198278f258f4b845291ced60c0571
+size 342301
diff --git a/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/full.md b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..bfbed35fc03792f035f56c3edabb8d25f4cfa7e5
--- /dev/null
+++ b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/full.md
@@ -0,0 +1,270 @@
+# Structure-aware Fine-tuning of Sequence-to-sequence Transformers for Transition-based AMR Parsing
+
+Jiawei Zhou\* Tahira Naseem\* Ramón Fernandez Astudillo\* Young-Suk Lee\* Radu Florian\* Salim Roukos\*
+
+$^{\text{a}}$ Harvard University $^{\text{b}}$ IBM Research
+
+$\spadesuit$ jzhou02@g.harvard.edu $\diamond$ ramon ASTUDillo@ibm.com
+
+$\diamondsuit$ {tnaseem, ysuklee, raduf, roukos}@us.ibm.com
+
+# Abstract
+
+Predicting linearized Abstract Meaning Representation (AMR) graphs using pre-trained sequence-to-sequence Transformer models has recently led to large improvements on AMR parsing benchmarks. These parsers are simple and avoid explicit modeling of structure but lack desirable properties such as graph well-formedness guarantees or built-in graph-sentence alignments. In this work we explore the integration of general pre-trained sequence-to-sequence language models and a structure-aware transition-based approach. We depart from a pointer-based transition system and propose a simplified transition set, designed to better exploit pre-trained language models for structured fine-tuning. We also explore modeling the parser state within the pre-trained encoder-decoder architecture and different vocabulary strategies for the same purpose. We provide a detailed comparison with recent progress in AMR parsing and show that the proposed parser retains the desirable properties of previous transition-based approaches, while being simpler and reaching the new parsing state of the art for AMR 2.0, without the need for graph re-categorization.
+
+# 1 Introduction
+
+The task of Abstract Meaning Representation (AMR) parsing translates a natural sentence into a rooted directed acyclic graph capturing the semantics of the sentence, with nodes representing concepts and edges representing their relations (Banarescu et al., 2013). Recent works utilizing pretrained encoder-decoder language models show great improvements in AMR parsing results (Xu et al., 2020; Bevilacqua et al., 2021). These approaches avoid explicit modeling of the graph structure. Instead, they directly predict the linearized AMR graph treated as free text. While the use of pre-trained Transformer encoders is widely extended in AMR parsing, the use of pre-trained
+
+Transformer decoders is recent and has shown to be very effective, maintaining current state-of-the-art results (Bevilacqua et al., 2021).
+
+These approaches however lack certain desirable properties. There are no structural guarantees of graph well-formedness, i.e. the model may predict strings that can not be decoded into valid graphs, and post-processing is required. Furthermore, predicting AMR linearizations ignores the implicit alignments between graph nodes and words, which provide a strong inductive bias and are useful for downstream AMR applications (Mitra and Baral, 2016; Liu et al., 2018; Vlachos et al., 2018; Kapanipathi et al., 2021; Naseem et al., 2021).
+
+On the other hand, transition-based AMR parsers (Wang et al., 2015; Ballesteros and Al-Onaizan, 2017a; Astudillo et al., 2020; Zhou et al., 2021) operate over the tokens of the input sentence, generating the graph incrementally. They implicitly model graph structural constraints through transitions and yield alignments by construction, thus guaranteeing graph well-formedness.1 However, it remains unclear whether explicit modeling of structure is still beneficial for AMR parsing in the presence of powerful pre-trained language models and their strong free text generation abilities.
+
+In this work, we integrate pre-trained sequence-to-sequence (seq-to-seq) language models with the transition-based approach for AMR parsing, and explore to what degree they are complementary. To fully utilize the generation power of the pre-trained language models, we propose a transition system with a small set of basic actions – a generalization of the action-pointer transition system of Zhou et al. (2021). We use BART (Lewis et al., 2019) as our pre-trained language model, since it has shown significant improvements in linearized AMR generation (Bevilacqua et al., 2021). Unlike previous approaches that directly fine-tune the model with
+
+linearized graphs, we modify the model structure to work with our transition system, and encode parser states in BART's attention mechanism (Astudillo et al., 2020; Zhou et al., 2021). We also explore different vocabulary strategies for action generation. These changes convert the pre-trained BART to a transition-based parser where graph constraints and alignments are internalized.
+
+We provide a detailed comparison with top-performing AMR parsers and perform ablation experiments showing that our proposed transition system and BART modifications are both necessary to achieve strong performance. Although BART has great language generation capacity, it still benefits from parser state encoding with hard attention, and can efficiently learn structural output. Our model establishes a new state of the art for AMR 2.0 while maintaining graph well-formedness guarantees and producing built-in alignments.
+
+# 2 Intricacies of AMR Parsers
+
+A frequent complaint about AMR parsers is that they involve combining many different techniques and hand-crafted rules, resulting in complex pipelines that are hard to analyze and generalize poorly. This situation has notably improved in the past few years but there are still two main sources of complexity present in almost all recent parsers: graph re-categorization and subgraph actions.
+
+Graph re-categorization (Wang and Xue, 2017; Lyu and Titov, 2018; Zhang et al., 2019a) normalizes the graph prior to learning. This includes joining certain subgraphs such as entities, dates and other constructs into single nodes, removing special types of nodes like polarity and normalizing propbank names. An example of common normalizations is displayed in Figure 1. Training and decoding of models using this technique happens in this re-categorized space. Re-categorized graphs are expanded to normal valid AMR graphs in a post-processing stage. The type and number of subgraphs normalized vary across implementations, but most high performing approaches (Cai and Lam, 2020; Bevilacqua et al., 2021) utilize the re-categorization described in Appendix A.1 of Zhang et al. (2019a). This version requires of an external Named Entity Recognition (NER) system to anonymize named entities, both at train time and test time. It also makes use of look-up tables for nominalizations (e.g. English to England) and other hand-crafted rules. Graph re-categorization
+
+
+Figure 1: AMR graph of the sentence I have no opinion on the New York Mets. Examples of subgraphs for entity anonymization, collapsing of verbalized nouns and removal of the polarity node and edge.
+
+has been criticised for its lack of generalization to new domains, such as biomedical domain or even the AMR 3.0 corpus (Bevilacqua et al., 2021). Recent top performing systems e.g. Cai and Lam (2020); Bevilacqua et al. (2021) also provide results without re-categorization, but this is shown to hurt performance notably on the AMR 2.0 corpus.
+
+Subgraph actions (Ballesteros and Al-Onaizan, 2017b) are used in transition-based systems and play a role similar to re-categorization. Instead of normalizing and reverting, transition-based parsers apply a subgraph action that generates an entire subgraph at once. This subgraph action coincides with many of the subgraphs collapsed in re-categorization. Subgraph actions bring however fewer external dependencies, since the parser learns to segment and identify subgraphs during training. They still suffer however from data sparsity since some subgraphs appear very few times. As in re-categorization, subgraph actions also make use of lookup tables for nominalization and similar constructs that hinder generalization. Furthermore, they create the problem of unattachable nodes. This was addressed in Zhou et al. (2021) by ignoring subgraphs for a set of heuristically determined cases. Subgraph actions have been used in all transition-based AMR systems (Naseem et al., 2019; Astudillo et al., 2020; Zhou et al., 2021).
+
+Aside from NER, past AMR parsers have other external dependencies such as POS taggers (Zhang et al., 2019a; Cai and Lam, 2020) and lemmatizers (Cai and Lam, 2020; Naseem et al., 2019; Astudillo et al., 2020).
+
+
+Figure 2: From top to bottom: graph (solid lines), sentence (source), addressable action positions and action sequence (target) for the sentence Employees liked their Boston trip, aligned (dotted lines) to its AMR graph. Arc-creating actions are displayed vertically due to space constraints. Words are repeated in grey to indicate the word under cursor for each action. The node Boston in dotted box is created by copying the token under cursor via COPY action at position 13. LA(1,ARG0) creates a left arc with label ARG0 from the top concept like-01 to the concept person at position 1. For the concept trip-03, LA(1,ARG0) is a co-reference (re-entrancy) to the concept person.
+
+# 3 A Simplified Transition System
+
+In this section we propose a transition system for AMR parsing designed with two objectives: maximize the use of strong pre-trained decoders such as BART, and minimize the complexity and dependencies of the transition system compared to previous approaches. Similarly to Zhou et al. (2021), we scan the sentence from left to right and use a token cursor to point to a source token at each step. Parser actions can either shift the cursor one token forward or generate any number of nodes and edges while the cursor points to the same token. The proposed set of actions is as follows:
+
+SHIFT moves token cursor one word to the right.
+
+ creates node of name .
+
+COPY creates node where the node name is the token under the current cursor position.
+
+LA(j,LBL) creates an arc with label LBL from the last generated node to the node generated at the $j_{th}$ transition step.
+
+$\mathbf{RA}(\mathbf{j}, \mathbf{LBL})$ same as LA but with arc direction reversed.
+
+ROOT declares the last predicted node as the root.
+
+Unlike previous transition-based approaches, we do not use a reserved action, such as PRED (Zhou et al., 2021) or CONFIRM (Ballesteros and Al
+
+Onaizan, 2017b), to predict nodes; instead we directly use the node name as the action symbol generating that node. This opens the possibility of utilizing BART's target side pre-trained vocabulary. We avoid using any copy actions that involve copying from lemmatizer outputs or lookup tables. Our COPY action is limited to copying the lower cased word. We also eliminate the use of SUBGRAPH (Zhou et al., 2021) or ENTITY (Ballesteros and Al-Onaizan, 2017b) actions producing multiple connected nodes simultaneously, as well as MERGE action creating spans of words. In previous approaches these actions were derived from alignments or hand-crafted. They thus did not cover all possible cases limiting the scalability of the approach. Finally, we discard the REDUCE action previously used to delete a source token. The effect can be achieved by simply using SHIFT without performing any other action. Figure 2 shows an example sentence with an action sequence and the corresponding graph. This can be compared with the handling of verbalization and named entities in Figure 1.
+
+To train a parser with a transition system, we need an action sequence for each training sentence that will produce the gold graph when executed. This action sequence then serves as the target for seq-to-seq models. A simple rule-based oracle algorithm creates these ground-truth sequences given
+
+a sentence, its AMR graph and node-to-word alignments. At each step, the oracle tries the following possibilities in the order of listing and performs the first one that applies:
+
+1. Create next gold arc between last created node and previously created nodes;
+2. Create next gold node aligned to token under cursor;
+3. If not at sentence end, SHIFT source cursor;
+4. Finish oracle.
+
+If possible, nodes are generated by COPY and otherwise with actions. Arcs are generated with LA and RA, connecting the nodes closer to the current node before the ones that are farther away. Note that the arcs are created by pointing to positions in the action history, where a graph node is represented by the action that creates it, following Zhou et al. (2021). Multiple nodes can be generated at a single source word before the cursor is moved by SHIFT. When multiple nodes are aligned to the same token, these nodes are generated in a predetermined topological order of graph traversal, interleaved by edge creation actions. ROOT is applied as soon as the root node is generated.
+
+The above oracle circumvents the problem of unattachable nodes by avoiding the use of subgraph actions. This implies that the oracle will always produce a unique action sequence that fully recovers the gold graph as long as every node in the graph is aligned to some token. To guarantee that all nodes are aligned, we improve upon the alignment system from Naseem et al. (2019); Astudillo et al. (2020), which aligns a large majority, but not all AMR nodes.3 In order to do this, we apply a heuristic based on graph proximity to maintain local correspondences between graph nodes and sentence words. If a node is not aligned, we copy the alignment from its first child node, if existing, and otherwise the alignment from its first parent node. For example, in Figure 2 if the node person was not provided with an alignment, our oracle would have assigned it to the aligned token of its child node employ-01. This is a recursive procedure – as long as there are some alignments to start with and the ground-truth graph is connected, all the nodes will get aligned.
+
+Our proposed transition system makes better use of BART pre-trained decoder compared to previous transition-based approaches (see Section 6) while greatly simplifying the transition set. It also naturally produces node-to-word alignments via source token cursor in the meantime.
+
+# 4 Parsing Model
+
+We build our model on top of the pre-trained seq-to-seq Transformer, BART (Lewis et al., 2019). We modify its architecture to incorporate a pointer network and internalize parser states induced by our transition system, and fine-tune for sentence-to-action generation.
+
+# 4.1 Structure-aware Architecture
+
+We adopt similar modifications on the Transformer architecture as in Zhou et al. (2021) since our transition system is based on the same action-pointer mechanism. The modifications do not introduce new modules or extra parameters, which naturally fit our need to adapt BART into a transition-based parser with internal graph well-formedness.
+
+In particular, the target actions are factored into two parts: bare action symbols (containing labels when presented) and pointer values for edges. We use the BART standard output for the former, and a pointer network for the latter. As the pointing happens on the actions history, essentially a self-attention mechanism, we re-purpose one decoder self-attention head as the pointer network. It is supervised with additional cross entropy loss during fine-tuning and decoded for building graph edges at inference.
+
+We encode the monotonic action-source alignments induced by the parser state with hard attention, i.e. by masking some decoder cross-attention heads to only focus on aligned words. Since BART processes source sentences with subwords, we apply an additional average pooling layer on top of its encoder to return states of original source words, used for the decoder layers for our hard attention. At last, as the possible valid actions are constrained with transition rules and states at every step, we restrict the decoder output space via hard masking of the BART final softmax layer. For simplicity, we do not incorporate the GNN-style (Li et al., 2019) step-wise decoder graph embedding technique in Zhou et al. (2021) as their gain was shown to be modest.
+
+# 4.2 Action Generation
+
+According to how we treat the target-side vocabulary for action generation, we propose two variations of the model. The first one is to use a completely separate vocabulary for target actions, where the decoder input side and output side use stand-alone embeddings for actions, separate from the pre-trained BART subword embeddings. We denote this setup as our sep-voc model (abbreviated as StructBART-S).
+
+However, this might not fully utilize the power of the pre-trained BART since it is an encoder-decoder model with a single vocabulary and all embeddings shared. Although our generation targets are action symbols, the node generating actions are closely related to natural words in their surface forms, which are what BART was pre-trained on. Therefore, we propose a second variation where we use a joint vocabulary for both the source tokens and target actions. Naively relying on the original BART subword vocabulary would end up splitting action symbols blindly, which is not desired as the structures such as alignments and edge pointers would be disrupted. Inspired by Bevilacqua et al. (2021), we add frequent node-creating actions to the vocabulary, in order to capture common AMR concepts intact, and split the remaining concepts with BART subword vocabulary. Non-node-creating actions such as SHIFT and COPY are added as-is to the BART vocabulary.
+
+In this setup, a single node string can potentially be generated with multiple steps; we modify the arc transitions to always point to the beginning position of a node string for attachment. With joint vocabulary setup, the model could learn to generate unseen nodes with BART's subword vocabulary, eliminating potential out-of-vocabulary problems. We refer to this setup as our joint-voc model (abbreviated as StructBART-J).
+
+# 4.3 Training and Inference
+
+We load the pre-trained BART parameters except for the standalone vocabulary embeddings for sep-voc model and the extended embeddings for the joint-voc model. We then fine-tune the model with the updated structure-aware architectures on sentence-action pairs with addition of pointer loss.
+
+For decoding, we use similar constrained beam
+
+search algorithm as in Zhou et al. (2021), but with our own transition set and rules. We run a state machine on the side to get parser states used by the model. Note that for our joint-voc model, we only allow subword split for node () actions. As our fine-tuned model is already structure-aware, the graph well-formedness is always guaranteed and no post-processing is needed to return valid graphs, unlike Xu et al. (2020); Bevilacqua et al. (2021). The only post-processing we use is to add wikification nodes as used in all previous parsers. $^5$
+
+# 5 Experimental Setup
+
+Datasets We evaluate our models on 3 AMR benchmark datasets, namely AMR 1.0 (LDC2014T12), AMR 2.0 (LDC2017T10), and AMR 3.0 (LDC2020T02). They have around 10K, 37K, and 56K sentence-AMR pairs for training, respectively. Both AMR 2.0 and AMR 3.0 have wikification nodes but AMR 1.0 does not.
+
+Evaluation We assess our models with SMATCH (F1) scores $^{7}$ (Cai and Knight, 2013). We also report the fine-grained evaluation metrics (Damonte et al., 2016) to further investigate different aspects of parsing results, such as concept identification, entity recognition, re-entrancies, etc.
+
+Model Configuration We follow the original BART configuration (Lewis et al., 2019) and code. We use the large model configuration as default, and also the base model for ablation studies. The pointer network is always tied with one head of the decoder top layer, and the pointer loss is added to the model cross-entropy loss with 1:1 ratio for training. Transition alignments are used to mask cross-attention in 2 heads of all decoder layers. For sep-voc model, we build separate embedding matrices for target actions from the training data for decoder input and output space. For joint-voc model, we add new embedding vectors for non-node action symbols and node action strings with a default minimum frequency of 5 (only accounts for about one third of all nodes due to sparsity).
+
+| ID | Model | Pre-trained Model | Collapse Subgraph | External Dependency | Extra Data | Train Align. | SMATCH F1 (%) |
| POS | NER | Lemm. | AMR 1.0 | AMR 2.0 | AMR 3.0 |
| 1 | Naseem et al. (2019) | BERT | S.A. | | | ✓ | | ✓ | - | 75.5 | - |
| 2 | Zhang et al. (2019a) | BERT | G.R. | ✓ | ✓ | | | | 70.2 ±0.1 | 76.3 ±0.1 | - |
| 3 | Zhang et al. (2019b) | BERT | G.R. | ✓ | ✓ | | | | 71.3 ±0.1 | 77.0 ±0.1 | - |
| 4 | Cai and Lam (2020) | BERT | | ✓ | ✓ | ✓ | | | 74.0 | 78.7 | - |
| 5 | Cai and Lam (2020) | BERT | G.R. | ✓ | ✓ | ✓ | | | 75.4 | 80.2 | - |
| 6 | Astudillo et al. (2020) | RoBERTa | S.A. | | | ✓ | | ✓ | 76.9 ±0.1 | 80.2 ±0.0 | - |
| 7 | Lyu et al. (2020) | RoBERTa | G.R. | | ✓ | ✓ | | | - | - | 75.8 |
| 8 | Bevilacqua et al. (2021) | BART† | | | | | | | - | 83.8 | 83.0 |
| 9 | Bevilacqua et al. (2021) | BART† | G.R. | | ✓ | | | | - | 84.5 | 80.2 |
| 10 | Zhou et al. (2021) | RoBERTa | S.A. | | | ✓ | | ✓ | 78.3 ±0.1 | 81.7 ±0.1 | 80.3 ±0.1 |
| 11 | Xu et al. (2020) | Custom† | | | | | 4M | | - | 81.4 | - |
| 12 | Lee et al. (2020) | RoBERTa | S.A. | | | ✓ | 85K | ✓ | 78.2 ±0.1 | 81.3 ±0.0 | - |
| 13 | Bevilacqua et al. (2021) | BART† | | | | | 200K | | - | 84.3 | 83.0 |
| 14 | Zhou et al. (2021) | RoBERTa | S.A. | | | ✓ | 70K | ✓ | - | 82.6 ±0.1 | - |
| 15 | StructBART-S | BART† | | | | | | ✓ | 81.6 ±0.1 | 84.0 ±0.1 | 82.3 ±0.0 |
| 16 | StructBART-J | BART† | | | | | | ✓ | 81.7 ±0.2 | 84.2 ±0.1 | 82.0 ±0.0 |
| 17 | StructBART-S | BART† | | | | | 47K | ✓ | - | - | 82.7 ±0.1 |
| 18 | StructBART-J | BART† | | | | | 47K | ✓ | - | 84.7 ±0.1 | 82.6 ±0.1 |
| 19 | StructBART-S ensem. | BART† | | | | | 47K | ✓ | - | - | 83.1 |
| 20 | StructBART-J ensem. | BART† | | | | | 47K | ✓ | - | 84.9 | - |
+
+Table 1: SMATCH (%) scores on AMR 1.0, 2.0, and 3.0 test data, associated with each model's dependency on various resources. 1-10/11-14: previous models without/with extra data; 15-18: our models (-S/-J for separate/joint vocabularies for source and target); 19-20: our models with ensemble decoding. Symbols indicate: G.R. - graph re-categorization, S.A. - subgraph action used in transition-based parsers (both detailed in Section 2), POS - part of speech tagger, NER - named entity recognizer, Lemm. - lemmatizer, Align. - alignments (only used at training time). $\dagger$ indicates fine-tuning on top of pre-trained model. All models rely on a external wikification method (omitted). Our results are average of 3 runs with different random seeds. We also report standard deviation and provide ensemble results for the 3 seed combination.
+
+| ID | Model | SMATCH | Unlabel | NoWSD | Concepts | NER | Negation | Wiki. | Re-entrancy | SRL |
| 1 | Naseem et al. (2019) | 75.5 | 80 | 76 | 86 | 83 | 67 | 80 | 56 | 72 |
| 4 | Cai and Lam (2020) | 78.7 | 81.5 | 79.2 | 88.1 | 87.1 | 66.1 | 81.3 | 63.8 | 74.5 |
| 6 | Astudillo et al. (2020) | 80.2 | 84.2 | 80.7 | 88.1 | 87.5 | 64.5 | 78.8 | 70.3 | 78.2 |
| 8 | Bevilacqua et al. (2021) | 83.8 | 86.1 | 84.4 | 90.2 | 90.6 | 74.4 | 84.4 | 70.8 | 79.6 |
| 10 | Zhou et al. (2021) | 81.8 | 85.5 | 82.3 | 88.7 | 88.5 | 69.7 | 78.8 | 71.1 | 80.8 |
| 15 | StructBART-S | 84.1 | 87.5 | 84.4 | 90.4 | 92.2 | 71.0 | 79.6 | 73.9 | 83.0 |
| 16 | StructBART-J | 84.3 | 87.9 | 84.7 | 90.6 | 92.1 | 72.5 | 80.8 | 74.3 | 83.4 |
+
+Table 2: Fine-grained F1 scores on the AMR 2.0 test set, among models that do not use extra silver data and graph re-categorization. The model IDs are matched with those in Table 1 for detailed model features. We report results with our single best model (selected on development data) for fair comparison.
+
+Implementation Details Our models are trained with Adam optimizer with batch size 2048 tokens and gradient accumulation of 4 steps. Learning rate is $1\mathrm{e} - 4$ with 4000 warm-up steps using the inverse-sqrt scheduling scheme (Vaswani et al., 2017). The hyper-parameters are fixed and not tuned for different models and datasets, as we found results are not sensitive within small ranges. We train sep-voc models for 100 epochs and joint-voc models for 40 epochs as the latter is found to converge faster. The best 5 checkpoints based on development set SMATCH from greedy decoding are averaged, and
+
+default beam size of 10 is used for decoding for our final parsing scores. We implement our model with the FAIRSEQ toolkit (Ott et al., 2019). More details can be found in the Appendix.
+
+# 6 Results
+
+Main Results We present parsing performances of our model (StructBART) in comparison with previous approaches in Table 1. For each model, we also list its features such as utilization of pre
+
+| Transition System | Features | Model Results on AMR 2.0 | Model Results on AMR 3.0 |
| #BaseActions | DistantEdges | SpecialSubgraph | APT*(Zhou et al., 2021) | StructBARTsep-voc | APT*(Zhou et al., 2021) | StructBARTsep-voc |
| Astudillo et al. (2020) | 12 | SWAP | merge | - | - | - | - |
| Zhou et al. (2021) | 10 | pointer | merge | 81.5 ±0.1 | 83.4 ±0.1 | 79.8 ±0.1 | 81.6 ±0.0 |
| Ours | 6 | pointer | no | 81.6 ±0.1 | 84.0 ±0.1 | 79.6 ±0.0 | 82.3 ±0.1 |
+
+Table 3: Transition system comparison, including their effects on different parsing models. * we adopt the cited model without graph structure embedding to compare and run on our proposed oracle.
+
+| Transition System | Avg. #actions | Oracle SMATCH |
| Astudillo et al. (2020) | 76.2 | 98.0 |
| Zhou et al. (2021) | 41.6 | 98.9 |
| Ours | 45.6 | 99.9 |
+
+Table 4: Average action sequence length and oracle coverage on AMR 2.0 training data from different transition systems. Average source sentence length is 18.9.
+
+trained language models and graph simplification methods such as re-categorization. This gives a comprehensive overview of how systems compare in terms of complexity aside from performance.
+
+All recent systems rely on pre-trained language models, either as fixed features or through finetuning. The pre-trained BART is particularly beneficial due to its encoder-decoder structure. Among all the models, the graph linearization models (Xuet al., 2020; Bevilacqua et al., 2021) have the least number of extra dependencies when not using graph re-categorization. Our model only requires aligned training data, a trait common to all transition-based approaches. This bears the advantage of producing reliable alignments at decoding time, which are useful for downstream tasks and as explanation of the graph constructing process.
+
+Both our sep-voc and joint-voc model variations work well on all datasets. Without using extra silver data, our model achieves the SMATCH score of $84.2 \pm 0.1$ on AMR 2.0, which is the same as the previous best model (Bevilacqua et al., 2021) with 200K silver data. With the input of only 47K silver data (consisting of $\sim 20\mathrm{K}$ example sentences of propbank frames and randomly selected $\sim 27\mathrm{K}$ SQuAD-2.0 context sentences), we achieve the highest score of $84.7 \pm 0.1$ for AMR 2.0. We also attain the high score of $81.7 \pm 0.2$ on the smallest AMR 1.0 benchmark, and the second best score of $82.7 \pm 0.1$ on the largest AMR 3.0 benchmark. Ensemble of the 3 models from the silver training further improves the performances to 84.9 for AMR
+
+# 2.0 and 83.1 for AMR 3.0.
+
+Fine-grained Results We further examine the fine-grained parsing results on AMR 2.0 in Table 2. We compare models not relying on extra data nor graph re-categorization since silver data sets differ across methods, and re-categorization comes with limitations outlined in Section 2. Our models achieve the highest scores across most of the categories, except for negation and wikification. The former may be due to alignment errors and the latter is solved as a separate post-processing step independent of the parser. Compared with the closely related model from Bevilacqua et al. (2021) which also fine-tunes BART but directly on linearized graphs, we achieve significant gains on re-entrancy and SRL (:ARG-I arcs), proving our model generate AMR graphs more faithful to their topological structures.
+
+# 7 Analysis
+
+Transition System Table 3 and Table 4 compare different transition systems used by recent transition-based AMR parsers with strong performances. Our proposed system has the smallest set of base actions, utilizes the action-side pointer mechanism for flexible edge creation as in Zhou et al. (2021), but does not rely on special treatment of certain subgraphs such as named entities and dates. This results in slightly longer action sequences compared to Zhou et al. (2021), but with almost $100\%$ coverage11 (Table 4). Our transition system and oracle can always find action sequences with full recovery of the original AMR graph, regardless of graph topology and alignments.
+
+To assess whether our proposed transition system helps integration with pre-trained BART, we train both the APT model from Zhou et al. (2021) and our sep-voc model on the transition system of
+
+| Model Variation | SMATCH (%) |
| sep-voc | joint-voc |
| Ours (hard attention) | 84.0 ±0.1 | 84.2 ±0.1 |
| No align. modeling | 83.5 ±0.0 | 83.4 ±0.2 |
| Align. soft supervision | 82.9 ±0.0 | 83.0 ±0.0 |
| Align. add src emb. | 83.9 ±0.0 | 84.1 ±0.0 |
| No COPY action | 83.1 ±0.1 | 84.1 ±0.0 |
+
+Zhou et al. (2021) and the one introduced in this work (Table 3 last 4 columns). The APT model, based on fixed RoBERTa features, does not benefit from the proposed transition system. However, our proposed model gains 0.6 on AMR 2.0 and 0.7 on AMR 3.0. This confirms the hypothesis that the proposed transitions are better able to exploit BART's powerful language generation ability.
+
+Structural Alignment Modeling In Table 5, we evaluate the effects of our structural modeling of parser states within BART during fine-tuning. Action-source alignments are natural byproduct of the parser state, providing structural information of where and how to generate the next graph component. Our default use of hard attention to encode such alignments works the best. We explore two other strategies for modeling alignments. One is to supervise cross-attention distributions for the same heads with inferred alignments during training, inspired by Strubell et al. (2018). The other is to directly add the aligned source contextual embeddings from the encoder top layer to the decoder input at every generation step. The former hurts the model performance, indicating the model is unable to learn the underlying transition logic to infer correct alignments, while the latter does equally well as our default model. These results justify the modeling of structural constraints, even when finetuning strong pre-trained models such as BART.
+
+We also ablate the use of COPY action in our transition system. The sep-voc model suffers but the joint-voc model is not affected. Without COPY action, the joint-voc model would rely more on BART's pre-trained subword embeddings to split node concepts more frequently, while the sep-vocab model would need to learn to generate more rare concepts from scratch. This indicates that BART's strong generation power is fully used to tackle concept sparsity problems with its subwords.
+
+
+Figure 3: Effect of special AMR node names added to the BART vocabulary in joint-voc model on AMR 2.0 dataset. Remaining AMR concepts are split and generated with BART subwords and sense numbers.
+
+Table 5: Ablation study of structure modeling with transition alignments. Results are on AMR 2.0 test data.
+
+| # | Model Initialization | SMATCH (%) |
| src emb | encoder | decoder | tgt emb | Base | Large |
| 1 | | | | | 71.2 | 72.7 |
| 2 | ✓ | | | ✓ | 71.7 | 72.8 |
| 3 | ✓ | ✓ | | ✓ | 81.4 | 82.8 |
| 4 | ✓ | | ✓ | ✓ | 69.2 | 9.5* |
| 5 | ✓ | | | | 71.2 | 72.8 |
| 6 | ✓ | ✓ | | | 80.9 | 82.5 |
| 7 | ✓ | ✓ | ✓ | | 82.2 | 83.9 |
| 8 | ✓ | ✓ | ✓ | ✓ | 82.7 | 84.1 |
| 9 | freeze BART src emb | 82.6 | 84.0 |
| 10 | freeze BART src emb + encoder | 80.9 | 81.8 |
+
+Table 6: Effects of pre-trained BART parameters. Results are with our sep-voc model on AMR 2.0 data. * failed to converge with a range of hyper-parameters.
+
+Special Nodes in Joint-Voc In Figure 3, we show the joint-voc model performance with different sized (joint) vocabularies. The vocabulary size is controlled by specifying the minimum frequency of occurrence needed for an AMR concept to be added to the vocabulary. For instance, when the minimum frequency is 1, all 12475 AMR concepts from the training data are added onto the BART vocabulary. The number of added concepts decreases as we increase the minimum frequency threshold. On model performance side, we only observe $\pm 0.2$ score variations resulting from vocabulary expansion. More interestingly, the model can work equally well when no special concepts are added to the BART vocabulary (minimum node frequency is $\infty$ ) – where all the node names are split and generated with BART subword tokens. Although our default setup uses frequency threshold of 5 in joint-voc expansion, following Bevilacqua et al. (2021), it seems unnecessary in terms of achieving good performance. This highlights the efficacy of utilizing the pre-trained BART's lan
+
+guage generation power for AMR concepts even with relatively small annotated training datasets.
+
+Pre-trained Parameters We study the contribution of different pre-trained BART components in Table 6. With our sep-voc model, we decompose the whole seq-to-seq Transformer into four components for BART initialization, i.e. the source embedding (mapped with BART shared embedding), encoder, decoder, and the separate target embedding (initialized with the average subword embeddings from BART shared embedding). We run both the StructBART base model and the StructBART large model with different combinations of parameter initialization, on the top part of Table 6. We can see that a randomly initialized model of the same size (#1) performs badly. There is an accumulative effect of BART initialization in helping the model performance, except that BART decoder can not work alone well without its encoder (#4). The encoder gives the largest performance gains (#3 vs. #2, #6 vs. #5) of about 10 points. Adding the decoder further gives around 1.4 points on top (#7 vs. #6), justifying its importance as well.
+
+We also experiment with freezing BART parameters during training in the bottom part of Table 6. Our results of freezing the BART encoder are on similar levels of previous best RoBERTa feature based models, which is behind the full fine-tuning. Overall, full initialization from BART with structure-aware fine-tuning (#8) works the best.
+
+# 8 Related Work
+
+Using seq-to-seq to predict linearized graph sequences for parsing was proposed in Vinyals et al. (2015) and is currently a very extended approach (Van Noord and Bos, 2017; Ge et al., 2019; Rongali et al., 2020). However, it is only recently with the rise of pre-trained Transformer decoders, that these techniques have become dominant in semantic parsing. Xu et al. (2020) proposed custom multi-task pre-training and fine-tuning approach for conventional Transformer models (Vaswani et al., 2017). The massively pre-trained transformer BART (Lewis et al., 2019) was used for executable semantic parsing in Chen et al. (2020) and AMR parsing in Bevilacqua et al. (2021). The importance of strongly pre-trained decoders seems also justified as BART gains popularity in various semantic generation tasks (Chen et al., 2020; Shi et al., 2020). Our work aims at capitalizing on the outstanding performance shown by BART, while
+
+providing a more structured approach that guarantees well-formed graphs and yields other desirable sub-products such as alignments. We show that this is not only possible but also attains state-of-the-art parsing results without graph re-categorization. Our analysis also shows that contrary to Xu et al. (2020), vocabulary sharing is not necessary for strong performance for our structural fine-tuning.
+
+Encoding of the parser state into neural parsers has been undertaken in various works, including seq-to-seq RNN models (Liu and Zhang, 2017; Zhang et al., 2017; Buys and Blunsom, 2017), encoder-only Transformers (Ahmad et al., 2019), seq-to-seq Transformers (Astudillo et al., 2020; Zhou et al., 2021) and pre-trained language models (Qian et al., 2021). Here we explore the application of these approaches to pre-trained seq-to-seq Transformers. Borrowing ideas from Zhou et al. (2021), we encode alignment states into the pre-trained BART attention mechanism, and re-purpose its self-attention as a pointer network. We also rely on a minimal set of actions targeted to utilize BART's generation with desirable guarantees, such as no unattachable nodes and full recovery of all graphs. We are the first to explore transition-based parsing applied on fine-tuning strongly pre-trained seq-to-seq models, and we demonstrate that parser state encoding is still important for performance, even when implemented inside of a powerful pre-trained decoder such as BART.
+
+# 9 Conclusion
+
+We explore the integration of pre-trained sequence-to-sequence language models and transition-based approaches for AMR parsing, with the purpose of retaining the high performance of the former and structural advantages of the latter. We show that both approaches are complementary, establishing the new state of the art for AMR 2.0. Our results indicate that instead of simply converting the structured data into unstructured sequences to fit the need of the pre-trained model, it is possible to effectively re-purpose a generic pre-trained model to a structure-aware one achieving strong performance. Similar principles can be applied to adapt other powerful pre-trained models such as T5 (Raffel et al., 2019) and GPT-2 (Radford et al., 2019) for structured data predictions. It is worth exploring thoroughly the pros and cons of introducing structure to the model compared to removing structure from the data (linearization) in various scenarios.
+
+# References
+
+Wasi Ahmad, Zhisong Zhang, Xuezhe Ma, Eduard Hovy, Kai-Wei Chang, and Nanyun Peng. 2019. On difficulties of cross-lingual transfer with order differences: A case study on dependency parsing. 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 2440-2452, Minneapolis, Minnesota. Association for Computational Linguistics.
+Ramon Fernandez Astudillo, Miguel Ballesteros, Tahira Naseem, Austin Blodgett, and Radu Florian. 2020. Transition-based parsing with stack-transformers. arXiv preprint arXiv:2010.10669.
+Miguel Ballesteros and Yaser Al-Onaizan. 2017a. AMR parsing using stack-LSTMs. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1269-1275, Copenhagen, Denmark. Association for Computational Linguistics.
+Miguel Ballesteros and Yaser Al-Onaizan. 2017b. Amr parsing using stack-lstms. arXiv preprint arXiv:1707.07755.
+Laura Banarescu, Claire Bonial, Shu Cai, Madalina Georgescu, Kira Griffitht, Ulf Hermjakob, Kevin Knight, Philipp Koehn, Martha Palmer, and Nathan Schneider. 2013. Abstract meaning representation for sembanking. In Proceedings of the 7th linguistic annotation workshop and interoperability with discourse, pages 178-186.
+Michele Bevilacqua, Rexhina Blloshmi, and Roberto Navigli. 2021. One spring to rule them both: Symmetric amr semantic parsing and generation without a complex pipeline.
+Jan Buys and Phil Blunsom. 2017. Robust incremental neural semantic graph parsing. arXiv preprint arXiv:1704.07092.
+Deng Cai and Wai Lam. 2020. AMR parsing via graph- sequence iterative inference. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1290-1301, Online. Association for Computational Linguistics.
+Shu Cai and Kevin Knight. 2013. Smatch: an evaluation metric for semantic feature structures. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 748-752.
+Xilun Chen, Asish Ghoshal, Yashar Mehdad, Luke Zettlemoyer, and Sonal Gupta. 2020. Low-resource domain adaptation for compositional task-oriented semantic parsing. arXiv preprint arXiv:2010.03546.
+Marco Damonte, Shay B Cohen, and Giorgio Satta. 2016. An incremental parser for abstract meaning representation. arXiv preprint arXiv:1608.06111.
+
+DongLai Ge, Junhui Li, Muhua Zhu, and Shoushan Li. 2019. Modeling source syntax and semantics for neural amr parsing. In *IJCAI*, pages 4975-4981.
+Pavan Kapanipathi, Ibrahim Abdelaziz, Srinivas Ravishankar, Salim Roukos, Alexander Gray, Ramón Fernández Astudillo, Maria Chang, Cristina Cornelio, Saswati Dana, Achille Fokoue, Dinesh Garg, Alfio Gliozzo, Sairam Gurajada, Hima Karanam, Naweed Khan, Dinesh Khandelwal, Young-Suk Lee, Yunyao Li, Francois Luus, Ndivhuwo Makondo, Nandana Mihindukulasooriya, Tahira Naseem, Sumit Neelam, Lucian Popa, Revanth Gangi Reddy, Ryan Riegel, Gaetano Rossiello, Udit Sharma, G P Shrivatsa Bhargav, and Mo Yu. 2021. Leveraging Abstract Meaning Representation for knowledge base question answering. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 3884-3894, Online. Association for Computational Linguistics.
+Young-Suk Lee, Ramon Fernandez Astudillo, Tahira Naseem, Revanth Gangi Reddy, Radu Florian, and Salim Roukos. 2020. Pushing the limits of amr parsing with self-learning. arXiv preprint arXiv:2010.10673.
+Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. 2019. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461.
+Michael Lingzhi Li, Meng Dong, Jiawei Zhou, and Alexander M Rush. 2019. A hierarchy of graph neural networks based on learnable local features. arXiv preprint arXiv:1911.05256.
+Fei Liu, Jeffrey Flanigan, Sam Thomson, Norman Sadeh, and Noah A Smith. 2018. Toward abstractive summarization using semantic representations. arXiv preprint arXiv:1805.10399.
+Jiangming Liu and Yue Zhang. 2017. Encoder-decoder shift-reduce syntactic parsing. In Proceedings of the 15th International Conference on Parsing Technologies, pages 105-114, Pisa, Italy. Association for Computational Linguistics.
+Chunchuan Lyu, Shay B Cohen, and Ivan Titov. 2020. A differentiable relaxation of graph segmentation and alignment for amr parsing. arXiv preprint arXiv:2010.12676.
+Chunchuan Lyu and Ivan Titov. 2018. AMR parsing as graph prediction with latent alignment. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 397-407, Melbourne, Australia. Association for Computational Linguistics.
+Arindam Mitra and Chitta Baral. 2016. Addressing a question answering challenge by combining statistical methods with inductive rule learning and reasoning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 30.
+
+Tahira Naseem, Srinivas Ravishankar, Nandana Mihindukulasooriya, Ibrahim Abdelaziz, Young-Suk Lee, Pavan Kapanipathi, Salim Roukos, Alfio Gliozzo, and Alexander Gray. 2021. A semantics-aware transformer model of relation linking for knowledge base question answering. ACL.
+Tahira Naseem, Abhishek Shah, Hui Wan, Radu Florian, Salim Roukos, and Miguel Ballesteros. 2019. Rewarding Smatch: Transition-based AMR parsing with reinforcement learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4586-4592, Florence, Italy. Association for Computational Linguistics.
+Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. fairseq: A fast, extensible toolkit for sequence modeling. arXiv preprint arXiv:1904.01038.
+Peng Qian, Tahira Naseem, Roger Levy, and Ramón Fernandez Astudillo. 2021. Structural guidance for transformer language models. 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 3735-3745, Online. Association for Computational Linguistics.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. 2019. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683.
+Subendhu Rongali, Luca Soldaini, Emilio Monti, and Wael Hamza. 2020. Don't parse, generate! a sequence to sequence architecture for task-oriented semantic parsing. In Proceedings of The Web Conference 2020, pages 2962-2968.
+Peng Shi, Patrick Ng, Zhiguo Wang, Henghui Zhu, Alexander Hanbo Li, Jun Wang, Cicero Nogueira dos Santos, and Bing Xiang. 2020. Learning contextual representations for semantic parsing with generation-augmented pre-training. arXiv preprint arXiv:2012.10309.
+Emma Strubell, Patrick Verga, Daniel Andor, David Weiss, and Andrew McCallum. 2018. Linguistically-informed self-attention for semantic role labeling. arXiv preprint arXiv:1804.08199.
+Rik Van Noord and Johan Bos. 2017. Neural semantic parsing by character-based translation: Experiments with abstract meaning representations. arXiv preprint arXiv:1705.09980.
+
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008.
+Oriol Vinyals, Łukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey Hinton. 2015. Grammar as a foreign language. In Advances in neural information processing systems, pages 2773-2781.
+Andreas Vlachos et al. 2018. Guided neural language generation for abstractive summarization using abstract meaning representation. arXiv preprint arXiv:1808.09160.
+Chuan Wang and Nianwen Xue. 2017. Getting the most out of amr parsing. In Proceedings of the 2017 conference on empirical methods in natural language processing, pages 1257-1268.
+Chuan Wang, Nianwen Xue, and Sameer Pradhan. 2015. A transition-based algorithm for amr parsing. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 366-375.
+Dongqin Xu, Junhui Li, Muhua Zhu, Min Zhang, and Guodong Zhou. 2020. Improving amr parsing with sequence-to-sequence pre-training. arXiv preprint arXiv:2010.01771.
+Sheng Zhang, Xutai Ma, Kevin Duh, and Benjamin Van Durme. 2019a. Amr parsing as sequence-to-graph transduction. arXiv preprint arXiv:1905.08704.
+Sheng Zhang, Xutai Ma, Kevin Duh, and Benjamin Van Durme. 2019b. Broad-coverage semantic parsing as transduction. 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 3784–3796, Hong Kong, China. Association for Computational Linguistics.
+Zhirui Zhang, Shujie Liu, Mu Li, Ming Zhou, and Enhong Chen. 2017. Stack-based multi-layer attention for transition-based dependency parsing. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1677-1682, Copenhagen, Denmark. Association for Computational Linguistics.
+Jiawei Zhou, Tahira Naseem, Ramón Fernandez Astudillo, and Radu Florian. 2021. Amr parsing with action-pointer transformer. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5585-5598, Online. Association for Computational Linguistics.
+
+# A Dataset Statistics
+
+We list the dataset sizes of AMR benchmarks in Table 7. The sizes increase with the release version number. AMR 2.0 is the most used by far. AMR 2.0 shares the same set of sentences for development and test data with AMR 1.0, but with revised annotations and wikification links. AMR 3.0 is released most recently, which is under-explored.
+
+Our silver data originate from two sources. First, we use $\sim 20\mathrm{K}$ example sentences ( $\sim 386\mathrm{K}$ tokens) from the propbank frames included in the AMR 3.0 distribution. Second, we use randomly selected $\sim 27\mathrm{K}$ sentences ( $\sim 620\mathrm{K}$ tokens) from SQuAD 2.0 context sentences available from https://rajpurkar.github.io/SQuAD-explorer/.
+
+| Data Split | AMR 1.0 | AMR 2.0 | AMR 3.0 |
| Training | 10,312 | 36,521 | 55,635 |
| Development | 1,368 | 1,368 | 1,722 |
| Test | 1.371 | 1.371 | 1,898 |
+
+# B Details of Model Structures and Number of Parameters
+
+In Table 8, we list the detailed model configuration and number of parameters of the official pre-trained BART models. Our fine-tuned StructBART is with different action vocabulary strategies which builds additional embedding vectors for certain action symbols. The numbers vary from training dataset. We list the detailed number of parameters of our fine-tuned model in Table 9. The fine-tuned model only increases about $3\% - 8\%$ more parameters for sep-voc model and $0.4\% - 1\%$ more parameters for joint-voc model.
+
+# C Implementation Details
+
+We use the Adam optimizer with $\beta_{1} = 0.9$ and $\beta_{2} = 0.98$ . Batch size is set to 2048 maximum number of tokens, and gradient is accumulated over 4 steps. The learning rate schedule is the same as Vaswani et al. (2017), where we use the maximum learning rate of $1\mathrm{e} - 4$ with 4000 warm-up steps. Dropout of rate 0.2 and label smoothing of rate 0.01 are used. These hyperparameters are fixed and not tuned for different models and datasets, as we found results are not
+
+Table 7: Number of sentence-AMR instances in the AMR benchmark datasets.
+
+| Configuration | BART Base | BART Large |
| Encoder layers | 6 | 12 |
| Heads per layer | 12 | 16 |
| Hidden size | 768 | 1024 |
| FFN size | 3072 | 4096 |
| Size of vocab | 51201* | 50265 |
| Size of emb. matrix | 39,322,368 | 51,471,360 |
| #parameters trained | 140,139,266 | 406,291,458 |
+
+Table 8: Original model configurations of pre-trained BART from FAIRSEQ (https://github.com/pytorch/fairseq/tree/v0.10.2/examples/bart). The embeddings for source, decoder input and output are all shared and thus the same (not counted as extra in training parameters). *vocabulary for the base model is larger due to additional paddings at the end, but effective vocabulary symbols are the same as the large model.
+
+| Model | Param. | AMR 1.0 | AMR 2.0 | AMR 3.0 |
| sep-voc | Src vocab size | 50265 | 50265 | 50265 |
| Tgt vocab size | 6976 | 12752 | 16180 |
| #param. trained | 420,578,304 | 432,407,552 | 439,436,288 |
| joint-voc | joint vocab size | 51921 | 53487 | 54388 |
| #param. trained | 407,987,200 | 409,590,784 | 410,517,504 |
+
+Table 9: Model parameters of our StructBART (large model). The sizes differ based on the target side vocabulary, which is dependent on different training data. Addition of silver training data adds only a fraction of the parameters to the benchmark datasets.
+
+sensitive within small ranges. Without silver data, we train sep-voc models for 100 (AMR 1.0 & 2.0) or 120 (AMR 3.0) epochs and joint-voc models for 40 epochs as the latter is found to converge faster. The best 5 (AMR 1.0 & 2.0) or 10 (AMR 3.0) checkpoints among the last 40/30 epochs are selected based on development set SMATCH from greedy decoding and averaged over the model parameters as our final model. With the 50K silver data, we train both sep-voc and joint-voc models for 20 epochs and select the best 10 checkpoints for model parameter averaging. We use a default beam size of 10 for decoding for our final parsing scores. Our models are implemented with the FAIRSEQ toolkit (Ott et al., 2019), trained and tested on a single Nvidia Tesla V100 GPU with 32GB memory. We use fp16 mixed precision training whenever possible, with which training a large model on AMR 2.0 takes about 10 hours for sep-vocab models and 7 hours for joint-vocab models, and the time varies proportionally with data size for other datasets and with silver data.
\ No newline at end of file
diff --git a/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/images.zip b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..7392f776559798055e80433df6ef68a86ed9877e
--- /dev/null
+++ b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:418c49393c16e2e8fb5a435c5af01b1c6d40df138fe5fb24fda88e26f4213ad5
+size 444482
diff --git a/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/layout.json b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..e1fed305297ac5bd73aba7cf9df0a558da74427c
--- /dev/null
+++ b/structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:07279f83561fc57ff653ec3b248354a964deb6caf9d800e4139e3ecceaffdf5d
+size 315847
diff --git a/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_content_list.json b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..00d2cd977cb16b0587039de93a568eec44dc7687
--- /dev/null
+++ b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cab4b3780b7e1043b40b59dec9dd74860e60f8eb7aee91f7bbab459f72531843
+size 120323
diff --git a/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_model.json b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..8dd20b1040266afaac1f91156e540a39a1308ec1
--- /dev/null
+++ b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:243d3613df3adeb71e2c0333bc9f2f4aabe85747a1211700deb0a8472562862b
+size 138408
diff --git a/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_origin.pdf b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..c51e8cbda608f9fe9fb2b0d60ca8bb50acd90890
--- /dev/null
+++ b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:10084ddadac39c92d8636934b78e0101133653c2e4c6cd480e6a11f94f702293
+size 1040153
diff --git a/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/full.md b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..cf84f270efe0011e96ac87d05d91c4f3a50b98ae
--- /dev/null
+++ b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/full.md
@@ -0,0 +1,528 @@
+# Structured Context and High-Coverage Grammar for Conversational Question Answering over Knowledge Graphs
+
+Pierre Marion*
+
+Sorbonne Université, CNRS
+
+Laboratoire de Probabilités, Statistique et Modélisation, LPSM
+
+F-75005, Paris, France
+
+pierre.marion@sorbonne-universite.fr
+
+# Pawel Krzysztof Nowak and Francesco Piccinno
+
+Google Research
+
+{pawelnow,piccinno}@google.com
+
+# Abstract
+
+We tackle the problem of weakly-supervised conversational Question Answering over large Knowledge Graphs using a neural semantic parsing approach. We introduce a new Logical Form (LF) grammar that can model a wide range of queries on the graph while remaining sufficiently simple to generate supervision data efficiently. Our Transformer-based model takes a JSON-like structure as input, allowing us to easily incorporate both Knowledge Graph and conversational contexts. This structured input is transformed to lists of embeddings and then fed to standard attention layers. We validate our approach, both in terms of grammar coverage and LF execution accuracy, on two publicly available datasets, CSQA and ConvQuestions, both grounded in Wikidata. On CSQA, our approach increases the coverage from $80\%$ to $96.2\%$ , and the LF execution accuracy from $70.6\%$ to $75.6\%$ , with respect to previous state-of-the-art results. On ConvQuestions, we achieve competitive results with respect to the state-of-the-art.
+
+# 1 Introduction
+
+Graphs are a common abstraction of real-world data. Large-scale knowledge bases can be represented as directed labeled graphs, where entities correspond to nodes and subject-predicate-object triplets are encoded by labeled edges. These so-called Knowledge Graphs (KGs) are used both in open knowledge projects (YAGO, Wikidata) and in the industry (Yahoo, Google, Microsoft, etc.). A prominent task on KGs is factual conversational Question Answering (Conversational KG-QA) and
+
+it has spurred interest recently, in particular due to the development of AI-driven personal assistants.
+
+The Conversational KG-QA task involves difficulties of different nature: entity disambiguation, long tails of predicates (Saha et al., 2018), conversational nature of the interaction. The topology of the underlying graph is also problematic. Not only can KGs be huge (up to several billion entities), they also exhibit hub entities with a large number of neighbors.
+
+A recent prominent approach has been to cast the problem as neural semantic parsing (Jia and Liang, 2016; Dong and Lapata, 2016, 2018; Shen et al., 2019). In this setting, a semantic parsing model learns to map a natural language question to a logical form (LF), i.e. a tree of operators over the KG. These operators belong to some grammar, either standard like SPARQL or ad-hoc. The logical form is then evaluated over the KG to produce the candidate answer. In the weak supervision training setup, the true logical form is not available, but only the answer utterance is (as well as annotated entities in some cases, see Section 5.4). Hence the training data is not given but it is instead generated, in the format of (question, logical form) pairs. We refer to this data as silver data or silver LFs, as opposed to unknown gold ground truth.
+
+However, this approach has two main issues. First, the silver data generation step is a complex and often resource-intensive task. The standard procedure employs a Breadth-First Search (BFS) exploration (Guo et al., 2018; Shen et al., 2019), but this simple strategy is prone to failure, especially when naively implemented, for questions that are mapped to nested LFs. This reduces the coverage, i.e. the percentage of training questions associated
+
+to a Logical Form. Shen et al. (2020) proposes to add a neural component for picking the best operator, in order to reduce the computational cost of this task, however complicating the model. Cao et al. (2020) proposes a two-step semantic parser: the question is first paraphrased into a "canonical utterance", which is then mapped to a LF. This approach simplifies the LF generation by separating it from the language understanding task.
+
+Second, most of the semantic parsing models do not leverage much of the underlying KG structure to predict the LF, as in Dong and Lapata (2016); Guo et al. (2018). Yet, this contextual graph information is rich (Tong et al., 2019), and graph-based models leveraging this information yield promising results for KG-QA tasks (Vakulenko et al., 2019; Christmann et al., 2019). However these alternative approaches to semantic parsing, that rely on node classification, have their inherent limitations, as they handle less naturally certain queries (see Appendix C.3) and their output is less interpretable. This motivates the desire for semantic parsing models that can make use of the KG context.
+
+Approach and contributions We design a new grammar, which can model a large range of queries on the KG, yet is simple enough for BFS to work well. We obtain a high coverage on two KG-QA datasets. On CSQA (Saha et al., 2018), we achieve a coverage of $96\%$ , a $16\%$ improvement over the baseline (Shen et al., 2020). On ConvQuestions (Christmann et al., 2019), a dataset with a large variety of queries, we reach a coverage of $86\%$ .
+
+To leverage the rich information contained in the underlying KG, we propose a semantic parsing model that uses the KG contextual data in addition to the utterances. Different options could be considered for the KG context, e.g. lists of relevant entities, annotated with metadata or pre-trained entity embeddings that are graph-aware (Zhang et al., 2020). The problem is that this information does not come as unstructured textual data, which is common for language models, but is structured.
+
+To enable the use of context together with a strong language model, we propose the Object-Aware Transformer (OAT) model, which can take as input structured data in a JSON-like format. The model then transforms the structured input into embeddings, before feeding them into standard Transformer layers. With this approach, we improve the overall execution accuracy on CSQA by $5.0\%$ compared to a strong baseline (Shen et al., 2019). On
+
+ConvQuestions, we improve the precision by $4.7\%$ compared to Christmann et al. (2019).
+
+# 2 Related work
+
+Neural semantic parsing Our work falls within the neural semantic parsing approaches for Knowledge-Based QA (Dong and Lapata, 2016; Liang et al., 2017; Dong and Lapata, 2018; Guo et al., 2019b; Hwang et al., 2019). The more specific task of conversational KG-QA has been the focus of recent work. Guo et al. (2018) introduces D2A, a neural symbolic model with memory augmentation. This model has been extended by S2A+MAML (Guo et al., 2019a) with a meta-learning strategy to account for context, and by D2A+ES (Shen et al., 2020) with a neural component to improve BFS. Saha et al. (2019) proposes a Reinforcement Learning model to benefit from denser supervision signals. Finally, Shen et al. (2019) introduces MaSP, a multi-task model that performs both entity linking and semantic parsing, with the hope of reducing erroneous entity linking (see Appendix C.2 for a comparison with our setup). Recently, Plepi et al. (2021) extended the latter in CARTON. They first predict the LF using a Transformer architecture, then specify the KG items using pointer networks. This work was further extended in Kacupaj et al. (2021), which includes a graph attention network to exploit correlations between entities and predicates. Another related contemporaneous work is Thirukovalluru et al. (2021), where the decoder is informed with entity embeddings coming from KG random walks.
+
+Learning on Knowledge Graphs Classical graph learning techniques can be applied to the specific case of KGs. In Convex (Christmann et al., 2019), at each turn, a subgraph is expanded by matching the utterance with neighboring entities. Then a candidate answer is found by a node classifier. Other methods include unsupervised message passing (Vakulenko et al., 2019). However, these approaches lack strong NLP components. Other directions include learning differentiable operators over a KG (Cohen et al., 2019), or applying Graph Neural Networks (Kipf and Welling, 2017; Hamilton et al., 2017) (GNNs) to the KG, which has been done for entity classification and link prediction tasks (Schlichtkrull et al., 2018). GNNs have also been used to model relationships between utterances and entities (Shaw et al., 2019).
+
+Structured Input for neural models Our approach of using JSON-like input falls in the line of computing neural embeddings out of structured inputs. Tai et al. (2015) introduced Tree-LSTM for computing tree embeddings bottom-up. It has then been applied for many tasks, including computer program translation (Chen et al., 2018), semantic tree structure learning (such as JSON or XML) (Woof and Chen, 2020) and supervised KGQA tasks (Tong et al., 2019; Zafar et al., 2019; Athreya et al., 2021). In the latter context, TreeLSTM is used to model the syntactic structure of the question. Other related approaches include tree transformer (Harer et al., 2019) and tree attention (Ahmed et al., 2019). Syntactic structures were also modeled as graphs (Xu et al., 2018; Li et al., 2020). Specific positional embeddings can also be used to encode structures (Shiv and Quirk, 2019; Herzig et al., 2020).
+
+# 3 A grammar for KG exploration
+
+Several previous KG-QA works were based on the grammar from D2A (Guo et al., 2018). We also take inspiration from their grammar, but redesign it to model a wider range of queries. By defining more generic operators, we achieve this without increasing the number of operators nor the average depth of LFs. Section 3.4 presents a comparison.
+
+# 3.1 Definitions
+
+An entity (e.g. Marie Curie) is a node in the KG. Two entities can be related through a directed labeled edge called a property (e.g. award received). A property can also relate an entity to a value, which can be a date, a boolean, a quantity or a string. Entities and properties have several attributes, prominently a name and an integer ID. The membership property is treated separately; it relates a member entity (e.g. Marie Curie) to a class entity (e.g. human being).
+
+The objects we will consider in the following are entities, properties, classes, and values. The grammar consists of a list of operators that take objects or sets of objects as arguments. A Logical Form is a binary expression tree of operators.
+
+In several places, we perform Named Entity Linking (NEL), i.e. mapping an utterance to a list of KG objects. Section 5.4 details how this is done.
+
+Table 1 lists the operators we use, grouped in five categories. Most of them are straightforward, except meta-operators, which we explain next.
+
+# 3.2 Meta-operators
+
+Meta-operators are useful for questions such as: Which musical instrument is played by the maximum number of persons?. To answer this question, we first compute the set of all musical instruments in the KG. For each entity in this set, we then follow the property played by, producing a set of people who play that instrument. Finally, we compute the max cardinality of all these sets and return the associated instrument.
+
+The corresponding LF is the following:
+
+```txt
+$\mathrm{argmax}$ cardinality( follow_property( for_each( members(musical instrument), ), played by)))
+```
+
+for_each creates a parallel computation over each entity in its argument, which can be terminated by three operators (arg, argmax and argmin). We refer to Appendix B.1 for details.
+
+# 3.3 Silver LF generation
+
+To generate silver LFs, we explore the space of LFs with a BFS strategy, similarly to Guo et al. (2018); Shen et al. (2019). More precisely, to initialize the exploration, we perform NEL to find relevant entities, values and classes that appear in the question. LFs of depth 0 simply return an annotated object. Then, assume that LFs of depth less or equal to $n$ have been generated and we want to generate those of depth $n + 1$ . We loop through all possible operators; for each operator, we choose each of its arguments among the already-generated LFs. This algorithm brings two challenges, as highlighted in Shen et al. (2020): computational cost and spurious LFs. We refer to Appendix B.2 for implementation details that mitigate these difficulties.
+
+# 3.4 Comparison with D2A (Guo et al., 2018)
+
+Section 5.5 shows that our grammar achieves higher coverage with a similar average LF depth. A more thorough quantitative comparison is delicate, as it would require reimplementing D2A within our framework, which is beyond the scope of this paper. On a qualitative basis, we use more elementary types: in addition to theirs, we introduce set of classes, strings and set of values (which can be strings, numerals or booleans). We use eight less operators than D2A; among our oper
+
+| Category | Name | Signature | Description |
| Graph operators | follow_property | (SE, P) → SE | Returns the entities which are linked by prop- erty P to at least one element of SE. |
| follow_backward | (SE, P) → SE | Returns the entities which are linked by prop- erty P from at least one element of SE. |
| get_value | (SE, P) → SV | Returns the values which are linked by prop- erty P to at least one element of SE. |
| Numerical operators | max, min | SV → SV | Returns the max (resp. min) value from SV. |
| greater Than,
+equals,
+lesser Than | (SV, V) → SV | Filters SV to keep values strictly greater than
+(resp. equal to, strictly lesser than) V. |
| cardinality | SE → V | Returns the cardinality of SE. |
| Set operators | is_in | (a: SE, b: SE) → SV | Returns a boolean set: for each entity in a, the
+mask equals True if the entity is in b. |
| get_first | SE → SE | Returns the first entity from SE. |
| union, intersect,
+difference | (SE,SE) → SE | Returns the union (resp. intersection, differ-
+ence) of input sets. |
| Class
+operators | members | SC → SE | Returns the members of classes in SC. |
| keep | (SE,SC) → SE | Filters SE to keep the members of SC. |
| Meta-
+operators | for_each | SE → SE | Initializes a parallel computation over all en-
+tities in the input set. |
| arg | SV → SE or
+SE → SE | Ends a parallel computation by returning all
+entities that gave a non-empty result. |
| argmax, argmin | SV → SE | Ends a parallel computation by returning all
+entities that gave the max (resp. min) value. |
+
+Table 1: List of operators in our grammar. Their variables can be entities (E), classes (C), values (V), ordered sets of such elements (resp. SE, SC and SV), or properties (P).
+
+ators, six are in common (follow_property, follow_backward, cardinality, union, intersect, difference), four are modified (keep, is_in, argmax, argmin), and the other ten are new. New intents that can be modeled include numerical reasoning (e.g. What actor plays the younger child?), temporal reasoning (e.g. What is the number of seasons until 2018?), ordinal reasoning (e.g. What was the first episode date?), textual form reasoning (e.g. What was Elvis Presley given name?). We refer to Appendix C.1 for more details and comparison methodology.
+
+# 4 Model
+
+# 4.1 Overview
+
+The model, called Object-Aware Transformer (OAT), is a Transformer-based (Vaswani et al., 2017) auto-regressive neural semantic parser. As illustrated in Figure 1, the model has several steps.
+
+The first step consists of retrieving relevant objects, annotated with metadata, that might appear
+
+in the resulting LF. This step is performed using NEL on the utterances and KG lookups to retrieve the graph context information. At this point, the input is composed of lists of objects with their fields. After embedding each field value in a vector space, we perform successive layers of input flattening and Transformer encoding. The Flattener layer is useful to transform the structured input into a list of embeddings. Then a decoder Transformer layer produces a linearized LF, i.e. a list of string tokens. Finally, we evaluate the LF over the KG to produce a candidate answer. In the next sections, we describe each step in details.
+
+# 4.2 Structured Input computation
+
+Hierarchical structure For each query, we construct the input as a JSON-like structure, consisting of lists of objects with their fields (represented in the left part of Figure 1). We chose this representation as it allows to incorporate general structured information into the model. A field can be a string, a KG integer ID, a numerical value, or a list thereof.
+
+
+Figure 1: Architecture of the proposed model. The initial field embeddings are Positional (P), Property ID (PID), Entity ID (EID), and Class ID (CID). After the first Flattener layer, we obtain Property Embeddings (PE), Class Embeddings (CE), Entity Embeddings (EE). There are also Grammar Token (GT) embeddings in the output. Note that the entity IDs are actually randomized (not shown here).
+
+
+
+To construct the input, we start from the last utterances in the dialog: the current query, previous query and previous answer. We first perform NEL to retrieve a list of entities $\mathcal{E}$ (and numerical values) matching the utterances. The KG is then queried to retrieve additional contextual information: the classes of the entities, and all outgoing and incoming properties from these entities $\mathcal{E}$ . This gives a list of properties $\mathcal{P}$ . For each property $p\in \mathcal{P}$ , we fill several fields: its ID, its name, and an Entity IDs field, which corresponds to all entities $e\in \mathcal{E}$ such that at least one graph operator gives a nonempty result when applied to $e$ and $p$ . For instance, in Wikidata, the property birth name (P1477) is filled for Marie Curie but not for Pierre Curie, so the Entity IDs field of the birth name property only contains Marie Curie.
+
+Let us introduce some formal notations, useful to explain the computation of the input's embeddings (Section 4.3). The input is a tree where the root corresponds to the whole input, and each leaf contains the primitive values. For a non-leaf node $x$ , we denote by $c(x)$ its children. For instance, in Figure 1, the node Property 2 has three children (leaves) whose values are mother, P25 and Q37463. A node $x$ has also a type, and $T_{\sim}(x)$ denotes the types of all nodes on the path from the root to $x$ .
+
+For instance, for the mother node, $T_{\sim}(x)$ is equal to (root, property, name). In our setup, the depth of the input is at most 2.
+
+ID randomization Directly giving the entity ID to the model would mean training a categorical classifier with millions of possible outcomes, which would lead to poor generalization. To avoid this, we replace the integer ID with a random one, thereby forcing the model to learn to predict the correct entity from the list of entities in input by copying their randomized entity ID to the output.
+
+For numerical values, we associate each value to an arbitrary random ID, that the model should learn to copy in the output. For properties and classes, since there are fewer possibilities in the graph (a few thousand), we do not randomize them.
+
+# 4.3 Embedding
+
+Preprocessing We apply BERT tokenization (Devlin et al., 2019) to textual inputs. A vocabulary $\mathcal{V}_t$ is generated for each of the non-textual input types $t$ .
+
+Token embedding The goal of this step is to associate an embedding to each field of each object in the input. We do so by using a learned embedding for each input type: BERT embeddings (Devlin
+
+et al., 2019) for textual inputs, and categorical embeddings for non-textual inputs. When the input is a list (textual tokens or Entity IDs field), we add to this embedding a positional embedding. To reduce the size of the model, list embeddings are averaged into a single embedding. Formally, the embedding step associates a matrix of embeddings $h(x) \in \mathbb{R}^{1 \times d_h}$ to each leaf of the input tree.
+
+# 4.4 Encoding layers
+
+There are two types of encoding layers: Flattener layers and Transformer layers.
+
+Flattener The goal of these layers is to compute the embeddings of tree nodes bottom-up. They are successively applied until we are able to compute the embedding of the root node, i.e. of the whole input. This operation can be seen as flattening the JSON-like structure, hence their name.
+
+Say we want to compute the embedding of some parent node $x$ . An affine projection is first applied to the embedding of each child, then the embedding of the parent node is computed by applying a reduction operation $\mathcal{R}$ , which can be either a sum or a concatenation. The weights of the projections are shared between all nodes having the same types $T_{\sim}(x)$ . For example, all class name nodes - with types (root, class, name) - share the same weights, but they do not share the weights of entity name nodes - with types (root, entity, name). Hence the embedding of $x$ is
+
+$$
+h (x) = \mathcal {R} _ {y \in c (x)} \left(\left\{W _ {\text {p r o j e c t}} ^ {T \rightsquigarrow (y)} h (y) + b _ {\text {p r o j e c t}} ^ {T \rightsquigarrow (y)} \right\}\right).
+$$
+
+If the reduction is a sum, all children embeddings need to be matrices of the same dimension, and the dimension of the parent embedding is also the same. If the reduction is a concatenation, the dimension of the parent embedding is $\left(\sum_{y\in c(x)}d(y),d_h\right)$
+
+Transformer This layer is a classical multi-head Transformer encoder layer (Vaswani et al., 2017), taking as input a matrix of embeddings of dimensions $(n, d_h)$ , performing self-attention between the input embeddings, and outputting another matrix of the same dimensions. Detailed setup can be found in Appendix B.4.
+
+Architecture We apply a first Transformer layer only to the utterances, and in parallel a first Flattener layer with sum reduction to all other inputs. The latter computes one embedding for each object. We add a positional embedding to each object,
+
+to account for its position in the list of objects of the same type. Then we apply a second Flattener layer with concatenation to all outputs of the first layer. This creates a single matrix of embeddings containing the embeddings of all the objects and utterances. Finally, a second Transformer layer is applied to this matrix.
+
+# 4.5 Decoding layers
+
+The output is a list of tokens, which correspond to a prefix representation of the LF tree. Note that the model architecture is grammar agnostic, as this output structure is independent of the grammar and we do not use grammar-guided decoding. The tokens can belong to one of the non-textual input types or be a grammar token. Remember that we computed a vocabulary $\mathcal{V}_t$ for all token types $t\in \mathcal{T}$ . We augment the vocabulary with a STOP token.
+
+The decoder predicts the output list of tokens iteratively. Assume that we are given the first $j$ tokens $y_{1},\ldots ,y_{j}$ . We then apply an auto-regressive Transformer decoder on the full sequence, and we condition on the last embedding $h_j$ of the sequence to predict the next token $\hat{y}_{j + 1}$ . Several categorical classifiers are used to predict $\hat{y}_{j + 1}$ . We first decide whether we should stop decoding:
+
+$$
+\hat {s} _ {j + 1} = \operatorname {a r g m a x} p _ {\text {s t o p}, j} \tag {1}
+$$
+
+where $p_{stop,j} = \mathrm{softmax}(W_{stop}h_j)$ is a distribution over $\{0,1\}$ given by a binary classifier. If $\hat{s}_{j + 1} = 1$ , the decoding is finished, and we set $\hat{y}_{j + 1}$ to STOP; otherwise, we predict the type of the token:
+
+$$
+\hat {t} _ {j + 1} = \operatorname {a r g m a x} p _ {\text {t y p e}, j} \tag {2}
+$$
+
+where $p_{type,j} = \mathrm{softmax}(W_{type}h_j)$ is a distribution over $\mathcal{T}$ given by a $|\mathcal{T}|$ -class classifier.
+
+Finally, depending on the predicted type, we predict the token itself
+
+$$
+\hat {y} _ {j + 1} = \operatorname {a r g m a x} p _ {\text {t o k e n}, j} ^ {\hat {t} _ {j + 1}} \tag {3}
+$$
+
+where $p_{token,j}^{\hat{t}_{j+1}} = \text{softmax}(W_{token}^{\hat{t}_{j+1}} h_j)$ is a distribution over $\mathcal{V}_{\hat{t}_{j+1}}$ given by a $\left|\mathcal{V}_{\hat{t}_{j+1}}\right|$ -class classifier.
+
+Training We train by teacher forcing: for some training sample $(\mathbf{x},[y_1,\dots ,y_M])$ and for each step $j$ , the embedding $h_j$ is computed using the expected output at previous steps: $h_j = h(y_j;\mathbf{x},y_1,\dots ,y_{j - 1})$ . The loss is the cross-entropy between the expected output $y_{j + 1}$ and the distributions produced by the model. Precisely, let
+
+$T:\bigcup_{t\in \mathcal{T}}\mathcal{V}_t\to \mathcal{T}$ be the mapping which projects tokens to their type. We denote by $p(x)$ the value of a categorical distribution $p$ for the category $x$ . Then, omitting the step subscripts $j$ , the loss equals
+
+$$
+\begin{array}{l} l (p, y) = - \log (p _ {s t o p} (0)) \\ - \left[ \log (p _ {t y p e} (T (y))) + \log (p _ {t o k e n} ^ {T (y)} (y)) \right] \\ \end{array}
+$$
+
+for all steps except the last, and $l(p,y) = -\log (p_{stop}(1))$ for the last step. $p_{stop}$ , $p_{type}$ , and $p_{token}$ are computed as explained above. The total loss is obtained by averaging over all training samples and over all steps.
+
+# 5 Experiments
+
+Additional comments about the datasets, setups, and additional results can be found in the appendix.
+
+# 5.1 Datasets
+
+We use two weakly supervised conversational QA datasets to evaluate our method, Complex Sequential Question Answering (CSQA)1 (Saha et al., 2018) and ConvQuestions2 (Christmann et al., 2019), both grounded in Wikidata3. CSQA consists of about 1.6M turns in 200k conversations (152k/16k/28k splits), versus 56k turns in 11k conversations (7k/2k/2k splits) for ConvQuestions.
+
+CSQA was created by asking crowd-workers to write turns following some predefined patterns, then turns were stitched together into conversations. The questions are organized in different categories, e.g. simple, logical or comparative questions.
+
+For ConvQuestions, crowd-workers wrote a 5-turn dialog in a predefined domain (e.g. Books or Movies). The dialogs are more realistic than in CSQA, however at the cost of a smaller dataset.
+
+As presented in Table 2, the datasets have different characteristics, which make them an interesting test bed to assess the generality of our approach.
+
+# 5.2 CSQA Experimental Setup
+
+Metrics To evaluate our grammar, we report the coverage, i.e. the percentage of training questions for which we found a candidate Logical Form.
+
+To evaluate the QA capabilities, we use the same metrics as in Saha et al. (2018). F1 Score is used for questions whose answers are entities, while accuracy is used for questions whose answer is
+
+boolean or numerical. We don't report results for "Clarification" questions, as this question type can be accurately modeled with a simple classification task, as reported in Appendix A. Similarly the average metric "Overall" (as defined in Saha et al. 2018) is not reported in Table 3, as it depends on "Clarification", but can be found in the Appendix.
+
+Baselines We compare our results with several baselines introduced in Section 2: D2A (Guo et al., 2018), D2A+ES (Shen et al., 2020), S2A+MAML (Guo et al., 2019a), and MaSP (Shen et al., 2019).
+
+# 5.3 ConvQuestions Experimental Setup
+
+Metrics We use the coverage as above, and the $\mathrm{P}@\mathrm{l}$ metric as defined in Christmann et al. (2019).
+
+**Baseline** The only baseline to our knowledge is CONVEX (Christmann et al., 2019), which casts the problem to a node classification task. For comparison, we tried to make our setup as close as possible to theirs, and refer to Appendix C.3 for details.
+
+Data augmentation Given the small size of the dataset, we merge it with two other data sources: CSQA, and 3.6M examples generated by random sampling. The latter are single-turn dialogs made from graph triplets, e.g. the triplet (Marie Curie, instance of, human) generates the dialog: $Q$ : Marie Curie instance of? A: Human. More details are given in Appendix B.3. The ConvQuestions dataset is upsampled to match the other data sources sizes.
+
+# 5.4 Named Entity Linking setup
+
+We tried to use a similar setup as baselines for fair comparison. For CSQA, the previous gold answer is given to the model in an oracle-like mode, as in baselines. In addition, we use simple string matching between utterances and names of Wiki-data entities to retrieve candidates that are given in input to the model. For ConvQuestions, we use the gold seed entity (as in the CONVEX baseline we compare with), and the Google Cloud NLP service. We refer to Appendices B.2 and B.4 for details.
+
+Regarding CARTON (Plepi et al., 2021), their results are not directly comparable as their model uses gold entity annotations as input and hence is not affected by NEL errors. This different NEL setup does have a strong influence on the performance, as running our model on CSQA with a setup similar to CARTON improves our Total Average score by over $10\%$ . We refer to Appendix D.2 for details. More generally, a more thorough study
+
+ | CSQA | ConvQuestions |
| Average length of a dialog | 8 turns | 5 turns |
| Possible change of topic inside a conversation | Yes | No |
| Answer type | Entities, boolean, quantity | Entities (usually a single one), boolean, date, quantity, string |
| Entity annotations in the dataset | Yes, with coreference resolution | Only the seed entity (topic of the dialog) and the answer entities |
| Coreferences in questions | Yes, to the previous turn | Yes, to any preceding turn |
+
+Table 2: Some characteristics of the benchmark datasets.
+
+| Methods | | D2A | D2A+ES | S2A+MAML | MaSP | OAT (Ours) |
| Question type | # Examples | F1 |
| Simple (Direct) | 82k | 91.41 | 83.00 | 92.66 | 85.18 | 82.69 |
| Simple (Coreferenced) | 55k | 69.83 | 64.62 | 71.18 | 76.47 | 79.23 |
| Simple (Ellipsis) | 10k | 81.98 | 83.94 | 82.21 | 83.73 | 84.44 |
| Logical | 22k | 43.62 | 72.93 | 44.34 | 69.04 | 81.57 |
| Quantitative | 9k | 50.25 | 63.95 | 50.30 | 73.75 | 74.83 |
| Comparative | 15k | 44.20 | 55.05 | 48.13 | 68.90 | 70.76 |
| Question type | # Examples | Accuracy |
| Verification (Boolean) | 27k | 45.05 | 45.80 | 50.16 | 60.63 | 66.39 |
| Quantitative (Count) | 23k | 40.94 | 41.35 | 46.43 | 43.39 | 71.79 |
| Comparative (Count) | 15k | 17.78 | 20.93 | 18.91 | 22.26 | 36.00 |
| Total Average | 260k | 64.47 | 64.75 | 66.54 | 70.56 | 75.57 |
+
+of the impact of the NEL step on the end-to-end performance would be an interesting direction of future work (see also Section 5.6).
+
+# 5.5 Results
+
+Our grammar reaches high coverage. With approximately the same numbers of operators as in baselines, we improve the CSQA coverage by $16\%$ , as presented in Table 4. The improvement is particularly important for the most complex questions. We reach a coverage of $86.2\%$ on ConvQuestions, whose questions are more varied than in CSQA.
+
+Most queries can be expressed as relatively shallow LFs in our grammar, as illustrated by Table 5. This is especially interesting for the ConvQuestions dataset, composed of more realistic dialogs. On CSQA, the average depth of our LFs (2.9) is slightly slower than with D2A grammar (3.2).
+
+We improve the QA performance over baseline on both datasets. For CSQA, our model outper
+
+Table 3: QA performance on CSQA. The metric is the F1 score for question types above the vertical separator, and accuracy for those under. The Total Average score is an average over all question types.
+
+| Question type | D2A | D2A+ES | Ours |
| Comparative | 28.6 | 45 | 84.9 |
| Logical | 48.2 | 92 | 100.0 |
| Quantitative | 58.1 | 62 | 91.1 |
| Simple | 94.4 | 96 | 99.7 |
| Verification | 77.9 | 85 | 91.4 |
| Overall | 74.3 | 80 | 96.2 |
+
+Table 4: Coverage per question type for CSQA.
+
+| Depth | 1 | 2 | 3 | 4+ |
| CSQA (D2A) | 0.0 | 47.0 | 30.9 | 22.0 |
| CSQA (Ours) | 5.5 | 67.9 | 7.4 | 19.2 |
| ConvQuestions | 53.9 | 43.7 | 2.4 | 0.0 |
+
+Table 5: Silver LF depth distribution for both datasets.
+
+| Domain | 1stturn | Follow-up | CONVEX |
| Books | 68.1 | 20.9 | 19.8 |
| Movies | 54.2 | 31.3 | 25.9 |
| Music | 37.5 | 18.1 | 19.0 |
| Soccer | 43.8 | 22.8 | 18.8 |
| TV | 66.3 | 31.8 | 17.8 |
| Overall | 54.0 | 25.0 | 20.3 |
+
+forms baselines for all question types but Direct Simple questions, as shown in Table 3. Overall, our model improves the performance by $5\%$ . For Conv-Questions, Table 6 shows that our model improves over the baseline for all domains but one, yielding an overall improvement of $4.7\%$ . A precise evaluation of the impact of the various components of our KG-QA approach (grammar, entity linking, model inputs, model architecture, size of the training data, etc.) on the end-to-end performance was out of the scope of this paper, and is left for future work. Nevertheless, the fact that we are able to improve over baselines for two types of Simple questions and for Logical questions, for which the grammar does not matter so much, as these question types correspond to relatively shallow LFs, suggests that our proposed model architecture is effective.
+
+# 5.6 Error analysis
+
+CSQA By comparing the silver and the predicted LFs on 10k random errors, we could split the errors in two main categories: first, the LF general form could be off, meaning that the model did not pick up the user intent. Or the form of the LF could be right, but (at least) one of the tokens is wrong. Table 7 details the error statistics. The most frequent errors concern entity disambiguation. There are two types of errors: either the correct entity was not part of the model input, due to insufficient recall of the NEL system. Or the model picked the wrong entity from the input due to insufficient precision. It is known that the noise from NEL strongly affects model performance (Shen et al., 2019). We tried an oracle experiment with perfect recall NEL (see Appendix D.2), which corroborates this observation, in particular for Simple questions. As we focused on modeling complex questions, improving NEL was not our main focus, but would an interesting direction for future work, in particular
+
+via multi-task approaches (Shen et al., 2019).
+
+ConvQuestions We manually analyzed 100 examples. Errors were mostly due to the LF general form, then to a wrong property token.
+
+The model learns the grammar rules. In all inspected cases, the predicted LF is a valid LF according to the grammar, i.e. it could be evaluated successfully. This shows that grammar-guided decoding is not needed to achieve high performance.
+
+Table 6: ConvQuestions results by domain. The first two columns are our results. The baseline (Oracle+CONVEX) only reports follow-up turns.
+
+| Error category | Overall | Simple Dir. |
| LF general form | 31.8 | 24.1 |
| Entity ID token | 36.2 | 38.2 |
| insuff. recall | 17.1 | 16.8 |
| insuff. precision | 19.6 | 21.6 |
| Property ID token | 4.2 | 2.9 |
| Class ID token | 24.7 | 37.6 |
| Grammar token | 11.6 | 2.6 |
+
+Table 7: Distribution of errors in CSQA. The numbers are (non exclusive) percentages. We also report statistics for the Simple Direct type, as it is the largest.
+
+# 6 Conclusion
+
+For the problem of weakly-supervised conversational KG-QA, we proposed Object-Aware Transformer, a model capable of processing structured input in a JSON-like format. This allows to flexibly provide the model with structured KG contextual information. We also introduced a KG grammar with increased coverage, which can hence be used to model a wider range of queries. These two contributions are fairly independent: on the one hand, since the model predicts LFs as a list of tokens, it is grammar agnostic, and thus it could be used with another grammar. On the other hand, the grammar is not tied to the model, and can be used to generate training data for other model architectures. Experiments on two datasets validate our approach. We plan to extend our model with richer KG context, as we believe there is headroom for improvements.
+
+# Acknowledgments
+
+We thank Yasemin Altun, Eloise Berthier, Guillaume Dalle, Maxime Godin, Clément Mantoux, Massimo Nicosia, Slav Petrov, and anonymous reviewers, for their constructive feedback, and Daya Guo for providing results with the D2A grammar. P.M. was supported by a Corps des Mines stipend.
+
+# Ethical considerations
+
+This work is not connected to any specific real-world application, and solely makes use of publicly available data (KG and QA datasets). The predominant ethical concern of the paper is the computing power associated with the experiments. To limit the energy impact of the project, we did not perform hyper-parameter tuning for model training. Using the formulas from Patterson et al. (2021), we estimate the GHG emissions associated with one run of model training to be approximately $29 - 42\mathrm{kg}$ of CO2e. For the silver LF generation, we iterated on a small subset of the datasets, then computed the LFs for the entire datasets as a one-off task.
+
+# References
+
+M. Ahmed, M. R. Samee, and R. E. Mercer. 2019. Improving Tree-LSTM with Tree Attention. In 2019 IEEE 13th International Conference on Semantic Computing (ICSC), pages 247-254.
+Ram G Athreya, Srividya K. Bansal, Axel-Cyrille Ngonga Ngomo, and Ricardo Usbeck. 2021. Template-based question answering using recursive neural networks. In 2021 IEEE 15th International Conference on Semantic Computing (ICSC), pages 195-198.
+Ruisheng Cao, Su Zhu, Chenyu Yang, Chen Liu, Rao Ma, Yanbin Zhao, Lu Chen, and Kai Yu. 2020. Unsupervised dual paraphrasing for two-stage semantic parsing. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6806-6817, Online. Association for Computational Linguistics.
+Xinyun Chen, Chang Liu, and Dawn Song. 2018. Tree-to-tree neural networks for program translation. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montréal, Canada, pages 2552-2562.
+Philipp Christmann, Rishiraj Saha Roy, Abdalghani Abujabal, Jyotsna Singh, and Gerhard Weikum. 2019. Look before you hop: Conversational question answering over knowledge graphs using judicious context expansion. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, CIKM 2019, Beijing, China, November 3-7, 2019, pages 729-738. ACM.
+William W. Cohen, Matthew Siegler, and Alex Hofer. 2019. Neural Query Language: A Knowledge Base Query Language for Tensorflow. Computing Research Repository, arXiv:1905.06209.
+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.
+Li Dong and Mirella Lapata. 2016. Language to logical form with neural attention. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 33-43, Berlin, Germany. Association for Computational Linguistics.
+Li Dong and Mirella Lapata. 2018. Coarse-to-fine decoding for neural semantic parsing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 731-742, Melbourne, Australia. Association for Computational Linguistics.
+Daya Guo, Duyu Tang, Nan Duan, Ming Zhou, and Jian Yin. 2018. Dialog-to-action: Conversational question answering over a large-scale knowledge base. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montreal, Canada, pages 2946-2955.
+Daya Guo, Duyu Tang, Nan Duan, Ming Zhou, and Jian Yin. 2019a. Coupling retrieval and meta-learning for context-dependent semantic parsing. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 855-866, Florence, Italy. Association for Computational Linguistics.
+Jiaqi Guo, Zecheng Zhan, Yan Gao, Yan Xiao, Jian-Guang Lou, Ting Liu, and Dongmei Zhang. 2019b. Towards complex text-to-SQL in cross-domain database with intermediate representation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4524-4535, Florence, Italy. Association for Computational Linguistics.
+William L. Hamilton, Zhitao Ying, and Jure Leskovec. 2017. Inductive representation learning on large graphs. 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 1024-1034.
+Jacob Harer, Chris Reale, and Peter Chin. 2019. TreeTransformer: A Transformer-Based Method for Correction of Tree-Structured Data. Computing Research Repository, arXiv:1908.00449.
+Jonathan Herzig, Pawel Krzysztof Nowak, Thomas Müller, Francesco Piccinno, and Julian Eisenschlos. 2020. TaPas: Weakly supervised table parsing via pre-training. In Proceedings of the 58th Annual
+
+Meeting of the Association for Computational Linguistics, pages 4320-4333, Online. Association for Computational Linguistics.
+Wonseok Hwang, Jinyeong Yim, Seunghyun Park, and Minjoon Seo. 2019. A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualization. Computing Research Repository, arXiv:1902.01069. Version 2. Presented at KR2ML Workshop at NeurIPS 2019.
+Robin Jia and Percy Liang. 2016. Data recombination for neural semantic parsing. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12-22, Berlin, Germany. Association for Computational Linguistics.
+Endri Kacupaj, Joan Plepi, Kuldeep Singh, Harsh Thakkar, Jens Lehmann, and Maria Maleshkova. 2021. Conversational question answering over knowledge graphs with transformer and graph attention networks. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 850-862, Online. Association for Computational Linguistics.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Thomas N. Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulouse, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net.
+Shucheng Li, Lingfei Wu, Shiwei Feng, Fangli Xu, Fengyuan Xu, and Sheng Zhong. 2020. Graph-to-tree neural networks for learning structured input-output translation with applications to semantic parsing and math word problem. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 2841-2852, Online. Association for Computational Linguistics.
+Chen Liang, Jonathan Berant, Quoc Le, Kenneth D. Forbus, and Ni Lao. 2017. Neural symbolic machines: Learning semantic parsers on Freebase with weak supervision. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 23-33, Vancouver, Canada. Association for Computational Linguistics.
+David Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, and Jeff Dean. 2021. Carbon emissions and large neural network training. Computing Research Repository, arXiv:2104.10350.
+
+Joan Plepi, Endri Kacupaj, Kuldeep Singh, Harsh Thakkar, and Jens Lehmann. 2021. Context transformer with stacked pointer networks for conversational question answering over knowledge graphs. In *The Semantic Web*, pages 356-371, Cham. Springer International Publishing.
+Amrita Saha, Ghulam Ahmed Ansari, Abhishek Laddha, Karthik Sankaranarayanan, and Soumen Chakrabarti. 2019. Complex program induction for querying knowledge bases in the absence of gold programs. Transactions of the Association for Computational Linguistics, 7:185-200.
+Amrita Saha, Vardaan Pahuja, Mitesh M. Khapra, Karthik Sankaranarayanan, and Sarath Chandar. 2018. Complex sequential question answering: Towards learning to converse over linked question answer pairs with a knowledge graph. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th innovative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial Intelligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 705-713. AAAI Press.
+Michael Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. 2018. Modeling Relational Data with Graph Convolutional Networks. In The Semantic Web, Proceedings of the 15th International Conference, ESWC 2018, pages 593-607, Heraklion, Crete, Greece. Springer, Cham.
+Peter Shaw, Philip Massey, Angelica Chen, Francesco Piccinno, and Yasemin Altun. 2019. Generating logical forms from graph representations of text and entities. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 95-106, Florence, Italy. Association for Computational Linguistics.
+Tao Shen, Xiubo Geng, Guodong Long, Jing Jiang, Chengqi Zhang, and Daxin Jiang. 2020. Effective search of logical forms for weakly supervised knowledge-based question answering. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020, pages 2227-2233. ijcai.org.
+Tao Shen, Xiubo Geng, Tao Qin, Daya Guo, Duyu Tang, Nan Duan, Guodong Long, and Daxin Jiang. 2019. Multi-task learning for conversational question answering over a large-scale knowledge base. 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 2442-2451, Hong Kong, China. Association for Computational Linguistics.
+Vighnesh Leonardo Shiv and Chris Quirk. 2019. Novel positional encodings to enable tree-based transformers. In Advances in Neural Information Processing
+
+Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 12058-12068.
+
+Kai Sheng Tai, Richard Socher, and Christopher D. Manning. 2015. Improved semantic representations from tree-structured long short-term memory 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 1556–1566, Beijing, China. Association for Computational Linguistics.
+
+Raghuveer Thirukovalluru, Mukund Sridhar, Dung Thai, Shruti Chanumolu, Nicholas Monath, Sankaranayanan Ananthakrishnan, and Andrew McCallum. 2021. Knowledge informed semantic parsing for conversational question answering. In Proceedings of the 6th Workshop on Representation Learning for NLP (RepL4NLP-2021), pages 231-240, Online. Association for Computational Linguistics.
+
+Peihao Tong, Qifan Zhang, and Junjie Yao. 2019. Leveraging Domain Context for Question Answering Over Knowledge Graph. Data Science and Engineering, 4(4):323-335.
+
+Svitlana Vakulenko, Javier David Fernandez Garcia, Axel Polleres, Maarten de Rijke, and Michael Cochez. 2019. Message passing for complex question answering over knowledge graphs. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, CIKM 2019, Beijing, China, November 3-7, 2019, pages 1431-1440. ACM.
+
+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.
+
+William Woof and Ke Chen. 2020. A Framework for End-to-End Learning on Semantic Tree-Structured Data. Computing Research Repository, arXiv:2002.05707.
+
+Kun Xu, Lingfei Wu, Zhiguo Wang, Mo Yu, Liwei Chen, and Vadim Sheinin. 2018. Exploiting rich syntactic information for semantic parsing with graph-to-sequence model. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 918-924, Brussels, Belgium. Association for Computational Linguistics.
+
+Hamid Zafar, Giulio Napolitano, and Jens Lehmann. 2019. Deep Query Ranking for Question Answering over Knowledge Bases. In Machine Learning and Knowledge Discovery in Databases, Proceedings of the European Conference, ECML PKDD 2018, Lecture Notes in Computer Science, pages 635-638, Dublin, Ireland. Springer International Publishing.
+
+Jiawei Zhang, Haopeng Zhang, Congying Xia, and Li Sun. 2020. Graph-Bert: Only Attention is Needed for Learning Graph Representations. Computing Research Repository, arXiv:2001.05140. Version 2.
+
+# A Clarification Questions in CSQA
+
+Take the following dialog as example:
+
+| T1 | Can you tell me which cities border Verderio Inferiore?
+Cornate d’Adda, Bernareggio, Robbiate |
| T2 | And which cities flank that one?
+Did you mean Robbiate? |
| T3 | No, I meant Cornate d’Adda.
+Bottanuco, Busnago, Trezzo sull’Adda |
+
+The second turn is a "Clarification" question: the system asks the user for disambiguation. The disambiguation question usually takes the form "Did you mean", followed by an entity chosen among the previous turn answers. This choice appears to be entirely random. For this reason, we found that it would not be very interesting to try to predict this entity, as baselines propose. Hence we only ask the model to predict that the question is a Clarification (via a special clarification operator).
+
+We report in Table 8 the scores for Clarification questions, as well as the "Overall" score, as defined in Saha et al. (2018). The results are not directly comparable as the baseline systems report an F1 score, while our approach uses accuracy.
+
+# B Detailed experimental setup
+
+# B.1 Meta-operators
+
+Take the example given in the main paper: "Which musical instrument is played by the maximum number of persons?" The corresponding LF is:
+
+```txt
+argmax( cardinality( follow_property( for_each( members(musical instrument)), played by)))
+```
+
+Assume that the KG contains exactly two musical instruments, piano and violin, i.e. members(musical instrument) equals {piano, violin}.
+
+for_each creates a dictionary of entities. Each (key, value) pair corresponds to one entity in the argument of for_each, where the key is the entity itself and the value is a singleton set
+
+| Question type | # Examples | D2A | D2A+ES | S2A+MAML | MaSP | OAT (Ours) |
| Clarification | 12k | 18.31 | 36.66 | 19.12 | 80.79 | 99.63 |
| Overall | 206k | 62.88 | 72.02 | N/R | 79.26 | 81.49 |
+
+Table 8: QA performance on CSQA, including "Clarification" questions. The "Overall" metric is the average F1 scores of the following question types: "Simple (Direct)", "Simple (Coreferenced)", "Simple (Ellipsis)", "Logical", "Quantitative", "Comparative" and "Clarification".
+
+containing the entity. Here for_each(\{piano, violin\}) gives the following dictionary:
+
+{piano:{piano},violin:{violin}
+
+We then apply the same computation to each of the dictionary values, while keeping the keys untouched. In our example, we apply the expression cardinality(
+
+follow_backward(., played by),
+
+which gives the result
+
+{piano: 20392, violin: 7918}.
+
+Finally, an aggregation operator is computed over the values, and the result is a subset of the keys. argmax returns the set of keys associated with the maximum values, in our example {piano}. In other cases, we want to return all the keys associated to a non-empty value, arg allows to do so.
+
+# B.2 Silver LF generation
+
+Wikidata version For CSQA, we used the preprocessed version of Wikidata made available by the authors, which contains 21.2M triplets over 12.8M entities and 567 distinct properties. For ConvQuestions, we used a more recent version of Wikidata, containing 1.1B triplets over 91.8M entities and 7869 distinct properties.
+
+Named Entity Linking For ConvQuestions, we use gold entity annotations and Google Cloud NLP entity linking service. For CSQA, we use gold entity annotations.
+
+To resolve the coreferences, in ConvQuestions, we use entity annotations from previous utterances during the silver LF generation step. In CSQA, since coreferences are already resolved by the gold annotations, we just use annotations from the current utterance.
+
+Simplifying the BFS We observed that reaching a depth of $4+$ is needed for some queries (see Table 5 of the main paper), but is impractical by exhaustive BFS, as the size of the space of LFs grows very quickly with their depth. To improve the efficiency, we used the following ideas:
+
+- Stopping criteria to abort the exploration: timeout $t_{\mathrm{max}}$ and maximum depth $d_{\mathrm{max}}$ .
+
+- Type checking: by leveraging the operators' signatures (presented in Table 1 of the main paper), we only construct legal LFs.
+
+- Putting constraints on the form of the LF: we manually forbid certain combinations of operators, e.g. follow_backward after follow_property.
+
+- Restriction of the list of operators: for ConvQuestions, we use the graph operators, the numerical operators, is_in, and get_first. The removal of some set operators and of meta-operators strongly reduces the complexity of the BFS. For CSQA, all operators are needed, but we add more constraints to keep the BFS simple enough.
+
+We choose $d_{\mathrm{max}} = 3$ for ConvQuestions and $d_{\mathrm{max}} = 7$ for CSQA, and $t_{\mathrm{max}} = 1200$ seconds.
+
+All LFs found by BFS are evaluated over the KG, which gives candidate answers. We keep the LFs whose candidate answers have the highest F1 score w.r.t. the gold answer. The minimal F1 score for keeping a LF is 0.3.
+
+Scores for LF ranking The BFS often returns several LFs (with the top F1 score, as explained above), among which some are spurious: they do not correspond to the semantic meaning of the question, but their evaluation over the KG yields the correct result by chance. As we keep only one for training, we need a way to rank the candidate LFs. We use the following heuristic scores to do so:
+
+- Complexity: the score is $1 - \frac{(d - 1)}{(d_{\max} - 1)}$ where $d$ is the depth of the LF and $d_{\max}$ is defined above.
+
+- Property lexical matching: for each property appearing in the LF, we compute the Jaccard index of the words appearing in its name and of the words of the question.
+
+- Annotation coverage: among the entities retrieved by NEL, we compute the percentage of entities which appear in the LF.
+
+As these three scores are between 0 and 1, we average them and keep the LF with the highest total score. We found that this simple method is a good way to reduce spurious LFs, which are often either too complex or not matching lexically the question.
+
+# B.3 Random examples generation
+
+To generate the random examples for data augmentation for ConvQuestions training, we first sample uniformly 80k entities from the graph. Then, for each entity, we generate a conversation for each triplet that links it to other entities. The question text is made by stitching the entity name and the property name. For instance, the triplet (Marie Curie, native language, Polish) generates the dialog: $Q$ : Marie Curie native language? A: Polish. We also generate variants where the property name is replaced by aliases, which are alternative names in Wikidata, for example mother tongue for native language. When the question or answer has more than 256 characters, we eliminate it.
+
+# B.4 Modeling
+
+# Wikidata version As in B.2.
+
+Named Entity Linking NEL is performed again, this time to create the structured context in input to the model. Due to the randomization step described in Section 4.2, missing entities in the input cannot be retrieved by the model, so we want to have a high NEL recall. The trade-off is that the NEL precision is low: we have many spurious entities in the input, which the model has to learn to ignore.
+
+For CSQA, we use simple string matching between the utterances and the names of Wikidata entities. Note that in our model, as well as in all CSQA baselines (in particular Guo et al., 2018; Shen et al., 2019), the previous gold answer is given as input to the model in an oracle-like setup.
+
+For ConvQuestions, we use the gold seed entity and the Google Cloud NLP entity linking service.
+
+To resolve coreferences, we use entities from the dialog history: all preceding turns for ConvQuestions and only the previous turn for CSQA.
+
+Implementation details We tokenize the input using the BERT-uncased tokenizer. All embeddings in the model have dimension 768. The two
+
+transformer encoders share the same configuration: 2 layers each, with output dimension 768, intermediate dimension 2048, 12 attention heads, and dropout probability set to 0.1. The model has 260M parameters. The transformer implementation is based on publicly available BERT code. We initialize the word embedding from a BERT checkpoint, but do not load the transformer layer weights, instead training them from scratch. We train for 600k steps with batch size 128, using the ADAM optimizer (Kingma and Ba, 2015) with learning rate $3 \times 10^{-5}$ . Training takes around 14 hours on 16 TPU v3 with 32 cores.
+
+# C Comparison with baselines
+
+# C.1 Comparison with D2A grammar
+
+The D2A (Guo et al., 2018) grammar is the main baseline in previous KG-QA works. We compare with the grammar implemented in their open-sourced code4, which is a bit different from the published one. Numbers for D2A in Tables 4 and 5 were computed thanks to the results of the BFS gracefully provided by the authors.
+
+Table 9 presents some intents which we are able to model in our grammar and are not straightforward to model with D2A grammar. First, textual form reasoning corresponds to questions about string attributes of entities, which are not included in the D2A grammar. Second, to handle numerical and temporal reasoning, computations based on numerical values are needed, which is not possible with the D2A grammar. Finally, the D2A grammar does not model the order of relations in the graph and the selection of class members, which we start to tackle with respectively the get_first and members operators.
+
+# C.2 Comparison with MaSP architecture
+
+MaSP (Shen et al., 2019) also follows the semantic parsing approach, where the LF is encoded as a sequence of operators and graph items IDs. Regarding the model input, they only use the utterances, whereas we add additional KG context structured as a JSON tree. The training method differs: MaSP uses multi-task learning to learn jointly entity linking and semantic parsing, whereas we chain both, and trust the model to pick the good entity. Our approach is simpler in this regard, but we pay it by
+
+| Intent | Question example | Missing in D2A |
| Textual form reasoning | What was Elvis Presley given name? | string type |
| Numerical reasoning | What actor plays the younger child? | get_value, for_each, argmin |
| Numerical reasoning | How old is the younger child? | min |
| Selection of the members of a class | Which television programs have been dubbed by at least 20 people ? | members |
| Temporal reasoning | What is the number of seasons until 2018? | for_each, get_value, lesser Than, arg |
| Ordinal reasoning | What was the first episode date? | get_first |
+
+having a slightly lower performance on Simple Direct questions (see Table 3). Finally, we do not use beam search for the decoding, contrarily to them.
+
+# C.3 Comparison with node classification
+
+An alternative to the semantic parsing approach is to train classifiers to predict entities as nodes of the KG. A precise comparison of both approaches is out of the scope of this paper. Nevertheless, we think that the semantic parsing approach is better suited to our purpose of modeling complex questions. For instance, complex intents involving numerical comparisons can be expressed naturally by a LF, but would be difficult to perform using solely node classifiers. Examples include the numerical and temporal reasoning in Table 9. Additional examples include The series consists of which amount of books? (ConvQuestions) or Which television programs have been dubbed by at least 20 people?, How many episodes is it longer than the second longest season out of the three? (CSQA).
+
+CONVEX (Christmann et al., 2019) is an example of such an approach. It is an unsupervised graph exploration method: at each turn, a subgraph is expanded by matching the utterance with neighboring entities. Then a candidate answer is found in the subgraph by a node classifier. On our side, we propose a semantic parsing approach that makes use of entities annotated by an external entity linking service. This is a similar setup to the CSQA baselines (Shen et al., 2019), which we re-purposed for ConvQuestions in order to assess the quality of our proposal on another dataset. In order to be closer to the CONVEX baseline, we changed our CSQA setup by applying the entity linker only to the questions' text and not to the answers' text. In addition,
+
+Table 9: Examples of questions that are difficult to model with the D2A grammar. Examples are mostly chosen from ConvQuestions, as their questions look more realistic than CSQA.
+
+| Domain | Coverage |
| Books | 88.6 |
| Movies | 87.6 |
| Music | 90.0 |
| Soccer | 78.6 |
| TV | 86.2 |
| Overall | 86.2 |
+
+Table 10: ConvQuestions coverage per domain.
+
+as we use the gold seed entity, we compare with the Oracle+CONVEX setup of Christmann et al. (2019), which also uses the gold seed entity (and the gold first turn answer entity). Finally, we make use of data augmentation to train our model on ConvQuestions, whereas the baseline does not.
+
+# C.4 BERT or no BERT, that is the question
+
+The baselines of Table 3 do not use BERT. MaSP authors provide a variant of their model using a fine-tuned BERT base architecture. The Total Average score of this variant is $72.60\%$ , which is $2\%$ above their vanilla variant and $3\%$ under our model. Since we are only using the word embeddings (loaded from a publicly available BERT base checkpoint) and not loading the transformer layer weights, we decided to compare with the vanilla variant of MaSP. Finally, CARTON is using a pretrained BERT base model as a sentence encoder.
+
+# D Additional results
+
+# D.1 Coverage and performance results
+
+Table 10 shows the coverage per domain for Conv-Questions. Regarding the evolution of the coverage over turns, it is stable for both datasets, hence we
+
+do not report this result.
+
+Tables 11 and 12 show the evolution of the performance over turns for both datasets. For CSQA, the performance drops after the first two turns, then remains constant. For ConvQuestions, the performance decreases throughout the turns. There is a sharp decrease after the first turn, probably because it is simpler as there is no coreference or ellipsis. The different behavior between the datasets may be due to the realism of ConvQuestions.
+
+| Turns | 0 | 1 | 2 | 3 | 4 |
| Score | 85 | 87 | 75 | 74 | 74 |
| Turns | 5-6 | 7-8 | 9-10 | 11-12 | 13+ |
| Score | 75 | 75 | 75 | 74 | 74 |
+
+Table 11: Average performance over turns for CSQA. For brevity, we average over turn ranges after turn 5.
+
+| Turn | 0 | 1 | 2 | 3 | 4 |
| Av. P@1 | 54 | 35 | 20 | 29 | 15 |
+
+# D.2 Oracle setup and CARTON comparison
+
+CARTON (Plepi et al., 2021) gives the entities annotated in the dataset as part of the model input (entities appearing in the previous turn and in the current question), contrarily to the models in Table 3 which all use an entity linker. For a fair comparison, we tested our model in an oracle setup, where we also give the gold annotations as input. As shown in Table 13, the Total Average score of our model increases by $10\%$ w.r.t. the baseline approach. The improvement is particularly important for the most simple question types (Simple and Logical Questions). In this setup, our performance is $8\%$ higher than CARTON, and we obtain a better score for 7 out of 10 question types.
+
+# D.3 Further error analysis
+
+An alternative approach for error analysis is to assess the performance of the decoding classifiers (see Section 4.5) in a teacher forcing setup, i.e. to assess how often they predict the next token correctly, given the true previous tokens. Table 14 reports the results on the eval split of both datasets.
+
+Table 12: Performance over turns for ConvQuestions.
+
+| Question type | CARTON | Ours |
| Simple (Direct) | 85.92 | 96.95 |
| Simple (Coreferenced) | 87.09 | 94.77 |
| Simple (Ellipsis) | 85.07 | 96.66 |
| Logical | 80.80 | 95.54 |
| Quantitative | 80.62 | 76.44 |
| Comparative | 62.00 | 76.66 |
| Verification (Boolean) | 77.82 | 67.02 |
| Quantitative (Count) | 57.04 | 75.89 |
| Comparative (Count) | 38.31 | 35.10 |
| Total Average | 77.89 | 85.85 |
+
+Table 13: QA performance on CSQA in oracle mode.
+
+| Metric | CSQA | ConvQuestions |
| Token type | 99.88 | 94.77 |
| Grammar token | 98.86 | 82.12 |
| Entity ID | 92.47 | 50.79 |
| Property ID | 99.45 | 30.26 |
| Class ID | 94.64 | N/A |
| Numerical value | 99.91 | N/A |
| Avg. token | 97.70 | 61.53 |
+
+Table 14: LF token accuracy metrics, on the eval splits. For ConvQuestions, Class ID, numerical value and their relative operators are not used (see B.2).
+
+The results corroborate the analysis presented in Section 5.6. First, the model learns the grammar rules, as it nearly always predicts the good token type. For CSQA, the most frequent errors concern entity ID and class ID. For ConvQuestions, they concern primarily entities and properties.
+
+# D.4 Case study
+
+Table 15 presents examples from ConvQuestions where we are able to predict the good LFs, although there exists very similar properties in the graph. The textual forms of the questions are not sufficient to infer the good property to use, implying that the model had to learn elements from the graph structure in order to answer correctly these questions. Nevertheless, Table 14 shows that there is still significant room for improvement in that direction.
+
+| Question | Property |
| When did Seinfeld first air? | start time (P580) |
| When did Camp Rock come out? | publication date (P577) |
| Who screen wrote it? | screenwriter (P58) |
| Who wrote it? | author (P50) |
| What country are they from? | country (P17) |
| Belleville of which country? | country (P17) |
| What country did the band Black Sabbath originally come from? | country of origin (P945) |
| What country is Son Heung-min from originally? | country for sport (P1532) |
+
+Table 15: Examples of ConvQuestions questions for which the model was able to pick up the good property, although there are very similar properties in the graph.
\ No newline at end of file
diff --git a/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/images.zip b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..5113ab9cd1ee6e0aef1d39b654e4de7c39cfb77d
--- /dev/null
+++ b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8290848306bf036c3f39545abf6e1672d1b48bef7fa97774be315b195071a05f
+size 886889
diff --git a/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/layout.json b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..3d8a55d7689bb0c22040d83cf973de6c2557a0a9
--- /dev/null
+++ b/structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:81a0d8b40a823584c0c78ac11b0229c5f718fa68d49f442a2efda1be169735b8
+size 504430
diff --git a/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/20e69bec-9488-4ee6-9d6a-6952cd0f2f8d_content_list.json b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/20e69bec-9488-4ee6-9d6a-6952cd0f2f8d_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..21ef1f36a653c7699cafaec1eaa45bfeb34a879f
--- /dev/null
+++ b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/20e69bec-9488-4ee6-9d6a-6952cd0f2f8d_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8ae6d92e76ba24efc0a3c5910ce0657ba62512a15e1efd1fac2e6b8c507c3b1a
+size 37098
diff --git a/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/20e69bec-9488-4ee6-9d6a-6952cd0f2f8d_model.json b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/20e69bec-9488-4ee6-9d6a-6952cd0f2f8d_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..57cf7b1e07eba1d08da07fcfa50800145fc3b17c
--- /dev/null
+++ b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/20e69bec-9488-4ee6-9d6a-6952cd0f2f8d_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:65dfcafb6d5828332dfbf2b456c9be6a53d1c207bde7069f34ccf857f3e9a938
+size 44926
diff --git a/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/20e69bec-9488-4ee6-9d6a-6952cd0f2f8d_origin.pdf b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/20e69bec-9488-4ee6-9d6a-6952cd0f2f8d_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..6d23d5663184e9eda6f5b78a81b69ea727baf663
--- /dev/null
+++ b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/20e69bec-9488-4ee6-9d6a-6952cd0f2f8d_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:02c6bbf27f642c75d1e4410e43e890a5ba505715fd9a51317fbc7f1cfcdc8b58
+size 194581
diff --git a/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/full.md b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..b6d9e3994ae5253ddf65cba6c39e545ff76934a5
--- /dev/null
+++ b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/full.md
@@ -0,0 +1,134 @@
+# Students Who Study Together Learn Better: On the Importance of Collective Knowledge Distillation for Domain Transfer in Fact Verification
+
+Mitch Paul Mithun, Sandeep Suntwal, Mihai Surdeanu
+
+University of Arizona, Tucson, Arizona, USA
+
+{mithunpaul,sandeepsuntwal,msurdeanu}@email.arizona.edu
+
+# Abstract
+
+While neural networks produce state-of-the-art performance in several NLP tasks, they depend heavily on lexicalized information, which transfers poorly between domains. Previous work (Suntwal et al., 2019) proposed delexicalization as a form of knowledge distillation to reduce dependency on such lexical artifacts. However, a critical unsolved issue that remains is how much delexicalization should be applied? A little helps reduce over-fitting, but too much discards useful information. We propose Group Learning (GL), a knowledge and model distillation approach for fact verification. In our method, while multiple student models have access to different delexicalized data views, they are encouraged to independently learn from each other through pair-wise consistency losses. In several cross-domain experiments between the FEVER and FNC fact verification datasets, we show that our approach learns the best delexicalization strategy for the given training dataset and outperforms state-of-the-art classifiers that rely on the original data.
+
+# 1 Introduction
+
+Neural networks have achieved state-of-the-art (SOTA) performance across many natural language processing (NLP) tasks, usually in supervised settings.
+
+However, it has been shown that there are limitations to these methods caused in part by their over-fitting on statistical and lexical nuances (or artifacts) specific to a dataset (Gururanan et al., 2018), which prevent them from transferring well across domains. A key solution to this problem is to not let these models rely on such dataset artifacts and instead encode the true underlying semantics of the dataset. Also, in recent years fact verification has emerged as a critical task with important societal implications (Vosoughi et al., 2018). Formally, the task is defined as: given a pair of claim and evidence texts, determine if the evidence supports or
+
+rejects the claim, or does not have enough information to reach a conclusion. Several fact verification datasets have been proposed recently, based on real-world news articles (Pomerleau and Rao, 2017), Wikipedia based knowledge bases (Thorne et al., 2018), fact verification websites (Wang, 2017), etc. Several transformer networks (Vaswani et al., 2017) based approaches (Liu et al., 2020) have achieved SOTA performance on these tasks.
+
+However, as shown in (Panenghat et al., 2020; Karimi Mahabadi et al., 2020; Gururangan et al., 2018), these models are also similarly affected by syntactic and lexical artifacts seen in other NLP tasks. Specifically, (Suntwal et al., 2019) shows the presence of such artifacts in the Fact Extraction and Verification (FEVER) dataset (Thorne et al., 2018), along with demonstrating that this limits the ability of the trained models to transfer knowledge to other similar datasets such as the Fake News Challenge (FNC) dataset (Pomerleau and Rao, 2017). To mitigate this dependency on such artifacts, they proposed a data distillation (or delexicalization) approach, which replaces some lexical artifacts such as named entities with their type and a unique id to indicate the occurrence of the same artifact in claim and evidence.
+
+A key unresolved issue in this direction is how much delexicalization to apply. As indicated in previous work (Suntwal et al., 2019; Mithun et al., 2021), delexicalization reduces overfitting. But too much delexicalization may discard critical information, e.g., replacing India with its NE label, say LOCATION, may remove contextual information about the country that is necessary for the correct classification of the claim-evidence pair. Our work proposes a solution for this problem, with the following contributions:
+
+(1) Inspired by teacher-student architectures (Tarvainen and Valpola, 2017; Rasmus et al., 2015), we propose a novel architecture that combines data distillation with model distillation to improve cross
+
+domain performance of neural networks. In particular, our approach relies on multiple students that have access to different delexicalized views of the data but are encouraged to learn from each other through pair-wise consistency losses. We call our approach Group Learning (GL). Once training completes, the student with the best performance is kept for evaluation purposes. Because we rely on a single model at evaluation time, our approach has the same evaluation run time cost as a single classifier. Note that our method can be seen as an inverse of an ensemble strategy, which trains individual models separately but applies them jointly. GL scales better at inference time due to its reliance on a single model at that stage.
+
+(2) We implemented a GL architecture for fact verification using BERT (Devlin et al., 2019), as the classifier, and multiple delexicalized views of the data using FIGER (Ling and Weld, 2012) and CoreNLP (Manning et al., 2014) NER systems. We evaluated the domain transfer of the proposed method using two fact verification datasets: FEVER and FNC. Our results show that our method achieves a cross-domain accuracy of $73.06\%$ when trained on FEVER and tested on FNC, and $74.46\%$ in the other direction, outperforming other stand-alone trained methods that rely on the lexicalized data. Importantly, our approach chooses different students in each direction, highlighting different properties of the respective training datasets.
+
+# 2 Methodology
+
+# 2.1 Data Distillation
+
+Based on the findings of (Suntwal et al., 2019) that named entities (NEs) are most likely to overfit in a fact verification task, we delexicalize our data by replacing NEs with their semantic classes (and a unique id). To detect and replace named entities with their most specific label returned by the Named Entity Recognizer (NER), we use their solution of Overlap Aware (OA-NER), which relies on CoreNLP (Manning et al., 2014) NE labels. In addition, we propose two new delexicalization approaches based on the FIGER-NER (Ling and Weld, 2012):
+
+FIGER Abstract : Replaces NEs with the most abstract classes returned by the FIGER NER, (e.g., LOCATION for Los Angeles).
+
+
+Figure 1: The multiple-student architecture for knowledge distillation.
+
+FIGER Specific : Uses the most specific classes returned by the FIGER NER, (e.g., CITY for Los Angeles.)
+
+# 2.2 Model Distillation
+
+We propose a combined distillation strategy to mitigate the risk of distilling the data at the incorrect granularity (overly aggressive or too conservative). Specifically, we introduce a Group Learning architecture (shown in Figure 1), inspired from the teacher-student paradigm (Hinton et al., 2015; Tarvainen and Valpola, 2017; Laine and Aila, 2016; Sajjadi et al., 2016). In this architecture, each student method is trained on two techniques:
+
+(a) Different versions of the same dataset, each delexicalized differently by using different data distillation techniques mentioned above.
+(b) The distributions of predictions of other models.
+
+This combined methodology of knowledge distillation encourages students to learn as much as possible from their views of the data while jointly learning with other students. Training together on the soft labels (distribution of predictions) of other student methods acts as a form of regularization between all methods. More formally, each student component includes a regular classification loss (implemented using cross-entropy) on their respective data. Additionally, each has a consistency loss
+
+ | Claim | Evidence |
| Plain text | J. R. R. Tolkien created Gimli . | A dwarf warrior , he is the son of Góin -LRB- a character from Tolkien's earlier novel, The Hobbit -RRB- . Gimli is a fictional character from J. R. R. Tolkien s Middle-earth legendary, featured in The Lord of the Rings . |
| OA-NER | personC1 created personC2. | A dwarf warrior, he is the son of personE1 -LRB- a character from personC1's earlier novel, The Hobbit -RRB- . personC2 is a fictional character from personC1's locationE1 legendary, featured in The Lord of the Rings . |
| FIGER Specific | authorC1 created locationC1. | A dwarf warrior, he is the son of personE1 -LRB- a character from authorE1's earlier novel, The Hobbit -RRB- . locationC1 is a fictional character from authorC1's written_workE1 legendary, featured in The Lord of the Rings . |
| FIGER Abstract | personC1 created locationC1. | A dwarf warrior, he is the son of personE1 -LRB- a character from personC1's earlier novel, The Hobbit -RRB- . locationC1 is a fictional character from personC1's written_workE1 legendary, featured in The Lord of the Rings . |
+
+Table 1: The claim and evidence before and after the data distillation process, along with the distillation technique used. Note that we used actual NERs, which are imperfect tools, to generate these views.
+
+between all other methods that minimize the difference in predicted label distributions.
+
+The intuition behind our approach is that by providing multiple data distillation options to choose from, we encourage the student methods to 'pull' towards each other and the original underlying semantics. The part of semantic knowledge that is obscured from a student method due to the particular delexicalization technique used in the dataset version it sees is instead learned in its effort to perform on par with other methods. Thus, similar to a classroom environment where the students learn from both known labels (e.g., a textbook) and by helping another student learn, each student can thus choose the right amount of granularity needed to enhance its understanding.
+
+# 2.3 Classifiers
+
+We use BERT (Devlin et al., 2019) as the pretrained model used in all our experiments since it has achieved SOTA results in many NLP tasks, including fact verification. Specifically, we experiment with two variants, BERT-Base, and Mini BERT (Turc et al., 2019), a light-weight version of BERT, both from the Hugging Face repository (Wolf et al., 2019).
+
+# 3 Experiments
+
+Data: We use two distinct fact verification datasets for our experiments, The Fact Extraction and Verification (FEVER) dataset (Thorne et al., 2018) and the Fake News Challenge (FNC) dataset (Pomerleau and Rao, 2017).
+
+The FEVER dataset consists of 145,449 data points, each having a claim and evidence pair. These claim-evidence pairs typically contain one
+
+or more sentences compiled from Wikipedia using an information retrieval (IR) module and are classified into three classes: supports, refutes and not enough information. The evidence for data points that had the gold label of not enough information were retrieved (using a task-provided IR component) either by finding the nearest neighbor to the claim or randomly. Even though the training partition of the FEVER dataset was publicly released, the gold test labels used in the final shared task were not. We therefore built our own test partition by dividing the randomized training partition into $80\%$ (119,197 data points) and $20\%$ (26,252 data points).
+
+The FNC dataset comprises claim-evidence pairs that were divided into four classes, agree, disagree, discuss and unrelated. These claim-evidence pairs were created using the headlines and content section of real news articles, respectively. While the training partition of the publicly available dataset comprised 49,972 data points, the testing partition had 25,413 data points. We further divided the training partition into 40,904 data points for training and 9,068 data points for development.
+
+In order to evaluate the proposed methods in a cross-domain setting, we modified the label space of the source domain to match that of the target domain as done in (Suntwal et al., 2019).
+
+Setting: In all the experiments, the performance of the underlying method on the respective original, lexicalized data is considered as the baseline. In the baseline model, we use the default hyper parameters from Hugging Face. We focus our analysis on cross-domain evaluation, i.e., we train all methods on one dataset (e.g., FEVER) and evaluate their accuracy on the other dataset (e.g., FNC). At the
+
+end of the training, the best student model from the list of all the trained models is saved to be used for evaluation.
+
+| Configuration |
| Train Eval | FEVER FEVER | FEVER FNC | FNC FNC | FNC FEVER |
| Decomposable Attention Lex Decomposable Attention Delex | 83.43% | 48.86% | 68.99% | 41.16% |
| 75.26% | 46.71% | 45.51% | 51.77% |
| Mini BERT Lex Mini BERT GL | 83.86% | 69.50% | 89.33% | 54.11% |
| 83.74% | 73.06%* | 89.72% | 74.46%* |
| BERT-Base Cased Lex BERT-Base Cased GL | 90.88% | 66.68% | 99.21% | 73.78% |
| 84.88% | 75.37%* | 97.07% | 75.51% |
| BERT-Base Un-cased Lex BERT-Base Un-cased GL | 91.95% | 64.21% | 99.45% | 76.59% |
| 86.12% | 73.61%* | 98.42% | 77.67% |
+
+Table 2: In-domain and cross-domain accuracies for various methods. All scores reported are averaged across three random seeds. "Lex" is the stand alone model trained on the original lexicalized data; "GL" denotes the student in the proposed multi-student 'Group Learning' architecture. Decomposable Attention Delex refers to the best performing model in (Suntwal et al., 2019), a stand alone decomposable attention model (Parikh et al., 2016) which was trained on data that was delexicalized using the OA-NER and Super Sense tagging techniques. * indicates that the corresponding result is significantly better than its baseline ("lex" in the same column), under a bootstrap resampling test with 1,000 samples, and $p$ -value $< 0.05$ .
+
+# 4 Results
+
+Table 2 summarizes our results. We focus on two sets of experiments using each training method and setting: in-domain (columns 2 and 4) and cross-domain (columns 3 and 5). For comparison purposes, we also show the results from (Suntwal et al., 2019) where a decomposable attention model was used for the same experiments. As shown in Table 2, although all the baseline models perform well $(83.43\% - 99.45\%)$ in-domain, they transfer poorly when evaluated cross-domain where up to $35\%$ drop in performance is observed. This verifies our findings that the signal the model learns from the un-masked text does not generalize well between domains. On the other hand, we observe a marginal in-domain drop in performance for the student models trained on the GL architecture (e.g., $6\%$ in the FEVER/FEVER setting for BERT-Base
+
+Cased) compared to their lexical counterparts. This indicates that GL models retain most signal from lexical data. Importantly, the GL models perform considerably better than their corresponding lexical versions across domain (e.g., up to $20.35\%$ improvement in the FNC/FEVER setting for MiniBERT). This demonstrates that data distillation and model distillation can be successfully combined as a strategy to improve domain transfer of fact verification methods.
+
+# 5 Discussion and Conclusion
+
+Previous work (Suntwal et al., 2019) has shown that delexicalization is useful in learning domain transferable knowledge. However, the level of delexicalization suitable for each task is unclear. In this work, we provide multiple delexicalization choices to neural network models and encourage them to choose the most appropriate choice. We suspect this approach acts as regularization (through the consistency losses), as well as a form of data noise (because of the imperfect NERs), which has been shown to aid in knowledge distillation paradigms (Hinton et al., 2015; Tarvainen and Valpola, 2017).
+
+Also, note that the BERT models perform better than the decomposable attention (DA) (Parikh et al., 2016) model in most of the cases, especially in the FNC dataset. More importantly, the cross-domain performance gain when using BERT with the proposed group learning architecture is higher than that achieved by the decomposable attention model. This is likely caused by three reasons. First, BERT has a considerably larger number of parameters than DA. Second, in applications involving text pairs, the decomposable attention model individually encodes these text pairs before using bidirectional cross attention. Instead, BERT combines these two stages using the self-attention mechanism that operates jointly over the two concatenated sentences (and separated with the [SEP] token). Lastly, BERT is pretrained on massive amounts of texts related to the datasets used here, whereas DA learns its parameters from scratch.
+
+Further, analyzing the selection made by the GL framework for various random seeds, we observed that when trained on FEVER and tested on FNC, GL selects the lexicalized student, while in the other cross-domain direction, the common choice is the student delexicalized with OA-NER. We hypothesize this happens for two reasons. First, the training data in the FNC dataset is smaller
+
+(40,904 data points) compared to the FEVER dataset (119,197 training data points). Therefore it is more prone to overfitting in the original, lexicalized form. Second, as mentioned above, since the FNC dataset is derived from real-world news articles, the number of evidence sentences in the FNC is higher than FEVER sentences. This means that delexicalized sentences in FNC preserve enough lexical signal for training, even in their delexicalized forms. The opposite observations hold in the other direction (FEVER to FNC), which caused the lexicalized students to perform better. Also, please note that even though we use only four student methods in our experiments to train with each other, this can be extended to any number of methods. However, the correct number of student models (and their corresponding delexicalized datasets) for a given task needs to be empirically determined.
+
+Our approach demonstrates that: (a) delexicalization helps model generalization, (b) the amount of delexicalization to apply varies from dataset to dataset, and (c) it is possible to learn how much delexicalization to apply through our proposed GL architecture.
+
+# Acknowledgments
+
+This work was supported by the Defense Advanced Research Projects Agency (DARPA) under the World Modelers and HABITUS programs. Mihai Surdeanu declares a financial interest in lum.ai. This interest has been properly disclosed to the University of Arizona Institutional Review Committee, and is managed in accordance with its conflict of interest policies. The authors would also like to thank Steve Bethard, Becky Sharp, and Marco Valenzuela-Escárcega for all their valuable comments and reviews.
+
+# References
+
+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.
+
+Suchin Gururangan, Swabha Swayamdipta, Omer Levy, Roy Schwartz, Samuel Bowman, and Noah A. Smith. 2018. Annotation artifacts in natural language inference data. 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 107-112, New Orleans, Louisiana. Association for Computational Linguistics.
+Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531.
+Rabeeh Karimi Mahabadi, Yonatan Belinkov, and James Henderson. 2020. End-to-end bias mitigation by modelling biases in corpora. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8706-8716, Online. Association for Computational Linguistics.
+Samuli Laine and Timo Aila. 2016. Temporal ensembling for semi-supervised learning. arXiv preprint arXiv:1610.02242.
+Xiao Ling and Daniel S Weld. 2012. Fine-grained entity recognition. In AAAI, volume 12, pages 94-100.
+Xiaodong Liu, Yu Wang, Jianshu Ji, Hao Cheng, Xueyun Zhu, Emmanuel Awa, Pengcheng He, Weizhu Chen, Hoifung Poon, Guihong Cao, and Jianfeng Gao. 2020. The Microsoft toolkit of multi-task deep neural networks for natural language understanding. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 118-126, Online. Association for Computational Linguistics.
+Christopher D Manning, Mihai Surdeanu, John Bauer, Jenny Rose Finkel, Steven Bethard, and David McClosky. 2014. The stanford corenlp natural language processing toolkit. In Proceedings of 52nd annual meeting of the association for computational linguistics: system demonstrations, pages 55-60.
+Mitch Paul Mithun, Sandeep Suntwal, and Mihai Surdeanu. 2021. Data and model distillation as a solution for domain-transferable fact verification. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4546-4552.
+Mithun Paul Panenghat, Sandeep Suntwal, Faiz Rafique, Rebecca Sharp, and Mihai Surdeanu. 2020. Towards the necessity for debiasing natural language inference datasets. In Proceedings of The 12th Language Resources and Evaluation Conference, pages 6883-6888.
+Ankur Parikh, Oscar Täckström, Dipanjan Das, and Jakob Uszkoreit. 2016. A decomposable attention model for natural language inference. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2249-2255, Austin, Texas. Association for Computational Linguistics.
+Dean Pomerleau and Delip Rao. 2017. Fake news challenge.
+
+Antti Rasmus, Harri Valpola, Mikko Honkala, Mathias Berglund, and Tapani Raiko. 2015. Semi-supervised learning with ladder networks. arXiv preprint arXiv:1507.02672.
+Mehdi Sajjadi, Mehran Javanmardi, and Tolga Tasdizen. 2016. Regularization with stochastic transformations and perturbations for deep semi-supervised learning. Advances in neural information processing systems, 29:1163-1171.
+Sandeep Suntwal, Mithun Paul, Rebecca Sharp, and Mihai Surdeanu. 2019. On the importance of delexicalization for fact verification. 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 3413-3418, Hong Kong, China. Association for Computational Linguistics.
+Antti Tarvainen and Harri Valpola. 2017. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Advances in neural information processing systems, pages 1195-1204.
+James Thorne, Andreas Vlachos, Oana Cocarascu, Christos Christodoulopoulos, and Arpit Mittal. 2018. The fact extraction and VERIFICATION (FEVER) shared task. In Proceedings of the First Workshop on Fact Extraction and VERIFICATION (FEVER), pages 1-9, Brussels, Belgium. Association for Computational Linguistics.
+Iulia Turc, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Well-read students learn better: On the importance of pre-training compact models. arXiv preprint arXiv:1908.08962.
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008.
+Soroush Vosoughi, Deb Roy, and Sinan Aral. 2018. The spread of true and false news online. Science, 359(6380):1146-1151.
+William Yang Wang. 2017. "liar, liar pants on fire": A new benchmark dataset for fake news detection. arXiv preprint arXiv:1705.00648.
+Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, et al. 2019. Huggingface's transformers: State-of-the-art natural language processing. ArXiv, pages arXiv-1910.
\ No newline at end of file
diff --git a/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/images.zip b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..cd5708e4e97c00ff22a1c1ef79af253d93ec1485
--- /dev/null
+++ b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0eb5eab20e2efb724ab1820470990433c7a6585ad6d8bb5d9464e52500393768
+size 185986
diff --git a/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/layout.json b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..b4ca5f60cc506e59832ecd0787bbaddbbb4e12b8
--- /dev/null
+++ b/studentswhostudytogetherlearnbetterontheimportanceofcollectiveknowledgedistillationfordomaintransferinfactverification/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a2914da8d5934702f3e9c0e89fe54e3863d804a45ab54d8d12c02938e578cca2
+size 141106
diff --git a/studyingwordorderthroughiterativeshuffling/afb62a0a-9c54-4158-87d8-4324a2b1e4ea_content_list.json b/studyingwordorderthroughiterativeshuffling/afb62a0a-9c54-4158-87d8-4324a2b1e4ea_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..314726e1d46de31ba6c1f5094e84d4ceadb24d1d
--- /dev/null
+++ b/studyingwordorderthroughiterativeshuffling/afb62a0a-9c54-4158-87d8-4324a2b1e4ea_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d6ad7545ed9c72feaecd6447c33817807e5fb053efc8e7857ec13bdfc5181d70
+size 123025
diff --git a/studyingwordorderthroughiterativeshuffling/afb62a0a-9c54-4158-87d8-4324a2b1e4ea_model.json b/studyingwordorderthroughiterativeshuffling/afb62a0a-9c54-4158-87d8-4324a2b1e4ea_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..f60d6288685746173559c28ee1d56f5b32fbedc1
--- /dev/null
+++ b/studyingwordorderthroughiterativeshuffling/afb62a0a-9c54-4158-87d8-4324a2b1e4ea_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:895c1aa08b1ea82dda0972b97e6eefab85402aa1c0e3674022ec675bc4d5a78e
+size 149034
diff --git a/studyingwordorderthroughiterativeshuffling/afb62a0a-9c54-4158-87d8-4324a2b1e4ea_origin.pdf b/studyingwordorderthroughiterativeshuffling/afb62a0a-9c54-4158-87d8-4324a2b1e4ea_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..0c21e16eda9d5a67fd4a999591f26b57c78166f4
--- /dev/null
+++ b/studyingwordorderthroughiterativeshuffling/afb62a0a-9c54-4158-87d8-4324a2b1e4ea_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b0e0dfc59470dd01697ffc59eb0844c0a611506e9e2becf944e188980ad800ae
+size 1879478
diff --git a/studyingwordorderthroughiterativeshuffling/full.md b/studyingwordorderthroughiterativeshuffling/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..29952e3f001d56d053e3230b8cb17f5b4ff736b0
--- /dev/null
+++ b/studyingwordorderthroughiterativeshuffling/full.md
@@ -0,0 +1,580 @@
+# Studying word order through iterative shuffling
+
+Nikolay Malkin $^{1,2,5}$
+
+Sameera Lanka
+
+Pranav Goel $^{4,5}$
+
+Nebojsa Jojic
+
+1Mila, Université de Montréal 2Byle University 3Microsoft
+4University of Maryland 5Microsoft Research
+
+kolya.malkin@yale.edu, pgoell@umd.edu, {sameera.lanka, jojic}@microsoft.com
+
+# Abstract
+
+As neural language models approach human performance on NLP benchmark tasks, their advances are widely seen as evidence of an increasingly complex understanding of syntax. This view rests upon a hypothesis that has not yet been empirically tested: that word order encodes meaning essential to performing these tasks. We refute this hypothesis in many cases: in the GLUE suite and in various genres of English text, the words in a sentence or phrase can rarely be permuted to form a phrase carrying substantially different information. Our surprising result relies on inference by iterative shuffling (IBIS), a novel, efficient procedure that finds the ordering of a bag of words having the highest likelihood under a fixed language model. IBIS can use any black-box model without additional training and is superior to existing word ordering algorithms. Coalescing our findings, we discuss how shuffling inference procedures such as IBIS can benefit language modeling and constrained generation.
+
+# 1 Introduction
+
+Is a model's understanding of syntax a precondition for its understanding of natural language? Recent work on large language models (Devlin et al., 2019; Tenney et al., 2019; Rogers et al., 2021) has made this a popular hypothesis. Yet, models that consume only bag-of-words features but rival those that understand syntax have surprised researchers time and again (Iyyer et al., 2015; Joulin et al., 2017). New concerns have emerged that natural language understanding benchmarks may not be challenging enough to make sentence structure relevant (McCoy et al., 2019; Niven and Kao, 2019).
+
+Syntax is an essential aspect of language (Chomsky, 1965). Sentence structure can be quite important: two sentences with very different meanings may use the same set of words (Fig. 1). But how much does syntax, as realized in word order, matter in typical English text? Given the words that make
+
+
+Figure 1: Which word order is more likely?
+
+
+
+up a sentence, but not their order, is the order usually recoverable? If so, word order rarely encodes more information than is found in the bag of words.
+
+In the past, linguists could not have answered this question empirically. Manually ordering words into sentences is too laborious, and when there are multiple orders that satisfy grammatical constraints, one needs a way to choose among them.
+
+With the power of large language models, we can reduce this question to a computational one and resolve both issues: given the bag of words, find the word order that is most likely under a trained LM. To make this search tractable, we develop inference by iterative shuffling (IBIS), a procedure inspired by techniques in combinatorial optimization, that is superior to existing approaches to this problem. Armed with IBIS, we answer the question above statistically and explore the implications.
+
+First, we measure how often sentences and phrases are permutable in text of various genres.
+
+Next, we analyze the effect of word order on the GLUE suite (Wang et al., 2018) and on the task of autoregressive language modeling. Randomly reordering input words drops the performance of models on nearly all tasks, but when we infer the order with the aid of a pretrained LM, this drop is small or absent. Thus, NLP pipelines can effectively consume bags of words as input, and order carries much less meaning than we might imagine.
+
+We conclude with the implications of our results for language modeling. A computationally feasible search for word order clears a path for models that focus on content, rather than syntax, enabling a range of constrained generation applications.
+
+# NLL Ordered sentence
+
+# IBIS (10 search steps)
+
+140.9 the housed is 1967. period furniture the exterior beautiful in fine complemented by Restored inside
+124.9 Restored is 1967, period furniture the exterior beautiful in fine complemented by the housed inside.
+121.6 Restored is 1967, in fine period furniture the beautiful exterior complemented by the housed inside.
+112.3 Restored is 1967, in fine the beautiful exterior complemented by the period furniture housed inside
+112.1 Restored in fine is the 1967, beautiful exterior complemented by the period furniture housed inside.
+105.7 Restored in 1967, fine beautiful exterior is the complemented by the period furniture housed inside.
+104.1 Restored in 1967, fine exterior is complemented by the beautiful the period furniture housed inside.
+88.0 Restored in 1967, the beautiful exterior is complemented by the fine period furniture housed inside.
+
+# Beam search (64) without future costs
+
+116.9 is complemented by the beautiful exterior in the fine period furniture housed inside.Restored 1967,
+
+# Beam search (64) with future costs
+
+110.9 Restored exterior is complemented by the beautiful furniture housed in the fine 1967, period inside.
+
+Figure 2: Above: IBIS iteratively infers the word order that has lowest negative log-likelihood (left column) under GPT-2. At each step, the sentence is cut into pieces, which are then rearranged. After several such $k$ -opt moves, the original order is found. Below: Reconstructed versions of the same sentence using algorithms from prior work.
+
+# 1.1 Related work
+
+Research in cognitive science and psycholinguistics has raised the notion that syntax is a convention optimized for communicating bags of concepts over a linear channel. The emergence of syntactic phenomena is explained by information structure constraints (Jaeger, 2010; Levy and Jaeger, 2006; Hahn et al., 2020). Ours is the first large computational study to lend support to this view of syntax.
+
+Circumstantial evidence for the redundancy of word order comes from work such as that of Niven and Kao (2019), which showed that language models' predictions in certain tasks are largely explained by word-level triggers. Concurrently with this work, Sinha et al. (2021a,b); Pham et al. (2021); Gupta et al. (2021) probed and demonstrated, in various ways, the surprising insensitivity of infilling LMs' performance on GLUE tasks to word order in training and evaluation data. These studies complement our discovery that nearly all of models' accuracy on GLUE tasks can be explained by bags of words only ( $\S 5.2$ ) to show that word order rarely carries information useful for classifying textual similarity, entailment, or sentiment.
+
+In the domain of text generation, Khandelwal et al. (2018) found that the order of distant context words has little effect on prediction of the next word in a text. In §5.1 we confirm that the order of recent context strongly affects next-word prediction, but also show that this order can nearly always be inferred from the bag of words.
+
+The problem of inferring word order from bags of words – text linearization – dates back to Elman (1990). This problem has been studied using both treelike and autoregressive models (de Gispert et al., 2014; Zhang and Clark, 2011; Liu and Zhang, 2015; Song et al., 2018). Horvat and Byrne (2014) reduce linearization under an $n$ -gram model to generalized traveling salesman problems (TSP), but stop short of extending TSP algorithms to neural models, as we do in this work.
+
+Algorithms based on best-first search were proposed by Liu et al. (2015) and Schmaltz et al. (2016). The latter introduced a beam search with future costs, a key baseline in this paper. In the basic beam search algorithm for ordering a target bag of words, a LSTM model generates text from left to right, expanding a horizon of fixed size. The next-word distributions at each step are restricted to the words in the target bag that have not yet been used. The innovation of future costs is to modify the beam scoring function (which is usually the log-likelihood of the partially generated text) by adding the sum of log-likelihoods under a unigram model of the yet-unused tokens in the target bag.
+
+# 2 Text linearization by iterative shuffling
+
+IBIS is motivated by a need not only to generate text from left to right when inferring the most likely word order under a base LM, but to reason over an entire sentence and permute spans or words.
+
+The bottom of Fig. 2 shows some of the fail
+
+
+
+
+current tour weight $= 40.3$ candidate tour weight $= 27.3$
+Figure 3: One IBIS search step: The edge weights in the left graph are negative log-likelihoods from GPT-2 Small conditioned on previous context in the current best sentence, "mouse chased cat" (thick blue path). A candidate 4-opt move that decreases the tour weight (dashed red path) is proposed and scored by the LM, yielding the graph on the right. Because the new NLL is lower than the old NLL, the move is accepted.
+
+
+new current tour weight $= 39.5$
+
+ure modes of beam search, with and without future costs. The reconstructions of a short sentence (in italics) by beam search using the GPT-2 Small model (Radford et al., 2019) are ungrammatical.1 Beam search without future costs is unable to reason that the capitalized word is unlikely to occur in the middle of a text and should come first. Beam search with future costs suffers from the same inability to 'plan ahead': by the end of the sentence, the algorithm begins to fail as it is left with a set of words that cannot be arranged coherently.
+
+However, some long spans that appear in the original sentence are generated, such as "is complemented by the" and "the fine period furniture housed inside". The IBIS algorithm, which we will now describe, enables reasoning over the entire text to excise and recombine such coherent spans.
+
+$k$ -opt moves. A $k$ -opt move is the following operation: A sentence is 'cut' at $k$ positions, creating $k - 1$ spans between the cuts. These $k - 1$ spans are then permuted (in one of $(k - 1)!$ ways) to form a new sentence. Note that the cuts may come immediately before the first or after the last word.
+
+Such operations were introduced by Lin and Kernighan (1973) in the context of the TSP on graphs. Recall that a tour of a weighted directed graph is a closed path that visits each vertex exactly once. A $k$ -opt move on a tour is the operation of
+
+removing $k$ edges and inserting $k$ new edges to create a new tour. Many heuristic algorithms for solving the TSP – finding the tour of lowest total weight – use $k$ -opt moves as the core search step; a maximum of $k = 5$ is typical (Helsgaun, 2000).
+
+There is a precise equivalence between text linearization and the TSP on graphs when the base language model is a bigram model. Suppose that the likelihood of a string has a factorization
+
+$$
+p \left(w _ {0} w _ {1} \dots w _ {n}\right) = \prod_ {i = 1} ^ {n} p \left(w _ {i} \mid w _ {i - 1}\right), \tag {1}
+$$
+
+where $w_0$ and $w_n$ are a fixed start/end token. We form a bidirected graph with vertices corresponding to the words of the sentence (and the start/end token) and set the weight of the edge from $v$ to $w$ to $-\log p(w \mid v)$ . An ordering of the words is then equivalent to a tour of the graph, and its negative log-likelihood (NLL) is the weight of this tour. Finding the most likely order is equivalent to solving the TSP on this graph.
+
+Local search and the IBIS heuristic. While $k$ -opt search was developed with graph tours in mind, it can be applied to any scoring function, such as a language model, which produces a NLL of the next word depending on a long sequence of words preceding it, $-\log p(w_{i+1} \mid w_0w_1 \dots w_i)$ .
+
+A naive form of $k$ -opt local search would find the order of a bag of words most likely under a base LM by beginning with a random candidate order, then repeatedly performing a random $k$ -opt move, scoring the resulting order with the model, and accepting it as the new best candidate if it decreases the NLL. However, this approach is inefficient, as we will show below.
+
+Instead, we propose a heuristic to improve the search. Let the current best order be $w_0w_1 \ldots w_n$ . We form an auxiliary graph as above, but set the weight of the edge from $w_i$ to $w_j$ to
+
+$$
+- \log p \left(w _ {j} \mid w _ {0} w _ {1} \dots w _ {i}\right), \tag {2}
+$$
+
+that is, the NLL of word $w_{j}$ at position $i + 1$ given by the base LM. If the LM is a bigram model, then the (2) reduces to $-\log p(w_{j} \mid w_{i})$ , as before.
+
+Now, we observe that the current order is a tour of this graph: $w_0 \to w_1 \to \dots \to w_n$ . We rank all possible $k$ -opt moves by how much they decrease the weight of this tour. Then, we create a batch of new candidate orders by performing $k$ -opt moves sampled from near the top of this ranking
+
+and we score this batch with the LM. The move that decreases the NLL most, if it exists, is accepted, yielding the new best candidate.
+
+We emphasize that this is a heuristic, not an exact method. It is possible that a $k$ -opt move decreases the weight of the tour in the auxiliary graph, but that when this move is performed and the sentence rescored by the LM, the NLL does not decrease. This is the case because the next-word probabilities given by the LM may depend on all preceding words. A $k$ -opt move may change the context preceding a word $w_{i}$ , which will modify the weights of the edges from $w_{i}$ to other words in the graph. Nevertheless, the likelihood of a word depends mostly on recent context, especially on the preceding word, making IBIS an efficient heuristic.
+
+Practical considerations. This heuristic for proposing $k$ -opt moves is limited by computational constraints, mainly the difficulty of ranking all possible $k$ -opt moves in memory. These difficulties arise in classical TSP solvers as well and are typically resolved by additional heuristics and sampling procedures. Our precise answers to these difficulties are described in Appendix A.
+
+All our experiments are initialized with a random order of the target bag and use the heuristic described above to iteratively decrease the NLL. The search is terminated when there is no improvement for a specified number of steps (the 'patience' constant). For our experiments, we use a proposal batch size of 128 and a patience of 128 and limit the search to 3-, 4-, and 5-opt moves.
+
+Our search for optimal $k$ -opt moves uses core tensor operations and can run on a GPU – the first implementation of this kind, to the best of our knowledge. Runnable example code is provided in the associated repository: https://github.com/malkin1729/ibis. The reader can run the provided program and see a text of their choice iteratively shuffled into the most likely order (Fig. 5 in the Appendix).
+
+# 3 Experiments: IBIS
+
+We show that IBIS achieves a new state of the art in text linearization using a black-box LM. Following Wan et al. (2009), we evaluate on section 23 of the Penn Treebank (PTB) dataset of Wall Street Journal articles (Marcus et al., 1999).
+
+Setup and baselines. The results here use GPT-2 Small as a base LM. There are three reasons for
+
+| Base LM | Inference | BLEU | NLL |
| LSTM | BS-512 +g | 44.5 | - |
| GPT-2 Small | BS-512 | 42.4 | 5.60 |
| GPT-2 Small | BS-512 +g | 45.4 | 5.48 |
| GPT-2 Small | BS-1024 | 44.0 | 5.52 |
| GPT-2 Small | BS-1024 +g | 47.1 | 5.43 |
| GPT-2 Small | IBIS | 50.0 | 5.19 |
| Distil-GPT-2 | IBIS | 47.2 | - |
| GPT-2 Medium | IBIS | 53.1 | - |
| GPT-2 Large | IBIS | 54.6 | - |
| GPT-2 XL | IBIS* | 53.6 | - |
| GPT-2 Small | random k-opt | 44.1 | 5.36 |
| - | original text | 100.0 | 5.22 |
+
+Table 1: BLEU scores of PTB sentences ordered by beam search and shuffling algorithms. NLL is negative log-likelihood per word under GPT-2 Small, averaged over test examples. First row is from Schmaltz et al. (2016); $+g$ denotes search with future costs. \*Batch size 64, patience 256 was used for GPT-2 XL.
+
+this choice. First, it enables direct comparison between beam search and IBIS under the same base LM, which is difficult with the LSTM model of Schmaltz et al. (2016) due to an incompatible code base. Second, it simultaneously allows us to measure the effect of the base model on results using the same inference procedure: IBIS is model-agnostic and can work with any base LM that produces next-token likelihoods. Third, GPT-2 is trained on generic English text and can handle arbitrary strings, making it a natural candidate for use in all parts of this paper. We chose the Small variant of the model for computational efficiency.
+
+We used the published code of Schmaltz et al. (2016), to tokenize the sentences, with minor processing for compatibility with GPT-2's tokenizer. We then evaluated beam search with beam sizes 512 and 1024, with and without future costs. The future cost function used unigram frequencies estimated from the GPT-2 training data. Any input word that is broken into multiple tokens by GPT-2's subword tokenizer was always generated as a single unit. These baselines are thus directly comparable with the results of Schmaltz et al. (2016).
+
+IBIS inference. We ran the IBIS algorithm on this data, also using GPT-2 as the base LM, to infer an order of each sentence in the evaluation set.
+
+To ensure that the bags of input and output words coincided, we did not allow $k$ -opt moves that broke intact words between GPT-2 subword tokens.
+
+Results and discussion. The BLEU scores of reconstructed sentences with respect to the original orders, and their NLLs per word, are shown in Table 1. IBIS outperforms beam search with size 512 and future costs – the strongest procedure in past work – by a large margin. Doubling the beam size, and the computation time, closes less than half of the gap in BLEU and in mean log-likelihood.
+
+A less surprising, yet still meaningful, comparison is between base LMs: beam search with future costs with Schmaltz et al. (2016)'s LSTM model and with GPT-2 Small (first and third rows). The former model is trained on a mix of target-domain (PTB) data, other datasets of news articles, and the Gigaword corpus, yet still resorts to using OOV tokens in place of infrequent words; GPT-2 is trained on a (biased) crawl of the Internet and processes rare words as sequences of subword tokens.
+
+Finally, the mean log-likelihood per word under the base LM of sentences reconstructed with IBIS exceeds that of the original text. There are two ways to interpret this result. On one hand, it shows the strength of IBIS as an optimization algorithm: it may indeed be possible to permute the words in the original text, perhaps into an order more acceptable to human judgment, making word order more normative without changing the meaning. On the other hand, it shows that IBIS approaches the limit of what a text linearization algorithm that optimizes for GPT-2 Small likelihood can achieve as measured in BLEU score, which can be seen as a limitation of the base LM itself.
+
+Computation cost. It is difficult to directly compare computation costs of beam search and IBIS due to the very different nature of these algorithms. A measure that corresponds well to the evaluation time is the number of calls to the base LM. During IBIS inference over the dataset of 2416 sentences, $67\mathrm{m}$ strings were scored by GPT-2. Beam search with beam size 1024 and future costs would make approximately $60\mathrm{m}$ calls to GPT-2 if all words were single tokens; handling of subwords increases this number to $76\mathrm{m}$ . The computation time for the two algorithms was approximately equal. Thus IBIS is comparable to the BS- $1024 + g$ baseline in computation, but performs significantly better.
+
+Unlike beam search, which infers order incre-
+
+| Base LM | IBIS output |
| Distil-GPT-2 | Ibises, all mud and crustaceans, usually feed as a group, have long downcurved bills, usually probing for food items. |
| GPT-2Small | Ibises, all mud crustaceans, usually as a group, have long downcurved bills, usually probing for food items and feed. |
| GPT-2Medium | Ibises as a group usually have long downcurved bills, usually probing for feed, mud, crustaceans, and all food items. |
| GPT-2Large | Ibises usually feed as a group, usually have long, downcurved bills, all probing for food items, mud and crustaceans. |
| GPT-2XL | Ibises usually feed as a group, and all have long, downcurved bills, probing for food items, usually mud crustaceans. |
| original | Ibises all have long, downcurved bills, and usually feed as a group, probing mud for food items, usually crustaceans. |
+
+Table 2: The words of a sentence from Wikipedia ordered by the IBIS algorithm with five base LMs.
+
+mentally from left to right, IBIS works with the entire string at every step and can be stopped early to set a balance between time and output quality. As we note below, IBIS exceeds beam search in log-likelihood per word after far fewer search steps than were performed in our experiment.
+
+Dependence on base LM. We tested IBIS on the PTB dataset using four other GPT-2 variants: the lighter Distil-GPT-2 and the larger GPT-2 Medium, Large, and $\mathrm{XL}^3$ ; the BLEU scores are shown in Table 1. More powerful base LMs improve the performance of IBIS, due to their greater 'world knowledge' or understanding of syntax, yet IBIS using the smallest model, Distil-GPT-2, still outperforms beam search with GPT-2 Small. Table 2 shows a sentence reordered using all five models.
+
+Importance of the heuristic. We demonstrate the importance of the IBIS heuristic for proposing $k$ -opt moves by performing the naive $k$ -opt local search described in §2 – randomly sampling $k$ -opt moves, but keeping all other search parameters the same as for IBIS. On the PTB test data, the sentence reconstructions by this algorithm are significantly worse than those by IBIS: the search tends to exceed the patience (128 steps without improvement) at a higher negative log-likelihood.
+
+
+Figure 4: The NLL/word on PTB sentences (defined as in Table 1) as a function of the number of $k$ -opt batches, with and without the IBIS heuristic. IBIS tends to converge faster than an unguided $k$ -opt search and stabilizes at lower NLL, yet both reach lower NLL than the computationally comparable beam search baseline (BS-1024+g).
+
+Fig. 4 shows the mean negative log-likelihood per word as a function of the number of search steps, averaged over all sentences in PTB. IBIS reaches a lower NLL than the strongest beam search algorithm we evaluate after just 59 size-128 batches - equivalent to about $\frac{1}{4}$ of the number of calls to GPT-2 made by beam search - and a lower NLL than the original text after 169 batches. Random $k$ -opt search requires 6 times as many steps to reach the NLL of beam search.
+
+Curiously, random $k$ -opt search reaches a better NLL but a worse BLEU score than the beam search baseline, suggesting that beam search is good at correctly generating short spans of text (benefiting BLEU), but $k$ -opt search is better at reasoning over the entire sentence (benefiting total likelihood).
+
+# 4 Experiments: (Im)permutability
+
+Using the IBIS algorithm, we analyze the importance of word order in English text of different genres. We use three publicly available corpora covering different domains of textual expression:
+
+Yelp: About 560k Yelp reviews, commonly used as a text classification benchmark.4
+
+Wiki: 2m Wikipedia articles (Shaoul, 2010).5
+
+arXiv: 1.7m scientific preprint abstracts (Clement et al., 2019)6 filtered to remove $\mathrm{T}_{\mathrm{EX}}$ .
+
+IBIS can be applied to any bag of tokens, including punctuation marks, as shown in Fig. 2 and Table 2. In §3, we shuffled all tokens in a sentence to be consistent with the setup in prior work. However, to measure whether order is essential to conveying meaning, we face the problem of discerning whether punctuation marks are used to structure a compound thought or to separate distinct thoughts:
+
+the pathological example is a stylistic choice to replace all periods with semicolons.
+
+To simply investigate how long a phrase needs to be before it becomes possible to find significant rearrangements with higher likelihoods, we limit our analysis to text spans of two kinds: sentences that contain no punctuation and spans of text between two consecutive punctuation marks. We sample 1000 such sentences and spans from each of the three domains with lengths (in words) falling into each of several buckets (Table 4) and infer their most likely word orders using IBIS. For the spans between punctuation, 50 words of ordered context before the initial punctuation mark are provided for scoring of candidate word orders.
+
+We analyze the reconstructions automatically using BLEU scores and via human evaluation.
+
+Results and discussion. Table 4 shows the BLEU scores of the IBIS-inferred spans with respect to the original orders, as well as the ratio of perplexities under GPT-2 of the original and reconstructed texts. IBIS often finds orders that are more likely than the original ones in all three domains. The similarity of reconstructed and original spans at small lengths ( $<30$ tokens) is remarkably high. $^{7}$
+
+We also see some differences between the domains. Especially at higher lengths, sentences and spans from Wikipedia and Yelp are difficult to permute into sentences with higher likelihood $(\mathrm{PR} > 1)$ . Reconstructed sentences from Yelp and arXiv retain fewer of the original 2-, 3-, and 4-grams (lower BLEU). Indeed, long Yelp sentences tend to 'ramble' using many frequent words, arXiv sentences are full of scientific terms that a non-expert can easily permute without losing grammar
+
+I was just there again in April and bragged to my friends about how great it was and we were all horribly disappointed. just bragged to all my friends about how great it was in April and we were there again and I was horribly disappointed.
+
+Mao Zedong's philosophical essay furthered Marx and Lenin's thesis and suggested that all existence is the result of contradiction. Marx and Lenin's philosophical essay suggested and furthered Mao Zedong's thesis that all existence is the result of contradiction.
+
+We introduce a longevity feature to the classical optimal dividend problem by adding a constraint on the time of ruin of the firm. We introduce the classical problem of the optimal ruin of a firm by adding longevity to the feature time constraint on a dividend.
+
+Table 3: Examples of original and IBIS-reconstructed sentences from Yelp, Wikipedia, and arXiv (top to bottom). More examples are shown in Table 8.
+
+| (no punct.) | Yelp | Wiki | arXiv |
| Length | BLEU | PR | BLEU | PR | BLEU | PR |
| 5-9 | 81.5 | 0.94 | 77.4 | 0.91 | 75.0 | 0.91 |
| 10-19 | 69.5 | 0.91 | 67.4 | 0.90 | 51.6 | 0.80 |
| 20-29 | 51.3 | 0.97 | 51.9 | 0.96 | 37.0 | 0.79 |
| 30-39 | 35.7 | 1.04 | 38.8 | 1.01 | 27.2 | 0.79 |
| 40-49 | 24.7 | 1.01 | 31.4 | 1.07 | 23.1 | 0.82 |
| (btw punct.) | Yelp | Wiki | arXiv |
| Length | BLEU | PR | BLEU | PR | BLEU | PR |
| 5-9 | 67.5 | 0.98 | 67.0 | 0.85 | 61.5 | 0.96 |
| 10-19 | 63.4 | 1.08 | 62.4 | 0.97 | 49.9 | 1.03 |
| 20-29 | 49.7 | 1.08 | 47.5 | 1.02 | 43.2 | 0.89 |
+
+Table 4: Comparison of original and IBIS-inferred orders of punctuationless sentences (above) and spans between punctuation (below) of different lengths. We report BLEU score and ratio of perplexities (PR). A PR less than 1 indicates that IBIS reaches lower NLL per word than the original text.
+
+icality, and Wikipedia sentences have a measured style more familiar to GPT-2 (see Table 3).
+
+Human evaluation. Three human subjects were asked to rate the relationship of IBIS-inferred punctuationless sentences to the original texts. We sampled 50 sentences from each of the five length buckets from the Wiki dataset; annotators ranked each pair (original sentence, IBIS-inferred order) on a scale of 0 (the inferred order is unreadable or completely dissimilar to the original sentence) to 3 (the original and inferred orders are identical, achieved for 47 of the 250 sentences).
+
+For punctuationless sentences with fewer than 20 words, more than half of pairs were given scores of 2 or 3 (similar or identical meaning). This number sharply drops with increasing length, but long punctuationless sentences are rare in normal text: most sentences without punctuation have fewer than 20 words. More details can be found in Appendix D.
+
+| n | perplexity | token acc % | πacc % |
| latent | top | rand | latent | top | rand |
| 1 | | 30.1 | | | 38.1 | | 100.0 |
| 2 | 30.5 | 31.7 | 49.4 | 38.1 | 38.0 | 31.3 | 98.5 |
| 3 | 31.4 | 34.2 | 72.9 | 37.5 | 37.5 | 25.4 | 96.4 |
| 4 | 32.2 | 36.2 | 97.0 | 37.3 | 37.2 | 21.8 | 94.0 |
| 5 | 33.2 | 39.3 | 123.5 | 36.9 | 36.7 | 18.1 | 90.9 |
| 6 | 34.2 | 42.2 | 150.6 | 36.4 | 36.2 | 16.0 | 86.8 |
| 7 | 35.1 | 46.0 | 177.1 | 36.3 | 35.9 | 14.3 | 83.0 |
+
+Table 5: Perplexity and accuracy of next-word predictions of GPT-2 Small, conditioned on the bag of the previous $n$ words $B$ and ${50} - n$ tokens of earlier context $C$ . The last column is the frequency with which the true order of the $n$ previous words is the most likely under the posterior $p\left( {\pi \mid C,B}\right)$ .
+
+# 5 Experiments: (Dis)order in NLP tasks
+
+In this section we answer the question: How well could language models perform on standard NLP tasks if they were not given access to word order?
+
+# 5.1 Word order and text generation
+
+Left-to-right (autoregressive) text generation remains a principal direction of NLP research. How well could models such as GPT-2 generate text if, when prompted to generate the next word in a text, they did not know the order of the previous words? We measure the performance of GPT-2 in generating the next token in a text where the order of the previous $n$ words is treated as a latent variable.
+
+GPT-2 is a generative model of tokens, where preceding tokens (context) are used as predictor variables. We break this context into two parts: the distant ordered context $C$ , followed by a bag of $n$ tokens $B = \{w_{1},\dots ,w_{n}\}$ whose order is not known (50 tokens in total). We evaluate the perplexity and word prediction accuracy of GPT-2 on a sample from OpenText, a reacquired version of the model's training data, under three schemes for predicting the next word $w_{n + 1}$ given $C$ and $B$ :
+
+Latent. There are $n!$ possible orders of the bag
+
+ | CoLA MCC | entailment | paraphrase | SST-2 acc % | WNLI acc % |
| MNLI-m/mm acc % | QNLI acc % | RTE acc % | MRPC F1 / acc % | QQP F1 / acc % | STS-B ρP / ρS |
| original | 58.2 | 83.7 / 84.1 | 90.7 | 64.8 | 88.0 / 83.6 | 90.6 / 87.3 | 88.3 / 88.1 | 91.9 | 39.4 |
| random | 0.4 | 65.5 / 65.4 | 74.8 | 56.5 | 81.8 / 73.1 | 74.2 / 72.3 | 82.1 / 82.0 | 80.7 | 54.3 |
| IBIS | 39.2 | 79.4 / 79.8 | 86.4 | 64.8 | 86.1 / 81.0 | 88.9 / 84.4 | 87.8 / 87.5 | 86.0 | 40.3 |
+
+Table 6: Standard metrics of finetuned BERT models (mean of 32 random seeds) on the GLUE benchmark tasks, evaluated on raw validation data, data with randomly ordered words, and data with word order inferred by IBIS.
+
+of tokens $B$ . We denote the order by $\pi$ , a discrete latent variable taking values in permutations $(\pi : \{1, \dots, n\} \to \{1, \dots, n\})$ . By scoring each of these permutations following the context $C$ under the base LM, we compute the posterior distribution over this latent variable conditioned on $C$ :
+
+$$
+p (\pi \mid C, B) \propto p _ {\mathrm {L M}} \left(w _ {\pi (1)} \dots w _ {\pi (n)} \mid C\right).
+$$
+
+Under any order $\pi$ of the past $n$ tokens, the LM gives a distribution over the word $w_{n + 1}$
+
+$$
+p \left(w _ {n + 1} \mid \pi , C, B\right) = p _ {\mathrm {L M}} \left(w _ {n + 1} \mid C w _ {\pi (1)} \dots w _ {\pi (n)}\right).
+$$
+
+In this setting, we predict $w_{n+1}$ by integrating out the latent $\pi$ (i.e., summing over all possible orders):
+
+$$
+\begin{array}{l} p \left(w _ {n + 1} \mid C, B\right) = \sum_ {\pi} p (\pi \mid C, B) p \left(w _ {n + 1} \mid \pi , C, B\right) \\ \propto \sum_ {\pi} p _ {\mathrm {L M}} \left(w _ {\pi (1)} \dots w _ {\pi (n)} w _ {n + 1} \mid C\right). \tag {3} \\ \end{array}
+$$
+
+Top. The same as Latent, but using only the top $\pi$ , i.e., $p(w_{n+1} \mid \arg \max_{\pi} p(\pi \mid C, B), C, B)$ .
+
+Random. In this case, we assume a uniform distribution over orders $\pi$ of the bag $B$ and predict
+
+$$
+p \left(w _ {n + 1} \mid C, B\right) = \frac {1}{n !} \sum_ {\pi} p \left(w _ {n + 1} \mid \pi , C, B\right). \tag {4}
+$$
+
+This expression differs from (3) in that the likelihood under the base LM of the order of recent context is not taken into account: the order $\pi$ of the bag $B$ is assumed to be randomly sampled.
+
+Results and discussion. The perplexity and token accuracy of GPT-2 Small under the Latent, Top, and Random schemes are shown in Table 5. Remarkably, even for 7 tokens of unordered context, integrating over a latent order reduces accuracy only about $2\%$ from the model that has access to fully ordered context, and $83\%$ of the time, the true order of the bag of 7 preceding tokens has the highest likelihood out of $7! = 5040$ possible orders.
+
+In light of the latter, it is unsurprising that the Top method has only lightly worse metrics than Latent.
+
+However, the model rapidly degenerates when we randomly sample the order of the previous tokens. Indeed, the dependence of a word on a context word appearing $m$ positions earlier sharply decreases with $m$ . When the number of shuffled tokens $n$ is large, the recent words, which are most predictive of the target word, are often moved far back in the context (see Appendix C for an example).
+
+GPT-2 was trained with the objective of predicting a word given ordered context. We have shown that GPT-2 is able to infer the order of the context itself, then use it for prediction, while losing little in accuracy and perplexity. This is as much a result about language as it is a result about language models: the bag of tokens carries almost as much information as the ordered sequence.
+
+# 5.2 Word order and GLUE
+
+We evaluate the dependence of the GLUE benchmark (Wang et al., 2018) on word order in the input data. Because the inputs are often long, a full search over orders is infeasible, so we use IBIS.
+
+Specifically, for each of the 9 tasks, we finetuned the BERT-Base model (Devlin et al., 2019), a standard baseline, on (ordered) training data using typical settings. We then ran the IBIS algorithm with GPT-2 Small as the base LM to infer an order of the bag of words in each validation set sentence (in tasks with two input sentences per example, the sentences were ordered independently). The finetuned models were then evaluated on this IBIS-ordered validation data. For comparison, we evaluated the same models on validation data with words ordered randomly, as well as on the original orders.
+
+Fairy in techniques for coronavirus vaccine has been confirmed by research.
+
+The mouse was hungry. It started feeding itself by taking UndergroundMISC's engineered growth cheese assay. Now the mouse is still hungry.
+
+The cat was hungry. Someone picked up the mouse and chased the cat away from it. Now the cat is still hungry.
+
+The cat liked mice. His appetite for sweet treats was a little more intense. Now the cat hates mice.
+
+The Dragon King has reached out to the court at the request of a judge with the Magic Kingdom. The Minister of Magic declined to comment.
+
+Table 7: Constrained generation using IBIS variants (Appendix B): sentences were forced to begin or end with the underlined spans and to contain the bold words in any order; all other words were generated by the model.
+
+Results and discussion. The standard evaluation metrics for these models are shown in Table 6. At least $95\%$ of the prediction accuracy on tasks related to textual entailment (MNLI, QNLI, RTE), $97\%$ on tasks evaluating similarity detection (MRPC, QQP) $^{9}$ , and $94\%$ on the sentiment classification task (SST-2) is explained by bags of words alone. That is, such high scores can be achieved by a model that consumes only bags of words as input. Our model is a composition of a combinatorial search (IBIS) with a feedforward model (BERT), but these results place a lower bound on what models that are not given word order can achieve.
+
+The last two tasks, CoLA and WNLI, do not follow this pattern. The anomaly of WNLI, which tests resolution of ambiguous anaphora, seems to be due to the tiny size of the data (71 validation examples); the baseline models, on average, perform worse than random guessing. On the other hand, CoLA tests grammaticality judgments, which clearly depend on word order; many examples have no grammatical order in the first place. The large drop in Matthews correlation is unsurprising.
+
+The finetuned models perform substantially worse on evaluation data with randomly ordered words on all tasks (except WNLI), though still much better than chance (except on CoLA). We conclude that the trained models need word order to perform, but that the word order itself carries little information, as we can infer word orders that result in near-baseline evaluation scores.
+
+# 6 Conclusion and future work
+
+We have shown that word order in an English sentence encodes surprisingly little information in addition to that contained in the bag of words. NLP models such as BERT and GPT-2 depend on order when creating representations of text, because they were trained on ordered words, but at the same time do not strictly need it, since their understanding of syntax – and the compressed world knowledge that
+
+they hold - are sufficient to infer word order.
+
+It would be interesting to use techniques such as IBIS to study investigate humans' capacities for syntax, both productive and receptive. Are sentences with unlikely word order – as measured by a language model – more likely to lead to confusion (as in the first and last rows of Table 8)?
+
+A bolder conjecture states that many aspects of English syntax can be explained by optimality for language modeling. If, for a corpus of unordered sentences, we jointly infer a most likely word order for each example and a language model that fits these orders, do the inferred orders recover true English syntax, or at least a syntax satisfying known cross-lingual universals? If so, we would be led to vastly generalize the main claims of Levy and Jaeger (2006) and Hahn et al. (2020). An iterative ordering algorithm like IBIS is an essential step towards answering such questions.[10]
+
+Our work can guide and motivate research into combining long-range dependencies in the evolution of content – vocabulary constraints such as sentiment, global story arcs, rules of rhyme and meter, etc. – with models like GPT-2 that are capable of generating and scoring text. As we discuss in Appendix B, variants of IBIS can be used for a wide variety of such constrained generation tasks by making some of the words in the bag latent and sampling them in concert with $k$ -opt moves: generating text from keywords, constraining text to a fixed length, composing poetry, and others where beam search is inefficient (Table 7).
+
+Thus, IBIS is an attractive, flexible alternative to beam search in generative language models. It may find applications well beyond word ordering.
+
+# Acknowledgments
+
+The authors thank the anonymous reviewers for their comments and suggestions.
+
+# Ethics statement
+
+We use this section not only to promote discussion of possible societal impacts, but also to help researchers keep certain things in mind when they look to use our method and results.
+
+Annotation Process. All three human annotators (\$4) have English as their native or first language and are at least college-graduated. They were all compensated at the rate of US\$15 per hour. They were made aware that the first of the two sentences they are shown is from English Wikipedia while the second sentence is a reordering that need not be grammatical. We share the full set of instructions given to help them do the rating task in Fig. 8.
+
+Use of Large Language Models. The usage of large language models has significant environmental and financial impacts. However, the majority of the cost is borne by training a new large language model, rather than using an already trained fixed language model as we do in our algorithm. We posit that using more computationally feasible inference methods using existing large language models and resources, instead of training even bigger models or methods that require months of compute cycle, makes our work more usable and accessible.
+
+Large pretrained language models are also known to carry significant social biases, and this might affect the optimal ordering of a bag of words that our approach may find (since our search space stems from the probabilities learned by large language models). In fact, it will be interesting to conduct a study specifically focused on language model preferences for word order in cases where the subject and object of a text operate in an imbalanced power hierarchy: we expect the training data of language models to have an impact on the recovered word order. On a broader note, our findings of how sentence structure may often be redundant in English text could be a premise for further work in sociolinguistics about variation in norms of word order.
+
+Language. It is important to keep in mind that our experiments pertain to the English language and that our findings and implications should not
+
+be transferred to other languages without further experimentation. For example, we may expect measures of permutability to differ significantly in synthetic languages that mark grammatical roles by suffixation and have a freer word order: a Russian or Warlpiri sentence is more likely to have a grammatical reordering than an English or Mandarin one, but this reordering may have nearly the same meaning as the original sentence, with the context of surrounding sentences playing a large role in conditioning topicalization. In other highly agglutinative languages, entire complex sentences can be expressed in a single (orthographic) word, and the very notion of 'word' as separate from 'morpheme' is difficult to define – a challenge for NLP models.
+
+# References
+
+Noam Chomsky. 1965. Aspects of the Theory of Syntax. MIT Press.
+Colin B. Clement, Matthew Bierbaum, Kevin P. O'Keeffe, and Alexander A. Alemi. 2019. On the use of arxiv as a dataset.
+Adrià de Gispert, Marcus Tomalin, and Bill Byrne. 2014. Word ordering with phrase-based grammars. In Proceedings of the 14th Conference of the European Chapter of the Association for Computational Linguistics, pages 259-268, Gothenburg, Sweden. Association for Computational Linguistics.
+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.
+Jeffrey L. Elman. 1990. Finding structure in time. Cognitive Science, 14(2):179-211.
+Ashim Gupta, Giorgi Kvernadze, and Vivek Srikumar. 2021. Bert & family eat word salad: Experiments with text understanding. Proceedings of the AAAI Conference on Artificial Intelligence, 35:12946-12954.
+Michael Hahn, Dan Jurafsky, and Richard Futrell. 2020. Universals of word order reflect optimization of grammars for efficient communication. Proceedings of the National Academy of Sciences, 117(5):2347-2353.
+Keld Helsgaun. 2000. An effective implementation of the Lin-Kernighan traveling salesman heuristic. European Journal of Operational Research, 126(1):106-130.
+
+Matic Horvat and William Byrne. 2014. A graph-based approach to string regeneration. In Proceedings of the Student Research Workshop at the 14th Conference of the European Chapter of the Association for Computational Linguistics, pages 85-95, Gothenburg, Sweden. Association for Computational Linguistics.
+Mohit Iyyer, Varun Manjunatha, Jordan Boyd-Graber, and Hal Daumé III. 2015. Deep unordered composition rivals syntactic methods for text classification. 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 1681–1691, Beijing, China. Association for Computational Linguistics.
+T. Florian Jaeger. 2010. Redundancy and reduction: Speakers manage syntactic information density. Cognitive Psychology, 61(1):23-62.
+Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. 2017. Bag of tricks for efficient text classification. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 427-431, Valencia, Spain. Association for Computational Linguistics.
+Urvashi Khandelwal, He He, Peng Qi, and Dan Jurafsky. 2018. Sharp nearby, fuzzy far away: How neural language models use context. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 284-294, Melbourne, Australia. Association for Computational Linguistics.
+Roger Levy and T. Florian Jaeger. 2006. Speakers optimize information density through syntactic reduction. In Advances in Neural Information Processing Systems, volume 19, pages 849-856.
+Shen Lin and Brian Kernighan. 1973. An effective heuristic algorithm for the traveling-salesman problem. Operations Research, 21(2):498-516.
+Jiangming Liu and Yue Zhang. 2015. An empirical comparison between n-gram and syntactic language models for word ordering. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 369–378, Lisbon, Portugal. Association for Computational Linguistics.
+Yijia Liu, Yue Zhang, Wanxiang Che, and Bing Qin. 2015. Transition-based syntactic linearization. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 113-122, Denver, Colorado. Association for Computational Linguistics.
+Mitchell P Marcus, Beatrice Santorini, Mary Ann Marcinkiewicz, and Ann Taylor. 1999. Treebank-3. Linguistic Data Consortium, Philadelphia, 14.
+
+Tom McCoy, Ellie Pavlick, and Tal Linzen. 2019. Right for the wrong reasons: Diagnosing syntactic heuristics in natural language inference. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3428-3448, Florence, Italy. Association for Computational Linguistics.
+Timothy Niven and Hung-Yu Kao. 2019. Probing neural network comprehension of natural language arguments. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4658-4664, Florence, Italy. Association for Computational Linguistics.
+Thang Pham, Trung Bui, Long Mai, and Anh Nguyen. 2021. Out of order: How important is the sequential order of words in a sentence in natural language understanding tasks? In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 1145-1160, Online. Association for Computational Linguistics.
+Alec Radford, Jeffrey Wu, R. Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners.
+Anna Rogers, Olga Kovaleva, and Anna Rumshisky. 2021. A Primer in BERTology: What We Know About How BERT Works. Transactions of the Association for Computational Linguistics, 8:842-866.
+Allen Schmaltz, Alexander M. Rush, and Stuart Shieber. 2016. Word ordering without syntax. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2319-2324, Austin, Texas. Association for Computational Linguistics.
+Cyrus Shaoul. 2010. The Westbury Lab Wikipedia corpus. Edmonton, AB: University of Alberta, 131.
+Koustuv Sinha, Robin Jia, Dieuwke Hupkes, Joelle Pineau, Adina Williams, and Douwe Kiela. 2021a. Masked language modeling and the distributional hypothesis: Order word matters pre-training for little. arXiv:2104.06644.
+Koustuv Sinha, Prasanna Parthasarathi, Joelle Pineau, and Adina Williams. 2021b. UnNatural Language Inference. 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 7329-7346, Online. Association for Computational Linguistics.
+Linfeng Song, Yue Zhang, and Daniel Gildea. 2018. Neural transition-based syntactic linearization. In Proceedings of the 11th International Conference on Natural Language Generation, pages 431-440, Tilburg University, The Netherlands. Association for Computational Linguistics.
+
+Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019. BERT rediscovers the classical NLP pipeline. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4593-4601, Florence, Italy. Association for Computational Linguistics.
+
+Stephen Wan, Mark Dras, Robert Dale, and Cecile Paris. 2009. Improving grammaticality in statistical sentence generation: Introducing a dependency spanning tree algorithm with an argument satisfaction model. In Proceedings of the 12th Conference of the European Chapter of the ACL (EACL 2009), pages 852-860, Athens, Greece. Association for Computational Linguistics.
+
+Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353-355, Brussels, Belgium. Association for Computational Linguistics.
+
+Yue Zhang and Stephen Clark. 2011. Syntax-based grammaticality improvement using CCG and guided search. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pages 1147-1157, Edinburgh, Scotland, UK. Association for Computational Linguistics.
+
+# A More on IBIS
+
+# A.1 Search parameters and code
+
+We describe the search strategy of IBIS. As noted in the main text, a complete enumeration of $k$ -opt moves to rank in the batch proposal step is not feasible. Thus we do the following:
+
+(1) At each step, we randomly sample $k \in \{3, 4, 5\}$ and a permutation of $(k - 1)!$ spans resulting from cutting the candidate sentence at $k$ points. We search only for $k$ -opt moves that permute the spans according to this permutation.
+(2) For long sentences it is impractical or infeasible, due to memory constraints, to compute the improvement in tour weight under every $k$ -opt move – for a sentence of length $N$ , the number of such moves is $O(N^{k})$ . Thus we sample a smaller set of candidate cut positions and score only $k$ -opt moves that cut the sentence at positions in this set, alternating two strategies: (a) sampling $20$ ( $k = 5$ ) or $40$ ( $k = 4$ ) random candidate cut positions and (b) taking between 7 and 14 consecutive cut candidates at a random position in the text.
+
+
+Figure 5: IBIS example code usage.
+
+
+Figure 6: Number of IBIS search steps and number of accepted $k$ -opt moves plotted with sentence length (in words) in the PTB dataset.
+
+
+
+(3) We rank all $k$ -opt moves, with the given $k$ and permutation of spans, that cut at the candidate positions by how much they improve the current tour of the auxiliary graph with its current weights. A random $b$ of the top $B$ moves are proposed as the candidate batch. (We chose $B = 512$ and took $b$ , the batch size, to be 128.)
+
+Our experiments were run on a mixture of Nvidia Tesla K80 and P40 GPUs. The latter are able to run GPT-2 Large with batch size 128 on texts the length of the longest sentence in the PTB dataset.
+
+Figure 6 shows the distribution of search steps and accepted $k$ -opt moves by sentence length.
+
+# A.2 Visualizations
+
+The associated repository includes three videos showing the evolution of texts with a widely known order, and weight matrices of the auxiliary graphs, as IBIS shuffles them into their optimal orders.
+
+# A.3 Permutation examples
+
+Table 8 shows more examples of original sentences and the word orders restored by IBIS, meant to illustrate its various success and failure modes. Of note, the first example is commonly misinterpreted by humans as having the opposite meaning. It would be interesting to study whether difficulty in communication between humans arises when spoken sentences can be permuted into text that is more likely and has very different meaning.
+
+| Let's make a bet: winner owes loser 50 dollars.
+Let's make a bet: loser owes winner 50 dollars. |
| The mouse chases the cat.
+The cat chases the mouse. |
| Thoughts without content are empty, intuitions without concepts are blind.
+Thoughts without content are empty, intuitions without concepts are blind. |
| Experience without theory is blind, but theory without experience is mere intellectual play.
+Experience without theory is blind, but experience without theory is mere intellectual play. |
| Heat 12 oz. light beer, 1/2 tsp. Dijon mustard on low; whisk in 4 c. shredded sharp cheddar cheese until melted and smooth.
+Heat 1/2 tsp. Dijon mustard, melted in 4 oz. beer; whisk 12 c. shredded cheddar cheese on low light until smooth and sharp. |
| To be, or not to be, that is the question: whether ‘tis nobler in the mind to suffer the slings and arrows of outrageous fortune, or to take arms against a sea of troubles, and by opposing end them: to die, to sleep; no more; and by a sleep, to say we end the heart-ache, and the thousand natural shocks that flesh is heir to?
+To say we suffer is to take a thousand shocks, whether in the flesh, or by the nobler heart, or by the more outrageous sea-ache and slings of arrows, and to be against them: and to end troubles, to end arms, to be of the opposing mind; and to die: no question, that ‘tis not a sleep; that sleep is the natural heir to fortune? |
| Remarkably, even for entire paragraphs, the heuristic search is able to find mostly grammatical and somewhat coherent orderings.
+Remarkably, heuristic search is mostly grammatical, somewhat coherent and even able to find the orderings for entire paragraphs. |
| It certainly was cold, he concluded, as he rubbed his numbed nose and cheek-bones with his mittened hand.
+It was certainly cold, he concluded, as he numbed his hand and rubbed his nose with mitten-ed cheekbones. |
| This much-needed paper fills a gap in the literature.
+This paper fills a much-needed gap in the literature. |
+
+Table 8: Miscellaneous original sentences and the rearrangements of their bags of words inferred by IBIS under GPT-2.
+
+# B IBIS beyond linearization
+
+In this section, we explore a few additional applications of IBIS and its variants. The generated examples presented here were chosen out of multiple runs for each prompt and not thoroughly evaluated by automatic metrics, but are rather intended to suggest possible uses and advantages of order-free generation.
+
+# B.1 Latent bags of words and lexical constraints
+
+Suppose that we aim to generate a text with lexical constraints; e.g., the number of instances or particular words or the total length of the text may be fixed. Under an autoregressive LM, sampling from the set of sequences where the constraints are satisfied is in general intractable; for instance, it
+
+is even intractable to sample from the distribution over sequences of length 10 ending with a period.
+
+The IBIS algorithm can be modified to search for the most likely sequences of tokens satisfying such constraints. For example, suppose we are generating a text with six tokens that is required to contain the words 'cat' and 'mouse'. We initialize a search with a sentence with 'cat', 'mouse', and four random words. To the IBIS search step of permuting spans of text, we add a step of replacing any word - besides 'cat' and 'mouse' - with any other word in the vocabulary. A batch proposal heuristic is possible here as well: we sample candidate replacement words at a position from the (perhaps softened) distribution over words at this position under the base LM given the current context.
+
+Table 9 shows examples of sentences inferred
+
+by such a search, constrained to begin with certain words and to contain certain other words.
+
+# B.2 Reverse generation.
+
+IBIS is readily modified to fix last few words of the generated text by simply restricting the set of candidate cut positions for $k$ -opt moves. Thus we can generate text constrained to end with given words. IBIS with a word replacement step enables a faster and more robust reverse generation using only a forward LM (Table 10).
+
+Notice that this search is able to find strings relevant to future context: when the sentence is forced to end with a span about cats, replacing a word in the middle of the sentence with 'cat' increases the likelihood of the entire text. At some point in the search, 'cat' gets sampled as a replacement, and the search enters a NLL sink: the word 'cat' is now likely to remain.
+
+# B.3 Rhyming constraints
+
+To give a taste of what further applications are possible, we use a modified IBIS to generate short verses. Rhyme and meter are lexical constraints that can be incorporated into word replacement search steps: for example, the words sampled for replacement at certain positions may be required to lie in the set of words that rhyme with an already generated line.
+
+Let us rewrite Shelley's famous lines:
+
+Rise like Lions after slumber
+
+In unvanquishable number-
+
+Shake your chains to earth like dew
+
+Which in sleep had fallen on you
+
+Ye are many-they are few.
+
+with the help of Distil-GPT-2, forced to keep the two underlined lines and generate two new rhyming lines of appropriate length:
+
+If you have a ton of lumber
+
+In unvanquishable number
+
+Then enjoy your lumber stew--
+
+Ye are many-they are few.
+
+Similarly, the following haiku verses, the result of a human-machine collaboration between the authors and GPT-2, were constrained to use the bold words and satisfy metric constraints.
+
+Fuji. Simple frog,
+
+humble, short feet, do you know
+
+the distance to home?
+
+See the early moon
+
+Nightwatcher's little lantern
+
+But I see nothing.
+
+# C On random and latent next-word prediction
+
+The goal of this short section is to illustrate how randomly sampling an order of recent context degrades the performance of GPT-2 in predicting the next token, while inferring it as a latent order does not. Consider the input: "Our Father, who art in Heaven, hallowed be thy" (I indicates subword division). GPT-2 recognizes this standard text and would predict the next word as 'name' if given ordered context. Integrating over a latent order of the last $n = 2, \ldots, 7$ tokens, or taking a random order of the last 2 or 3 tokens, the most likely next token is still 'name'. However, for $n = 4$ , the most likely next token under a random order is 'lowed': the distribution over next tokens is quite flat, and the most significant pattern is that 'hall' is the last token in $\frac{1}{4}$ of orders - strong evidence for 'lowed' to follow.
+
+# D Human evaluation on punctuationless sentences
+
+All pairs of punctuationless sentences (original and IBIS-inferred orderings) were independently rated by 3 annotators, where each annotator followed the instruction set laid out in Fig. 8.
+
+The distribution of users' ratings for punctuationless sentences in each of the length buckets is shown in Fig. 7. For sentences in the most common length bucket (10-19), almost half of sentences are either identical to or have the same or similar meaning as the original text.
+
+12 11 10 9 8 7 6 5 4 3 2 1
+
+-4-3-2-101234567
+
+Fairy in techniques for coronavirus vaccine has been confirmed by research.
+
+In the aftermath of the storm, humans and hippos, penguins, dolphins, and the dinosaurs were forced into the streets by the hive mind of the Internet.
+
+See the full video for a long list of physicists and Mars' history as well as insights to the origins of bubbles.
+
+Drones, drugs, climate change: the search for answers to nothing.
+
+Table 9: Examples of constrained generation using IBIS endowed with a word replacement step. Underlined words are a fixed initial context, while the bold words are required to appear anywhere in the text, in some order. The base LM was Distil-GPT-2; a slight relaxation of greedy ascent is employed.
+
+The cat was hungry. Someone picked up the mouse and chased the cat away from it. Now the cat is still hungry.
+
+The mouse was hungry. It started feeding itself by taking UndergroundMISC's engineered growth cheese assay. Now the mouse is still hungry.
+
+The cat liked mice. His appetite for sweet treats was a little more intense. Now the cat hates mice.
+
+The world just had a cat and a dog fight. Now the cat isn't hungry anymore.
+
+The cat and the mouse were both hungry. Although they oversee the animal kingdom, their predators eat more. Now only one of them is hungry.
+
+I thought I could find my future and fix it, but everyone was running in panic.
+
+The announcement of the student strike is expected to be welcomed by many of us. Students across Canada are rejoicing.
+
+The Dragon King has reached out to the court at the request of a judge with the Magic Kingdom. The Minister of Magic declined to comment.
+
+Table 10: Examples of reverse generation with an IBIS variant. Just as in Table 9, the underlined tokens are fixed and the bold tokens are required to appear.
+
+
+Figure 7: Annotators' ratings of similarity between original and reordered sentences (§D).
+
+Rate or label the given pair of sentences for "the similarity in their meanings", where the label can be 0/1/2 as follows:
+
+LABEL 0: The two sentences are essentially completely different with not even surface similarities in what they mean or how they are structured, etc. This includes cases where the second sentence by itself seems non-sensical or meaningless because it is completely ungrammatical or not how English sentences look like (according to your understanding) by starting the sentence from the middle, etc. Examples of this score:
+
+Sentence 1: Tyrone Winsloe takes an interest in Elena, wanting her to wear skimpy clothing as well as watch, and participate in his 'hunts'.
+Sentence 2: hunts, Winsloe takes an interest in Elena, wanting to participate in and watch her, as well as wear his skimpy clothing 'Tyrone'.
+
+Label: [0]
+
+Sentence 1: When he would pass out, the staff would throw water on him.
+Sentence 2: When staff would pass him on, he would throw out the water.
+
+Label: [0]
+
+Sentence 1: Always for Canale 5, Boldi has interpreted his first fiction tv, giving life to the character of "big dad", Lorenzo Fumagalli in the television series "Un cyclone in famiglia", directed by Carlo Vanzina.
+Sentence 2: for tv series directed by Lorenzo F. Boldagalli, Carlo Van toi cycloneum, first television character in "Unbigale", has interpreted the life of his dad in "Always 5", giving the Canzina famiglia fiction
+
+Label: [0]
+
+LABEL 1: There are surface similarities between the two sentences or they are same except for some entities being switched around but in a way that the meaning changes. The meaning of the two sentences is different overall, though they say the same things in part. This can be loosely translated as "some similarities but different in their overall meaning". Examples:
+Sentence 1: "In 1895 they joined the South East Lancashire League, and a new professional and coach was employed, a John Redfern from Linthwaite."
+Sentence 2: "In 1895 the Linthwaite League joined from Lancashire and they employed a new coach, John Redfern, and was a South East professional."
+
+Label: [1]
+
+Sentence 1: "Bekhud Badayuni's most recent biographer was the late Dr. Asad Ahmad of Aligarh Muslim University's Urdu Department."
+Sentence 2: "Budhayuni Muslim University's Urdu Department of the late Dr. Asad Ahmad Badek was Aligarh's most recent biographer."
+
+Label: [1]
+
+Sentence 1: "The party merged into the Deutsche Konservative Partei in 1946."
+Sentence 2: "The Deutsche Partei merged into the Konservative party in 1946."
+
+Label: [1]
+
+LABEL 2: The two sentences have the same or similar meaning even though they are not exact copies of one another. Examples:
+Sentence 1: "A keel-laying ceremony for the submarine was held at Electric Boat's Quonset Point facility in North Kingstown, Rhode Island, on 30 April 2007."
+Sentence 2: "A keel-laying ceremony for the submarine was held on April 30, 2007 at Electric Boat's Quonset Point facility in North Kingstown, Rhode Island."
+
+Label: [2]
+
+Sentence 1: "In 1970, the remains of Sears, Smyth and Daly were repatriated to Ireland by The National Graves Association and given a military funeral with full honours."
+Sentence 2: "In 1970, the remains of Sears, Daly and Smyth were repatriated to Ireland and given a full military funeral with honours by The National Graves Association."
+
+Label: [2]
+
+Sentence 1: "Since 2005, Maxim Vengerov has been Professor at the Royal Academy of Music in London."
+Sentence 2: "Since 2005, Professor Maxim Vengerov has been at the Royal Academy of Music in London."
+
+Label: [2]
+
+Following this order of going about your rating should help with efficiency:
+
+1. First, just look at the second sentence and if it does not seem like a well-formed English sentence and appears to be meaningless and basically unreadable, rate it 0 and move on. The first sentence ("original") is a sentence from English wikipedia while the second one has no such guarantee of belonging to an English text.
+2. If the second sentence seems okay when considered by itself, look at the first sentence and determine what you think should apply between 1 and 2, though 0 is still possible.
+
+Figure 8: Instructions given to the annotators.
\ No newline at end of file
diff --git a/studyingwordorderthroughiterativeshuffling/images.zip b/studyingwordorderthroughiterativeshuffling/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..a051d72ff12563a9748ed9355c3000adcdc008e4
--- /dev/null
+++ b/studyingwordorderthroughiterativeshuffling/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:21de727dd2a38be3298f0ab2bdbf6eeff1b53a66e648d28e0d6e3bf279c76f5d
+size 713931
diff --git a/studyingwordorderthroughiterativeshuffling/layout.json b/studyingwordorderthroughiterativeshuffling/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..e6b4b224669f636a7375b0179d98ed1ad57f44d6
--- /dev/null
+++ b/studyingwordorderthroughiterativeshuffling/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:19217dad5f9f8cbc11f8d51038fa486442678ab1794dc889acfafa065d911c97
+size 597773
diff --git a/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/529ddeee-2518-4f4a-a647-39df109a4bb2_content_list.json b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/529ddeee-2518-4f4a-a647-39df109a4bb2_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..85c2e099eb0717e49cb9495dc97fd7b2d1c4cca2
--- /dev/null
+++ b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/529ddeee-2518-4f4a-a647-39df109a4bb2_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0a7cf5f139b6c0ac460c0ee52f877ccd0e53dc8735a3220a2bdfe031225dbb86
+size 98495
diff --git a/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/529ddeee-2518-4f4a-a647-39df109a4bb2_model.json b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/529ddeee-2518-4f4a-a647-39df109a4bb2_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..e66475e44368b5fe39693dba6175cb25f1d38bfb
--- /dev/null
+++ b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/529ddeee-2518-4f4a-a647-39df109a4bb2_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6378a906358d5a3d9a4078e8f796f8c7dbd0863cdb899004bde02258917c5c2f
+size 117101
diff --git a/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/529ddeee-2518-4f4a-a647-39df109a4bb2_origin.pdf b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/529ddeee-2518-4f4a-a647-39df109a4bb2_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..3c21b7cf5b65840bff3dcbce0f4400ba07c46fd4
--- /dev/null
+++ b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/529ddeee-2518-4f4a-a647-39df109a4bb2_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e4cc37a1bc00223cdbfc9822f2e07087bff36f14bb1da8fe8e14315b4d3627a0
+size 1238055
diff --git a/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/full.md b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..f44b811c0e1acf9552e8072fd96bc4fb85e11778
--- /dev/null
+++ b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/full.md
@@ -0,0 +1,379 @@
+# Style Pooling: Automatic Text Style Obfuscation for Improved Classification Fairness
+
+Fatemehsadat Mireshghallah, Taylor Berg-Kirkpatrick
+
+University of California San Diego,
+
+{fatemeh, tberg}@ucsd.edu
+
+# Abstract
+
+Text style can reveal sensitive attributes of the author (e.g. race or age) to the reader, which can, in turn, lead to privacy violations and bias in both human and algorithmic decisions based on text. For example, the style of writing in job applications might reveal protected attributes of the candidate which could lead to bias in hiring decisions, regardless of whether hiring decisions are made algorithmically or by humans. We propose a VAE-based framework that obfuscates stylistic features of human-generated text through style transfer by automatically re-writing the text itself. Our framework operationalizes the notion of obfuscated style in a flexible way that enables two distinct notions of obfuscated style: (1) a minimal notion that effectively intersects the various styles seen in training, and (2) a maximal notion that seeks to obfuscate by adding stylistic features of all sensitive attributes to text, in effect, computing a union of styles. Our style-obfuscation framework can be used for multiple purposes, however, we demonstrate its effectiveness in improving the fairness of downstream classifiers. We also conduct a comprehensive study on style pooling's effect on fluency, semantic consistency, and attribute removal from text, in two and three domain style obfuscation.1
+
+# 1 Introduction
+
+Machine learning (ML) algorithms are used in a wide range of tasks, including high-stakes applications like determining credit ratings, setting insurance policy rates, making hiring decisions, and performing facial recognition. It has been shown that such algorithms can produce outcomes that are biased towards a certain gender or race (Buolamwini and Gebru, 2018; Silva et al., 2021; Sheng et al., 2021).
+
+Ideally, high-stakes decisions made by either humans or ML algorithms, should not be influenced by irrelevant, protected attributes like nationality,
+
+age, or gender. In many instances, the input data used for making high-stakes decisions is text that is authored by a human candidate – for example, hiring decisions are often based on bios and personal statements. Recent work (De-Arteaga et al., 2019) shows that automatic hiring-decision models trained on bios are less likely to select female candidates for certain roles (e.g. architect, software engineer, and surgeon) even when the gender of the author is not explicitly provided to the system. Bias is, of course, not limited to algorithmic decisions, humans make biased decisions based on text, even when the protected attributes of the author are not explicitly revealed (Pedreshi et al., 2008). Together, these results indicate that both algorithms and humans can (1) decipher protected attributes of authors based on stylistic features of text, and (2) whether consciously or not, be biased by this information.
+
+A large body of prior work has attempted to address algorithmic bias by modifying different stages of the natural language processing (NLP) pipeline. For example, Ravfogel et al. (2020) attempt to de-bias word embeddings used by NLP systems, while Elazar and Goldberg (2018) address the bias in learned model representations and encodings. While effective in many cases, such approaches do nothing to mitigate bias in decisions made by humans based on text. We propose a fundamentally different approach. Rather than mitigating bias in learning algorithms that make decisions based on text, we propose a framework that obfuscates stylistic features of human-generated text by automatically re-writing the text itself. By obfuscating stylistic features, readers (human or algorithms) will be less able to infer protected attributes that enable bias.
+
+We introduce a novel framework that enables 'style pooling': the automatic transduction of user-generated text to a central, obfuscated style. Notions of 'centrality' can themselves introduce bias - for example, a system might learn to obfuscate by mapping all text to the dominant style
+
+Table 1: Example Blog sentences transformed with A4NT (Shetty et al., 2018) and our proposed Intersection and Union obfuscations. Our Intersection obfuscation aims at changing the style such that it does not reflect either teen or adult style. However, the union, tries to reflect both by making changes like adding "... to the beginning of the sentence (adult style) while keeping the "grr" (teen style). Or by adding exclamation marks at the end of the sentence.
+
+| Age | Input Sentence (Original Data) | A4NT (Baseline) | Intersection | Union |
| Teen | grr ... now i get cold quicker. | grr now i get cold lol. | hmmm ... now i get cold. | ... grr ... now i get cold quicker. |
| Teen | it was so fricken hilarious. | it was so boring hilarious. | it was so utterly hilarious. | it was so totally hilarious |
| Adult | well i 've just been too busy. | well i 've just been kinda fun. | well i 've just been too busy. | well i 've just been too busy. |
| Adult | these were common phrases. | these were common teacher. | these were common. | these were common !! |
+
+seen in its training corpus. This might 'white-wash' text, ignoring stylistic features of underrepresented groups in the learned notion of central style. Our framework operationalizes the notion of centrality in a more flexible way: our probabilistic approach allows us to choose between two distinct notions of centrality. First, we define a variant of our model which is incentivized to learn a minimal notion of central style that effectively intersects the various styles seen in training. This is achieved through the design of this variant's probabilistic prior. We further equip this variant with a novel "de-boosting" mechanism, which amplifies the use of words that are less likely to leak sensitive attributes, and de-incentivizes the use of words whose presence might hint at a particular sensitive attribute. Second, we propose an alternative prior that instead incentivizes a maximal notion of style that seeks to obfuscate by adding stylistic features of all protected attributes to text – in effect, computing a union of styles. Table 1 shows our intersection and union obfuscation applied to sentences from the Blogs dataset, and highlights the differences between them.
+
+While we propose both these obfuscations in our framework and leave it to the users to choose, it is worth noting that the cognitive process literature shows that when humans are confronted with conflicting biasing information, they tend to form an opinion about the conflicting text, based on their own implicit biases (Richter and Maier, 2017). Therefore, removing sensitive stylistic features may be more effective than combining them. This is also commensurate with our findings, where we observed that intersection more successfully improves the fairness metric (Section 4.2.1).
+
+We extensively evaluate our proposed framework on a wide range of tasks. First, we compare and contrast our "intersection" and "union" obfuscations on a modified version of the Yelp dataset (Shen et al., 2017) where we have created three stylistic domains by deliberately misspelling three disjoint sets of words. We show that our intersection obfuscation successfully removes these
+
+
+Figure 1: Proposed unsupervised framework for style pooling: inducing a centralized obfuscated style. $x_{i}$ represent observed text which are clustered by their sensitive attribute (age). $y_{i}$ are corresponding latent variables representing the induced obfuscated text. Training leverages an amortized inference setup similar to a VAE-style training, but, critically the prior is produced by pooling language models from each domain using two different strategies targeting (1) intersected style and (2) the union of all styles in the corpus.
+
+misspellings and replaces them by the dominant spelling of the word $99.20\%$ of the time, while our union obfuscation spreads the misspellings into the other two domains $46.40\%$ of the time. Then, we evaluate our framework on the Blogs data (Schler et al., 2006), where the sensitive attribute is age, and we measure the impact our obfuscations have on the fairness of a job classifier, using the TPR-gap measure from De-Arteaga et al. (2019). We also evaluate the removal of sensitive attributes, fluency of the generated text, and the uncertainty of a sensitive attribute classifier for our framework, in both two and three domain setups.
+
+# 2 Proposed Method
+
+In this section, we first introduce our model structure, then describe our style-pooling priors and the unsupervised learning and inference techniques we leverage for this model class. Finally, we introduce our style de-boosting mechanism.
+
+# 2.1 Model Structure
+
+Consider a training corpus consisting of utterances produced by authors with various protected attributes. In Figure 1, we depict a grouping of authors by age into three domains. We let $x_{i}$ represent an individual observed text utterance in the corpus, and assume $M$ domains (sensitive attribute classes) in the dataset. $y_{i}$ is a latent variable that represents the obfuscated version of $x_{i}$ . Hence, $y_{i}$ is a text valued latent, while $x_{i}$ is a text valued observation. We let $d(i)$ denote the domain of the $i^{th}$ sample in the dataset. With this definition, our generative process assumes each sentence $x_{i}$ , with corresponding domain $d(i)$ , is generated as follows: First, a latent sentence $y_{i}$ is sampled from a central prior, $p_{prior}(y_i)$ , which is domain agnostic. Then, $x_{i}$ is sampled conditioned on $y_{i}$ from a transduction model, $p(x_{i}|y_{i};\theta_{y\rightarrow x}^{d(i)})$ . We let $\theta_{y\rightarrow x}^{D_j}$ represent the parameters of the transduction model for the $j$ th domain. We extensively discuss $p_{prior}$ in the next section. For now, we assume the prior distributions are pretrained on the observed data and therefore omit their parameters for simplicity of notation. Together, this gives the following joint likelihood:
+
+$$
+\begin{array}{l} p (X ^ {D _ {1}}, \dots ., X ^ {D _ {M}}, Y; \theta_ {y \rightarrow x} ^ {D _ {1}}, \dots ., \theta_ {y \rightarrow x} ^ {D _ {M}}) \\ = \prod_ {i = 1} ^ {N} p \left(x _ {i} \mid y _ {i}; \theta_ {y \rightarrow x} ^ {d (i)}\right) p _ {\text {p r i o r}} \left(y _ {i}\right) \tag {1} \\ \end{array}
+$$
+
+The log marginal likelihood of the observed data, which we approximate during training, can be written as:
+
+$$
+\begin{array}{l} \log p \left(X ^ {D _ {1}}, \dots , X ^ {D _ {M}}; \theta_ {y \rightarrow x} ^ {D _ {1}}, \dots , \theta_ {y \rightarrow x} ^ {D _ {M}}\right) (2) \\ = \log \sum_ {Y} p \left(X ^ {D _ {1}}, \dots , X ^ {D _ {M}}; \theta_ {y \rightarrow x} ^ {D _ {1}}, \dots , \theta_ {y \rightarrow x} ^ {D _ {M}}\right) (2) \\ \end{array}
+$$
+
+Neural Architectures. We select a parameterization for our transduction distributions that makes no independence assumptions. We use an encoder-decoder architecture based on the standard attentional Seq2Seq model which has been shown to be successful across various tasks (Bahdanau et al., 2015; Rush et al., 2015). Our prior distributions for each domain are built using recurrent language models which also make no independence assumptions.
+
+# 2.2 Prior Distributions
+
+The critical component of our framework that incentivizes obfuscation are our specialized priors, as depicted in Figure 1. We introduce two prior variants, $p_{\mathrm{Inter}}(y)$ and $p_{\mathrm{Union}}(y)$ , which incentivize induction of intersected styles and the union of all styles, respectively. Each prior is assembled out of $M$ (here $M = 3$ ) separate language models $-p^{D_1}$ , $p^{D_2}$ , ..., $p^{D_M}$ - each trained on the corresponding domain
+
+of observed utterances in the training data. The intersection prior, $p_{\mathrm{Inter}}(y)$ , is computed by taking the sum of the likelihoods of an entire utterance across the language models from all $M$ domains (and then re-normalizing to ensure that resulting prior is a valid distribution). This utterance-level average pooling approach incentivizes a "majority-voting" effect, in which the model is pressured to remove any words and stylistic features that are characteristic of one domain, but not the others, and converge to features that are shared by the majority of the domains. Therefore the prior for intersection becomes:
+
+$$
+p _ {I n t e r} \left(y _ {i}\right) = \frac {1}{M} \sum_ {j} ^ {M} p ^ {D _ {j}} \left(y _ {i}\right) \tag {3}
+$$
+
+In contrast, the union prior, $p_{\mathrm{Union}}(y)$ , computes the likelihood of an utterance according to the minimum likelihood across each domain's language model at each token position, $t$ . Through experimentation (Sec. 4.1) we empirically observed that this prior rewards the model for inserting as many stylistic features as possible that are unique to each domain.
+
+$$
+p _ {U n i o n} \left(y _ {i}\right) \propto \prod_ {t} ^ {T} \min \left(p ^ {D _ {1}} \left(y _ {i, t} \mid y _ {i, < t}\right), \dots , p ^ {D _ {M}} \left(y _ {i, t} \mid y _ {i, < t}\right)\right) \tag {4}
+$$
+
+# 2.3 Learning and Inference
+
+Training is accomplished using an approach from (He et al., 2020): We employ seq2seq inference networks and use an amortized inference scheme similar to that used in a conventional VAE, but for sequential discrete latents.
+
+Ideally, learning should directly optimize the log data likelihood, which is the marginal shown in Eq. 2. However, due to our model's neural parameterization, the marginal is intractable. To overcome the intractability of computing the true data likelihood, we adopt amortized variational inference (Kingma and Welling, 2013) to derive a surrogate objective for learning the evidence lower bound (ELBO) on log marginal likelihood:
+
+$$
+\begin{array}{l} \log p (X ^ {D _ {1}}, \dots , X ^ {D _ {M}}; \theta_ {y \rightarrow x} ^ {D _ {1}}, \dots , \theta_ {y \rightarrow x} ^ {D _ {M}}) \\ \geq \mathcal {L} _ {\text {E L B O}} \quad \left(X ^ {D _ {1}},..., X ^ {D _ {M}}; \theta_ {y \rightarrow x} ^ {D _ {1}},..., \theta_ {y \rightarrow x} ^ {D _ {M}}, \phi_ {x \rightarrow y}\right) \\ = \sum_ {i} ^ {N} \underbrace {\left[ \mathbb {E} _ {q \left(y _ {i} \mid x _ {i} ; \phi_ {x \rightarrow y}\right)} \left[ \log p \left(x _ {i} \mid y _ {i}; \theta_ {y \rightarrow x} ^ {d (i)}\right)\right]\right.} _ {\text {R e c o n s t r u c t i o n l i k e l i h o o d}} \\ - \underbrace {D _ {\mathrm {K L}} \left( \right.q \left(y _ {i} \mid x _ {i} ; \phi_ {y \rightarrow x}\right) \mid \left| \right. p _ {p r i o r} \left(y _ {i}\right)\left. \right)\left. \right]} _ {\text {K L r e g u l a r i z e r}} \tag {5} \\ \end{array}
+$$
+
+This new objective introduces $q(y|x; \phi_{x \to y})$ , which represents the inference network distribution
+
+that approximates the model's true posterior, $p(y|x;\theta_{x\rightarrow y})$ . Learning operates by optimizing the lower bound over both variational and model parameters. Once training is over, the posterior distribution can be used for style obfuscation.
+
+The reconstruction and KL terms in Eq. 5 involve intractable expectations, which means we need to approximate their gradients. To address this, we use the Gumbel-softmax (Jang et al., 2017) straight-through estimator to backpropagate gradients from both the KL and reconstruction loss terms.
+
+Length Control. During the training of the model, we observed that it tends to repeat the same word when it is trying to generate obfuscated text, $y_{i}$ . To mitigate this, we append two floating point length tokens to the input of the inference networks decoder at each step $t$ , one of these tokens tells the model which step it is on, and the other tells it how many steps are left (Kikuchi et al., 2016; Hu et al., 2017). We also experimented with positional embeddings instead of floating point tokens, but we observed that they yield worse convergence. Another measure we take to encourage shorter sentences was to hard stop the decoding during training once the re-written sentence had the same length as the original sentence. To further stabilize training we share parameters between the inference network and the transduction models, appending an embedding to the input to indicate the output domain.
+
+# 2.4 Style De-boosting
+
+To better encourage the removal of identifying stylistic features, we introduce a de-boosting mechanism, which incentivizes the use of words that are less likely to leak sensitive attributes, and de-incentivizes the use of words whose presence might hint at a particular sensitive attribute. We build on the intuition that for a given word $w$ in the vocabulary, if the probability that it belongs to domain $m$ is similar to the probability that it belongs to domain $k$ , for any given $m, k$ within the possible domains, $M$ , then we can assume that this word does not reveal style. However, if there is a huge gap in the two probabilities, that word might hint at a certain domain if it is present in the re-written text. Therefore, we devise a normalized "style score", $s$ , for each word $w$ in the vocabulary3:
+
+$$
+s _ {w} = \frac {\operatorname* {m a x} \left(f _ {w} ^ {D _ {1}} , f _ {w} ^ {D _ {2}} , \dots , f _ {w} ^ {D _ {M}}\right) - \operatorname* {m i n} \left(f _ {w} ^ {D _ {1}} , f _ {w} ^ {D _ {2}} , \dots , f _ {w} ^ {D _ {M}}\right)}{\operatorname* {m a x} \left(f _ {w} ^ {D _ {1}} , f _ {w} ^ {D _ {2}} , \dots , f _ {w} ^ {D _ {M}}\right)} \tag {6}
+$$
+
+Where $f_{w}^{D_{1}}$ is frequency of word $w$ in the training corpus for domain $D_{1}$ , divided by the overall number of tokens (words) in the domain corpus. Using these scores, we modify the output logits of the decoder so that the output probability distribution over the vocabulary for sample $i$ at step $t$ is given by:
+
+$$
+p \left(y _ {i, t} \mid y _ {i, < t}, x _ {i}\right) \propto \operatorname {s o f t m a x} \left(L _ {i, t} - \gamma * S\right) \tag {7}
+$$
+
+Here, $L_{i,t}$ represents the logits at step $t$ , while $S$ is the score vector for all the words in the vocabulary. $\gamma$ is a multiplier that helps tune the amount of de-boosting. Due to the nature of this de-boosting mechanism, it makes sense only to use it with the intersection obfuscation and not the union.
+
+# 3 Experimental Setup
+
+Here, we provide a brief description of our experimental setup. Our code, data and model checkpoints are uploaded in the supplementary material. More details on the code, model configurations, datasets and hyperparameters are provided in Appendix Sections A.1, A.2, A.3 and A.4.
+
+# 3.1 Model Configurations
+
+We used a single layer attentional LSTM-based Seq2Seq encoder-decoder for all the experiments, with hidden layer size of 512 for both encoder and decoder, and word embedding size of 128. For the attribute classifiers and language models, we also use LSTM models with the same architecture, with a final projection layer of the size of sensitive classes/vocabulary.
+
+# 3.2 Datasets
+
+Synthetic Yelp dataset (Shen et al., 2017). We shuffle all the sentences in the Yelp reviews dataset and divide them into three groups (domains). We then randomly choose 15 words from the top 20 highest frequency words in the dataset, and allocate the set of top 5 words $(W_{1})$ to $D_{1}$ (domain 1), next 5 to $D_{2}$ and the least frequent 5 words to $D_{3}$ . We misspell all occurrences of $W_{1}$ in $D_{1}$ , by changing "word" to "11word11". We then add "11word11" to the vocabulary, and do this for all the 5 words in all 3 domains (15 words total). After this transformation, we have 3 domains with disjoint stylistic markers, which can help us more concretely analyze our obfuscation mechanism.
+
+Blogs dataset (Schler et al., 2006). The blogs dataset is a collection of micro blogs containing over 3.3 million sentences along with annotation of author's age and occupation. We use this data in both two and three domain style pooling, where we treat age as the sensitive attribute and balance the data so each domain has the same number of sentences. In the two domain setup, we divide the data in two groups of teenagers and adults. In the three style setup, we have three groups of teenagers, young adults (20s) and adults (people in their 30s and 40s). We use this dataset for multiple evaluations including fairness. We compare our obfuscation to that of Shetty et al. (2018) in all evaluations with this data.
+
+Twitter dataset (Rangel et al., 2016). We use data from the PAN16 dataset, which contains manually annotated (from LinkedIn) age and gender of 436 Twitter users, along with up to 1000 tweets from each user. We use this data for the purpose of sensitive attribute (age) removal comparison with Elazar and Goldberg (2018) in Section A.7, and have therefore used the exact same preprocessing and handling of the data as done by them.
+
+DIAL dataset (Blodgett et al., 2016). This is a Twitter dataset which has binary dialect annotations of African American English (AAE) and Standard American English (SAE) $^4$ , setting "author's race" as the sensitive attribute. We use this dataset for comparison with the work Xu et al. (2019).
+
+# 3.3 Baselines
+
+One language model prior (One-LM). This model is an instance of our framework which uses the output distribution of a single language model as the prior. For the Yelp Synthetic data this single LM is trained on the original data which does not have our modifications and would provide the ideal "intersection", since the original data itself does not have misspellings from any of our synthetic domains and can be considered as central. In the case of the Blogs data where we don't have any ideal central data which is void of style, we train an age classifier and then choose the sentences from the training set that the classifier missclassifies. We create a new training set with these samples and train a single LM on them, and use it for the prior. The intuition is that if the classifier could not guess the domain, these samples are probably close to the
+
+notion of centrality we are looking for.
+
+A4NT (Shetty et al., 2018). "A4NT: Author Attribute Anonymity by Adversarial Training of Neural Machine Translation" is the most closely related past work that also attempts to obfuscate text style through automatic re-writing. However, their adversarial approach uses a discriminator network to hide protected attributes simply by mapping the style of one protected category to that of another.
+
+PATR (Xu et al., 2019). Privacy Aware Text Rewriting (PATR) is another work close to ours, which removes sensitive attributes through text re-writing using translation and adversarial learning. Unlike style pooling, PATR, targets privacy and is therefore not concerned with the union vs. intersection of sensitive attributes.
+
+Original. We include an "original" baseline in our measurements, which shows the value of a given metric if the original un-obfuscated data was used.
+
+# 3.4 Evaluation Metrics
+
+Below we discuss our evaluation metrics, all of which are measured on the test data.
+
+# 3.4.1 Fairness
+
+TPR-gap. We first define a classifier whose main task is to determine if the occupation of an author is student or not, given text from their blog. We set the age of the author as a sensitive attribute, and want to measure the bias in the classifier, given age. We follow (De-Arteaga et al., 2019) and use the "True Positive Rate gap in age" metric. This measure quantifies the bias in a classifier by finding the gap between the true positive rate for each sensitive attribute group (teen vs. adult). For a binary sensitive attribute $a$ (age) and a true class (for the classifier's main task) $y$ , we define:
+
+$$
+T P R _ {a, y} = P (\hat {Y} = y \mid A = a, Y = y) \tag {8}
+$$
+
+$$
+G A P _ {a, y} ^ {T P R} = T P R _ {a, y} - T P R _ {a ^ {\prime}, y} \tag {9}
+$$
+
+where $A$ is the random variable denoting binary sensitive attribute with values $a$ and $a'$ . $Y$ , $\hat{Y}$ are random variables denoting the correct class and the predicted class, respectively. The lower the gap is, the more fair the classifier. We report $GAP_{Teen,Student}$ , which reflects how biased the classifier is towards classifying teens as students.
+
+# 3.4.2 Linguistic
+
+Back-Translation (BT) accuracy. We translate the obfuscated samples back to their original domain using the model, and then for each token
+
+see if it has been correctly back-translated to its origin or not. We use this metric to see whether the obfuscated version contains sufficient information about content to reconstruct the original.
+
+GPT-2 PPL. We feed our obfuscated test sentences to a huggingface (Radford et al., 2019) pre-trained GPT-2 medium model, and report its perplexity (PPL), as an automatic measure of fluency. Lower PPL hints at more fluent text.
+
+BLEU Score. In the Yelp Synthetic data experiments, since we have the original (not misspelled) text, we can calculate and report the BLEU score.
+
+GLEU Score. We use GLEU (Wu et al., 2016) score as another metric for evaluating the fluency of the generated sentences.
+
+Lexical Diversity (Lex. Div.) To better quantify the differences between different obfuscations, we calculate the lexical diversity as a ratio where the size of the vocabulary of the model's output text is the numerator, and the denominator is the overall size of the model's output text (number of all the tokens in the output).
+
+# 3.4.3 Sensitive-Attribute Classification
+
+Sensitive-attribute Classifier (Clsf.) accuracy. To evaluate the removal of sensitive attributes, we train a sensitive-attribute classifier, and use its accuracy as a metric. The closer the accuracy is to chance level (random guess), the more successful is the removal. However, there is a caveat to this metric: it is not always clear how the classifier is making its decision, if it is based on content, or style. Therefore, this metric alone is not conclusive.
+
+Entropy. To better measure how uncertain the classifier becomes, we also compute its average Entropy across all test samples. Entropy is always between $[0.0, 1.0]$ for two domain classification and $[0.0, 1.59]$ for three domain classification. The higher it is, the more uncertain the classifier is (more desirable for our purpose).
+
+Confident Response (CR) percentage. We calculate the percentage of the responses from the classifier for which it was more than $75\%$ sure.
+
+# 4 Experimental Results
+
+# 4.1 Synthetic Yelp Data
+
+Table 2 shows the experimental results for the Synthetic Yelp dataset experiment, where we trained our proposed framework using the three synthetic domains with misspellings, as explained in Section 3.2. The Corrected, Remaining and Removed percentages refer to the average ratio of
+
+Table 2: Results for the Synthetic Yelp dataset with 3 domains. Corrected shows what % of modified words in a domain were corrected back to their original format. Spread shows the reverse.
+
+ | Intersection | Union | One-LM |
| BT Accuracy (%) | 92.47 | 94.52 | 95.58 |
| Corrected (%) | 99.20 | 45.17 | 99.87 |
| Remaining (%) | 0.61 | 54.37 | 0.00 |
| Removed (%) | 0.18 | 0.46 | 0.12 |
| Spread (%) | 0.18 | 46.40 | 0.00 |
| Cls Accuracy (%) | 33.48 | 34.99 | 33.35 |
| BLEU | 81.74 | 70.86 | 93.01 |
+
+the misspellings corrected, remaining and removed for each domain. These should all sum up to $100\%$ . The Spread is the average ratio of the number of words from one domain that have been changed to misspellings from another domain. For instance, if there are 100 occurrences of "word" outside $D_{1}$ before obfuscation, if 40 of them are converted to "11word11" after obfuscation, then the spread would be $40\%$ . The One-LM can be considered as an "oracle baseline" in this case, since it was trained on original (no misspellings) data.
+
+The main goal of this controlled experiment is to compare and contrast our intersection and union obfuscations. From the Table we can see that both our obfuscations lead to high fidelity (back-translation accuracy) and semantic consistency (BLEU score). They also both render the domain classifier very close to chance level $(33.33\%)$ . The main differences between these two methods become more clear when we look at the corrected, remaining, and spread numbers. The intersection obfuscation with its average pooling, demonstrates a majority voting behavior which incentivizes correcting the misspellings since 2 out of the 3 language models advocate for the correct spelling. Therefore $99.20\%$ of the misspellings are corrected using intersection, very close to the oracle baseline. The Union prior, on the other hand, corrects only $45.17\%$ of the misspellings, and lets $54.37\%$ of them to remain as they are. It also converts $46.40\%$ of the correctly spelled words in other domains to misspellings. This shows that the union is in fact mixing the styles, creating sentences that might have more than one misspelling in them.
+
+# 4.2 Blogs Data
+
+Tables 3, 5 and 6 summarize the experimental results for the Blogs dataset. Below, we will explain each experiment in more detail.
+
+# 4.2.1 Fairness Results
+
+Table 3 shows the results for the fairness metric measurements on text generated using different obfuscations, for "Occupation" classifiers. We have selected a subset of the Blogs data for this experiment, where author occupation is either student or arts, and the age is either teen or adult (two domain obfuscation). we have taken an approach similar to that of Ravfogel et al. (2020), where we create 4 different levels of imbalance. In all cases, the dataset is balanced with respect to both occupation and age. We change only the proportion of each age within each occupation class (e.g., in the 0.8 ratio, the student occupation class is composed of $80\%$ teens and $20\%$ adults, while the arts class is composed of $20\%$ teens and $80\%$ adults). For each imbalance ratio we train the classifier on the original imbalanced data, and then test it with original and automatically generated data from different baselines.
+
+Based on Table 3, we can see that our Intersection obfuscation can improve fairness (TPR-gap) with little harm to the classifier accuracy (Occupation), in comparison to the original data and A4NT. We can trade-off classifier accuracy and fairness, by increasing the de-boosting (DB) multiplier. In the Table, Intersection shows Intersection obfuscation with different DB levels. In the case of $DB = 40$ , we lose slightly more utility, but observe much better fairness.
+
+A4NT's performance in terms of the fairness metric (TPR-Gap) is comparable to our Intersection obfuscation (even without de-boosting), however, in maintaining occupation accuracy (utility), A4NT performs much more poorly. We presume this is because A4NT removes sensitive attributes solely based on hints from a discriminator, and the low occupation accuracy suggests the discriminator captures the content more than it captures style, therefore it changes the meaning and structure of the sentences as well. Our human judgments for semantic consistency and fluency in Section 4.4 support this hypothesis. Our Union obfuscation, however, does not improve the fairness. We hypothesize this could be caused by keeping/adding biasing words, which can perpetuate the existing impartialities in the classifier, similar to how human cognition works (Richter and Maier, 2017).
+
+# 4.2.2 Linguistic and Sensitive-attribute Classification Results
+
+The top section of Tables 5 and 6 show the linguistic and sensitive-attribute classification metrics for the
+
+two and three domain obfuscations, respectively. Since A4NT cannot be applied to non-binary style obfuscations as is, there are no results for it in three domains. We can see that for both two and three domains the de-boosting (denoted as DB) offers a trade-off between the linguistic quality of the generated text and the obfuscation of sensitive attributes. Compared to the One-LM baseline, for corresponding levels of de-boosting, our Intersection obfuscation is almost always superior, in both text quality and obfuscation. The Intersection obfuscation with de-boosting multiplier of 25 outperforms A4NT, with lower classifier accuracy, higher entropy and much lower Confident Response (CR) rate from the classifier. In general, the Intersection obfuscation, even without de-boosting does well on Entropy and CR, which shows that our method is doing well at creating doubt in terms of what the age of the author is. One caveat however, across both two and three domain obfuscations is the classifier accuracy, which does not decrease much. We hypothesize that one reason for this could be the dependency between style and content, and that the sensitive-attribute classifier could be basing its decisions on content, therefore changing the style would not hide the sensitive attribute.
+
+Our Union obfuscation is behaving differently from the Intersection, and is inferior in terms of obfuscating the text, with higher classifier accuracy and lower entropy. However, it has higher lexical diversity, which could hint at it trying to keep sentences diverse and "adding styles", whereas the Intersection is only keeping the common words and is therefore decreasing the lexical diversity.
+
+# 4.3 Comparison with PATR
+
+Table 4 provides a comparison between our style pooling method, and PATR (Xu et al., 2019). $\alpha$ is knob used by PATR to tune the intensity of attribute removal, and the classifier accuracy on non-modified text is $86.3\%$ . We can see that without de-boosting, our intersection method drops the classifier accuracy to $74.05\%$ with a GLEU score of 26.32. PATR drops the classifier accuracy to $74.85\%$ , but with a worse level of GLEU. With de-boosting, however, we can achieve a classifier accuracy of $62.12\%$ with GLEU of 17.2, whereas PATR reports accuracy of $65.75\%$ for a much lower GLEU of 9.67 when $\alpha$ is increased. This shows that our de-boosting mechanism can provide an advantage by giving a lower probability to attribute
+
+Table 3: Fairness results for the Blogs data. The main task is classifying if the author occupation is student or not. Higher occupation accuracy and lower TPR-gap are better. DB denotes our style de-boosting technique, and the number next to it shows its multiplier. Larger multiplier means stronger style obfuscation.
+
+| Ratio | Occupation Accuracy (Utility) | TPR-gap (Fairness) |
| Original | A4NT | Intersection | Union | Original | A4NT | Intersection | Union |
| No DB | DB=25 | DB=40 | No DB | DB=25 | DB=40 |
| 0.95 | 74.56 | 59.35 | 74.77 | 71.12 | 69.73 | 73.22 | 0.54 | 0.29 | 0.23 | 0.23 | 0.21 | 0.51 |
| 0.80 | 65.55 | 54.74 | 65.31 | 65.12 | 59.60 | 65.43 | 0.35 | 0.21 | 0.35 | 0.18 | 0.18 | 0.36 |
| 0.65 | 59.01 | 52.73 | 58.41 | 56.68 | 54.45 | 57.19 | 0.12 | 0.05 | 0.11 | 0.11 | 0.11 | 0.15 |
| 0.50 | 58.09 | 53.47 | 56.21 | 53.6 | 53.18 | 55.49 | 0.04 | 0.08 | 0.05 | 0.05 | 0.03 | 0.05 |
+
+Table 4: Comparison with PATR (Xu et al., 2019), on the Twitter DIAL dataset, where the author's race is the sensitive attribute.
+
+| Metric | PATR | Intersection | Union |
| α=1 | α=5 | No DB | DB = 20 |
| GLEU | 24.77 | 9.67 | 26.32 | 17.21 | 26.25 |
| Clsf. Acc (%) | 74.85 | 65.75 | 74.05 | 62.12 | 73.27 |
+
+revealing components, while maintaining the sentence structure. Our union method also achieves $73.27\%$ accuracy with 26.25 GLEU, making it most suitable for cases where the semantic consistency of the sentences is most important.
+
+# 4.4 Evaluation with Human Judgments
+
+We design two crowd-sourcing tasks on Amazon Mechanical Turk. (1) Fluency: We provide workers with a pair of obfuscated sentences, and ask them which sentence is more fluent. (2) Semantic Consistency: We provide the original (un-obfuscated) sentences, and ask workers which of the obfuscated sentences is closer in meaning to the original sentence. The model checkpoints used for human evaluations here are those whose fairness and linguistic metrics are reported in Tables 3, 5. We use our intersection obfuscation, with no de-boosting. We randomly select 188 sentences from the test set, and used the model outputs for human judgment. For consistency, each pair of sentences is rated by three workers and we take the majority vote. In terms of fluency, the workers preferred our obfuscations over those of A4NT for $60.38\%$ of the sentences. In terms of semantic consistency, for $72.13\%$ sentences they found our obfuscations to be closer in meaning to the original ones.
+
+# 5 Related Work
+
+A large body of prior work has attempted to address algorithmic bias by modifying different stages of the natural language processing (NLP) pipeline. Blodgett et al. (2021), Barikeri et al. (2021), Farrand et al. (2020), Mireshghallah et al.
+
+(2021a) and Sheng et al. (2019) propose and analyze benchmarks for evaluating fairness in different applications. Ravfogel et al. (2020), Kaneko and Bollegala (2019), Shin et al. (2020) and Kaneko and Bollegala (2021) attempt to de-bias word embeddings used by NLP systems, while Elazar and Goldberg (2018); Barrett et al. (2019); Wang et al. (2021) attempt to de-bias model representations and encodings.
+
+There is also a large body of work on modifying learning algorithms and inference procedures to produce more fair outcomes (Agarwal et al., 2018; Madras et al., 2018; Zafar et al., 2017; Han et al., 2021; Mireshghallah et al., 2021b). While effective in many cases, such approaches do nothing to mitigate human bias in decisions based on text. Fundamentally, our framework is concerned with stylistic features of human-generated text. Thus, a large body of prior work on methods for unsupervised style transfer are related to our approach (Santos et al., 2018; Yang et al., 2018; Luo et al., 2019; He et al., 2020). There is also a vast body of work on style obfuscation (Emmery et al., 2018; Reddy and Knight, 2016; Bevendorff et al., 2019; Shetty et al., 2018).
+
+Our work is most closely related to Shetty et al. (2018) and Xu et al. (2019). A4NT (Shetty et al., 2018) attempts to obfuscate text style through automatic re-writing. However, their approach attempts to hide protected attributes simply by mapping the style of one protected category to that of another. In contrast, we seek not to map the author's text to another author's style, but to a central obfuscated style. Xu et al. propose Privacy Aware Text Re-writing (PATR), which takes a similar adversarial learning translation based approach to address this problem and re-write text. One fundamental difference between our style-pooling method and PATR is that we provide the choice of union vs. intersection of styles, which is concerned with the societal aspects of removing sensitive attributes, since we
+
+Table 5: Linguistic and sensitive-attribute classifier results for Blogs data, considering two sensitive age domains of teens and adults. For BT accuracy and entropy higher is better, for PPL and Confident Response (CR) lower is better.
+
+ | Metric | Original | A4NT | One-LM | Intersection | Union |
| No DB | DB = 25 | DB = 40 | No DB | DB = 25 | DB = 40 |
| Ling | BT Accuracy (%) | 100.00 | 66.49 | 94.47 | 92.88 | 90.60 | 95.41 | 87.39 | 88.63 | 96.88 |
| GPT-2 PPL | 41.71 | 44.85 | 39.51 | 53.65 | 66.21 | 41.6 | 42.80 | 58.15 | 42.07 |
| Lex. Div. (%) | 3.22 | 2.28 | 2.52 | 1.82 | 1.09 | 2.50 | 1.47 | 0.97 | 2.71 |
| Clsf. | Clsf. Accuracy (%) | 64.73 | 61.31 | 62.07 | 61.69 | 59.52 | 64.23 | 60.90 | 59.81 | 64.02 |
| Entropy | 0.87 | 0.86 | 0.87 | 0.91 | 0.95 | 0.87 | 0.93 | 0.95 | 0.87 |
| CR (%) | 14.21 | 15.72 | 13.44 | 6.49 | 2.80 | 13.95 | 4.78 | 2.47 | 14.22 |
+
+Table 6: Linguistic and sensitive-attribute classifier results for Blogs data, considering three sensitive age domains of teens and adults. For BT accuracy and entropy higher is better, for PPL and Confident Response (CR) lower is better.
+
+ | Metric | Original | A4NT | One-LM | Intersection | Union |
| No DB | DB = 25 | DB = 40 | No DB | DB = 25 | DB = 40 |
| Ling | BT Accuracy (%) | 100.00 | - | 93.84 | 93.64 | 87.83 | 89.09 | 89.25 | 82.47 | 93.30 |
| GPT-2 PPL | 41.70 | - | 43.49 | 48.99 | 84.61 | 48.15 | 49.70 | 69.08 | 42.66 |
| Lex. Div. (%) | 3.41 | - | 2.46 | 1.81 | 0.94 | 1.97 | 1.02 | 0.77 | 2.86 |
| Clsf. | Clsf. Accuracy (%) | 49.78 | - | 49.16 | 47.64 | 45.41 | 48.12 | 47.13 | 45.81 | 48.81 |
| Entropy | 1.38 | - | 1.38 | 1.43 | 1.47 | 1.44 | 1.44 | 1.49 | 1.38 |
| CR (%) | 43.00 | - | 43.33 | 38.89 | 30.75 | 38.76 | 35.37 | 28.02 | 45.88 |
+
+are targeting removal of bias. PATR, however, targets privacy and is therefore not concerned with the union vs. intersection of sensitive attributes.
+
+Finally, there is a body of work on re-writing text to mitigate the potential biases within the content of the text itself. Ma et al. propose PowerTransformer, which rewrites text to correct the implicit and potentially undesirable bias in character portrayals. Pryzant et al. propose a framework that addresses subjective bias in text and Field and Tsvetkov and Zhou et al. introduce approaches to identifying gender bias against women at a comment level and dialect bias in text, respectively. These works focus on the text content, and not on the stylistic features of the author.
+
+# 6 Conclusion
+
+We proposed a probabilistic VAE framework for automatically re-writing text in order to obfuscate stylistic features that might reveal sensitive attributes of the author. We demonstrated in experiments that our proposed framework can indeed reduce bias in downstream text classification. Finally, our model poses two ways of defining a central style. Future work might consider further explorations of alternative notions of stylistic centrality.
+
+# Acknowledgments
+
+The authors would like to thank the anonymous reviewers and meta-reviewers for their helpful
+
+feedback. We also thank Junxian He for insightful discussions. Additionally, we thank our colleagues at the UCSD Berg Lab for their helpful comments and feedback.
+
+# Ethical Considerations
+
+Our proposed model is intended to be used to address a real-world fairness issue. However, this is an extremely complicated topic, and it should be treated with caution, especially upon deploying possible mitigations such as ours. One potential issue we see is the chance that systems like this might obfuscate text by converging towards the majority and erasing styles of marginalized communities. We have tried to address this concern, and raise discussion around it in our introduction and model design, by allowing for multiple operationalizations of a "central" style, and introducing the union and intersection obfuscations. Defining a true notion of centrality that would effectively protect sensitive attributes without erasing any specific styles of writing requires further study.
+
+# References
+
+Alekh Agarwal, Alina Beygelzimer, Miroslav Dudík, John Langford, and Hanna Wallach. 2018. A reductions approach to fair classification. In International Conference on Machine Learning, pages 60-69. PMLR.
+
+Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In Proceedings of ICLR.
+Soumya Barikeri, Anne Lauscher, Ivan Vulic, and Goran Glavš. 2021. RedditBias: A real-world resource for bias evaluation and debiasing of conversational language models. 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 1941-1955, Online. Association for Computational Linguistics.
+Maria Barrett, Yova Kementchedjhieva, Yanai Elazar, Desmond Elliott, and Anders Søgaard. 2019. Adversarial removal of demographic attributes revisited. In EMNLP/IJCNLP.
+Janek Bevendorff, Martin Potthast, Matthias Hagen, and Benno Stein. 2019. Heuristic authorship obfuscation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1098-1108.
+Su Lin Blodgett, Lisa Green, and Brendan O'Connor. 2016. Demographic dialectal variation in social media: A case study of African-American English. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1119-1130, Austin, Texas. Association for Computational Linguistics.
+Su Lin Blodgett, Gilsinia Lopez, Alexandra Olteanu, Robert Sim, and Hanna Wallach. 2021. Stereotyping Norwegian salmon: An inventory of pitfalls in fairness benchmark datasets. 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 1004-1015, Online. Association for Computational Linguistics.
+Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew Dai, Rafal Jozefowicz, and Samy Bengio. 2016. Generating sentences from a continuous space. In Proceedings of ConNLL.
+Joy Buolamwini and Timnit Gebru. 2018. Gender shades: Intersectional accuracy disparities in commercial gender classification. In Conference on fairness, accountability and transparency, pages 77-91. PMLR.
+Maria De-Arteaga, Alexey Romanov, Hanna Wallach, Jennifer Chayes, Christian Borgs, Alexandra Chouldechova, Sahin Geyik, Krishnamaram Kenthapadi, and Adam Tauman Kalai. 2019. Bias in bios: A case study of semantic representation bias in a high-stakes setting. In Proceedings of the Conference on Fairness, Accountability, and Transparency, pages 120-128.
+
+Yanai Elazar and Yoav Goldberg. 2018. Adversarial removal of demographic attributes from text data. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 11-21.
+Chris Emmery, Enrique Manjavacas, and Grzegorz Chrupał. 2018. Style obfuscation by invariance. In Proceedings of the 27th International Conference on Computational Linguistics, pages 984-996.
+Tom Farrand, Fatemehsadat Mireshghallah, Sahib Singh, and Andrew Trask. 2020. Neither private nor fair: Impact of data imbalance on utility and fairness in differential privacy. In Proceedings of the 2020 Workshop on Privacy-Preserving Machine Learning in Practice, pages 15-19.
+Anjalie Field and Yulia Tsvetkov. 2020. Unsupervised discovery of implicit gender bias. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 596-608.
+Xudong Han, Timothy Baldwin, and Trevor Cohn. 2021. Decoupling adversarial training for fair NLP. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 471-477, Online. Association for Computational Linguistics.
+Junxian He, Xinyi Wang, Graham Neubig, and Taylor Berg-Kirkpatrick. 2020. A probabilistic formulation of unsupervised text style transfer. arXiv preprint arXiv:2002.03912.
+Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. 2017. Toward controlled generation of text. In ICML.
+Eric Jang, Shixiang Gu, and Ben Poole. 2017. Categorical reparameterization with gumbel-softmax. In Proceedings of ICLR.
+Masahiro Kaneko and Danushka Bollegala. 2019. Gender-preserving debiasing for pre-trained word embeddings. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1641-1650.
+Masahiro Kaneko and Danushka Bollegala. 2021. Debiasing pre-trained contextualised embeddings. In Proceedings of the European Chapter of the Association for Computational Linguistics.
+Yuta Kikuchi, Graham Neubig, Ryohei Sasano, Hiroya Takamura, and Manabu Okumura. 2016. Controlling output length in neural encoder-decoders. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1328-1338.
+Diederik P Kingma and Max Welling. 2013. Autoencoding variational bayes. arXiv preprint arXiv:1312.6114.
+
+Fuli Luo, Peng Li, Jie Zhou, Pengcheng Yang, Baobao Chang, Zhifang Sui, and Xu Sun. 2019. A dual reinforcement learning framework for unsupervised text style transfer. arXiv preprint arXiv:1905.10060.
+Xinyao Ma, Maarten Sap, Hannah Rashkin, and Yejin Choi. 2020. Powertransformer: Unsupervised controllable revision for biased language correction. In EMNLP.
+David Madras, Toni Pitassi, and Richard Zemel. 2018. Predict responsibly: Improving fairness and accuracy by learning to defer. Advances in Neural Information Processing Systems, 31:6147-6157.
+Fatemehsadat Mireshghallah, Huseyin Inan, Marcello Hasegawa, Victor Ruhle, Taylor Berg-Kirkpatrick, and Robert Sim. 2021a. Privacy regularization: Joint privacy-utility optimization in LanguageModels. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3799-3807, Online. Association for Computational Linguistics.
+Fatemehsadat Mireshghallah, Mohammadkazem Taram, Ali Jalali, Ahmed Taha Taha Elthakeb, Dean Tullsen, and Hadi Esmaeilzadeh. 2021b. Not all features are equal: Discovering essential features for preserving prediction privacy. In Proceedings of the Web Conference 2021, pages 669-680.
+Dino Pedreshi, Salvatore Ruggieri, and Franco Turini. 2008. Discrimination-aware data mining. In Proceedings of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 560-568.
+Reid Pryzant, Richard Diehl Martinez, Nathan Dass, S. Kurohashi, Dan Jurafsky, and Diyi Yang. 2020. Automatically neutralizing subjective bias in text. In AAAI.
+Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners.
+Francisco Rangel, Paolo Rosso, Ben Verhoeven, Walter Daelemans, Martin Potthast, and Benno Stein. 2016. Overview of the 4th author profiling task at pan 2016: cross-genre evaluations. Working Notes Papers of the CLEF, 2016:750-784.
+Shauli Ravfogel, Yanai Elazar, Hila Gonen, Michael Twiton, and Yoav Goldberg. 2020. Null it out: Guarding protected attributes by iterative nullspace projection. arXiv preprint arXiv:2004.07667.
+Sravana Reddy and Kevin Knight. 2016. Obfuscating gender in social media writing. In Proceedings of the First Workshop on NLP and Computational Social Science, pages 17-26.
+Tobias Richter and Johanna Maier. 2017. Comprehension of multiple documents with conflicting information: A two-step model of validation. Educational psychologist, 52(3):148-166.
+
+Alexander M Rush, Sumit Chopra, and Jason Weston. 2015. A neural attention model for abstractive sentence summarization. In Proceedings of EMNLP.
+Cicero Nogueira dos Santos, Igor Melnyk, and Inkit Padhi. 2018. Fighting offensive language on social media with unsupervised text style transfer. arXiv preprint arXiv:1805.07685.
+Jonathan Schler, Moshe Koppel, Shlomo Argamon, and James W Pennebaker. 2006. Effects of age and gender on blogging. In Proceedings of AAAI.
+Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi Jaakkola. 2017. Style transfer from non-parallel text by cross-alignment. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 6833-6844.
+Emily Sheng, Kai-Wei Chang, Prem Natarajan, and Nanyun Peng. 2019. The woman worked as a babysitter: On biases in language generation. 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 3407-3412.
+Emily Sheng, Kai-Wei Chang, Premkumar Natarajan, and Nanyun Peng. 2021. Societal biases in language generation: Progress and challenges. In Proceedings of the Conference of the 59th Annual Meeting of the Association for Computational Linguistics (ACL).
+Rakshith Shetty, Bernt Schiele, and Mario Fritz. 2018. A4nt: Author attribute anonymity by adversarial training of neural machine translation. In 27th USENIX Security Symposium (USENIX Security 18), pages 1633-1650, Baltimore, MD. USENIX Association.
+Seungjae Shin, Kyungwoo Song, JoonHo Jang, Hyemi Kim, Weonyoung Joo, and Il-Chul Moon. 2020. Neutralizing gender bias in word embedding with latent disentanglement and counterfactual generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, pages 3126-3140.
+Andrew Silva, Pradyumna Tambwekar, and Matthew Gombolay. 2021. Towards a comprehensive understanding and accurate evaluation of societal biases in pre-trained transformers. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2383-2389, Online. Association for Computational Linguistics.
+Liwen Wang, Yuanmeng Yan, Keqing He, Yanan Wu, and Weiran Xu. 2021. Dynamically disentangling social bias from task-oriented representations with adversarial attack. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3740-3750, Online. Association for Computational Linguistics.
+
+Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. 2016. Google's neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144.
+Qiongkai Xu, Lizhen Qu, Chenchen Xu, and Ran Cui. 2019. Privacy-aware text rewriting. In Proceedings of the 12th International Conference on Natural Language Generation, pages 247-257.
+Zichao Yang, Zhiting Hu, Chris Dyer, Eric P Xing, and Taylor Berg-Kirkpatrick. 2018. Unsupervised text style transfer using language models as discriminators. arXiv preprint arXiv:1805.11749.
+Muhammad Bilal Zafar, Isabel Valera, Manuel Gomez Rogriguez, and Krishna P Gummadi. 2017. Fairness constraints: Mechanisms for fair classification. In Artificial Intelligence and Statistics, pages 962-970. PMLR.
+Xuhui Zhou, Maarten Sap, Swabha Swayamdipta, Noah A Smith, and Yejin Choi. 2021. Challenges in automated debiasing for toxic language detection. arXiv preprint arXiv:2102.00086.
+
+# A Appendix
+
+# A.1 Experiment Code
+
+We have uploaded code, data and model checkpoints needed for reproducing the experiments in https://github.com/mireshghallah/style-pooling. There, you will find a Read Me file which includes all the necessary steps and link to the data and model checkpoints. In short, you need to download the data and model checkpoints from the link. When you download the models-data compressed folder, extract it. Place the content of the data folder and the models in corresponding folders in the code. The package dependencies are all included in the dependencies file. In order to create a similar setup, please install the exact version mentioned there.
+
+Once all the directories are setup, you can train your own models using the commands in the Read Me, or you can evaluate the models we have already provided. Evaluation code is included in the results_ipynbs folder.
+
+# A.2 Model Configurations
+
+Seq2Seq Model. For all the experiments, We use single layer LSTMs with hidden size of 512 as both the encoder and decoder, and we use a word embedding size of 128. We apply dropout to the readout states before softmax with a rate of 0.3. We add a max pooling operation over the encoder hidden states before feeding it to the decoder.
+
+Language Model: Yelp data. We use an LSTM language model with hidden size of 512 and word embedding size of 128 and dropout value of 0.3.
+
+Language Model: Blog and Twitter data. We use an LSTM language model with hidden size of 2048 and word embedding size of 1024 and dropout value of 0.3.
+
+Sensitive-attribute Classifiers. We use LSTM classifiers for classifying sensitive attributes. The hidden size is 512 and word embedding size is 128. The last layer size is the number of sensitive classes.
+
+GPT-2 We used this repository https://github.com/priya-dwivedi/Deep-Learning/tree/master/GPT2-HarryPotter-Training to download and feed data to the GPT-2 model, and get the PPL score.
+
+# A.3 Dataset Details
+
+Yelp. The training set contains 399,999 sentences, and test set consists of 30,000 sentences, both divided equally between the 3 domains. The vocabulary size is 9.6k words. The misspelled words of $D_0$ , $D_1$ and $D_2$ are "00great00, 00this00, 00it00, 00to00, 00food00", "11of11, 11place11, 11for11, 11good11, 11service11" and "22they22, 22are22, 22in22, 22very22, 22my22", respectively.
+
+Blogs. The blogs dataset is a collection of micro blogs from blogger.com which consists of 19,320 'documents' (over 3.3 million sentences) along with annotation of author's age, gender, and occupation. Each document is a collection of an individual author's posts. We will use this data in both two and three domain style-pooling, where we treat age as the sensitive attribute and balance the data so each domain has the same number of sentences. In the two domain setup, we divide the data in two groups of teenagers, 13 - 18 and adults 23 - 48. In the three style setup, we have three groups of teenagers (13 - 18), young adults (23 - 28) and adults (33 - 48). The age groups 19 - 22 and 29 - 32 are missing from the data. After preprocessing and balancing the dataset, we end-up with 1.2 Million sentences in the training set, 400k sentences in the test for the 2 domain setup, and 762k training sentences and 192k test sentences for the test set. There are 10k words in the vocabulary. All the datasets are balanced.
+
+Twitter. There are 146.5k sentences in the training set, and 11.2k sentences in the test set. We reproduced this data using this scripts from Elazar and Goldberg (2018)'s GitHub repository: https://github.com/yanaiela/demog-text-removal.
+
+# A.4 Hyperparameters
+
+For all experiments, we set the training batch size to 32, the test batch size to 128 and the temperature of the softmax to 0.01.
+
+KL weight hyperparameter: The KL term in Eq. 5 that appears naturally in the ELBO objective, can be treated as a regularizer that uses our $p_{prior}$ to induce the type of style we want. Therefore, in practice, we add a weight $\lambda$ to the KL term in ELBO since the regularization strength from our priors varies depending on the datasets, training data size, or prior structures (Bowman et al., 2016).
+
+Yelp. For the Yelp experiments, the learning rate is set to 0.001 and the KL weight $(\lambda)$ for the Union, One-LM and Intersection experiments are 0.03, 0.03 and 0.02, respectively.
+
+Blogs and Twitter. For the Blogs experiments, the learning rate is 0.0005, and the KL weight $(\lambda)$ is 0.04 (for both 2 and 3 domains).
+
+# A.5 Comparison with A4NT Details
+
+To compare with the work "A4NT: Author Attribute Anonymity by Adversarial Training of Neural Machine Translation" (Shetty et al., 2018), we downloaded a checkpoint of their pre-trained model, available in their github repository: https://github.com/rikshithShetty/
+
+A4NT-author-masking. Since we have also used the same dataset with the same train/test separation, we use the model as is for evaluation.
+
+# A.6 Human Evaluation Experiment Details
+
+Our crowd workers are recruited from the Amazon Mechanical Turk (AMT) platform. Each HIT required the workers to answer a question regarding only one pair of sentences, and each worker was paid $0.1 per HIT. For English proficiency, the workers were restricted to be from USA or UK. For the semantic consistency test, the question asked from the Turkers was: "Which sentence is closer in meaning to the original sentence below?", where the original sentence and the obfuscated ones where provided to the workers. For fluency, we asked: "Which sentence is more fluent in English?"
+
+# A.7 Comparison
+
+# with Elazar and Goldberg (2018)
+
+Elazar and Goldberg (2018) aims at creating representations for text that could be used for a specific classification task, while hiding sensitive attributes. Although our approach deals with the text as opposed to representations and and can be applied for a wider range of downstream tasks, we offer a brief comparison to this method. Elazar and Goldberg use the Twitter dataset Rangel et al. (2016), set the sensitive attribute to be age, and try to produce representations that would perform well on the main task of "conversation detection" (mention detection) on Tweets. On the original data, they report an accuracy of $77.5\%$ and $64.8\%$ for a classifier that tries to classify conversations and age, respectively, which drop to $72.5\%$ and $57.3\%$ , after applying their adversarial learning scheme.
+
+We cloned their repository and used their code to process the dataset. We then created and trained the conversation and age classifiers, and reached an accuracy of $75.8\%$ and $64.63\%$ for them, respectively. These dropped to $73.28\%$ and $54.2\%$ , after applying applying our intersection method. This shows that for this particular task, our re-written text can out-perform prior work.
\ No newline at end of file
diff --git a/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/images.zip b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..9d7691ed0308b537a1d4a41cb7cb3ed15dd9230e
--- /dev/null
+++ b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c397d2b1e1c5cbc0b20fc95aadf819b742c8b93f41982365838f0b23b5d30165
+size 368300
diff --git a/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/layout.json b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..9cdc3acbbf6558ac8c1d11992887c75fda9c148d
--- /dev/null
+++ b/stylepoolingautomatictextstyleobfuscationforimprovedclassificationfairness/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e71790cd56580e2b017b4f0aea8477613fcd9b9ce3722f87302ea88cf3a5f6ad
+size 437553
diff --git a/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/3b573cc7-d959-4eed-b79d-4d8595746829_content_list.json b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/3b573cc7-d959-4eed-b79d-4d8595746829_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..ca3aee96dcece58b4febc33b11d3c6ace1259ee5
--- /dev/null
+++ b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/3b573cc7-d959-4eed-b79d-4d8595746829_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5e7a57b9b12c9f274ba7940e471bc29a27fce8ac31cd2a298ac89a33ccecdff5
+size 108927
diff --git a/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/3b573cc7-d959-4eed-b79d-4d8595746829_model.json b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/3b573cc7-d959-4eed-b79d-4d8595746829_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..d6ef33de14bf2195de2d98810e3b1f5536e2759a
--- /dev/null
+++ b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/3b573cc7-d959-4eed-b79d-4d8595746829_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:11b5fe11596592868d100d93af48e3b1738e2c9c3b751f4b5234c5d764e59cea
+size 131915
diff --git a/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/3b573cc7-d959-4eed-b79d-4d8595746829_origin.pdf b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/3b573cc7-d959-4eed-b79d-4d8595746829_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..57a3fbb4806867917086be36fddc42bb294e53d9
--- /dev/null
+++ b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/3b573cc7-d959-4eed-b79d-4d8595746829_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:206e6c0f20d5699b69070a634b21e5dd7c335faaaa6743e96dfb48b029ed9263
+size 947371
diff --git a/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/full.md b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..9e2587ef4b176f09a2fec3fac1b3605eb054b8a0
--- /dev/null
+++ b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/full.md
@@ -0,0 +1,491 @@
+# Summarize-then-Answer: Generating Concise Explanations for Multi-hop Reading Comprehension
+
+Naoya Inoue\*, Harsh Trivedi\*, Steven Sinha\*, Niranjan Balasubramanian\*, Kentaro Inui\*
+
+Stony Brook University, RIKEN
+
+Tohoku University
+
+{ninoue,hjtrivedi,stsinha,niranjan}@cs.stonybrook.edu
+
+inui@tohoku.ac.jp
+
+# Abstract
+
+How can we generate concise explanations for multi-hop Reading Comprehension (RC)? The current strategies of identifying supporting sentences can be seen as an extractive question-focused summarization of the input text. However, these extractive explanations are not necessarily concise i.e. not minimally sufficient for answering a question. Instead, we advocate for an abstractive approach, where we propose to generate a question-focused, abstractive summary of input paragraphs and then feed it to an RC system. Given a limited amount of human-annotated abstractive explanations, we train the abstractive explainer in a semi-supervised manner, where we start from the supervised model and then train it further through trial and error maximizing a conciseness-promoted reward function. Our experiments demonstrate that the proposed abstractive explainer can generate more compact explanations than an extractive explainer with limited supervision (only 2k instances) while maintaining sufficiency.
+
+# 1 Introduction
+
+Recent approaches to multi-hop Reading Comprehension (RC) have greatly improved its explainability, models ability to explain their own answers (Thayaparan et al., 2020). Some adopt a pipelined architecture, where they generate an explanation first and then use it to answer the question. This "faithful-by-construction" approach is aimed at ensuring that generated explanations are closer to the systems' internal reasoning (i.e. faithfulness). The explanation generation step is typically formulated as a sentence selection task over the input text — selecting a set of sentences which provide support for the answer output by the model (Yang et al., 2018; Groeneveld et al., 2020, etc.).
+
+
+Figure 1: Summary of SUmmarizer-augmented QA (SuQA). To generate more concise (i.e. minimal, sufficient and comprehensible) explanations, SuQA augments QA module with an abstractive explainer. $^{1}$
+
+However, the main problem with these approaches is that the explanations obtained from the sentence selection tasks are not always minimal, sufficient, and comprehensible. The extractive explanations can include extraneous or superfluous texts which express information that is not necessary for answering questions. For example, as shown in Fig. 1 (a), the fragments such as 2007 British-American fantasy adventure and Young Tommy in "Never Let Me Go" are not needed to explain the answer Northern Lights. Secondly, the extractive explanations may also not be sufficient: the interpretation of explanations may be dependent on its original paragraphs (e.g. pronouns). In Fig. 1 (a), His film roles means Charles Rowe's
+
+film, but this is not included in the extractive explanation. These types of gaps can also limit comprehensibility of the explanations.
+
+In this work, we target concise explanations which provide minimal, sufficient and comprehensible information related to the answer. This can also be seen as targeting an abstractive question-focused summary. To this end, we propose SUmmarizer-augmented QA (SuQA), an RC system augmented with an abstractive explainer component that generates an abstractive summary of explanations, which is then fed to a separate QA module to produce an answer. An abstractive explainer can summarize longer sentences into short phrases and replace pronouns with their referent, leading to more compact and sufficient explanations compared to extractive explanations. For example, as shown in Fig. 1 (b), the abstractive explainer, unlike an extractive one, is allowed to remove unnecessary information such as 2007 British-American fantasy adventure, and to generate context-independent sentences such as Charlie Rowe plays Billy Costa in The Golden Compass, instead of His film roles includes....
+
+However, developing such an abstractive explainer imposes a significant challenge because of the limited amount of human-annotated abstractive explanations available and prohibitively high costs in extending these (Inoue et al., 2020). Given this limited supervision, how can we ensure that generated explanations are sufficient while promoting compression?
+
+Our solution is to teach an abstractive explainer through trial and error maximizing a conciseness-promoting reward function in a reinforcement learning (RL) framework. The reward function assesses generated explanations against various criteria related to conciseness, such as linguistic acceptability, abstractiveness, and the accuracy of RC module's prediction on the generated explanations. By doing so, the model gradually learns to extract and summarize information from input texts so that they help the RC module arrive at the correct answers. Also, because the explainer aims to produce abstractive summaries, we can initialize the explainer with an abstractive summarizer that is pretrained on standard summarization datasets.
+
+We evaluate the proposed approach on HotpotQA (Yang et al., 2018), one of the most popular multi-hop RC datasets. The findings of this paper can be summarized as follows:
+
+- The semi-supervised abstractive explainer can generate more compact and sufficient explanations than extractive explanations while keeping explanations informative for answering questions. Compared to extractive ones, the abstractive explanations have a compression rate that is $\times 2.9$ higher, and improve human-judged sufficiency by 2.5 points, without incurring any significant drop in the QA accuracy.
+
+- Even small amounts of human-annotated explanation supervision significantly improve the conciseness of generated explanations. For example, incorporating even 298 instances of annotated explanations makes the compression rate $\times 1.3$ higher and improves human-judged sufficiency by $+11.0$ points compared to the setting with no supervision for explanations.
+
+# 2 Related work
+
+Explainable NLP Three aspects of explainability have been explored (Jacovi and Goldberg, 2020): (i) comprehensibility to humans (Camburu et al., 2018; Rajani et al., 2019), (ii) faithfulness, correlation with systems' internal decision (Kumar and Talukdar, 2020; Glockner et al., 2020), (iii) conciseness, namely minimality, comprehensibility and sufficiency for solving an end task (Paranjape et al., 2020).
+
+Earlier approaches to explainable NLP focus on comprehensibility (Camburu et al., 2018; Rajani et al., 2019), and then the community moves towards ensuring faithfulness by a system's architecture (faithful by construction), ranging from Natural Language Inference (Kumar and Talukdar, 2020), Fact Verification (Glockner et al., 2020) to Question Answering (Latcinnik and Berant, 2020; Groeneveld et al., 2020; Yadav et al., 2020).
+
+Conciseness, in contrast, has been relatively unexplored. One exception is Paranjape et al. (2020), who propose to learn to extract a minimal set of input sentences that are useful for solving downstream tasks by imposing information bottleneck on the NLP framework. Although our work shares the similar spirit with their work, unlike our work, their explainer is extractive. Our work is the first to incorporate abstractive explainers into RC systems.
+
+To date, more NLP datasets are being annotated with explanations (Wiegreffe and Marasovic, 2021), but most of them are based on extractive
+
+explanations (Yang et al., 2018; DeYoung et al., 2020, etc.). For abstractive explanations, there are a few resources: textual entailment dataset (Camburu et al., 2018), and question answering dataset in non-RC settings (i.e. input paragraphs are not given) (Jansen et al., 2018; Rajani et al., 2019). As for RC, Inoue et al. (2020) annotate HotpotQA (Yang et al., 2018) with abstractive explanations, but only $2\mathrm{k}$ of them (i.e. $3\%$ of the whole dataset) are annotated.
+
+Abstractive explainer A similar pipeline model has been proposed for textual entailment (Camburu et al., 2018) and commonsense QA (Rajani et al., 2019), where the model first generates an explanation, and then the downstream classifier consumes it to predict a task label. Although the architecture is the same as ours, the training process is different: they train the explainer in a fully supervised manner using input-explanation pairs, while our work additionally leverages a signal from the downstream QA model in RL. As demonstrated in §5.5, we show that this additional training is crucial when few annotated explanations are available.
+
+Generating abstractive explanations is closely related to query-focused summarization (QFS), where a few datasets are publicly available (Dang, 2006; Baumel et al., 2016; Nema et al., 2017; Pasunuru et al., 2021). However, the task setting of QFS is radically different from our problem setting, which makes it difficult to leverage the datasets and models in a straightforward manner. The QFS task typically consists of non-question queries (e.g. keywords or complex sentences) or opinion-oriented questions (e.g. Is $X$ a good idea?), and gold summaries are not guaranteed to contain all information required for answering questions. We leave it the future work to explore how to effectively use their datasets and models in our task.
+
+# 3 SuQA: SUMmarizer-augmented QA
+
+Extractive explanations may contain superfluous information that is not necessary for answering questions or may not be sufficient for answering questions. We address this issue by generating concise explanations defined as follows.
+
+Definition 1. An explanation is concise if it is (i) minimal, (ii) comprehensible, and (iii) sufficient for answering the question.
+
+Fig. 1 summarizes the overall architecture. To ensure the faithfulness of explanations, we use a
+
+pipeline architecture consisting of two main components: (i) an abstractive explainer (AX) and (ii) $QA$ module (QAM) ( $\S 3.1$ ). The AX takes a question and paragraph as inputs and is responsible for generating a question-focused, abstractive summary of input paragraphs. The QAM then answers the question solely based on the generated summary. This summary is supposed to contain information necessary for answering questions and is the only factor that the QAM relies on. Thus, the generated summary can be interpreted as a faithful explanation of the model.
+
+# 3.1 Architecture
+
+First, we formalize the overall pipeline. Given a question $q$ and paragraphs $p$ , we first generate the most-likely explanation $e$ as follows:
+
+$$
+e = \underset {e ^ {\prime}} {\arg \max } p _ {\pi} \left(e ^ {\prime} | q, p\right), \tag {1}
+$$
+
+where $p_{\pi}$ is the AX. We then answer the question $q$ solely based on the generated explanation $e$ :
+
+$$
+a = \underset {a ^ {\prime}} {\arg \max } p _ {\phi} \left(a ^ {\prime} | q, e\right), \tag {2}
+$$
+
+where $p_{\phi}$ is the QAM. Our architecture is agnostic to the implementation of AX and QAM as long as they are differentiable.
+
+From the viewpoint of probabilistic models, this formulation is a special case of a probabilistic latent variable model of $p(a|q,p)$ where explanations are treated as latent variables, similar to retrieval-augmented language models (Guu et al., 2020; Lewis et al., 2020b). Specifically, we have $p(a|q,p) = \sum_{e}p_{\phi}(a|q,e)p_{\pi}(e|q,p)$ , assuming $p_{\phi}(a|q,e,p) = p_{\phi}(a|q,e)$ . Replacing the sum with arg max yields Equation 2. The main challenge is that $p_{\pi}(e|q,p)$ is not a retriever but a text generator.
+
+Abstractive explainer (AX) It takes a paragraph $p$ and a question $q$ as an input, and outputs an explanation $e$ . We implement the AX using a sequence-to-sequence generation model as follows:
+
+$$
+p _ {\pi} (e | q, p) = \prod_ {t} ^ {n} p _ {\pi} \left(e _ {t} \mid e _ {< t}, q, p\right) \tag {3}
+$$
+
+In our experiments, we use BART (Lewis et al., 2020a). We simply concatenate $q$ and $p$ into one text with a separator token to generate a question-focused summary of the paragraph.
+
+
+Figure 2: Training regime of the proposed method. We pretrain the AX with a large summarization dataset and finetune it on a limited amount of human-annotated explanations (§4.1). We then train it further through indirect supervision from the QAM using Reinforcement Learning (§4.2).
+
+QA module (QAM) It takes a question $q$ an explanation $e$ generated by the AX as an input, and outputs an answer $a$ . We implement the QAM as a generation-based question answering module.
+
+$$
+p _ {\phi} (a | q, e) = \prod_ {t} ^ {n} p _ {\phi} \left(a _ {t} \mid a _ {< t}, q, e\right) \tag {4}
+$$
+
+# 4 Training
+
+Fig. 2 shows an overview of our training regime. The main challenge of training the AX is that human-annotated explanations are rarely available for question-answer pairs, though the conciseness of explanations heavily relies on human judgement. To address this issue, we train the AX in a semi-supervised manner.
+
+# 4.1 Supervised training with summarization and explanation generation
+
+Because the AX aims to produce abstractive summaries, we initialize the AX with an abstractive summarizer that is pretrained on standard summarization datasets. As we will see later (§5.6.2), this initialization is one of the key ingredients for the AX.
+
+Given a training dataset consisting of QA pairs annotated with its gold explanations, we train the AX with a standard teacher forcing approach. Specifically, we minimize the following loss:
+
+$$
+L _ {\mathrm {M L}} = \sum_ {t = 1} ^ {n} \log p _ {\pi} \left(y _ {t} ^ {*} \mid y _ {< t} ^ {*}, q\right), \tag {5}
+$$
+
+where $q$ is a question, and $(y_1^*, y_2^*, \ldots, y_n^*)$ is a human-annotated explanation for the QA pair.
+
+# 4.2 Semi-supervised training
+
+Although the fully supervised training provides the AX with direct signals, large-scale annotation of such abstractive explanation is prohibitively costly (Inoue et al., 2020). Thus, after training the AX in a supervised fashion, we further train the AX through indirect supervision from answers, which are much cheaper to annotate.
+
+We use the RL framework and design a reward function that assesses the goodness of generated explanations based on answers and sentence-level supporting facts. A state here is a sequence of explanation tokens generated so far $y_{ T$ ; 0 otherwise. This is to prevent noisy explanations from being rewarded. We use $T = -50$ .
+
+- Well-formedness: 1 if $e$ has repetition or too long words, starts from pronouns, or ends without period; 0 otherwise.
+
+# 5 Evaluation
+
+# 5.1 Dataset
+
+We use HotpotQA (Yang et al., 2018), which consists of 90,564 training and 7,405 development instances. All instances are annotated with extractive explanations called supporting facts, or SFs, sentences that are required to answer questions from input documents. We use the distractor setting in our experiments.
+
+For human-annotated explanations, we use $\mathcal{R}^4\mathcal{C}$ (Inoue et al., 2020), which annotates 2,379 training instances (3% of the training instances) and 2,541 development instances from HotpotQA with reasoning steps. The reasoning steps are abstractive explanations that describe information necessary for deriving answers, consisting of entity relation triplets in natural language texts (e.g. (Biden, is a president of, US)). We concatenate entities and its relation into one sentence for training the AX.
+
+# 5.2 Relevant paragraph prediction
+
+To select relevant paragraphs for the AX, we trained a ranker that ranks paragraphs according to its relevance to questions. The ranker takes a question and one paragraph as an input and outputs a relevance score. To train the ranker, we used a binary cross entropy loss, where paragraphs containing gold SFs (henceforth, supporting paragraphs) are used as positive instances and the other distractor paragraphs are negative instances. Following Kim et al. (2020), we also randomly sample one supporting paragraph from other questions for each question and used them as negative instances.
+
+At test time, we retain top- $k$ paragraphs and give them to the AX. We use $k = 3$ because HotpotQA has two supporting paragraphs always. Our evaluation shows that all supporting paragraphs are included at top- $k$ ranked paragraphs in $97.4\%$ of dev instances on HotpotQA. When training the AX, we gave gold supporting paragraphs and randomly selected distractor paragraphs to the AX. To implement the ranker, we use a standard sequence classifier on top of RoBERTa-large (Liu et al., 2019).
+
+# 5.3 Setup
+
+Models We create $\text{Extr}$ , a simple baseline model that resembles a typical extraction-based explainable NLP architecture (Glockner et al., 2020; Paranjape et al., 2020). Here, we train the AX using Eq. 5 only, where we use SFs as supervision.
+
+We denote our proposed model as SuQA. To see the effectiveness of RL, we have SuQA-NoRL, a model trained with annotated explanations using Eq. (5) without additional RL training. SuQA-NoRL resembles fully-supervised, generation-based explain-then-predict models by Camburu et al. (2018); Rajani et al. (2019).
+
+AX We initialize the AX with DistilBART finetuned on CNN/Daily Mail, one of large, standard datasets of summarization (Shleifer and Rush, 2020). During training, we feed supporting paragraphs as an input to the model. At test time, we use predicted relevant paragraphs from §5.2 as an input. For hyperparameter tuning, we reserve 500 training instances as a validation dataset. See §A in Appendix for further details.
+
+QAM We use UnifiedQA-base (Khashabi et al., 2020) as the QAM and frozen it during training. Ideally, the AX should learn from a "perfect" QA model that does not perform disconnected reasoning (Trivedi et al., 2020). However, such a QA model is not available at the moment. We thus simulate it by using UnifiedQA (Khashabi et al., 2020), a T5 (Raffel et al., 2020)-based QA model finetuned on a diverse set of QA datasets (e.g. SQuAD, NarrativeQA, RACE) excluding HotpotQA. We expect this to discourage the QAM from giving correct answers for insufficient explanations by disconnected reasoning, which improves the quality of reward function of RL. At test time, we use UnifiedQA finetuned on HotpotQA, whose performance is shown in Table 2 (see QAM w/o AX).
+
+# 5.4 Evaluation measures
+
+Conciseness To assess the compactness of generated explanations, we calculate (i) a compression ratio $(Cm)$ , # tokens in an input paragraph divided by # tokens in a generated explanation, and (ii) abstractiveness $(Abs)$ with respect to a given paragraphs selected by the paragraph ranker, calculated by the equation from §4.3.
+
+To assess the sufficiency of generated explanations, we use crowdsourcing. Given a generated explanation and its original question, five crowdwork
+
+ers are asked to judge if generated explanations alone provide sufficient information for answering the question in a 3-point Likert scale (yes, likely, no) plus "unsure". To reliably estimate the quality of explanations, we additionally ask them answers that they inferred from the given explanations.
+
+To aggregate each annotator's judgement, we first replace crowdworker's submission with 'no' when (i) the answer is different from the gold standard answer, or (ii) the judgement is unsure, and replace 'likely' with 'yes'. We then used MACE (Hovy et al., 2013) to aggregate all the judgements $(Suf)$ . Due to the cost,[5] we evaluate 100 gold explanations and 200 generated explanations for each configuration. We obtained Krippendorff's $\alpha$ of 0.298 on average, indicating a fair agreement. See §D in Appendix for further details of crowdsourced judgement.
+
+In some experiments, we report the similarity between generated explanations and human-annotated explanations as a proxy for sufficiency, due to the cost of human evaluation. We employ ROUGE-2 (Lin, 2004) (RG2), which is proven a high correlation between human ratings on several summarization datasets (Bhandari et al., 2020).
+
+QA performance We report $F1$ , one of the official evaluation measures of HotpotQA.
+
+Given that our ultimate goal is to create an explainable RC system, we also introduce $XF1$ , new evaluation measure:
+
+$$
+\mathrm {X F} 1 = \frac {1}{N} \sum_ {i} ^ {N} \operatorname {s u f} (i) \cdot \mathrm {F} 1 (i), \tag {8}
+$$
+
+where $N$ is the number of instances in the dataset, $\operatorname{suf}(i)$ is a crowdsourced sufficiency label (yes=1, no=0), and $\mathrm{F}1(i)$ is a F1 score of $i$ -th instance. This captures how well the system generates sufficient explanations and predicts the correct answer.
+
+# 5.5 Results and discussion
+
+Abstractive explanations are more concise (i.e. compact and sufficient) than extractive ones. To understand the advantage of abstractive explanations, we compare gold extractive explanations (Gold SF) with gold abstractive explanations (Gold XP) in Table 1. It clearly indicates that abstractive explanations are more abstract and compact than extractive ones. Surprisingly, it also shows that extractive explanations are much less sufficient than
+
+| Input | Abs | Cm | Suf† | F1 |
| Gold SF† | 1.1 | 4.4 | 72.0 | 79.7 |
| Gold SF | 1.2 | 4.3 | 68.0 | 74.9 |
| Gold XP† | 51.0 | 11.1 | 90.0 | 85.2 |
+
+Table 1: Upper bound study on HotpotQA (HQ) dev set. †: evaluated only on 2,541 dev instances annotated with explanations. ‡: manually evaluated on 100 instances.
+
+| Model | Abs | Cm | Suf† | F1 | XF1† |
| QAM w/o AX | 0.0 | 1.0 | - | 64.2 | - |
| Extr (baseline) | 0.3 | 4.2 | 70.0 | 69.4 | 60.5 |
| SuQA-NoRL | 40.1 | 11.2 | 71.5 | 65.6 | 62.6 |
| SuQA | 42.6 | 12.2 | 72.5 | 67.6 | 63.7 |
+
+abstractive ones. Our manual inspection of insufficient explanations reveals that $100\%$ of the explanations do contain gold answer spans, but the interpretation of them depends on the context of input paragraphs that is not included in the explanations (e.g. pronoun referents). On the one hand, pronouns in abstractive explanations can be replaced with the actual referent, which allows explanations to be more self-contained and compressed. F1 also improved given more sufficient explanations.
+
+The abstractive explainer generates more concise explanations. Now we turn to the proposed models. The results are shown in Table 2. As consistent with Table 1, it shows that SuQA generates more abstractive, compact and sufficient explanations than the extractive baseline model. Examples of sufficient explanations generated by SuQA are shown in Table 4 (see §E in Appendix for more outputs with full input paragraphs). It shows that the abstractive explainer successfully captures information about important entities in question (e.g. bridging entity World War II in (b)).
+
+One may think why F1 of SuQA is lower than that of the extractive baseline (-1.8 point) given more sufficient and compressed explanations, which is inconsistent with Table 1. To obtain further insights, we investigated the relation between the sufficiency of explanations and the correctness of answers in Table 3, where "Correct" here means the number of instances with $>0.5$ Answer F1.
+
+Table 3 shows that the extractive baseline got 27 correct answers even when explanations are insufficient (27/151=17.9%), while SuQA got 17 correct answers for insufficient explanations
+
+Table 2: Main results on HotpotQA dev set. †: evaluated on 200 instances with human-judged sufficiency.
+
+ | Correct | Wrong | | Correct | Wrong |
| Suf. | 124 | 16 | Suf. | 128 | 17 |
| Insuf. | 27 | 33 | Insuf. | 17 | 38 |
| Total | 151 | 49 | Total | 145 | 55 |
+
+(a) Extr (baseline)
+
+(b) SuQA
+
+Table 3: Sufficiency-Answer correctness matrix. SuQA gets more correct answers with sufficient explanations (128/145=88%) than Extr (124/151=82%).
+
+(17/145=11.7%). This suggests that the QA module relies on task-unrelated lexical cues — so-called disconnected reasoning (Trivedi et al., 2020), and such task-unrelated cues become unavailable in SuQA's more compressed explanations, which undesirably degrades the QA performance. We also experimented with SAE-large (Tu et al., 2020), one of the strong QA models in HotpotQA, but got a similar trend. See §B in Appendix for further details. We believe that QA performance will improve if one can successfully develop a QA model that performs less shortcut reasoning, which is an emerging research topic in the QA community.
+
+The proposed model generates more correct answers with sufficient explanations. Our ultimate goal is to predict correct answers and to generate sufficient explanations. Here we investigate how many instances we generate sufficient explanations and predict the correct answer for. Table 3 show that SuQA gets more correct answers with sufficient explanations (128/145=88%) than the extractive baseline (124/151=82%). XF1 in Table 2 reflects this tendency and now tells a different story from conventional F1: the extractive baseline is now behind the proposed model.
+
+RL helps generate concise explanations. As described in §5.3, we pretrain the AX with explanations before applying RL. How much does the additional RL help the AX generate more concise explanations? The results are shown in Table 2 (SuQA-NoRL v.s. SuQA). It indicates that RL is important to obtain more concise explanations in all the aspects of conciseness.
+
+# 5.6 Analysis
+
+# 5.6.1 Role of explanation supervision
+
+It is costly to manually annotate QA datasets with abstractive explanations (Inoue et al., 2020). The natural question is then: how much supervision do we need to generate concise explanations?
+
+| Question | Generated explanation | Gold answer |
| (a) Who was born first Burton Cummings or Sharleen Spiteri? | Burton Cummings is born on December 31, 1947. Sharleen Spiteri is born on 7 November 1967. | Burton Lorne Cummings |
| (b) The Livesey Hal War Memorial commemorates the fallen of which war, that had over 60 million casualties? | Livesey Hall War Memorial commemorates the fallen of World War II. World War II had over 60 million casualties. | World War II |
| (c) Charles Barton "Chuck" Kendall, Jr. was reportedly interested in purchasing the Los Angeles Clippers from which Jewish-American businessman? | Charles Kendall, Jr. was reportedly interested in purchasing the Los Angeles Clippers from owner Donald Sterling. Donald Sterling is a Jewish-American businessman. | Donald Sterling |
+
+
+Figure 3: Effect of size of explanation supervision. Our human-judged sufficiency shows 55.0 at size 0 and 66.0 at size 298, indicating the importance of explanation supervision.
+
+Table 4: Sufficient explanations from SuQA. Important entities are gray-highlighted by the author.
+
+| Pretrain? | \(L_{\text{ML}}\)? | Abs | Cm | RG2† | F1 |
| SUM | Y | 37.5 | 11.9 | 64.7 | 65.3 |
| XG | Y | 47.0 | 13.7 | 55.7 | 54.3 |
| SUM,XG | Y | 42.6 | 12.2 | 67.4 | 67.6 |
| SUM,XG | | 46.3 | 12.7 | 52.1 | 62.7 |
+
+Table 5: Ablation of training strategy. Pretraining on the summarization task plays an important role in generating concise explanations. Using seq2seq loss $L_{\mathrm{ML}}$ during RL prevents generated explanations from deviating too much from gold explanations. †: evaluated only on 2,541 dev instances annotated with explanations.
+
+We pretrain and apply RL, using various sizes of explanation supervision (0, 298, 595, 1190, 2379) and plotted each result in Fig. 3. Due to the cost of human evaluation, we evaluated 100 generated explanations at size 0 and 298 only, and plotted RG2 as a proxy for human-judged sufficiency.
+
+The results indicate that incorporating even 298 explanations has a large impact on both the conciseness of explanations and the QA performance. Our human-judged sufficiency shows 55.0 for size 0, and 66.0 for size 298. Even with zero explanation supervision, the explainer still generates con
+
+
+Figure 4: Effect of RL. Y axis indicates the benefit of each evaluation measure from RL (i.e. the difference from SuQA-NoRL to SuQA). The benefit of RL is more pronounced in low-resource settings.
+
+cise explanations to some extent. This indicates that the task of generating abstractive explanations matches with the pretrained summarizer's original task. Thus, even with such small amounts of data, the AX can learn to produce question-focused summaries that are useful for answering questions.
+
+To see the benefit of RL in low-resource settings, we also repeated the same procedure with SuQA-NoRL and plotted how each evaluation measure changes from SuQA-NoRL to SuQA in Fig. 4. We observe that the benefit of F1 and RG2 is more pronounced in lower resource settings, which indicates the importance of RL for generating concise explanations. See §C in Appendix for the absolute performance of SuQA-NoRL.
+
+# 5.6.2 Training strategy
+
+Pretraining tasks We pretrain the AX on the summarization task (SUM) and the explanation generation task (XG) (§4.1). To investigate the contribution of each factor, we conduct ablation experiments in Table 5. It shows that the summarization task is the most contributing factor: without the pretraining, we obtain more compact explana
+
+| Insufficiency type | Question | Generated explanation | Gold answer | Freq. |
| No answer span | In which city was this band formed, whose rhythm guitarist featured in "Cupid's Chokehold?" | Cupid's Chokehold is performed by Gym Class Heroes. Fall Out Boy is formed in Wilmette, Illinois. | Chicago | 13 |
| Partially missing | Creed features the boxer who held what WBC title from 2016 to 2017? | Creed (film) features (missing: the boxer) Tony Bellew. Tony Bellew held the WBC cruiserweight title from 2016 to 2017. | cruiserweight | 8 |
| Bridge fact missing | Where does the descendant of the Red Setter originate? | James Andrew Hanna is known as Red Setter. Scotch Collie originated from the highland regions of Scotland. Missing: Scotch Collie is the descendant of Red Setter. | Scotland | 3 |
| Fact invented | Which game was released first, Icehouse pieces or Kill Doctor Lucky? | Icehouse pieces was released in 1996 (correct: 1987). Kill Doctor Lucky was released in 1996. | Icehouse pieces | 1 |
| Dataset flaw | Which Walt Disney film was released earlier, The Rescuers or The Muppets? | The Rescuers was released on June 22, 1977. The Muppets was released in 2011. | The Muppets | 3 |
| Worker error | Does Lucozade pre-date Hires Root Beer? | Hires Root Beer is introduced in 1876. Lucozade is created in 1927. | no | 2 |
+
+Table 6: Manual analysis of 30 insufficient explanations from SuQA.
+
+tions, but fatally, they are less similar to the gold explanations and lead to more incorrect answers.
+
+Seq2seq loss We incur the seq2seq loss $(L_{\mathrm{ML}})$ along with the RL loss (§4.2). To see the effect of this, we conduct ablation experiments in Table 5. Without the seq2seq loss, the generated explanations get more compact, but dissimilar to the gold standard explanations. We speculate that the seq2seq loss is important in keeping the search space of the AX closer to gold explanations.
+
+# 5.6.3 Error analysis
+
+When model's prediction is wrong, we have two possibilities: (A) generated explanations are insufficient, or (B) generated explanations are sufficient, but the QAM fails to find the correct answer. Table 3 indicates that case A is more frequent (69.1% (38/55)) than case B (30.9% (17/55)).
+
+We thus randomly sampled and manually analyzed 30 insufficient explanations generated by SuQA in Table 6. First of all, we found that $43.3\%$ (13/30) of generated explanations have no gold answer spans ('No answer span'). Among the rest of explanations, the AX successfully mentions important entities, but fails to generate some related information such as entity type ('Partially missing', $26.7\%$ (8/30)). We also observed that the AX fails to provide important information bridging two entities such as a family relation ('Bridge fact missing', $10.0\%$ (3/30)), and sometimes the AX invents new fact that is not mentioned in the original input
+
+paragraph ('Fact invented', $3.3\%$ (1/30)).
+
+The remaining explanations are wrongly judged as insufficient (16.7% (5/30)) in 2 cases: (i) crowdworkers' answers were wrongly judged as incorrect due to wrong gold answers ('Dataset flaw'); (ii) the crowdworkers' judgement was wrong, and they are actually sufficient ('Worker error').
+
+The error analysis highlighted that a major source of errors is the explainer failing to include answer spans in generated explanations. One can possibly enhance our architecture with one more pass: before generating explanations, the QAM predicts candidate answers based on questions and input paragraphs, and feeds them into the explainer.
+
+# 6 Conclusions
+
+We have proposed SuQA, an RC system augmented with an abstractive explainer component. Our experiments have demonstrated that the abstractive explainer can generate more concise explanations than an extractive explainer with limited supervision, while keeping explanations sufficient for QA.
+
+One limitation of our work is that the QA module is trained separately from the explainer. One can jointly optimize the AX and QAM by extending our framework. Finally, our abstractive explainer explains what facts were used for answering questions, but does not explain the inference process. It would be an interesting research direction to extend our work by explaining how these facts are combined to arrive at the answer.
+
+# Acknowledgements
+
+This work was supported in part by the National Science Foundation under grant No. IIS-1815358 and JST CREST Grant Number JPMJCR20D2, Japan. We thank the anonymous reviewers for the insightful feedback.
+
+# Ethical concerns
+
+To make fair compensation for Mechanical Turk workers in human evaluation (§5.4), we setup a reward based on a minimum hourly wage in the United States. Our preliminary experiments show that it takes about one minute to finish one HIT, so we rewarded crowdworkers with $0.15 per HIT. This amounts to $9.00 per hour, which is above $7.25, a minimum wage in the United States.
+
+# References
+
+Tal Baumel, Raphael Cohen, and Michael Elhadad. 2016. Topic concentration in query focused summarization datasets. In AAAI, pages 2573-2579.
+Manik Bhandari, Pranav Narayan Gour, Atabak Ashfaq, Pengfei Liu, and Graham Neubig. 2020. Re-evaluating evaluation in text summarization. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 9347-9359, Online. Association for Computational Linguistics.
+Oana-Maria Camburu, Tim Rocktäschel, Thomas Lukasiewicz, and Phil Blunsom. 2018. e-snli: Natural language inference with natural language explanations. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc.
+Hoa Trang Dang. 2006. DUC 2005: Evaluation of question-focused summarization systems. In Proceedings of the Workshop on Task-Focused Summarization and Question Answering, pages 48-55, Sydney, Australia. Association for Computational Linguistics.
+Jay DeYoung, Sarthak Jain, Nazneen Fatema Rajani, Eric Lehman, Caiming Xiong, Richard Socher, and Byron C. Wallace. 2020. ERASER: A benchmark to 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.
+Max Glockner, Ivan Habernal, and Iryna Gurevych. 2020. Why do you think that? exploring faithful sentence-level rationales without supervision. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 1080-1095, Online. Association for Computational Linguistics.
+
+Dirk Groeneveld, Tushar Khot, Mausam, and Ashish Sabharwal. 2020. A simple yet strong pipeline for HotpotQA. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8839-8845, Online. Association for Computational Linguistics.
+Kelvin Guu, Kenton Lee, Zora Tung, Panupong Papat, and Mingwei Chang. 2020. Retrieval augmented language model pre-training. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 3929-3938. PMLR.
+Dirk Hovy, Taylor Berg-Kirkpatrick, Ashish Vaswani, and Eduard Hovy. 2013. Learning whom to trust with MACE. In Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1120-1130, Atlanta, Georgia. Association for Computational Linguistics.
+Naoya Inoue, Pontus Stenetorp, and Kentaro Inui. 2020. R4C: A benchmark for evaluating RC systems to get the right answer for the right reason. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6740-6750, Online. Association for Computational Linguistics.
+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.
+Peter A. Jansen, Elizabeth Wainwright, Steven Marmorstein, and Clayton T. Morrison. 2018. WorldTree: A Corpus of Explanation Graphs for Elementary Science Questions supporting Multi-Hop Inference. In Proc. of LREC, pages 2732-2740.
+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: EMNLP 2020, pages 1896-1907, Online. Association for Computational Linguistics.
+Hyounghun Kim, Zineng Tang, and Mohit Bansal. 2020. Dense-caption matching and frame-selection gating for temporal localization in VideoQA. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4812-4822, Online. Association for Computational Linguistics.
+Sawan Kumar and Partha Talukdar. 2020. NILE: Natural language inference with faithful natural language explanations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8730-8742, Online. Association for Computational Linguistics.
+
+Veronica Latcinnik and Jonathan Berant. 2020. Explaining question answering models through text generation. arXiv preprint:2004.05569.
+Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020a. BART: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880, Online. Association for Computational Linguistics.
+Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020b. Retrieval-augmented generation for knowledge-intensive nlp tasks. In Advances in Neural Information Processing Systems, volume 33, pages 9459-9474. Curran Associates, Inc.
+Chin-Yew Lin. 2004. ROUGE: A Package for Automatic Evaluation of Summaries. In Proc. of the Workshop on Text Summarization Branches Out, pages 74-81.
+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:1907.11692.
+Preksha Nema, Mitesh M. Khapra, Anirban Laha, and Balaraman Ravindran. 2017. Diversity driven attention model for query-based abstractive summarization. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1063-1072, Vancouver, Canada. Association for Computational Linguistics.
+Bhargavi Paranjape, Mandar Joshi, John Thickstun, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2020. An information bottleneck approach for controlling conciseness in rationale extraction. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1938-1952, Online. Association for Computational Linguistics.
+Ramakanth Pasunuru, Asli Celikyilmaz, Michel Galley, Chenyan Xiong, Yizhe Zhang, Mohit Bansal, and Jianfeng Gao. 2021. Data augmentation for abstractive query-focused multi-document summarization. In AAAI, pages 13666-13674.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
+
+Nazneen Fatema Rajani, Bryan McCann, Caiming Xiong, and Richard Socher. 2019. Explain yourself! leveraging language models for commonsense reasoning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4932-4942, Florence, Italy. Association for Computational Linguistics.
+Steven J. Rennie, Etienne Marcheret, Youssef Mroueh, Jerret Ross, and Vaibhava Goel. 2017. Self-critical sequence training for image captioning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR).
+Sam Shleifer and Alexander M. Rush. 2020. Pre-trained summarization distillation. arXiv preprint:2010.13002.
+Mokanarangan Thayaparan, Marco Valentino, and André Freitas. 2020. A survey on explainability in machine reading comprehension. arXiv preprint:2010.00389.
+Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. 2020. Is multihop QA in DiRe condition? measuring and reducing disconnected reasoning. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8846-8863, Online. Association for Computational Linguistics.
+Ming Tu, Kevin Huang, Guangtao Wang, Jing Huang, Xiaodong He, and Bowen Zhou. 2020. Select, answer and explain: Interpretable multi-hop reading comprehension over multiple documents. In AAAI, pages 9073-9080.
+Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. 2018. Neural network acceptability judgments. arXiv preprint:1805.12471.
+Sarah Wiegrefe and Ana Marasovic. 2021. Teach me to explain: A review of datasets for explainable nlp. arXiv preprint:2102.12060.
+Vikas Yadav, Steven Bethard, and Mihai Surdeanu. 2020. Unsupervised alignment-based iterative evidence retrieval for multi-hop question answering. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4514-4525, Online. Association for Computational Linguistics.
+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.
+
+# A Training detail
+
+For all experiments, we used public implementations from huggingface's transformers library available at https://huggingface.co/. We used roberta-large for the paragraph ranker, distilbart-cnn-12-6 for AX, and unifiedqa-t5-base for UnifiedQA-base.
+
+For Reinforcement Learning, we used AdamW with the learning rate of 2e-6 and the batch size of 8. We clipped the minimum reward to -0.001. For sampling, we used a temperature of 0.4. To prevent overfitting, we used early stopping with a patience of 5. Specifically, we monitor the Answer F1 on the validation set every 4096 training steps and stopped training if the best F1 is not updated for five times. The RL training took $10\mathrm{h}31\mathrm{m}$ on a single GPU (DGXA-100).
+
+For pretraining the AX, we used AdamW with the learning rate of 8e-6 and the batch size of 16. In all experiments, we used a linear learning rate scheduler with $10\%$ warm up and trained the models with 5 epochs. For the learning curve, we monitored the Answer F1 every 128 steps for size 298, 256 steps for size 595, 512 steps for size 1,190 & 2,379 and used early stopping with a patience of 5. We used 512 as a maximum length of input subwords for both the AX and QAM. We used 256 as a maximum length of generation outputs for the AX. We used greedy decoding for both the AX and QAM.
+
+# B Experiments with stronger QA model
+
+We conducted additional analysis with SAE-large (Tu et al., 2020), one of the large QA models top-ranked at the leaderboard. We downloaded a publicly available pretrained model and ran the exactly same experiments in Table 1, 2, and 3, where we used SAE-large as the QAM at test time only. Note that during training, we used UnifiedQA-base not finetuned on HotpotQA (see §5.3 for further details).
+
+The results are shown in Table 7 and Table 8. Overall, they show the same trend as Table 1, 2, and 3: (i) gold abstractive explanations yields higher F1; (ii) SuQA achieved better XF1 than the extractive baseline; and (iii) there are more correct answers led by insufficient explanations in the extractive baseline.
+
+| Model | F1 | XF1‡ |
| Gold SF† | 80.1 | - |
| Gold SF | 77.7 | - |
| Gold XP† | 84.4 | - |
| QAM w/o AX | 70.7 | - |
| Extr | 71.5 | 59.4 |
| SuQA-NoRL | 64.9 | 58.5 |
| SuQA | 66.8 | 60.4 |
+
+Table 7: Larger QA models on HotpotQA (HQ) dev set. †: evaluated only on 2,541 dev instances annotated with explanations. ‡: evaluated on 200 instances with human-judged sufficiency.
+
+ | Correct | Wrong | | Correct | Wrong |
| Suf. | 122 | 14 | Suf. | 120 | 18 |
| Insuf. | 28 | 30 | Insuf. | 14 | 41 |
| Total | 150 | 44 | Total | 134 | 59 |
+
+(a) Extr (baseline)
+
+(b) SuQA
+
+Table 8: Sufficiency-Answer correctness matrix. SuQA gets more correct answers with sufficient explanations (120/134=90%) than Extr (122/150=81%).
+
+# C Learning curve of SuQA-NoRL
+
+To see the effectiveness of RL in low-resource settings, we investigated the performance change from SuQA-NoRL to SuQA in Fig. 4. Here we plot the absolute performance of SuQA-NoRL in Fig. 5.
+
+
+Figure 5: Size of explanation supervision v.s. QA performance and conciseness for SuQA-NoRL.
+
+# D Human evaluation
+
+We use Mechanical Turk as a crowdsourcing platform for human evaluation. We hired five annotators per Human Intelligence Task (HIT) and rewarded them with $0.15. Our preliminary experiments show that it takes about one minute to finish one HIT, so it is $9.00 per hour, which is above
+
+\(7.25, a minimum wage in the United States. To ensure the quality of annotations, we used crowdworkers with \(\geq 5,000\) HITs experiences and \(\geq 99\%\) approval rates. Among them, we manually find the pool of high-quality workers and used the same pool throughout the experiments.
+
+The instruction to crowdworkers is shown in Fig. 6 and Fig. 7, and the task interface is shown in Fig 8.
+
+# E Example of generated explanations with full inputs
+
+Examples of generated explanations and predicted answers along with their full input paragraphs retrieved by the paragraph ranker are shown in Table 9, Table 10 and Table 11.
+
+# 1.1 Input and your task
+
+You will be given two pieces of information:
+
+- AI-generated Sentences
+Question
+
+Your first task is the following:
+
+- Judge if you can answer the question solely based on the AI-generated sentences. Your answer choices are "Yes", "Likely", "No", and "Unsure".
+
+The meaning of each choice is as follows:
+
+- Yes: I'm sure I can answer the question. All information needed is there.
+- Likely: I can answer the question, but I have to guess something.
+- No: I cannot answer the question because important information is missing.
+- Unsure: It's difficult to judge.
+
+General Guildlines:
+
+- Select Yes: When all information is present, and you have to make no assumptions or very reasonable assumptions.
+- Select Likely: When most information is present, but you have to make a reasonable assumption
+- Select No: When critical information is missing, and you must make an unreasonable assumption.
+- Select Unsure: When it's difficult to judge.
+
+You will have to use your best judgement in determining what is an unreasonable versus reasonable vs very reasonable assumption.
+
+Your second task is the following:
+
+1. If you select "Yes" or "Likely": tell us your answer.
+2. If you select "Likely" or "No": please tell us what information is missing for answering the question in a text box.
+3. If you select "Unsure": tell us the reason in a text box.
+
+Figure 6: Instruction for crowdworkers (general guidelines).
+
+# 1.2 Examples
+
+| Sentences (input) | Question (input) | Your answer should be... |
| Krzysztof Zanussi was born on 17 June 1939. Thom Andersen was born in 1943. | Who was born first, Krzysztof Zanussi or Thom Andersen? | Judge: Yes
+Answer: Krzysztof Zanussi
+Exp: All necessary information is present, no assumptions required. |
| Raj Kapoor was a noted Indian film actor. Mike Cahill is an American film director and screenwriter. | What profession do Raj Kapoor and Mike Cahill share? | Judge: Yes
+Answer: Nothing
+Exp: All necessary information is present, no assumptions required. |
| K-Y Jelly is a water-based, water-soluble personal lubricant. Johnson & Johnson is founded in 1886. | What company founded in 1886 has owned the K-Y brand? | Judge: No
+Missing information: which company owns the K-Y brand.
+Exp: It is an unreasonable assumption to assume that J and J owns this brand just because it was founded in 1886. |
| Mexico is a small mill town for the papermaking industry. Mexico is a town in Oxford County, Maine, United States. | What is the main industry of this town with a population of around 2,600 as of 2010 that has Mountain Valley High School attendees as residents? | Judge: No
+Missing information: The population of the town as of 2010. The fact that Mountain Valley High School attendees are residents.
+Exp: It is an unreasonable assumption to assume that Mexico has a certain population or high school. |
| I Love You was written by Chris White. I Love You was covered by People! and The Carnabeats. | Who covered the song I Love You by Chris Write? | Judge: Likely
+Answer: People! and The Carnabeats.
+Missing information: "I Love You" is a song.
+Exp: It is reasonable to assume that "I Love You" is a song, since the word cover is usually used for songs. |
| Johnny Angel (film) stars George Raft. George Raft was an American film actor and dancer. | Which American film actor and dancer starred in the 1945 film Johnny Angel? | Judge: Likely
+Answer: George Raft.
+Missing information: Johnny Angel is a 1945 film.
+Exp: It is reasonable to assume that Johnny Angel is the same film as Johnny Angel (1945), since films usually don't have the same title. |
+
+Figure 7: Instruction for crowdworkers (examples).
+
+# Al-generated Short Quiz
+
+Welcome to the HIT! Recently, Artificial Intelligence (AI) grows rapidly, but they still fall short of generating human-like sentences. In this task, you will answer an AI-generated quiz consisting of a few sentences and question.
+
+# 1. Instruction
+
+First time user? Click here to expand the instruction.
+
+# 2. The task
+
+# 2.1 Read the sentences and question
+
+Please read the following sentences and question carefully.
+
+# AI-generated Sentences
+
+Hotel Splendide is a 2000 British independent dark comedy film.
+Hotel Splendide stars Daniel Craig.
+Daniel Craig is an English actor.
+
+# Question
+
+Hotel Splendide is a British film from 2000 that features which James Bond actor?
+
+# 2.2 Answer questions
+
+Do the AI-generated sentences contain enough information for answering the question?
+
+Yes, that's perfect.
+$\bigcirc$ Likely, with one some additional information.
+No, important information is missing.
+$\bigcirc$ Unsure, it's difficult to judge.
+
+What do you think is the answer?
+
+Figure 8: Crowdsourcing interface for sufficiency evaluation.
+
+| Question | Input paragraphs from the ranker | Generated explanation | Predicted answer |
| Charlie Rowe plays Billy Costa in a film based on what novel? | [P1] Charles John Rowe is an English actor. His film roles include Young Tommy in "Never Let Me Go", James in "The Boat That Rocked", Billy Costa in "The Golden Compass", Peter in the SyFy/Sky Movies Peter Pan prequel "Neverland", and recently played Leo Roth on the Fox medical comedy-drama series "Red Band Society" alongside Octavia Spencer and Dave Annable. The Golden Compass is a 2007 British-American fantasy adventure film based on "Northern Lights", the first novel in Philip Pullman's trilogy "His Dark Materials". Written and directed by Chris Weitz, it stars Nicole Kidman, Dakota Blue Richards, Daniel Craig, Sam Elliott, Eva Green, and Ian McKellen. The project was announced in February 2002, but difficulties over the script and the selection of a director caused significant delays. At US$180 million, it was one of New Line Cinema's most expensive projects ever, and its disappointing results in the USA contributed to New Line's February 2008 restructuring. Charlie St. [P2] Cloud is a 2010 American drama film based on Ben Sherwood's best-selling novel, "The Death and Life of Charlie St. Cloud" published in 2004 by Bantam Books. The film is directed by Burr Steers and stars Zac Efron and Amanda Crew. The story is of Charlie St. Cloud's choice between keeping a promise he made to his brother, who died in a car accident, or going after the girl he loves. In some markets the film used the complete title of the book. [P3] The Golden Compass is a 2007 British-American fantasy adventure film based on "Northern Lights", the first novel in Philip Pullman's trilogy "His Dark Materials". Written and directed by Chris Weitz, it stars Nicole Kidman, Dakota Blue Richards, Daniel Craig, Sam Elliott, Eva Green, and Ian McKellen. The project was announced in February 2002, but difficulties over the script and the selection of a director caused significant delays. At US$18O million, it was one of New Line Cinema's most expensive projects ever, and its disappointing results in the USA contributed to New Line's February 2008 restructuring. Charles John Rowe is an English actor. His film roles include Young Tommy in "Never Let Me Go", James in "The Boat That Rocked", Billy Costa in "The Golden Compass", Peter in the SyFy/Sky Movies Peter Pan prequel "Neverland", and recently played Leo Roth on the Fox medical comedy-drama series "Red Band Society" alongside Octavia Spencer and Dave Annable. 400 Boys is a Canadian/Chinese action-fantasy thriller film directed, written and produced by Alastair Paton and starring Jodelle Ferland, Li Bingbing, Maria Valverde and Charlie Rowe. Northern Lights "Northern Lights" Charlie Rowe plays Billy Costa in The Golden Compass. The Golden Compass is based on Northern Lights. | Charlie Rowe plays Billy Costa in The Golden Compass. The Golden Compass is based on Northern Lights. | Northern Lights |
+
+Table 9: Full input and output example (1).
+
+| Question | Input paragraphs from the ranker | Generated explanation | Predicted answer |
| Who was born first, Krzysztof Zanussi or Thom Anderen? | [P1] Krzysztof Zanussi, (born 17 June 1939) is a Polish film and theatre director, producer and screenwriter. He is a professor of European film at the European Graduate School in Saas-Fee, Switzerland where he conducts a summer workshop. He is also a professor at the Sile-sian University in Katowice. [P2] Thom Andersen (born 1943, Chicago) is a filmmaker, film critic and teacher. [P3] Weronika Anna Rosati (); born 9 January 1984) is a Polish actress and a member of European Film Academy. She began her acting career in Polish soaps. In 2005, she starred as Džemma in her first theatrical feature film "Pitbull". A year later, she launched her international career with a small uncredited role in "Inland Empire" directed by David Lynch. Since then she has appeared in many critically acclaimed Polish and international productions. In 2013, she has received her first Polish Academy Award nomination for Best Actress for her role in "Obława" (2012). A year later, she starred along-side Agnieszka Grochowska in "Obce ciało" directed by Krzysztof Zanussi. She also had a recurring role in the HBO TV series "Luck" (2012). | Krzysztof Zanussi is born on 17 June 1939. Thom Andersen is born on 1943. | Krzysztof Zanussi |
+
+Table 10: Full input and output example (2).
+
+| Question | Input paragraphs from the ranker | Generated explanation | Predicted answer |
| Kalle Mäkinen is nicknamed after a Spanish football that captains what two teams? | [P1] Kalle Mäkinen (born 1 February 1989) is a Finnish footballer who last played for the Finnish Veikkausliiga club Maskun Palloseura. He was nicknamed "Sergio" because his style of play was similar to that of Spanish fullback Sergio Ramos. [P2] Sergio Ramos García (]; born 30 March 1986) is a Spanish professional footballer who plays for and captains both Real Madrid and the Spain national team. Primarily a central defender, he can also play as a right back. [P3] The Primera División, commonly known as La Liga and as La Liga Santander for sponsorship reasons with Santander, is the top professional association football division of the Spanish football league system. Administered by the Liga de Fútbol Profesional (LFP), La Liga is contested by 20 teams, with the three lowest-placed teams relegated to the Segunda División and replaced by the top two teams in that division plus the winner of a play-off. | Kalle Mäkinen is nickname Sergio Ramos. Sergio Ramos captains both Real Madrid and the Spain national team. | Real Madrid and the Spain national team |
+
+Table 11: Full input and output example (3).
\ No newline at end of file
diff --git a/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/images.zip b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..5e183aea28244edd2db55cf04bac896bbc83b4fc
--- /dev/null
+++ b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fc46f97a49824de7669badb5721e901b53cac1da4d9597589162b74f74628ab8
+size 1275408
diff --git a/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/layout.json b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..ae93c5ac6e24f98cb6298be1a8516591ceeff50a
--- /dev/null
+++ b/summarizethenanswergeneratingconciseexplanationsformultihopreadingcomprehension/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fb49d8304cbf34a46df1c827e93f1da8549d47017f9e4a07dda04faa4a854b92
+size 504343
diff --git a/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/7fd3d8c0-db63-468b-b80f-dd70167bd714_content_list.json b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/7fd3d8c0-db63-468b-b80f-dd70167bd714_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..1d59f22522986ef5e5c82370a98eec53c8c17f2a
--- /dev/null
+++ b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/7fd3d8c0-db63-468b-b80f-dd70167bd714_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b65b80f917f88eb06f4c45c908d8e6b349151de344d8954e14a80333da211fe9
+size 101346
diff --git a/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/7fd3d8c0-db63-468b-b80f-dd70167bd714_model.json b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/7fd3d8c0-db63-468b-b80f-dd70167bd714_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..9b54046adc9b4df54302e47d63498ee2d5182a9b
--- /dev/null
+++ b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/7fd3d8c0-db63-468b-b80f-dd70167bd714_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b201302858211b53cd43372ebb1bc7a1bd558ed534e7f1f050d9067724986ef9
+size 123541
diff --git a/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/7fd3d8c0-db63-468b-b80f-dd70167bd714_origin.pdf b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/7fd3d8c0-db63-468b-b80f-dd70167bd714_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..f8866e1d8bfcdf6aafe4e63f0103cffea8f5942c
--- /dev/null
+++ b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/7fd3d8c0-db63-468b-b80f-dd70167bd714_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1eeab7880d903e62d330208a82182089f88d10af1a6786cceba5552c65b5127a
+size 4666296
diff --git a/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/full.md b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..cd489df5f64234eb47c062504d48400c74c00f7a
--- /dev/null
+++ b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/full.md
@@ -0,0 +1,429 @@
+# Surface Form Competition: Why the Highest Probability Answer Isn't Always Right
+
+Ari Holtzman $^{1*}$ Peter West $^{1,2*}$ Vered Shwartz $^{1,2}$ Yejin Choi $^{1,2}$ Luke Zettlemoyer $^{1}$
+
+1Paul G. Allen School of Computer Science & Engineering, University of Washington
+2Allen Institute for Artificial Intelligence
+{ahai, pawest}@cs.washington.edu
+
+# Abstract
+
+Large language models have shown promising results in zero-shot settings (Brown et al., 2020; Radford et al., 2019). For example, they can perform multiple choice tasks simply by conditioning on a question and selecting the answer with the highest probability.
+
+However, ranking by string probability can be problematic due to surface form competition—wherein different surface forms compete for probability mass, even if they represent the same underlying concept in a given context, e.g. “computer” and “PC.” Since probability mass is finite, this lowers the probability of the correct answer, due to competition from other strings that are valid answers (but not one of the multiple choice options).
+
+We introduce Domain Conditional Pointwise Mutual Information, an alternative scoring function that directly compensates for surface form competition by simply reweighing each option according to its a priori likelihood within the context of a specific task. It achieves consistent gains in zero-shot performance over both calibrated (Zhao et al., 2021) and uncalibrated scoring functions on all GPT-2 and GPT-3 models on a variety of multiple choice datasets.
+
+# 1 Introduction
+
+Despite the impressive results large pretrained language models have achieved in zero-shot settings (Brown et al., 2020; Radford et al., 2019), we argue that current work underestimates the zero-shot capabilities of these models on classification tasks. This is in large part due to surface form competition—a property of generative models that causes probability to be rationed between different valid strings, even ones that differ trivially, e.g., by capitalization alone. Such competition can be largely removed by scoring choices according to
+
+# A human wants to submerge himself in water, what should he use?
+
+Humans select options
+
+
+
+(a) Coffee cup
+(b) Whirlpool bath
+X (c) Cup
+X (d) Puddle
+
+Language Models assign probability to every possible string
+
+Figure 1: While humans select from given options, language models implicitly assign probability to every possible string. This creates surface form competition between different strings that represent the same concept. Example from CommonsenseQA (Talmor et al., 2019).
+
+OK = right concept, wrong surface form
+
+Domain Conditional Pointwise Mutual Information $(\mathrm{PMI}_{\mathrm{DC}})$ , which reweighs scores by how much more likely a hypothesis (answer) becomes given a premise (question) within the specific task domain.
+
+Specifically, consider the example question (shown in Figure 1): "A human wants to submerge himself in water, what should he use?" with multiple choice options "Coffee cup", "Whirlpool bath", "Cup", and "Puddle." From the given options, "Whirlpool bath" is the only one that makes sense. Yet, other answers are valid and easier for a language model to generate, e.g., "Bathtub" and "A bathtub." Since all surface forms compete for finite
+
+probability mass, allocating significant probability mass to "Bathtub" decreases the amount of probability mass assigned to "Whirlpool bath." While the total probability of generating some correct answer may be high (i.e., across all valid surface forms), only one of these is a listed option. This is particularly problematic here, because "Whirlpool bath" will be much lower probability than "Bathtub," due to its rarity. More generally, methods that do not account for surface form competition will favor answers with fewer lexical paraphrases.
+
+$\mathrm{PMI_{DC}}$ factors out the probability of a specific surface form, by instead computing how much more probable a hypothesis is when conditioned on a premise. We use a domain premise string to estimate the unconditional probability of a hypothesis in a given domain. On CommonsenseQA, for example, we compute the probability of each answer option immediately following the string “? the answer is:”, and then divide the conditional probability by this estimate to calculate $\mathrm{PMI_{DC}}$ . This scaling factor reweighs answer scores according to the surface form competition that is inherent to the domain or task, e.g. completions of the domain premise that are just inherently unlikely will be up-weighted more. This allows us to directly measure how much an answer tells us about the question and vice versa (mutual information is symmetric, see §3). Valid hypotheses no longer need to compete with each other: both “Whirlpool bath” and “Bathtub” will be considered reasonable answers to the question, and so both will attain a high score.
+
+Extensive experiments show that $\mathrm{PMI_{DC}}$ consistently outperforms raw, normalized, and calibrated probability scoring methods on zero-shot multiple choice for more than a dozen datasets and it does so for every model in the GPT-2 and GPT-3 families ( $\S 4$ ); this holds true across different possible prompts and in preliminary few-shot experiments as well. To better explain these gains, we use the distinct structure of the COPA dataset (Roemmelo et al., 2011) to remove surface form competition entirely, showing that all methods perform well in this idealized setting ( $\S 5$ ). Additionally, we analyze the only three datasets where $\mathrm{PMI_{DC}}$ does worse than other methods and put forward a hypothesis for why normalizing log probabilities works better than raw probabilities ( $\S 6$ ). We conclude with a discussion of how generative models should be used for selection tasks ( $\S 7$ ).
+
+# 2 Background and Related Work
+
+Zero-shot vs. Few-Shot Zero-shot inference has long been of interest in NLP, Computer Vision, and ML in general (Socher et al., 2013; Guadarrama et al., 2013; Romera-Paredes and Torr, 2015). However, Radford et al. (2019) popularized the notion that language models have many zero-shot capabilities that can be discovered simply by prompting the model, e.g., placing "TL;DR" (internet slang for Too Long; Didn't Read) at the end of a passage causes the model to generate a summary. Efficiently constructing the right prompt for a given task is difficult and has become an active area of research (Reynolds and McDonell, 2021; Lu et al., 2021; Shin et al., 2020; Jiang et al., 2020a,b).
+
+Brown et al. (2020) demonstrated that few-shot learning without fine-tuning is possible with very large language models. Contemporary work has shown it is possible to get smaller models to exhibit few-shot learning behavior using fine-tuning (Hambardzumyan et al., 2021; Gao et al., 2020; Schick and Schütze, 2020a,b,c; Shin et al., 2020), an intermediate learning phase (Ye et al., 2021), or calibration (Zhao et al., 2021), though most assume access to a validation set (Perez et al., 2021). Recent work suggests it may be possible to finetune language models in order to improve their zero-shot and few-shot capabilities on a large swathe of tasks (Wei et al., 2021; Zhong et al., 2021).
+
+Surface Form Competition When applying generative models to multiple choice problems, simply choosing the highest probability answer becomes problematic due to different valid surface forms competing for probability. Indeed, recent work in question answering has demonstrated the importance of considering all multiple choice options together (Khashabi et al., 2020), rather than independently assigning each answer a score and simply choosing the highest. This is a difficult strategy to adapt to left-to-right generative language models, which implicitly choose between all possible strings. Using unsupervised language models pretrained on relatively expansive corpora exacerbates surface form competition because such language models generate a much wider distribution than a given question answering dataset contains.
+
+"What is the most populous nation in North America?" Posed with this question, a language model such as GPT-3 can generate a correct response such as "USA", "United States", or "United
+
+States of America" with high probability. While correct strings like this all contribute to the probability of a correct generation, they may have vastly different probabilities: a common string "United States" will be much more likely than rarer forms like "U.S. of A." In generative scenarios, as long as most of the probability mass goes to valid strings the generation is likely to be valid. This is not the case for multiple choice problems. Given two options, e.g., "USA" and "Canada", GPT-3 will choose the correct answer by probability. However, if we substitute out "USA" for "U.S. of A.", GPT-3 will assign higher probability to "Canada", a less likely answer conceptually, but a much more likely surface form. Beyond this, incorrect generic answers such as "I don't know" are often assigned high probability, relegating the desired answers to the tail of the distribution where softmax is poorly calibrated (Holtzman et al., 2020).
+
+PMI Work in dialogue has used PMI to promote diversity (Zhou et al., 2019; Yao et al., 2017; Li et al., 2016; Mou et al., 2016; Tang et al., 2019). Recently, Brown et al. (2020) used a scoring function resembling $\mathrm{PMI_{DC}}$ for zero-shot question answering, though they only use the string "A:" as a prompt for the unconditional probability estimate, whereas we use a task-specific domain premise (see §3 for details). Furthermore, Brown et al. (2020) only report this scoring method on three datasets (ARC, OpenBookQA, and RACE, included here) out of the more than 20 tested and do not compare scores with their standard method, averaging log-likelihoods (Avg in this work). In contrast, we report a comprehensive comparison on GPT-3 and GPT-2, as well as shedding light on the underlying issue of surface form competition in §5.
+
+Contextual Calibration Recently, Zhao et al. (2021) describe a new method for calibrating the probabilities of an LM using a learned affine transformation. Though geared towards few-shot learning, the authors devise a clever means of using "content free inputs" for zero-shot learning. Zhao et al. (2021) calibrate for three forms of bias: (1) majority label bias, (2) recency bias, and (3) common token bias. $\mathrm{PMI_{DC}}$ directly compensates for common token bias by dividing by the domain conditional probability of each answer, and performs superior to contextual calibration (CC) in the majority of cases.
+
+Prompt Sensitivity Recent work highlights LM sensitivity to inputs, and proposes to consider paraphrases of the prompt to overcome this (Davison et al., 2019; Jiang et al., 2020b), as well as noting that certain trigger tokens (Shin et al., 2020) can strongly effect the output of such models. In this work, we focus on the surface form of possible outputs, but do also analyze robustness to different prompts in §4.4.
+
+Interpreting Language Models Language models tend to model selectional preferences and thematic fit (Pantel et al., 2007; Erk et al., 2010) rather than semantic plausibility (Wang et al., 2018). Probability, possibility and plausibility are distinct (Van der Helm, 2006), but reporting bias (Gordon and Van Durme, 2013) means that language models only model what people are likely to write (on websites that are easily crawled). $\mathrm{PMI_{DC}}$ aims to adjust for these challenges to better measure the underlying agreement between language models and human judgements, but of course is still subject to the limits and biases of the language model used.
+
+# 3 Zero-shot Scoring Strategies
+
+This paper does not define any new modeling or finetuning methods. Rather, we propose the broad use of $\mathrm{PMI_{DC}}$ scoring for any given model and prompt. $\mathrm{PMI_{DC}}$ compensates for the fact that different correct answers compete for probability, even though only one will be listed as the correct multiple choice option.
+
+We begin by describing the two most common methods currently in use.
+
+# 3.1 Standard Methods
+
+Our first baseline is simply selecting the highest-probability option, e.g., baselines in Zhao et al. (2021) and Jiang et al. (2020b), which we refer to as LM. Given a prompt $\mathbf{x}$ (e.g. "The bar closed") and a set of possible answers $\mathbf{y}_1,\dots ,\mathbf{y}_n$ (e.g. "it was crowded.", "it was 3 AM"), LM is defined:
+
+$$
+\underset {i} {\arg \max } P (\mathbf {y} _ {i} | \mathbf {x}). \tag {1}
+$$
+
+However, using length normalized log-likelihoods (Brown et al., 2020) has become standard due to its superior performance, and is also commonly used in generation (Mao et al., 2019; Oluwatobi and Mueller, 2020). For causal language models, e.g.,
+
+# Template
+
+Premise (X):
+
+The bar closed because
+
+Domain Premise (Xdomain): because
+
+Hypothesis 1 $(\mathbf{Y}_1)$ :
+
+it was crowded.
+
+Hypothesis 2 $(\mathbf{y}_2)$ :
+
+it was 3am.
+
+# Scoring Functions
+
+$$
+\begin{array}{c} \text {P r o b a b i l i t y} \\ (\text {L M}) \end{array} \qquad \underset {i} {\operatorname {a r g m a x}} P (\mathbf {y} _ {i} | \mathbf {x})
+$$
+
+$$
+\begin{array}{l l} \text {A v e r a g e L o g - L i k e l i h o o d} & \arg \max _ {i} \frac {\sum_ {j = 1} ^ {\ell_ {i}} P (y _ {i} ^ {j} | \mathbf {x} , \mathbf {y} ^ {1 \cdots j - 1})}{\ell_ {i}} \end{array}
+$$
+
+$$
+\begin{array}{c} \text {C o n t e x t u a l C a l i b r a t i o n} \\ (\mathbf {C C}) \end{array} \quad \arg \max _ {i} \mathbf {w} P (\mathbf {y} _ {i} | \mathbf {x}) + \mathbf {b}
+$$
+
+$$
+\underset {(\mathbf {P M I} _ {\mathrm {b c}})} {\text {D o m a i n C o n d i t i o n a l P M I}} \quad \arg \max _ {i} \frac {P (\mathbf {y} _ {i} | \mathbf {x})}{P (\mathbf {y} _ {i} | \mathbf {x} _ {\mathrm {d o m a i n}})}
+$$
+
+Figure 2: An example from COPA (Roemmle et al., 2011) with the template we use as well as the scoring functions we test. LM returns the highest probability option, while AVG length-normalizes log-likelihoods and chooses the highest option. $\mathrm{PMI_{DC}}$ is a measurement of the mutual information between hypothesis and premise, intuitively how much $\mathbf{x}$ explains $\mathbf{y}_i$ and vice versa. CC is an affine transform of LM, where $\mathbf{w}$ and $\mathbf{b}$ are averaged over solutions that cause "content free inputs" to yield uniform scores over a given label set, see Zhao et al. (2021).
+
+GPT-2 and GPT-3, Equation 1 can be decomposed:
+
+$$
+P (\mathbf {y} _ {i} | \mathbf {x}) = \prod_ {j = 1} ^ {\ell_ {i}} P (y _ {i} ^ {j} | \mathbf {x}, y _ {i} ^ {1}, \dots , y _ {i} ^ {j - 1})
+$$
+
+where $y_{i}^{j}$ is the $j$ th token of $\mathbf{y}_i$ and $\ell_i$ is the number of tokens in $\mathbf{y}_i$ . The Avg strategy can thus be defined as:
+
+$$
+\arg \max _ {i} \frac {\sum_ {j = 1} ^ {\ell_ {i}} \log P (y _ {i} ^ {j} | \mathbf {x} , \mathbf {y} ^ {1 \cdots j - 1})}{\ell_ {i}}.
+$$
+
+# 3.2 Domain Conditional PMI
+
+Our core claim is that direct probability is not an adequate zero-shot scoring function due to surface form competition. A natural solution is to factor out the probability of specific surface forms, which is what Pointwise Mutual Information (PMI) does:
+
+$$
+\operatorname {P M I} (\mathbf {x}, \mathbf {y}) = \log \frac {P (\mathbf {y} | \mathbf {x})}{P (\mathbf {y})} = \log \frac {P (\mathbf {x} | \mathbf {y})}{P (\mathbf {x})}. \tag {2}
+$$
+
+In effect, this is how much more likely the hypothesis ("it was 3 AM.") becomes given the premise ("The bar closed because"), see Figure 2 for the full example. In a multiple-choice setting—where the premise $\mathbf{x}$ does not change across hypotheses—this is proportional to $P(\mathbf{x}|\mathbf{y})$ , i.e. the probability of the premise given the hypothesis. We call this scoring-by-premise and it is the reverse of LM, $P(\mathbf{y}|\mathbf{x})$ . We use scoring-by-premise to show the presence of surface form competition in §5.
+
+While Equation 2 estimates how related premise $\mathbf{x}$ is to hypothesis $\mathbf{y}$ in general, we found that estimates of $P(\mathbf{y})$ vary wildly. GPT-2 and GPT-3 are not trained to produce unconditional estimates of document excerpts, an issue which is exacerbated by the fact that many possible answers are extremely rare in a large scrape of public web pages. This causes the unconditional probability of such answers to be poorly calibrated for the purposes of a given task.
+
+We are specifically trying to measure $P(\mathbf{y})$ in a given domain, e.g., for the "because" relation in our running example, shown in Figures 2 & 3. To quantify this, we propose Domain Conditional PMI:
+
+$$
+\begin{array}{l} \mathrm {P M I} _ {\mathrm {D C}} (\mathbf {x}, \mathbf {y}, \text {d o m a i n}) = \frac {P (\mathbf {y} | \mathbf {x} , \text {d o m a i n})}{P (\mathbf {y} | \text {d o m a i n})} \\ = \frac {P (\mathbf {y} | \mathbf {x} , \text {d o m a i n})}{P (\mathbf {y} | \mathbf {x} _ {\text {d o m a i n}})} \\ \end{array}
+$$
+
+or how much $\mathbf{x}$ tells us about $\mathbf{y}$ within a domain.
+
+Typically, $P(\mathbf{y}|\mathbf{x}, \text{domain}) = P(\mathbf{y}|\mathbf{x})$ because the premise $\mathbf{x}$ typically implies the domain, e.g., "The bar closed because" sets the model up to predict an independent clause that is the cause of some event, without further representation of the domain. In order to estimate $P(\mathbf{y}|\text{domain})$ the probability of seeing hypothesis $\mathbf{y}$ in a given domain—we use a short domain-relevant string $\mathbf{x}_{\text{domain}}$ , which we call a "domain premise", usually just the ending of the conditional premise $\mathbf{x}$ . For example, to predict a causal relation like in Figure 2 we use $\mathbf{x}_{\text{domain}} =$ "because" and thus divide by $P(\mathbf{y}|\text{because})$ -how
+
+likely $y$ is to be a "cause". For examples of each template see Appendix B.
+
+# 3.3 Non-standard Baselines
+
+Unconditional We also compare to the unconditional (in-domain) estimate as a scoring function:
+
+$$
+\underset {i} {\arg \max } P (\mathbf {y} _ {i} | \mathbf {x} _ {\text {d o m a i n}}).
+$$
+
+We refer to this as UNC. It ignores the premise completely, only using a domain premise $\mathbf{x}_{\mathrm{domain}}$ (e.g., using $P(\mathbf{y}|$ because) as the score). Yet, it is sometimes competitive, for instance on BoolQ (Clark et al., 2019). UNC is a sanity check on whether zero-shot inference is actually using the information in the question to good effect.
+
+Contextual Calibration Finally, we compare to the reported zero-shot numbers of Zhao et al. (2021). Contextual Calibration adjusts LM with an affine transform to make a closed set of answers equally likely in the absence of evidence. Contextual Calibration thus requires computing matrices $\mathbf{w}$ and $\mathbf{b}$ for a number of "content free inputs" and then averaging these weights, see Zhao et al. (2021) for details. In contrast, $\mathrm{PMI_{DC}}$ requires nothing but a human-written template (as all zero-shot methods do, including Contextual Calibration), can be computed as the difference of two log probabilities, and is naturally applicable to datasets where the set of valid answers varies between questions.
+
+# 4 Multiple Choice Experiments
+
+# 4.1 Setup
+
+We use GPT-2 via the HuggingFace Transformers library (Wolf et al., 2020) and GPT-3 via OpenAI's beta API.† We do not finetune any models, nor do we alter their output. See Appendix B for examples from each dataset in our templated format.
+
+# 4.2 Datasets
+
+We report results on 16 splits of 13 datasets, and briefly describe each dataset here.
+
+Continuation These datasets require the model to select a continuation to previous text, making them a natural way to test language models. Choice of Plausible Alternatives (COPA) (Roemmle et al., 2011) asks for cause and effect relationships, as shown in Figure 2. StoryCloze (SC) (Mostafazadeh et al., 2017) gives the model a choice between two
+
+alternative endings to 5 sentence stories. Finally, HellaSwag (HS) (Zellers et al., 2019) uses GPT-2 to generate, BERT to filter, and crowd workers to verify possible continuations to a passage. Following previous work (Brown et al., 2020) we report development set numbers for COPA and HS.
+
+Question Answering RACE-M & -H (R-M & R-H) (Lai et al., 2017) are both drawn from English exams given in China, the former being given to Middle Schoolers and the latter to High Schoolers. Similarly, ARC Easy & Challenge (ARC-E & ARC-C) (Clark et al., 2018) are standardized tests described as "natural, grade-school science questions," with the "Easy" split found to be solvable by either a retrieval or word co-occurrence system, and the rest of the questions put in the "Challenge" split. Open Book Question Answering (OBQA) (Mihaylov et al., 2018) is similar to both of these, but was derived using (and intended to be tested with) a knowledge source (or "book") available; we do not make use of the given knowledge source, following Brown et al. (2020). Finally, CommonSenseQA (CQA) (Talmor et al., 2019) leverages CONCEPTNET (Speer et al., 2017) to encourage crowd workers to write questions with challenging distractors. We report development set numbers on CQA because their test set is not public.
+
+Open Set vs. Closed Set Datasets The above datasets are all "open set" in that multiple choice answers may be any string. Below we describe "closed set" datasets with a fixed set of answers.
+
+Boolean Question Answering BoolQ (BQ) (Clark et al., 2019) poses yes/no (i.e. Boolean) questions based on a multi-sentence passage.
+
+Entailment Entailment datasets focus on the question of whether a hypothesis sentence B is entailed by a premise sentence A. Recognizing Textual Entailment (RTE) (Dagan et al., 2005) requires predicting an "entailment" or "contradiction" label while Commitment Bank (CB) (De Marneffe et al., 2019) adds a "neutral" label. Following previous work (Brown et al., 2020) we report development set numbers for both RTE and CB.
+
+Text Classification We consider three more complex classification datasets: SST-2 & -5 (Socher et al., 2013) for various granularities of sentiment classification, AG's News (Zhang et al., 2015) (AGN) for topic classification, and TREC (Li and Roth, 2002) for question classification.
+
+Multiple Choice Accuracy on GPT-3
+
+| Params. | 2.7B | 6.7B | 13B | 175B | |
| Unc | LM | Avg | PMIDC | CC | Unc | LM | Avg | PMIDC | Unc | LM | Avg | PMIDC | Unc | LM | Avg | PMIDC | CC |
| COPA | 54.8 | 68.4 | 68.4 | 74.4 | - | 56.4 | 75.8 | 73.6 | 77.0 | 56.6 | 79.2 | 77.8 | 84.2 | 56.0 | 85.2 | 82.8 | 89.2 | - |
| SC | 50.9 | 66.0 | 68.3 | 73.1 | - | 51.4 | 70.2 | 73.3 | 76.8 | 52.0 | 74.1 | 77.8 | 79.9 | 51.9 | 79.3 | 83.1 | 84.0 | - |
| HS | 31.1 | 34.5 | 41.4 | 34.2 | - | 34.7 | 40.8 | 53.5 | 40.0 | 38.8 | 48.8 | 66.2 | 45.8 | 43.5 | 57.6 | 77.2 | 53.5 | - |
| R-M | 22.4 | 37.8 | 42.4 | 42.6 | - | 21.2 | 43.3 | 45.9 | 48.5 | 22.9 | 49.6 | 50.6 | 51.3 | 22.5 | 55.7 | 56.4 | 55.7 | - |
| R-H | 21.4 | 30.3 | 32.7 | 36.0 | - | 22.0 | 34.8 | 36.8 | 39.8 | 22.9 | 38.2 | 39.2 | 42.1 | 22.2 | 42.4 | 43.3 | 43.7 | - |
| ARC-E | 31.6 | 50.4 | 44.7 | 44.7 | - | 33.5 | 58.2 | 52.3 | 51.5 | 33.8 | 66.2 | 59.7 | 57.7 | 36.2 | 73.5 | 67.0 | 63.3 | - |
| ARC-C | 21.1 | 21.6 | 25.5 | 30.5 | - | 21.8 | 26.8 | 29.8 | 33.0 | 22.3 | 32.1 | 34.3 | 38.5 | 22.6 | 40.2 | 43.2 | 45.5 | - |
| OBQA | 10.0 | 17.2 | 27.2 | 42.8 | - | 11.4 | 22.4 | 35.4 | 48.0 | 10.4 | 28.2 | 41.2 | 50.4 | 10.6 | 33.2 | 43.8 | 58.0 | - |
| CQA | 15.9 | 33.2 | 36.0 | 44.7 | - | 17.4 | 40.0 | 42.9 | 50.3 | 16.4 | 48.8 | 47.9 | 58.5 | 16.3 | 61.0 | 57.4 | 66.7 | - |
| BQ | 62.2 | 58.5 | 58.5 | 53.5 | - | 37.8 | 61.0 | 61.0 | 61.0 | 62.2 | 61.1 | 61.1 | 60.3 | 37.8 | 62.5 | 62.5 | 64.0 | - |
| RTE | 47.3 | 48.7 | 48.7 | 51.6 | 49.5 | 52.7 | 55.2 | 55.2 | 48.7 | 52.7 | 52.7 | 52.7 | 54.9 | 47.3 | 56.0 | 56.0 | 64.3 | 57.8 |
| CB | 08.9 | 51.8 | 51.8 | 57.1 | 50.0 | 08.9 | 33.9 | 33.9 | 39.3 | 08.9 | 51.8 | 51.8 | 50.0 | 08.9 | 48.2 | 48.2 | 50.0 | 48.2 |
| SST-2 | 49.9 | 53.7 | 53.76 | 72.3 | 71.4 | 49.9 | 54.5 | 54.5 | 80.0 | 49.9 | 69.0 | 69.0 | 81.0 | 49.9 | 63.6 | 63.6 | 71.4 | 75.8 |
| SST-5 | 18.1 | 20.0 | 20.4 | 23.5 | - | 18.1 | 27.8 | 22.7 | 32.0 | 18.1 | 18.6 | 29.6 | 19.1 | 17.6 | 27.0 | 27.3 | 29.6 | - |
| AGN | 25.0 | 69.0 | 69.0 | 67.9 | 63.2 | 25.0 | 64.2 | 64.2 | 57.4 | 25.0 | 69.8 | 69.8 | 70.3 | 25.0 | 75.4 | 75.4 | 74.7 | 73.9 |
| TREC | 13.0 | 29.4 | 19.2 | 57.2 | 38.8 | 22.6 | 30.2 | 22.8 | 61.6 | 22.6 | 34.0 | 21.4 | 32.4 | 22.6 | 47.2 | 25.4 | 58.4 | 57.4 |
+
+Table 1: Comparison of scoring algorithms when using GPT-3 for zero-shot inference on multiple choice questions.
+
+Percent of Ties or Wins by Method
+
+| Method | Unc | LM | Avg | PMI DC | CC |
| 125M | 12.50 | 6.25 | 12.50 | 68.75 | - |
| 350M | 6.25 | 18.75 | 12.50 | 68.75 | - |
| 760M | 6.25 | 6.25 | 12.50 | 75.00 | - |
| 1.6B | 6.25 | 12.50 | 12.50 | 80.00 | 20.00 |
| 2.7B | 6.25 | 6.25 | 6.25 | 86.66 | 0.00 |
| 6.7B | 6.25 | 25.00 | 25.00 | 75.00 | - |
| 13B | 6.25 | 18.75 | 18.75 | 68.75 | - |
| 175B | 6.25 | 12.50 | 18.75 | 62.50 | 6.25 |
+
+Table 2: Percentage of datasets that a given method produced the best score or was tied with other methods, aggregated over each model size. The first four rows use GPT-2 (full data available in the Appendix), while the final four rows use GPT-3 and summarize data from Table 1. Since ties are included, rows sometimes sum to more than 100. CC is only measured on the 5 datasets we use where Zhao et al. (2021) also report accuracies.
+
+# 4.3 Results
+
+We report zero-shot results for GPT-3 in Table 1, with GPT-2 results available in Appendix A. A summarized view is shown in Table 2, which aggregates the percentage of splits where a given method achieves the best score or ties for first-place. In this summarized view it is clear that $\mathrm{PMI_{DC}}$ consistently outperforms other scoring methods when assessed over a variety of datasets. The smallest margin (in number of datasets won or tied) between $\mathrm{PMI_{DC}}$ and the best competing method is on GPT-3
+
+Prompt Robustness on SST-2
+
+| Method | Unc | LM | PMI DC |
| 125M | 49.90 | 56.87.3 | 58.87.6 |
| 350M | 49.90 | 58.011.3 | 60.311.4 |
| 760M | 49.90 | 57.09.2 | 67.713.4 |
| 1.6B | 49.90 | 57.38.2 | 69.813.3 |
| 2.7B | 49.90 | 56.19.0 | 66.215.7 |
| 6.7B | 49.90 | 59.510.7 | 67.913.6 |
| 13B | 49.90 | 63.014.9 | 71.716.1 |
| 175B | 49.90 | 72.515.7 | 74.814.0 |
+
+Table 3: The mean and standard deviations over the 15 templates considered for SST-2 in (Zhao et al., 2021). Avg is excluded, as it is equivalent to LM since all the given templates use single-token answers.
+
+175B with Avg, but that margin is over 40 percentage points. This does not imply that $\mathrm{PMI_{DC}}$ is always better or that it will be better by a large margin, though it often is. It does suggest that $\mathrm{PMI_{DC}}$ is a significantly better bet on a new dataset.
+
+# 4.4 Robustness
+
+To verify that these trends hold across different prompts, we report the mean and standard deviation over the fifteen different prompts considered in (Zhao et al., 2021) for SST-2. Table 3 shows, $\mathrm{PMI_{DC}}$ always maintains the highest mean, often by a hefty margin. Scores are lower than in Table 1 because many of the prompts used are optimized for few-shot rather than zero-shot scoring.
+
+| SST-2 | CQA |
| Method | Unc | LM | PMIDC | Unc | LM | Avg | PMIDC |
| 125M | 49.90 | 63.67,4 | 71.75,1 | 15.50 | 29.91,6 | 32.71,4 | 38.31,7 |
| 350M | 49.90 | 76.313,8 | 76.48,1 | 16.50 | 37.62,3 | 40.42,3 | 45.72,4 |
| 760M | 49.90 | 85.97,2 | 87.13,0 | 16.10 | 41.52,6 | 42.42,5 | 47.01,5 |
| 1.6B | 49.90 | 85.41,7 | 89.44,0 | 16.00 | 46.21,5 | 47.71,9 | 52.32,1 |
| 2.7B | 49.90 | 88.14,9 | 87.75,5 | 16.60 | 43.01,7 | 45.61,9 | 50.41,1 |
| 6.7B | 49.90 | 92.92,1 | 79.86,9 | 16.90 | 52.31,4 | 53.41,0 | 56.51,6 |
| 13B | 49.90 | 85.49,0 | 86.97,5 | 16.70 | 58.42,0 | 59.31,5 | 63.41,4 |
| 175B | 49.90 | 89.95,5 | 95.50,7 | 16.50 | 69.11,9 | 69.40,8 | 72.00,9 |
+
+Table 4: The mean and standard deviation for 5 randomly sampled sets of 4 examples used for few-shot inference. We include a closed answer dataset (SST-2) and an open answer dataset (CQA). For SST-2 Avg is equivalent to LM due to using single-token answers.
+
+| Method | COPA | COPA Flipped |
| Unc | LM | Avg | PMI\( _{DC} \) | Unc | LM | Avg | PMI\( _{DC} \) |
| 125M | 56.4 | 61.0 | 63.2 | 62.8 | 50.0 | 63.2 | 63.2 | 63.2 |
| 350M | 55.8 | 67.0 | 66.0 | 70.0 | 50.0 | 66.4 | 66.4 | 66.4 |
| 760M | 55.6 | 69.8 | 67.6 | 69.4 | 50.0 | 70.8 | 70.8 | 70.8 |
| 1.6B | 56.0 | 69.0 | 68.4 | 71.6 | 50.0 | 73.0 | 73.0 | 73.0 |
| 2.7B | 54.8 | 68.4 | 68.4 | 74.4 | 50.0 | 68.4 | 68.4 | 68.4 |
| 6.7B | 56.4 | 75.8 | 73.6 | 77.0 | 50.0 | 76.8 | 76.8 | 76.8 |
| 13B | 56.6 | 79.2 | 77.8 | 84.2 | 50.0 | 79.0 | 79.0 | 79.0 |
| 175B | 56.0 | 85.2 | 82.8 | 89.2 | 50.0 | 83.6 | 83.6 | 83.6 |
+
+Table 5: LM does better on COPA Flipped than COPA because surface form competition is removed when scoring-by-premise, see §5. Methods that don't directly adjust for competing surface forms (LM and Avg) have the same score as $\mathrm{PMI_{DC}}$ on COPA Flipped.
+
+# 4.5 Few-shot
+
+While our focus in this paper is on zero-shot scoring, $\mathrm{PMI_{DC}}$ is just as applicable to few-shot scenarios. In Table 4 we report 4-shot results on one closed set dataset (SST-2) and one open set dataset (CQA). We show the mean of 5 randomly sampled sets of 4 examples that are used to prime the model for the task, along with standard deviations. The overall trend on both datasets clearly favors $\mathrm{PMI_{DC}}$ , though LM is superior for two models on SST-2.
+
+# 5 Removing Surface Form Competition
+
+What if we used the probability of the premise given the hypothesis, $P(\mathbf{x}|\mathbf{y}_i)$ , instead? While we are still measuring the probability of a surface form (e.g. "the bar closed"), it is the same surface form across different options ("It was crowded so", "It was 3 AM so"), eliminating the surface form competition. $\mathbf{y}_i$ and $\mathbf{y}_i'$ can now both attain high scores if they are both correct answers, by causing $\mathbf{x}$ to be likely. We call this scoring-by-premise.
+
+Causal language models like GPT-3 cannot measure this directly, because they are only capable of conditioning on past tokens to predict future tokens. We exploit the structure of the COPA dataset to create "COPA Flipped" via a simple transformation, shown in Figure 3. COPA consists of cause and effect pairs (CAUSE so EFFECT, and EFFECT because CAUSE). In the original dataset, whatever comes second (either CAUSE or EFFECT) has two options that a model must choose between. These can be reversed by switching CAUSE and EFFECT, then substituting the natural inverse relation ("because") $\rightarrow$ "so" and "so" $\rightarrow$ "because").
+
+# 5.1 Results
+
+Table 5 shows scores on COPA and COPA Flipped side-by-side. On COPA Flipped everything except UNC produces the exact same result. This is because flipping the hypothesis and premise means that it's the context that changes and not the continuation. LM, AVG, and $\mathrm{PMI_{DC}}$ only differ from each other over different continuations, not over different contexts for the same continuation.
+
+On COPA Flipped all methods generally perform similarly to $\mathrm{PMI_{DC}}$ on the unflipped version. This is because surface form competition has been eradicated: we are measuring how well different prefixes condition a model to predict a fixed continuation rather than which continuation is highest probability. Unlike LM, where different answers compete for probability, in COPA Flipped it only matters how likely each answer can make the question. This is not subject to surface form competition because there is only one string being so scored, so it is not competing with any other strings for probability mass.
+
+Not all datasets are so easily flippable, so manually flipping individual questions to remove surface form competition is not a generally applicable strategy. Luckily, $\mathrm{PMI_{DC}}$ is symmetric:
+
+$$
+\begin{array}{l} \arg \max _ {i} \frac {P (\mathbf {y} _ {i} | \mathbf {x} , \text {d o m a i n})}{P (\mathbf {y} _ {i} | \text {d o m a i n})} \\ = \arg \max _ {i} \frac {P (\mathbf {x} | \mathbf {y} _ {i} , \text {d o m a i n})}{P (\mathbf {x} | \text {d o m a i n})} \\ = \underset {i} {\arg \max } P (\mathbf {x} | \mathbf {y} _ {i}, \text {d o m a i n}) \\ \end{array}
+$$
+
+In theory, the answer selected by $\mathrm{PMI_{DC}}$ should be the same between COPA and COPA Flipped
+
+
+Figure 3: In §5 we experiment with flipping the premise and hypothesis so that the highest probability premise is chosen as the answer, i.e. scoring-by-premise. The transformation above the dashed line shows the experimental setup used in §5.1, while the extra distractor below the dashed line is used for illustrative purposes in §5.2.
+
+as PMI is symmetric, though we expect some differences due to “so” and “because” not being perfect inverses and shuffled references. Thus, $\mathrm{PMI}_{\mathrm{DC}}$ does better on COPA than COPA Flipped, likely due to more natural phrasing in the original dataset.
+
+These results suggest that surface form competition is the primary cause of the depressed performance of LM and Avg in comparison to $\mathrm{PMI_{DC}}$ .
+
+# 5.2 In-depth Example
+
+Scoring-by-Premise Improves LM Figure 3 shows an example of transforming one question from COPA to COPA Flipped. In the example depicted, when we use GPT-3 to calculate $P$ , we get:
+
+$$
+P (\mathbf {y} _ {1} | \mathbf {x}) > P (\mathbf {y} _ {2} | \mathbf {x})
+$$
+
+which is wrong, since bars usually close at fixed, late-night closing times, rather than because of being overcrowded. However we also find that
+
+$$
+P (\hat {\mathbf {y}} | \hat {\mathbf {x}} _ {2}) > P (\hat {\mathbf {y}} | \hat {\mathbf {x}} _ {1})
+$$
+
+$$
+\frac {P \left(\mathbf {y} _ {2} \mid \mathbf {x}\right)}{P \left(\mathbf {y} _ {2} \mid \mathbf {x} _ {\text {d o m a i n}}\right)} > \frac {P \left(\mathbf {y} _ {1} \mid \mathbf {x}\right)}{P \left(\mathbf {y} _ {1} \mid \mathbf {x} _ {\text {d o m a i n}}\right)}
+$$
+
+indicating that scoring-by-premise causes the right answer to be selected and that $\mathrm{PMI_{DC}}$ successfully simulates scoring by premise in this example.
+
+Stability Over Valid Answers To see how scoring-by-premise allows multiple correct options to achieve high scores, consider the slightly perturbed $\mathbf{y}_2^{\prime}$ and $\hat{\mathbf{x}}_2^\prime$ in Figure 3. The inequalities shown above still hold when substituting
+
+$\mathbf{y}_2 \to \mathbf{y}_2'$ and $\hat{\mathbf{x}}_2 \to \hat{\mathbf{x}}_2'$ :
+
+$$
+P (\mathbf {y} _ {1} | \mathbf {x}) > P (\mathbf {y} _ {2} ^ {\prime} | \mathbf {x})
+$$
+
+$$
+P (\hat {\mathbf {y}} | \hat {\mathbf {x}} _ {2} ^ {\prime}) > P (\hat {\mathbf {y}} | \hat {\mathbf {x}} _ {1})
+$$
+
+$$
+\frac {P \left(\mathbf {y} _ {2} ^ {\prime} \mid \mathbf {x}\right)}{P \left(\mathbf {y} _ {2} ^ {\prime} \mid \mathbf {x} _ {\text {d o m a i n}}\right)} > \frac {P \left(\mathbf {y} _ {1} \mid \mathbf {x}\right)}{P \left(\mathbf {y} _ {1} \mid \mathbf {x} _ {\text {d o m a i n}}\right)}
+$$
+
+with the key difference that the conditional probability of $\mathbf{y}_2^{\prime}$ is much lower:
+
+$$
+\log P (\mathbf {y} _ {2} | \mathbf {x}) \approx - 1 6
+$$
+
+$$
+\log P (\mathbf {y} _ {2} ^ {\prime} | \mathbf {x}) \approx - 2 0
+$$
+
+This is undesirable, as both $\mathbf{y}_2$ and $\mathbf{y}_2'$ are correct answers with similar meanings. Yet, when scoring-by-premise the conditional probability of $\hat{\mathbf{y}}$ is stable when substituting $\hat{\mathbf{x}}_2 \rightarrow \hat{\mathbf{x}}_2'$ :
+
+$$
+\log P (\hat {\mathbf {y}} | \hat {\mathbf {x}} _ {2}) \approx - 1 2
+$$
+
+$$
+\log P (\hat {\mathbf {y}} | \hat {\mathbf {x}} _ {2} ^ {\prime}) \approx - 1 2
+$$
+
+This suggests that eliminating surface form competition allows different correct answers to score well, as they are no longer competing for probability mass. Specifically, "it was 3 AM" and "it was 3:30AM" score wildly differently in COPA but nearly identically in COPA Flipped.
+
+# 6 Analysis
+
+Failure Cases There are three datasets where $\mathrm{PMI_{DC}}$ does not consistently outperform other methods: HellaSwag, ARC Easy, and BoolQ. Surprisingly, each is dominated by a different method.
+
+HellaSwag is most amenable to AVG. On examination we find that HellaSwag is more focused on the internal coherence of the hypotheses, rather than external coherence, i.e. how much a premise and hypothesis match. This is likely due to HellaSwag being generated by GPT-2 (Radford et al., 2019) and filtered with BERT, as it contains relatively on-topic but intrinsically strange hypotheses that humans can distinguish from natural data.
+
+ARC Easy yields the highest scores to LM, i.e., selecting the highest probability option. Clark et al. (2018) note that ARC Easy questions can be solved by a retrieval or word co-occurrence baseline, while examples that were answered incorrectly by both were put into the Challenge split. This suggests a bias towards a priori likely phrases. Manual inspection reveals many stock answers, e.g., "[clouds are generated when] ocean water evaporates and then condenses in the air," supporting our hypothesis.
+
+Finally, BoolQ, a reading comprehension dataset in which all answers are either "yes" or "no", is best solved by an unconditional baseline. This is because the dataset presents truly complex questions that require more reasoning than GPT-2 or 3 are capable of out of the box. Indeed, none of the methods reported do better than the majority baseline, except $\mathrm{PMI_{DC}}$ with the largest GPT-3 model.
+
+Why does length normalization work? Past work offers little explanation for why AVG should be a successful strategy, other than the intuition that estimates are strongly length biased and require compensation. Length bias may be caused by the final softmax layer of current language models assigning too much probability mass to irrelevant options at each time-step, as noted in open-ended generation, character-level language modeling, and machine translation (Holtzman et al., 2020; Al-Rfou et al., 2019; Peters et al., 2019).
+
+Another (not mutually exclusive) argument is that length normalization may account for unconditional probability in a similar way to $\mathrm{PMI_{DC}}$ . Length normalization is often measured over Byte Pair Encoding (BPE) tokens (Sennrich et al., 2016) and BPE tends to produce vocabularies where most tokens are equally frequent (Wang et al., 2020). Recent evidence suggests that language is approximately uniformly information dense (Levy, 2018; Levy and Jaeger, 2007; Jaeger, 2006). As such, length in BPE tokens may correspond roughly to a unigram estimate of log-probability, supposing that BPE tokens have approximately uniform uni
+
+gram frequency. The adjustment made by AVG is still somewhat different than $\mathrm{PMI_{DC}}$ , (division of log terms rather than subtraction) but could have a similar effect, if length and probability correlate.
+
+# 7 Discussion
+
+Language Models are density estimation functions that assign probability to every possible string, but there are often many strings that could represent a given idea equally well. Our key observation is that a generative model assigning probability to a string that represents a certain option isn't equivalent to selecting the concept an option corresponds to. We expect surface form competition anywhere that generative models are used where more than one string could represent the same concept.
+
+$\mathrm{PMI_{DC}}$ aligns the predictions being made by the model more closely with the actual task posed by multiple choice questions: "choose the hypothesis that explains the premise" rather than "generate the exact surface form of the hypothesis". From this perspective, $\mathrm{PMI_{DC}}$ does not go far enough, because the model still cannot consider the given set of options altogether when selecting its choice. This matters when answers interact with each other, e.g., "all of the above".
+
+# 8 Conclusion
+
+We conduct a large-scale comparison of standard and recent scoring functions for zero-shot inference across all GPT-2 and GPT-3 models. We show that $\mathrm{PMI_{DC}}$ consistently outperforms previous scoring functions on a wide variety of multiple choice datasets. We also argue that compensating for surface form competition is the cause of this boost, by demonstrating that other methods work just as well as $\mathrm{PMI_{DC}}$ when surface form competition is eliminated. In future work we would like to explore how surface form competition affects generation, as we hypothesize that it may be the cause of overly generic outputs under high model uncertainty.
+
+# Acknowledgments
+
+This work was supported in part by the ARO (AROW911NF-16-1-0121), the NSF (IIS-1562364), DARPA under the MCS program through NIWC Pacific (N66001-19-2-4031) and the Allen Institute for AI (AI2). We thank Mitchell Wortsman, Gabriel Ilharco, Tim Dettmers, and Rik Koncel-Kedziorski for thorough and insightful feedback on preliminary drafts.
+
+# References
+
+Rami Al-Rfou, Dokook Choe, Noah Constant, Mandy Guo, and Llion Jones. 2019. Character-level language modeling with deeper self-attention. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 3159-3166.
+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.
+Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. 2019. *Boolq: Exploring the surprising difficulty of natural yes/no questions.* 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 2924–2936.
+Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. 2018. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv:1803.05457.
+Ido Dagan, Oren Glickman, and Bernardo Magnini. 2005. The pascal recognising textual entailment challenge. In *Machine Learning Challenges Workshop*, pages 177–190. Springer.
+Joe Davison, Joshua Feldman, and Alexander Rush. 2019. Commonsense knowledge mining from pretrained models. 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 1173-1178, Hong Kong, China. Association for Computational Linguistics.
+Marie-Catherine De Marneffe, Mandy Simons, and Judith Tonhauser. 2019. The commitmentbank: Investigating projection in naturally occurring discourse. In proceedings of Sinn und Bedeutung, volume 23, pages 107-124.
+Katrin Erk, Sebastian Padó, and Ulrike Padó. 2010. A flexible, corpus-driven model of regular and inverse selectional preferences. Computational Linguistics, 36(4):723-763.
+Tianyu Gao, Adam Fisch, and Danqi Chen. 2020. Making pre-trained language models better few-shot learners. arXiv preprint arXiv:2012.15723.
+Jonathan Gordon and Benjamin Van Durme. 2013. Reporting bias and knowledge acquisition. In Proceedings of the 2013 workshop on Automated knowledge base construction, pages 25-30.
+Sergio Guadarrama, Niveda Krishnamoorthy, Girish Malkarnenkar, Subhashini Venugopalan, Raymond Mooney, Trevor Darrell, and Kate Saenko. 2013.
+
+Youtube2text: Recognizing and describing arbitrary activities using semantic hierarchies and zero-shot recognition. In Proceedings of the IEEE international conference on computer vision, pages 2712-2719.
+Karen Hambardzumyan, Hrant Khachatrian, and Jonathan May. 2021. Warp: Word-level adversarial reprogramming. arXiv preprint arXiv:2101.00121.
+Ari Holtzman, Jan Buys, Maxwell Forbes, and Yejin Choi. 2020. The curious case of neural text degeneration. International Conference on Learning Representations.
+Tim Florian Jaeger. 2006. *Redundancy and syntactic reduction in spontaneous speech*. Ph.D. thesis, Stanford University Stanford, CA.
+Zhengbao Jiang, Jun Araki, Haibo Ding, and Graham Neubig. 2020a. How can we know when language models know? arXiv preprint arXiv:2012.00955.
+Zhengbao Jiang, Frank F. Xu, Jun Araki, and Graham Neubig. 2020b. How can we know what language models know? Transactions of the Association for Computational Linguistics, 8:423-438.
+Daniel Khashabi, Tushar Khot, Ashish Sabharwal, Oyvind Tafjord, Peter Clark, and Hannaneh Hajishirzi. 2020. Unifiedqa: Crossing format boundaries with a single qa system. arXiv preprint arXiv:2005.00700.
+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.
+Roger Levy. 2018. Communicative efficiency, uniform information density, and the rational speech act theory. In CogSci.
+Roger Levy and T Florian Jaeger. 2007. Speakers optimize information density through syntactic reduction. Advances in neural information processing systems, 19:849.
+Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and William B Dolan. 2016. A diversity-promoting objective function for neural conversation models. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 110-119.
+Xin Li and Dan Roth. 2002. Learning question classifiers. In COLING 2002: The 19th International Conference on Computational Linguistics.
+Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2021. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. arXiv preprint arXiv:2104.08786.
+
+Huanru Henry Mao, Bodhisattwa Prasad Majumder, Julian McAuley, and Garrison Cottrell. 2019. Improving neural story generation by targeted common sense grounding. 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 5990-5995.
+Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. 2018. Can a suit of armor conduct electricity? a new dataset for open book question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2381-2391.
+Nasrin Mostafazadeh, Michael Roth, Annie Louis, Nathanael Chambers, and James Allen. 2017. Lsdsem 2017 shared task: The story cloze test. In Proceedings of the 2nd Workshop on Linking Models of Lexical, Sentential and Discourse-level Semantics, pages 46-51.
+Lili Mou, Yiping Song, Rui Yan, Ge Li, Lu Zhang, and Zhi Jin. 2016. Sequence to backward and forward sequences: A content-introducing approach to generative short-text conversation. In Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, pages 3349-3358.
+Olabiyi Oluwatobi and Erik Mueller. 2020. DLGNet: A transformer-based model for dialogue response generation. In Proceedings of the 2nd Workshop on Natural Language Processing for Conversational AI, pages 54-62, Online. Association for Computational Linguistics.
+Patrick Pantel, Rahul Bhagat, Bonaventura Coppola, Timothy Chklovski, and Eduard Hovy. 2007. ISP: Learning inferential selectional preferences. In Human Language Technologies 2007: The Conference of the North American Chapter of the Association for Computational Linguistics; Proceedings of the Main Conference, pages 564-571, Rochester, New York. Association for Computational Linguistics.
+Ethan Perez, Douwe Kiela, and Kyunghyun Cho. 2021. True few-shot learning with language models. arXiv preprint arXiv:2105.11447.
+Ben Peters, Vlad Niculae, and André FT Martins. 2019. Sparse sequence-to-sequence models. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1504-1519.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
+Laria Reynolds and Kyle McDonell. 2021. Prompt programming for large language models: Beyond the few-shot paradigm. arXiv preprint arXiv:2102.07350.
+
+Melissa Roemmele, Cosmin Adrian Bejan, and Andrew S Gordon. 2011. Choice of plausible alternatives: An evaluation of commonsense causal reasoning. In AAAI Spring Symposium: Logical Formalizations of Commonsense Reasoning, pages 90-95.
+Bernardino Romera-Paredes and Philip Torr. 2015. An embarrassingly simple approach to zero-shot learning. In International conference on machine learning, pages 2152-2161. PMLR.
+Timo Schick and Hinrich Schütze. 2020a. Exploiting cloze questions for few-shot text classification and natural language inference. arXiv preprint arXiv:2001.07676.
+Timo Schick and Hinrich Schütze. 2020b. Few-shot text generation with pattern-exploiting training. arXiv preprint arXiv:2012.11926.
+Timo Schick and Hinrich Schütze. 2020c. It's not just size that matters: Small language models are also few-shot learners. arXiv preprint arXiv:2009.07118.
+Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1715-1725.
+Taylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace, and Sameer Singh. 2020. AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4222-4235, Online. Association for Computational Linguistics.
+Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y 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.
+Robyn Speer, Joshua Chin, and Catherine Havasi. 2017. Conceptnet 5.5: An open multilingual graph of general knowledge. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 31.
+Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. 2019. Commonsenseqa: A question answering challenge targeting commonsense knowledge. 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 4149-4158.
+Jianheng Tang, Tiancheng Zhao, Chenyan Xiong, Xiaodan Liang, Eric Xing, and Zhiting Hu. 2019. Target-guided open-domain conversation. In Proceedings
+
+of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5624-5634.
+Ruud Van der Helm. 2006. Towards a clarification of probability, possibility and plausibility: how semantics could help futures practice to improve. Foresight.
+Changhan Wang, Kyunghyun Cho, and Jiatao Gu. 2020. Neural machine translation with byte-level subwords. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 9154-9160.
+Su Wang, Greg Durrett, and Katrin Erk. 2018. Modeling semantic plausibility by injecting world knowledge. 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 303-308, New Orleans, Louisiana. Association for Computational Linguistics.
+Jason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V. Le. 2021. Finetuned language models are zero-shot learners. arXiv preprint arXiv:2109.01652.
+Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funowicz, 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.
+Lili Yao, Yaoyuan Zhang, Yansong Feng, Dongyan Zhao, and Rui Yan. 2017. Towards implicit content-introducing for generative short-text conversation systems. In Proceedings of the 2017 conference on empirical methods in natural language processing, pages 2190-2199.
+Qinyuan Ye, Bill Yuchen Lin, and Xiang Ren. 2021. Crossfit: A few-shot learning challenge for cross-task generalization in nlp. arXiv preprint arXiv:2104.08835.
+Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. 2019. Hellaswag: Can a machine really finish your sentence? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4791-4800.
+Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. Advances in Neural Information Processing Systems, 28:649-657.
+
+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.
+Ruiqi Zhong, Kristy Lee, Zheng Zhang, and Dan Klein. 2021. Adapting language models for zero-shot learning by meta-tuning on dataset and prompt collections. arXiv preprint arXiv:2109.01652.
+Kun Zhou, Kai Zhang, Yu Wu, Shujie Liu, and Jing-song Yu. 2019. Unsupervised context rewriting for open domain conversation. 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 1834-1844.
+
+# A GPT-2 Results
+
+Table 6 shows the results for zero-shot multiple choice using GPT-2.
+
+# B Templates
+
+Table 7 shows an example of each template used for each dataset.
+
+Multiple Choice Accuracy on GPT-2
+
+| Params. | 125M | 350M | 760M | 1.6B |
| Unc | LM | Avg | PMIDC | Unc | LM | Avg | PMIDC | Unc | LM | Avg | PMIDC | CC |
| COPA | 0.564 | 0.610 | 0.632 | 0.628 | 0.558 | 0.670 | 0.660 | 0.700 | 0.556 | 0.698 | 0.676 | 0.694 | 0.560 |
| SC | 0.495 | 0.600 | 0.615 | 0.670 | 0.489 | 0.630 | 0.667 | 0.716 | 0.503 | 0.661 | 0.688 | 0.734 | 0.512 |
| HS | 0.271 | 0.286 | 0.295 | 0.291 | 0.298 | 0.322 | 0.376 | 0.328 | 0.309 | 0.350 | 0.432 | 0.351 | 0.331 |
| R-M | 0.222 | 0.361 | 0.406 | 0.409 | 0.213 | 0.387 | 0.420 | 0.424 | 0.214 | 0.393 | 0.439 | 0.439 | 0.223 |
| R-H | 0.209 | 0.275 | 0.310 | 0.344 | 0.215 | 0.304 | 0.326 | 0.363 | 0.215 | 0.318 | 0.345 | 0.383 | 0.219 |
| ARC-E | 0.313 | 0.429 | 0.378 | 0.393 | 0.327 | 0.494 | 0.434 | 0.424 | 0.334 | 0.527 | 0.467 | 0.470 | 0.334 |
| ARC-C | 0.198 | 0.201 | 0.235 | 0.282 | 0.197 | 0.228 | 0.254 | 0.286 | 0.221 | 0.231 | 0.266 | 0.316 | 0.211 |
| OBQA | 0.11 | 0.164 | 0.272 | 0.324 | 0.108 | 0.186 | 0.302 | 0.386 | 0.108 | 0.194 | 0.296 | 0.432 | 0.114 |
| CQA | 0.170 | 0.255 | 0.307 | 0.364 | 0.165 | 0.309 | 0.352 | 0.418 | 0.170 | 0.333 | 0.368 | 0.445 | 0.171 |
| BQ | 0.622 | 0.588 | 0.588 | 0.511 | 0.622 | 0.608 | 0.608 | 0.497 | 0.622 | 0.580 | 0.580 | 0.467 | 0.622 |
| RTE | 0.527 | 0.516 | 0.516 | 0.498 | 0.473 | 0.531 | 0.531 | 0.549 | 0.473 | 0.531 | 0.531 | 0.542 | 0.473 |
| CB | 0.089 | 0.482 | 0.482 | 0.500 | 0.089 | 0.500 | 0.500 | 0.500 | 0.089 | 0.482 | 0.482 | 0.500 | 0.089 |
| SST-2 | 0.499 | 0.636 | 0.636 | 0.671 | 0.499 | 0.802 | 0.802 | 0.862 | 0.499 | 0.770 | 0.770 | 0.856 | 0.499 |
| SST-5 | 0.181 | 0.274 | 0.244 | 0.300 | 0.176 | 0.185 | 0.272 | 0.393 | 0.176 | 0.203 | 0.267 | 0.220 | 0.176 |
| AGN | 0.250 | 0.574 | 0.574 | 0.630 | 0.250 | 0.643 | 0.643 | 0.644 | 0.250 | 0.607 | 0.607 | 0.641 | 0.250 |
| TREC | 0.226 | 0.230 | 0.144 | 0.364 | 0.226 | 0.288 | 0.122 | 0.216 | 0.226 | 0.228 | 0.226 | 0.440 | 0.226 |
+
+Table 6: Comparison of scoring algorithms when using GPT-2 for zero-shot inference on multiple choice questions.
+
+| Type | Dataset | Template |
| Continuation | COPA | [The man broke his toe]P [because]DP [he got a hole in his sock.]UH |
| [I tipped the bottle]P [so]DP [the liquid in the bottle froze.]UH |
| StoryCloze | [Jennifer has a big exam tomorrow. She got so stressed, she pulled an all-nighter. She went into class the next day, weary as can be. Her teacher stated that the test is postponed for next week.]P [The story continues:]DP [Jennifer felt bittersweet about it.]UH |
| HellaSwag | [A female chef in white uniform shows a stack of baking pans in a large kitchen presenting them. the pans]P [contain egg yolks and baking soda.]UH |
| QA | RACE | [There is not enough oil in the world now. As time goes by, it becomes less and less, so what are we going to do when it runs out [...]P question: [According to the passage, which of the following statements is true]P?]DP answer: [There is more petroleum than we can use now.]UH |
| ARC | [What carries oxygen throughout the body?]P [the answer is:]DP [red blood cells.]UH |
| OBQA | [Which of these would let the most heat travel through?]P [the answer is:]DP [a steel spoon in a cafeteria.]UH |
| CQA | [Where can I stand on a river to see water falling without getting wet?]P [the answer is:]DP [bridge.]UH |
| Boolean QA | BoolQ | title: [The Sharks have advanced to the Stanley Cup finals once, losing to the Pittsburgh Penguins in 2016 [...]P question: [Have the San Jose Sharks won a Stanley Cup?]P [answer:]DP [No.]UH |
| Entailment | RTE | [Time Warner is the world's largest media and Internet company.]P question: [Time Warner is the world's largest company.]P [true or false? answer:]DP [true.]UH |
| CB | question: Given that [What fun to hear Artemis laugh. She's such a serious child.]P Is [I didn't know she had a sense of humor.]P true, false, or neither? [the answer is:]DP [true.]UH |
| Text Classification | SST-2 | “[Illuminating if overly talky documentary]P” [The quote] has a tone that is]DP [positive.]UH |
| SST-5 | “[Illuminating if overly talky documentary]P” [The quote] has a tone that is]DP [neutral.]UH |
| AG's News | title: [Economic growth in Japan slows down as the country experiences a drop in domestic and corporate [...]P summary: [Expansion slows in Japan]P [topic:]DP [Sports.]UH |
| TREC | [Who developed the vaccination against polio?]P [The answer to this question will be]DP [a person.]UH |
+
+Table 7: The templates used for each task, along with an example instance (with a single random candidate answer). Original questions (premises) are colored blue, and original answers (hypotheses) are colored red. Long premises are abbreviated with “[...]”. The full premises, conditional hypotheses and domain premises are marked in $[\cdot]_{\mathrm{P}}$ , $[\cdot]_{\mathrm{UH}}$ , and $[\cdot]_{\mathrm{DP}}$ respectively. For a complete description of our templating methodology, please see our code at https://github.com/peterwestuw/surface-form-competition
\ No newline at end of file
diff --git a/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/images.zip b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..1201d0e4f0671c1f41d9f20b1a4648e2322cdf93
--- /dev/null
+++ b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e79e5b0ce42b58f9c9742a7b00bbae1142007bb2711e516c9c3f9d28b88fe383
+size 914556
diff --git a/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/layout.json b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..58a06df3ddb28c0319bf19ceea63c987c4f97013
--- /dev/null
+++ b/surfaceformcompetitionwhythehighestprobabilityanswerisntalwaysright/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ced8882a4767606444b01b84f66b5266114512cbeec2aa118a3c6decd101642c
+size 459036
diff --git a/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/9883e866-c9c7-4a6a-90d1-5d13704d1cc2_content_list.json b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/9883e866-c9c7-4a6a-90d1-5d13704d1cc2_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..c84a936812f34231a5470ed2952d62248d92607a
--- /dev/null
+++ b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/9883e866-c9c7-4a6a-90d1-5d13704d1cc2_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9c15a1dae23e97e2619590b477fd29a7cdc95df6ed6b99cc302009c50b7c0434
+size 83877
diff --git a/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/9883e866-c9c7-4a6a-90d1-5d13704d1cc2_model.json b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/9883e866-c9c7-4a6a-90d1-5d13704d1cc2_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..2cba3d67948e475630304cf60c1a7574e8711049
--- /dev/null
+++ b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/9883e866-c9c7-4a6a-90d1-5d13704d1cc2_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:92cde5a7dd66d4217805539c7e0e578fe46606401cf19484e6427ad68af4fda3
+size 100805
diff --git a/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/9883e866-c9c7-4a6a-90d1-5d13704d1cc2_origin.pdf b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/9883e866-c9c7-4a6a-90d1-5d13704d1cc2_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..4545f2ef3412ffba05e81d78475e036c5c49e6f8
--- /dev/null
+++ b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/9883e866-c9c7-4a6a-90d1-5d13704d1cc2_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b6333a232c3732ad839d89041d955f27eb8b54190318b2328ffdf7b1d83b56fe
+size 833659
diff --git a/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/full.md b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..57cb029639c2cafc2f38bf65c48bece5e1004b11
--- /dev/null
+++ b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/full.md
@@ -0,0 +1,357 @@
+# Synchronous Dual Network with Cross-Type Attention for Joint Entity and Relation Extraction
+
+Hui Wu $^{12}$ and Xiaodong Shi $^{123*}$
+
+$^{1}$ Department of Artificial Intelligence, School of Informatics, Xiamen University, China
+$^{2}$ National Institute for Data Science in Health and Medicine, Xiamen University, China
+3Key Laboratory of Digital Protection and Intelligent Processing of Intangible Cultural Heritage of Fujian and Taiwan (Xiamen University), Ministry of Culture and Tourism, China
+
+huistudent@stu.xmu.edu.cn, mandel@xmu.edu.cn
+
+# Abstract
+
+Joint entity and relation extraction is challenging due to the complex interaction of interaction between named entity recognition and relation extraction. Although most existing works tend to jointly train these two tasks through a shared network, they fail to fully utilize the interdependence between entity types and relation types. In this paper, we design a novel synchronous dual network (SDN) with cross-type attention via separately and interactively considering the entity types and relation types. On the one hand, SDN adopts two isomorphic bi-directional type-attention LSTM to encode the entity type enhanced representations and the relation type enhanced representations, respectively. On the other hand, SDN explicitly models the interdependence between entity types and relation types via cross-type attention mechanism. In addition, we also propose a new multi-task learning strategy via modeling the interaction of two types of information. Experiments on NYT and WebNLG datasets verify the effectiveness of the proposed model, achieving state-of-the-art performance.
+
+# 1 Introduction
+
+Joint entity and relation extraction is a fundamental and important task in information extraction, providing necessary information for knowledge base construction (Mesquita et al., 2019), question answering (Yu et al., 2017), and dialogue systems (Xu et al., 2019), etc. This task can be decomposed into two subtasks: named entity recognition (NER) and relation extraction (RE), aiming respectively to detect text spans with specific types (entities) and semantic relations among those text spans (relations) from unstructured texts.
+
+Early studies employ pipeline models (Zelenko et al., 2002; Zhou et al., 2005; Chan and Roth, 2011), which first extract all entities of the sentence
+
+
+Figure 1: An example of joint entity and relation extraction. The italics with underline represent entities. The red and blue represent entity types and relation types, respectively.
+
+by an entity model, and then these extracted entities are used as the inputs of a relation model to identify semantic relations between entity pairs. However, pipeline models disregard the correlation between NER and RE (Li and Ji, 2014).
+
+In recent years, joint learning models have gained increasing attention. Among them, multitask learning methods (Miwa and Bansal, 2016; Katiyar and Cardie, 2017; Fu et al., 2019; Liu et al., 2020) are popular and they utilize a shared network to learn common features, but making independent predictions for the two tasks. Later, Sun et al. (2020) propose a new multi-task learning method to dynamically learn the interactions between the two tasks. Lin et al. (2020) propose a joint neural framework OneIE to study the interaction of different feature categories by a set of global feature templates. Other methods such as novel tagging (Zheng et al., 2017; Wei et al., 2020; Wang et al., 2020) and generative models (Zeng et al., 2018, 2019; Nayak and Tou Ng, 2020; Ye et al., 2021) adopt a unified model to directly extract relational triplets. Although these methods show effectiveness for joint entity and relation extraction, they only apply a shared network or a unified model to capture the connection between NER and RE without taking into account the interdependence of entity types and relation types.
+
+Intuitively, the relation types of relational triplets are not only relevant to the textual context and entities, but also to entity types (Peng et al., 2020).
+
+Conversely, the entity types of subject and object entities are also constrained by relation types in the triplets. For example, the instance in Figure 1 contains three entities: "Jackie R. Brown" (PER), "Washington" (LOC), and "United States of America" (LOC). The relation type of ("Jackie R. Brown", "Washington") and ("Jackie R. Brown", "United States of America") is Birth_Place, while the relation type of ("Washington", "United States of America") is Capital_of. When the subject entity type is PER and the object entity type is LOC, the relation type between them may be Birth_Place, but never Capital_of. Conversely, when the relation type is Capital_of, the corresponding entity type does not include PER. In addition, although Sun et al. (2019) adopt graph convolutional network to handle the joint type inference problem, they fail to discuss the fine-grained correlation between entity types and relation types.
+
+In this paper, we propose a Synchronous Dual Network (SDN) with cross-type attention to separately and interactively capture the vector representations related to entity types and relation types. First, SDN adopts two isomorphic bi-directional type-attention LSTM to learn two different feature representations, where one is the entity type enhanced representations and the other is the relation type enhanced representations. Then the entity type information and the relation type information are introduced into the relation type enhanced representations and the entity type enhanced representations respectively to explicitly model the interaction between entity types and relation types via cross-type attention mechanism. These type-related representations are concatenated together for NER and RE via a multi-task learning strategy. The above type-attention LSTM is a general structure to select the preferred type distribution. The main idea is to inject all possible entity types simultaneously via multiple type-related cells based on the standard LSTM. In this way, our model obtains the preferred type information via training auxiliary tasks.
+
+To summarize, the main contributions of this work are as follows1:
+
+(1) We design a general type-attention LSTM structure to inject all possible type information, which can capture the preferred type features via training the corresponding auxiliary task.
+(2) We propose a novel synchronous dual net
+
+work with cross-type attention, which adopts crosstype attention mechanism to explicitly model the interdependence between entity types and relation types, to capture the vector representations related to entity types and relation types.
+
+(3) Experiments on two public datasets verify the effectiveness of the multi-task learning strategy via fusing the interaction of two types of information.
+
+# 2 Related Work
+
+Multi-Task Learning Model. Some multi-task learning models like (Miwa and Bansal, 2016; Katiyar and Cardie, 2017) learn the shared features through parameter sharing and then use them for the two subtasks of entity recognition and relation extraction. Based on this, Sun et al. (2018) enhance the interaction between the two subtasks by optimizing a global loss function. Sun et al. (2019) apply graph convolutional network to handle the interaction in type inference. These approaches essentially belong to a pipeline decoder: first extract entities and then identify the relation of the predicted entities. Later, Fu et al. (2019), Sun et al. (2020) and Liu et al. (2020) do joint learning via a shared network and simultaneously make independent predictions. Zeng et al. (2020) propose CopyMTL, a multi-task learning framework to enhance the capability of handling with multi-token entities. However, it is based on the strong assumption that the shared network is sufficient to capture the correlations between the tasks.
+
+Tagging Model. Zheng et al. (2017) firstly convert the joint extraction task to a sequence labeling problem and propose a unified tagging scheme. Later Wei et al. (2020) and Wang et al. (2020) propose different tagging schemes. Yuan et al. (2020) propose a relation-attentive sequence labeling framework. Yu et al. (2020) adopt a novel decomposition strategy, which first recognizes head entities and then extracts corresponding tail entities and relations.
+
+Generative Model. Zeng et al. (2018) firstly propose a sequence-to-sequence model with copy mechanism to generate relational triplets but fail to generate multi-word entities. Subsequently, Zeng et al. (2019), Nayak and Tou Ng (2020) and Sui et al. (2020) adopt different encoder-decoder architectures to generate relational triplets. Ye et al. (2021) propose contrastive triple extraction with a generative transformer.
+
+
+(a) Type-Attention LSTM unit
+(b) Synchronous Dual Network with Cross-Type Attention
+Figure 2: Overall structures. The red in (a) represents the calculation of type-attention mechanism and $TC_{m}$ represents the $m$ -th type-related cell. $ETC_{p}$ and $RTC_{q}$ in (b) represent the $p$ -th entity type cell and $q$ -th relation type cell, respectively. $\oplus$ denotes concatenation operation.
+
+Compared with these works, we propose a new multi-task learning strategy to explicitly model the interdependence between entity types and relation types within one relation to synchronize their information and make them mutually beneficial.
+
+# 3 Type-Attention LSTM
+
+In this section, we will introduce the general framework of Type Attention LSTM (TA-LSTM). As shown in Figure 2 (a), each TA-LSTM unit is composed of a LSTM unit and a type-attention unit. For each token $w_{t}$ , the LSTM unit is used to obtain the contextual representation $\mathbf{h}_t^c$ , while the type-attention unit uses the scaled dot-product attention (Vaswani et al., 2017) to obtain the type representation $\mathbf{h}_t^l$ by integrating $m$ type-related cells for controlling type information flow.
+
+We adopt the standard LSTM (Graves and Schmidhuber, 2005) to encode the contextual representation for each token. At each time step $t(t \in [1, \dots, n])$ , the current hidden state $\mathbf{h}_t^c$ based on a memory cell $\mathbf{c}_t$ is calculated as follows:
+
+$$
+\left[ \begin{array}{c} \mathbf {i} _ {t} \\ \mathbf {o} _ {t} \\ \mathbf {f} _ {t} \\ \widetilde {\mathbf {c}} _ {t} \end{array} \right] = \left[ \begin{array}{c} \sigma \\ \sigma \\ \sigma \\ \tanh \end{array} \right] (\mathbf {W} [ \mathbf {h} _ {t - 1}; \mathbf {x} _ {t} ] + \mathbf {b}) \tag {1}
+$$
+
+$$
+\mathbf {c} _ {t} = \mathbf {i} _ {t} \odot \widetilde {\mathbf {c}} _ {t} + (\mathbf {1} - \mathbf {i} _ {t}) \odot \mathbf {c} _ {t - 1}
+$$
+
+$$
+\mathbf {h} _ {t} ^ {c} = \mathbf {o} _ {t} \odot \tanh (\mathbf {c} _ {t}),
+$$
+
+where $[\mathbf{W};\mathbf{b}]$ are trainable parameters. $\mathbf{x}_t\in \mathbb{R}^{d_w}$ is the word embedding of each token $w_{t}$ . $\sigma$ represents the sigmoid activation function. $\mathbf{i}_t$ , $\mathbf{o}_t$ , and $\mathbf{f}_t$ represent the input gate, output gate, and forget gate, respectively. The hidden state $\mathbf{h}_t^c\in \mathbb{R}^{d_e}$
+
+represents the vector representation with context information.
+
+Type-Attention Mechanism. Given $\mathbf{x}_t$ and $\mathbf{h}_{t - 1}$ , the key-value pair of the $k$ -th $(k \in [1, \dots, m])$ type-related cell is computed as:
+
+$$
+\left[ \begin{array}{l} \mathbf {k} _ {k} ^ {(t)} \\ \mathbf {v} _ {k} ^ {(t)} \end{array} \right] = \left[ \begin{array}{l} \sigma \\ \sigma \end{array} \right] \left(\mathbf {W} _ {k} [ \mathbf {h} _ {t - 1}; \mathbf {x} _ {t} ] + \mathbf {b} _ {k}\right), \tag {2}
+$$
+
+where $[\mathbf{W}_k;\mathbf{b}_k]$ represent the trainable parameters specific to the $k$ -th type-related cell. $\sigma$ represents the sigmoid activation function. $\mathbf{k}_k^{(t)}\in \mathbb{R}^{d_e}$ and $\mathbf{v}_k^{(t)}\in \mathbb{R}^{d_e}$ represent the key and value of the $k$ -th type-related cell, respectively.
+
+The above operations are repeated for $m$ type-related cells. At the time step $t$ , we finally acquire a set of key-value pairs $\mathbf{K}^{(t)} = [\mathbf{k}_1^{(t)}, \ldots, \mathbf{k}_m^{(t)}]$ and $\mathbf{V}^{(t)} = [\mathbf{v}_1^{(t)}, \ldots, \mathbf{v}_m^{(t)}]$ .
+
+We regard the contextual representation $\mathbf{h}_t^c$ as the query. The scaled dot-product attention first computes the dot products of the query with all corresponding keys, divide each by $\sqrt{d_e}$ , and apply a softmax function to obtain the weight $\alpha^{(t)}$ on the values. Then the type representation $\mathbf{h}_t^l$ is computed as a weighted sum of the values:
+
+$$
+\mathbf {h} _ {t} ^ {l} = \text {a t t e n t i o n} \left(\mathbf {h} _ {t} ^ {c}, \mathbf {K} ^ {(t)}, \mathbf {V} ^ {(t)}\right) = \boldsymbol {\alpha} ^ {(t)} \mathbf {V} ^ {(t)}
+$$
+
+$$
+\boldsymbol {\alpha} ^ {(t)} = \operatorname {s o f t m a x} \left(\frac {\mathbf {h} _ {t} ^ {c} \mathbf {K} ^ {(t) ^ {\top}}}{\sqrt {d _ {e}}}\right) \tag {3}
+$$
+
+Finally, the hidden state $\mathbf{h}_t\in \mathbb{R}^{d_e}$ of each TALSTM unit is computed as:
+
+$$
+\mathbf {h} _ {t} = \mathbf {h} _ {t} ^ {c} + \mathbf {h} _ {t} ^ {l} \tag {4}
+$$
+
+# 4 Synchronous Dual Network with Cross-Type Attention
+
+Given a sentence $\mathbf{s} = [w_1, \ldots, w_n]$ of $n$ words, joint entity and relation extraction task aims to identify a collection of relation triplets $\mathcal{T} = \{(\mathbf{e}_i, r, \mathbf{e}_j) | \mathbf{e}_i, \mathbf{e}_j \in \mathcal{E}, r \in \mathcal{R}\}$ , where $\mathbf{e}_i, \mathbf{e}_j$ , and $r$ represent the subject entity, the object entity, and their semantic relation, respectively. Note that the subject and object entities belong to the set of entities $\mathcal{E} = \{\mathbf{e}_i\}_{i=1}^P$ existing in the sentence and the relation is selected from a pre-defined set $\mathcal{R} = \{\mathcal{R}_1, \ldots, \mathcal{R}_M\}$ with $M$ valid relation types.
+
+In this section, we will describe how to build a synchronous dual network on top of the proposed TA-LSTM and how to interact between entity types and relation types via cross-type attention mechanism for joint entity and relation extraction. As shown in Figure 2 (b), synchronous dual network adopts two bi-directional TA-LSTM to encode the vector representations with corresponding type information from the perspective of entity types and relation types by synchronous dual learning, respectively. Then synchronous dual learning adopts the cross-type attention mechanism to model the interaction between entity types and relation types through introducing entity type information into relation type learning or introducing relation type information into entity type learning. Finally, the vector representations with type information are concatenated together for joint learning.
+
+# 4.1 Synchronous Dual Learning
+
+We design entity type learning and relation type learning to obtain the entity type enhanced representation $\mathbf{h}_t^e$ and the relation type enhanced representation $\mathbf{h}_t^r$ , respectively.
+
+Entity Type Learning. To encode the entity type information, we first define $p$ entity type cells (ETCs) according to the number of entity types. Following Jia and Zhang (2020), we regard each entity type as a label, such as PER, LOC, ORG, and so on. Entity type learning mainly aims at extracting entity type knowledge from a set of labeled training data by training entity type cells.
+
+From Equation (1) and (2), we can acquire the contextual representation of $\bar{\mathbf{h}}_t^c = [(\overrightarrow{\mathbf{h}}_t^c +\overleftarrow{\mathbf{h}}_t^c) / 2]$ and a set of key-value pairs $\bar{\mathbf{K}}^{(t)} = [\bar{\mathbf{k}}_1^{(t)},\dots ,\bar{\mathbf{k}}_p^{(t)}]$ and $\bar{\mathbf{V}}^{(t)} = [\bar{\mathbf{v}}_1^{(t)},\dots ,\bar{\mathbf{v}}_p^{(t)}]$ related to entity types, where $\bar{\mathbf{k}}_l^{(t)} = [(\overrightarrow{\bar{\mathbf{k}}} _l^{(t)} + \overleftarrow{\bar{\mathbf{k}}} _l^{(t)}) / 2]$ and $\bar{\mathbf{v}}_l^{(t)} = [(\overrightarrow{\bar{\mathbf{v}}} _l^{(t)} + \overleftarrow{\bar{\mathbf{v}}} _l^{(t)}) / 2], (l\in [1,\dots ,p])$ . The contextual
+
+representation and the type representation related to entity types are computed for the final vector representation $\mathbf{h}_t^e = [\overrightarrow{\mathbf{h}}_t^e\oplus \overleftarrow{\mathbf{h}}_t^e ]$ in Equation (4). Finally the sequence representations associated to entity types are $\mathbf{H}^{(e)} = [\mathbf{h}_1^e,\dots ,\mathbf{h}_n^e ]$
+
+To explicitly highlight entity type knowledge, we design entity type prediction as an auxiliary task in Figure 3 (a). Given a sentence $\mathbf{s}$ and its corresponding entity types $\mathbf{T}_e = [T_1^e,\dots,T_n^e]$ ( $T_{t}^{e}\in \mathrm{[O,PER,LOC,ORG,..]and}t\in [1,\ldots ,n])$ ), we regard entity type prediction as the sequence tagging problem by converting the attention scores to the aligned entity type distribution for $w_{t}$ :
+
+$$
+p \left(T _ {l} ^ {e} \mid w _ {t}\right) = \operatorname {s o f t m a x} \left(\frac {\bar {\mathbf {h}} _ {t} ^ {c} \bar {\mathbf {k}} _ {l} ^ {(t) \top}}{\sqrt {d _ {e}}}\right) \tag {5}
+$$
+
+And the negative log-likelihood loss is used for training on the sentence s:
+
+$$
+\mathcal {L} _ {E T} = - \sum_ {t = 1} ^ {n} \log \left(p \left(T _ {t} ^ {e} \mid w _ {t}\right)\right) \tag {6}
+$$
+
+Relation Type Learning. Similar to entity type learning, $q$ kinds of new relation types are designed to correspond to entity types by considering $M$ valid relation types of the pre-defined set $\mathcal{R}$ and the triplet composition. As shown in Figure 3 (b), these new relation types are composed of relation labels and subject or object labels, namely "R1-S", "R1-O", ..., "RM-S", "RM-O" and "None" ("None" represents the invalid relation type). Obviously, the number of new relation types $q = 2 \times M + 1$ .
+
+These new relation types are mainly used to learn the distribution of the subject or object type affected by valid relation types. Thus, we design relation-related TA-LSTM as the other model of synchronous dual network to extract new relation type knowledge.
+
+At the time step $t$ , we can acquire the contextual representation of $\hat{\mathbf{h}}_t^c = [(\hat{\mathbf{h}}_t^c + \hat{\mathbf{h}}_t^c) / 2]$ and a set of key-value pairs $\hat{\mathbf{K}}^{(t)} = [\hat{\mathbf{k}}_1^{(t)}, \dots, \hat{\mathbf{k}}_q^{(t)}]$ and $\hat{\mathbf{V}}^{(t)} = [\hat{\mathbf{v}}_1^{(t)}, \dots, \hat{\mathbf{v}}_q^{(t)}]$ related to new relation types, where $\hat{\mathbf{k}}_l^{(t)} = [(\hat{\mathbf{k}}_l^{(t)} + \hat{\mathbf{k}}_l^{(t)}) / 2]$ and $\hat{\mathbf{v}}_l^{(t)} = [(\hat{\mathbf{v}}_l^{(t)} + \hat{\mathbf{v}}_l^{(t)}) / 2], (l \in [1, \dots, q])$ in Equation (1-2). Finally, the sequence representations associated to new relation types are $\mathbf{H}^{(r)} = [\mathbf{h}_1^r, \dots, \mathbf{h}_n^r]$ , where the vector representation $\mathbf{h}_t^r = [\hat{\mathbf{h}}_t^r \oplus \hat{\mathbf{h}}_t^r]$ is computed by Equation (4).
+
+Different from entity type prediction, the second auxiliary task relation type prediction is a multi-label classification problem because the same entity
+
+
+(b) relation type prediction
+Figure 3: Entity type prediction & relation type prediction. The whole sentence in (a) and (b) comes from Figure 1. We omit some words for simplicity. Entity type prediction and relation type prediction are regarded as different sequence tagging tasks to learn entity types and relation types, respectively. "R1" and "Rn" represent relation labels; "R1-S" and "R1-O" represent the labels of the subject and object entities in the relation triplet (S, R1, O), respectively.
+
+may exist in multiple relational triplets (namely overlapping triplets). We adopt multiple identical binary classifiers to detect different relation types by assigning each token a binary tag $(0/1)$ that indicates whether the current token corresponds to a new relation type. So the aligned relation type distribution for $w_{t}$ is computed as:
+
+$$
+p \left(T _ {l} ^ {r} \mid w _ {t}\right) = \operatorname {s i g m o i d} \left(\frac {\hat {\mathbf {h}} _ {t} ^ {c} \hat {\mathbf {k}} _ {l} ^ {(t) \top}}{\sqrt {d _ {e}}}\right) \tag {7}
+$$
+
+where $T_{l}^{r}$ belongs to $q$ new relation type labels, such as $\mathbf{R}_1$ -S, $\mathbf{R}_1$ -O and so on.
+
+The binary cross-entropy loss is used for training on the sentence s:
+
+$$
+\begin{array}{l} \mathcal {L} _ {R T} = - \sum_ {t = 1} ^ {n} \sum_ {r = 1} ^ {q} \left\{\log \left(p \left(T _ {t} ^ {r} \mid w _ {t}\right)\right) ^ {\mathbb {I} \left\{\hat {T} _ {t} ^ {r} = 1 \right\}} \right. \tag {8} \\ + \log (1 - p (T _ {t} ^ {r} | w _ {t})) ^ {\mathbb {I} \{\hat {T} _ {t} ^ {r} = 0 \}} \} \\ \end{array}
+$$
+
+where $\hat{T}_t^r$ represents the gold relation type label.
+
+# 4.2 Cross-Type Attention Mechanism
+
+Since entity types and relation types are interdependent in the joint entity and relation extraction task, it is important to synchronize their information and make them mutually beneficial. So we propose a novel cross-type attention mechanism to model the interaction between entity types and relation types.
+
+Given the entity type enhanced representation $\mathbf{h}_t^e$ and a set of key-value pairs $\hat{\mathbf{K}}^{(t)}$ and $\hat{\mathbf{V}}^{(t)}$ related to new relation types, the relation-entity representation $\mathbf{c}_t^e$ is computed by Equation (3) via introducing relation type information into entity type learning.
+
+Similarly, given $\mathbf{h}_t^r$ and the entity type key-value pairs $\tilde{\mathbf{K}}^{(t)}$ and $\tilde{\mathbf{V}}^{(t)}$ , we can obtain the entity-relation representation $\mathbf{c}_t^r$ . Finally, we obtain the new entity type enhanced representation $\tilde{\mathbf{h}}_t^e$ and new relation type enhanced representation $\tilde{\mathbf{h}}_t^r$ to model the interdependency between entity types and relation types by adding $\mathbf{c}_t^e$ and $\mathbf{c}_t^r$ into $\mathbf{h}_t^e$ and $\mathbf{h}_t^r$ , respectively.
+
+# 4.3 Joint Entity and Relation Extraction
+
+We first concatenate the vector representations $\tilde{\mathbf{h}}_t^e$ and $\tilde{\mathbf{h}}_t^r$ to obtain the overall representation $\tilde{\mathbf{h}}_t$ :
+
+$$
+\tilde {\mathbf {h}} _ {t} = \tilde {\mathbf {h}} _ {t} ^ {e} \oplus \tilde {\mathbf {h}} _ {t} ^ {r} \tag {9}
+$$
+
+Then the overall sequence representation $\tilde{\mathbf{H}} = [\tilde{\mathbf{h}}_1, \ldots, \tilde{\mathbf{h}}_n]$ is used for NER and RE.
+
+Named Entity Recognition. NER is a typical sequence labeling task. Here we use the BIESO tagging as the tagging scheme to recognize the entity boundary accurately. Given a sentence $\mathbf{s}$ , the probability distribution $y_{t}$ of a word $w_{t}$ over these five labels is calculated based on the overall representation $\tilde{\mathbf{h}}_t \in \tilde{\mathbf{H}}$ as follows:
+
+$$
+y _ {t} = \operatorname {s o f t m a x} \left(\mathbf {W} _ {e} \tilde {\mathbf {h}} _ {t} + \mathbf {b} _ {e}\right) \tag {10}
+$$
+
+where $[\mathbf{W}_e;\mathbf{b}_e]$ are trainable parameters.
+
+The negative log-likelihood loss is used for training on the sentence s:
+
+$$
+\mathcal {L} _ {E} = - \sum_ {t = 1} ^ {n} \log \left(y _ {t}\right) \tag {11}
+$$
+
+Relation Extraction. Following Sun et al. (2020), we classify all relations between pairs of words in the sentence based on the overall representation $\hat{\mathbf{H}}$ . Similar to relation type prediction, the relation extraction task belongs to a multilabel classification problem. We design multiple identical binary classifiers to detect different relations.
+
+The probability distribution $y_{i,j}^{r^{\prime}}$ of the word pair $(w_{i},w_{j})$ belonging to the relation $r^\prime \in \mathcal{R}$ is computed as follows:
+
+$$
+\mathbf {m} = \phi \left(\mathbf {W} _ {m} \left(\tilde {\mathbf {h}} _ {i} \oplus \tilde {\mathbf {h}} _ {j}\right) + \mathbf {b} _ {m}\right) \tag {12}
+$$
+
+$$
+y _ {i, j} ^ {r ^ {\prime}} = \operatorname {s i g m o i d} \left(\mathbf {W} _ {r ^ {\prime}} \mathbf {m} + \mathbf {b} _ {r ^ {\prime}}\right)
+$$
+
+where $[\mathbf{W}_m;\mathbf{b}_m;\mathbf{W}_{r'};\mathbf{b}_{r'}]$ are trainable parameters. $\phi$ represents the ReLU activation function.
+
+The binary cross-entropy loss is used for training on the sentence s:
+
+$$
+\begin{array}{l} \mathcal {L} _ {R} = - \sum_ {r ^ {\prime} = 1} ^ {M} \sum_ {i, j = 1} ^ {n} \left\{\log \left(y _ {i, j} ^ {r ^ {\prime}}\right) ^ {\mathbb {I} \left\{y _ {i, j} ^ {r ^ {\prime}} = 1 \right\}} \right. \tag {13} \\ + \log (1 - y _ {i, j} ^ {r ^ {\prime}}) ^ {\mathbb {I} \left\{\hat {y} _ {i, j} ^ {r ^ {\prime}} = 0 \right\}} \\ \end{array}
+$$
+
+where $\hat{y}_{i,j}^{r'}$ represents the gold relation label.
+
+# 4.4 Training
+
+Given a training instance $s$ , the training objective of joint entity and relation extraction is as follows:
+
+$$
+\mathcal {L} = \lambda^ {t 1} \mathcal {L} _ {E T} + \lambda^ {t 2} \mathcal {L} _ {R T} + \lambda^ {e} \mathcal {L} _ {E} + \lambda^ {r} \mathcal {L} _ {R} + \frac {\lambda}{2} \| \Theta \| ^ {2} \tag {14}
+$$
+
+where $\lambda^{t1},\lambda^{t2},\lambda^e$ , and $\lambda^r$ represent the different task weights. $\lambda$ is the $L_{2}$ regularization parameters and $\Theta$ represents the parameters set.
+
+# 4.5 Inference
+
+Following Fu et al. (2019), we adopts the average prediction method to infer whether the extracted triplet is right. Concretely, we can obtain the entity set $\mathcal{E}$ by named entity recognition. Then, given the subject entity $\mathbf{e}_i = [w_{\xi_i},\dots ,w_{\zeta_i}]$ and the object entity $\mathbf{e}_j = [w_{\xi_j},\dots ,w_{\zeta_j}]$ , the probability $p_r$ that they belong to the $r$ -th relation type can be calculated as follows:
+
+$$
+p _ {r} = \frac {1}{| \mathbf {e} _ {i} |} \frac {1}{| \mathbf {e} _ {j} |} \sum_ {f = \xi_ {i}} ^ {\zeta_ {i}} \sum_ {s = \xi_ {j}} ^ {\zeta_ {j}} y _ {f, s} ^ {r} \tag {15}
+$$
+
+where $|\mathbf{e}_i|$ and $|\mathbf{e}_j|$ represent the length of $\mathbf{e}_i$ and $\mathbf{e}_j$ , respectively. The triplet $(\mathbf{e}_i, r, \mathbf{e}_j)$ is extracted only if $p_r > \theta$ , where $\theta$ is a free threshold parameter.
+
+| Class | NYT | WebNLG |
| Train | Dev | Test | Train | Dev | Test |
| #ALL | 56195 | 5000 | 5000 | 5019 | 500 | 703 |
| #Entity | | 3 | | | 15 | |
| #Relation | | 24 | | | 246 | |
+
+Table 1: Statistics of datasets. #ALL, #Entity, and #Relation represent the total number of sentences, entity types, and relation types, respectively.
+
+# 5 Experiments
+
+In this section, we empirically verify the effectiveness of our proposed SDN on two public datasets. In addition, we also investigate how different components in the model impact the performance of joint entity and relation extraction with different settings.
+
+# 5.1 Experimental Settings
+
+Datasets. We conduct experiments to evaluate SDN on two public datasets NYT (Riedel et al., 2010) and WebNLG (Gardent et al., 2017). The NYT dataset is produced by the distant supervision method which automatically aligns Freebase with New York Times news articles. It includes 3 entity types (e.g., "PER", "LOC", and "ORG") and 24 valid relation types. The WebNLG dataset is originally created for the natural language generation task. Given a group of triplets, annotators are asked to write a sentence which contains the information of all triplets in this group. We directly use the dataset preprocessed by Zeng et al. (2018), which includes 15 entity types and 246 valid relation types. The statistics of NYT and WebNLG are described in Table 1.
+
+Hyperparameters. We initialize the word embeddings with Glove 300-dimension vectors (Pennington et al., 2014). The dimensions of hidden states for TA-LSTM, entity extraction module, and relation extraction module are set to 100, 200, 400, respectively. During training, we use the Adam optimizer with the initial learning rates of $1e^{-3}$ on NYT and $5e^{-4}$ on WebNLG, a maximum epoch number of 100 and the batch size of 30. To avoid overfitting, we apply Dropout with a rate of 0.3. In $\mathrm{SDN}_{\mathrm{CROSS-TA-LSTM}} + \mathrm{BERT}$ and $\mathrm{SDN}_{\mathrm{TA-LSTM}} + \mathrm{BERT}$ , we use bert-base-cased2 to initialize BERT (Devlin et al., 2018) and the initial learning rates is $1e^{-5}$ for fine-tuning BERT.
+
+| Methods | NYT | WebNLG |
| P | R | F1 | P | R | F1 |
| Multi-task | MRT (Sun et al., 2018) | 65.2 | 40.6 | 50.0 | - | - | - |
| RIN (Sun et al., 2020) | 83.9 | 85.5 | 84.7 | 77.3 | 76.8 | 77.0 |
| CopyMTL-One (Zeng et al., 2020) | 72.7 | 69.2 | 70.9 | 57.8 | 60.1 | 58.9 |
| CopyMTL-Mul (Zeng et al., 2020) | 75.7 | 68.7 | 72.0 | 58.0 | 54.9 | 56.4 |
| Tagging | PA-LSTM-CRF (Dai et al., 2019) | 49.4 | 59.1 | 53.8 | - | - | - |
| RSAN (Yuan et al., 2020) | 85.7 | 83.6 | 84.6 | 80.5 | 83.8 | 82.1 |
| TPLinker(LSTM) (Wang et al., 2020) | 86.0 | 82.0 | 84.0 | 91.9 | 81.6 | 86.4 |
| TPLinker(BERT)† (Wang et al., 2020) | 91.4 | 92.6 | 92.0 | 88.9 | 84.5 | 86.7 |
| Generative | OneDecoder (Zeng et al., 2018) | 59.4 | 53.1 | 56.0 | 32.2 | 28.9 | 30.5 |
| MultiDecoder (Zeng et al., 2018) | 61.0 | 56.6 | 58.7 | 37.7 | 36.4 | 37.1 |
| PNDec (Nayak and Tou Ng, 2020) | 89.3 | 78.8 | 83.8 | - | - | - |
| CGT(BERT)† (Ye et al., 2021) | 94.7 | 84.2 | 89.1 | 92.9 | 75.6 | 83.4 |
| Ours | SDNLSTM | 86.5 | 81.7 | 84.1 | 85.1 | 82.5 | 83.7 |
| SDNTA-LSTM | 89.8 | 84.0 | 86.8 | 88.2 | 85.9 | 87.0 |
| SDNCROSS-TA-LSTM | 90.1 | 86.2 | 88.1 | 90.8 | 88.8 | 89.8 |
| SDNTA-LSTM + BERT† | 93.7 | 89.1 | 91.3 | 91.8 | 88.8 | 90.3 |
| SDNCROSS-TA-LSTM + BERT† | 94.2 | 91.5 | 92.8 | 92.7 | 89.6 | 91.1 |
+
+Table 2: Results of different methods on NYT and WebNLG datasets. The reported results for the above baselines are directly copied from the original published literature. $\dagger$ indicates the method leveraging the pre-trained language model BERT. The bold represents the best results. The underlined represents the best results without BERT.
+
+All experiments are conducted with an NVIDIA GeForce RTX 2080 Ti.
+
+Baselines and Evaluation Metrics. We compare our method against three groups of state-of-the-art methods of joint learning:
+
+i) Multi-task baselines. MRT (Sun et al., 2018) applies a minimum risk training method to highlight connections between an entity model and a relation model. RIN (Sun et al., 2020) uses a recurrent interaction network to dynamically learn. SMHSA (Liu et al., 2020) uses an attention-based joint model to identify the overlapping triplets. CopyMTL-One and CopyMTL-Mul (Zeng et al., 2020) utilize a multi-task framework to extract multi-token entities.
+ii) Tagging baselines. PA-LSTM-CRF (Dai et al., 2019) uses a position-attention mechanism to model $n$ tag sequences. RSAN (Yuan et al., 2020) utilizes a relation-attentive sequence labeling framework. TPLinker (Wang et al., 2020) designs a handshaking tagging scheme for joint entity and relation extraction.
+iii) Generative baselines. OneDecoder and MultiDecoder (Zeng et al., 2018) utilize a Seq2Seq model to generate relational triplets. PNDec (Nayak and Tou Ng, 2020) uses pointer networks with an encoder-decoder model. CGT (Ye et al., 2021) adopts a framework of contrastive triple extraction with a generative transformer.
+
+We adopt Precision(P), Recall(R), and standard Micro-F1 $(\mathrm{F}_1)$ to evaluate the performance. A predicted triplet is regarded as correct only if the relation type and the two corresponding entities are all the same as the golden standard annotation3. We report the corresponding results of the test set when the development set achieves the best results.
+
+# 5.2 Main Results
+
+As shown in Table 2, $\mathrm{SDN}_{\mathrm{CROSS-TA-LSTM}}$ is significantly superior to these multi-task baselines (over at least $6.2\%$ P, $0.7\%$ R, $3.4\%$ F $_1$ on NYT and $13.5\%$ P, $12.0\%$ R, $12.8\%$ F $_1$ on WebNLG). It shows that explicitly modeling the interdependence of entity types and relation types related to entities in the NER and RE tasks can obtain more useful representations for joint entity and relation extraction.
+
+Without considering the pre-training language model BERT, $\mathrm{SDN}_{\mathrm{CROSS-TA-LSTM}}$ achieves better performances than other tagging baselines and generative baselines (over at least $0.8\%$ P, $2.6\%$ R, $3.5\%$ F1 on NYT and $5.0\%$ R, $3.4\%$ F1 on WebNLG). This indicates that our model can predict as many accurate triples as possible while ensuring a higher precision.
+
+Recently, pre-trained language models such as
+
+| Methods | NER | RE |
| F1 | Δ F1 | F1 | Δ F1 |
| Ours | 94.6 | - | 92.8 | - |
| -LET | 93.1 | -1.5 | 91.4 | -1.4 |
| -LRT | 93.7 | -0.9 | 91.8 | -1.0 |
| -LET-LRT | 91.2 | -3.4 | 88.2 | -4.6 |
+
+Table 3: Ablation experiments on the NYT dataset.
+
+BERT (Devlin et al., 2018) achieve state-of-the-art results on joint entity and relation extraction. To make a fair and direct comparison with our method, we leverage the output of BERT as contextualized word embeddings. $\mathrm{SDN}_{\mathrm{CROSS-TA-LSTM}} + \mathrm{BERT}$ achieves better results than TPLinker(BERT) (over $2.8\%$ P, $0.8\%$ F $_1$ on NYT and $3.8\%$ P, $5.1\%$ R, $4.4\%$ F $_1$ on WebNLG). $\mathrm{SDN}_{\mathrm{CROSS-TA-LSTM}} + \mathrm{BERT}$ outperforms CGT(BERT) over $7.3\%$ R, $3.7\%$ F $_1$ on NYT and over $14.0\%$ R, $7.7\%$ F $_1$ on WebNLG, and $\mathrm{SDN}_{\mathrm{CROSS-TA-LSTM}} + \mathrm{BERT}$ is comparable to CGT(BERT) in Precision ( $94.2\%$ P v.s. $94.7\%$ P on NYT and $92.7\%$ P v.s. $92.9\%$ P on WebNLG).
+
+Generally speaking, generative triple extraction requires a huge amount of manual annotation or further constraint to improve the precision. But our model focuses on how to extract more relation triples, which indicates the importance of the entity type and relation type information for joint entity and relation extraction. In fact, injecting the effective entity and relation type information via the interaction of entity types and relation types is promising for joint entity and relation extraction.
+
+To more explicitly illustrate the effectiveness of our method, we make comparisons with some deformed models: (i) $\mathrm{SDN_{LSTM}}$ , which only uses bi-directional LSTM as encoders without any type knowledge and the cross-type interaction; (ii) $\mathrm{SDN_{TA - LSTM}}$ , which uses two bidirectional TA-LSTM to encode different type information and only introduce the knowledge of entity and relation type without considering cross-type interaction; (iii) $\mathrm{SDN_{CROSS-TA-LSTM}}$ , which not only introduces the type knowledge but also models the interaction between entity and relation types; (iv) $\mathrm{SDN_{TA-LSTM}} + \mathrm{BERT}$ , which adds BERT to (ii) $\mathrm{SDN_{TA-LSTM}}$ ; (v) $\mathrm{SDN_{CROSS-TA-LSTM}} + \mathrm{BERT}$ , which adds BERT to (iii) $\mathrm{SDN_{CROSS-TA-LSTM}}$ . $\mathrm{SDN_{TA-LSTM}}$ achieves better results of $2.7\%$ F1 on NYT and $3.3\%$ F1 on WebNLG compared with $\mathrm{SDN_{LSTM}}$ , indicat
+
+
+Figure 4: Analysis of the inference threshold $\theta$
+
+ing the effectiveness of TA-LSTM for capturing more type informations. $\mathrm{SDN}_{\mathrm{CROSS-TA-LSTM}}$ outperforms $\mathrm{SDN}_{\mathrm{TA-LSTM}}$ over $1.3\%$ $\mathrm{F_1}$ on NYT and over $2.8\%$ $\mathrm{F_1}$ on WebNLG, which shows that explicitly modeling the interaction between entity and relation types within one relation can further improve performance. In addition, $\mathrm{SDN}_{\mathrm{CROSS-TA-LSTM}} + \mathrm{BERT}$ and is significantly superior to $\mathrm{SDN}_{\mathrm{TA-LSTM}} + \mathrm{BERT}$ (over $1.5\%$ $\mathrm{F_1}$ on NYT and $0.8\%$ $\mathrm{F_1}$ on WebNLG), indicating the effectiveness of cross-type attention mechanism.
+
+# 5.3 Ablation Experiments
+
+We conduct ablation experiments of auxiliary tasks on NYT. The results are listed in Table 3.
+
+When we only ablate $\mathcal{L}_{ET}$ , the results on the two subtasks suffer significant declines $(-1.5\% \mathrm{F}_1$ on NER and $-1.4\% \mathrm{F}_1$ on RE, respectively). When we only ablate $\mathcal{L}_{RT}$ , the results on NER and RE also suffer significant declines (over $-0.9\% \mathrm{F}_1$ on both subtasks). When we both ablate $\mathcal{L}_{ET}$ and $\mathcal{L}_{RT}$ , our model achieves similar results $(-3.4\% \mathrm{F}_1$ on NER and $-4.6\% \mathrm{F}_1$ on RE, respectively). On the one hand, it demonstrates that two auxiliary tasks of entity type prediction and relation type prediction can highlight useful type information as well as decrease the noise. On the other hand, it indicates that our model depends heavily on both auxiliary tasks to capture the right type of knowledge.
+
+# 5.4 Analysis of Inference Threshold
+
+We conduct analysis experiments to explore the value of threshold $\theta$ of the inference methods. Figure 4 illustrates how performance varies on different inference threshold $\theta$ of the NYT and WebNLG datasets. It can be seen that the threshold inference method effectively adjusts the performance
+
+| Sentence | Golden Result | Result |
| “This is rare, and it's messy,” said Gary Chaison, professor of industrial relations at Clark University in Worcester, Mass.. | (Gary Chaison, /business/person/company, Clark University) (Gary Chaison, /people/person/place_lived, Worcester) (Worcester, /location/location/contains, Clark University) | RIN: (Gary Chaison, /business/person/company, Clark University) (Worcester, /location/location/contains, Clark University) SDNTA-LSTM: (Gary Chaison, /business/person/company, Clark University) (Gary Chaison, /people/person/place_lived, Worcester) (Worcester, /location/location/contains, Clark University) |
| An article yesterday about the Darfur crisis in Sudan misstated a Security Council response to a report to the Council by a United Nations envoy, Ahmedou Ould -Abdallah. | (Darfur, /location/administrative_division/country, Sudan) (Sudan, /location/country/administrative_divisions, Darfur) (Sudan, /location/location/contains, Darfur) | RIN: (Darfur, /location/administrative_division/country, Sudan) (Sudan, /location/administrative_division/country, Darfur) X (Sudan, /location/location/contains, Darfur) SDNTA-LSTM: (Darfur, /location/administrative_division/country, Sudan) (Sudan, /location/country/administrative_divisions, Darfur) (Sudan, /location/location/contains, Darfur) |
+
+Table 4: Examples from the NYT test set. Red, blue, and green represent entities whose types are PER, LOC, and ORG, respectively. $\times$ denotes incorrect relational triplets.
+
+of SDN with different choices of $\theta$ . With the increase of $\theta$ from 0.1 to 0.6, the $\mathrm{F}_1$ scores on NYT and WebNLG show a consistent trend of first increasing and then decreasing. When the $\theta$ values of NYT and WebNLG are set to 0.4 and 0.3 respectively, the average inference method achieves the best performance on both datasets. Through detailed analysis of NYT and WebNLG, we find that this gap is due to the difference of the entity length. More precisely, the average entity length and max entity length on the NYT test set are 1.4 and 8, respectively. While the average entity length and max entity length on the WebNLG test set are 2.2 and 15, respectively. Longer entities are harder to identify entities and relations in the NER and RE tasks.
+
+# 5.5 Case Study
+
+As shown in Table 4, we present two examples from the NYT test set as illustrations. The relation type of “(Gary Chaison (PER), Worcester (LOC))” is “/people/person/place_lived”. RIN only identifies “(Gary Chaison, /business/person/company, Clark University)” and “(Worcester, /location/location/contains, Clark University)”, but fails to identify “(Gary Chaison, /people/person/place_lived, Worcester)”. In addition, RIN does not recognize “(Sudan, /location/country/administrative_divisions, Darfur)” correctly. Because RIN dynamically learns the interaction of the two subtasks without considering any type of information, and some details may be lost to some extent. In contrast, our method correctly extracts all relation triplets, which shows that explicitly modeling the interaction between entity types and relation types can synchronize their in-
+
+formation and make them mutually beneficial for joint entity and relation extraction.
+
+# 6 Conclusion
+
+In this paper, we propose a Synchronous Dual Network (SDN) with cross-type attention for joint entity and relation extraction. Firstly, we use two isomorphic bi-directional type-attention LSTM as encoders to learn the entity type enhanced representations and the relation type enhanced representations from two different perspectives. Then the entity type information (or the relation type information) is introduced into the relation type enhanced representations (or the entity type enhanced representations) to explicitly model the interaction between entity types and relation types via cros-type attention mechanism. In addition, the proposed type-attention LSTM is a general structure to obtain the preferred type distribution. Experiments on two public datasets verify the effectiveness of the proposed model, achieving state-of-the-art performance.
+
+# Acknowledgements
+
+We thank the anonymous reviewers for their helpful comments and suggestions. This work is supported the Major Scientific Research Project of the State Language Commission in the 13th Five-Year Plan (Grant nos. WT135-38), the Key Support Project of NSFC-Liaoning Joint Foundation(Grant no. U1908216), and the Project of Technological Innovation 2030 "New Generation Artificial Intelligence" (Grant no. 2020AAA0107904).
+
+# References
+
+Yee Seng Chan and Dan Roth. 2011. Exploiting syntactico-semantic structures for relation extraction. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 551-560.
+Dai Dai, Xinyan Xiao, Yajuan Lyu, Shan Dou, Qiao-qiao She, and Wang Haifeng. 2019. Joint extraction of entities and overlapping relations using position-attentive sequence labeling. In Proceedings of the 33th AAAI Conference on Artificial Intelligence, pages 6300-6308.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
+Tsu-Jui Fu, Peng-Hsuan Li, and Wei-Yun Ma. 2019. GraphRel: Modeling text as relational graphs for joint entity and relation extraction. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1409-1418.
+Claire Gardent, Anastasia Shimorina, Shashi Narayan, and Laura Perez-Beltrachini. 2017. Creating training corpora for NLG micro-planners. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 179-188.
+Alex Graves and Jürgen Schmidhuber. 2005. Framewise phoneme classification with bidirectional LSTM and other neural network architectures. Neural networks, 18(5-6):602-610.
+Chen Jia and Yue Zhang. 2020. Multi-cell compositional LSTM for NER domain adaptation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5906-5917.
+Arzoo Katiyar and Claire Cardie. 2017. Going out on a limb: Joint extraction of entity mentions and relations without dependency trees. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 917-928.
+Qi Li and Heng Ji. 2014. Incremental joint extraction of entity mentions and relations. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 402-412.
+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.
+Jie Liu, Shaowei Chen, Bingquan Wang, Jiaxin Zhang, Na Li, and Tong Xu. 2020. Attention as relation:
+
+Learning supervised multi-head self-attention for relation extraction. In Proceedings of the 29th International Joint Conference on Artificial Intelligence, pages 3787-3793.
+Filipe Mesquita, Matteo Cannaviccio, Jordan Schmidek, Paramita Mirza, and Denilson Barbosa. 2019. KnowledgeNet: A benchmark dataset for knowledge base population. 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 749-758.
+Makoto Miwa and Mohit Bansal. 2016. End-to-end relation extraction using LSTMs on sequences and tree structures. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1105-1116.
+Tapas Nayak and Hwee Tou Ng. 2020. Effective modeling of encoder-decoder architecture for joint entity and relation extraction. In Proceedings of the 34th AAAI Conference on Artificial Intelligence.
+Hao Peng, Tianyu Gao, Xu Han, Yankai Lin, Peng Li, Zhiyuan Liu, Maosong Sun, and Jie Zhou. 2020. Learning from context or names? an empirical study on neural relation extraction. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, pages 3661-3672.
+Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, pages 1532-1543.
+Sebastian Riedel, Limin Yao, and Andrew McCallum. 2010. Modeling relations and their mentions without labeled text. In ECML PKDD, pages 148-163.
+Dianbo Sui, Yubo Chen, Kang Liu, Jun Zhao, Xiangrong Zeng, and Shengping Liu. 2020. Joint entity and relation extraction with set prediction networks.
+Changzhi Sun, Yeyun Gong, Yuanbin Wu, Ming Gong, Daxin Jiang, Man Lan, Shiliang Sun, and Nan Duan. 2019. Joint type inference on entities and relations via graph convolutional networks. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1361-1370.
+Changzhi Sun, Yuanbin Wu, Man Lan, Shiliang Sun, Wenting Wang, Kuang-Chih Lee, and Kewen Wu. 2018. Extracting entities and relations with joint minimum risk training. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2256-2265.
+Kai Sun, Richong Zhang, Samuel Mensah, Yongyi Mao, and Xudong Liu. 2020. Recurrent interaction network for jointly extracting entities and classifying relation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, pages 3722-3732.
+
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008.
+Yucheng Wang, Bowen Yu, Yueyang Zhang, Tingwen Liu, Hongsong Zhu, and Limin Sun. 2020. Tplinker: Single-stage joint extraction of entities and relations through token pair linking. In Proceedings of the 28th International Conference on Computational Linguistics, pages 1572-1582.
+Zhepei Wei, Jianlin Su, Yue Wang, Yuan Tian, and Yi Chang. 2020. A novel cascade binary tagging framework for relational triple extraction. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1476-1488.
+Lin Xu, Qixian Zhou, Ke Gong, Xiaodan Liang, Jianheng Tang, and Liang Lin. 2019. End-to-end knowledge-routed relational dialogue system for automatic diagnosis. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 7346-7353.
+Hongbin Ye, Ningyu Zhang, Shumin Deng, Mosha Chen, Chuanqi Tan, Fei Huang, and Huajun Chen. 2021. Contrastive triple extraction with generative transformer. In Proceedings of the 35th AAAI Conference on Artificial Intelligence.
+Bowen Yu, Zhenyu Zhang, Xiaobo Shu, Yubin Wang, Tingwen Liu, Bin Wang, and Sujian Li. 2020. Joint extraction of entities and relations based on a novel decomposition strategy. In Proc. of ECAI.
+Mo Yu, Wenpeng Yin, Kazi Saidul Hasan, Cicero dos Santos, Bing Xiang, and Bowen Zhou. 2017. Improved neural relation detection for knowledge base question answering. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 571-581.
+Yue Yuan, Xiaofei Zhou, Shirui Pan, Qiannan Zhu, Zeliang Song, and Li Guo. 2020. A relation-specific attention network for joint entity and relation extraction. In Proceedings of the 29th International Joint Conference on Artificial Intelligence, pages 4054-4060.
+Dmitry Zelenko, Chinatsu Aone, and Richardella Anthony. 2002. Kernel methods for relation extraction. In Proceedings of the 2002 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 71-78.
+Daojian Zeng, Haoran Zhang, and Qianying Liu. 2020. Copymtl: Copy mechanism for joint extraction of entities and relations with multi-task learning. In Proceedings of the 34th AAAI Conference on Artificial Intelligence.
+
+Xiangrong Zeng, Shizhu He, Daojian Zeng, Kang Liu, Shengping Liu, and Jun Zhao. 2019. Learning the extraction order of multiple relational facts in a sentence with reinforcement learning. 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 367-377.
+Xiangrong Zeng, Daojian Zeng, Shizhu He, Kang Liu, and Jun Zhao. 2018. Extracting relational facts by an end-to-end neural model with copy mechanism. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 506-514.
+Suncong Zheng, Feng Wang, Hongyun Bao, Yuexing Hao, Peng Zhou, and Bo Xu. 2017. Joint extraction of entities and relations based on a novel tagging scheme. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1227-1236.
+GuoDong Zhou, Jian Su, Jie Zhang, and Min Zhang. 2005. Exploring various knowledge in relation extraction. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics (ACL'05), pages 427-434, Philadelphia. Association for Computational Linguistics.
\ No newline at end of file
diff --git a/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/images.zip b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..0a41c69a43d8aef1ac20b3a3b412e5b013b562a4
--- /dev/null
+++ b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5e695e7c7884dbff0cf675acc3982d81877d99797bf1c08b5e696591992295f2
+size 501373
diff --git a/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/layout.json b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..e08985b1adf9b890f6df36d10f25d84c9bb1abbf
--- /dev/null
+++ b/synchronousdualnetworkwithcrosstypeattentionforjointentityandrelationextraction/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b3b1fc28dfbf5b2780ece301e8ade2f2054dc564bb84808e8b61785b0f762ff5
+size 491576
diff --git a/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/217c95d9-194d-419f-a5b9-fae8f40ec241_content_list.json b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/217c95d9-194d-419f-a5b9-fae8f40ec241_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..c77cf4e804f6b9f320669088c8417c4a2bb682bb
--- /dev/null
+++ b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/217c95d9-194d-419f-a5b9-fae8f40ec241_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:837c3c1beab71881510d265cfc5b562f60487c9d54f36e14682a65e78eded00d
+size 81339
diff --git a/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/217c95d9-194d-419f-a5b9-fae8f40ec241_model.json b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/217c95d9-194d-419f-a5b9-fae8f40ec241_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..69d8116d2f8415debbe231840489efe4a0edc95e
--- /dev/null
+++ b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/217c95d9-194d-419f-a5b9-fae8f40ec241_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4af56b0ca114bdea18d3a0ab7edd509cd54ac6785fa465a4d669172a97b379b6
+size 98112
diff --git a/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/217c95d9-194d-419f-a5b9-fae8f40ec241_origin.pdf b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/217c95d9-194d-419f-a5b9-fae8f40ec241_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..bc160ceb533cfa64e9b147d1fc7546d8fc75add5
--- /dev/null
+++ b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/217c95d9-194d-419f-a5b9-fae8f40ec241_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9ee7196725c953acd6008baea252c3a2f476a8cc11eccf28ef5ea0d5b6baeec1
+size 512889
diff --git a/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/full.md b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..63226dee780e2eb577924f51f27bbdb07860f11a
--- /dev/null
+++ b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/full.md
@@ -0,0 +1,354 @@
+# Syntactically-Informed Unsupervised Paraphrasing with Non-Parallel Data
+
+Erguang Yang $^{1*}$ , Mingtong Liu $^{1}$ , Deyi Xiong $^{2*}$ , Yujie Zhang $^{1}$ , Yao Meng $^{3}$ , Changjian Hu $^{3}$ , Jinan Xu $^{1}$ , Yufeng Chen $^{1}$
+
+$^{1}$ School of Computer and Information Technology, Beijing Jiaotong University, Beijing, China
+
+$^{2}$ College of Intelligence and Computing, Tianjin University, Tianjin, China
+
+$^{3}$ Lenovo Research AI Lab, Beijing, China
+
+{egyang,mingtongliu,yjzhang,jaxu,chenyf}@bjtu.edu.cn,
+
+dyxiong@tju.edu.cn,{yaomeng1,hucj1}@lenovo.com
+
+# Abstract
+
+Previous works on syntactically controlled paraphrase generation heavily rely on large-scale parallel paraphrase data that are not easily available for many languages and domains. In this paper, we take this research direction to the extreme and investigate whether it is possible to learn syntactically controlled paraphrase generation with non-parallel data. We propose a syntactically-informed unsupervised paraphrasing model based on conditional variational auto-encoder (VAE) which can generate texts in a specified syntactic structure. Particularly, we design a two-stage learning method to effectively train the model using non-parallel data. The conditional VAE is trained to reconstruct the input sentence according to the given input and its syntactic structure. Furthermore, to improve the syntactic controllability and semantic consistency of the pre-trained conditional VAE, we fine-tune it using syntax controlling and cycle reconstruction learning objectives, and employ Gumbel-Softmax to combine these new learning objectives. Experiment results demonstrate that the proposed model trained only on non-parallel data is capable of generating diverse paraphrases with specified structures. Additionally, we further validate the effectiveness of our method for generating syntactically adversarial examples on a sentiment analysis task. Source codes are available at https://github.com/lanse-sir/sup.
+
+# 1 Introduction
+
+Paraphrases are texts or passages conveying the same meaning but with different surface realization. Paraphrase generation (PG) is a key technology of automatically generating a restatement for a given text, which has the potential use in many downstream tasks, such as question answering (Dong et al., 2017), machine translation (Zhou et al., 2019) and text summarization (Zhao et al., 2018).
+
+Recent years have witnessed that learning controllable paraphrase generation (CPG) with specified styles is attracting intense research interests, e.g., satisfying particular syntactic templates (Iyyer et al., 2018) or exemplars (Chen et al., 2019; Kumar et al., 2020). As CPG can produce diverse paraphrases by exposing syntactic control, it can be also employed for adversarial example generation (Iyyer et al., 2018).
+
+Existing syntactically controlled paraphrase networks (Iyyer et al., 2018) rely on large paraphrase parallel data for training. Unfortunately, paraphrase parallel corpora are not easily available for many languages, and are expensive to build. Conversely, non-parallel data is much easier to find, and many languages with limited parallel data still possess a huge amount of non-parallel data.
+
+In this paper, we propose a Syntactically-informed Unsupervised Paraphrasing (SUP) framework based on conditional variational auto-encoder (VAE) to generate syntactic paraphrases with specified syntactic skeletons, which does not require any parallel paraphrase data. The basic assumption behind SUP is that, given a sentence, there may exist many valid paraphrases with different syntactic structures. Specifically, as shown in Figure 1, SUP runs in two stages. At stage 1, we train a conditional VAE to reconstruct a given input sentence according to the sentence itself and its syntactic parse tree. The model trained at this stage is endowed with basic ability to generate texts of desired syntax structures (similar to a warmup procedure). At stage 2, to improve the syntactic controllability and semantic consistency of generated sentences, we fine-tune the model trained at stage 1 using carefully-designed objective functions involving syntax controlling and cycle reconstruction. After the conditional VAE model is fine-tuned, given an input sentence and a different syntactic structure, the model can generate a paraphrase according to the given structure.
+
+We evaluate SUP on both syntactic paraphrase generation and adversarial example generation tasks. Experiments show that SUP outperforms previous unsupervised paraphrasing method SIVAE (Zhang et al., 2019). It is also capable of generating syntactically adversarial examples that have a significant impact on the performance of attacked neural models. We further show that augmenting training data with such examples can improve the robustness of target neural models.
+
+In summary, the major contributions of this paper are as follows:
+
+- We propose a syntactically-informed unsupervised paraphrasing model based on conditional VAE framework and use it to generate syntactically adversarial examples.
+- To enable the model to generate syntactically-controlled paraphrases, we propose a novel tree encoder to effectively model structure information and a syntax controlling learning objective to further improve syntactic controllability. Meanwhile, we also introduce a cycle reconstruction learning objective to preserve the semantics of the input sentence.
+- Experiments show that our model can successfully generate syntactically adversarial examples. By augmenting training data with such examples, we can improve the robustness of target neural models.
+
+# 2 Related Work
+
+Paraphrase Generation The task of paraphrase generation has recently received significant attention (Li et al., 2018, 2019; Liu et al., 2020a). Previous works mainly explore supervised paraphrasing methods, which require large corpora of parallel sentences for training. Due to the lack of parallel data, unsupervised paraphrasing has become an emerging research direction (Miao et al., 2018; Liu et al., 2020c). However, these methods mainly rely on lexical changes to generate paraphrases. Compared to these approaches, our work focus primarily on the syntactically controlled paraphrase generation, which is able to generate a paraphrase according to a given syntactic structure.
+
+Controlled Text Generation Recent works on controlled generation aim at controlling attributes such as sentiment (Hu et al., 2017; John et al., 2019; Dai et al., 2019). These works use a categorical
+
+feature as a controlling signal. Different from them, we use a more complicated, non-categorical syntactic structure as a controlling signal. To ensure syntactic controllability, we design a tree encoder and syntax controlling loss to encourage the model to generate sentences that conform to given syntax.
+
+We have also witnessed other works that attempt to control structural aspects of the generation, such as studies using a given syntactic form (Iyyer et al., 2018; Chen et al., 2019; Liu et al., 2020b). Our work is closely related to this category, and to the syntactically-controlled paraphrase networks (SCPN) proposed by Iyyer et al.(2018) in particular. They use the attentional seq2seq framework to build a parse generator and a paraphrase generator. A two-stage generation process is used. In the first stage, they generate full parse trees from syntactic templates, and then produce final generations in the second stage. Both parse and paraphrase generator require parallel data for training. Significantly different from their method, our model based on conditional VAE is an unsupervised method that does not require any parallel data for training.
+
+Conditional Variational Autoencoder Our work is also related to syntax-infused text generation (Bao et al., 2019; Zhang et al., 2019). Their models use two variational autoencoders to introduce two latent variables which are designed to capture semantic and syntactic information. The variational autoencoder (VAE) network is proposed by Kingma and Welling (2014) for image generation. Bowman et al. (2016) successfully apply VAE in fluent sentence generation from a latent space. The conditional VAE is a modification of VAE to generate diverse images conditioned on certain attributes, e.g. generating different human faces given skin color (Sohn et al., 2015; Yan et al., 2016). Inspired by conditional VAE, we view the syntactic structure as the conditional attribute and adopt conditional VAE to generate syntactic paraphrases. Furthermore, to improve the syntactic controllability and semantic consistency of generated sentences, we use syntax controlling and cycle reconstruction objective functions to fine-tune the model.
+
+Adversarial Example Generation To generate adversarial examples for NLP models, most previous works rely on injecting noise either at the character level (Ebrahimi et al., 2018; Gao et al., 2018) or at the word level by adding and deleting
+
+
+Stage 1: Train a Conditional VAE by Auto-encoding
+
+
+Stage 2: Fine-tune the pretrained Conditional VAE
+Figure 1: Architecture of the proposed syntactically-informed unsupervised paraphrasing model. **Stage 1:** Training a Conditional VAE model by reconstructing the input sentence given the sentence itself and its syntax structure. Here we simply take $\boldsymbol{x} = \{x_1, x_2\}$ as an example. **Stage 2:** Fine-tuning the model using novel objective functions. $\boldsymbol{x}, \boldsymbol{s}, \boldsymbol{s}'$ (different from $\boldsymbol{s}$ ), and $\boldsymbol{y}$ denote the input sentence, its syntactic structure, other syntactic structure, and output sentence, respectively. $\mathcal{L}_*$ denote the loss terms.
+
+
+
+
+Figure 2: The upper part shows a constituency parse tree. The lower part visualizes the tree encoder that uses top-down (green line) and left-to-right (blue line) directions to encode a syntactic template (top three level).
+
+words (Liang et al., 2017; Garg and Ramakrishnan, 2020). In this paper, we generate syntactically adversarial examples, which still remains an open challenge, as semantic meaning of these examples should be preserved despite of their substantial structural changes.
+
+# 3 Approach
+
+We use the constituency parse tree to provide syntactic information. Given a set of training instances $D = \{(\pmb{x}_i, \pmb{s}_i)\}_{i=1}^{|D|}$ , where $\pmb{s}_i$ is the syntactic parse tree of the sentence $\pmb{x}_i$ , we aim to train a syntactic paraphrasing model which can produce more
+
+diverse paraphrases given arbitrary syntax.
+
+However, using a full parse tree (the whole tree without leaf nodes) is too specific and poses the challenge of selecting such a tree for a given input as syntactic structures of two different sentences are not easily compatible to each other. Therefore, we mainly use a general template (the top 3 layers of a parse tree), as shown in Figure 2, as the controlling signal which is beneficial to generate meaningful paraphrases.
+
+Specifically, we employ the conditional variational autoencoder (VAE) framework which have proven to be able to generate diverse texts conditioned on certain attributes. In this work, we view syntax as the conditional attribute. The training process consists of two stages. In the first stage, we train the model in an auto-encoding manner, while in the second stage, we use new objective functions to fine-tune it, as shown in Figure 1. The two stages will be described in detail below.
+
+# 3.1 Stage 1: Training a Conditional VAE
+
+At this stage, we pre-train the conditional VAE model. The model is required to reconstruct the input sentence given the sentence itself and its syntactic template. In doing so, the model acquires the preliminary ability to generate a desired sentence conditioning on given syntactic template, which makes the training in the subsequent stage easier.
+
+Sentence Encoding Given a sentence $\pmb{x}$ , we first obtain the sentence hidden-state $\pmb{h}_{x} = [\overrightarrow{\pmb{h}}_{|\pmb{x}|};\overleftarrow{\pmb{h}_{1}}]$ by the sentence encoder. For the semantic variable $z_{x}$ , we compute the mean and variance of $q(z_{x}|\pmb{x})$
+
+from $h_x$ as:
+
+$$
+\boldsymbol {\mu} _ {x} = \boldsymbol {W} _ {x} ^ {\mu} \boldsymbol {h} _ {x} + \boldsymbol {b} _ {x} ^ {\mu}
+$$
+
+$$
+\log \sigma_ {x} ^ {2} = W _ {x} ^ {\sigma} h _ {x} + b _ {x} ^ {\sigma} \tag {1}
+$$
+
+where $W_{x}^{\mu}, b_{x}^{\mu}, W_{x}^{\sigma}, b_{x}^{\sigma}$ are trainable parameters.
+
+Syntax Encoding This encoder provides the necessary syntactic guidance for the generation of paraphrases. Formally, let syntactic template $s = \{\mathcal{V},\mathcal{E}\}$ , where $\mathcal{V}$ is the set of nodes, $\mathcal{E}$ the set of edges.
+
+As shown in Figure 2, we traverse the given syntactic template in a top-down (green line) and left-to-right (blue line) manner to obtain and model parent-child and sibling relationships, respectively. For the top-down (TD) direction, we encode each node in a depth-first manner. Specifically, the representation $h_v$ of each node $v \in \mathcal{V}$ with the hidden-state representation of its parent node $pa(v)$ and its embedding as follows:
+
+$$
+\boldsymbol {h} _ {v} = G R U (\boldsymbol {e} (v), \boldsymbol {h} _ {p a (v)}) \tag {2}
+$$
+
+where $e(v)$ is the embedding of the node $v$ . Although we can obtain TD representations of all nodes of the syntactic template, only the TD representations of leaf nodes will be used for left-to-right encoding. For the particular example given in Figure 2, the TD representations of all leaf nodes are $H_{leaf}^{TD} = [h_{CC}^{TD}, h_{NP}^{TD}, h_{VP}^{TD}, h_{Dot}^{TD}]$ .
+
+For the left-to-right (LR) encoding, the encoder is a forward GRU network. We take the leaf nodes sequence $Leaf_{seq} = \{CC, NP, VP, Dot\}$ as input, and compute the LR representations of all leaf nodes $H_{leaf}^{LR} = [h_{CC}^{LR}, h_{NP}^{LR}, h_{VP}^{LR}, h_{Dot}^{LR}]$ . Particularly, take the NP node as an example:
+
+$$
+\boldsymbol {h} _ {N P} ^ {L R} = G R U \left(\boldsymbol {h} _ {N P} ^ {T D}, \boldsymbol {h} _ {C C} ^ {L R}\right) \tag {3}
+$$
+
+Then, we use the last hidden state of the syntactic encoder $h_{Dot}^{LR}$ as the final syntax representation $h_s$ for providing the syntactic signal to the decoder.
+
+Decoding in the Training Phase We employ the reparameterization trick to obtain semantic variables $\boldsymbol{z}_x = \boldsymbol{\mu}_x + \boldsymbol{\sigma}_x \odot \varepsilon, \varepsilon \in \mathcal{N}(\mathbf{0},\mathbf{I})$ . Then at each time step, we concatenate the syntactic representation $h_s$ with the previous word's embedding as the input to the decoder and concatenate the semantic variable $\boldsymbol{z}_x$ with the hidden-state output by the decoder for predicting the word at next time step, as shown in stage 1 in Figure 1. Note that the initial hidden state of the decoder is set to zero.
+
+Decoding in the Test Phase Giving the same sentence but with a different syntactic template, the model can generate a syntactically controlled paraphrase. We obtain semantic variable $z_{x}$ by the maximum a posteriori (MAP) inference. In this way, semantic information from the input sentence could be preserved as much as possible. After that, the decoding process is the same as the training phase.
+
+The Objective Function To train the above model, we optimize the following objective function:
+
+$$
+\mathcal {L} _ {1} = \mathcal {L} _ {c v a e} + \lambda_ {b o w} \mathcal {L} _ {b o w} \tag {4}
+$$
+
+where $\mathcal{L}_{cvae}$ and $\mathcal{L}_{bow}$ denote the conditional VAE loss and bag-of-word loss, respectively. $\lambda_{bow}$ is a hyper-parameters for balancing the two losses.
+
+Conditional VAE Loss: The loss is used to optimize the conditional VAE model by minimizing the reconstruction loss $\mathcal{L}_{rec}$ , and meanwhile minimizing the KL loss $\mathcal{L}_{kl}$ to encourage the posterior $q(z_{x}|\boldsymbol{x})$ to match the prior $p(z_{x})$ :
+
+$$
+\begin{array}{l} \mathcal {L} _ {c v a e} = - \lambda_ {r e s} \mathcal {L} _ {r e c} + \lambda_ {k l} \mathcal {L} _ {k l} \\ = - \lambda_ {r e s} \log p (\boldsymbol {x} | \boldsymbol {z} _ {x}, \boldsymbol {h} _ {s}) \tag {5} \\ + \lambda_ {k l} K L (q (\boldsymbol {z} _ {x} | \boldsymbol {x}) \| p (\boldsymbol {z} _ {x})) \\ \end{array}
+$$
+
+where $p(\boldsymbol{z}_x)$ follows standard normal distribution $\mathcal{N}(\mathbf{0},\mathbf{I})$ , $q(\boldsymbol{z}_x|\boldsymbol{x})$ takes the form $\mathcal{N}(\boldsymbol{\mu}_x,\boldsymbol{\sigma}_x^2)$ . Here, $\boldsymbol{\mu}_x$ , $\boldsymbol{\sigma}_x$ are computed by Eq. (1). $\lambda_*$ are balancing hyper-parameters.
+
+Bag-of-Word Loss: We introduce the Bag-of-word loss to enhance content preservation during paraphrase generation. Specifically, we take $z_{x}$ as input and predicts the Bag-of-Word distribution:
+
+$$
+\boldsymbol {p} _ {b} = \operatorname {s i g m o i d} \left(\boldsymbol {W} _ {\text {b o w}} \boldsymbol {z} _ {x} + \boldsymbol {b} _ {\text {b o w}}\right) \tag {6}
+$$
+
+where $W_{bow}$ , $b_{bow}$ are trainable parameters. The bag-of-word loss is computed as follows:
+
+$$
+\mathcal {L} _ {b o w} = - \sum_ {w \in V} t _ {w} \log \boldsymbol {p} _ {b} (w) \tag {7}
+$$
+
+where $V$ denotes the word vocabulary, $\pmb{t}$ is the bag-of-word ground-truth distribution of the corresponding sentence.
+
+# 3.2 Stage 2: Fine-tuning the Conditional VAE Model
+
+During inference, we will give different syntactic structures for every input sentence to generate paraphrases. To encourage generalization on different
+
+syntactic structures, we fine-tune the pre-trained conditional VAE in a cycle learning manner.
+
+Specifically, as shown in stage 2 in Figure 1, given an input sentence $\pmb{x}$ , its syntactic template $s$ , and other syntactic template $s'$ , we feed $\pmb{x}$ and $s'$ into the conditional VAE model to generate sentence $y$ (green line). We compute syntax controlling (blue line) and cycle reconstruction losses (red line), and then fine-tune the model to generate a better sentence that is formed in the syntactic structure of $s'$ and preserves the semantic meaning of $x$ .
+
+Syntax Controlling Loss First, we build a GRU-based seq2seq neural parser as the evaluator, which is pre-trained on the above mentioned training data $D$ , with $\pmb{x}$ as the input and the linearized syntactic template $\pmb{s}$ as the decoding target. For example, the linearized syntactic template in Figure 2 is (ROOT(S(CC)(NP)(VP)(Dot))).
+
+Second, we apply the pre-trained evaluator to predict the linearized syntactic structure of the output sentence $y$ , where parameters of the conditional VAE are updated to encourage the target syntactic template $s'$ to be predicted from the output sentence, i.e., minimizing the following term:
+
+$$
+\mathcal {L} _ {s c} = - \log p _ {\text {e v a l}} \left(s _ {l} ^ {\prime} \mid G S (\boldsymbol {y})\right) \tag {8}
+$$
+
+where $s_{l}^{\prime}$ is the linearized $s^{\prime}$ . $GS(\pmb{y})$ denotes a "softly" generated sentence based on Gumbel-Softmax distribution (Jang et al., 2016), where the representation of each word is defined as the weighted sum of word embeddings with the prediction probability at the current timestep. Please notice that the parameters of the evaluator are not updated in this step.
+
+Cycle Reconstruction Loss However, only using the above syntax controlling loss will result in generating a sentence that conforms to the target syntactic structure but drifts away from the original meaning. To address this issue, we borrow the cycle reconstruction loss $\mathcal{L}_{cr}$ from style-transfer research (Hu et al., 2017; Dai et al., 2019) to encourage the generated sentence to preserve the meaning in the input sentence.
+
+We feed the generated sentence $\pmb{y}$ and the syntactic template $s$ of $\pmb{x}$ to the conditional VAE and update the model to reconstruct original input sen
+
+tence $x$ by minimizing the following term:
+
+$$
+\mathcal {L} _ {c p} = - \log p (\boldsymbol {x} | G S (\boldsymbol {y}), s) \tag {9}
+$$
+
+where $GS(\pmb{y})$ is the same as in Eq. (8).
+
+The Objective Function The final loss function for fine-tuning is defined as follow:
+
+$$
+\mathcal {L} _ {2} = \mathcal {L} _ {c v a e} + \lambda_ {s c} \mathcal {L} _ {s c} + \lambda_ {c r} \mathcal {L} _ {c r} \tag {10}
+$$
+
+In our experiments, we still optimize $\mathcal{L}_{cvae}$ during the fine-tuning stage, which helps to stabilize the training process. $\lambda_{*}$ are balancing hyperparameters.
+
+# 4 Experiments
+
+In this section, we will answer the following questions:
+
+- First, we investigate whether our model can generate syntactically controlled paraphrases.
+- Second, we examine whether our model can generate syntactically adversarial examples for sentiment analysis.
+
+# 4.1 Syntactically-Informed Paraphrase Generation
+
+Given an input sentence, a syntactically-informed paraphrase is a sentence with the same meaning as the input sentence but in a different syntactic structure defined by a given syntactic structure.
+
+# 4.1.1 Models for Comparison
+
+We compared with the following unsupervised paraphrase models: 1) VAE: a vanilla variational autoencoder (Bowman et al., 2016) as a simple baseline; 2) SIVAE: a syntax-infused variational autoencoder (Zhang et al., 2019) that utilizes additional syntax information to improve the quality of sentence generation and paraphrase generation, where syntax information is provided by a linearized parse tree.
+
+We also compared against the supervised method SCPN (Iyyer et al., 2018) which uses an extended pointer-generator network (See et al., 2017) to encode input sentences and linearized parse trees to generate paraphrases.
+
+# 4.1.2 Datasets
+
+Quora. The dataset contains 140k pairs of paraphrase sentences and 260k pairs of non-paraphrase sentences. In the standard dataset split, there are 3k
+
+| Model | Quora | ParaNMT |
| ESM(↑) | i-BLEU(↑) | BLEU-ref (↑) | BLEU-ori (↓) | S-BERT(↑) | ESM(↑) | i-BLEU(↑) | BLEU-ref (↑) | BLEU-ori (↓) | S-BERT(↑) |
| Original Sentence | 56.5 | 1.1 | 31.1 | 100 | 0.845 | 36.9 | 3.5 | 18.5 | 100 | 0.755 |
| VAE | 57.0 | 5.5 | 23.4 | 59.5 | 0.764 | 34.6 | 3.3 | 10.1 | 45.4 | 0.643 |
| Using full parse tree |
| SCPN-F (supervised) | 94.7 | 56.6 | 64.3 | 25.5 | 0.866 | 97.0 | 53.8 | 56.7 | 19.0 | 0.866 |
| SIVAE-F | 81.7 | 23.9 | 32.6 | 29.0 | 0.760 | 82.6 | 18.2 | 21.4 | 20.9 | 0.708 |
| Stage1: SUP-F | 87.5 | 33.9 | 43.7 | 32.7 | 0.809 | 89.2 | 32.8 | 33.1 | 20.7 | 0.747 |
| Using syntactic template |
| SCPN-T (supervised) | 90.8 | 12.1 | 23.74 | 38.85 | 0.711 | 71.6 | 11.2 | 18.4 | 47.5 | 0.708 |
| SIVAE-T | 65.6 | 3.3 | 26.9 | 78.7 | 0.802 | 39.3 | 3.3 | 16.4 | 87.4 | 0.733 |
| Stage1: SUP-T | 73.9 | 7.3 | 22.46 | 50.55 | 0.738 | 65.9 | 4.4 | 9.6 | 34.3 | 0.610 |
| Stage2: + Lcvae | 73.9 | 7.1 | 23.29 | 53.73 | 0.753 | 63.9 | 5.1 | 11.0 | 39.1 | 0.652 |
| Stage2: + Lcvae + Lsc | 80.7 | 7.4 | 22.18 | 49.06 | 0.728 | 75.9 | 4.3 | 8.9 | 30.4 | 0.597 |
| Stage2: + Lcvae + Lsc + Lcr | 78.0 | 7.7 | 22.93 | 50.6 | 0.755 | 72.9 | 5.1 | 10.1 | 33.0 | 0.639 |
+
+Table 1: Performance of syntactic paraphrase generation. The larger $\uparrow$ (or lower↓), the better. S-BERT indicates Sentence-BERT. ESM denotes the rate of exact syntactic match. -F, -T means using full parse tree and syntactic template as controlling signal, respectively.
+
+| Model | Quora | ParaNMT |
| original reference | is it possible to lose weight without doing exercise? how can i lose weight naturally without doing exercise? | you know anybody who might wan na harm your husband? do you know anyone who would want to hurt your husband? |
| VAE | is it possible to lose weight without doing exercise? | who might know you ’re gon na kill anybody? |
| SCPN-F | how can i loose weight naturally without doing exercise? | do you know anyone who might want to hurt your husband? |
| SIVAE-F | how can i lose weight loss without doing exercise? | do you know anyone who might gon na harm your husband? |
| SUP-F | how can i lose weight just without doing exercise? | do you know anyone who might want to harm your husband? |
| SCPN-T | how do i reduce weight without doing exercise? | do you know who might want to hurt your husband? |
| SIVAE-T | how is it possible lose weight without doing exercise? | do you wan who might wan na harm your husband? |
| SUP-T | how can i lose weight without doing exercise? | do you know who might harm your husband? |
+
+Table 2: Example paraphrases generated by each model.
+
+and 30k paraphrase pairs in the held-out validation and test set, respectively. We followed the same unsupervised setting as (Miao et al., 2018; Bao et al., 2019), using non-paraphrase sentences as training instances that do not appear in the validation and test set. For the supervised method SCPN (Iyyer et al., 2018), we used paraphrase sentences for training.
+
+ParaNMT. For the unsupervised setting, we randomly selected 5 million reference sentences from the ParaNMT-50M dataset to train unsupervised methods. The manually annotated 800 sentence pairs created by Chen et al. (2019) were used as our test set, and 500 for the development set. For the supervised method SCPN (Iyyer et al., 2018), we used their trained model.
+
+# 4.1.3 Evaluation Metrics
+
+We employed original sentences and syntactic templates (or full parse trees) obtained from references as input, which is convenient for evaluation. But in the application scenario, we can give any syntactic templates to the trained model.
+
+For semantic evaluation, we computed BLEU (Papineni et al., 2002) scores against the reference and original sentence, denoted as BLEU-ref and BLEU-ori, respectively. Addition
+
+ally, we used i-BLEU (Sun and Zhou, 2012) to measure the diversity of expressions. We also used the embedding-based evaluation method Sentence-BERT $^3$ (Reimers and Gurevych, 2019) to evaluate the semantic similarity between the generated sentence and the reference sentence.
+
+For syntactic evaluation, we evaluated how often generated paraphrases completely conform to the target syntactic templates by computing the rate of exact syntactic match (ESM): a paraphrase $g$ is deemed as an exact syntactic match to reference $r$ only if the top three levels of its parse tree $p_g$ exactly matches those of $p_r$ . The tuning of all hyper-parameter was based on the BLEU-ref score on the validation set.
+
+# 4.1.4 Implementation Details
+
+We parsed all sentences in the training set, the reference sentences in the validation and test set using Stanford CoreNLP (Manning et al., 2014). We used the Adam optimizer (Kingma and Ba, 2014) for optimization. For the training of Stage 1 and Stage 2, we set the learning rate to 5e-4 and 1e-4, respectively. The word embedding layer was initialized by the publicly available GloVe 300-dimensional
+
+embeddings. $^4$ We adopted the tricks of KL annealing and word dropout following (Bowman et al., 2016). We set $\lambda_{res}$ to 5, $\lambda_{bow}$ to 0.5, $\lambda_{sc}$ to 2.5, and $\lambda_{cr}$ to 1.
+
+We reimplemented VAE and SIVAE, and set the same KL weights for fair comparison.
+
+# 4.1.5 Results
+
+As shown in Table 1, results in the first row are computed over original sentences, which show a BLEU-ori socre of 100. We can see that all models achieve strong results when using full parse trees as syntactic control. This is because full parse trees contain more fine-grained syntactic information which guides the model to correctly substitute words with equivalents. With the setting of full parse trees, SUP (stage 1) outperforms the existing unsupervised methods in all metrics; With syntactic templates, we beat them in ESM and i-BLEU metrics. VAE and SIVAE-T tend to copy the input sentence as the output and therefore get low ESM but high Ori-BLEU scores.
+
+Among our models, the SUP-T obtains an ESM of $73.9\%$ and $65.9\%$ on Quora and ParaNMT dataset, respectively. This shows that it can generate sentences according to the given syntactic templates (compared to row 1). At the stage 2, adding the conditional VAE loss leads to improvements in semantic metrics. Using conditional VAE loss and syntax controlling loss, we observe that while the syntactic accuracy has been greatly improved, the semantic metrics has decreased. Adding all loss terms leads to gains across both the semantic and syntactic metric scores. These results demonstrate the effectiveness of the proposed fine-tuning methods.
+
+Even without using any parallel data, our model is competitive to the supervised SCPN trained on parallel data in some metrics. Especially, SUPT (stage 2) achieves a higher S-BERT score than SCPN on the Quora dataset, a higher ESM score than SCPN on the ParaNMT Dataset.
+
+Table 2 shows several paraphrases generated by each model. More generation results are presented in Appendix A. We can observe that SUP-F can produce better results than SIVAE-F in terms of both semantics and syntax. VAE and SIVAE-T tend to copy the source sentences. SUP-T can generate paraphrases syntactically similar to the reference.
+
+| Model | 2 | 1 | 0 | ESM-H |
| SCPN-T | 55.0 | 15.0 | 30.0 | 80.0 |
| SIVAE-T | 57.3 | 30.0 | 12.7 | 37.3 |
| SUP-T | 35.0 | 30.0 | 35.0 | 62.6 |
+
+Table 3: Human evaluation on the Quora dataset (percentages of paraphrases scored 0, 1 and 2). ESM-H denotes the percentage that generations follow given syntactic templates.
+
+| KL-weight | BLEU-ref | BLEU-ori | ESM | S-BERT |
| Original | 31.13 | 100 | 56.5 | 0.845 |
| 0.1 | 22.71 | 53.89 | 70.8 | 0.750 |
| 0.3 | 22.46 | 50.55 | 73.9 | 0.738 |
| 0.5 | 22.37 | 48.66 | 75.7 | 0.731 |
| 0.7 | 22.43 | 47.07 | 77.1 | 0.723 |
| 1.0 | 22.09 | 44.49 | 78.3 | 0.707 |
| 1.3 | 21.87 | 41.96 | 79.9 | 0.691 |
| 1.5 | 21.41 | 39.29 | 80.7 | 0.673 |
+
+Table 4: BLEU-ref, BLEU-ori, ESM, and S-BERT score with varying KL weights on the Quora test set.
+
+# 4.1.6 Human Evaluation
+
+We also conducted human evaluation to measure paraphrase quality in a blind fashion. Following previous work (Iyyer et al., 2018; Goyal and Durrett, 2020), Three annotators were asked to evaluate the 100 randomly selected generations from the Quora test set according to a three-point scale scoring system: 0 denotes that the generated sentence is not a paraphrase at all; 1 means that the generated sentence is a paraphrase containing grammatical errors; 2 indicates that the generated sentence is a grammatically good paraphrase. Additionally, we also asked annotators to evaluate syntactic controllability (ESM-H): whether generations follow given syntactic templates.
+
+Table 3 shows the results of human evaluation which are somewhat consistent with the automatic metrics. We notice that the quality of generations from SIVAE-T is better than that of the SCPN-T model. The reason is that SIVAE-T tends to copy input sentences as outputs. It also means that SIVAE-T cannot generate meaningful paraphrases (only copying inputs) according to given syntactic templates. SUP-T obtains comparable results with the SCPN if we consider paraphrases scored 2 and 1 as meaningful paraphrases. Additionally, most generations from SUP-T follow given target syntax.
+
+# 4.1.7 Influence of KL-Weight on Results
+
+We also analyzed the influence of different KLweights on the SUP-T (stage 1) model. We can see in Table 4 that BLEU and ESM are more or less
+
+| Model | Valid(↑) | No augmentation | With augmentation |
| Acc(↑) | Failure(↑) | Acc(↑) | Failure(↓) |
| SCPN | 72.2 | 84.6 | 29.2 | 83.3 | 21.3 |
| SUP | 68.0 | 84.6 | 28.0 | 83.3 | 25.0 |
+
+Table 5: Performances of adversarial example generation, which are reported as the mean over three runs.
+
+contradictory to each other. Usually, a smaller KL weight makes the autoencoder less "variational" but more "deterministic," leading to a lower syntactic match but better content preservation. In this experiment, to trade-off the content preservation and syntactic controllability, we set the KL weight to 0.3.
+
+# 4.2 Adversarial Example Generation
+
+We further examined the utility of controlled paraphrase generation for adversarial example generation. Following previous work (Iyyer et al., 2018), we evaluated our syntactically adversarial examples on the Stanford Sentiment Treebank Dataset (SST) (Socher et al., 2013). We generated 10 syntactically different paraphrases for each instance using the top 10 frequent syntactic templates and add them to the SST training set. Since we cannot generate a valid paraphrase for each syntactic template, we filtered generated paraphrases using a threshold (BLEU, 1-3gram) to remove nonsensical outputs. In this experiment, we set the threshold to 0.5.
+
+# 4.2.1 Evaluation Metrics
+
+We evaluated this task with the following metrics:
+
+1. Dev Failure (Failure). We assume a development instance $x$ as a prediction failure if the original prediction is correct, but the prediction for at least one paraphrase is incorrect. Dev Failure is the percentage of instances on the development set, which become prediction failures after paraphrasing.
+2. Validity (Valid). To measure the validity of our adversarial examples, we perform manual evaluation on randomly selected 100 adversarial examples. We ask three workers to choose the appropriate label (e.g., positive or negative) for a given sentence, and then compare the worker's judgment to the original sentiment label.
+3. Test Accuracy (Acc). It is used to measure the performance of sentiment classification
+
+models on the test set.
+
+# 4.2.2 Implementation Details
+
+We first pre-trained our model on preprocessed 2.1M sentences from the One-Billion-Word Corpus5, and then fine-tuned our model on the SST dataset. For the pre-trained classification models, we used the bidirectional LSTM baseline in (Tai et al., 2015). The word embedding layer was initialized by the publicly available GloVe 300-dimensional embeddings. We used the Adam optimizer (Kingma and Ba, 2014) for optimization, and set the learning rate to 1e-4.
+
+# 4.2.3 Results
+
+As shown by Table 5, we obtain a validity score of 68.0 and Dev Failure score of 28.0. By augmenting the training data with paraphrases generated by our model, we obtain a lower Dev Failure score of 25.0. These results suggest that our model could generate legitimate adversarial examples. We improve the robustness of models against syntactic adversaries with little effect on the test accuracy.
+
+We also observe that SCPN obtains strong results. This is because the model is trained on large-scale parallel data, and generated paraphrases include lexical and syntactic variations. However, these advantages are due to the use of large-scale parallel corpus. Our unsupervised method could be very effective for low-resource languages where no parallel data are available.
+
+# 4.2.4 Case Study
+
+Table 6 lists some paraphrases generated by SUP with different syntactic templates. Table 7 shows adversarial examples generated by our model. We find that the generated sentences always conform to the target templates. These generation results show that our model could generate legitimate adversarial examples. We also observe that the generated paraphrases have only syntactic variations, not lexical variations. This is because it is difficult for the model to learn to substitute words with equivalents only using non-parallel data. We leave enabling word-level or phrase-level variations in our model for creating more diverse adversarial examples to our future work.
+
+# 5 Conclusions
+
+We have presented an unsupervised syntactically-informed paraphrasing model based on conditional
+
+| Template | Paraphrase |
| original | still, as a visual treat, the film is almost unsurpassed. |
| (S (S) ( , ) ( CC) ( S)) | the film is a visual treat, but almost unsurpassed. |
| (S ( PP) ( , ) ( NP) ( VP)) | as a visual treat, the film is almost unsurpassed. |
| (S ( ADVP) ( , ) ( NP) ( VP)) | still, the film is almost unsurpassed as a film. |
| original | it proves quite compelling as an intense, brooding character study. |
| (S ( PP) ( , ) ( NP) ( VP) ( .)) | as compelling, it proves quite an intense character study. |
| (S ( NP) ( ADVP) ( VP) ( .)) | it still proves compelling as an intense character study. |
| (S ( CC) ( NP) ( VP)) | but it proves compelling as an intense character study. |
| (S ( ADVP) ( , ) ( NP) ( VP) ( .)) | however, it proves quite compelling as an intense. |
+
+Table 6: Paraphrases generated by SUP with different templates.
+
+| Template | Paraphrase | P |
| original | though only 60 minutes long, the film is packed with information and impressions. | ✓ |
| (S (NP) (VP)) | the film is only 60 minutes long and packed with information and impressions. | × |
| (S (S) ( , ) ( CC) ( S )) | only 60 minutes long , and the film is packed with information. | × |
| original | this film seems thirsty for reflection , itself taking on adolescent qualities. | ✓ |
| (S (NP) (VP)) | this film seems thirsty for taking on adolescent qualities. | × |
| (S (CC) ( NP) ( VP )) | but this film seems thirsty for taking on adolescent qualities. | × |
+
+Table 7: Adversarial examples generated by our model. $\checkmark$ indicates that the prediction of the sentiment classifier model is correct, $\times$ indicates that the prediction is incorrect. NP: Noun Phrase, CC: Coordinating Conjunction.
+
+VAE and two-stage training process. We first train the conditional VAE model to generate sentences in desired syntactic structures. To further improve the syntactic controllability and semantic consistency of generated sentences, we introduce syntax controlling and cycle reconstruction objective functions to fine-tune the pre-trained model. Experiments show that our model achieves strong improvements over baselines on unsupervised setting and can generate syntactically controlled paraphrases. Furthermore, adversarial example generation experiments also validate that our model is able to generate syntactically adversarial examples for sentiment analysis, which can be used to improve the robustness of the sentiment classifier model via adversarial training.
+
+# Acknowledgements
+
+The present research was supported by the National Nature Science Foundation of China (No. 61876198, 61976015, 61976016). Deyi Xiong was partially supported by the National Key Research and Development Program of China (Grant No. 2019QY1802) and Natural Science Foundation of Tianjin (Grant No. 19JCZDJC31400). We would like thank the three anonymous reviewers for their constructive suggestions and insightful comments.
+
+# References
+
+Yu Bao, Hao Zhou, Shujian Huang, Lei Li, Lili Mou, Olga Vechtomova, Xin-yu Dai, and Jiajun Chen. 2019. Generating sentences from disentangled syntactic and semantic spaces. In ACL, pages 6008-6019. Association for Computational Linguistics.
+Samuel R. Bowman, Luke Vilnis, Oriol Vinyals, Andrew Dai, Rafal Jozefowicz, and Samy Bengio. 2016. Generating sentences from a continuous space. In SIGNLL, pages 10-21, Berlin, Germany. Association for Computational Linguistics.
+Mingda Chen, Qingming Tang, Sam Wiseman, and Kevin Gimpel. 2019. Controllable paraphrase generation with a syntactic exemplar. In ACL, pages 5972-5984, Florence, Italy. Association for Computational Linguistics.
+Ning Dai, Jianze Liang, Xipeng Qiu, and Xuanjing Huang. 2019. Style transformer: Unpaired text style transfer without disentangled latent representation. In ACL, pages 5997-6007, Florence, Italy. Association for Computational Linguistics.
+Li Dong, Jonathan Mallinson, Siva Reddy, and Mirella Lapata. 2017. Learning to paraphrase for question answering. In *EMNLP*, pages 875–886. Association for Computational Linguistics.
+Javid Ebrahimi, Anyi Rao, Daniel Lowd, and Dejing Dou. 2018. HotFlip: White-box adversarial examples for text classification. In ACL. Association for Computational Linguistics.
+Ji Gao, Jack Lanchantin, Mary Lou Soffa, and Yanjun Qi. 2018. Black-box generation of adversarial
+
+text sequences to evade deep learning classifiers. In 2018 IEEE Security and Privacy Workshops (SPW), pages 50-56.
+Siddhant Garg and Goutham Ramakrishnan. 2020. BAE: BERT-based Adversarial Examples for Text Classification. page arXiv:2004.01970.
+Tanya Goyal and Greg Durrett. 2020. Neural syntactic preordering for controlled paraphrase generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 238-252, Online. Association for Computational Linguistics.
+Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P. Xing. 2017. Toward controlled generation of text. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1587-1596. PMLR.
+Mohit Iyyer, John Wieting, Kevin Gimpel, and Luke Zettlemoyer. 2018. Adversarial example generation with syntactically controlled paraphrase networks. In *NAACL*, pages 1875–1885. Association for Computational Linguistics.
+Eric Jang, Shixiang Gu, and Ben Poole. 2016. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144.
+Vineet John, Lili Mou, Hareesh Bahuleyan, and Olga Vechtomova. 2019. Disentangled representation learning for non-parallel text style transfer. In ACL, pages 424-434, Florence, Italy. Association for Computational Linguistics.
+Diederik Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. Computer Science.
+Diederik P Kingma and Max Welling. 2014. Autoencoding variational bayes. In ICLR.
+Ashutosh Kumar, Kabir Ahuja, Raghuram Vadapalli, and Partha Talukdar. 2020. Syntax-guided controlled generation of paraphrases. TACL, 8:329-345.
+Zichao Li, Xin Jiang, Lifeng Shang, and Hang Li. 2018. Paraphrase generation with deep reinforcement learning. In EMNLP, pages 3865-3878, Brussels, Belgium. Association for Computational Linguistics.
+Zichao Li, Xin Jiang, Lifeng Shang, and Qun Liu. 2019. Decomposable neural paraphrase generation. In ACL, pages 3403-3414, Florence, Italy. Association for Computational Linguistics.
+Bin Liang, Hongcheng Li, Miaoqiang Su, Pan Bian, Xirong Li, and Wenchang Shi. 2017. Deep text classification can be fooled. arXiv preprint arXiv:1704.08006.
+
+Mingtong Liu, Erguang Yang, Deyi Xiong, Yujie Zhang, Yao Meng, Changjian Hu, Jinan Xu, and Yufeng Chen. 2020a. A learning-exploring method to generate diverse paraphrases with multi-objective deep reinforcement learning. In Proceedings of the 28th International Conference on Computational Linguistics, COLING 2020, Barcelona, Spain (Online), December 8-13, 2020, pages 2310-2321. International Committee on Computational Linguistics.
+Mingtong Liu, Erguang Yang, Deyi Xiong, Yujie Zhang, Chen Sheng, Changjian Hu, Jinan Xu, and Yufeng Chen. 2020b. Exploring bilingual parallel corpora for syntactically controllable paraphrase generation. In *IJCAI-20*, pages 3955–3961. International Joint Conferences on Artificial Intelligence Organization. Main track.
+Xianggen Liu, Lili Mou, Fandong Meng, Hao Zhou, Jie Zhou, and Sen Song. 2020c. Unsupervised paraphrasing by simulated annealing. In ACL, pages 302-312, Online. Association for Computational Linguistics.
+Christopher Manning, Mihai Surdeanu, John Bauer, Jenny Finkel, Steven Bethard, and David McClosky. 2014. The Stanford CoreNLP natural language processing toolkit. In ACL, pages 55-60, Baltimore, Maryland. Association for Computational Linguistics.
+Ning Miao, Hao Zhou, Lili Mou, Rui Yan, and Lei Li. 2018. Cgmh: Constrained sentence generation by metropolis-hastings sampling. In AAAI, pages 1875-1885.
+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.
+Nils Reimers and Iryna Gurevych. 2019. SentenceBERT: Sentence embeddings using Siamese BERT-networks. In EMNLP-IJCNLP, Hong Kong, China. Association for Computational Linguistics.
+Abigail See, Peter J. Liu, and Christopher D. Manning, 2017. Get to the point: Summarization with pointer-generator networks. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1073-1083, Vancouver, Canada. Association for Computational Linguistics.
+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 ACL, pages 1631-1642, Seattle, Washington, USA. Association for Computational Linguistics.
+
+Kihyuk Sohn, Xinchen Yan, and Honglak Lee. 2015. Learning structured output representation using deep conditional generative models. In NIPS.
+Hong Sun and Ming Zhou. 2012. Joint learning of a dual SMT system for paraphrase generation. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 38-42, Jeju Island, Korea. Association for Computational Linguistics.
+Kai Sheng Tai, Richard Socher, and Christopher D. Manning. 2015. Improved semantic representations from tree-structured long short-term memory networks. In ACL, pages 1556-1566, Beijing, China. Association for Computational Linguistics.
+Xinchen Yan, Jimei Yang, Kihyuk Sohn, and Honglak Lee. 2016. Attribute2image: Conditional image generation from visual attributes. In ECCV, pages 776-791, Cham. Springer International Publishing.
+Xinyuan Zhang, Yi Yang, Siyang Yuan, Dinghan Shen, and Lawrence Carin. 2019. Syntax-infused variational autoencoder for text generation. In ACL, pages 2069-2078, Florence, Italy. Association for Computational Linguistics.
+Sanqiang Zhao, Rui Meng, Daqing He, Andi Saptono, and Bambang Parmanto. 2018. Integrating transformer and paraphrase rules for sentence simplification. In EMNLP, pages 3164-3173, Brussels, Belgium. Association for Computational Linguistics.
+Zhong Zhou, Matthias Sperber, and Alexander Waibel. 2019. Paraphrases as foreign languages in multilingual neural machine translation. In ACL, pages 113-122. Association for Computational Linguistics.
\ No newline at end of file
diff --git a/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/images.zip b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..46644ccdc92868267768ae03d9f6932a58c71e23
--- /dev/null
+++ b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:06f39497a98cd9a1e06e7a586225c4a4028cc70e7885695a718c079b764a371c
+size 458365
diff --git a/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/layout.json b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..31a4733239c0d63c23bff90c7b23be6fedc3c988
--- /dev/null
+++ b/syntacticallyinformedunsupervisedparaphrasingwithnonparalleldata/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6a66c114714fe4528e2420ccd2a5d1d54fd57b9a5ec1f3ec045f533141004d1b
+size 397434
diff --git a/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/2a848fb8-1e8c-44ca-84d0-4ed3d3491928_content_list.json b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/2a848fb8-1e8c-44ca-84d0-4ed3d3491928_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..15aad3423caa976d65bd985f1e9e67a73330502c
--- /dev/null
+++ b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/2a848fb8-1e8c-44ca-84d0-4ed3d3491928_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:da7896a835865fb0349bfb71eb68901ddc62e7200e8f7a7a962d99ee6d8f5aec
+size 103249
diff --git a/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/2a848fb8-1e8c-44ca-84d0-4ed3d3491928_model.json b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/2a848fb8-1e8c-44ca-84d0-4ed3d3491928_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..c9d1b8e3c3091c61832417125dbbd59871f23fb9
--- /dev/null
+++ b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/2a848fb8-1e8c-44ca-84d0-4ed3d3491928_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:414926f0afa081ec5254c480d90d6ccb5313a58c2ec0fbeaf922492b46340fad
+size 125420
diff --git a/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/2a848fb8-1e8c-44ca-84d0-4ed3d3491928_origin.pdf b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/2a848fb8-1e8c-44ca-84d0-4ed3d3491928_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..a09e8ca5ffd07d130d319350f7d985c9a9cc5d73
--- /dev/null
+++ b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/2a848fb8-1e8c-44ca-84d0-4ed3d3491928_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:aae40dc1b56f2c028065c56e16b6583eb74acb582c5b0d7b317f338768266e77
+size 585982
diff --git a/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/full.md b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..545a3dc2baab673f287edb42a248c9bce0a9c774
--- /dev/null
+++ b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/full.md
@@ -0,0 +1,395 @@
+# Synthetic Data Augmentation for Zero-Shot Cross-Lingual Question Answering
+
+Arij Riabi\* Thomas Scialom\* Rachel Keraron\* Benoit Sagot Djamé Seddah Jacopo Staiano
+
+‡ Inria, Paris, France
+
+$^{\diamond}$ Sorbonne Université, CNRS, LIP6, F-75005 Paris, France
+
+\*reciTAL,Paris,France
+
+{thomas,rachel,jacopo}@recital.ai
+
+{arij.riabi,benoit.sagot,djame.seddah}@inria.fr
+
+# Abstract
+
+Coupled with the availability of large scale datasets, deep learning architectures have enabled rapid progress on Question Answering tasks. However, most of those datasets are in English, and the performances of state-of-the-art multilingual models are significantly lower when evaluated on non-English data. Due to high data collection costs, it is not realistic to obtain annotated data for each language one desires to support.
+
+We propose a method to improve Cross-lingual Question Answering performance without requiring additional annotated data, leveraging Question Generation models to produce synthetic samples in a cross-lingual fashion. We show that the proposed method allows to significantly outperform the baselines trained on English data only, establishing thus a new state-of-the-art on four multilingual datasets: MLQA, XQuAD, SQuAD-it and PIAF (fr).
+
+# 1 Introduction
+
+Question Answering is a fast-growing research field, aiming to improve the capabilities of machines to read and understand documents. Significant progress has recently been enabled by the use of large pre-trained language models (Devlin et al., 2019; Raffel et al., 2020), which reach human-level performances on several publicly available benchmarks, such as SQuAD (Rajpurkar et al., 2016) and NewsQA (Trischler et al., 2017).
+
+Given that the majority of large scale Question Answering (QA) datasets are in English (Hermann et al., 2015; Rajpurkar et al., 2016; Choi et al., 2018), the development of QA systems targeting other languages is currently addressed via two cross-lingual QA datasets: XQuAD (Artetxe et al., 2020) and MLQA (Lewis et al., 2020a), covering
+
+respectively 10 and 7 languages. Due to the cost of annotation, both are limited only to an evaluation set. They are comparable to the validation set of the original SQuAD (see more details in Section 3.3). In both datasets, each paragraph is paired with questions in various languages, allowing to evaluate models in a cross-lingual experimental scenario: the input context and the question can be in two different languages. This scenario has important practical applications, such as querying a set of documents in various languages.
+
+Performing this cross-lingual task is complex and remains challenging for current models, assuming only English training data: transfer results are shown to rank behind training-language performance (Artetxe et al., 2020; Lewis et al., 2020a). In other words, multilingual models fine-tuned only on English data are found to perform significantly better on English than on other languages. Besides the almost simultaneous work of Shakeri et al. (2020), very few alternatives to such a simple zero-shot transfer method have been proposed so far.
+
+In this paper, we propose to generate synthetic data in a cross-lingual fashion, borrowing the idea from monolingual QA research efforts (Duan et al., 2017). On English corpora, generating synthetic questions has shown to significantly improve the performance of QA models (Du et al., 2017; Golub et al., 2017; Du and Cardie, 2018; Alberti et al., 2019). However, the adaptation of this technique to cross-lingual QA is not straightforward: cross-lingual text generation is a challenging task per se which has not been yet extensively explored, in particular when no multilingual training data is available.
+
+We explore two Question Generation scenarios: (i) requiring only SQuAD data; and (ii) using a translator tool to obtain translated versions of SQuAD. As expected, the method leveraging on a translator has shown to perform the best. Leveraging on such synthetic data, our best model obtains
+
+significant improvements on XQuAD and MLQA over the state-of-the-art for both Exact Match and F1 scores. In addition, we evaluate the QA models on languages not seen during training (even for the synthetic data) – using SQuAD-it (for Italian), PIAF (for French), and KorQUaD (for Korean) – reporting a new state-of-the-art for Italian and French, and observing significant improvements on Korean compared to zero-shot without augmentation. This indicates that the proposed method allows to capture better multilingual representations beyond the training languages. Our method paves the way toward multilingual QA domain adaptation, especially for under-resourced languages.
+
+Our contributions can be summarized as follows:
+
+- We present a data augmentation approach for Cross-Linguual Question Answering based on synthetic Question Generation;
+- We report extensive experiments showing significant improvements on two multilingual evaluation datasets (XQuAD and MLQA);
+- We additionally evaluate the proposed methodology on languages unseen during training, thus showing the potential benefits for QA on low-resource languages.
+
+# 2 Related Work
+
+Question Answering (QA) QA is the task for which given a context and a question, a model has to find the answer. The interest for Question Answering goes back a long way: in a 1965 survey, Simmons (1965) reported fifteen implemented English language question-answering systems. More recently, with the rise of large scale datasets (Hermann et al., 2015), and large pre-trained models (Devlin et al., 2019), the performance drastically increased, approaching human-level performance on standard benchmarks – see for instance the SQuAD leader board.1 More challenging evaluation benchmarks have recently been proposed: Dua et al. (2019) released the DROP dataset, for which the annotators were encouraged to provide adversarial questions; Burchell et al. (2020) released the MSQ dataset, consisting of multi-sentence questions.
+
+However, all these works are focused on English. Another popular research direction focuses on the development of multilingual QA models. For this purpose, the first step has been to provide the community with multilingual evaluation sets: Artetxe
+
+et al. (2020) and Lewis et al. (2020a) concurrently proposed two different evaluation sets which are comparable to the SQuAD development set. Both reach the same conclusion: due to the lack of non-English training data, models do not achieve the same performance in Non-English languages than they do in English. To the best of our knowledge, no method has been proposed to fill this gap.
+
+Question Generation (QG) QG can be seen as the dual task of QA: the input is composed of the answer and the paragraph containing it, and the model is trained to generate the question. Proposed by Rus et al. (2010), it has leveraged on the development of new QA datasets (Zhou et al., 2017; Scialom et al., 2019). Similar to QA, significant performance improvements have been obtained using pre-trained language models (Dong et al., 2019). Still, due to the lack of multilingual datasets, most previous works have been limited to monolingual text generation. We note the exceptions of Kumar et al. (2019) and Chi et al. (2020), who resorted to multilingual pre-training before fine-tuning on monolingual downstream NLG tasks. However, the quality of the generated questions is still found inferior to the corresponding English ones.
+
+Question Generation for Question Answering Data augmentation via synthetic data generation is a well-known technique to improve models' accuracy and generalisation. It has found successful application in several areas, such as time series analysis (Forestier et al., 2017) and computer vision (Buslaev et al., 2020). In the context of QA, generating synthetic questions to complete a dataset has shown to improve QA performances (Duan et al., 2017; Alberti et al., 2019). So far, all these works have focused on English QA given the difficulty to generate questions in other languages without available data. This lack of data, and the difficulty to obtain some, constitutes the main motivation of our work and justifies exploring cost-effective approaches such as data augmentation via the generation of questions.
+
+In a very recent work, almost simultaneous to our previously submitted version, Shakeri et al. (2020) address multilingual QA with a similar approach. However, we argue that their experimental protocol does not allow to totally answer the research question. We detail the differences in our discussion, Section 5.3.
+
+# 3 Data
+
+# 3.1 English Training Data
+
+$\mathbf{SQuAD}_{en}$ The original SQuAD (Rajpurkar et al., 2016), which we refer as $\mathrm{SQuAD}_{en}$ for clarity in this paper. It is one of the first, and among the most popular, large scale QA datasets. It contains about 100K question/paragraph/answer triplets in English, annotated via Mechanical Turk. $^2$
+
+QG datasets Any QA dataset can be reversed into a QG dataset, by switching the generation targets from the answers to the questions. In this paper, we use the $qg$ subscript to specify when the dataset is used for QG (e.g. SQuAD $_{en;qg}$ indicates the English SQuAD data in QG format).
+
+# 3.2 Synthetic Training Sets
+
+$\mathbf{SQuAD}_{trans}$ is a machine translated version of the SQuAD train set in the seven languages of MLQA, released by the authors together with their paper.
+
+WikiScrap We collected 500 Wikipedia articles for all the languages present in MLQA. They are not paired with any question or answer. We use them as contexts to generate synthetic multilingual questions, as detailed in Section 4.2. Following the SQuADen protocol, we used project Nayuki's code3 to parse the top 10K Wikipedia pages according to the PageRank algorithm (Page et al., 1999). We then filtered out paragraphs with character length outside of a [500, 1500] interval. Articles with less than 5 paragraphs are discarded, since they tend to be less developed, in a lower quality or being only redirection pages. Out of the filtered articles, we randomly selected 500 per language.
+
+# 3.3 Multilingual Evaluation Sets
+
+XQuAD (Artetxe et al., 2020) is a human translation of the SQuAD $_{en}$ development set in 10 languages (Arabic, Chinese, German, Greek, Hindi, Russian, Spanish, Thai, Turkish, and Vietnamese), providing 1k QA pairs for each language.
+
+MLQA (Lewis et al., 2020a) is an evaluation dataset in 7 languages (English, Arabic, Chinese,
+
+German, Hindi, and Spanish). The dataset is built from aligned Wikipedia sentences across at least two languages (full alignment between all languages being impossible), with the goal of providing natural rather than translated paragraphs. The QA pairs are manually annotated on the English sentences and then human translated on the aligned sentences. The dataset contains about 46k aligned QA pairs in total.
+
+Language-specific benchmarks In addition to the two aforementioned multilingual evaluation corpora, we benchmark our models on three language-specific datasets for French, Italian and Korean, as detailed below. We choose these datasets since none of these languages are present in XQuAD or MLQA. Hence, they allow us to evaluate our models in a scenario where the target language is not available during training, even for the synthetic questions.
+
+PIAF Keraron et al. (2020) provided an evaluation set in French following the SQuAD protocol, containing 3835 examples.
+
+KorQuAD 1.0 the Korean Question Answering Dataset (Lim et al., 2019), a Korean dataset also built following the SQuAD protocol.
+
+SQuAD-it Derived from $\mathrm{SQuAD}_{en}$ , it was obtained via semi-automatic translation to Italian (Croce et al., 2018).
+
+# 4 Models
+
+Recent works (Raffel et al., 2020; Lewis et al., 2019) have shown that classification tasks can be framed as a text-to-text problem, achieving state-of-the-art results on established benchmarks, such as GLUE (Wang et al., 2018). Accordingly, we employ the same architecture for both Question Answering and Generation tasks. This also allows fairer comparisons for our purposes, by removing differences between QA and QG architectures and their potential impact on the results obtained. In particular, we use a distilled version of XLM-R (Conneau et al., 2020): MiniLM-M (Wang et al., 2020) (see Section 4.3 for further details).
+
+# 4.1 Baselines
+
+$\mathbf{Q}\mathbf{A}_{\mathrm{No - synth}}$ Following previous works, we finetuned the multilingual models on $\mathrm{SQuAD}_{en}$ , and consider them as our baselines.
+
+English as Pivot Leveraging on translation models, we consider a second baseline method, which uses English as a pivot. First, both the question in language $L_{q}$ and the paragraph in language $L_{p}$ are translated into English. We then invoke the baseline model described above, $\mathrm{QA}_{\mathrm{No - synth}}$ , to predict the answer. Finally, the predicted answer is translated back into the target language $L_{p}$ . We used the google translate API. $^{4}$
+
+$\mathbf{QA}_{+\mathrm{SQuAD - trans}}$ the translated data $\mathrm{SQuAD_{trans}}$ are used as additional training data to $\mathrm{SQuAD_{en}}$ , to train the QA model.
+
+# 4.2 Question Generation Data Augmentation
+
+In this work we consider data augmentation via generating synthetic questions, to improve the QA performance. Different training schemes for the question generator are possible, resulting in different quality of the synthetic data. Before this work, its impact on the final QA system remained unexplored in a multilingual context.
+
+For all the following experiments, only the synthetic data changes. Given a specific set of synthetic data, we always follow the same two-stages protocol, similar to Alberti et al. (2019): we first train the QA model on the synthetic QA data, then on $\mathrm{SQuAD}_{en}$ . We also tried to train the QA model in one stage, with all the synthetic and human data shuffled together, but observed no improvements over the baseline.
+
+We explored two different synthetic generation modes:
+
+Synth the QG model is trained on $\mathrm{SQuAD}_{en,qq}$ (i.e., English data only) and the synthetic data are generated on WikiScrap. Under this setup, the only annotated samples this model has access to are those from SQuAD-en.
+
+Synth+trans the QG model is trained on SQuADtrans,gg in addition to SQuADen,gg. The questions can thus be in a different languages than the context. Hence, the model needs an indication about the language it is expected to generate the question in. To control the target language, we use a specific prompt per language, defining a special token , which corresponds to the desired target language Y. Thus, the input is structured as Answer Context, where indicates to the model in what language the question should be generated,
+
+and $<\mathrm{SEP}>$ is a special token acting as a separator. These attributes offer flexibility on the target language. Similar techniques are used in the literature to control the style of the output (Keskar et al., 2019; Scialom et al., 2020; Chi et al., 2020).
+
+# 4.3 Implementation details
+
+For all our experiments we use Multilingual MiniLM v1 (MiniLM-m) (Wang et al., 2020), a 12-layer with 384 hidden size architecture distilled from XLM-R Base multilingual (Conneau et al., 2020). With only 66M parameters, it is an order of magnitude smaller than state-of-the-art architectures such as BERT-large or XLM-large. We used the official Microsoft implementation. For all the experiments -both QG and QA- we trained the model for 5 epochs, using the default hyperparameters. We used a single nVidia GTX2080ti with 11G RAM, and the training times amount to circa 4 and 2 hours for Question Generation and for Question Answering, respectively. To evaluate our models, we used the official MLQA evaluation scripts. For reproducibility purposes, we make the code available.
+
+# 5 Results
+
+# 5.1 Question Generation
+
+We report examples of generated questions in Table 1.
+
+Controlling the Target Language In the context of multilingual text generation, controlling the target language is not trivial.
+
+When a QA model is trained only on English data, at inference, given a non-English paragraph, it predicts the answer in the input language, as one would expect, since it is an extractive process. Ideally, we would like to observe the same behavior for a Question Generation model trained only on English data (such as Synth), leveraging on the multilingual pre-training. Conversely to QA, QG is a language generation task. Multilingual generation is much more challenging, as the model's decoding ability plays a major role. When a QG model is fine-tuned only on English data (i.e SQuAD-en), its controllability of the target language suffers from catastrophic forgetting: the input language does not
+
+Paragraph (EN) Peyton Manning became the first quarterback ever to lead two different teams to multiple Super Bowls. He is also the oldest quarterback ever to play in a Super Bowl at age 39. The past record was held by John Elway, who led the Broncos to victory in Super Bowl XXXIII at age 38 and is currently Denver's Executive Vice President of Football Operations and General Manager.
+
+Answer Broncos
+
+$\mathbf{Q}\mathbf{G}_{\mathrm{synth}}$ What team did John Elway lead to victory at age 38?
+$\mathbf{QG}_{\mathrm{synth + trans}}$ (target language $= \mathbf{en}$ ) What team did John Elway lead to win in the Super Bowl?
+
+Paragraph (ES) Peyton Manning se convirtio en el primer mariscal de campo de la historia enVELAR a dos equipos differentes a participar en multiples Super Bowls. Ademas, es con 39 años, el mariscal de campo mas longevo de la historia en jugar ese partido. El record anterior esta en manos de John Elway —mánger general y actual vicepresidente executivo para operaciones futbolísticas de Denver—que conducjo a los Broncos a la victoria en la Super Bowl XXXIII a los 38 años de edad.
+
+Answer Broncos
+
+$\mathbf{Q}\mathbf{G}_{\mathrm{synth}}$ Where did Peyton Manning conducjo?
+$\mathbf{QG}_{\mathrm{synth + trans}}$ (target language $=$ es) Que equipo ganó el record anterior? (Which team won the previous record?)
+$\mathbf{QG}_{\mathrm{synth + trans}}$ (target language $= \mathsf{en}$ ) What team did Menning win in the Super Bowl?
+
+Paragraph (ZH) 培顿·曼宁成为史上首位带领两支不同球队多次进入超级碗的四分卫。他也以39岁高龄参加超级碗而成为上年龄最大的四分卫。过去的记录是由约翰·埃尔维保持的,他在38岁时带领野马队赢得第33届超级碗,目前担任丹佛的橄榄球运营执行副总裁兼总经理
+
+Answer 野马队
+
+$\mathbf{Q}\mathbf{G}_{\mathrm{synth}}$ What is the name for the name that the name is used?
+$\mathbf{QG}_{\mathrm{synth + trans}}$ (target language = zh) 约翰·埃尔维在13岁时带领哪支球队赢得第33届超级碗? (Which team did John Elvey lead to win the 33rd Super Bowl at the age of 13?)
+$\mathbf{QG}_{\mathrm{synth + trans}}$ (target language $=$ en) What team won the 33th Super Bowl?
+
+propagate to the generated text. While still relevant to the context, the synthetic questions are generated in English: for instance, in Table 1 we observe that the $\mathrm{QG}_{\mathrm{synth}}$ model outputs English questions for the paragraphs in Chinese and Spanish. The same phenomenon was reported by Chi et al. (2020).
+
+Cross-Lingual Training To overcome the aforementioned limitation on target language controllability (i.e. to enable the generation in other languages than English), multilingual data is needed. We can leverage on the translated versions of the dataset to add the required non-English examples. As detailed in Section 4.2, we simply use a specific prompt that corresponds to the target language (with $N$ different prompts corresponding to the $N$ languages present in the dataset). In Table 1, we show how $\mathrm{QG}_{\mathrm{synth + trans}}$ can generate questions in the same language as the input. These synthetic questions seem much more relevant, coherent and fluent, if compared to those produced by $\mathrm{QG}_{\mathrm{synth}}$ : for the Spanish paragraph, the question is well formed and focused on the input answer; for Chinese (see bottom row of Table 1 for $\mathrm{QG}_{\mathrm{synth + trans}}$ ) is perfectly written.
+
+In Table 2 we report the BLEU4 scores for $\mathrm{QG}_{\mathrm{synth + trans}}$ grouped by the language of the question. As expected, the score is maximized on the
+
+Table 1: Example of questions generated by the different models on an XQuAD's paragraph in different languages. For $\mathrm{QG_{synth + trans}}$ , we report the outputs given two target languages, the one of the context and English.
+
+| q/c | en | es | de | ar | hi | vi | zh |
| en | 14.5 | 8.9 | 7.2 | 5.9 | 6.5 | 8.4 | 6.0 |
| es | 9.0 | 10. | 6.6 | 4.2 | 5.9 | 6.3 | 4.6 |
| de | 6.2 | 4.8 | 6.3 | 3.1 | 3.7 | 5.0 | 3.2 |
| ar | 2.8 | 2.2 | 2.4 | 3.3 | 2.0 | 2.3 | 2.1 |
| hi | 7.9 | 6.7 | 6.6 | 5.8 | 8.3 | 6.6 | 5.2 |
| vi | 9.1 | 7.3 | 7.2 | 6.0 | 6.5 | 12.3 | 6.1 |
| zh | 9.2 | 8.0 | 7.8 | 6.1 | 7.2 | 8.0 | 15.0 |
+
+Table 2: BLEU-4 scores on MLQA test for $\mathrm{QG_{synth + trans}}$ . Columns show context language, rows show question language.
+
+diagonal (same languages for the context and the question). Still, most of these scores are lower on non-English languages. It is interesting to note BLEU4 correlates with the QA scores: 0.51 Pearson coefficient. The reasons are two folds: 1) QA and QG share the same Language Model, which might struggle for the same languages; 2) the better the QG, the better the synthetic data, therefore the better the QA performs. We discuss further in Section 5.3 how this impacts the QA performance.
+
+In addition to BLEU, we also report the QA F1 scores for different QA models when applied on the generated questions in the supplementary material. Yet, we warn the reader that these results should be taken with caution: evaluating NLG is known to be an open research problem; BLEU is known to
+
+suffer from important limitations (Novikova et al., 2017), which might be accentuated in a multilingual context (Lee et al., 2020). For this reason, we conducted a manual qualitative analysis on a small number of samples. Note that the annotators need to have a professional level in the language of the generated question to evaluate its fluency, and to be bilingual, when evaluating its relevance w.r.t. input context in our cross language scenario. This is a significant challenge to conduct a large scale evaluation.
+
+So far, our results (see at the end of Supplementary Material) for Arabic and German show an overall good quality in the questions: only one question for Arabic was genuinely missing the point while for German there were 2 lexical questionable choices that invalidate the question (out of 10 samples for both languages so far). This indicates that Arabic questions could actually be better than what their low BLEU score shows. Arabic has a very different morphological structure that could explain such low BLEU (Bouamor et al., 2014). This emphasizes the limitation of the current automatic metrics in a multilingual context.
+
+# 5.2 Question Answering
+
+We report the main results of our experiments on XQuAD and MLQA in Table 3. The scores correspond to the average over all the different possible combination of languages (de-de, de-ar, etc.).
+
+English as Pivot Using English as a pivot does not lead to good results. This may be due to the evaluation metrics, which are based on $n$ -grams similarity. For extractive QA, F1 and EM metrics measure the overlap between the predicted answer and the ground truth. Therefore, meaningful answers worded differently are penalized, a situation that is likely to occur because of the backtranslation mechanism. This makes automatic evaluation challenging for this setup, as metrics suffer from similar difficulties as those observed for text generation (Sulem et al., 2018). As an additional downside, this model requires multiple translations at inference time. For these reasons, we decided not to explore this approach further.
+
+Synthetic without translation (+synth) Compared to the MiniLM baseline, we observe a small performance increase for $\mathrm{MiniLM}_{+\mathrm{synth}}$ (Exact Match increases from 29.5 to 33.1 on XQuAD and from 26.0 to 27.5 on MLQA).
+
+During the self-supervised pre-training stage, the model was exposed to multilingual inputs. Yet, for a given input, the target language was always consistent, preventing the model to be exposed to such a cross-lingual scenario. The synthetic inputs are composed of questions in English (see examples in Table 1) while the contexts can be in any languages. Therefore, the QA model is exposed for the first time to a cross-lingual scenario. We hypothesise that such a cross-lingual ability is not innate for a default multilingual model: exposing a model to this scenario allows to develop this ability and contributes to improve its performance.
+
+# Synthetic with translation (+synth-trans) :
+
+For $\mathrm{MiniLM}_{+\mathrm{synth - trans}}$ , we obtain a much larger improvement over its baselines, MiniLM, compared to $\mathrm{MiniLM}_{+\mathrm{synth}}$ , on both MLQA and XQuAD. Also, it outperforms $\mathrm{MiniLM}_{+\mathrm{SQuADtrans}}$ , indicating the benefit of our proposed approach. This supports the intuition developed in the previous paragraph: independently of the multilingual capacity of the model, a cross-lingual ability is developed when the two inputs components are not exclusively written in the same language. In Section 5.3, we discuss this phenomenon more in depth.
+
+# 5.3 Discussion
+
+Cross Linguual Generalisation To explore the models' effectiveness in dealing with cross-lingual inputs, we report in Figure 1 the performance for our $\mathrm{MiniLM}_{+\mathrm{synth - trans}}$ setup, varying the number of samples and the languages present in the synthetic data. The abscissa $x$ corresponds to the progressively increasing number of synthetic samples used; at $x = 0$ , it corresponds to the MiniLM $_{+}$ trans baseline, where the model has access only to the original English data from SQuADen. We explore two sampling strategies for the synthetic examples:
+
+0. All Languages corresponds to sampling the examples from any of the different languages.
+0. Conversely, for Not All Languages, we progressively added the different languages: for $x = 50K$ , all the 50K synthetic data are on a unique language input, $L1$ . Then for $x = 100K$ , the synthetic data are from either $L1$ , or an additional language $L2$ ; finally, for $x = 250K$ , all MLQA languages are present.
+
+In Figure 1, we observe that the performance for All Languages increases largely at the beginning, then remains mostly stable. Conversely, we note a gradual improvement for Not All Languages, as
+
+ | #Params | Trans. | XQuAD | MLQA |
| MiniLM (Wang et al., 2020) | 66M | No | 42.2 / 29.5 | 38.4 / 26.0 |
| XLM (Hu et al., 2020)8 | 340M | No | 68.5/52.8 | 65.4 / 47.9 |
| English as Pivot | 66M | Yes | 46.2 / 30.9 | 36.1 / 23.0 |
| MiniLM+synth | 66M | No | 44.8 / 33.1 | 39.8 / 27.5 |
| MiniLM+SQuAD-trans | 66M | Yes | 55.0 / 40.7 | 49.5 / 35.3 |
| MiniLM+synth-trans | 66M | Yes | 63.3 / 49.1 | 56.1 / 41.4 |
| MiniLM+SQuAD-trans+synth-trans | 66M | Yes | 62.5 / 48.6 | 55.0 / 40.4 |
| XLM - R+synth-trans | 340M | Yes | 74.3 / 59.2 | 65.3 / 49.2 |
+
+Table 3: Results (F1 / EM) of the different QA models on XQuAD and MLQA. XLM corresponds to the large version.
+
+ | #Params | PIAF (fr) | KorQuAD | SQuAD-it |
| MiniLM (Wang et al., 2020) | 66M | 58.9 / 34.3 | 53.3 / 40.5 | 72.0 / 57.7 |
| mBert (Devlin et al., 2019) | 110M | 64.4 / 42.5 | - | 74.1 / 62.5 |
| CamemBERT (Martin et al., 2020) | 340M | 68.9 / - | N/A | N/A |
| MiniLM+synth | 66M | 58.6 / 34.5 | 52.1 / 39.0 | 71.3 / 58.0 |
| MiniLM+synth-trans | 66M | 63.9 / 40.6 | 60.0 / 48.8 | 74.5 / 62.0 |
| XLM-R+synth-trans | 340M | 72.1 / 47.1 | 63.0 / 52.8 | 80.4 / 67.6 |
+
+Table 4: Zero-shot results (F1 / EM) on PIAF, KorQuAD and SQuAD-it for our different QA models, compared to various baselines. For mBert on SQuAD-it, we report the score from Croce et al. (2018). Note that CamemBERT is a French version of RoBERTa, an architecture widely outperforming BERT.
+
+more languages are made available during training. This shows that when all the languages are present in the synthetic data, the model immediately develops cross-lingual abilities.
+
+However, it appears that even with only one language pair present, the model is able to develop a cross-lingual ability that brings benefits on other languages: of Figure 2, we can see that most of the improvement is happening given only one cross-lingual language pair (i.e. English and Spanish).
+
+Unseen Languages To measure the benefit of our approach on unseen languages (i.e. not present in the synthetic data from MLQA/XQuAD), we test our models on three QA evaluation sets: PIAF (fr), KorQuAD and SQuAD-it (see Section 3.3). The results are consistent with the previous experiments on MLQA and XQuAD. Our MiniLM $^+$ synth-trans model outperforms its baseline by more than 4 Exact Match points, while XLM- $\mathbf{R}_{+}$ synth-trans obtains a new state-of-the-art.Notably, our multilingual XLM- $\mathbf{R}_{+}$ synth-trans outperforms CamemBERT on PIAF, even if the latter is a pure monolingual, in-domain language model.
+
+On the correlation between BLEU4 and QA scores To measure the impact of the quality of the generated questions on the QA performance, we computed the Pearson correlation between the BLEU4 and the QA scores. The coefficient is equal to 0.65 $(p < .001)$ . When we observe the correlations grouping the samples w.r.t. their language question (i.e. the rows in Table 2), we obtain: en 0.94; es 0.84; de 0.46; ar 0.36; hi 0.33; vi 0.73; zh 0.92. We observe stronger correlation for languages with higher BLEU scores (i.e en & zh), and lower for the Arab that had the lowest BLEU, indicating an impact on the final QA score in par to the quality of the synthetic questions.
+
+Differences with Shakeri et al. (2020) A very recent work has addressed multilingual QA with a very similar approach. However, we note a major difference in our respective experiments regarding the choice for the QA and QG models. Shakeri et al. (2020) choose mBert for QA and T5-m for QG. We would like to emphasize that because T5-m significantly outperforms mBert it is not clear where the improvement comes from: is it due to the proposed approach, or simply from a distillation effect from T5-m to mBert? In our case, we
+
+
+Figure 1: Left: F1 score on MLQA, for models with different number of synthetic data in two setups: for All Languages, the synthetic questions are sampled among all the five languages in MLQA; for Not All Languages, the synthetic questions are sampled progressively from only one language, two, ..., to all five for the last point, which corresponds to All Languages. We report the standard deviation over five different permutations of the language ordering. Note that, as expected, the more the synthetic data, the lower the variance in the results. Right: same as on the left, but evaluated on XQuAD.
+
+
+
+
+Figure 2: The relative variation in performance for the models in Figure 1.
+
+deliberately used MiniLM for both QA and QG: this allows a fairer investigation about the benefits of the proposed approach.
+
+Hidden distillation effect The relative improvement for our best synthetic configuration $+$ synthtrans, over the baseline, is above $60\%$ EM for MiniLM (from 29.5 to 49.5 on XQuAD and from 26.0 to 41.4 on MLQA). Significantly higher than that observed for XLM-R $(+11.7\%)$ on XQuAD and $+2.71\%$ on MLQA), it indicates that XLM-R provides superior cross-lingual transfer abilities than MiniLM, a fact that we hypothesize due to distillation. Such loss of generalisation can be difficult to identify, and opens questions for future work.
+
+QA, an unsolved task for lower resource languages Factoid QA tasks have been criticized for
+
+being a too easy task: the answer can often be identified given simple heuristics: e.g. a "When" question is answered by one of the "date" spans in the context (Kočisky et al., 2018; Kwiatkowski et al., 2019). SQuAD-v2 was for instance introduced to increase the difficulty of the task by adding unanswerable questions. The research community is now moving towards the construction of long context questions and non-factoid QA datasets (Dulceanu et al., 2018; Hashemi et al., 2019; Fan et al., 2019; Lewis et al., 2020b). In any case, the motivation of this work was to cope for the lack of training data for under-served languages in the QA domain which was severely impacting models performance. Therefore, potential criticisms regarding the simplicity of the task do not apply if seen from a lower-resource language scenario: our work deals with alleviating the lack of native training data, allowing us to focus our future work on further important issues such as domain adaptation, robustness and explainability in low-resource contexts.
+
+# 6 Conclusion
+
+In this work, we presented a method to generate synthetic QA dataset in a multilingual fashion, showing how QA models can benefit from it and reporting large improvements over the baselines. The proposed approach contributes to fill the gap between English and other languages, and is shown to generalize for languages not present in the synthetic corpus (e.g. French, Italian, Korean).
+
+In future work, we plan to investigate whether the proposed data augmentation method could be applied to other multilingual tasks, such as classification. We will also experiment more in depth with different strategies to control the target language of a model, and extrapolate on unseen ones.
+
+# 7 Acknowledgments
+
+Djamé Seddah was partly funded by the French Research National Agency via the ANR project ParSiTi (ANR-16-CE33-0021), Arij Riabi was partly funded by Benoit Sagot's chair in the PRAIRIE institute as part of the French national agency ANR "Investissements d'avir" programme (ANR-19-P3IA-0001) and by the Counter H2020 European project (grant 101021607).
+
+# References
+
+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.
+Mikel Artetxe, Sebastian Ruder, and Dani Yogatama. 2020. On the cross-lingual transferability of monolingual representations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4623–4637, Online. Association for Computational Linguistics.
+Houda Bouamor, Hanan Alshikhabobakr, Behrang Mohit, and Kemal Oflazer. 2014. A human judgement corpus and a metric for arabic mt evaluation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 207-213.
+Laurie Burchell, Jie Chi, Tom Hosking, Nina Markl, and Bonnie Webber. 2020. Querent intent in multi-sentence questions. arXiv preprint arXiv:2010.08980.
+Alexander Buslaev, Vladimir I Iglovikov, Eugene Khvedchenya, Alex Parinov, Mikhail Druzhinin, and Alexandr A Kalinin. 2020. *Albumentions: fast and flexible image augmentations.* Information, 11(2):125.
+Zewen Chi, Li Dong, Furu Wei, Wenhui Wang, Xian-Ling Mao, and Heyan Huang. 2020. Cross-lingual natural language generation via pre-training. In AAAI, pages 7570-7577.
+Eunsol Choi, He He, Mohit Iyyer, Mark Yatskar, Wentau Yih, Yejin Choi, Percy Liang, and Luke Zettlemoyer. 2018. QuAC: Question answering in context. In Proceedings of the 2018 Conference on
+
+Empirical Methods in Natural Language Processing, pages 2174-2184, Brussels, Belgium. Association for Computational Linguistics.
+Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishray Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8440-8451, Online. Association for Computational Linguistics.
+Danilo Croce, Alexandra Zelenanska, and Roberto Basili. 2018. Neural learning for question answering in Italian. In AI*IA 2018 - Advances in Artificial Intelligence, pages 389-402, Cham. Springer International Publishing.
+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.
+Li Dong, Nan Yang, Wenhui Wang, Furu Wei, Xiaodong Liu, Yu Wang, Jianfeng Gao, Ming Zhou, and Hsiao-Wuen Hon. 2019. Unified language model pre-training for natural language understanding and generation. In Advances in Neural Information Processing Systems, pages 13063-13075.
+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.
+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.
+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 Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 2368-2378, Minneapolis, Minnesota. Association for Computational Linguistics.
+Nan Duan, Duyu Tang, Peng Chen, and Ming Zhou. 2017. Question generation for question answering.
+
+In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 866-874, Copenhagen, Denmark. Association for Computational Linguistics.
+Andrei Dulceanu, Thang Le Dinh, Walter Chang, Trung Bui, Doo Soon Kim, Manh Chien Vu, and Seokhwan Kim. 2018. PhotoshopQuiA: A corpus of non-factoid questions and answers for why-question answering. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018), Miyazaki, Japan. European Language Resources Association (ELRA).
+Angela Fan, Yacine Jernite, Ethan Perez, David Grangier, Jason Weston, and Michael Auli. 2019. ELI5: Long form question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3558-3567, Florence, Italy. Association for Computational Linguistics.
+Germain Forestier, François Petitjean, Hoang Anh Dau, Geoffrey I Webb, and Eamonn Keogh. 2017. Generating synthetic time series to augment sparse datasets. In 2017 IEEE international conference on data mining (ICDM), pages 865-870. IEEE.
+David Golub, Po-Sen Huang, Xiaodong He, and Li Deng. 2017. Two-stage synthesis networks for transfer learning in machine comprehension. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 835-844, Copenhagen, Denmark. Association for Computational Linguistics.
+Helia Hashemi, Mohammad Aliannejadi, Hamed Zamani, and W. Bruce Croft. 2019. Antique: A non-factoid question answering benchmark.
+Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. 2015. Teaching machines to read and comprehend. In Advances in neural information processing systems, pages 1693-1701.
+Junjie Hu, Sebastian Ruder, Aditya Siddhant, Graham Neubig, Orhan First, and Melvin Johnson. 2020. Xtreme: A massively multilingual multi-task benchmark for evaluating cross-lingual generalization. arXiv preprint arXiv:2003.11080.
+Rachel Keraron, Guillaume Lancrenon, Mathilde Bras, Frédéric Allary, Gilles Moyse, Thomas Scialom, Edmundo-Pavel Soriano-Morales, and Jacopo Staiano. 2020. Project PIAF: Building a native French question-answering dataset. In Proceedings of the 12th Language Resources and Evaluation Conference, pages 5481-5490, Marseille, France. European Language Resources Association.
+Nitish Shirish Keskar, Bryan McCann, Lav R Varshney, Caiming Xiong, and Richard Socher. 2019. Ctrl: A conditional transformer language model for controllable generation. arXiv preprint arXiv:1909.05858.
+
+Tomáš Kocisky, Jonathan Schwarz, Phil Blunsom, Chris Dyer, Karl Moritz Hermann, Gábor Melis, and Edward Grefenstette. 2018. The NarrativeQA reading comprehension challenge. Transactions of the Association for Computational Linguistics, 6:317-328.
+Vishwajeet Kumar, Nitish Joshi, Arijit Mukherjee, Ganesh Ramakrishnan, and Preethi Jyothi. 2019. Cross-lingual training for automatic question generation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4863–4872, Florence, Italy. Association for Computational Linguistics.
+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.
+Dongyub Lee, Myeongcheol Shin, Taesun Whang, Seungwoo Cho, Byeongil Ko, Daniel Lee, Eunggyun Kim, and Jaechoon Jo. 2020. Reference and document aware semantic evaluation methods for korean language summarization. In Proceedings of COLING 2020, the 30th International Conference on Computational Linguistics: Technical Papers. The COLING 2020 Organizing Committee.
+Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. 2019. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461.
+Patrick Lewis, Barlas Oguz, Rudy Rinott, Sebastian Riedel, and Holger Schwenk. 2020a. MLQA: Evaluating cross-lingual extractive question answering. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7315-7330, Online. Association for Computational Linguistics.
+Patrick Lewis, Ethan Perez, Aleksandara Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. 2020b. Retrieval-augmented generation for knowledge-intensive nlp tasks. arXiv preprint arXiv:2005.11401.
+Seungyoung Lim, Myungji Kim, and Jooyoul Lee. 2019. Korquad1. 0: Korean qa dataset for machine reading comprehension. arXiv preprint arXiv:1909.07005.
+Louis Martin, Benjamin Muller, Pedro Javier Ortiz Suárez, Yoann Dupont, Laurent Romary, Éric de la Clergerie, Djamé Seddah, and Benoit Sagot. 2020. CamemBERT: a tasty French language model.
+
+In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7203-7219, Online. Association for Computational Linguistics.
+Jekaterina Novikova, Ondrej Dusek, Amanda Cercas Curry, and Verena Rieser. 2017. Why we need new evaluation metrics for NLG. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2241-2252, Copenhagen, Denmark. Association for Computational Linguistics.
+Lawrence Page, Sergey Brin, Rajeev Motwani, and Terry Winograd. 1999. The pagerank citation ranking: Bringing order to the web. Technical report, Stanford InfoLab.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
+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.
+Vasile Rus, Brendan Wyse, Paul Piwek, Mihai Lintean, Svetlana Stoyanchev, and Christian Moldovan. 2010. The first question generation shared task evaluation challenge. In Proceedings of the 6th International Natural Language Generation Conference.
+Thomas Scialom, Benjamin Piwowarski, and Jacopo Staiano. 2019. Self-attention architectures for answer-agnostic neural question generation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6027-6032, Florence, Italy. Association for Computational Linguistics.
+Thomas Scialom, Serra Sinem Tekiroglu, Jacopo Staiano, and Marco Guerini. 2020. Toward stance-based personas for opinionated dialogues. arXiv preprint arXiv:2010.03369.
+Siamak Shakeri, Noah Constant, Mihir Sanjay Kale, and Linting Xue. 2020. Multilingual synthetic question and answer generation for cross-lingual reading comprehension. arXiv preprint arXiv:2010.12008.
+Robert F Simmons. 1965. Answering english questions by computer: a survey. Communications of the ACM, 8(1):53-70.
+Elior Sulem, Omri Abend, and Ari Rappoport. 2018. BLEU is not suitable for the evaluation of text simplification. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 738-744, Brussels, Belgium. Association for Computational Linguistics.
+
+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.
+Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018. Glue: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353-355.
+Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan Yang, and Ming Zhou. 2020. Minilm: Deep self-attention distillation for task-agnostic compression of pre-trained transformers. arXiv preprint arXiv:2002.10957.
+Qingyu Zhou, Nan Yang, Furu Wei, Chuanqi Tan, Hangbo Bao, and Ming Zhou. 2017. Neural question generation from text: A preliminary study. In National CCF Conference on Natural Language Processing and Chinese Computing, pages 662-671. Springer.
+
+# Appendix
+
+# A On target language control for text generation
+
+When relying on the translated versions of SQuAD, the target language for generating synthetic questions can easily be controlled, and results in fluent and relevant questions in the different languages. However, one limitation of this approach is that synthetic questions can only be generated in the languages that were available during training: the $<\text{LANG}>$ prompts are special tokens that are randomly initialised when fine-tuning QG on SQuAD $trans;qq$ : before fine-tuning, they bear no semantic relation with the corresponding language names ("English", "Espanol" etc.), thus the learned representations for the $<\text{LANG}>$ tokens are limited to the languages present in the training set.
+
+To the best of our knowledge, no method allows so far to generalize this target control to an unseen language. It would be valuable, for instance, to be able to generate synthetic data in Korean, French and Italian, without having to translate the entire SQuAD—en dataset in these three languages to then fine-tune the QG model.
+
+To this purpose, we report – alas, as a negative result – the following attempt: instead of controlling the target language with a special, randomly initialised, token, we used a token semantically related to the language-word: “English”, “Espanol” for Spanish, or “中文” for Chinese. The intuition is that the model might adopt the correct language at inference, even for a target language unseen during training. A similar intuition has been explored in GPT-2: the authors report an improvement for summarization when the input text is followed by “TL;DR” (i.e. Too Long Didn’t Read).
+
+At inference time, we evaluated this approach on French with the prompt language=François. Unfortunately, the model did not succeed to generate text in French. Controlling the target language in the context of multilingual text generation remains under-explored, and progress in this direction could have direct applications to improve this work, and beyond.
+
+# B Question Generation Scores
+
+We report the BLEU-4 scores for MLQA on $\mathrm{QG}_{\mathrm{synth + trans}}$ on Table 5 and $\mathrm{QG}_{\mathrm{synth}}$ on Table 6.
+
+| q/c | en | es | de | ar | hi | vi | zh |
| en | 14.5 | 8.9 | 7.2 | 5.9 | 6.5 | 8.4 | 6.0 |
| es | 9.0 | 10. | 6.6 | 4.2 | 5.9 | 6.3 | 4.6 |
| de | 6.2 | 4.8 | 6.3 | 3.1 | 3.7 | 5.0 | 3.2 |
| ar | 2.8 | 2.2 | 2.4 | 3.3 | 2.0 | 2.3 | 2.1 |
| hi | 7.9 | 6.7 | 6.6 | 5.8 | 8.3 | 6.6 | 5.2 |
| vi | 9.1 | 7.3 | 7.2 | 6.0 | 6.5 | 12.3 | 6.1 |
| zh | 9.2 | 8.0 | 7.8 | 6.1 | 7.2 | 8.0 | 15.0 |
+
+Table 5: BLEU4 scores on MLQA test for $\mathrm{QG}_{\mathrm{synth + trans}}$ model.
+
+| q/c | en | es | de | ar | hi | vi | zh |
| en | 21.7 | 4.73 | 4.58 | 2.47 | 2.58 | 3.02 | 3.11 |
| es | 0.8 | 1.23 | 0.38 | 0.0 | 0.0 | 0.22 | 0.11 |
| de | 1.4 | 0.85 | 1.32 | 0.0 | 0.0 | 0.22 | 0.0 |
| ar | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| hi | 0.0 | 0.21 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| vi | 0.55 | 0.5 | 0.25 | 0.0 | 0.0 | 0.34 | 0.0 |
| zh | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
+
+Table 6: BLEU-4 scores on MLQA test for $\mathrm{QG}_{\mathrm{synth}}$ model.
+
+| q/c | en | es | de | ar | hi | vi | zh |
| en | 83.9 | 74.8 | 70.1 | 67.8 | 72.3 | 74.1 | 69.3 |
| es | 78.0 | 74.3 | 68.1 | 63.6 | 67.4 | 67.6 | 69.1 |
| de | 75.6 | 72.9 | 70.1 | 65.0 | 67.5 | 68.5 | 70.4 |
| ar | 61.3 | 58.4 | 56.8 | 66.7 | 57.7 | 56.5 | 69.8 |
| hi | 70.9 | 62.1 | 58.9 | 56.8 | 70.9 | 61.3 | 69.2 |
| vi | 71.0 | 64.1 | 60.5 | 59.7 | 63.7 | 74.7 | 69.9 |
| zh | 67.1 | 62.5 | 59.0 | 56.7 | 60.7 | 63.2 | 69.3 |
+
+Table 7: F1 score on MLQA for XLM-R model finetuned on $\mathrm{SQuAD_{en}}$ .
+
+| q/c | en | es | de | ar | hi | vi | zh |
| en | 83.9 | 75.4 | 70.9 | 68.9 | 72.8 | 75.6 | 66.8 |
| es | 81.0 | 74.4 | 71.8 | 66.6 | 70.2 | 72.5 | 65.7 |
| de | 81.4 | 75.2 | 70.8 | 69.3 | 70.2 | 74.4 | 65.1 |
| ar | 76.3 | 68.9 | 67.3 | 66.6 | 65.4 | 70.4 | 61.7 |
| hi | 78.5 | 70.5 | 64.5 | 63.6 | 70.8 | 71.1 | 63.2 |
| vi | 78.0 | 72.0 | 66.4 | 65.2 | 68.5 | 74.7 | 64.5 |
| zh | 77.8 | 70.1 | 67.0 | 64.9 | 68.1 | 71.8 | 67.7 |
+
+Table 8: F1 score on MLQA for XLM- $\mathbf{R}_{+\mathrm{synth - trans}}$ model.
+
+In addition, we report the F1 scores for XLM-R finetuned on SQuADen and XLM- $\mathbf{R}_{+\mathrm{synth - trans}}$ on all the language pairs, on both MLQA and XQuAD in Tables 7, 8, 9 and 10.
+
+# C Qualitative Evaluation
+
+We report in Tables 11, 12, and 13 different examples that we analysed in our manual qualitative analysis, discussed at the end of section 5.1 in the main paper.
+
+| q/c | en | es | de | ar | hi | vi | zh | ru | th | tr | el |
| en | 87.4 | 82.0 | 80.7 | 75.6 | 79.0 | 78.1 | 73.0 | 79.0 | 73.2 | 74.8 | 79.9 |
| es | 80.6 | 84.2 | 76.2 | 71.3 | 72.7 | 72.8 | 67.5 | 76.4 | 69.6 | 70.6 | 75.8 |
| de | 79.8 | 76.4 | 83.5 | 71.0 | 72.9 | 72.4 | 68.1 | 75.6 | 68.3 | 71.4 | 75.5 |
| ar | 65.3 | 63.1 | 62.0 | 77.8 | 64.1 | 61.9 | 58.8 | 63.9 | 62.8 | 57.4 | 65.2 |
| hi | 72.9 | 64.8 | 65.7 | 63.7 | 75.8 | 64.0 | 61.8 | 66.9 | 63.5 | 59.6 | 67.2 |
| vi | 74.5 | 69.8 | 70.7 | 67.7 | 67.7 | 80.6 | 66.9 | 70.5 | 66.6 | 64.8 | 70.6 |
| zh | 70.7 | 65.8 | 64.1 | 64.1 | 65.6 | 67.4 | 81.8 | 67.4 | 64.8 | 60.8 | 66.9 |
| ru | 79.8 | 78.0 | 76.7 | 70.2 | 72.5 | 74.6 | 67.3 | 81.1 | 69.6 | 70.7 | 75.6 |
| th | 49.6 | 42.1 | 44.1 | 49.8 | 51.9 | 49.0 | 53.9 | 50.4 | 74.9 | 37.1 | 48.8 |
| tr | 72.6 | 64.9 | 68.5 | 65.5 | 68.1 | 64.1 | 62.4 | 70.3 | 64.3 | 76.7 | 71.3 |
| el | 70.8 | 69.1 | 69.3 | 63.3 | 65.6 | 65.0 | 63.0 | 70.8 | 64.2 | 62.3 | 81.3 |
+
+Table 9: F1 score on XQuAD for XLM-R model finetuned on SQuADen.
+
+| q/c | en | es | de | ar | hi | vi | zh | ru | th | tr | el |
| en | 87.0 | 82.9 | 81.6 | 77.8 | 81.5 | 81.0 | 77.5 | 80.9 | 77.7 | 74.8 | 81.4 |
| es | 83.5 | 84.1 | 79.2 | 74.9 | 78.0 | 78.7 | 76.5 | 78.9 | 76.3 | 72.7 | 78.8 |
| de | 82.8 | 80.3 | 83.1 | 75.1 | 77.3 | 78.3 | 75.1 | 78.4 | 75.7 | 72.9 | 78.3 |
| ar | 78.4 | 77.2 | 75.6 | 77.5 | 72.8 | 74.3 | 72.1 | 74.2 | 72.5 | 69.5 | 74.2 |
| hi | 80.6 | 77.5 | 76.4 | 71.6 | 77.5 | 75.2 | 73.9 | 76.3 | 73.6 | 70.2 | 75.9 |
| vi | 81.3 | 79.6 | 77.5 | 73.0 | 75.6 | 80.7 | 74.7 | 76.5 | 74.5 | 71.8 | 76.0 |
| zh | 80.2 | 78.3 | 76.9 | 72.1 | 74.3 | 76.1 | 85.1 | 77.0 | 74.1 | 70.1 | 75.7 |
| ru | 82.2 | 80.4 | 78.8 | 74.1 | 75.9 | 78.4 | 76.5 | 80.8 | 75.4 | 72.9 | 78.6 |
| th | 79.1 | 76.7 | 75.1 | 71.0 | 73.5 | 75.1 | 73.6 | 75.3 | 77.2 | 68.8 | 74.1 |
| tr | 80.2 | 77.7 | 76.4 | 71.9 | 74.6 | 74.2 | 74.7 | 77.8 | 73.3 | 75.2 | 75.6 |
| el | 82.0 | 80.1 | 78.5 | 73.8 | 77.3 | 77.3 | 75.4 | 78.6 | 75.3 | 72.2 | 80.1 |
+
+Table 10: F1 score on XQuAD for XLM- $\mathbf{R}_{+\mathrm{synth - trans}}$ model.
+
+Paragraph Kochi was the centre of Indian spice trade for many centuries, and was known to the Yavanas (Greeks and Romans) as well as Jews, Syrians, Arabs, and Chinese since ancient times. It rose to significance as a trading centre after the port Muziris around Kodungallur (Cranganore) was destroyed by massive flooding of Periyar in 1341. The earliest documented references to Kochi occur in books written by Chinese voyager Ma Huan during his visit to Kochi in the 15th century as part of Admiral Zheng He's treasure fleet. There are also references to Kochi in accounts written by Italian traveller Niccolò Da Conti, who visited Kochi in 1440.
+
+Answer massive flooding of Periyar
+
+$\mathbf{QG}_{\mathrm{synth + trans}}$ (target language $=$ de) Welche Veranstaltung hat den Angriff auf Kochi im Jahr 1341 verursacht? (tr: Which event caused the attack on Kochi in 1341?)
+
+$\mathbf{QG}_{\mathrm{synth + trans}}$ (target language $= \mathbf{ar}$ ) $\S \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山} \text{山}$ (tr: What event caused the destruction of Kathmandu?)
+
+Answer Ma Huan
+
+$\mathbf{QG}_{\mathrm{synth + trans}}$ (target language $=$ de) Welcher chinesische traveller hat die frühesten Erinnerungen an Kochi geschrieben? (tr: Which Chinese traveler wrote the earliest memories of Kochi?)
+
+$\mathbf{QG}_{\mathrm{synth + trans}}$ (target language $=$ ar) $\S 15$ JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
+
+Table 11: Paragraph 1 and different questions analysed during out human evaluation.
+
+| Paragraph Portuguese navigator, Pedro Álvares Cabral founded the first European settlement in India at Kochi in 1500. From 1503 to 1663, Fort Kochi (Fort Emmanuel) was ruled by Portugal. This Portuguese period was a harrowing time for the Saint Thomas Christians and the Jews, as the Inquisition was active in Portuguese India. Kochi hosted the grave of Vasco da Gama, the first European explorer to set sail for India, who was buried at St. Francis Church until his remains were returned to Portugal in 1539. The Portuguese rule was followed by that of the Dutch who renamed Fort Immanuel as Fort Stormsburg. In meantime, the Royal Family of Kochi relocated the capital of Kochi Kingdom to Thrissur, leaving nominal authority over Islands of Kochi. In 1664, Fort Kochi Municipality was established by Dutch, making it the first municipality in Indian subcontinent, which got dissolved when Dutch authority got weaker in the 18th century. The remaining part of Kochi were governed by governors of Kochi Kingdom. By 1773, the Mysore ruler Hyder Ali extended his conquest in the Malabar region to Kochi forcing it to become a tributary of Mysore. The hereditary Prime Ministership of Kochi held by the Paliath Achans ended during this period. |
| Answer Pedro Álvares Cabral
+QGsynth+trans (target language = de) Wer hat die ersten europäische Siedlung in Kochi gegrundet? (tr: Who founded the first European settlement in Kochi?)
+QGsynth+trans (target language = ar) §1500 würdig führte insgesamt 2.000 tätte währliche Obergrenzungen (tr: Who founded the first European settlement in India in the year 1500?) |
| Answer St. Francis Church
+QGsynth+trans (target language = de) Wo wurde Vasco da Gama begaben? (tr: Where was Vasco da Gama buried?)
+QGsynth+trans (target language = ar) § da Gama ländert dem Schlüssel führte insgesamt 2.000 tätte währliche Obergrenzungen (tr: Where was Vazaw da Gama buried?) |
| Answer Hyder Ali
+QGsynth+trans (target language = de) Wer war der Herrscher von Mysore im Jahr 1773? (tr: Who was the ruler of Mysore in 1773?)
+QGsynth+trans (target language = ar) §1773 würdig führte insgesamt 2.000 tätte währliche Obergrenzungen (tr: Who was the ruler of Mysore in 1773?) |
+
+Table 12: Paragraph 2 and different questions analysed during out human evaluation.
+
+| Paragraph Taiwan is an island country in East Asia. The main island, known historically as Formosa, makes up 99% of the area controlled by the ROC, measuring 35,808 square kilometres (13,826 sq mi) and lying some 180 kilometres (112 mi) across the Taiwan Strait from the southeastern coast of mainland China. The East China Sea lies to its north, the Philippine Sea to its east, the Luzon Strait directly to its south and the South China Sea to its southwest. Smaller islands include a number in the Taiwan Strait including the Penghu archipelago, the Kinmen and Matsu Islands near the Chinese coast, and some of the South China Sea Islands. |
| Answer 99%
+QGsynth+trans (target language = de) Welcher Prozentsatz der Gebiete von Taiwan wird von der ROK kontrolliert?
+(tr: What percentage of the areas of Taiwan is controlled by the ROK?)
+QGsynth+trans (target language = ar) §(dω) ∑LJ LLa (tr: What is the percentage of lands controlled by the (Divan)? |
| Answer 35,808 square kilometres
+QGsynth+trans (target language = de) Wie groß ist die RAF? (tr: How big is the RAF?)
+QGsynth+trans (target language = ar) §(dω) ∑LJ LZ (tr: How many square miles is the island?) |
| Answer Luzon Strait
+QGsynth+trans (target language = de) Welcher Fluss ist direkt zum Süden von Taiwan? (tr: Which river is directly to the south of Taiwan?)
+QGsynth+trans (target language = ar) §(dω) ∑LJ LLa (tr: What is the name of the nearby railway?) |
| Answer South China Sea
+QGsynth+trans (target language = de) Welches Meer ist im Südwesten von Taiwan? (tr: Which sea is in southwest of Taiwan?)
+QGsynth+trans (target language = ar) §(dω) ∑LJ LZ (tr: What is the ocean seen on the western side of Taiwan?) |
| Answer 180 kilometres
+QGsynth+trans (target language = de) Wie welt ist die RAF von Taiwan aus der sudlichen Küste von China? (tr: How far is the RAF from Taiwan from the southern coast of China?)
+QGsynth+trans (target language = ar) §(dω) ∑LJ LZ (tr: How long are the Taiwan Islands from the coast of China?) |
+
+Table 13: Paragraph 3 and different questions analysed during out human evaluation.
+
+
+Figure 3: SQuAD-it
+
+
+Figure 4:PIAF (fr)
+
+
+Figure 5: KorQuAD
+
+# D Learning Curves for Unseen Languages
+
+We show on Figures 3,4,5 the results of three learning curves for respectively SQuAD-it, PIAF (fr) and KorQuad where the models are trained on different amount of synthetic questions in our All Languages setting.
+
+The synthetic questions are sampled among all the five languages in MLQA. The standard deviation over four different seeds for the sampling are displayed through the confidence interval (light blue) around the averaged main curves. We observe that for SQuAD-it and KorQuAD the performances increase significantly at the beginning, then remain mostly stable, while for PIAF (fr) the best performances are obtained with 100k of additional synthetic data, a slight improvement from 50k additional questions before starting to decrease.
\ No newline at end of file
diff --git a/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/images.zip b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..255d83593c04524caa3d3f91a3ce269645bda707
--- /dev/null
+++ b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:500b629bb60e693e303484f69c60d51b810beb2cf1c539ef61b32194fb6fc279
+size 892820
diff --git a/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/layout.json b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..a8a122d5ff339f1b5789bd10dfe47b677024fd7a
--- /dev/null
+++ b/syntheticdataaugmentationforzeroshotcrosslingualquestionanswering/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0ec5c348dd1ab4e4fc514e2a6d9c7d4881337397f17659e00fb73200b51399dd
+size 451048
diff --git a/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/4eabcb84-bd8b-447d-948e-95d6f1362586_content_list.json b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/4eabcb84-bd8b-447d-948e-95d6f1362586_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..813ca00dc15c5cd854c6ab7c9b16d6b8fef371c8
--- /dev/null
+++ b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/4eabcb84-bd8b-447d-948e-95d6f1362586_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6727590a76465282e798f333716fd1ed185392a5679537eb5a32d9316bbfbc13
+size 81289
diff --git a/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/4eabcb84-bd8b-447d-948e-95d6f1362586_model.json b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/4eabcb84-bd8b-447d-948e-95d6f1362586_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..cee173901721ffeccf8b934bad4df5acc29179a3
--- /dev/null
+++ b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/4eabcb84-bd8b-447d-948e-95d6f1362586_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:978a63dfd63fa0d5f143bcfe457ce9a11cfe3226f78f5dc25dda2cd70df675d3
+size 97023
diff --git a/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/4eabcb84-bd8b-447d-948e-95d6f1362586_origin.pdf b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/4eabcb84-bd8b-447d-948e-95d6f1362586_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..35c43eee93880bcf2aef93f11b6e345d6b4de7e8
--- /dev/null
+++ b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/4eabcb84-bd8b-447d-948e-95d6f1362586_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3a44d5e0493aac6436a7ced65b71c183c92c0c17dee5b4cbc7366e21a497eb8a
+size 463011
diff --git a/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/full.md b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..35bf96ea1f61938b6b0af2b0b4b0aed25038f815
--- /dev/null
+++ b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/full.md
@@ -0,0 +1,289 @@
+# Synthetic Textual Features for the Large-Scale Detection of Basic-level Categories in English and Mandarin
+
+Yiwen Chen and Simone Teufel
+
+Department of Computer Science and Technology
+
+University of Cambridge
+
+CB3 0FD JJ Thomson Road UK
+
+{yc429,sht25}@cl.cam.ac.uk
+
+# Abstract
+
+Basic-level categories (BLC) are an important psycholinguistic concept introduced by Rosch et al. (1976); they are defined as the most inclusive categories for which a concrete mental image of the category as a whole can be formed, and also as those categories which are acquired early in life. Rosch's original algorithm for detecting BLC (called cue-validity) is based on the availability of semantic features such as 'has tail' for 'cat', and has remained untested at large. An at-scale algorithm for the automatic determination of BLC exists, but it operates without Rosch-style semantic features, and is thus unable to verify Rosch's hypothesis. We present the first method for the detection of BLC at scale that makes use of Rosch-style semantic features. For both English and Mandarin, we test three methods of generating such features for any synset within Wordnet (WN): extraction of textual features from Wikipedia pages, Distributional Memory (DM) and BART. The best of our methods outperforms the current SoA in BLC detection, with an accuracy of English BLC detection of $75.0\%$ , and of Mandarin BLC detection $80.7\%$ on a test set. When applied to all of WordNet, our model predicts that 1,118 synsets in English Wordnet $(1.4\%)$ are BLC, far fewer than existing methods, and with a precision improvement of over $200\%$ over these. As well as confirming the usefulness of Rosch's cue validity algorithm, we also developed and evaluated our own new indicator for BLC, which models the fact that BLC features tend to be BLC themselves.
+
+# 1 Introduction
+
+Rosch et al. (1976) introduced the concept of Basic Level Categories (BLC) to the psycholinguistic literature. She defined basic-level categories as the most general (inclusive) categories for which a concrete image can be formed, and hypothesised that the definition of concrete categories during
+
+
+Figure 1: Simplified Taxonomy of Concepts and Features.
+
+child development is based on semantic features of each individual in the child's perception. She performed separate human prediction experiments on shape, affordance (what she called motor program) and semantic features. Rosch also presented an algorithm for finding the level in a hierarchy where BLC concepts are located, based on an information-theoretically defined property called cue validity, which is calculable if one has access to semantic features for each concept.
+
+BLC categories are those that are maximally distinguished from their sibling categories by many features with strong distinctiveness. For example, in Fig. 1, the sibling BLC categories dog and cat have features such as good sense of smell and meows. Higher-level categories ("super") are more general and contain features such as uses metabolic exchange and does not perform photosynthesis, which are less distinctive because they apply to
+
+many individuals. When we look at the children of BLC ("sub"), we see that the features they contain are also less distinctive, but for the opposite reason: they are very specific and apply to few individuals. For instance, bulldog has few additional features that are not already covered by dog. This coincides with Rosch et al's definition of BLC as the highest category that allows for a visual image to be formed: we can hold an image of a dog in our mind, but not a single image of animal; animal is far too general. Rosch et al also connect BLC with an early age of acquisition, a claim that we will use operationally in this paper.
+
+Her discovery was enthusiastically followed up in the fields of psychology (Langacker, 1988; Barsalou, 1991), psycholinguistics (McRae et al., 2005), and sparked a plethora of theoretical (Mervis, 1987; Murphy, 2004; Győri, 2013) and experimental work (Roberts and Horowitz, 1986; Markman and Wisniewski, 1997; Green, 2003). In addition, modern NLP and computer vision research have also found the concept of BLC useful. Orhan et al. (2020) improved the accuracy of video categorisation, using a dataset containing 12 BLC. Mathews et al. (2015) applied BLC to visual concepts, which achieved good performance in the task of picture-to-word generation. Recently, the concept of BLC has also been used in word sense disambiguation (Legrand, 2006), visual object recognition (Wang and Cottrell, 2015) and transfer learning (Min et al., 2020).
+
+However, Rosch's work did not lend itself to experimental verification, as least not on a large scale. Rosch tested various "grounded" properties of BLC experimentally, for instance shape recall and recognition by semantic features, but her (carefully controlled) dataset only contained 9 superordinate categories and 27 BLC (90 concepts in total), its hierarchy being based on category norms (Battig and Montague, 1969; Van Overschelde et al., 2004). But what if we want to detect BLC in the large, say within most concepts occurring in a language? This would require a large-scale taxonomy such as WordNet (WN)(Miller, 1995), and indeed WN has been used for the only extant large-scale BLC study to date. But one of the challenges in verifying Rosch's theoretical property cue validity is the general unavailability of semantic features for all concepts used in language.
+
+Another obstacle to the automatic detection of BLC is the vague definition of the concept itself.
+
+While people's intuition tells us that BLC must exist, there is no fixed definition of exactly what makes a BLC. All that a researcher has to go by are a few dozen obvious examples for BLC. For instance, the original definition of "most abstract category for which a distinct image exists" is hard to operationalise. Therefore, there is no generally agreed-upon, large-scale set of BLC available to downstream research like video classification (Orhan et al., 2020). In this work, we address this gap by proposing a method of large-scale detection of BLC which is based on synthetic textual features.
+
+Since the 1970s, an empirically-defined source of potential features was introduced in the form of semantic feature norms (Rosch and Mervis, 1975; Ashcraft, 1978; McRae et al., 2005; Vinson and Vigliocco, 2008; Devereux et al., 2014; Buchanan et al., 2019). In this methodology, semantic features connected to a concept are elicited and collated from many human subjects.
+
+With the advent of distributional semantics methods, it has become possible to automatically generate semantic features resembling human features. Frassinelli and Keller (2012) showed that features generated from models such as Strudel (Baroni et al., 2010) are cognitively plausible; such features are able to represent the semantic context well enough to enable priming. More recently, powerful neural language models such as BERT and GPT have been shown to capture large-scale semantic contexts even better. The availability of different distributional semantic models allows us to empirically test whether Rosch et al.'s idea of cue validity holds true for a large set of concepts, as opposed to some clear-cut toy examples. We present an algorithm which has the ability to determine for each WN synset whether it is BLC or not, and compare three methods for generating synthetic features that are used in our algorithm.
+
+This is not a new task: Mills et al. (2018) were the first researchers to perform at-scale BLC classification of all synsets in WordNet. They used several features to do so, including the depth of a concept in WN. But solution differs from theirs because we create synthetic features and can thus directly use Rosch's original idea of cue validity to detect BLC. The features we create are rather different from those chosen by humans in semantic norm studies, and it is an empirical question whether our somewhat compromised form of cue
+
+validity is nevertheless able to identify BLC to a satisfactory degree. The answer given in this paper is that this is definitely so – for English, the precision of the algorithm more than doubles when our synthetic features are used, in comparison to the current state-of-the-art algorithm in BLC detection (Mills et al., 2018); for Mandarin, the results are numerically even better, although there is less evaluation data available yet. Overall, we interpret our results to mean that the features must capture important aspects of the concept.
+
+We also introduce a new indicator, which is based on the idea that if BLC are acquired in early childhood, then it's plausible that many of the features defining BLC could be BLC themselves, as these might be cognitively available to the child. We call this new indicator BLC/PageRank (BLC-PR), and realise it by a random walk in the WN graph. Section 4 presents our experiments for two languages: English, and Mandarin, where to our knowledge we are the first to present a BLC detection algorithm.
+
+# 2 Related work
+
+Cue validity (Brunswik, 1956) (CV) is defined as the conditional probability of a category given a feature. The cue validity of a specific category is the sum of all cue validity scores for each attribute of this category. Rosch et al. (1976) hypothesized that BLC have higher cue validity scores compared to other categories.
+
+There is some disagreement in the literature as to the borderline between BLC and other categories (Tanaka and Taylor, 1991) and the order of acquisition of BLC and superordinate categories. Rosch claimed that children learn BLC concepts earlier than other concepts, but Mandler produced evidence that only partially supports this statement. While the best performance in children across all ages was indeed for BLC, Mandler also found that some children were responsive to the superordinate and contextual categories (e.g. kitchen) very early on, even at only 12 months old. Our own study of the AoA list by (Kuperman et al., 2012) confirms that some superordinate categories such as "plant" and "furniture" are learnt before the age of 5. Other factors may play a role too: Langacker (1988) claimed that objects that lend themselves best to becoming BLC are those that are complex and possess structured information. There is also disagreement in the literature about the BLC-like
+
+superordinates in natural kinds such as fish, tree and bird, which Rosch counts as superordinates, but several researchers including ourselves consider BLC (Markman and Wisniewski, 1997).
+
+We will in this work rely on existing semantic feature norms derived experimentally. McRae et al. (2005) provided norms for 541 concepts (living and non-living objects) which they consider BLC. The norms were collected using 725 participants. Buchanan et al. (2019) extended these feature norms into 4,436 concepts with combination of terms from Vinson and Vigliocco (2008), who collected norms of verbs as well; however, Buchanan et al's list no longer attempts to include only BLC, but additionally included both superordinates and subordinates. Bulat et al. (2017) used 2,526 features from McRae et al. (2005)'s semantic norms to build semantic representations for metaphor identification.
+
+Motivated by the lack of large-scale feature norms, Frassinelli and Keller (2012) tested the performance of distributional semantic vector space (Baroni et al., 2010) for the task of generating properties for concepts in a visual world experiment. They measured eye fixations when participants looked at target concepts and established distracting contexts designed for priming participants. To create the contexts, they used three features generated by a distributional model. They observed that participants fixate on the target concept when listening to both the target and competitor word, and were thereby able to prove that the features automatically generated successfully biased the participants and therefore expressed the desired contexts sufficiently well.
+
+Mills et al. (2018) introduced a rule-based system for the detection of BLC via WordNet (Miller, 1995) and external knowledge such as frequency of words in Brown and Gutenberg corpora. When measured on a small test set of obvious cases from the literature, their model achieved an accuracy of $77\%$ . However, when run on the entire WN, it predicted that 13,082 synsets out of the total 82,115 synsets $(16\%)$ are BLC. This number seems far too high, and indeed, when they estimated the accuracy of their BLC detection on a subset of those 13,082 synsets, it was found that only $10.4\%$ are true positives. Their prediction was therefore that the entire WN contains only around 1,620 synsets. We can see from this experiment that the true difficulty in the BLC detection task may lie in achieving high
+
+| Indicator | Hypothesis |
| Word 2 Vec | BLC might profit from a representation of their semantic context. |
| Word Length in characters | BLC are expected to be expressed in short words, as they were presumably forged early in human cultural development. |
| Corpus Frequency | BLC should be overall frequent in language. |
| Age of Acquisition | BLC are expected to be acquired early in life. |
| Depth in WN | BLC have been hypothesised to be at medium level in WN (Mills et al., 2018). |
| Concreteness Rating | BLC must be concrete concepts. |
| Number of Sem. Features | BLC should have more semantic features than their subcategories or superordinate categories. |
| Cue-Validity | BLC should have high cue validity values (Rosch et al., 1976). |
| BLC/PageRank Value | The features of BLC should of- ten be BLC themselves (our novel claim). |
| Number of strokes | (Mandarin only): Characters expressing BLC concepts should have fewer brush strokes. |
+
+Table 1: Our Bilingual Indicators for BLC detection.
+
+precision.
+
+# 3 Approach
+
+We aim to identify BLC in English and Mandarin by more closely following Rosch's theoretical approach; our target is to directly test whether using the properties suggested by her helps in large-scale BLC detection. We recast the problem as a supervised ML task, in contrast to the rule-based system by Mills et al. (2018). We also want to test whether other theoretical hypotheses about BLC can be tested if suitable semantic features are available. We use the indicators listed in Tab. 1, six of which have been used in earlier work or are obvious. The remaining two indicators are somewhat more involved in independently worthy of study: one indicator simulates Rosch's cue validity concept, and the remaining one called BLC-PR is due to us. It follows the notion that if BLC are central, early-learnt concepts, then maybe the features associated with them could also be BLC themselves, which might help and reinforce the early acquisition of these concepts. We simulate this indicator using the PageRank algorithm.
+
+The indicators word length, corpus frequency, age of acquisition (AoA), concreteness rating and WN depth can be derived for English as well as for Mandarin, and do not require any semantic features. Word length means the number of letters
+
+and characters, for English and Mandarin respectively. Number of brushstrokes is only defined for Mandarin and expresses the intuition that culturally older, more important concepts would exhibit fewer brush strokes. We extracted the English frequency data from the American part of the Google Books corpus and Chinese one from the Tencent AI Lab embedding corpus (Song et al., 2018). Concreteness ratings were drawn from a list of 3 million rated word forms (Köper and im Walde, 2017), where each word has been given a 10-point rating from abstract (1) to concrete (10). We expect this to help in classification as BLC are by definition never abstract. We also use a 300-dimension standard Word2Vec representation (Mikolov et al., 2013) for English and 200-dimension one for Mandarin (Song et al., 2018). Despite not having interpretable dimensions, we hypothesise that such representations may capture context in an indirect manner.
+
+We applied Chinese Open WordNet (COW) (Wang and Bond, 2013), which was built on top of the synsets of English WN, to match Mandarin concepts to their English counterparts. COW contains 42,312 synsets, 27,888 of which are nouns, compared to the 82,115 nouns in WN. The acquisition age indicator we use is based on test-based age of acquisition norms of 30,000 words/senses with information of the age when children learned this word/sense (Kuperman et al., 2012)1 We successfully matched 22,138 of our (bilingual) WN synsets to the AoA test words/senses, as well to their concreteness ratings.
+
+The remaining indicators depend on our method of generating semantic features. We will therefore first describe how we generate the synthetic semantic features.
+
+# 3.1 Generation of Synthetic Features
+
+We test three feature generation methods against each other: Wikipedia Contexts, Features generated by DM, and BART. In all three methods, we only keep those semantic features which are nouns.
+
+The online encyclopedia Wikipedia has become one of the world's foremost sources of any kind of knowledge on anything, and it therefore provides a mirror of how humans understand (and maybe
+
+ | shark | house |
| Wikipedia | group, skeleton, gill, side, head, fin, clade, selachii | building, complexity, hut, structure, wood, masonry, concrete, material, plumbing, heating |
| DM | whale, grouper | view, office, countryside, croft, museum, family, estate, builder, gable |
| BART | gill, egg, whisker, swim, slime, tail, fish, scale, animal, fin, water | relax, family, place, live, friend |
| Human | animal, carnivore, danger, fin, fish, ocean, predator, tooth, sea | bathroom, bedroom, brick, door, family, home, kitchen, place, roof, room |
+
+Figure 2: Synthetic features generated by three models, and human features.
+
+form) concepts. We exploit this in using particular areas of the web pages which describe the concepts a Wikipedia page is dedicated to. We extract from these contexts all nouns except the concept itself2.
+
+The second type of synthetic feature we use comes from the distributional space Distributional Memory (DM), which is a more recent, larger and better-performing version of the afore-mentioned Strudel (Baroni and Lenci, 2010). DM uses relations and co-occurrence between words to describe words. It extracts distributional information from corpora (which are POS tagged and parsed) based on a set of weighted word-link-word tuples. Given a concept, DM outputs a series of triples, consisting of the concept itself, the generated feature, and the relation between the concept and the feature.
+
+BART provides our third set of synthetic features. Having access to the parallel data of concepts and their human-provided features (McRae et al., 2005; Buchanan et al., 2019), we can fine-tune the pretrained BART base model (Lewis et al., 2019) as a neural machine translation task to generate semantic features for words directly.
+
+How many such synthetic features we should use for our research is unclear. BART is able to learn how many features should be generated, but for the other two sources, we have to intervene by approximating the number of features using the only source we have available for this, the feature norms. We use the distributions of feature norms in Buchanan et al. (2019) to approximate the number of our synthetic features for Wikipedia (by thresholding the number of words) and for DM (by thresholding the scores given, after softmax-normalising them).
+
+Examples of the synthetic features created by our English method for concepts "shark" and "house" are shown in Fig. 2, and contrasted with those created by humans (from Buchanan's feature norms).
+
+We see that the features are very different in nature, but still appear to capture some important information about the concepts. We notice that Wikipedia often defines biological concepts by referring to technical terminology and formal zoological classifications; for example, "cetacea" and "Delphinidae" are features of the concept "dolphin". Such features are not commonly known and would be unlikely produced by a human in an elicitation experiments such as Buchanan et al's. Apart from these technical terms, Wikipedia features tend to contain a small number of high-quality features.
+
+DM, in contrast, favours paradigmatic concepts as features, i.e. those where the features and concept are likely to appear in a same context in a sentence. For instance, "whale" is a paradigmatic feature of "shark". At first glance, BART's synthetic features seem to be of the highest quality, although there are still some features that are less useful for our task, such as very abstract ones which carry little information, such as "noun" and "one".
+
+Even if the synthetic features appear to be quite unlike human-generated features, they can still capture information that is valuable for subsidiary tasks. In the fully automatic evaluation reported in section 4.2 using different data, we measure to which degree they contribute towards the final task of learning to detect BLC in the wild.
+
+# 3.2 Generation of Indicators for ML
+
+Once we have the list of features for each method, we calculate the feature-dependent indicators as follows:
+
+Number of Features - This can be directly read off.
+
+Cue Validity (CV) - If a category has $n$ features, $f_{i} \subset \{f_{1}, f_{2}, \dots, f_{n}\}$ , the cue validity for the given category is the sum of probability of $f_{i}$ .
+
+BLC-PR - Each concept and feature are treated as a node, and an edge is connected between nodes if the feature belongs to one concept. We set the initial weight of each node is 1 and the damping
+
+factor is set to 0.85. By calculating PageRank using a random walk, the importance (or "BLC-ness") of nodes are estimated.
+
+We will now sanity-check the quality of the synthetic features in isolation, under the assumption that the human features in combination with Cue Validity and BLC-PR should work best at determining BLC (and the assumption that CV and BLC-PR work). Keeping all other aspects constant, we want to find out which of the synthetic features, if any, is the most useful at learning BLC at large. To do so, we use a carefully constructed development set with 40 English concepts, shown in Table 2. For this set, we have human features available. Following our own intuitions, we hand-picked 10 concepts each for abstract, subordinate, superordinate and BLC concepts from the concepts provided by Buchanan et al. (2019).
+
+Of course, as we treat senses and not word forms, WSD is an issue for us. For the small development dataset, we perform manual WSD on all 340 features and 40 concepts, but in the automatic mode, we perform WSD by always choosing the first-sense synset for each concept3.
+
+We can use the small dataset of 40 concepts to find out how much the synthetic features resemble the human features, which we consider our gold standard, and each other. We use the Jacquard Distance for doing so (Jaccard, 1912). This confirms BART's relative advantage; its features are closest to the human GS by this metric (0.069), more than Wikipedia (0.054) and DM (0.015), but overall we have to concede that neither of the synthetic features is close to the humans. Compared to each other, BART is most dissimilar to DM (0.007), and most similar to Wikipedia (0.036), whereas DM
+
+| Source | Category | Cue Validity | BLC-PR |
| Human | Sub | 6.78 ± 3.86 | 4.51 ± 0.14 |
| Basic | 13.14 ± 6.34 | 4.72 ± 0.37 |
| Super | 4.16 ± 2.90 | 4.51 ± 0.14 |
| Abstract | 3.09 ± 1.62 | 4.45 ± 0.08 |
| Wiki | Sub | 8.04 ± 2.12 | 3.51 ± 0.73 |
| Basic | 8.86 ± 2.01 | 4.05 ± 0.96 |
| Super | 7.55 ± 2.44 | 4.03 ± 1.10 |
| Abstract | 7.83 ± 2.38 | 4.02 ± 1.03 |
| DM | Sub | 9.33 ± 14.28 | 4.62 ± 6.17 |
| Basic | 5.30 ± 3.13 | 2.97 ± 1.45 |
| Super | 7.01 ± 2.42 | 3.63 ± 1.09 |
| Abstract | 12.44 ± 13.11 | 5.93 ± 5.72 |
| BART | Sub | 5.23 ± 5.03 | 3.88 ± 3.08 |
| Basic | 7.02 ± 4.61 | 5.49 ± 3.10 |
| Super | 3.61 ± 1.84 | 2.85 ± 1.12 |
| Abstract | 3.60 ± 1.73 | 2.79 ± 1.18 |
+
+and Wikipedia resemble each to a degree of 0.016.
+
+We next perform a sanity check based on our development set4 What we expect to see in this sanity check is that BLC categories should receive the highest values in both of our features tested here, CV and BLC-PR. Tab. 3 shows that indeed the human features best exhibit this advantage of BLC for both features, and for CV, the performance is even significantly5 better than all other categories, despite the small size of this dataset. This is reassuring.
+
+Of the synthetic features, BART performs best in distinguishing BLC, although the difference between BLC and sub is not significant here, whereas differences between BLC and abstract/super are significant.
+
+Wikipedia's performance is adequate; it at least ranks BLC highest values in both CV and BLC-PR, although without significance to the other concept categories. By this measure, DM is disastrous as it often making the wrong predictions, in some cases even significantly so.
+
+From the human results, we see that PR and CV are good indicators, and from the synthetic results we see that while Wikipedia and BART work well, DM is inadequate for detecting BLC. However, Wikipedia-created features are only available if the concept has its own Wikipedia page, which is not the case for $9.8\%$ of all WN synsets.
+
+We therefore decided to use BART to perform the synthetic feature generation in the following experiments. For our Mandarin experiment, we
+
+Table 3: CV and BLC-PR Scores (Development Set).
+
+| Sub | BLC | Super | Abstract |
| shark | house | machine | vacation |
| zebra | door | animal | patience |
| cactus | shoe | sport | apology |
| squirrel | train | plant | rhyme |
| backpack | tree | toy | year |
| couch | hammer | fruit | freedom |
| submarine | bird | musical instrument | love |
| castle | bicycle | vegetable | chemistry |
| windmill | snake | food | environment |
| dolphin | chair | furniture | experiment |
+
+Table 2: Our BLC development set.
+
+automatically translated the Buchanan norms into Mandarin using Google Translate and found it to be accurate enough for our purposes (A manual check of 20 pairs of concepts and features (145 words in total) achieved an accuracy is $95.3\%$ .) We use the multi-lingual version of BART called mBART (Liu et al., 2020), together with the Mandarin Buchanan list, to generate features for Mandarin concepts; examples are given in Fig. 3. We measured the similarity of features between our gold standard (Buchanan et al.'s list) and synthetic Chinese features by using Song et al's (2018) Word2Vec method, which resulted in a value of 0.8298.
+
+| 鲨鱼shark | 房子house |
| 狩猎hunt, 水water, 鱼fish, 游泳swim, 吃eat, 墨水ink, 海sea, 咸水saltwater, 射击shoot, 海鲜seafood, 人human, 煮cook | 生活life, 属性attribute, 草grass, 人类human, 泥mud, 滑雪skate, 酒店hotel, 木材wood, 地方place, 稻草straw, 首页home, 生成generate |
| gill, egg, whisker, swim, slime, tail, fish, scale, animal, fin, water |
+
+Figure 3: Mandarin (top) vs English (bottom) features.
+
+It is reassuring that there is an overlap in features between the languages, and these features happen to be very central to the concepts ("swim, water, fish" for "shark" and "place", "life/live" for "house". Nevertheless, there can be large differences in the number of features generated. Although both systems were fine-tuned with near-identical data (the Buchanan list and its translation), they were pretrained differently: BART only with English data; mBART with data from 25 languages. mBART's training possibly resulted in more synthetic features as different cultures relate a concept to a more varied set of features.
+
+# 4 Experiment
+
+We perform an experiment in learning the BLC status for every noun synset in WN based on the set of indicators introduced in section 3, using different generation methods for the synthetic features. Our baseline is the method by (Mills et al., 2018), which uses no semantic features. The working hypothesis is that the use of semantic features should help BLC detection, even if the generation of the features is sub-optimal.
+
+Evaluation is performed in two ways: 1. for a small test/train set, BLC detection is reported in
+
+terms of F-measure 2. for all synsets in WN, we perform a separate precision study using human subjects, in the same way as Mills et al. (2018).
+
+# 4.1 Classifier
+
+We use SVM (Cortes and Vapnik, 1995) to create a classifier. As indicators, we use those listed in Table 1; this results in a 309 indicator vector, most of which come from the raw W2V vector. We classify into the 4 target classes BLC, Abstract, Sub, Super. We convert these into what is effectively a binary classification BLC vs. Non-BLC and report the F-measure of BLC. We could have also performed binary classification directly with our SVM, but we empirically found that the 4-way classifier achieved a better performance. As baseline, we use the original implementation by Mills et al. (2018) on our dataset.
+
+# 4.2 First Evaluation: Test/Train Data
+
+We built a separate dataset of 433 concepts for fully automatic training and testing (cf. Tab. 4). This dataset is larger than our sanity-check dataset, but does not have the advantage of having human features in all cases. To create this larger dataset, we combined the BLC based on previous psychological experiments by Rosch et al. (1976) and Markman and Wisniewski (1997), with our own subordinate and superordinate terms, as these are not available from the literature beyond a handful of examples. For subordinate terms we distinguish animals and plants (we used biological concepts from lower-level biological classifications) and artifacts (here, we used the bottom level of the Google Product Taxonomy6). Superordinate terms are hardest to find as the number of collective terms at a high level of abstraction is limited. We expanded the superordinate concepts from Mills et al. (2018) by 26 additional collective categories such as spices and furniture, which we derived by inspecting the top-levels of the Google Product Taxonomy areas and thinking of collective terms in areas such as cooking, food, hobbies and engineering, as well as animal and plant categories. We then added 192 abstract concepts based on the Concreteness Rating list. Other than these abstract concepts, no information from the indicators went into the creation of the dataset. We then used BART to compile synthetic features for each concept as explained in
+
+| Category | Train | Dev | Test | Total |
| Subordinate | 20 | 45 | 40 | 105 |
| Basic | 32 | 26 | 28 | 86 |
| Superordinate | 14 | 17 | 19 | 50 |
| Abstract | 48 | 46 | 98 | 192 |
| Total | 114 | 134 | 185 | 433 |
+
+Table 4: BLC test/train dataset (English).
+
+| Method | Precision | Recall | F1-score |
| Mill et al's | 0.86 | 0.53 | 0.66 |
| Ours (English) | 0.86 | 0.67 | 0.75 |
| Ours (Mandarin) | 0.82 | 0.81 | 0.81 |
+
+section 3. The only manual work we performed on the test/train dataset is that we sense-disambiguated concepts by linking them to WN synsets, as before, although we did not do so for the synthetic features.
+
+On the English test/data set, our best system achieves an F-score of $75\%$ , compared to $65.75\%$ by Mills et al., cf. Tab. 5; the difference is significant7. Our best model uses all features except Word2Vec and brush strokes. Our system gains its advantage by having a far higher precision, while lagging somewhat behind on recall. Overall, these results show that BLC detection can be substantially improved by using synthetic features, in particular by increasing precision.
+
+# 4.3 Second Evaluation: Full WN
+
+When run on the entire WN, our system classifies 1,118 synsets as BLC, 48,033 as abstract, 3,710 as superordinate terms, and 29,254 as subordinate terms. The number of our BLC predictions is far below that of Mills et al. at 13,082.
+
+In order to evaluate the precision of the classifier, we follow the methodology in Mills et al. (2018) and run the classifier and baseline on all synsets in WN. From the lists of synsets labelled as BLC by the two classifiers, we then randomly choose 250 concepts each, and ask three English native speakers to consider each concept and label them as BLC or not. Our instructions tell annotators that a BLC concept should fulfill both of the following two conditions:
+
+- You should be able to create a clear visual image of the concept in your mind.
+- A 4-year-old child should in your opinion be likely to know the concept.
+
+Tab. 6 contains 20 randomly chosen examples of the lists the annotators saw; bold face means that at least one annotator marked as BLC. The agreement
+
+${}^{7}$ Significance was determined using a two-tailed permutation test with $\mathrm{R} = {10},{000}$ and significance level $\alpha = {0.01}$ .
+
+Table 5: Performance of BLC detection on Test Set.
+
+| Our method (7/20):
+sweater, trooper, dumbbell, flute, Chihuahua, amusement park, mohair, house, airfield, mulled wine, car, passenger, cage, pig, cab, handkerchief, wallet, pasta, headlight, videocassette |
| Mills et al.'s method (4/20):
+attendance, inconsistency, membrane, contact dermatitis, call, egg, flower, red blood cell, infix notation, ringside, bud, conscription, mender, carving, capacitance, gametophyte, spittle insect, megapode, rock, wisteria |
+
+on English BLC among the judges was measured at $\mathrm{K} = 0.58$ ( $\mathrm{N} = 500$ , $\mathrm{n} = 2$ , $\mathrm{k} = 3$ ), which can be considered as substantial, particularly as there was no annotator training and as the concept of BLC is not well-defined in the literature. Amongst the three annotators, the best pair of annotators showed agreement at $\mathrm{K} = 0.64$ ( $\mathrm{N} = 500$ , $\mathrm{n} = 2$ , $\mathrm{k} = 2$ ). The agreement on Mandarin BLC was slightly lower than for English at $\mathrm{K} = 0.55$ ( $\mathrm{N} = 250$ , $\mathrm{n} = 2$ , $\mathrm{k} = 3$ ).
+
+The precision achieved by our system is $45.0\%$ vs. $21.0\%$ achieved by Mills et al's, an improvement of over $200\%$ . Our algorithm is substantially better at removing non-BLC from our BLC predictions. In an informal assessment of the non-BLC predictions that were encountered on both lists, most of them are subordinate terms, but our list contains fewer of these.
+
+# 5 Further Analyses and Discussion
+
+We next performed some ablation studies (Tab. 7) to investigate which indicators performed better than others. All features on their own are significantly different from the baseline (no features). Concreteness on its own performs well, but this is somewhat uninteresting as BLC are never concrete (and as the list of concrete distractors was created from this indicator). We also see that BLC-PR on its own performs well, while Cue Validity on its own does not. Word2Vec stands out because while quite strong on its own, it is the only feature that decreases results. Because it tends to group
+
+Table 6: BLC prediction examples; bold = correct.
+
+| Method | Left Out | On Own |
| - Word Length | 70.0 | 44.4 |
| - Corpus Frequency | 70.0 | 35.8 |
| - Acquisition Age | 73.0 | 29.4 |
| - Depth in WN | 69.8 | 39.2 |
| - Concreteness | 62.5 | 61.5 |
| - Number of Features | 68.8 | 14.3 |
| - Cue Validity | 66.7 | 17.0 |
| - BLC-PR | 64.5 | 47.3 |
| + W2V | 66.7 | 64.0 |
| Best system: all except W2V: 75.0 |
+
+Table 7: Results of Two Ablation Studies, in F1%
+
+words under similar context, subordinate categories are likely to have high similarity score with their respective BLC, which actually hurts the performance of our classifier. BLC-PR also plays a beneficial role in detecting BLC as we expected, proving that BLC concepts tend to overall have more BLC features. Tab. 10 (appendix) shows the top 20 performing set of synsets for BLC-PR, which reveals that 7 out of these are abstract. This may be caused by the fact that abstract concepts have many abstract features.
+
+We are particularly interested in the performance of cue validity, as it has never before been tested in a large-scale experiment. On its own, cue validity performs rather disappointingly and in particular misclassifies abstract concepts as BLC (cf. Tab. 9), but it manages to increase results in tandem with the other features. Rosch devised cue validity as a metric in taxonomies of concrete objects; she never considered abstract concepts. Therefore, cue validity may only work well in the categorization of concrete objects, not in the distinction between abstract and BLC concepts. This is a particular project with experiments in WN, as abstract concepts also occupy a large part of nouns in WN (48,033 abstract synsets according to our classifier).
+
+Given that BLC definition is debated in the literature, our inclusion of the likely age of acquisition into the definition given to the judges deserves some justification. Mills et al. (2018) used only the first part of Rosch et al. (1976)'s original definition of BLC, concerning the concrete image of the category and inclusivity, but left out the second part of her definition concerning early age of acquisition. We included the second part of her definition because we wanted a definition that is easier to convey to judges. In a separate experiment, we verified the link between Age of acquisition and BLC in order to empirically estimate the age we would use in our instructions. Using the list provided by Kuperman et al. (2012) we were able to verify that most of the concrete concepts a 4 year old child learns are BLC, if we take the list of 86 BLC defined by Rosch as our gold standard: $88\%$ of these Rosch-BLC are known to children of that age, although only $26\%$ recall is achieved. Higher ages of acquisition are listed in Tab. 8. We are therefore fairly confident that the definition of BLC we employed in our experiment is easily understandable and realistic.
+
+| Age | Precision | Recall |
| 4 | 88% | 26% |
| 5 | 84% | 50% |
| 6 | 81% | 67% |
| 7 | 71% | 74% |
+
+Table 8: Coverage of Rosch's BLC list at different ages in vocabulary.
+
+# 6 Conclusion
+
+How to determine what is a BLC and what not, from first principles, is a long-standing problem in computational psychology. We have presented here the beginning of a methodology for studying which aspects of BLC might contribute to their BLC-ness: the fact that they are universally recognised, learned early in language development, and have certain information-theoretic properties about categorisation as a language-wide phenomenon. In particular, we studied the generation of synthetic semantic features resembling human semantic norms from corpora, and which relationship these features have to BLC. We showed that even imperfect features as available with current NLP techniques could serve to improve the detection of BLC.
+
+We find that BART, a methodology borrowed from neural machine translation, is capable of generating indicators that are able to improve the detection of BLC. This also contributes a potential solution to the general problem of providing feature norms automatically at scale, although that would also necessitate additional experiments about the stand-alone quality of the features. What we were able to empirically validate, however, is that they are good enough to substantially improve the SoA in BLC detection.
+
+We were also able to substantiate some longstanding claims in psycholinguistics about the validity of cue validity, first proposed by Rosch (1973). Our own hypothesis, that BLC concepts tend to be described by semantic features that themselves are BLC, was also validated to a certain degree. We hope that the current work opens the door for much-needed further research into synthetic semantic features. In future work, we plan to include visual features into our BLC detection system. Landau et al. (1988) found that in early child vocabulary development, the shape of objects is more important than other features such as size, colors and texture. We also plan to pay more attention to methods that can distinguish subordinate terms from BLC.
+
+# Acknowledgements
+
+We would like thank Guy Aglionby, James Thorne, Yimai Fang, Kangyu Ji and anonymous judges for their participation in the evaluation.
+
+# References
+
+Mark H Ashcraft. 1978. Property norms for typical and atypical items from 17 categories: A description and discussion. Memory & Cognition, 6(3):227-232.
+Marco Baroni and Alessandro Lenci. 2010. Distributional memory: A general framework for corpus-based semantics. Computational Linguistics, 36(4):673-721.
+Marco Baroni, Brian Murphy, Eduard Barbu, and Massimo Poesio. 2010. Strudel: A corpus-based semantic model based on properties and types. Cognitive science, 34(2):222-254.
+Lawrence W Barsalou. 1991. Deriving categories to achieve goals. Psychology of learning and motivation, 27:1-64.
+William F Battig and William E Montague. 1969. Category norms of verbal items in 56 categories: a replication and extension of the connecticut category norms. Journal of experimental Psychology, 80(3p2):1.
+Egon Brunswik. 1956. Perception and the representative design of psychological experiments. Univ of California Press.
+Erin M Buchanan, Kathrene D Valentine, and Nicholas P Maxwell. 2019. English semantic feature production norms: An extended database of 4436 concepts. Behavior research methods, 51(4):1849-1863.
+Luana Bulat, Stephen Clark, and Ekaterina Shutova. 2017. Modelling metaphor with attribute-based semantics.
+Corinna Cortes and Vladimir Vapnik. 1995. Support-vector networks. Machine learning, 20(3):273-297.
+Barry J Devereux, Lorraine K Tyler, Jeroen Geertzen, and Billi Randall. 2014. The centre for speech, language and the brain (cslb) concept property norms. Behavior research methods, 46(4):1119-1127.
+Diego Frassinelli and Frank Keller. 2012. The plausibility of semantic properties generated by a distributional model: Evidence from a visual world experiment. In Proceedings of the Annual Meeting of the Cognitive Science Society, volume 34.
+Rebecca Green. 2003. Vocabulary alignment via basic level concepts. Final Report.
+Gábor Győri. 2013. Basic level categorization and meaning in language. Argumentum, 9:149-161.
+
+Paul Jaccard. 1912. The distribution of the flora in the alpine zone. 1. New phytologist, 11(2):37-50.
+Maximilian Köper and Sabine Schulte im Walde. 2017. Improving verb metaphor detection by propagating abstractness to words, phrases and individual senses. In Proceedings of the 1st Workshop on Sense, Concept and Entity Representations and their Applications, pages 24-30.
+Victor Kuperman, Hans Stadthagen-Gonzalez, and Marc Brysbaert. 2012. Age-of-acquisition ratings for 30,000 english words. Behavior research methods, 44(4):978-990.
+Barbara Landau, Linda B Smith, and Susan S Jones. 1988. The importance of shape in early lexical learning. Cognitive development, 3(3):299-321.
+Ronald W Langacker. 1988. Women, fire, and dangerous things: What categories reveal about the mind.
+Steve Legrand. 2006. Word sense disambiguation with basic-level categories. Advances in Natural Language Processing. Ed. Alexander Gelbukh, Research in Computing Science, 18:71-82.
+Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. 2019. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461.
+Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, and Luke Zettlemoyer. 2020. Multilingual denoising pre-training for neural machine translation. Transactions of the Association for Computational Linguistics, 8:726-742.
+Arthur B Markman and Edward J Wisniewski. 1997. Similar and different: The differentiation of basic-level categories. Journal of Experimental Psychology: Learning, Memory, and Cognition, 23(1):54.
+Alexander Mathews, Lexing Xie, and Xuming He. 2015. Choosing basic-level concept names using visual and language context. In 2015 IEEE Winter Conference on Applications of Computer Vision, pages 595-602. IEEE.
+Ken McRae, George S Cree, Mark S Seidenberg, and Chris McNorgan. 2005. Semantic feature production norms for a large set of living and nonliving things. Behavior research methods, 37(4):547-559.
+Carolyn B Mervis. 1987. Child-basic object categories and early lexical development. *Concepts and conceptual development: Ecological and intellectual factors in categorization*, pages 201-233.
+Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Distributed representations of words and phrases and their compositionality. arXiv preprint arXiv:1310.4546.
+
+George A Miller. 1995. Wordnet: a lexical database for english. Communications of the ACM, 38(11):39-41.
+Chad Mills, Francis Bond, and Gina-Anne Levow. 2018. Automatic identification of basic-level categories. In Proceedings of the 9th Global WordNet Conference (GWC 2018), page 301.
+Shaobo Min, Hongtao Xie, Hantao Yao, Xuran Deng, Zheng-Jun Zha, and Yongdong Zhang. 2020. Hierarchical granularity transfer learning. Advances in Neural Information Processing Systems, 33.
+Gregory Murphy. 2004. The big book of concepts. MIT press.
+Roberto Navigli and Mirella Lapata. 2009. An experimental study of graph connectivity for unsupervised word sense disambiguation. IEEE transactions on pattern analysis and machine intelligence, 32(4):678-692.
+A Emin Orhan, Vaibhav V Gupta, and Brenden M Lake. 2020. Self-supervised learning through the eyes of a child. arXiv preprint arXiv:2007.16189.
+Kenneth Roberts and Frances Degen Horowitz. 1986. Basic level categorization in seven-and nine-month-old infants. Journal of Child Language, 13(2):191-208.
+Eleanor Rosch and Carolyn B Mervis. 1975. Family resemblances: Studies in the internal structure of categories. Cognitive psychology, 7(4):573-605.
+Eleanor Rosch, Carolyn B Mervis, Wayne D Gray, David M Johnson, and Penny Boyes-Braem. 1976. Basic objects in natural categories. Cognitive psychology, 8(3):382-439.
+Eleanor H Rosch. 1973. Natural categories. Cognitive psychology, 4(3):328-350.
+Yan Song, Shuming Shi, Jing Li, and Haisong Zhang. 2018. Directional skip-gram: Explicitly distinguishing left and right context for word embeddings. 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 175–180, New Orleans, Louisiana. Association for Computational Linguistics.
+J. Tanaka and M. Taylor. 1991. Object categories and expertise: Is the basic level in the eye of the beholder? Cognitive Psychology, 23:457-482.
+James P Van Overschelde, Katherine A Rawson, and John Dunlosky. 2004. Category norms: An updated and expanded version of the norms. Journal of memory and language, 50(3):289-335.
+David P Vinson and Gabriella Vigliocco. 2008. Semantic feature production norms for a large set of objects and events. Behavior Research Methods, 40(1):183-190.
+
+Panqu Wang and Garrison W Cottrell. 2015. Basic level categorization facilitates visual object recognition. arXiv preprint arXiv:1511.04103.
+Shan Wang and Francis Bond. 2013. Building the chinese open wordnet (cow): Starting from core synsets. In Proceedings of the 11th Workshop on Asian Language Resources, pages 10-18.
+
+# A Appendix
+
+| Synset | CV score |
| depletion.n.01 | 6.44 |
| starvation.n.01 | 6.44 |
| nourishment.n.02 | 6.44 |
| rationing.n.01 | 6.44 |
| convenience.n.02 | 6.44 |
| meal.n.02 | 6.44 |
| diet.n.01 | 6.44 |
| game.n.01 | 6.44 |
| cook.n.01 + 113 others | 6.44 |
| hit.n.01 | 4.16 |
| underachievement.n.01 | 4.16 |
| ennoblement.n.02 | 4.16 |
| impression.n.09 | 4.16 |
| handover.n.01 | 4.16 |
| lynching.n.01 | 4.16 |
| indemnification.n.02 | 4.16 |
| dehumanization.n.01 | 4.16 |
| body_english.n.01 | 4.16 |
| child_neglect.n.01 | 4.16 |
| cruelty.n.01 + 386 others | 4.16 |
+
+Table 9: Top cue validity values with example concepts.
+
+| Synset | Type | BLC-PR |
| person.n.01 | BLC | 1566 |
| food.n.01 | Super | 935 |
| animal.n.01 | Super | 564 |
| type.n.01 | Abstract | 537 |
| beak.n.01 | BLC | 445 |
| fly.n.01 | BLC | 443 |
| semliance.n.01 | Abstract | 427 |
| feather.n.01 | BLC | 417 |
| state.n.01 | Abstract | 384 |
| bird.n.01 | BLC | 375 |
| metallic_element.n.01 | Super | 360 |
| pet.n.01 | Super | 345 |
| seed.n.01 | Super | 330 |
| zhou.n.01 | ? | 321 |
| fictional_character.n.01 | Abstract | 313 |
| topographic_point.n.01 | Abstract | 307 |
| chirp.n.01 | Abstract | 306 |
| talk.n.01 | Abstract | 256 |
| man.n.01. | BLC | 251 |
| wood.n.01 | BLC | 237 |
+
+Table 10: Top 20 Synsets ranked by BLC-PR; middle column shows our assessment of true category.
\ No newline at end of file
diff --git a/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/images.zip b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..30b1008d22ee4fec71562e74c969cb9496262766
--- /dev/null
+++ b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:738178ad950ccde46501c2b4c32b547ea7255011c742d95191bf196373bc364a
+size 532022
diff --git a/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/layout.json b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..02231cd647a259fadf9422544ee5d51e58f62e86
--- /dev/null
+++ b/synthetictextualfeaturesforthelargescaledetectionofbasiclevelcategoriesinenglishandmandarin/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e2f5a8c6d8786720a1eb0857dea4c563bad9907d0aeb0e352eedfd9628f25775
+size 319931
diff --git a/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/2e8a442c-4932-4a58-b389-e769f76c23cb_content_list.json b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/2e8a442c-4932-4a58-b389-e769f76c23cb_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..e663544568bd7427b0821b21d520f49810b5db2f
--- /dev/null
+++ b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/2e8a442c-4932-4a58-b389-e769f76c23cb_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:511d6b47f3c2bf119cacadb4e3de48a3bc99407d21758b4f61186c7fe89449bc
+size 62989
diff --git a/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/2e8a442c-4932-4a58-b389-e769f76c23cb_model.json b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/2e8a442c-4932-4a58-b389-e769f76c23cb_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..b6d8788dc6284f36505da0ce52b9d307df5f6a04
--- /dev/null
+++ b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/2e8a442c-4932-4a58-b389-e769f76c23cb_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5855396db07de1bcefbf3b548b3640edeca5dbc1dfdbc2d16e53de521142192c
+size 77297
diff --git a/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/2e8a442c-4932-4a58-b389-e769f76c23cb_origin.pdf b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/2e8a442c-4932-4a58-b389-e769f76c23cb_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..79076132db9bdda53a6314207ccb67d03ea83872
--- /dev/null
+++ b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/2e8a442c-4932-4a58-b389-e769f76c23cb_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:299adcf384d774c8e755065b7d4510e4902a6364504093bca58c116aaa48eee3
+size 3776661
diff --git a/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/full.md b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..368e1b9bfe8fcf2273f3bea7628382885f50db77
--- /dev/null
+++ b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/full.md
@@ -0,0 +1,251 @@
+# Systematic Generalization on gSCAN: What is Nearly Solved and What is Next?
+
+Linlu Qiu $^{1*}$ Hexiang Hu $^{1\ddagger}$ Bowen Zhang $^{2}$ Peter Shaw $^{1}$ Fei Sha $^{1}$
+
+$^{1}$ Google Research $^{2}$ USC
+
+# Abstract
+
+We analyze the grounded SCAN (gSCAN) benchmark, which was recently proposed to study systematic generalization for grounded language understanding. First, we study which aspects of the original benchmark can be solved by commonly used methods in multimodal research. We find that a general-purpose Transformer-based model with cross-modal attention achieves strong performance on a majority of the gSCAN splits, surprisingly outperforming more specialized approaches from prior work. Furthermore, our analysis suggests that many of the remaining errors reveal the same fundamental challenge in systematic generalization of linguistic constructs regardless of visual context. Second, inspired by this finding, we propose challenging new tasks for gSCAN by generating data to incorporate relations between objects in the visual environment. Finally, we find that current models are surprisingly data inefficient given the narrow scope of commands in gSCAN, suggesting another challenge for future work.
+
+# 1 Introduction
+
+Systematic generalization refers to the ability to understand new compositions of previously observed concepts and linguistic constructs. While humans exhibit this ability, neural networks often struggle. To study systematic generalization, several synthetic datasets have been proposed. Lake and Baroni (2018) introduced SCAN, a dataset composed of natural language instructions paired with action sequences, and splits in various ways to assess systematic generalization. Recently, Ruis et al. (2020) introduced the grounded SCAN (gSCAN) benchmark, which similarly pairs natural language instructions with action sequences, but further requires that instructions are interpreted within the context of a grid-based visual navigation environment. In this work, we analyze which aspects of
+
+gSCAN can currently be solved by general-purpose models, and propose new tasks and evaluation metrics for future research of systematic generalization on gSCAN.
+
+First, to understand which aspects of gSCAN can be addressed by a general-purpose approach, we evaluate a Transformer-based model with cross-modal attention. Cross-modal attention has been proven effective for other multi-modal tasks (Lu et al., 2019; Tan and Bansal, 2019; Chen et al., 2020). It achieves strong performance on a majority of the splits, surprisingly outperforming several "specialist" approaches designed for gSCAN (Heinze-Deml and Bouchacourt, 2020; Gao et al., 2020; Kuo et al., 2020). We analyze the remaining errors, finding that many of the errors appear to be related to the same fundamental challenge in systematic generalization of linguistic constructs studied in datasets such as SCAN, regardless of the visual context.
+
+Our analysis motivates the creation of an additional gSCAN task, which features a greater degree of complexity in how natural language instructions are grounded in the visual context. In this task, the agent needs to reason about spatial relations between objects expressed in language. We find this new task to be challenging for existing models.
+
+Finally, we also assess the data efficiency of our cross-modal attention model on gSCAN. We find that despite the simplicity of the world state and the grammar used to generate instructions, model performance on most splits declines significantly when provided with less than $\sim 40\%$ of the 360,000 original training examples. This suggests that we should consider sample complexity for future work.
+
+# 2 Cross-modal Attention Solves gSCAN, Almost
+
+Experimental Setup gSCAN has two types of generalization tasks: compositional generalization (CG) and length generalization. We focus on CG splits, which consist of a shared training set, 1 ran-
+
+| Split | Seq2Seq (2020) | GECA (2020) | Kuo (2020) | Heinze (2020) | Gao (2020) | FiLM (2018) | RN (2017) | Ours |
| A | 97.69 ± 0.22 | 87.6 ± 1.19 | 96.73 ± 0.58 | 94.19 ± 0.71 | 98.60 ± 0.95 | 98.83 ± 0.32 | 97.38 ± 0.33 | 99.95 ± 0.02 |
| B | 54.96 ± 39.39 | 34.92 ± 39.30 | 94.91 ± 1.30 | 87.31 ± 4.38 | 99.08 ± 0.69 | 94.04 ± 7.41 | 49.44 ± 8.19 | 99.90 ± 0.06 |
| C | 23.51 ± 21.82 | 78.77 ± 6.63 | 67.72 ± 10.83 | 81.07 ± 10.12 | 80.31 ± 24.51 | 60.12 ± 8.81 | 19.92 ± 9.84 | 99.25 ± 0.91 |
| D | 0.00 ± 0.00 | 0.00 ± 0.00 | 11.52 ± 8.18 | - | 0.16 ± 0.12 | 0.00 ± 0.00 | 0.00 ± 0.00 | 0.00 ± 0.00 |
| E | 35.02 ± 2.35 | 33.19 ± 3.69 | 76.83 ± 2.32 | 52.8 ± 9.96 | 87.32 ± 27.38 | 31.64 ± 1.04 | 42.17 ± 6.22 | 99.02 ± 1.16 |
| F | 92.52 ± 6.75 | 85.99 ± 0.85 | 98.67 ± 0.05 | - | 99.33 ± 0.46 | 86.45 ± 6.67 | 96.59 ± 0.94 | 99.98 ± 0.01 |
| G | 0.00 ± 0.00 | - | 1.14 ± 0.30 | - | - | 0.04 ± 0.03 | 0.00 ± 0.00 | 0.00 ± 0.00 |
| H | 22.70 ± 4.59 | 11.83 ± 0.31 | 20.98 ± 1.38 | - | 33.6 ± 20.81 | 11.71 ± 2.34 | 18.26 ± 1.24 | 22.16 ± 0.01 |
+
+Table 1: Percentage of exact matches by various methods on gSCAN's compositional splits.
+
+| Split | Held-out Examples |
| A: Random | Random |
| B: Yellow squares | Yellow squares referred with color and shape |
| C: Red squares | Red squares as target |
| D: Novel direction | Targets are located south-west of the agent |
| E: Relativity | Circles with size 2 and referred as small |
| F: Class inference | Squares with size 3 and need to be pushed twice |
| G: Adverb k = 1 | Commands with cautiously |
| H: Adverb to verb | Commands with while spinning and pull |
+
+Table 2: Held-out examples on gSCAN's compositional splits.
+
+dom test set, and 7 test sets of specifically designed held-out examples such that examples differ from the training set in various ways, cf. Table 2. The input commands (e.g. walk to a red circle hesitantly) are synthetically generated. The agent observes the world state which is a $d \times d$ grid ( $d = 6$ in our case) with objects in various visual attributes. The output is an action sequence in the grid world (e.g. turn left, walk, walk, stay). We use exact match of the entire sequence as evaluation metric and report the mean and standard deviation across 5 runs.
+
+Our Model We implement a seq2seq model with 6 Transformer layers for the encoder and the decoder each. The architecture is similar to ViL-BERT (Lu et al., 2019), a popular multi-modal model for visual and text information fusion. On a high-level, the encoder's text stream reads the commands while its visual stream encodes the world states. There are cross-modal attention between the two streams. The details are in Appendix A.
+
+Results Table 1 shows the results by various models. Among them, FiLM and Relation Networks (RN) have achieved strong performance on other synthetic datasets for similar multi-modal tasks (Perez et al., 2018; Santoro et al., 2017). We also compare to models with specialized designs for CG or even gSCAN: a seq2seq model using data augmentation (Andreas, 2020), auxiliary loss (Heinze-Deml and Bouchacourt, 2020), task-specific architecture (Kuo et al., 2020; Gao
+
+
+Prediction:L_turnL_turnL_turnL_turn walk pull pull
+Figure 1: A failure case from the H split (Adverb to verb). Prediction (left) differs from target (right) in action sequences, while correct object is identified. Missing actions are in red.
+
+
+Target: L_turn L_turn L_turn L_turn walk L_turn L_turn L_turn L_turn pull L_turn L_turn L_turn pull
+
+et al., 2020).
+
+The cross-modal attention model outperforms others on 5 out 8 splits. We hypothesize it is more effective as we leverage cross-modal attention to allow bi-directional interaction between language instruction and visual environment, in contrast to prior works that only have uni-directional attention from text to visual context (Ruis et al., 2020; Kuo et al., 2020; Gao et al., 2020; Heinze-Deml and Bouchacourt, 2020). The additional attention from visual context to text improves grounding natural language instructions to the visual environment. However, on the "hard" splits (D, G and H), all methods struggle.
+
+Analysis First, we analyze in details the "hard" splits. Certain aspects of interpreting instructions are highly dependent on visual grounding. Most prominently, every instruction requires resolving the location of a referred object. However, adverbs such as cautiously or while spinning have the same meaning regardless of the visual context. Figure 1 shows one such example from the H split. The agent can successfully locate the target object but fails to combine the seen verb pull and adverb while spinning to generate the correct action sequence. Therefore, to assess the degree to which errors are caused by incorrect visual grounding, we calculate
+
+| Split | Col Match↑ | Row Match↑ | Full Match↑ | No Match↓ |
| D | 32.91 ± 3.02 | 45.30 ± 6.46 | 0.00 ± 0.00 | 21.78 ± 3.58 |
| G | 98.43 ± 3.40 | 98.82 ± 2.52 | 97.91 ± 4.50 | 0.66 ± 1.42 |
| H | 91.23 ± 8.53 | 92.90 ± 6.54 | 88.16 ± 11.40 | 4.04 ± 3.71 |
+
+
+Command: pull a green small square hesitantly
+Prediction: R_turn walk stay pull stay pull stay
+Target: L_turn L_turn walk stay L_turn walk stay
+
+
+Command: walk to a blue square
+Prediction: R_turn walk
+Target: L_turn L_turn walk L_turn walk
+
+the exact match between the target position and the agent's final position. The results are shown in Table 3. Despite the low exact match of entire sequences, the agent can find the correct targets more than $90\%$ of time for two adverb splits (G, H). For the novel direction split (D), the direction "south west" is not seen during training. Similarly to Ruis et al. (2020), we find that the correct row or column is often selected, but not both. By analyzing attention weights, Ruis et al. (2020) attribute this as a failure to generate novel combinations of actions, not necessarily to identify the correct target object location, similar to our findings from visualizing attention weights in Figure 2. Therefore, we hypothesize that for these three splits (D, G, and H), the primary remaining challenge for the cross-modal attention model is not necessarily related to visual grounding.
+
+Next, we analyze the splits (A, B, C, E, and F) where the cross-modal attention model performs well. Table 4 contrasts several variants of our model. We notice that removing decoder's textual attention (i.e., $-\mathrm{T}$ ) has virtual no significant change. On the other end, removing visual attention $(-V)$ causes significantly worsened performance on E split. Removing cross-modal attention $(-X)$ significantly degrades all splits, highlighting the benefit of cross-modal attention.
+
+Table 3: Percentage of exact matches of target position on splits the cross-modal attention model fails. For the novel direction split (D), the agent can end up at correct row or column around $80\%$ of the time. For the adverb splits (G, H), the agent can usually find the object, but fails to generate action sequence with correct manner.
+
+| Split | Ours | -V | -T | -X |
| A | 99.95 ± 0.02 | 99.73 ± 0.27 | 99.96 ± 0.01 | 96.69 ± 4.32 |
| B | 99.90 ± 0.06 | 97.55 ± 2.57 | 95.65 ± 5.48 | 31.42 ± 11.39 |
| C | 99.25 ± 0.91 | 97.71 ± 1.69 | 96.07 ± 4.61 | 32.39 ± 6.95 |
| E | 99.02 ± 1.16 | 87.67 ± 10.69 | 96.04 ± 5.15 | 43.19 ± 22.82 |
| F | 99.98 ± 0.01 | 99.85 ± 0.24 | 99.98 ± 0.01 | 96.50 ± 4.72 |
+
+Table 4: Ablation studies of our model on gSCAN (-V, -T, and -X: removing decoder's visual, decoder's textual, and encoder's cross-modal attentions respectively).
+
+
+Figure 2: Visualizations of predictions with attention weights for novel direction (D) split. The darker the grid, the higher the attention score.
+
+
+Figure 3: Training and testing examples for spatial relation splits. The agent is shown as a pink triangle. The agent has seen relative position "west" (left) and "south", "east", "south east" (in other examples) during training and needs to generalize to "south west" (right) during testing.
+
+# 3 Grounded Spatial Relation CG
+
+Proposed Task Given our analysis suggesting that many of the remaining challenges for gSCAN may not necessarily be related to visual grounding, we propose an additional task that features a greater degree of complexity in how natural language instructions are grounded in the visual environment. We hope this will complement the original gSCAN tasks as a useful assessment of systematic generalization in grounded language understanding.
+
+The new data we create will contain language expressions that refer to target objects along with their relations to a second referenced object. We use two types of relations: next to and relative positions such as north and west. As an example, we can have expressions such as a blue square next to a red circle or a blue square north of a red circle.
+
+To ensure that interpreting the spatial relation is necessary to correctly identify the target object, we create visual distractors in the environment. In the above examples, a blue square that is north of a magenta circle would be a distractor to the intended blue square which is next to the red circle. The existence of visual distractors will force the agent to examine the correspondence between the visual information and the (compositional) lan
+
+| Split | Held-out Examples |
| I: Random | Random |
| II: Visual | Red squares as target or reference |
| III: Relation | Green squares and blue circles combinations |
| IV: Referent | Yellow squares referred as target |
| V: Relative position 1 | Targets are north of their references |
| VI: Relative position 2 | Targets are south west of their references |
+
+guage expression to disambiguate and locate the correct target object.
+
+Similar to the gSCAN setup, we use a shared training set and hold-out specific examples to evaluate generalization abilities for learning the visually grounded spatial relation reasoning as in Figure 3. In addition to random split (I: Random), we create new test splits including novel object properties (II: Visual), novel target and reference combinations (III: Relation), novel referent (IV: Referent), and novel relative positions (V, VI: Relative position).
+
+Table 5 shows detailed descriptions of the held-out examples for each test split. In total, we generated about 260,000 examples for the new task, using 18 templates and about 32,000 unique instructions. Details are included in Appendix B.
+
+Results We evaluate the cross-modal attention model on this new task and show results in Table 6. The model outperforms the baseline methods by a large margin on 4 out of 6 splits, but performs surprisingly worse on splits V and VI. The model performs unexpectedly well on the III. We conduct ablation studies and report the results in Table 7. III is also robust to various ways of removing attention, similar to the F split we observed in Table 4. On the other end, the splits II and IV are affected negatively very much, while V and VI are surprisingly improved with removing the cross-modal attention. However, there is not a single model that excels at all splits at the same time.
+
+We hypothesize that the cross-modal attention model overfits to certain aspects of the training distribution, leading to worse out of distribution performance on V and VI splits. We compute the exact match of our models on examples of seen relations from the random test split, to verify the in-domain generalization. Particularly, this in-domain settings evaluate situations where targets are "north west/north east" (in-domain V) and "south/west" (in-domain VI) to their references. It
+
+Table 5: Held-out examples for spatial relation learning task.
+
+| Split | Seq2Seq (2020) | FiLM (2018) | RN (2017) | Ours |
| I | 86.48 ± 0.64 | 88.85 ± 0.82 | 85.17 ± 3.81 | 94.66 ± 0.24 |
| II | 40.10 ± 0.83 | 50.68 ± 0.32 | 38.59 ± 0.74 | 64.41 ± 4.52 |
| III | 86.08 ± 0.73 | 88.81 ± 1.42 | 85.66 ± 4.35 | 94.89 ± 0.20 |
| IV | 5.47 ± 0.09 | 10.78 ± 3.47 | 4.85 ± 0.86 | 49.58 ± 3.47 |
| V | 81.41 ± 1.03 | 76.20 ± 2.64 | 79.86 ± 3.16 | 59.29 ± 5.63 |
| VI | 81.84 ± 1.38 | 75.05 ± 3.63 | 80.93 ± 2.76 | 49.50 ± 6.49 |
+
+Table 6: Percentage of exact matches by various methods on proposed spatial relation splits.
+
+| Split | Ours | -V | -T | -X |
| I | 94.66 ± 0.24 | 94.70 ± 0.23 | 94.58 ± 0.26 | 92.71 ± 0.90 |
| II | 64.41 ± 4.52 | 62.42 ± 7.12 | 59.75 ± 4.18 | 46.65 ± 2.20 |
| III | 94.89 ± 0.20 | 94.90 ± 0.25 | 94.91 ± 0.30 | 92.88 ± 0.79 |
| IV | 49.58 ± 3.47 | 36.15 ± 16.42 | 35.07 ± 13.73 | 10.76 ± 1.76 |
| V | 59.29 ± 5.63 | 58.95 ± 6.48 | 59.21 ± 6.39 | 86.34 ± 1.50 |
| VI | 49.50 ± 6.49 | 49.40 ± 5.66 | 47.91 ± 8.28 | 87.10 ± 2.15 |
+
+Table 7: Ablation studies of our model on new relation reasoning task (-V, -T, and -X: removing decoder's visual, decoder's textual, and encoder's cross-modal attentions respectively).
+
+shows that the cross-modal attention model (95.52 on in-domain V and 95.43 on in-domain VI) has better in-domain generalization than its without cross-modal counterpart (93.14 on in-domain V and 93.90 on in-domain VI), but it performs worse in compositional generalization. Regularization techniques could potentially be used to improve the cross-modal attention model, which we leave for future research.
+
+# 4 Sample Complexity
+
+One inspiration of studying systematic generalization is to develop techniques that can reduce the sample complexity for learning novel behaviors. While we observe that many models perform well at least on some splits, we ask a natural question that has not been studied before: even on those splits, are our models fulfilling the promise of learning systematic generalization?
+
+Figure 4 shows that for the original gSCAN and the newly proposed task, performance for the cross-modal attention model starts to significantly drop when trained using less than around $40\%$ of the training data for most splits. The model without cross-modal attention is even more data inefficient; performance starts to significantly drop when trained using less than $70\%$ of the training data for the original compositional splits, or when reducing the training data by any amount for the spatial relation splits. This suggests exploring model architectural priors can help improve data efficiency and provide more benefits for generalization.
+
+
+Figure 4: Data efficiency of the models on compositional splits (top) and spatial relation splits (bottom). The x-axis is the percentage of data (\%) and the y-axis is the exact match (\%).
+
+To investigate how the number of primitives influences the data efficiency, we re-generate smaller compositional splits and spatial relation splits by reducing the number of primitives. For compositional splits, we exclude one noun (cylinder), one color adjective (blue), and one adverb (while zigzagging). For spatial relation splits, we exclude one noun (cylinder) and one location preposition (next to). This reduces the number of training examples by around 2/3 and leads to around 110,000 and 74,000 training examples for the smaller compositional splits and spatial relation splits respectively.
+
+
+Figure 5: Data efficiency of the model with cross-modal attention on compositional splits (left) and spatial relation splits (right) with smaller number of primitives.
+
+We then perform similar experiments with our cross-modal attention model. The results are shown in Figure 5. When the number of primitives decreases, the percentage of training data required to attain satisfactory performance is increased, with more than $80\%$ of training data needed for both splits. One possible explanation is that the total number of training examples is reduced when the number of primitives decreases. Therefore, the model sees fewer combinations during training, thus needs a higher percentage of data to properly learn visual grounding and compositionality. This provides further evidence that current model need extensive training data to achieve systematic generalization, demonstrating the necessity of evaluating sample complexity for future work.
+
+# 5 Related work
+
+Many datasets and tasks have been proposed for examining systematic generalization: visual question answering (Johnson et al., 2017; Bahdanau et al., 2019a; Pezzelle and Fernandez, 2019; Bahdanau et al., 2019b), visually grounded navigation instruction following (Hermann et al., 2017; Yu et al., 2018; Chevalier-Boisvert et al., 2019; Chaplot et al., 2018). Many approaches have been proposed too, though a large percentage of them uses task-specific design and only work well for the specific tasks or datasets, for example, learning neural program executions (Andreas et al., 2016; Hu et al., 2017; Johnson et al., 2017; Santoro et al., 2017; Hudson and Manning, 2018; Mao et al., 2019), in addition to the ones we have described previously.
+
+This work focuses on using a generic cross-modal attention model to probe the gSCAN dataset in the hope of understanding in what aspect the task/dataset is challenging. Ding et al. (2020) also presented new evidences that a neural-based model can solve similar CG tasks. Our interest is to use such models to inspire new task designs that continue to challenge neural models.
+
+# 6 Conclusion
+
+In this work, we have demonstrated that a general-purpose cross-modal attention model can achieve strong performance on a majority of gSCAN splits and outperform more specialized prior work. We have proposed a challenging additional task for gSCAN that requires agents to reason over spatial relations between objects in the visual scene, and have highlighted data efficiency as a consideration for future work.
+
+# Acknowledgements
+
+We thank Kristina Toutanova and the anonymous reviewers for their helpful feedback and suggestions.
+
+# References
+
+Jacob Andreas. 2020. Good-enough compositional data augmentation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7556-7566, Online. Association for Computational Linguistics.
+Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. 2016. Neural module networks. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 39-48. IEEE Computer Society.
+Dzmitry Bahdanau, Harm de Vriesand Shikhar Murty, Aaron C. Courville, and Philippe Beaudoin. 2019a. CLOSURE: assessing systematic generalization of CLEVR models. In Visually Grounded Interaction and Language (ViGIL), NeurIPS 2019 Workshop.
+Dzmitry Bahdanau, Shikhar Murty, Michael Noukhovitch, Thien Huu Nguyen, Harm de Vries, and Aaron C. Courville. 2019b. Systematic generalization: What is required and can it be learned? In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.
+Devendra Singh Chaplot, Kanthashree Mysore Sathyendra, Rama Kumar Pasumarthi, Dheeraj Rajagopal, and Ruslan Salakhutdinov. 2018. Gated-attention architectures for task-oriented language grounding. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th innovative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial Intelligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 2819-2826. AAAI Press.
+Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. 2020. UNITER: universal image-text representation learning. In Computer Vision - ECCV 2020-16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXX, volume 12375 of Lecture Notes in Computer Science, pages 104-120. Springer.
+Maxime Chevalier-Boisvert, Dzmitry Bahdanau, Salem Lahlou, Lucas Willems, Chitwan Saharia, Thien Huu Nguyen, and Yoshua Bengio. 2019. Babyai: A platform to study the sample efficiency of grounded language learning. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.
+David Ding, Felix Hill, Adam Santoro, and Matt Botvinick. 2020. Object-based attention for spatiotemporal reasoning: Outperforming neuro-symbolic models with flexible distributed architectures. *ArXiv* preprint, abs/2012.08508.
+Tong Gao, Qi Huang, and Raymond Mooney. 2020. Systematic generalization on gSCAN with language
+
+conditioned embedding. In Proceedings of the 1st Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 10th International Joint Conference on Natural Language Processing, pages 491-503, Suzhou, China. Association for Computational Linguistics.
+Christina Heinze-Deml and Diane Bouchacourt. 2020. Think before you act: A simple baseline for compositional generalization. ArXiv preprint, abs/2009.13962.
+Karl Moritz Hermann, Felix Hill, Simon Green, Fumin Wang, Ryan Faulkner, Hubert Soyer, David Szepesvari, Wojciech Marian Czarnecki, Max Jaderberg, Denis Teplyashin, et al. 2017. Grounded language learning in a simulated 3d world. ArXiv preprint, abs/1706.06551.
+Ronghang Hu, Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Kate Saenko. 2017. Learning to reason: End-to-end module networks for visual question answering. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 804-813. IEEE Computer Society.
+Drew A. Hudson and Christopher D. Manning. 2018. Compositional attention networks for machine reasoning. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net.
+Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Judy Hoffman, Li Fei-Fei, C. Lawrence Zitnick, and Ross B. Girshick. 2017. Inferring and executing programs for visual reasoning. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 3008-3017. IEEE Computer Society.
+Yen-Ling Kuo, Boris Katz, and Andrei Barbu. 2020. Compositional networks enable systematic generalization for grounded language understanding. *ArXiv* preprint, abs/2008.02742.
+Brenden M. Lake and Marco Baroni. 2018. Generalization without systematicity: On the compositional skills of sequence-to-sequence recurrent networks. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholm, Sweden, July 10-15, 2018, volume 80 of Proceedings of Machine Learning Research, pages 2879-2888. PMLR.
+Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. 2019. Vilbert: Pretraining task-agnostic visi-olinguistic representations for vision-and-language tasks. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 13-23.
+
+Jiayuan Mao, Chuang Gan, Pushmeet Kohli, Joshua B. Tenenbaum, and Jiajun Wu. 2019. The neurosymbolic concept learner: Interpreting scenes, words, and sentences from natural supervision. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.
+Ethan Perez, Florian Strub, Harm de Vries, Vincent Dumoulin, and Aaron C. Courville. 2018. Film: Visual reasoning with a general conditioning layer. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th innovative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial Intelligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 3942-3951. AAAI Press.
+Sandro Pezzelle and Raquel Fernández. 2019. Is the red square big? MALeViC: Modeling adjectives leveraging visual contexts. 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 2865-2876, Hong Kong, China. Association for Computational Linguistics.
+Laura Ruis, Jacob Andreas, Marco Baroni, Diane Bouchacourt, and Brenden M. Lake. 2020. A benchmark for systematic generalization in grounded language understanding.
+Adam Santoro, David Raposo, David G. T. Barrett, Mateusz Malinowski, Razvan Pascanu, Peter W. Battaglia, and Tim Lillicrap. 2017. A simple neural network module for relational reasoning. 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 4967-4976.
+Hao Tan and Mohit Bansal. 2019. LXMERT: Learning cross-modality encoder representations from transformers. 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 5100-5111, Hong Kong, China. Association for Computational Linguistics.
+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.
+Haonan Yu, Haichao Zhang, and Wei Xu. 2018. Interactive grounded language acquisition and generalization in a 2d world. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net.
+
+# Appendix
+
+In this appendix, we include more details about our cross-modal attention model (§ A) and data generation procedure (§ B).
+
+# A Models
+
+In this section, we include more details about our cross-modal attention model to ensure all results are fully reproducible. We also include details of the baseline methods we implement.
+
+# A.1 Model details
+
+We show our model architecture in Figure 6. The model follows the standard encoder-decoder structure in Transformer (Vaswani et al., 2017) and uses cross-modal attention in the encoder similar to ViLBERT (Lu et al., 2019). It is trained via teacher forcing. During test time, it generates output actions in the auto-regressive manner.
+
+Encoder The model takes input command tokens $\mathbf{x} = \{x_{1}, x_{2}, \dots, x_{n}\}$ and world state $\mathbf{W} \in \mathbb{R}^{d \times d \times c}$ , where $d$ is the grid size and $c$ is world state dimension as in the baseline seq2seq model (Ruis et al., 2020). The encoder maps the world state to visual representation $\mathbf{H}^v$ through multi-scale convolutional networks followed by linear layers. It encodes the input tokens to input embeddings $\mathbf{H}^l = \{\mathbf{h}_1^l, \mathbf{h}_2^l, \dots, \mathbf{h}_n^l\}$ with positional encoding.
+
+The visual and linguistic representations are passed through $N = 6$ transformer blocks with cross-modal attention. Similar to ViLBERT (Lu et al., 2019), each transformer block consists of two parallel multi-head attention blocks, with the representation of one modality passed as key and value to the multi-head attention block of the other modality.
+
+Decoder The decoder consists of $N = 6$ stacked blocks similar to the decoder in Transformer (Vaswani et al., 2017). Each block contains one self-attention block and one multi-head attention block over the contextual embeddings $\mathbf{H}^c = [\mathbf{H}^v;\mathbf{H}^l]$ of the encoder.
+
+# A.2 Implementation Details
+
+We use $N = 6$ layers of transformer blocks for the encoder and the decoder. Each block has hidden size of 128, intermediate size of 256, and 8 attention heads. The total number of parameters of the model is around 3M for all model variants. We train our model for 40 epochs with batch size
+
+of 128. We use the Adam optimizer with weight decay. The initial learning rate is set to be 0.0016 for model with cross-modal attention and 0.0008 for model without it. We use linear warmup for the first $10\%$ of training epoch and decrease the learning rate by 10 in the 20th and 30th epoch. The dev set accuracy and exact match are used to validate model performance.
+
+
+Figure 6: The architecture of our model. The encoder consists of 6 layers of transformer block with cross-modal attention. The decoder contains 6 layers of transformer block, and each block has one self-attention block and one multi-head attention block over contextual representations of encoder.
+
+# A.3 Baseline Methods
+
+We implement FiLM (Perez et al., 2018) and RN (Santoro et al., 2017) as our baselines. The baselines are built upon the seq2seq model. FiLM learns functions to predict a set of $\beta$ , $\gamma$ conditioned on inputs to modulate neural networks. For FiLM, we add a linear layer to predict $\beta$ , $\gamma$ for each convolution layer. For RN, we use 3 relation layers with hidden size of 256 followed by 2 fully-connected layers to predict object relations. The hidden states are then used to initialize the LSTM decoder. We refer the readers to the original FiLM and RN paper for model details. Other hyper-parameters remain the same as the original seq2seq baseline. $^{3}$
+
+# B Data Generation
+
+We build upon the original gSCAN codebase to generate spatial relation data splits.
+
+2The figure is modified from https://github.com/dair-ai/ml-visuals.
+3https://github.com/LauraRuis/multimodal_seq2seq_gSCAN.
+4https://github.com/LauraRuis/ groundedSCAN.
+
+# B.1 Input Commands Generation
+
+The input commands are generated based on context-free grammar (CFG) in Table 8. We add new grammar rules and lexicon rules to support object relations. Since we focus on evaluating relation reasoning, we exclude templates without any object relation.
+
+| Grammar Rule |
| ROOT → VP |
| VP → VVt' to DP |
| VP → VVt DP |
| DP → 'a' NP |
| NP → JJ NP |
| NP → NP PP |
| PP → LOC DP |
| NP → NN |
| Lexicon Rule |
| VVt → {walk} |
| VVt → {push, pull} |
| NN → {circle, square, cylinder} |
| JJ → {red, green, blue, yellow, big, small} |
| LOC → {next to} |
| LOC → {east of, north of, west of, south of} |
| LOC → {north east of, north west of} |
| LOC → {south east of, south west of} |
+
+Table 8: The CFG used to generate input commands.
+
+# B.2 World State Generation
+
+We generate the world state with the following constraints: 1) For each target referent $\mathbf{T}$ , there will be one unique reference object $\mathbf{R}$ next to it; 2) There will be up to $n$ visual distractors $\mathbf{V}_1, \mathbf{V}_2, \dots, \mathbf{V}_n$ , which have the same size, shape, and color of the target object $\mathbf{T}$ ; 3) Each visual distractor $\mathbf{V}_i$ will or will not have its own reference object $\mathbf{O}_i$ .
+
+Additionally, to avoid ambiguity, when generating visual distractor $\mathbf{V}_i$ , we ensure: 1) If the input command contains abstract relative position (i.e. next), $\mathbf{V}_i$ cannot be placed near $\mathbf{R}$ , and $\mathbf{O}_i$ must be distinct from $\mathbf{R}$ ; 2) If the input command contains specific relative position (e.g. north, west, etc.), $\mathbf{V}_i$ can be placed anywhere, and $\mathbf{O}_i$ can be the same as $\mathbf{R}$ . However, $\mathbf{O}_i$ cannot have the same relative position to $\mathbf{V}_i$ as $\mathbf{R}$ to $\mathbf{T}$ . Other procedures remain the same as the original setup.
+
+# B.3 Data Examples
+
+We show data examples for each spatial relation split in Figure 7. The systematic difference between the training and test split is highlighted.
+
+
+
+
+Command: walk to a green small square next to a blue circle
+
+Figure 7: Data examples for each spatial relation test split with the systematic difference highlighted.
+
+Target: walk walk walk walk walk L_turn walk
+Command: pull a circle north of a yellow big cylinder
+Target: walk walk L_turn walk walk walk pull pull pull
+
+
+
+
+Command: push a small yellow square west of a green big cylinder
+
+
+Target: L_turn L_turn walk R_turn walk push push
+Command: pull a cylinder south west of a circle
+Target: walk walk walk walk L_turn walk pull
\ No newline at end of file
diff --git a/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/images.zip b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..db299d5fad8269358b965b688009b595feb1bd2b
--- /dev/null
+++ b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a8e685902c8af13e8f5a5adfff18c954074a277a57aacc4edf06a336f7ff2a63
+size 525705
diff --git a/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/layout.json b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..6cc53a518d0408b9c9928cf22982a15f91879bb6
--- /dev/null
+++ b/systematicgeneralizationongscanwhatisnearlysolvedandwhatisnext/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5fe43d503d3a9697c93d52ba994a2d97ac8a432f526bffdd34ad1cf3633c4d9b
+size 296689
diff --git a/tadpoletaskadaptedpretrainingviaanomalydetection/b84dc235-1850-4919-b47b-0e347150e38e_content_list.json b/tadpoletaskadaptedpretrainingviaanomalydetection/b84dc235-1850-4919-b47b-0e347150e38e_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..400845686b81583a79b7d3b0c6f609e3396858eb
--- /dev/null
+++ b/tadpoletaskadaptedpretrainingviaanomalydetection/b84dc235-1850-4919-b47b-0e347150e38e_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d672652276b4035f245d77e058748f108ea9ef33b48ea5bb588cfecda965e31f
+size 97028
diff --git a/tadpoletaskadaptedpretrainingviaanomalydetection/b84dc235-1850-4919-b47b-0e347150e38e_model.json b/tadpoletaskadaptedpretrainingviaanomalydetection/b84dc235-1850-4919-b47b-0e347150e38e_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..63054f982dcf9bf1ef6fa8e2153e013af91e50f8
--- /dev/null
+++ b/tadpoletaskadaptedpretrainingviaanomalydetection/b84dc235-1850-4919-b47b-0e347150e38e_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:de43dc25f9f7628897edef7c7ace9abfd9cfcea39e89a451de03a5b53fd20e5d
+size 117032
diff --git a/tadpoletaskadaptedpretrainingviaanomalydetection/b84dc235-1850-4919-b47b-0e347150e38e_origin.pdf b/tadpoletaskadaptedpretrainingviaanomalydetection/b84dc235-1850-4919-b47b-0e347150e38e_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..adc06128a52f1d965f4053085193b926be339729
--- /dev/null
+++ b/tadpoletaskadaptedpretrainingviaanomalydetection/b84dc235-1850-4919-b47b-0e347150e38e_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f15ae445486d1e8f08442d600c7bcaa927282d47cd0d8fab5395909b17fea454
+size 537995
diff --git a/tadpoletaskadaptedpretrainingviaanomalydetection/full.md b/tadpoletaskadaptedpretrainingviaanomalydetection/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..d1e40d96ac7ba0f3243e1eaa7dbf06a8fb0ca0ae
--- /dev/null
+++ b/tadpoletaskadaptedpretrainingviaanomalydetection/full.md
@@ -0,0 +1,342 @@
+# TADPOLE: Task ADapted Pre-training via anOmaLy dEction
+
+Vivek Madan
+
+AWS AI Labs
+
+vivmadan@amazon.com
+
+Ashish Khetan
+
+AWS AI Labs
+
+khetan@amazon.com
+
+Zohar Karnin
+
+AWS AI Labs
+
+zkarnin@amazon.com
+
+# Abstract
+
+The paradigm of pre-training followed by fine-tuning has become a standard procedure for NLP tasks, with a known problem of domain shift between the pre-training and downstream corpus. Previous works have tried to mitigate this problem with additional pre-training, either on the downstream corpus itself when it is large enough, or on a manually curated unlabeled corpus of a similar domain. In this paper, we address the problem for the case when the downstream corpus is too small for additional pre-training. We propose TADPOLE, a task adapted pre-training framework based on data selection techniques adapted from Domain Adaptation. We formulate the data selection as an anomaly detection problem that unlike existing methods works well when the downstream corpus is limited in size. It results in a scalable and efficient unsupervised technique that eliminates the need for any manual data curation. We evaluate our framework on eight tasks across four different domains: Biomedical, Computer Science, News, and Movie reviews, and compare its performance against competitive baseline techniques from the area of Domain Adaptation. Our framework outperforms all the baseline methods. On small datasets with less than 5K training examples, we get a gain of $1.82\%$ in performance with additional pre-training for only $5\%$ steps. It also compliments some of the other techniques such as data augmentation known for boosting performance when downstream corpus is small; highest performance is achieved when data augmentation is combined with task adapted pre-training.
+
+# 1 Introduction
+
+Pre-trained language models such as ELMo (Peters et al., 2018), GPT (Radford et al., 2018), BERT (Devlin et al., 2018), Transformer-xl (Dai et al., 2019) and XLNet (Yang et al., 2019) have become a key component in solving virtually all natural language tasks. These models are pre-trained on
+
+large amount of cross-domain data ranging from Wikipedia to Book corpus to news articles to learn powerful representations. A generic approach for using these models consists of two steps: (a) Pretraining: train the model on an extremely large general domain corpus, e.g. with masked language model loss; (b) Finetuning: finetune the model on labeled task dataset for the downstream task.
+
+Even though the approach of pre-training followed by fine-tuning has been very successful, it suffers from domain shift when applied to tasks containing text from a domain that is not sufficiently represented in the pre-training corpus. An immediate way of solving the problem is to pre-train the model on task domain data instead of the general domain data. For a handful of very popular task domains, the research community invested time and resources to collect a large domain-specific data corpus and pre-train a language model on it. The models include BioBERT pre-trained on biomedical text (Lee et al., 2020), ClinicalBERT pretrained on clinical notes (Huang et al., 2019), SciBERT pre-trained on semantic scholar corpus (Beltagy et al., 2019), and FinBERT pre-trained on financial documents (Araci, 2019). These models achieve significant gain in performance over a model trained on general domain data, when the downstream task belongs to the respective domains.
+
+These papers demonstrate how useful it can be to shift the domain of the pre-trained model. However, the approach is expensive and time consuming as it requires collecting gigabytes of domain data for each new task. The long-tail of domains remains left behind without a realistic solution. To mitigate this, in absence of the huge task domain data, a different known approach is to collect a medium (MBs, not GBs) amount of unlabeled task data, and adapt the pre-trained (on general data) model by e.g. extending the pre-training procedure on the unlabeled data (Howard and Ruder, 2018; Gururangan et al., 2020). Such task adapted pre
+
+training approach achieves relatively smaller gain but is less expensive. Although this approach is cheaper in terms of manual labor when compared to domain adapted BERT, it still requires an effort to collect unlabeled data. It requires much more data than what is needed for only fine-tuning. This is often impossible to achieve, for example when data is highly sensitive. In this paper we propose a solution to this challenging problem, providing domain adaptation to the pre-trained model without the need for any manual effort of data collection.
+
+The high level idea is quite intuitive. Given a generic pre-training data containing text from multiple domains, we filter the available general domain to contain only pieces that are similar to the downstream task corpus. By continuing the pretraining process on this adapted corpus we achieve a better tuned pre-trained model. Figure 1 illustrate the feasibility of this approach with an example downstream task from a medical domain and highlighted text from a news article available in a general domain corpus. The key for a successful implementation is finding the best way of evaluating the similarity of a given snippet to the downstream task.
+
+# RCT20K TASK DATA
+
+To investigate the efficacy of 6 weeks of daily low-dose oral prednisolone in improving pain, mobility, and systemic los-grade ...[OBJECTIVE]
+A total of 125 patients with primary knee OA were randomize ...[METHODS]
+Outcome measures included pain reduction and systemic inflammation markers ...[METHODS]
+
+# News Article
+
+For as much as we workout warriors recite that whole "no pain, no gain" mantra, we sure do pop a lot of painkillers. A recent article published in... These popular medicines, known as nonsteroidal anti-inflammatory drugs, or NSAIDs, work by suppressing inflammation... the article kind of blows past is the fact plenty of racers ...
+
+Figure 1: Identification of task-data (top panel, medical data) in general domain corpus (bottom panel).
+
+Although not many methods exist to solve the problem of domain shift in the context of pretraining, literature on Domain Adaptation provides several methods for the core task of evaluating the above mentioned similarity. These previous approaches use either a simple language model (LM) (Moore and Lewis, 2010; Axelrod et al., 2011; Duh et al., 2013; Wang et al., 2017b; van der Wees et al., 2017), or a hand crafted similarity score (Wang et al., 2017a; Plank and Van Noord,
+
+2011; Remus, 2012; Van Asch and Daelemans, 2010). The LM based technique are often both over simplistic, and require a fairly large corpus of task data to create a reasonable LM. The hand crafted similarity scores can be seen as ad-hoc methods for distinguishing inliers from outliers (i.e., anomaly detection); they tend to be focused on individual tasks and do not generalize well.
+
+We formulate the similarity evaluation task as that of anomaly detection and propose a Task ADapted Pre-training via anOmaLy dEction (TADPOLE) framework. Indeed, anomaly detection methods given a domain of instance are able to provide a score for new instances assessing how likely they are to belong to the input domain. We exploit pre-trained models to get sentence representations that are in turn used to train an anomaly detection model. By using pre-trained models, our method is effective even for small text corpora. By taking advantage of existing anomaly detection methods, we replace hand-crafted rules with techniques proven to generalize well. Our approach does not require any manual data curation. To train the anomaly detection method, we only use the task data which is already available as it is necessary for fine-tuning.
+
+In what follows we discuss how we implement our technique and compare it with other data selection methods based on extensive experimental results. We start by filtering out the subset of general domain corpus most relevant to the task. To do this, we explore several anomaly detection methods and give a quantitative criterion to identify the best method for a given task data. Then, we start with a pre-trained model on the general domain corpus and run additional pre-training for only $5\%$ more steps on the filtered corpus from different methods. This is followed by the regular finetuning on the labeled task data. We measure the performance gain as an improvement in accuracy of finetuned model with additional pre-training vs the accuracy of finetuned model without additional pre-training. To establish the performance gain of TADPOLE, we evaluate it on eight tasks across four domains: Biomedical, Computer Science, News, and Movie reviews. We investigate all aspects of TADPOLE by comparing its performance with various baselines based on its variants and the competitive methods available in literature. The main highlights of our work are as follows:
+
+- We provide TADPOLE, a novel anomaly de
+
+
+Figure 2: Average performance gain as function of #training samples available for a task.
+
+tection based framework for adapting pretraining for the downstream task. The framework is explained in detail and all its steps are justified via extensive ablation studies.
+
+- TADPOLE is superior to all the baseline methods including (i) LM based relevance score (iii) Distance based relevance score (iii) Continued pre-training on the task data (iv) Data Augmentation while finetuning.
+- On tasks with small labeled dataset (less than 5K examples), our method achieves an average $1.82\%$ lift in performance whereas the baselines achieve no more than $0.48\%$ .
+- For tasks with large labeled dataset, our method does not depreciate in performance and achieves an average gain of $0.32\%$ . In addition, if only a subset of training samples are available, we observe significantly higher gain. In particular, if only 1000 training samples are available, we observe an average $2.01\%$ gain in performance whereas the baselines achieve no more than $0.24\%$ gain. In all individual tasks, our method is either on par or (statistical) significantly better than all alternatives.
+- TADPOLE complements some of the other techniques known for improving performance for small datasets. For instance, TADPOLE performs better than data augmentation and performs even better when combined with data augmentation; Data-Aug $\leq$ TADPOLE $\leq$ TADPOLE + Data-Aug.
+- For a task requiring little domain adaptation, GLUE sentiment analysis, our method achieves an improvement of $0.4\%$ in accuracy.
+
+# 2 Related Work
+
+Since our focus is on Data Selection Methods, we only discuss the related work on Data Selection in Domain Adaptation here. We discuss the other Domain Adaptation techniques in Appendix A.
+
+Data Selection: As discussed above, core of data selection is to determine the relevance weights that in turn modify the source domain to become more similar to the target domain. There has been a sequence of works in trying to find the relevance weights via language models (Moore and Lewis, 2010; Wang et al., 2017b; van der Wees et al., 2017). For instance, Moore and Lewis (2010), Axelrod et al. (2011) and Duh et al. (2013) train two language models, an in-domain language model on the target domain dataset (same as task domain in our case) and an out-of-domain language model on (a subset of) general domain corpus. Then, relevance score is defined as the difference in the cross-entropy w.r.t. two language models. These methods achieve some gain but have a major drawback. A crucial assumption they rely on: there is enough in-domain data to train a reasonable in-domain language model. This assumption is not true in most cases. For most tasks, we only have access to a few thousands or in some cases a few hundreds of examples which is not enough to train a reasonably accurate language model. Our techniques rely on text representations based on the available pre-trained model. As such, our similarity score does not rely on models that can be trained with a small amount of data.
+
+Another line of work defines hand crafted domain similarity measures to assign relevance score and filter out text from a general domain corpus (Wang et al., 2017a; Plank and Van Noord, 2011; Remus, 2012; Van Asch and Daelemans, 2010; Gururangan et al., 2020). For instance, Wang et al. (2017a) define the domain similarity of a sentence as the difference between Euclidean distance of the sentence embedding from the mean of in-domain sentence embeddings and the mean of out-of-domain sentence embeddings. Plank and Van Noord (2011) and Remus (2012) define the similarity measure as the Kullback-Leibler (KL) divergence between the relative frequencies of words, character tetra-grams, and topic models. Van Asch and Daelemans (2010) define domain similarity as Rényi divergence between the relevant token frequencies. These are adhoc measures suitable only for the respective tasks, and can be seen as a manual task-optimized anomaly detection. They fail to generalize well for new tasks and domains. Ruder and Plank (2017) attempts to remedy this issue and tries to learn the correct combination of these metrics for each task. They learn the combination
+
+weight vector via Bayesian optimization. However, Bayesian optimization is infeasible for deep networks like BERT. Each optimization step of this process amounts to pre-training the model and finetuning it for the task. For Bayesian optimization to work well it requires repeating this process multiple times, which is prohibitively computationally expensive. Thus, they use models such as linear SVM classifier and LDA which do not yield state-of-the-art performance. In contrast, we propose a lightweight method - based on anomaly detection - that can be applied to state-of-the-art deep language models like BERT.
+
+# 3 TADPOLE: Task ADapted Pre-training via anOmaLy dEction
+
+Language model and Downstream Tasks. A generic approach for using state-of-the-art language models such as ELMo, GPT, BERT, and XLNet is to pre-train them on an extremely large general domain corpus and then finetune the pretrained model on the downstream labeled task data. There is evident correlation between model's pretraining loss and its performance on the downstream task after finetuning (Devlin et al., 2018). Our design is motivated by an observation, backed by empirical evidence, that the correlation is even stronger if we consider the pre-training loss not on the pre-training data but the downstream task data.
+
+To make this distinction formal, let $\mathcal{D}$ , $\mathcal{D}_{\mathrm{in}}$ be the pre-training and task data. Let $\Theta$ denote the parameters of the language model and $\ell_{\mathrm{LM}}$ denote the language model loss function. The pre-training loss on pre-training data $(L_{\mathrm{LM}}(\Theta))$ and target data $(L_{\mathrm{LM}}^{\mathrm{in}}(\Theta))$ are defined as follows: $L_{\mathrm{LM}}(\Theta) = \sum_{x\in \mathcal{D}}\ell_{\mathrm{LM}}(x;\Theta), L_{\mathrm{LM}}^{\mathrm{in}}(\Theta) = \sum_{x\in \mathcal{D}_{\mathrm{in}}}\ell_{\mathrm{LM}}(x;\Theta)$ . To show that $L_{\mathrm{LM}}^{\mathrm{in}}(\Theta)$ is better correlated with the performance of the downstream task we consider several BERT language models pre-trained on random combinations of datasets from different domains mentioned in Section 4. Among these we select the BERT models $M_1,\ldots ,M_k$ such that selected models have similar Masked Language Model (MLM) loss on the general domain corpus; $|\ell_{LM}(\Theta_i) - \ell_{LM}(\Theta_j)| < = 0.02$ . MLM loss of these models on the text from task domain $(\ell_{LM}^{in}(\Theta_i))$ is different. For each $M_i$ , we contrast it with the accuracy/f1 score of the finetuned model on the task data.
+
+We observe in Figure 3 that if we have two equally good language models (similar language
+
+model loss on general domain), the language model which is better (tailored) for the task domain has significantly better downstream performance. We
+
+
+Figure 3: Masked Language Model (MLM) loss of pre-trained BERT on the task data vs accuracy/f1 score of corresponding finetuned BERT. Different points correspond to different BERT models, pre-trained on random combination of different datasets. MLM loss on the general domain corpus for all the pre-trained BERT models considered here is roughly the same (within 0.02 of each other).
+
+
+
+conclude that in order to ensure success in the downstream task, we should aim to minimize $L_{\mathrm{LM}}^{\mathrm{in}}(\Theta)$ . A first attempt would be to pre-train or finetune the language model on $\mathcal{D}_{\mathrm{in}}$ . However, training a language model such as ELMo, GPT, BERT or XLNet requires a large corpus with several GBs of text and the available domain specific corpus $\mathcal{D}_{\mathrm{in}}$ is often just the task data which has few MBs of text. Training on such a small dataset would introduce high variance. We reduce this variance by taking training examples from the general domain corpus $\mathcal{D}$ , but control the bias this incurs by considering only elements having high relevance to the domain $\mathcal{D}_{\mathrm{in}}$ . Formally, we optimize a weighted pre-training loss function
+
+$$
+L _ {\mathrm {L M}} ^ {\Lambda} (\Theta) = \sum_ {x \in D} \lambda (x, \mathcal {D} _ {\mathrm {i n}}) \cdot \ell_ {\mathrm {L M}} (x; \Theta), \tag {1}
+$$
+
+where $\lambda (x,\mathcal{D}_{\mathrm{in}})$ are relevance weights of instance $x$ for domain $\mathcal{D}_{\mathrm{in}}$ . $\lambda (x,\mathcal{D}_{\mathrm{in}})$ is (close to) 1 if $x$ is relevant to $\mathcal{D}_{\mathrm{in}}$ and (close to) 0 otherwise. We compute these weights using an anomaly detection model fitted on $\mathcal{D}_{\mathrm{in}}$ . Note that concept of weighted loss to handle noisy or irrelevant data is well known (Moore and Lewis, 2010; Wang et al., 2017a). Major contribution of our paper is in proposing an anomaly detection based robust approach to find the relevance weights.
+
+# 3.1 Anomaly Detection to solve the Domain Membership Problem
+
+Detecting whether an instance $x$ is an in-domain instance is equivalent to solving the following problem: Given task data $\mathcal{T}$ and a sentence $s$ , determine if $s$ is likely to come from the distribution generating $\mathcal{T}$ or if $s$ is an anomaly.
+
+This view helps us make use of a wide variety of anomaly detection techniques developed in literature (Noble and Cook, 2003; Chandola et al., 2009; Chalapathy and Chawla, 2019). To make use of these techniques, we first need a good numeric representation (embedding) with domain discrimination property. We use pre-trained BERT to embed each sentence into a 768 dimensional vector. Once the data is embedded, we need to decide which among the many anomaly detection algorithms proposed in literature should be applied on the embeddings. To decide the anomaly detection method, we propose an evaluation method ranking the techniques based on their discriminative properties.
+
+Ranking anomaly detection algorithms: The idea is to treat the anomaly score as the prediction of a classifier distinguishing between in-domain and out-of-domain data. By doing so, we can consider classification metrics such as the f1_score as the score used to rank the anomaly detection algorithm. To do this, we split the in-domain data (the task data) into $\mathcal{D}_{\mathrm{in}}^{\mathrm{train}}$ , $\mathcal{D}_{\mathrm{in}}^{\mathrm{test}}$ using a 90/10 split. We also create out-of-domain data $\mathcal{D}_{\mathrm{out}}$ as a random subset of $\mathcal{D}$ of the same size as $\mathcal{D}_{\mathrm{in}}^{\mathrm{test}}$ . We train an anomaly detection algorithm $A$ with $\mathcal{D}_{\mathrm{in}}^{\mathrm{train}}$ , and evaluate it's f1_score on the labeled test set composed of the union $\mathcal{D}_{\mathrm{in}}^{\mathrm{test}} \cup \mathcal{D}_{\mathrm{out}}$ , where the labels indicate which set the instance originated from. Note that anomaly detection algorithms considered do not require labeled samples for training. Thus, mixing data from $\mathcal{D}_{\mathrm{out}}$ does not add much value.
+
+Table 1 provides the results of this evaluation on six anomaly detection algorithms. Details of the tasks can be found in Section 4. We can see that Isolation Forest consistently performs well for most of the tasks. Local Outlier Factor performs almost equally well but is slower in prediction. Although it is possible to adaptively choose for every task the anomaly detection algorithm maximizing the f1_score, we chose to use a single algorithm, Isolation Forests, for the sake of having a simpler technique and generalizable results. Due to space constraints, we push the discussion on Isolation Forest to Appendix C.
+
+Now that we chose the anomaly detection technique, we move to discuss the effectiveness of the algorithm in (i) identifying the domain from the task data (ii) identifying the domain related data from the general domain corpus.
+
+Figure 4 (left) shows that the anomaly detection
+
+| Task | RC | kNN | PCA | OCS | LOF | IF |
| CHEMPROT | 0.89 | 0.85 | 0.92 | 0.87 | 0.92 | 0.96 |
| ACL-ARC | 0.77 | 0.88 | 0.90 | 0.89 | 0.91 | 0.88 |
| HYPERPARTISAN | 0.86 | 0.86 | 0.95 | 0.98 | 0.91 | 0.98 |
| RCT20K | 0.85 | 0.88 | 0.82 | 0.76 | 0.87 | 0.93 |
| IMDB | 0.88 | 0.96 | 0.87 | 0.81 | 0.96 | 0.94 |
| SCIERC | 0.78 | 0.84 | 0.86 | 0.76 | 0.88 | 0.92 |
| HELPFULNESS | 0.82 | 0.89 | 0.83 | 0.76 | 0.83 | 0.92 |
| IMDB | 0.84 | 0.89 | 0.80 | 0.73 | 0.92 | 0.87 |
+
+
+Figure 4: Sentence anomaly scores for SST with anomaly detection algorithm trained on embeddings from Left: pretrained BERT, Right: finetuned BERT. In-task: sentences from the task data, out-of-task: sentences from general domain corpus.
+
+
+Figure 5: Filtering algorithm trained with Bio Abstracts and CS task data. We mix four corpora, filter out $80\%$ of the data and retain the remaining $20\%$ in both cases.
+
+Table 1: Scores of different anomaly detection algorithms for different tasks. RC: Robust Covariance (Nguyen and Welsch, 2010), kNN: Nearest neighbor (Gu et al., 2019), PCA: Principal Component Analysis (Harrou et al., 2015), OCS: One Class SVM (Schölkopf et al., 2000), LOF: Local Outlier Factor (Breunig et al., 2000), IF: Isolation Forest (Liu et al., 2008)
+
+| Corpus | Input data | Filtered (Bio) | Filtered (CS) |
| News | 7.1G (21.8%) | 0.1G (2.0%) | 0.0G (0.7%) |
| Finance | 4.9G (15.0%) | 0.0G (0.1%) | 0.0G (0.3%) |
| CS | 8.0G (24.5%) | 1.0G (15.4%) | 5.1G (78.0%) |
| Bio | 12.6G (38.7%) | 5.3G (82.4%) | 1.4G (20.9%) |
+
+algorithm is able to distinguish between the in-task-domain data and out-of-task domain data. These experiments are done for the Sentiment Analysis task (SST) discussed in Section 4. Interestingly, we noticed in our experiments that a language model pre-trained on a diverse corpus is a better choice when compared to a model finetuned on the target domain. We conjecture that the reason is that a finetuned BERT is overly focused on the variations in the task data which are useful for task prediction and forgets information pertaining to different domains which is useful for domain discrimination. We exhibit this phenomenon more clearly in Figure 4 (right) where it is evident that the discriminating ability of the finetuned model is worse.
+
+In order to assess the ability of our model to identify related text we perform the following experiment. First, we create a diverse corpus by taking the union of 4 datasets: News, Finance, CS abstracts and Biology abstracts. Figure 5, column
+
+'Input data' contains their respective sizes. We then train two anomaly score based discriminators, one on CS task data and the other on Bio abstracts. For each model we choose a threshold that would filter out $80\%$ of the data, and observe the data eventually retained by it. The fraction of data retained from each corpus for each model is given in Figure 5, columns 'Filtered (Bio)' and 'Filtered (CS)'. We see that data from the News and Finance corpus is almost completely filtered as it is quite different than the text in abstracts of academic papers. We also see that a non-negligible percent of the filtered data for the Bio model comes from CS and vice versa. Since both corpora are abstracts of academic papers it makes sense that each corpus contains relevant data for the other. The details related to these corpora are given in Appendix B.
+
+# 3.2 From Anomaly Detection Scores to Domain Adapted Pre-training
+
+Once the anomaly detection object is trained, we use it to compute the relevance weights i.e. compute $\lambda$ values defined in equation 1. Let the sentences in the pre-training corpus be $s_1,\ldots ,s_N$ with anomaly scores $\{A(s_1),\dots ,A(s_N)\}$ . We explore two different strategies of $\lambda$ value computation. First is when we normalize and transform the scores to compute continuous values and second when we use threshold and compute $0 / 1$ values.
+
+Continuous $\lambda$ values: We start by normalizing the anomaly scores to be mean zero and variance 1. Let $\mu = (\sum_{i=1}^{N} A(s_i)) / N$ , $\sigma = \sqrt{(\sum_{i=1}^{N} (A(s_i) - \mu)^2) / N}$ . Then, for every $i \in \{1, \dots, N\}$ , normalized score is $\bar{A}(s_i) = (A(s_i) - \mu) / \sigma$ . Using these normalized sentence anomaly scores, we compute the relevance weights as follows: $\lambda(s_i) = \frac{1}{1 + e^{-C(\alpha - \bar{A}(s_i))}}$ where $C$ and $\alpha$ are hyper-parameters. $C$ controls the sensitivity of the weight in terms of anomaly score and $\alpha$ controls the fraction of target domain data present in the general domain corpus. $C \to \infty$ results in $0 / 1$ weights corresponding to discrete $\lambda$ setting whereas $C = 0$ results in no task adaptation setting.
+
+Discrete $\lambda$ values: We sort the sentences as per anomaly scores, $A(s_{\sigma (1)})\leq A(s_{\sigma (2)})\leq \dots \leq$ $A(s_{\sigma (N)})$ and pick $\beta$ fraction of the sentences with lowest anomaly scores, $\lambda (s_{\sigma (i)}) = 1$ for $i\in$ $\{1,\ldots ,\beta N\}$ and 0 otherwise. Even though this approach is less general than the continuous $\lambda$ values case, it has an advantage of being model independent. We can filter out text, save it and use it to
+
+train any language model in a black box fashion. It does not require any change in pre-training or finetuning procedure. However, to utilize this option we need to make a change. Instead of filtering out sentences we need to filter out segments containing several consecutive sentences.
+
+To understand why, suppose we filter out sentence 1 and sentence 10 and none of the sentences in between. When we save the text and construct input instances from it for a language model, then an input instance may contain the end of sentence 1 and the start of sentence 10. This is problematic as sentence 1 and sentence 10 were not adjacent to each other in the original corpus and hence, language model does not apply to them. It distorts the training procedure resulting in worse language models. To resolve this issue, we group sentences into segments and classify the relevance of each segment. Formally, let $\gamma$ be a hyperparameter and for all $j \in 1, \ldots, \lfloor N / \gamma \rfloor$ let the segment score be $y_{j} = \sum_{i = (j - 1)*\gamma + 1}^{j*\gamma} \frac{A(s_{i})}{\gamma}$ . We sort the segments according to their anomaly scores, $y_{\sigma'(1)} \leq \cdots \leq y_{\sigma'(N/\gamma)}$ and select the $\beta$ fraction with lowest anomaly scores; save the sentences corresponding to these segments. To completely avoid the issue, we may set segment length very large. However, this is not feasible as the diverse nature of pre-training corpus makes sure that large enough segments rarely belong to a specific domain, meaning that the extracted data will no longer represent our target domain. We experimented with a handful of options for the segment length, and found the results to be stable with segments of 15 sentences.
+
+Continued pre-training instead of pre-training from scratch: Once we have computed the relevance weights $\lambda(s_i)$ , we do not start pre-training the language model from scratch as this is not feasible for each new task/domain. Instead, we start with a language model pre-trained on the general domain corpus and perform additional pre-training for relatively fewer steps with the weighted loss function. In our case, we start with a BERT language model pre-trained for one million steps and continued pre-training with updated loss function for either 50,000 or 100,000 steps.
+
+# 4 Experiments
+
+We use datasets listed in Table 2 along with a general domain corpus consisting of 8GB of text from Wikipedia articles. We use $\mathrm{BERT}_{\mathrm{BASE}}$ model provided in the GluonNLP library for all our experi
+
+| Task | Train | Dev | Test | C |
| HYPERPARTISAN | 516 | 64 | 65 | 2 |
| ACL-ARC | 1688 | 114 | 139 | 6 |
| SCIERC | 3219 | 455 | 974 | 7 |
| CHEMPROT | 4169 | 2427 | 3469 | 13 |
| IMDB | 20000 | 5000 | 25000 | 2 |
| SST | 67349 | 872 | 1821 | 2 |
| AGNEWS | 115000 | 5000 | 7600 | 4 |
| HELPFULNESS | 115251 | 5000 | 25000 | 2 |
| RCT20K | 180040 | 30212 | 30135 | 5 |
+
+Table 2: Specification of task datasets. $C$ refers to the number of classes. CHEMPROT (Kringelum et al., 2016) and RCT20K (Dernoncourt and Lee, 2017) are from biomedical domain. HYPERPARTISAN (Kiesel et al., 2019) and AGNEWS (Zhang et al., 2015) are from news domain. HELPFULNESS (McAuley et al., 2015) and IMDB (Maas et al., 2011) are from reviews domain. ACL-ARC (Jurgens et al., 2018) and SCIERC (Luan et al., 2018) are from CS domain. SST (Socher et al., 2013) is a general domain sentiment analysis task.
+
+periments. It has 12 layers, 768 hidden dimensions per token, 12 attention heads and a total of 110 million parameters. It is pre-trained with a sum of two objectives. First is the masked language model objective where model learns to predict masked tokens. Second is the next sentence prediction objective where sentence learns to predict if sentence $B$ follows sentence $A$ or not. We use learning rate of 0.0001, batch size 256 and warm-up ratio 0.01. For finetuning, we pass the final layer [CLS] token embedding through a task specific feed-forward layer for prediction. We use learning rate 3e-5, batch size 8, warm-up ratio 0.1 and finetune the network for five epochs. In all the experiments, we start with a BERT pre-trained for one million steps and continue pre-training for additional 50,000 steps in case of discrete $\lambda$ , and 100,000 steps in case of continuous $\lambda$ . Also, as mentioned in Section 3.2, we filter out segments instead of sentences and save them. We set the segment length to be 15 sentences and filter out $20\%$ of the data. Pseudo-code of the end-to-end algorithm can be found in Appendix B.
+
+# 4.1 Baseline Methods
+
+For each baseline data selection method, we start with a BERT pre-trained on general domain corpus for one million steps as in case of TADPOLE. Then, we continue pre-training the baseline method for the same number of steps as in case of our method. In case of baseline methods which filter general domain corpus, we filter the same fraction of text as in case of our method. Due to space constraints, we discuss some of the technical details of Baseline methods in Appendix ??
+
+General: Continued pre-training on general do
+
+main corpus.
+
+Random: Continued pre-training on random subset of general domain corpus.
+
+Task (Gururangan et al., 2020): Continued pretraining on task data. Since task data is small, we can not pre-train on the task data for as many steps as in other cases. Instead we do 100 epochs, save the model after every epoch and pick the best one.
+
+LM (Moore and Lewis, 2010): Continued pretraining on text filtered via language models trained on task data. We train two language models, one on the task data and another on a subset of general domain corpus (same size as the task data). We select sentences with lowest scores given by the function $f(s) = H_I(s) - H_O(s)$ , where $H_I(s)$ and $H_O(s)$ are the cross-entropy between the $n$ -gram distribution and the language model distribution.
+
+Distance (Wang et al., 2017a): Continued pretraining on data filtered via Euclidean distance scoring function. For each sentence $f$ , we consider BERT embedding $v_{f}$ and compute vector centers $C_{F_{\mathrm{in}}}$ and $C_{F_{\mathrm{out}}}$ of the task data $F_{\mathrm{in}}$ and a random subset of general domain corpus $F_{\mathrm{out}}$ ; $C_{F_{\mathrm{in}}} = \frac{\sum_{f\in F_{\mathrm{in}}}v_f}{|F_{\mathrm{in}}|}, C_{F_{\mathrm{out}}} = \frac{\sum_{f\in F_{\mathrm{out}}}v_f}{|F_{\mathrm{out}}|}$ . We score a sentence $f$ as per the scoring function: $\delta_f = d(v_f, C_{F_{\mathrm{in}}}) - d(v_f, C_{F_{\mathrm{out}}})$ .
+
+Data-Aug (Xie et al., 2019): Data augmentation via back translation and tfidf based word replacement. In back translation, for each sentence $f$ , we translate it to french and then back into english. In tfidf based word replacement, we replace uninformative words with other uninformative words. Label of the new training example is same as the label of original example. Due to space constraints, we report the average scores of the two data augmentation strategies. Note that data augmentation only applies to task data used while finetuning and does not involve additional pre-training.
+
+# 4.2 Results
+
+Table 3 shows the effectiveness of TADPOLE, automatically adapting pre-training to the task domain. Top half contains the result for four small datasets and bottom half contains the results for five large datasets. Since focus of the paper is on small datasets, we take subsamples of large datasets of size 500, 1000, 2000, 5000, 20000. For tasks with less than $5k$ samples, continuing pre-training on the unfiltered corpus (General or Random subset) yields an average gain less than $0.11\%$ . Adapting pre-training by training on the task data only yields
+
+| Task | Base | General | Random | Task | LM | Distance | Data-Aug | TADPOLE | T+ Data-Aug |
| Small datasets: # training examples < 5K |
| HPRPARTISAN | 70.573.04 | 70.972.03 | 71.042.32 | 70.882.63 | 71.472.56 | 72.162.14 | 71.182.86 | 73.582.39 | 73.872.86 |
| ACL-ARC | 72.314.7 | 72.383.93 | 72.423.71 | 72.463.48 | 72.401.85 | 72.472.64 | 72.763.03 | 72.813.83 | 73.312.77 |
| SCIERC | 82.841.39 | 82.851.38 | 82.811.13 | 83.181.09 | 82.992.75 | 83.402.17 | 83.271.12 | 85.850.95 | 85.760.95 |
| CHEMPROT | 81.620.74 | 81.590.67 | 81.620.71 | 81.630.82 | 81.830.74 | 81.640.76 | 82.080.88 | 82.410.62 | 82.810.68 |
| Average Gain | - | 0.110.05 | 0.150.05 | 0.200.04 | 0.340.08 | 0.340.06 | 0.480.02 | 1.820.3 | 2.10.26 |
+
+| Average gain over five tasks: SST, RCT20K, HELPFULNESS, IMDB, AGNews with subset of training samples |
| #Training samples | General | Random | Task | LM | Distance | Data-Aug | TADPOLE | T + Data-Aug |
| 500 | 0.2011 | 0.2103 | 0.1805 | 0.22013 | 0.402 | 0.2109 | 2.1606 | 2.01013 |
| 1000 | 0.04015 | -0.2207 | 0.1305 | -0.2407 | 0.1803 | 0.2406 | 2.0107 | 2.0404 |
| 2000 | 0.14009 | 0.1602 | 0.2303 | 0.1804 | 0.201 | 0.105 | 1.4806 | 1.5203 |
| 5000 | 0.0906 | 0.1402 | 0.1101 | 0.001 | 0.0801 | 0.1206 | 1.002 | 1.3105 |
| 20000 | 0.0805 | 0.0703 | 0.001 | -0.1603 | 0.001 | 0.0505 | 0.7409 | 0.804 |
+
+Table 3: Performance of TADPOLE, six baseline methods and TADPOLE combined with Data Augmentation. At top, we list the performance of each task whereas at bottom we list the average performance gain over five tasks such that for each task, we subsample a fixed number of training samples. Base corresponds to the pre-trained model on general domain corpus with no further pre-training. Baseline methods are mentioned in previous subsection. TADPOLE corresponds to our method with discrete relevance weights. T+Data-Aug corresponds to our method combined with data augmentation during finetuning. Keeping in line with the previous works, we use the following metrics: accuracy for SST, micro f1 score for CHEMPROT and RCT20K, macro f1 score for ACL-ARC, SCIERC, HELPFULNESS, HPRPARTISAN, IMDB, and AGNEWS. Each model is finetuned eight times with different seeds and the mean value is reported. Subscript correspond to the standard deviation in the finetuned model performance. Average gain corresponds to the average improvement over Base for each of the baseline methods and TADPOLE. Subscript in Average Gain corresponds to the standard deviation in the estimate of the average gain.
+
+an average gain of $0.20\%$ . Applying popular data selection methods known for domain adaptation including Language Model based relevance score or Distance based relevance score yields a maximum gain of $0.34\%$ . TADPOLE beats all these methods and achieve an average gain of $1.82\%$ . Data augmentation on task data while finetuning (no additional pre-training) achieves an average gain $0.48\%$ . Combining Data-Augmentation with TADPOLE yields the maximum average gain showing that TADPOLE and Data Augmentation are complimentary methods and TADPOLE is superior to Data Augmentation on it's own. For tasks with more than $5k$ samples, we achieve an average gain of $0.36\%$ . Detailed results can be found in Appendix G. To further test the efficacy of TADPOLE with small number of training samples, we randomly select a subset of training samples from the large task datasets and treat it as a new task. We observe that the gap between performance gain from TADPOLE and baseline methods increase when the number of training samples are low.
+
+Models pre-trained on each of the four domain specific corpus can achieve a higher gain (3.37%) over the base model. However, unlike these models, our method has the advantage that it does not require access to any large domain specific corpus. Instead we only need a small task datasetalready available for finetuning. So, it is applicable to any
+
+new task from any new domain. We observe that Performance boost is higher if the corresponding boost via additional pre-training on large domain specific corpus is higher. Results for this comparison can be found in Appendix F. In Table 3, results are presented for the discrete relevant weight case as they are better when the number of steps available to continue pre-training are small. Results for continuous weights case can be found in Appendix E. Results are not very sensitive to the fraction of data filtered as can be seen in Figure 6 in Appendix H.
+
+# 5 Conclusion
+
+Domain shift in finetuning from Pre-training can significantly impact the performance of deep learning models. We address this issue in the most reasonable setting when we only have access to the labeled task data for finetuning. We adapt data selection methods from Domain Adaptation to adapt pre-training for the downstream task. The existing methods either require sufficiently large task data, or are based on adhoc techniques that do not generalize well across tasks. Our major contribution is providing a new data selection technique that performs well even with very little task data, and generalizes well across tasks.
+
+# References
+
+Steven Abney. 2007. Semisupervised learning for computational linguistics. CRC Press.
+Waleed Ammar, Dirk Groeneveld, Chandra Bhagavatula, Iz Beltagy, Miles Crawford, Doug Downey, Jason Dunkelberger, Ahmed Elghohary, Sergey Feldman, Vu Ha, et al. 2018. Construction of the literature graph in semantic scholar. arXiv preprint arXiv:1805.02262.
+Dogu Araci. 2019. Finbert: Financial sentiment analysis with pre-trained language models. arXiv preprint arXiv:1908.10063.
+Amittai Axelrod, Xiaodong He, and Jianfeng Gao. 2011. Domain adaptation via pseudo in-domain data selection. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pages 355-362.
+Iz Beltagy, Kyle Lo, and Arman Cohan. 2019. Scibert: A pretrained language model for scientific text. arXiv preprint arXiv:1903.10676.
+Eyal Ben-David, Carmel Rabinovitz, and Roi Reichart. 2020. Perl: Pivot-based domain adaptation for pre-trained deep contextualized embedding models. Transactions of the Association for Computational Linguistics, 8:504-521.
+John Blitzer, Ryan McDonald, and Fernando Pereira. 2006. Domain adaptation with structural correspondence learning. In Proceedings of the 2006 conference on empirical methods in natural language processing, pages 120-128.
+Markus M Breunig, Hans-Peter Kriegel, Raymond T Ng, and Jörg Sander. 2000. Lof: identifying density-based local outliers. In Proceedings of the 2000 ACM SIGMOD international conference on Management of data, pages 93-104.
+Raghavendra Chalopathy and Sanjay Chawla. 2019. Deep learning for anomaly detection: A survey. arXiv preprint arXiv:1901.03407.
+Varun Chandola, Arindam Banerjee, and Vipin Kumar. 2009. Anomaly detection: A survey. ACM computing surveys (CSUR), 41(3):1-58.
+Xia Cui and Danushka Bollegala. 2019. Self-adaptation for unsupervised domain adaptation. Proceedings-Natural Language Processing in a Deep Learning World.
+Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. 2019. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv preprint arXiv:1901.02860.
+Franck Dernoncourt and Ji Young Lee. 2017. Pubmed 200k rct: a dataset for sequential sentence classification in medical abstracts. arXiv preprint arXiv:1710.06071.
+
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
+Kevin Duh, Graham Neubig, Katsuhito Sudoh, and Hajime Tsukada. 2013. Adaptation data selection using neural language models: Experiments in machine translation. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 678-683.
+Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Lavi-olette, Mario Marchand, and Victor Lempitsky. 2016. Domain-adversarial training of neural networks. The journal of machine learning research, 17(1):2096-2030.
+Xiaoyi Gu, Leman Akoglu, and Alessandro Rinaldo. 2019. Statistical analysis of nearest neighbor methods for anomaly detection. In Advances in Neural Information Processing Systems, pages 10923-10933.
+Suchin Gururangan, Ana Marasovic, Swabha Swayamdipta, Kyle Lo, Iz Beltagy, Doug Downey, and Noah A Smith. 2020. Don't stop pretraining: Adapt language models to domains and tasks. arXiv preprint arXiv:2004.10964.
+Fouzi Harrou, Farid Kadri, Sondes Chaabane, Christian Tahon, and Ying Sun. 2015. Improved principal component analysis for anomaly detection: Application to an emergency department. Computers & Industrial Engineering, 88:63-77.
+Jeremy Howard and Sebastian Ruder. 2018. Universal language model fine-tuning for text classification. arXiv preprint arXiv:1801.06146.
+Kexin Huang, Jaan Altosaar, and Rajesh Ranganath. 2019. Clinicalbert: Modeling clinical notes and predicting hospital readmission. arXiv preprint arXiv:1904.05342.
+David Jurgens, Srijan Kumar, Raine Hoover, Dan McFarland, and Dan Jurafsky. 2018. Measuring the evolution of a scientific field through citation frames. Transactions of the Association for Computational Linguistics, 6:391-406.
+Johannes Kiesel, Maria Mestre, Rishabh Shukla, Emmanuel Vincent, Payam Adineh, David Corney, Benno Stein, and Martin Potthast. 2019. Semeval-2019 task 4: Hyperpartisan news detection. In Proceedings of the 13th International Workshop on Semantic Evaluation, pages 829-839.
+Jens Kringelum, Sonny Kim Kjaerulff, Soren Brunak, Ole Lund, Tudor I Oprea, and Olivier Taboureau. 2016. Chemprot-3.0: a global chemical biology diseases mapping. Database, 2016.
+
+Jinhyuk Lee, Wonjin Yoon, Sungdong Kim, Donghyeon Kim, Sunkyu Kim, Chan Ho So, and Jaewoo Kang. 2020. Biobert: a pre-trained biomedical language representation model for biomedical text mining. Bioinformatics, 36(4):1234-1240.
+Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou. 2008. Isolation forest. In 2008 Eighth IEEE International Conference on Data Mining, pages 413-422. IEEE.
+Yi Luan, Luheng He, Mari Ostendorf, and Hannaneh Hajishirzi. 2018. Multi-task identification of entities, relations, and coreference for scientific knowledge graph construction. arXiv preprint arXiv:1808.09602.
+Andrew Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew Y Ng, and Christopher Potts. 2011. Learning word vectors for sentiment analysis. In Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies, pages 142-150.
+Julian McAuley, Christopher Targett, Qinfeng Shi, and Anton Van Den Hengel. 2015. Image-based recommendations on styles and substitutes. In Proceedings of the 38th international ACM SIGIR conference on research and development in information retrieval, pages 43-52.
+Robert C. Moore and William Lewis. 2010. Intelligent selection of language model training data. In Proceedings of the ACL 2010 Conference Short Papers, pages 220-224, Uppsala, Sweden. Association for Computational Linguistics.
+Tri-Dzung Nguyen and Roy E Welsch. 2010. Outlier detection and robust covariance estimation using mathematical programming. Advances in data analysis and classification, 4(4):301-334.
+Caleb C Noble and Diane J Cook. 2003. Graph-based anomaly detection. In Proceedings of the ninth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 631-636.
+Sinno Jialin Pan, Xiaochuan Ni, Jian-Tao Sun, Qiang Yang, and Zheng Chen. 2010. Cross-domain sentiment classification via spectral feature alignment. In Proceedings of the 19th international conference on World wide web, pages 751-760.
+Nanyun Peng and Mark Dredze. 2016. Multi-task domain adaptation for sequence tagging. arXiv preprint arXiv:1608.02689.
+Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word representations. arXiv preprint arXiv:1802.05365.
+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.
+
+Jason Phang, Phu Mon Htut, Yada Pruksachatkun, Haokun Liu, Clara Vania, Katharina Kann, Iacer Calixto, and Samuel R Bowman. 2020. English intermediate-task training improves zero-shot cross-lingual transfer too. arXiv preprint arXiv:2005.13013.
+Barbara Plank and Gertjan Van Noord. 2011. Effective measures of domain similarity for parsing. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 1566-1576.
+Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. 2018. Improving language understanding by generative pre-training.
+Robert Remus. 2012. Domain adaptation using domain similarity-and domain complexity-based instance selection for cross-domain sentiment analysis. In 2012 IEEE 12th international conference on data mining workshops, pages 717-723. IEEE.
+Sebastian Ruder and Barbara Plank. 2017. Learning to select data for transfer learning with bayesian optimization. arXiv preprint arXiv:1707.05246.
+Bernhard Scholkopf, Robert C Williamson, Alex J Smola, John Shawe-Taylor, and John C Platt. 2000. Support vector method for novelty detection. In Advances in neural information processing systems, pages 582-588.
+Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y 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.
+Vincent Van Asch and Walter Daelemans. 2010. Using domain similarity for performance estimation. In Proceedings of the 2010 Workshop on Domain Adaptation for Natural Language Processing, pages 31-36.
+Marlies van der Wees, Arianna Bisazza, and Christof Monz. 2017. Dynamic data selection for neural machine translation. arXiv preprint arXiv:1708.00712.
+Rui Wang, Andrew Finch, Masao Utiyama, and Eichiro Sumita. 2017a. Sentence embedding for neural machine translation domain adaptation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 560-566.
+Rui Wang, Masao Utiyama, Lemao Liu, Kehai Chen, and Eiichiro Sumita. 2017b. Instance weighting for neural machine translation domain adaptation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1482-1488.
+
+Qizhe Xie, Zihang Dai, Eduard Hovy, Minh-Thang Luong, and Quoc V Le. 2019. Unsupervised data augmentation for consistency training. arXiv preprint arXiv:1904.12848.
+Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. 2019. Xlnet: Generalized autoregressive pretraining for language understanding. In Advances in neural information processing systems, pages 5753-5763.
+Rowan Zellers, Ari Holtzman, Hannah Rashkin, Yonatan Bisk, Ali Farhadi, Franziska Roesner, and Yejin Choi. 2019. Defending against neural fake news. In Advances in Neural Information Processing Systems, pages 9054-9065.
+Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In Advances in neural information processing systems, pages 649-657.
+
+# Appendix
+
+# A Related Work
+
+Domain Adaptation: A typical set up for Domain Adaptation involves access to labeled data in source domain, very limited or no labeled data in the target domain and unlabeled data in both source and target domains. This is somewhat different than the setup for our paper where we have access to labeled data with no additional unlabeled data in the task domain and our objective is optimize performance for the same domain. Nevertheless, several techniques of Domain Adaptation have similarities or core components useful for our setup. There are two sets of approaches addressing Domain Adaptation problem: model-centric and data-centric. Model-centric approaches redesign parts of the model: the feature space, the loss function or regularization and the structure of the model (Blitzer et al., 2006; Pan et al., 2010; Ganin et al., 2016). A recent such approach, appropriate for our setting is called Pivot-based Domain Adaptation; it has recently been applied to Task Adaptive Pre-training when there is additional unlabeled task data available (Ben-David et al., 2020). In a nutshell, the idea is to distinguish between pivot and non-pivot features, where pivot features behave similarly in both domains. Then, by converting the non-pivot to pivot features, one can make use of a model trained on the source data. This approach does not work well when the target data is small since the mapping of non-pivot to pivot features cannot be trained with a limited size dataset. Since our technique is data-centric and applies to the regime of a small target corpus, we do not further analyze this or any other model-centric approach.
+
+Data-centric approaches for domain adaptation include pseudo-labeling, using auxiliary tasks and data selection. Pseudo-labeling apply a trained classifier to predict labels on unlabeled instances which are then treated as 'pseudo' gold labels for further training (Abney, 2007; Cui and Bollegala, 2019). Auxiliary-task domain adaptation use labeled data from auxiliary tasks via multi-task learning (Peng and Dredze, 2016) or intermediate-task transfer (Phang et al., 2018, 2020). The methods most relevant to us are those of data selection and are discussed above in detail.
+
+# B Datasets in accuracy estimation of Anomaly score based data filtration
+
+CS task data: To train anomaly score discriminator for CS data, we use the tasks data from ACLARC and SCIERC. Details of these datasets are mentioned in Section 4.
+
+CS and Bio Abstracts: Semantic Scholar corpus (Ammar et al., 2018) contains datasets from a variety of domain. We filter out text based on the domain field and only keep the abstracts from CS and bio domain.
+
+News: We use REALNEWS (Zellers et al., 2019) corpus containing news articles from 500 news domains indexed by Google News. It is obtained by scraping dumps from Common Crawl.
+
+Finance: We use the TRC2-financial dataset. This a subset of Reuters TRC24 corpus containing news articles published between 2008 and 2010. It can be obtained by applying here: https://trec.nist.gov/data/reuters/reuters.html
+
+# C Isolation Forest (Liu et al., 2008)
+
+Isolation Forest is an unsupervised decision tree ensemble method that identifies anomalies by isolating outliers of the data. It isolates anomalies in data points instead of profiling the normal points. Algorithm works by recursively partitioning the data using a random split between the minimum and maximum value of a random feature. It works due to the observation that outliers are less frequent than the normal points and lie further away from normal points in the feature space. Thus, in a random partitioning, anomalous points would require fewer splits on features resulting in shorter paths and distinguishing from the rest of the points. Anomaly score of a point $x$ is defined as $s(x,n) = 2^{-\frac{E(h(x))}{c(n)}}$ , where $E[h(x)]$ is the expected path length of $x$ in various decision trees, $c(n) = 2H(n - 1) - 2(n - 1)/n$ is the average path length of unsuccessful search in a Binary Tree and $H(n - 1)$ is the $n - 1$ -th harmonic number and $n$ is the number of external nodes.
+
+# D Pseudo Code
+
+Algorithm 1 shows the pseudo code for the case of continuous relevance weights. Discrete relevance weight setting is same as $C \to \infty$ . As discussed in 3.2, in case of discrete relevance weights, we filter out segments containing several consec
+
+# Algorithm 1 Task Adaptive Pre-training
+
+Input: Pre-trained model $B$ , Pre-training instances $x_{1}, \ldots, x_{N}$ , task data $\mathcal{T}$ , $(C, \alpha)$ , #steps
+
+# Stage 1: Instance weight computation
+
+Let the sentences of the task be $s_1, \ldots, s_t$ with sentence embeddings $P = \{\text{Embed}(s_1), \ldots, \text{Embed}(s_t)\}$ .
+
+Let a random subset of pre-training instances (sentences of these instances) be $s_1', \ldots, s_{t/10}'$ with BERT based sentence embeddings $N = \{ \text{Embed}(s_1'), \ldots, \text{Embed}(s_{t/10}') \}$
+
+Train an anomaly detection object, IF $=$ IsolationForest $(P\cup N)$
+
+For $i\in [N]$ , let $S(x_{i}) = \mathrm{IF}.\mathrm{score}(\mathrm{Embed}(x_{i}))$
+
+Let $\mu = \frac{1}{N}\sum_{i=1}^{N}S(x_i)$ and $\sigma = \sqrt{\frac{1}{N}\sum_{i=1}^{N}(S(x_i) - \mu)^2}$ .
+
+For every $i\in [N]$ $\bar{S} (x_i) = \frac{S(x_i) - \mu}{\sigma}$
+
+For every $i\in [N]$ $\lambda (x_{i}) = \frac{1}{1 + e^{-C(\alpha - \bar{S} (x_{i}))}}$
+
+# Stage 2: Adaptation of pre-training to target domain
+
+Continue training language model $B$ for #steps on instances $x_{1},\ldots ,x_{N}$ with instance weights $\lambda (x_1),\dots ,\lambda (x_N)$
+
+Finetune resulting model on the labeled task data $\mathcal{T}$
+
+utive sentences. We experimented with several options for the segment length and found the stable segment length to be 15 sentences. Here, a sentence is a consecutive piece of text such that when applied through the BERT tokenizer, it results in 256 sentences.
+
+# E Continuous relevance weights
+
+We see in Table 4 that a model additionally pretrained for 50,000 with discrete $\lambda$ values consistently over performs the continuous case even when we train with continuous relevance weights for far higher number of steps. This is because of the fact that many of those steps yield virtually no training at all. For instance, suppose the relevance weights are uniformly distributed between 0 and 1; [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]. Then, in discrete case we pick the top two sentences and thus two steps are sufficient to train on these most relevant sentences (assume batch size is 1). However, in continuous case, we need to train the model for ten steps to train on these top two relevant sentences. Thus, we need many more steps to
+
+achieve and beat the performance achieved in the Discrete case. An open question is to combine the two settings so as to benefit from the generality of Continuous case and efficiency of the discrete case.
+
+# F Performance boost with Domain-specific Corpus vs TADPOLE
+
+We compare the performance boost we achieved due to TADPOLE with the performance boost we achieve if we have access to large pre-training corpus. In Table 5, we list the gain in performance in both cases over eight tasks from four domains. We see that the performance boost is higher with TADPOLE if the corresponding boost is higher with domain specific corpus. Thus if there is a large domain shift between the general domain corpus and the task data, as can be measured by the performance boost via large pre-training corpus, then TADPOLE is able to achieve large performance boost via Task Adaptation. Scale of numbers in the two columns are not directly comparable due to the following two reasons. First is that additional pre-training done is Gururangan et al. (2020) is for almost as many steps as the number of steps required to pre-train a network from scratch. However, in our case additional pre-training is done for only $5\%$ of the number of steps required to pretrain a network from scratch. Second reason is that the model used in (Gururangan et al., 2020) is different, ROBERTA. Also, the general domain corpus is different and thus the domain shift is not exactly the same as in our case. The point however remains the same, which is that as the target domain is further away from the pre-training corpus, the benefits of TADPOLE increase.
+
+# G Performance gain for large datasets
+
+Table 6 shows the results for datasets with more than $5k$ training samples.
+
+# H Different data fraction
+
+Figure 6 shows that results shown in Table 3 are not very sensitive to the fraction of pre-training data filtered. We can chose anywhere between $2 - 20\%$ of the data.
+
+| Task | Base | Discrete | Continuous-1 | Continuous-3 |
| CHEMPROT | 81.620.74 | 82.410.62 | 81.740.81 | 81.640.83 |
| RCT20K | 87.520.16 | 87.820.13 | 87.490.28 | 87.560.22 |
| HPRPARTISAN | 70.573.04 | 73.582.39 | 70.941.98 | 71.292.95 |
| AGNEWS | 93.990.13 | 94.030.16 | 94.010.14 | 94.010.15 |
| HELPFULNESS | 69.300.60 | 69.700.92 | 69.350.5 | 69.370.44 |
| IMDB | 88.650.24 | 89.290.22 | 88.630.51 | 88.710.46 |
| ACL-ARC | 72.314.7 | 72.813.83 | 72.262.33 | 72.362.12 |
| SCIERC | 82.841.39 | 85.850.95 | 83.141.96 | 83.132.65 |
| SST | 92.020.29 | 92.420.32 | 92.110.32 | 92.130.37 |
+
+Table 4: Comparison of discrete vs continuous relevance weight setting. Base corresponds to the pre-trained model on general domain corpus with no further pre-training. Discrete refers to TADPOLE with discrete relevance weights/filtered out text and pre-trained additionally for 50000 steps. Continuous-x refers to TADPOLE with continuous relevance weights and pre-trained additionally for $x*100,000$ more steps. Metrics used for different tasks: accuracy for SST, micro f1 score for CHEMPROT and RCT20K, macro f1 score for ACL-ARC, SCIERC, HELPFULNESS, HPRPARTISAN, IMDB, and AGNEWS. Each model is finetuned eight times with different seeds and the mean value is reported. Subscript correspond to the standard deviation in the finetuned model performance.
+
+| Task | TADPOLE | Domain Corpus |
| CHEMPROT | 0.79 | 2.3 |
| RCT20K | 0.3 | 0.4 |
| HYPERPARTISAN | 3.01 | 1.6 |
| AGNEWS | 0.04 | 0.0 |
| HELPFULNESS | 0.4 | 1.4 |
| IMDB | 0.64 | 5.4 |
| ACL-ARC | 0.5 | 3.5 |
| SCIERC | 3.01 | 12.4 |
+
+Table 5: Performance boost via TADPOLE vs pre-training on domain specific corpus. TADPOLE corresponds to our method with discrete relevance weights/filtered out text and pre-trained additionally for 50000 steps. Domain Corpus refers to the model trained in (Gururangan et al., 2020) over the domain same as the downstream task. Metrics used for different tasks: accuracy for SST, micro f1 score for CHEMPROT and RCT20K, macro f1 score for ACL-ARC, SCIERC, HELPFULNESS, HPRPARTISAN, IMDB, and AGNEWS. Each model is finetuned eight times with different seeds. We report the difference in the mean value of performance between the model with additional pre-training and base model with no additional pre-training.
+
+
+Figure 6: Performance gain as fraction of data filtered for tasks with less than $5k$ training samples.
+
+| Task | Base | General | Random | Task | LM | Distance | Data-Aug | TADPOLE | T+ Data-Aug |
| Large datasets: # training examples ≥ 5K |
| IMDB | 88.650.24 | 88.530.27 | 88.630.26 | 88.770.39 | 88.670.44 | 88.690.47 | 88.750.52 | 89.290.22 | 88.910.17 |
| SST | 92.020.29 | 92.210.31 | 92.140.24 | 92.210.24 | 92.250.4 | 92.150.35 | 91.980.12 | 92.420.32 | 92.670.55 |
| AGNEWS | 93.990.13 | 94.060.19 | 94.090.11 | 94.040.08 | 94.030.13 | 94.040.11 | 93.970.28 | 94.030.16 | 94.450.3 |
| HELPFULNESS | 69.300.60 | 69.390.78 | 69.340.58 | 69.410.50 | 69.580.59 | 69.420.69 | 69.3056 | 69.700.92 | 69.330.64 |
| RCT20K | 87.520.16 | 87.570.16 | 87.540.17 | 87.600.18 | 87.850.23 | 87.620.24 | 87.570.19 | 87.820.13 | 87.830.37 |
| Average Gain | - | 0.020.02 | 0.040.01 | 0.110.01 | 0.180.03 | 0.090.01 | 0.020.01 | 0.360.04 | 0.340.04 |
+
+Table 6: Performance of TADPOLE and five Baseline methods. Base corresponds to the pre-trained model on general domain corpus with no further pre-training. Baseline methods are mentioned in previous subsection. TADPOLE corresponds to our method with discrete relevance weights. T+Data-Aug corresponds to our method combined with data augmentation during finetuning. Keeping in line with the previous works, we use the following metrics: accuracy for SST, micro f1 score for CHEMPROT and RCT20K, macro f1 score for ACL-ARC, SCIERC, HELPFULNESS, HPRPARTISAN, IMDB, and AGNEWS. Each model is finetuned eight times with different seeds and the mean value is reported. Subscript correspond to the standard deviation in the finetuned model performance. Average gain corresponds to the average improvement over Base for each of the baseline methods and TADPOLE. Subscript in Average Gain corresponds to the standard deviation in the estimate of the average gain.
\ No newline at end of file
diff --git a/tadpoletaskadaptedpretrainingviaanomalydetection/images.zip b/tadpoletaskadaptedpretrainingviaanomalydetection/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..c4f4a80ca2437a872cc99fcab67a62aa96ed3f7a
--- /dev/null
+++ b/tadpoletaskadaptedpretrainingviaanomalydetection/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3fc02dcf9ed5e0c10835c4a5a18d38906d6970c1b4780ddc05b53bc15bcd7fb1
+size 414069
diff --git a/tadpoletaskadaptedpretrainingviaanomalydetection/layout.json b/tadpoletaskadaptedpretrainingviaanomalydetection/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..7509096b35951b7e135840d5bf408a9827b03d06
--- /dev/null
+++ b/tadpoletaskadaptedpretrainingviaanomalydetection/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4d3ccf0de4d0c1f8667202da27443b02af543617011942ff90a3bc216cc48d1d
+size 472985
diff --git a/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/9417ccd6-9b72-4725-bbf7-44b30c98974a_content_list.json b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/9417ccd6-9b72-4725-bbf7-44b30c98974a_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..1c85f8cb2b1580d5828ef258a21abe8e1438b933
--- /dev/null
+++ b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/9417ccd6-9b72-4725-bbf7-44b30c98974a_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c65e8074cdc7f248748fb89b0aa243ad624f47c22ddca8e8be9ecff619d89c93
+size 70560
diff --git a/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/9417ccd6-9b72-4725-bbf7-44b30c98974a_model.json b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/9417ccd6-9b72-4725-bbf7-44b30c98974a_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..a9843e902a0b64b4fc746fc084ed7a8a561bc980
--- /dev/null
+++ b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/9417ccd6-9b72-4725-bbf7-44b30c98974a_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9fabe1d7907ee3b74ee503b49f1dcb51898af05a574bfb68bbb16b6c35a4ff28
+size 83922
diff --git a/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/9417ccd6-9b72-4725-bbf7-44b30c98974a_origin.pdf b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/9417ccd6-9b72-4725-bbf7-44b30c98974a_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..ddc5fb0115949e55fc2e789179fd434e29e80291
--- /dev/null
+++ b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/9417ccd6-9b72-4725-bbf7-44b30c98974a_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2eb864d9bc52e4f8ea2d6d501b8b344148ab4f206c893edfb1824d139628ddc5
+size 540303
diff --git a/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/full.md b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..52cf2a8d3043b57ca2a2b5a098c365a933f4c697
--- /dev/null
+++ b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/full.md
@@ -0,0 +1,311 @@
+# TDEER: An Efficient Translating Decoding Schema for Joint Extraction of Entities and Relations
+
+Xianming Li, Xiaotian Luo, Chenghao Dong *Daichuan Yang, Beidi Luan, Zhen He Ant Group, Shanghai
+
+{niming.lxm,lxt267638,dch166451,beidi.lbd}@antgroup.com {daichuan.ydc,fuyi.hz}@antgroup.com
+
+# Abstract
+
+Joint extraction of entities and relations from unstructured texts to form factual triples is a fundamental task of constructing a Knowledge Base (KB). A common method is to decode triples by predicting entity pairs to obtain the corresponding relation. However, it is still challenging to handle this task efficiently, especially for the overlapping triple problem. To address such a problem, this paper proposes a novel efficient entities and relations extraction model called TDEER, which stands for Translating Decoding Schema for Joint Extraction of Entities and Relations. Unlike the common approaches, the proposed translating decoding schema regards the relation as a translating operation from subject to objects, i.e., TDEER decodes triples as subject + relation → objects. TDEER can naturally handle the overlapping triple problem, because the translating decoding schema can recognize all possible triples, including overlapping and non-overlapping triples. To enhance model robustness, we introduce negative samples to alleviate error accumulation at different stages. Extensive experiments on public datasets demonstrate that TDEER produces competitive results compared with the state-of-the-art (SOTA) baselines. Furthermore, the computation complexity analysis indicates that TDEER is more efficient than powerful baselines. Especially, the proposed TDEER is 2 times faster than the recent SOTA models. The code is available at https://github.com/4AI/TDEER.
+
+# 1 Introduction
+
+Extraction of entities and relations from unstructured texts is one of the most essential information extraction tasks. It aims to extract entities and their corresponding semantic relations from unstructured texts, which are usually presented in a
+
+
+Figure 1: Cases of Normal, EntityPairOverlap (EPO), and SingleEntityOverlap (SEO) overlapping triples.
+
+triple form of (subject, relation, object), e.g., (Microsoft, co-founder, Bill Gates). It is also a crucial step in building a large-scale KB and exerts an important role in the development of web search (Szumlanski and Gomez, 2010), question answering (Fader et al., 2014), biomedical text mining (Huang and Lu, 2016), etc.
+
+Traditional approaches (Zelenko et al., 2003; Chan and Roth, 2011; Rink and Harabagiu, 2010) handle this task in a pipeline manner, i.e., extracting the entities first and then identifying their relations. The pipeline framework simplifies the extraction task, but it ignores the relevance between entity identification and relation prediction. To address this problem, several joint learning models have been proposed and can be categorized into feature-based models and end-to-end deep models. Feature-based models (Li and Ji, 2014; Ren et al., 2017) introduce a complex process of feature engineering and profoundly depend on Natural Language Processing tools for feature extraction. More recently, the end-to-end neural network models (Gupta et al., 2016; Zheng et al., 2017; Zeng et al., 2018; Fu et al., 2019; Wei et al., 2020) have become the mainstream method for relation extraction tasks. Such models utilize the learned representation from pre-trained language models and are a more promising approach than manual features.
+
+More research interests have been concerned with complicated entity and relation extraction problems, such as the overlapping triple problem.
+
+Zeng et al. (2018) summarized the overlapping triple problem into three categories, i.e. Normal, SEO, and EPO, which are depicted in Figure 1. Many methods have been proposed to address the overlapping issue, for instance, encoder-decoder framework (Zeng et al., 2018) and decomposition approaches (Yu et al., 2020; Wei et al., 2020). However, such approaches still suffer from setbacks when handling the overlapping triple problem. More specifically, the encoder-decoder framework can only resolve the one-word entity overlapping problem and fail to handle the multi-word entity overlapping problem. Meanwhile, the decomposition approaches suffer error accumulation between dependent stages. To address these problems, Wang et al. (2020) presented a one-stage method, TPLinker, that transforms the joint extraction task into a token pair linking problem to resolve the overlapping triple problem. TPLinker does not contain any inter-dependent stages, hence it can alleviate error accumulation. However, processing all token pairs at encoder layers suffers from high computational complexity, which is an obstacle for TPLinker to encode long text.
+
+We present a novel framework TDEER to jointly extract the entities and relations by a translating decoding schema to handle the overlapping triple problem. More concretely, TDEER interprets the relation as a translating operation from subject entity to object entities, i.e., it decodes triples by subject $+$ relation $\rightarrow$ objects. The proposed translating decoding schema can effectively resolve the overlapping triple problem. TDEER iterates all pairs of subjects and relations to recognize objects (or no object), hence all possible triples, including overlapping or non-overlapping triples, can be considered. We propose a negative sample strategy to detect and alleviate error propagation in different stages. This strategy can enable TDEER to alleviate error accumulation to achieve higher results. TDEER is an efficient approach as it first retrieves all possible relations and entities, then uses distinguished entities and relations to decode triples. By doing this, the search space can be reduced, thus it is more efficient than previous works. The computational complexity of the proposed translating decoding schema is $O(n + sr)$ , where $n$ is the sequence length, $s$ is the number of subjects in the input sentence, $r$ denotes the number of relations in the input sentence. Extensive experiments illustrate that TDEER achieves better results than
+
+SOTA models in most datasets and is competent in handling the overlapping triple problem.
+
+In summary, our contributions are as follows: (1) We propose a novel translating decoding schema for joint extraction of entities and relations from unstructured texts. (2) TDEER can handle the intractable overlapping triple problem effectively and efficiently. (3) Notably, TDEER is about 2 times faster than the current SOTA models.
+
+# 2 Related Work
+
+The pipeline approach and joint approach are the two mainstream methods for extracting entities and relations from unstructured texts.
+
+Traditionally, extracting entities and relations to form triples has been studied as two separated independent tasks: Named Entity Recognition (NER) and Relation Extraction. Mintz et al. (2009) introduced a distant supervision model, and Hoffmann et al. (2011) used a weak supervision method to extract entities and relations. The features of distant supervision and weak supervision approaches are often derived from Natural Language Processing (NLP) tools. It suffers from data labeling errors that inevitably exist in NLP tools. To address this problem, Zeng et al. (2015) employed a multi-instance learning approach to tackle the problem of data labeling errors. Qin et al. (2018) applied reinforcement learning for extraction of entities and relations. Although the pipeline models produced promising results, they neglect the triple-level dependencies between entities and relations. Recently, Zhong and Chen (2021) presented a pipeline approach incorporating entity information for entity and relation extraction.
+
+To exploit the dependencies between entities and relations, multiply joint extraction models have been proposed. Zheng et al. (2017) introduced a unified tagging scheme and transformed the relationship extraction problem into a sequence labeling problem. Zeng et al. (2018) applied a sequence-to-sequence model with a copy mechanism to solve the overlapping triple problem. Trisedya et al. (2019) employed the encoder-decoder framework to jointly extract triples from sentences and map them into an existing KB. Fu et al. (2019) applied graph convolutional networks to jointly learn named entities and relations. Dai et al. (2019) presented a unified joint extraction model to tag entity and relation labels directly according to a query word position, which can simultaneously extract
+
+all entities and their types. Wei et al. (2020) proposed a cascade binary tagging framework. Wang et al. (2020) formulated the joint extraction as a token pair linking problem.
+
+Moreover, some knowledge representation models (Bordes et al., 2013; Weston et al., 2013; Wang et al., 2014; Tu et al., 2017) are adopted to refine the triple extraction model via scoring candidate facts by knowledge graph embedding. Although some of them also use the "translation" idea, the function is different from ours. In their setting, they use the "translation" idea to construct rank-based knowledge graph embedding models. They cannot be used to extract entities and relations from texts directly. In our setting, the "translation" idea is applied to end-to-end joint extract entities and relations from text.
+
+The proposed translating decoding schema is a novel approach to solve the overlapping triple problem effectively and efficiently, which makes our model crucially different from previous works.
+
+# 3 Methodology
+
+This paper proposes a three-stage model, TDEER. In the first stage, TDEER uses a span-based entity tagging model to extract all subjects and objects. In the second stage, TDEER employs the multi-label classification strategy to detect all relevant relations. In the third stage, TDEER iterates the pairs of subjects and relations to identify respective objects by the proposed translating decoding schema. Figure 2 shows the generic framework of TDEER. In subsequent sections, we will describe the three stages of TDEER in detail.
+
+# 3.1 Input Layer
+
+The input of TDEER is a sentence $T$ . We pad the sentence to keep a uniform length $n$ for all sentences. For an LSTM-based model, we first map each word into a $k$ -dimensional continuous space and obtains the word embedding $\mathbf{t}_i \in \mathbb{R}^k$ . Then we concatenate all word vectors to form a $k \times n$ matrix as model input: $\mathbf{t} = [\mathbf{t}_1, \mathbf{t}_2, \dots, \mathbf{t}_n]$ . We employ LSTM on the embedding matrix to produce latent semantic feature map $\mathbf{X}$ :
+
+$$
+\mathbf {X} = \operatorname {L S T M} (\mathbf {t}). \tag {1}
+$$
+
+As for a BERT-based model, TDEER extracts feature map via the pre-trained BERT (Devlin et al., 2019) over text input:
+
+$$
+\mathbf {X} = \operatorname {B E R T} (T). \tag {2}
+$$
+
+# 3.2 Entity Tagging Model
+
+To obtain entities and their positions efficiently, we adopt a span-based tagging model following prior works (Yu et al., 2020; Wei et al., 2020). We apply two binary classifiers to predict the start and end position of entities respectively. The operations on each token in a sentence are as follows:
+
+$$
+p _ {i} ^ {\text {s t a r t}} = \sigma \left(\mathbf {W} _ {\text {s t a r t}} \mathbf {X} _ {i} + \mathbf {b} _ {\text {s t a r t}}\right), \tag {3}
+$$
+
+$$
+p _ {i} ^ {e n d} = \sigma \left(\mathbf {W} _ {e n d} \mathbf {X} _ {i} + \mathbf {b} _ {e n d}\right), \tag {4}
+$$
+
+where $p_i^{start}$ and $p_i^{end}$ stand for the probabilities of recognizing the $i$ -th token in input sequence as the start and end position of an entity, respectively. $\sigma(\cdot)$ denotes a sigmoid activation function.
+
+The entity tagging model is trained by minimizing the following loss function:
+
+$$
+\mathcal {L} ^ {e} = - \frac {1}{n} \left(\log p _ {\theta} ^ {\text {s t a r t}} (s | \mathbf {X}) + \log p _ {\theta} ^ {\text {e n d}} (s | \mathbf {X})\right), \tag {5}
+$$
+
+where $p_{\theta}(s|\mathbf{X}) = \prod_{i=1}^{n} p_i^{\mathbb{I}\{y_i = 1\}}(1 - p_i)^{\mathbb{I}\{y_i = 0\}}$ , $p_{\theta}^{start}$ is the likelihood for the start positions, and $p_{\theta}^{end}$ is the likelihood for the end positions.
+
+We apply the entity tagging model to obtain all subjects and objects in one sentence. Detected subjects and objects are denoted as $\Omega_s$ and $\Omega_o$ , respectively. The extracted entity is presented into a tuple like (start, end).
+
+# 3.3 Relation Detector
+
+In general, more than one relation can be detected in a sentence. For example, there are four relations Star In, Direct Movie, Live In, and Capital Of in the sentence in Figure 2. To identify related relations in a sentence, we adopt a multi-label classification strategy. For the BERT-based/LSTM-based model, we project the "[CLS]" token/last output (LO) representation into a relation-detection space for multi-label classification, as follows:
+
+$$
+\mathbf {r} = \sigma \left(\mathbf {W} _ {r e l} \mathbf {X} _ {C L S / L O} + \mathbf {b} _ {r e l}\right), \tag {6}
+$$
+
+where $\sigma (\cdot)$ denotes sigmoid function.
+
+The relation detector minimizes the following binary cross-entropy loss function to detect relations:
+
+$$
+\mathcal {L} ^ {r} = - \frac {1}{n} \sum_ {i = 1} ^ {n} \left[ y _ {i} \log \left(r _ {i}\right) + \left(1 - y _ {i}\right) \log \left(1 - r _ {i}\right) \right], \tag {7}
+$$
+
+
+Figure 2: The generic framework of TDEER. In this example, TDEER first identifies Jackie Chan and Beijing as subjects and recognizes Beijing, China, and Police Story as objects. Then TDEER detects four involved relations: Star In, Direct Movie, Live In, and Capital Of. Finally, TDEER decodes triples by iterating all pairs of subjects and relations to recognize objects: (Jackie Chan, Star In) $\rightarrow$ Police Story, (Jackie Chan, Direct Movie) $\rightarrow$ Police Story (So far, the EPO problem can be resolved.), (Jackie Chan, Live In) $\rightarrow$ (Beijing, China), ..., (Beijing, Capital Of) $\rightarrow$ China (by now, the SEO problem can be resolved).
+
+where $y_{i}\in \{0,1\}$ indicates the ground truth label of relations. We denote the detected relations in a sentence as $\Omega_r$
+
+# 3.4 Translating Decoding Schema
+
+We iterate the pairs of detected subjects $\Omega_s$ and relations $\Omega_r$ to predict the start positions of objects. For each subject and relation pair, we first combine the representation of subject and relation. Next, we use the attention mechanism to obtain a selective representation, which is expected to assign higher weights to possible positions of objects. Finally, we pass the selective representation to a fully-connect layer to get the output, i.e. the positions of objects.
+
+More concretely, for the $i$ -th subject in $\Omega_s$ and $j$ -th relation in $\Omega_r$ , TDEER takes the averaged vector span representation between the start and end tokens of the subject as $\mathbf{v}_{sub}^i$ . TDEER maps the relation into a continuous space with the same feature dimension as $\mathbf{v}_{sub}^i$ to produce the relation embedding vector $\mathbf{e}_{rel}^j$ . Then TDEER applies a fully-connect layer to encode the relation:
+
+$$
+\mathbf {v} _ {r e l} ^ {j} = \mathrm {F u l l y C o n n e c t} (\mathbf {e} _ {r e l} ^ {j}). \qquad (8)
+$$
+
+TDEER links subject and relation via addition op
+
+eration, as follows:
+
+$$
+\mathbf {u} = \mathbf {v} _ {s u b} ^ {i} + \mathbf {v} _ {r e l} ^ {j}. \tag {9}
+$$
+
+We adopt the addition operation because it is intuitive, and it does not change the tensor shape of inputs, which is convenient for attention computation.
+
+Next, TDEER applies the attention mechanism to obtain the selective representation.
+
+$$
+\mathbf {A} = \mathrm {s o f t m a x} (\frac {\mathbf {Q K} ^ {T}}{\sqrt {d _ {k}}}) \mathbf {V}
+$$
+
+$$
+\mathbf {Q} = \mathbf {W} _ {\text {q u e r y}} (\mathbf {X} + \mathbf {u}) + \mathbf {b} _ {\text {q u e r y}} \tag {10}
+$$
+
+$$
+\mathbf {K} = \mathbf {W} _ {k e y} (\mathbf {X} + \mathbf {u}) + \mathbf {b} _ {k e y}
+$$
+
+$$
+\mathbf {V} = \mathbf {W} _ {\text {v a l u e}} (\mathbf {X} + \mathbf {u}) + \mathbf {b} _ {\text {v a l u e}},
+$$
+
+where $d_{k}$ is the dimension of the attention key. Furthermore, TDEER adopts a binary classifier to identify the start positions of objects given the current subject and relation.
+
+$$
+p _ {i} ^ {\text {o b j - s t a r t}} = \sigma \left(\mathbf {W} _ {\text {t r a n s}} \mathbf {A} _ {i} + \mathbf {b} _ {\text {t r a n s}}\right), \tag {11}
+$$
+
+where $p_i^{obj\_start}$ indicates the probability of identifying the $i$ -th token in input sequence as the start position of an object entity.
+
+In this stage, TDEER minimizes the following loss function to discern the start positions of object entities.
+
+$$
+\begin{array}{l} \mathcal {L} ^ {t} = - \frac {1}{n} \sum_ {i = 1} ^ {n} \left[ \mathbb {I} \left\{y _ {i} = 1 \right\} \log \left(p _ {i} ^ {\text {o b j} _ {-} \text {s t a r t}}\right) + \right. \tag {12} \\ \mathbb {I} \{y _ {i} = 0 \} \mathrm {l o g} (1 - p _ {i} ^ {o b j \_ s t a r t}) \Big ], \\ \end{array}
+$$
+
+where $\mathbb{I}$ is the indicator function. After obtaining the start positions of objects, TDEER takes the corresponding entities from the $\Omega_o$ which has the same start position as the final objects. If no start positions match, there is no triple for the current subject and relation.
+
+# 3.5 Negative Sample Strategy
+
+Most entities and relations extraction models consisting of multiple components suffer from error accumulation. Errors from upstream components will propagate to downstream components because of the dependency between components. In TDEER, the translating decoder is dependent on the entity tagger and relation detector, hence the translating detector may receive error entities or relations from upstream components. Therefore, we introduce a negative sample strategy to detect and alleviate errors from upstream components. For each sentence, we produce incorrect triples as negative samples by replacing the correct subject/relation with other inappropriate subjects/relations during the training phase. We do not assign any objects to negative samples, namely the probabilities of start positions of Eq.(11) are all expected to be 0. This strategy enables TDEER to handle noisy inputs of subjects and relations at the decoding phase.
+
+# 3.6 Joint Training
+
+We jointly train the span-based entity tagging model, the relation detector, and the translating decoder. The joint loss function is defined as follows:
+
+$$
+\mathcal {L} = \alpha \mathcal {L} ^ {e} + \beta \mathcal {L} ^ {r} + \lambda \mathcal {L} ^ {t}, \tag {13}
+$$
+
+where $\alpha, \beta$ and $\lambda$ are constants. In our experiment, we set 1.0, 1.0, and 5.0, respectively. The values are obtained by grid search on the validation set.
+
+# 4 Experiment
+
+# 4.1 Datasets and Evaluation Metrics
+
+We conduct experiments on widely used datasets. NYT (Riedel et al., 2010) dataset was produced by
+
+distant supervision method from New York Times news articles. WebNLG was created for Natural Language Generation and adapted by Zeng et al. (2018) for relational triple extraction. For a fair comparison, we apply the two datasets released by Zeng et al. (2018). Apart from evaluating the model on standard splitting, we follow (Wei et al., 2020) to partition the test sentences according to different overlapping categories, different triple numbers for experiments on overlapping triples, and various triple numbers. Furthermore, we also conduct experiments on NYT11-HRL (Takanobu et al., 2019), in which most test sentences belong to Normal, to demonstrate that the proposed model can handle not only the overlapping triple problem but also the general problem. The adopted public datasets with summary statistics in Table 1.
+
+We report the standard micro Precision, Recall, and F1-score following the same setting in Fu et al. (2019).
+
+# 4.2 Baselines
+
+We compare the proposed model with following SOTA models: NovelTagging (Zheng et al., 2017) incorporates both entity and relation roles and models relational triple extraction problem as a sequence labeling problem; CopyR (Zeng et al., 2018) applies a sequence-to-sentence architecture; GraphRel (Fu et al., 2019) uses graph convolutional networks to jointly learn named entities and relations; OrderCopyR (Zeng et al., 2019) applies the reinforcement learning into an sequence-to-sequence model to generate triplets; CasRel (Wei et al., 2020) employs a cascade binary tagging framework; TPLinker (Wang et al., 2020) iterates all token pairs and use matrices to tag token links to recognize relations between token pair.
+
+# 4.3 Implementation Details
+
+We adopt the Adam (Kingma and Ba, 2015) optimizer. The hyper-parameters are tuned by grid search on the validation set. The learning rate is set to $1\mathrm{e} - 3 / 5\mathrm{e} - 5$ and the batch size is set to $32 / 8$ in the backbone as LSTM/BERT. For the LSTM-based model, we apply the 300-dimension pre-trained GloVe embedding (Pennington et al., 2014) $^{1}$ . For the BERT-based model, we use the pre-trained Cased BERT-base $^{2}$ as the backbone.
+
+| Category | Train | Valid | Test | Overlapping Pattern | Number of triples | Rel. |
| Norm. | SEO | EPO | = 1 | = 2 | = 3 | = 4 | ≥ 5 |
| NYT | 56195 | 5000 | 5000 | 3266 | 1297 | 978 | 3244 | 1045 | 312 | 291 | 108 | 24 |
| WebNLG | 5019 | 500 | 703 | 246 | 457 | 26 | 266 | 171 | 131 | 90 | 45 | 216* |
| NYT11. | 62648 | - | 369 | 368 | 1 | 0 | 368 | 1 | 0 | 0 | 0 | 12 |
+
+Table 1: Statistics of datasets. NYT11. denotes NYT11-HRL, Norm. stands Normal triples, and Rel. stands Relations. Note that the relation number of WebNLG was miswritten as 246 in (Zeng et al., 2018; Wei et al., 2020). We correct the number in the statistics and use $\star$ to mark the accurate number.
+
+# 4.4 Results & Discussion
+
+# 4.4.1 Main Results
+
+The main results of the proposed models and baseline models are reported in Table 2. CasRel, TPLinker, and TDEER achieve absolute improvements on NYT and WebNLG datasets against the rest baselines. Especially, TDEER produces competitive results compared with the previous SOTA model TPLinker and achieves 7 out of 9 best results. Moreover, TDEER outperforms baseline models over the F1 score on all datasets. From Table 1, we can observe that the data size of WebNLG is small while it consists of a large number of predefined relations. It is difficult to make improvements on WebNLG, as existing models can achieve an F1 score over $90\%$ , which has already exceeded human-level performance (Wang et al., 2020). Even though, TDEER achieves around $1.2\%$ gain to $93.1\%$ on WebNLG against TPLinker, which verifies the effectiveness of the proposed framework. Apart from F1, we find that TDEER performs better on precision score than baselines models in most results.
+
+Although without a pre-trained language model as the backbone, TDEER $_{\text{LSTM}}$ still performs well. TDEER $_{\text{LSTM}}$ achieves a higher F1 score on NYT against baseline models except for BERT-Based CasRel and TPLinker. Furthermore, TDEER $_{\text{LSTM}}$ outperforms baseline models on WebNLG and NYT11-HRL over precision against all baseline models except for BERT-Based CasRel. Therefore, the proposed framework is efficacious even though without a powerful pre-trained language model.
+
+NYT and WebNLG contain a large number of overlapping-triple instances. Therefore, the results on NYT and WebNLG indicate that TDEER can address the overlapping triple problem. Almost all triples in NYT11-HRL belong to Normal. TDEER achieves better results than baselines on NYT11-HRL, which shows that TDEER can solve the gen
+
+eral extraction problem.
+
+# 4.4.2 Results of Ablation Study
+
+We conduct ablation studies on different strategies to explore the effect of the negative sample strategy. It shows that negative samples from subjects achieve better results than negative samples from relations. TDEER performs better by combining the two types of negative sample strategy than adopting each strategy individually or without negative samples. This evidence illustrates that negative samples are helpful to alleviate error accumulation. We also conduct ablation studies on TDEER without the relation detector or attention. It also shows that the results of TDEER are better than TDEER without the relation detector or attention. We notice that the model will malfunction without the relation detector. This evidence suggests that the relation detector and attention are crucial for TDEER.
+
+To investigate the effect of the attention mechanism, we pick up a sample from the NYT test set which contains a triple (Netherlands, /location/country/administrative_division, Utrecht). We visualize the attention heatmap of different subject and relation pairs as depicted in Figure 3. The heatmap indicates that when the extracted subject and relation pair are proper, the attention weights on object positions are higher than others. If the weights are close to each other, then the extracted subject and relation pair can not be decoded to form a valid triple.
+
+# 4.4.3 Discussion on Triple Numbers
+
+In general, the more triples in a sentence, the more complicated the sentence is. To explore the model performance regarding different sentence complexities, we also conduct experiments on sentences with different triple numbers. The results are reported in Table 4. From the results, we can find that TDEER outperforms baseline models except for four triple numbers in NYT. Notably, TDEER
+
+| Model | NYT | WebNLG | NYT11-HRL |
| Prec. | Rec. | F1 | Prec. | Rec. | F1 | Prec. | Rec. | F1 |
| NovelTagging | 62.4 | 31.7 | 42.0 | 52.5 | 19.3 | 28.3 | 46.9 | 48.9 | 47.9 |
| CopyR | 61.0 | 56.6 | 58.7 | 37.7 | 36.4 | 37.1 | 34.7 | 53.4 | 42.1 |
| OrderCopyR | 77.9 | 67.2 | 72.1 | 63.3 | 59.9 | 61.6 | - | - | - |
| GraphRel | 63.9 | 60.0 | 61.9 | 44.7 | 41.1 | 42.9 | - | - | - |
| CasRelLSTM | 84.2 | 83.0 | 83.6 | 86.9 | 80.6 | 83.7 | - | - | - |
| CasRelBERT | 89.7 | 89.5 | 89.6 | 93.4 | 90.1 | 91.8 | 50.1 | 58.4 | 53.9 |
| TPLinkerLSTM | 83.8 | 83.4 | 83.6 | 90.8 | 90.3 | 90.5 | - | - | - |
| TPLinkerBERT | 91.3 | 92.5 | 91.9 | 91.8 | 92.0 | 91.9 | - | - | - |
| TDEERLSTM | 85.5 | 82.4 | 83.9 | 92.1 | 86.9 | 89.4 | 57.7 | 43.3 | 49.5 |
| TDEERBERT | 93.0 | 92.1 | 92.5 | 93.8 | 92.4 | 93.1 | 63.5 | 55.7 | 59.3 |
+
+Table 2: Results of baseline models on NYT, and WebNLG datasets. The results of baselines are retrieved from original papers respectively.
+
+| Model | F1 |
| NYT | WebNLG |
| w/o neg. | 69.5 | 67.7 |
| w/o neg sub. | 81.1 | 86.1 |
| w/o neg rel. | 82.3 | 86.8 |
| w/o rel. | 13.5 | 2.7 |
| w/o attn. | 82.7 | 87.3 |
| TDEER LSTM | 83.9 | 89.4 |
+
+Table 3: Results of ablation study. w/o neg. stands for TDEER $_{\text{LSTM}}$ without negative samples. w/o neg sub. stands for TDEER $_{\text{LSTM}}$ without negative samples from subjects. w/o neg rel. denotes TDEER $_{\text{LSTM}}$ without negative samples from relations. w/o rel. denotes TDEER $_{\text{LSTM}}$ without relation detector. w/o attn. means TDEER $_{\text{LSTM}}$ without attention.
+
+achieves $2.8\%$ gain in NYT and $0.7\%$ gain in WebNLG against TPLinker for complicated sentences containing five or more triples. This evidence illuminates that TDEER is effective to model sentences with multiple triples.
+
+# 4.4.4 Discussion on Overlapping Patterns
+
+To further investigate the performance of different overlapping patterns, we conducted extensive experiments and report the results on different overlapping patterns on NYT and WebNLG in Table 5. The results suggest that TDEER outperforms baseline models, which demonstrates the advantages of TDEER in processing the overlapping triple problem.
+
+
+
+
+(a) (Netherlands, /location/country/administrative_divisions)
+
+
+(b) (Netherlands, /people/person/ethnicity)
+(c) (father, /location/country/administrative_divisions)
+Figure 3: Attention heatmap of different pairs of subject and relation. The attention weight is higher when the color is deeper.
+
+# 4.4.5 Discussion on Computation Complexity
+
+Computation efficiency is an important problem that is not paid enough attention to by most previous works. We compare TDEER with baselines in computational complexity and inference time on the test set. The results are shown in Table 6.
+
+Pipeline approaches usually use NER tools to detect entities. NER tools usually apply the Viterbi algorithm to decode sequences with $O(nK^2)$ complexity, where $n$ denotes the input length and $K$ is the tag size. Pipeline approaches recognize relations from each entity pair. Thus, the computation complexity of pipeline approaches is $O(nK^2 + e^2)$ , where $e$ denotes the number of entities in the input.
+
+Despite the successes of CasRel (Wei et al., 2020) and TPLinker (Wang et al., 2020), they still struggle with computation efficiency. CasRel jointly decodes relations and objects. The com
+
+| Model | NYT | WebNLG |
| N=1 | N=2 | N=3 | N=4 | N≥5 | N=1 | N=2 | N=3 | N=4 | N≥5 |
| \( CopyR^{\dagger} \) | 67.1 | 58.6 | 52.0 | 53.6 | 30.0 | 59.2 | 42.5 | 31.7 | 24.2 | 30.0 |
| \( GraphRel^{\dagger} \) | 71.0 | 61.5 | 57.4 | 55.1 | 41.1 | 66.0 | 48.3 | 37.0 | 32.1 | 32.1 |
| \( OrderCopyR^{\dagger} \) | 71.7 | 72.6 | 72.5 | 77.9 | 45.9 | 63.4 | 62.2 | 64.4 | 57.2 | 55.7 |
| \( CasRelBERT \) | 88.2 | 90.3 | 91.9 | 94.2 | 83.7 | 89.3 | 90.8 | 94.2 | 92.4 | 90.9 |
| \( TPLinkerBERT \) | 90.0 | 92.8 | 93.1 | 96.1 | 90.0 | 88.0 | 90.1 | 94.6 | 93.3 | 91.6 |
| \( TDEERBERT \) | 90.8 | 92.8 | 94.1 | 95.9 | 92.8 | 90.5 | 93.2 | 94.6 | 93.8 | 92.3 |
+
+Table 4: F1-score on sentences with different triple numbers. † stands results retrieve from (Wei et al., 2020). The results of the rest of the baselines are obtained from the respective original paper.
+
+| Model | NYT | WebNLG |
| Normal | SEO | EPO | Normal | SEO | EPO |
| CopyR | 66.0 | 48.6 | 55.0 | 59.2 | 33.0 | 36.6 |
| OrderCopyR | 71.2 | 69.4 | 72.8 | 65.4 | 60.1 | 67.4 |
| GraphRel | 69.6 | 51.2 | 58.2 | 65.8 | 38.3 | 40.6 |
| CasRelBERT | 87.3 | 91.4 | 92.0 | 89.4 | 92.2 | 94.7 |
| TPLinkerBERT | 90.1 | 93.4 | 94.0 | 87.9 | 92.5 | 95.3 |
| TDEERBERT | 90.8 | 94.1 | 94.5 | 90.7 | 93.5 | 95.4 |
+
+Table 5: Results of models in Normal, EntityPairOverlap and SingleEntityOverlap patterns in NYT and WebNLG datasets. Results of baselines are obtained from respective original paper.
+
+| Model | Complexity | Time (ms) |
| NYT | WebNLG |
| Pipeline | O(nK2 + e2) | - | - |
| CasRel | O(n + sro) | 54.0* | 76.8* |
| TPLinker | O(n2) | 82.7* | 112.6* |
| TDEER | O(n + sr) | 31.4 | 36.9 |
+
+Table 6: Computation efficiency. $\star$ denotes results retrieve from (Wang et al., 2020). $e$ denotes the number of entities in input, $s/o$ stands for the number of subjects/objects in input, $r$ denotes the number of relations in input, $K$ denotes the tag size, and $n$ stands input length. Inference time presents the average time BERT-based models take to process a sample.
+
+putational complexity of CasRel is $O(n + sro)$ , where $n$ is the input length, $s / r / o$ is the number of subjects/relations/objects in the input, respectively. TPLinker iterates all token pairs and uses matrices to tag token links to recognize relations. The main computation overhead is on the encoder with $O(n^2)$ complexity, where $n$ is the input length.
+
+The computation complexity of TDEER is $O(n +$
+
+$sr$ ), where $n$ is the input length, $s$ denotes the number of subjects in input, and $r$ is the number of relations in the input sentence. It is 0.7 times faster than CasRel and 1.6 times faster than TPLinker on NYT, and 1.1 times faster than CasRel and 2.1 times faster than TPLinker on WebNLG from Table 6. Therefore, we can conclude that TDEER is more efficient than baselines, which makes TDEER competent in constructing a large-scale KB.
+
+# 5 Conclusion & Future work
+
+In this paper, we have proposed a novel translating decoding schema for joint extraction of entities and relations, namely TDEER. It models the relation as a translating operation from subjects to objects, which can handle the overlapping triple problem naturally. We have conducted extensive experiments on widely used datasets to demonstrate the effectiveness and efficiency of the proposed model. The proposed negative sample strategy is used to alleviate the error accumulation problem. Though it is effective, it may increase training time. For future work, we plan to explore more efficient approaches to alleviate error accumulation.
+
+# References
+
+Antoine Bordes, Nicolas Usunier, Alberto García-Durán, Jason Weston, and Oksana Yakhnenko. 2013. Translating embeddings for modeling multi-relational data. In Proceedings of the 27th Annual Conference on Neural Information Processing Systems, pages 2787-2795.
+Yee Seng Chan and Dan Roth. 2011. Exploiting syntactic-semantic structures for relation extraction. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies., pages 551-560.
+Dai Dai, Xinyan Xiao, Yajuan Lyu, Shan Dou, Qiao-qiao She, and Haifeng Wang. 2019. Joint extraction of entities and overlapping relations using position-attentive sequence labeling. In Proceedings of the Thirty-Third AAAI Conference on Artificial Intelligence, pages 6300–6308.
+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, pages 4171-4186.
+Anthony Fader, Luke Zettlemoyer, and Oren Etzioni. 2014. Open question answering over curated and extracted knowledge bases. In Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1156-1165.
+Tsu-Jui Fu, Peng-Hsuan Li, and Wei-Yun Ma. 2019. GraphRel: Modeling text as relational graphs for joint entity and relation extraction. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1409-1418.
+Pankaj Gupta, Hinrich Schütze, and Bernt Andrassy. 2016. Table filling multi-task recurrent neural network for joint entity and relation extraction. In Proceedings of the 26th International Conference on Computational Linguistics, pages 2537-2547.
+Raphael Hoffmann, Congle Zhang, Xiao Ling, Luke Zettlemoyer, and Daniel S. Weld. 2011. Knowledge-based weak supervision for information extraction of overlapping relations. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 541-550.
+Chung-Chi Huang and Zhiyong Lu. 2016. Community challenges in biomedical text mining over 10 years: success, failure and the future. Briefings Bioinform., 17(1):132-144.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations.
+
+Qi Li and Heng Ji. 2014. Incremental joint extraction of entity mentions and relations. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics, pages 402-412.
+Mike Mintz, Steven Bills, Rion Snow, and Daniel Jurafsky. 2009. Distant supervision for relation extraction without labeled data. In Proceedings of the 47th Annual Meeting of the Association for Computational Linguistics, pages 1003-1011.
+Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, pages 1532-1543.
+Pengda Qin, Weiran Xu, and William Yang Wang. 2018. Robust distant supervision relation extraction via deep reinforcement learning. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, pages 2137-2147.
+Xiang Ren, Zeqiu Wu, Wenqi He, Meng Qu, Clare R. Voss, Heng Ji, Tarek F. Abdelzaher, and Jiawei Han. 2017. Cotype: Joint extraction of typed entities and relations with knowledge bases. In Proceedings of the 26th International Conference on World Wide Web, pages 1015-1024.
+Sebastian Riedel, Limin Yao, and Andrew McCallum. 2010. Modeling relations and their mentions without labeled text. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 148-163.
+Bryan Rink and Sanda M. Harabagiu. 2010. UTD: classifying semantic relations by combining lexical and semantic resources. In Proceedings of the 5th International Workshop on Semantic Evaluation, SemEval@ACL 2010, pages 256-259.
+Sean R. Szumlanski and Fernando Gomez. 2010. Automatically acquiring a semantic network of related concepts. In Proceedings of the 19th ACM Conference on Information and Knowledge Management, pages 19-28.
+Ryuichi Takanobu, Tianyang Zhang, Jiexi Liu, and Minlie Huang. 2019. A hierarchical framework for relation extraction with reinforcement learning. In Proceedings of the Thirty-Third AAAI Conference on Artificial Intelligence, pages 7072-7079.
+Bayu Distiawan Trisedya, Gerhard Weikum, Jianzhong Qi, and Rui Zhang. 2019. Neural relation extraction for knowledge base enrichment. In Proceedings of the 57th Conference of the Association for Computational Linguistics, pages 229-240.
+Cunchao Tu, Zhengyan Zhang, Zhiyuan Liu, and Maosong Sun. 2017. Transnet: Translation-based network representation learning for social relation extraction. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, pages 2864-2870.
+
+Yucheng Wang, Bowen Yu, Yueyang Zhang, Tingwen Liu, Hongsong Zhu, and Limin Sun. 2020. Tplinker: Single-stage joint extraction of entities and relations through token pair linking. In Proceedings of the 28th International Conference on Computational Linguistics, pages 1572-1582.
+Zhen Wang, Jianwen Zhang, Jianlin Feng, and Zheng Chen. 2014. Knowledge graph embedding by translating on hyperplanes. In Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence, pages 1112-1119.
+Zhepei Wei, Jianlin Su, Yue Wang, Yuan Tian, and Yi Chang. 2020. A novel cascade binary tagging framework for relational triple extraction. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1476-1488.
+Jason Weston, Antoine Bordes, Oksana Yakhnenko, and Nicolas Usunier. 2013. Connecting language and knowledge bases with embedding models for relation extraction. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1366-1371.
+Bowen Yu, Zhenyu Zhang, Xiaobo Shu, Tingwen Liu, Yubin Wang, Bin Wang, and Sujian Li. 2020. Joint extraction of entities and relations based on a novel decomposition strategy. In Proceedings of the 24th European Conference on Artificial Intelligence, pages 2282-2289.
+Dmitry Zelenko, Chinatsu Aone, and Anthony Richardella. 2003. Kernel methods for relation extraction. Journal of machine learning research, 3:1083-1106.
+Daojian Zeng, Kang Liu, Yubo Chen, and Jun Zhao. 2015. Distant supervision for relation extraction via piecewise convolutional neural networks. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 1753-1762.
+Xiangrong Zeng, Shizhu He, Daojian Zeng, Kang Liu, Shengping Liu, and Jun Zhao. 2019. Learning the extraction order of multiple relational facts in a sentence with reinforcement learning. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing, pages 367-377.
+Xiangrong Zeng, Daojian Zeng, Shizhu He, Kang Liu, and Jun Zhao. 2018. Extracting relational facts by an end-to-end neural model with copy mechanism. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, pages 506-514.
+Suncong Zheng, Feng Wang, Hongyun Bao, Yuexing Hao, Peng Zhou, and Bo Xu. 2017. Joint extraction of entities and relations based on a novel tagging scheme. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, pages 1227-1236.
+
+Zexuan Zhong and Danqi Chen. 2021. A frustratingly easy approach for entity and relation extraction. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics.
\ No newline at end of file
diff --git a/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/images.zip b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..a053a685d1ce9b8df28cb5f8123efda890f75f57
--- /dev/null
+++ b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:33b9e8e9086a30a7bf2559f6e8985420a20c85fd9820ddebe1775f494f18d0e0
+size 483360
diff --git a/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/layout.json b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..039c10a73ea3dd11f12b857fbf8ba297b5f30231
--- /dev/null
+++ b/tdeeranefficienttranslatingdecodingschemaforjointextractionofentitiesandrelations/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3b51bd277303057cf921f3b7deb4c0e85de006129004050e1b0fbded1d3824ca
+size 335194
diff --git a/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/f7ff7a38-60c4-4301-b246-fb0b4afce477_content_list.json b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/f7ff7a38-60c4-4301-b246-fb0b4afce477_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..6627b21671de45b23a62d869dfd3a4426d4e1812
--- /dev/null
+++ b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/f7ff7a38-60c4-4301-b246-fb0b4afce477_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9869c1ed73245050635497280eb7e9e5edc42b0276e3fe411f0eb5711156ace1
+size 65641
diff --git a/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/f7ff7a38-60c4-4301-b246-fb0b4afce477_model.json b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/f7ff7a38-60c4-4301-b246-fb0b4afce477_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..25cbcd683fe8a3f01688baf05b0a05f715efed09
--- /dev/null
+++ b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/f7ff7a38-60c4-4301-b246-fb0b4afce477_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2328c308616a1b0b8d0080647ca587f1be2cae5200480a74703ba874a8c612e9
+size 83025
diff --git a/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/f7ff7a38-60c4-4301-b246-fb0b4afce477_origin.pdf b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/f7ff7a38-60c4-4301-b246-fb0b4afce477_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..03b94bac9b1fefe3728d991724ed12fe26a616ee
--- /dev/null
+++ b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/f7ff7a38-60c4-4301-b246-fb0b4afce477_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:573d89b8fd02ae5fe45d719c88664a5fdf1ac9f3547c109319d6331bd92ce73c
+size 1445317
diff --git a/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/full.md b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..d6ab7f28b55c2d261920c7018c8d5c3469718b03
--- /dev/null
+++ b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/full.md
@@ -0,0 +1,273 @@
+# TEBNER: Domain Specific Named Entity Recognition with Type Expanded Boundary-aware Network
+
+Zheng Fang $^{1,2}$ , Yanan Cao $^{1,2*}$ , Tai Li $^{3}$ , Ruipeng Jia $^{1,2}$ , Fang Fang $^{1,2}$ , Yanmin Shang $^{1,2}$ and Yuhai Lu $^{1,2*}$
+
+$^{1}$ Institute of Information Engineering, Chinese Academy of Sciences
+
+$^{2}$ School of Cyber Security, University of Chinese Academy of Sciences
+
+3Bytedance
+
+1.2{fangzheng, caoyanan, jiaruiipeng, fangfang0703, shangyanmin
+
+luyuhai $@$ iie.ac.cn, $^3$ litai.vincent@bytedance.com
+
+# Abstract
+
+To alleviate label scarcity in Named Entity Recognition (NER) task, distantly supervised NER methods are widely applied to automatically label data and identify entities. Although the human effort is reduced, the generated incomplete and noisy annotations pose new challenges for learning effective neural models. In this paper, we propose a novel dictionary extension method which extracts new entities through the type expanded model. Moreover, we design a multi-granularity boundary-aware network which detects entity boundaries from both local and global perspectives. We conduct experiments on different types of datasets, the results show that our model outperforms previous state-of-the-art distantly supervised systems and even surpasses the supervised models.
+
+# 1 Introduction
+
+Named Entity Recognition (NER) is the task of detecting mentions from text and classifying them into predefined types. It is a fundamental task in the field of natural language processing (NLP), which can facilitate many other tasks, such as entity linking (Fang et al., 2020), machine translation (Gekhman et al., 2020), and question answering (Li et al., 2020a). However, most of existing NER methods require large amounts of manually annotated texts for training supervised models, which is difficult to implement in the specific domain because domain-expert annotation is expensive and time-consuming.
+
+To alleviate the label scarcity problem, distant supervision methods (Fries et al., 2017; Shang et al., 2018b; Liang et al., 2020) have been applied to automatically generate labeled data and recognize entities. Given a raw corpus and a dictionary, above methods firstly label entities by exact string matching, and then use the annotated dataset to train the
+
+well-designed neural models to recognize entities. Although the human effort is reduced, the labels generated by the string matching method pose two challenges.
+
+The first challenge is incomplete annotations. Because most of existing dictionaries have limited coverage on domain entities, just using the given dictionary will make many out-of-dictionary entities unmatched and generate a large number of false-negative labels. By analyzing several commonly used datasets (e.g., BC5CDR, NCBI, MeSH), we find that the original dictionary only covers about $50\%$ of domain entities, which may weaken the performance of subsequent NER model. To increase the number of label entities, previous works (Fries et al., 2017; Liu et al., 2020) attempt to expand the dictionary by heuristic rules. However, these rule-based methods are difficult to migrate to other domains. So, how to extend the dictionary with more general pattern is the first problem we need to solve.
+
+The second challenge is the difficulty of recalling new entities. Actually, even for the supervised models, new entities that have not been annotated are also difficult to be recalled (Shang et al., 2018b) because of the limited model capability. Most of previous NER methods, such as sequential label models (Chiu and Nichols, 2016; Ma and Hovy, 2016), and boundary detection models (Wang et al., 2018; Li et al., 2020b), only utilize the context information to recognize entities. However, the tight internal connection among entities and the global statistical features in domain corpus, which could contribute to identifying entities, are usually ignored by previous methods. Therefore, how to recall new entities with multi-granularity information is the second problem we need to solve.
+
+To address two issues mentioned above, we propose a new distantly supervised method named TEBNER (Type Expanded Boundary-aware NER) in specific domains. To expand the original dictio
+
+nary, we try to extract high-quality phrases from the raw corpus and view them as potential entities. Considering that these mined phrases lack corresponding type information and even contain noisy results, we use an entity typing model to classify and filter them based on their context information. Then these typed phrases are added to the original dictionary to resolve the incomplete annotation problem. For the purpose of recalling more new entities, we design multi-granularity boundary labeling strategies, which can capture boundary information from different perspectives. Specifically, we utilize the token interaction tagger to find the internal connection between entity tokens, the sequence labeling strategy to distinguish explicit entity boundaries in sentence and global statistical features of the whole corpus to recall potential entities. After getting the boundary results, we reuse the trained entity typing model to further classify entities and filter the noise results. In this way, we will get the trade-off between recall and precision for new entity detection.
+
+In summary, the main contributions of this paper are listed as follows:
+
+- We propose a novel dictionary extension method, which rely on semantic context, neither on ambiguous strings nor on artificial rules. Experiments show that our dictionary extension method significantly improves the quality of distantly supervised annotations.
+- We propose a multi-granularity boundary-aware network which integrates the information at word, sentence and corpus level. Experiments show that fusing different granularity boundary results can significantly improve the recall rate of NER model.
+- We conduct extensive experiments on three benchmark datasets and our TEBNER model achieves the best performance with dictionaries only and no human efforts. On several datasets, our approach is even better than the supervised models.
+
+# 2 Related Work
+
+As a fundamental task, named entity recognition (NER) has drawn much attention of researchers. Most previous approaches model the NER problem as a sequence labeling task and use popular architectures like NN-CRF (Ma and Hovy, 2016;
+
+Chiu and Nichols, 2016). Recently, to recognize nested entities, many studies also propose to detect each entity boundaries individually (Wang et al., 2018; Zheng et al., 2019; Li et al., 2020b). With the burgeoning popularity of pre-training methods, large-scale language models such as ELMo (Peters et al., 2018) and BERT (Devlin et al., 2019) are also utilized in NER task, yielding state-of-the-art performances. However, all of above supervised models require a great quantity of manually annotated data, which are usually labor-intensive and time-consuming.
+
+To alleviate human efforts, distant supervision methods are widely used in NER task (Shang et al., 2018b; Cao et al., 2019; Liu et al., 2020; Xue et al., 2020; Liang et al., 2020; Lison et al., 2020). For example, Shang et al. (Shang et al., 2018b) marks out-of-dictionary phrases as potential entities with a special "unknown" type and propose a neural model AutoNER with a token interaction tagger. However, these untyped phrases are less helpful to identify new entities. HAMNER (Liu et al., 2020) expands the dictionary with headwords and design a span-level model, which predicts entity boundaries by an entity classification model. But for sentences with complex structures, it is difficult to detect boundaries by just using entity type information. Unlike these works, TEBNER annotates phrases with semantic context and distinguishes entity boundaries by fusing multi-granularity information, which can generate labels with high precision and recall rate.
+
+# 3 Problem Definition
+
+Formally, given a sequence of words $X = [x_{1}, x_{2}, \ldots, x_{n}]$ , we denote an entity as $e_{t} = [x_{i}, \ldots, x_{j}] (0 \leq i \leq j \leq n)$ , where $< i, j >$ represents its boundary and $t$ indicates the entity type. Specifically, entity types include pre-defined types (e.g., Disease, Chemical) and none type which denotes non-entity. In distant supervision NER task, we only need a dictionary $D$ as input in addition to the original text. Each dictionary entry contains the surface name and the entity type. In the training phase, we use dictionary matching method to generate annotations on the training corpus.
+
+# 4 The Proposed Method
+
+The overall structure of our TEBNER model is shown in Figure 1. The proposed framework mainly includes two parts: Dictionary Extender
+
+
+Figure 1: The process of our distant supervision method. Blue arrows show the dictionary expansion procedures, including high-quality phrase extraction, entity classification, and entity filtering. Red arrows show the entity recognition procedures, including annotation generation, entity boundary detection and entity type prediction.
+
+which enriches entities by assigning types to extracted high-quality phrases, Entity Recognizer which identifies entity boundaries by fusing multigranularity information and predicts entity types through the trained classifier. In the following, we will introduce the technical details of these modules.
+
+# 4.1 Dictionary Extender
+
+As the training annotations in the distantly supervised NER task are only generated from the entity dictionary, the coverage and quality of the dictionary become the key factors to improve the model performance, especially for the neural network. Therefore, we use a dictionary extender module to generate high-quality labels with high coverage to the target corpus. Our dictionary extender mainly consists of three parts: high-quality phrase extraction, entity classification and entity filtering.
+
+High-quality phrase extraction As in previous work(Shang et al., 2018b; Liu et al., 2020), we utilize the AutoPhrase (Shang et al., 2018a) to extract high-quality phrase from domain corpus. AutoPhrase is a distantly supervised phrase mining tool, which generates frequent phrase candidates according to popularity requirement and estimates phrase quality based on features about concordance and informativeness. The main input to the tool is a corpus and a dictionary, and the output is a ranked list of phrases with decreasing quality score. To obtain the high-quality phrases, we only select phrases with score higher than a certain threshold (e.g., 0.5 for multi-word phrase and 0.9 for single-word phrase). After getting the out-of-dictionary
+
+phrases, we treat them as potential entities and propose an entity classification model to predict phrase types.
+
+Entity classification The entity classification model is used to classify and filter the mined phrases and candidate entities. It is trained on annotated corpus generated by the original dictionary matching. Considering that some mined phrases are not real entities, we further add non entities to the training corpus to help the classification model recognize noisy entities. Specifically, we label the phrases in the corpus with lower scores (e.g., less than 0.3) as none entity type. We use pre-trained language model BERT as the backbone, which has been proven to be able to capture rich language information from text. Given an entity $e_t = [x_i, \dots, x_j]$ and its context, we construct the input of each entity as:
+
+$$
+[ C L S ] c t x t _ {l} [ x _ {i} ] \dots [ x _ {j} ] c t x t _ {r} [ S E P ]
+$$
+
+where $[x_i], [x_j]$ denote the token at the beginning and the end of the entity respectively. $[x_i] \ldots [x_j]$ are the word-piece tokens of the entity. $ctxt_{l}$ and $ctxt_{r}$ denote the context before and after the entity respectively. After getting the BERT output of each token in the sentence, we concatenates the representations of $[CLS], [x_i], [x_j]$ and input them into a fully-connected layer. Then the representation of the entity will be sent into a softmax layer to predict the type label:
+
+$$
+V _ {h} = V _ {[ c l s ]} \oplus V _ {[ x _ {i} ]} \oplus V _ {[ x _ {j} ]} \tag {1}
+$$
+
+$$
+V _ {e} = \operatorname {R e l u} \left(W _ {t} ^ {1} V _ {h} + b _ {t} ^ {1}\right) \tag {2}
+$$
+
+$$
+P (y _ {t} | e _ {t}) = \operatorname {s o f t m a x} \left(W _ {t} ^ {2} V _ {e} + b _ {t} ^ {2}\right) \tag {3}
+$$
+
+where $W_{t}^{1}, W_{t}^{2}$ and $b_{t}^{1}, b_{t}^{2}$ are trainable parameters, $P(y_{t}|e_{t})$ denotes the probability of entity $e_{t}$ being predicted to the type $t$ . Generally, we compute the loss of type label prediction as follows:
+
+$$
+L _ {t y p e} = - \sum_ {i = 1} ^ {n} y _ {i} \log \left(P \left(y _ {i} \mid e _ {i}\right)\right) \tag {4}
+$$
+
+After training the entity typing model, we back-track and reconstruct the annotation data by out-of-dictionary phrases, and assign each phrase with the highest probability type.
+
+
+Figure 2: The two-stage pipeline framework. In Stage I, "Break or Tie" schema, "BIO" schema and "Phrase Matching" schema are utilized to identify entity boundaries at the word, sentence and corpus level separately, where the entity marked in red represents the result correctly predicted by the model. On the contrary, the entity marked in blue indicates that it is not recognized correctly. In Stage II, the entity classification model trained in the dictionary expansion procedure is used to predict entity types.
+
+Entity filtering We first filter the phrases that are predicted as none type by the entity classification model. Moreover, there are some phrases predicted as several different types. We skip the phrases that are identified as multiple categories during the entity recognizer module training. As for phrases with consistent results, we add them to original dictionary to improve the entity coverage. Finally, the extended dictionary will be used to generate more annotations for the training of entity recognizer.
+
+# 4.2 Entity Recognizer
+
+Previous works (Ma and Hovy, 2016; Shang et al., 2018b; Cao et al., 2019; Wang et al., 2020) always jointly model the entity boundary detection and classification tasks. In general, it is effective for the supervised model using manual annotation data. However, there are many labeling errors in the data annotated by distantly supervised method. The joint learning method can easily lead to overfitting of the NER model, which makes it difficult to identify unlabeled entities. With this in mind, we utilize a pipeline framework which learns entity boundary and entity type separately. The overall structure of our framework is shown in Figure 2.
+
+Our entity recognizer contains two components: boundary detector and entity classifier. As the final results in NER are only generated from the boundary detector, we will recall candidate entities as comprehensively as possible to ensure that
+
+the target entity can be input into the entity classifier. To achieve this goal, three kinds of tagging schemas are utilized to identify entity boundaries at the word, sentence and corpus level. In the following, we will describe each tagging schema in detail.
+
+"Break or Tie" Tagging Schema To capture boundary information at word granularity, we construct a token interaction tagger to distinguish whether two adjacent tokens are tied in the same entity mention or not. The key motivation is that domain entities usually contain the specific words, modeling the connection between adjacent tokens can help to find new entities with the same domain words. For example, in the field of biology, many disease entities may contain kidney, lung and other organ nouns; in the field of finance, many institutional entities may contain insurance, bank, etc. Inspired by this intuition, we utilize a "Break or Tie" tagging schema to recognize domain entities. As shown in Figure 2, (i) $\mathbf{T}$ (Tie) indicates that both of the two adjacent tokens belong to the same entity. (ii) $\mathbf{B}$ (Break) means that the ties between adjacent tokens are broken into two parts.
+
+Specifically, we build a binary classifier to distinguish whether current token is connected to the next one in the sentence. Given the output from BERT, the representation of $i$ -th token and $i + 1$ -th token are concatenated to a new feature vector,
+
+which is referred as $V_{i}^{\prime}$ for the $i$ -th token. The model predicts the probability of each token being connected with next one as follows:
+
+$$
+P \left(c _ {i} \mid V _ {i} ^ {\prime}\right) = \frac {\exp \left(c _ {i} ^ {T} V _ {i} ^ {\prime}\right)}{\sum c _ {k} \in C \exp \left(c _ {k} ^ {T} V _ {i} ^ {\prime}\right)} \tag {5}
+$$
+
+where $c_{i}$ is the label between the $i$ -th and its next tokens, and $C$ is the set of connection modes (e.g., "Tie" and "Break"). To train the model, we adopt the following cross entropy loss function:
+
+$$
+L _ {\text {w o r d}} = - \frac {1}{n} \sum_ {x} \left[ y \ln y ^ {\prime} + (1 - y) \ln \left(1 - y ^ {\prime}\right) \right] \tag {6}
+$$
+
+where $y \in \{0,1\}$ represents the label of each token, and $y' \in [0,1]$ indicates the predicted result of our model. In the inference stage, we connect the tokens between every two consecutive "Break" to form a candidate entity.
+
+"BIO" Tagging Schema It is worth noting that above token interaction tagger cannot detect entities which just contain single token. Moreover, besides the tight internal connection between words, context information is also important for identifying entities. Therefore, we follow the sequence labeling framework using "BIO" tagging scheme to detect entities at sentence level. Concretely, we tag the beginning token of an entity by "B", the other token of this entity by "T", and the non-entity tokens by "O". As shown in Figure 2, we first tokenize each word in sentence and pass it through BERT Transformer stacks. Then we use a Dense layer with the softmax activation function as the entity classifier to get probability of the labels from the contextualized representation. Similar to the token interaction tagger mentioned above, we use the cross entropy loss function in the model training process and connect the tokens between "B" and "O" to form a candidate entity in the inference process.
+
+"Phrase Matching" Tagging Schema Most of the previous distantly supervised models (Shang et al., 2018b; Cao et al., 2019; Liu et al., 2020) use deep neural network to identify entity boundaries at the word or sentence level. However, the statistical features of domain entities in the corpus are often ignored by them. For example, the part-of-speech tagging, the term frequency, and the probabilities of an entity in quotes and brackets are all helpful to identify boundaries. Therefore, we use a phrase mining tool which can capture multiple features
+
+# Algorithm 1 The Process of TEBNER
+
+# Input: Domain Corpus, Dictionary $D$
+
+Output: The named entities $\Gamma = \{e_1,\dots,e_N\}$ in test dataset $\mathcal{T}$
+
+1: Extract high-quality phrases $P$ by AutoPhrase
+2: Based on $D$ , detect all entities by string matching, and extract noise entities from corpus.
+
+3: for epoch $\leftarrow 1$ to $n$ do
+4: Update $W_{t}^{1}, W_{t}^{2}$ and $b_{t}^{1}, b_{t}^{2}$ w.r.t. $L_{type}$
+5: end for
+6: Extend $D$ to $D_{ext}$ by assigning types to $P$
+7: Reconstruct the annotation data $S = \{S_1, \dots, S_m\}$ by $D_{ext}$
+8: for $S$ in $\mathcal{S}$ do
+9: Update $\theta_w$ of token interaction model $M_w$
+10: Update $\theta_{s}$ of sequence label model $M_{s}$
+
+# 11: end for
+
+# 12: for $S$ in $\mathcal{T}$ do
+
+13: Predict candidate entities $\mathbf{E}_{word}$ by $M_w$
+14: Predict candidate entities $\mathbf{E}_{sent}$ by $M_{s}$
+15: Get candidate entities $\mathbf{E}_{\text{corp}}$ by phrases $P$
+16: Combine $\mathbf{E}_{word},\mathbf{E}_{sent},\mathbf{E}_{corp}$ as $\mathbf{E}_{all}$
+17: Assign types to $\mathbf{E}_{all}$
+18: end for
+
+to extract high-quality phrases and detect candidate entities from the testing data set through exact string matching.
+
+Finally, the results of the above three methods are fused and input into the entity classification model (mentioned in 4.1). In this stage, the entity classification model is trained on annotated corpus labeled by the extended dictionary. If the candidate entity does belong to a given entity type (not none), we output it as the final result. The details of the overall process of our model are presented in Algorithm 1.
+
+# 5 Experiments
+
+To evaluate the effectiveness of our method, we conduct experiments on a series of popular distantly supervised NER datasets which are also used by (Fries et al., 2017; Shang et al., 2018b; Liu et al., 2020). The results show that our model achieves the state-of-the-art performance.
+
+# 5.1 Experiment Setup
+
+Dataset We train and evaluate our model on three benchmark datasets. The statistics of the datasets are shown in Table 1.
+
+| Dataset | BC5CDR | NCBI-Disease | LaptopReview |
| Domain | Biomedical | Biomedical | Technical |
| Entity Num | 28,787 | 6,881 | 3,012 |
| Dictionary Size | 2,482 | 931 | 272 |
| Phrase Num | 6,877 | 2,728 | 1,399 |
+
+Table 1: The statistical results on experimental datasets. There are duplicate items in the entity set.
+
+- BC5CDR (Li et al., 2016) consists of 1,500 PubMed articles, including 15,935 Chemical and 12,852 Disease mentions. It is split into three subsets: 500 each for the training, development and test sets.
+- NCBI-Disease (Dogan et al., 2014) consists of 793 PubMed abstracts, including 6,881 Disease mentions. It is separated into three subsets: 593 for training, 100 for validation and 100 for testing.
+- LaptopReview (Pontiki et al., 2014) consists of 3,845 review sentences, including 3,012 AspectTerm mentions. As in previous work (Giannakopoulos et al., 2017; Liu et al., 2020), it is split into three subsets: 2,445 for training, 600 for validation and 800 for testing.
+
+Dictionary and High-Quality Phrase For a fair comparison with the previous methods, we use the same dictionary and high-quality phrase as (Shang et al., 2018b; Liu et al., 2020). Specifically, for the BC5CDR and NCBI-Disease datasets, the dictionary is a combination of both the MeSH database ${}^{1}$ and the CTD Chemical and Disease vocabularies ${}^{2}$ . For the LaptopReview dataset, the dictionary is crawled from the public website ${}^{3}$ . Moreover,the phrase mining tool AutoPhrase is pre-trained on a same domain text and then applied to small datasets. In the biomedical domain, it is pre-trained on the titles and abstracts of 686,568 PubMed papers. In the laptop review domain, it is pre-trained on Amazon laptop review dataset (Wang et al., 2011).
+
+Training Details In the boundary detection and entity classification models, we use a fine-tuned BERT to encode entity context. During the finetuning process, we use "biobert-base-cased-v1.1" (Lee et al., 2020) and "bert-base-cased" (Devlin
+
+et al., 2019) as our pre-trained models for biomedical and technical domain separately. We set a maximum sentence length of 256 tokens. The dimension of hidden representations is set to 768, the learning rate is set to 3e-5, the probability of dropout is set to 0.15, and the AdamW (Loshchilov and Hutter, 2019) is utilized as optimizer. The multi-layer perceptron in the entity classifier has a depth of 2 and a hidden size of 256. All above modules are trained on Nvidia Tesla V100 GPU and implemented in the PyTorch framework.
+
+# 5.2 Comparing with Previous Work
+
+Baselines We compare TEBNER with a series of NER models which report state-of-the-art results on the test datasets. There are two types of baselines methods, including supervised model (BiLSTM-CRF, ELMo-NER, BERT-NER) and distantly supervised model (Dictionary Match, SwellShark, AutoNER, HAMNER).
+
+- BiLSTM-CRF (Lample et al., 2016) adopts bi-directional LSTM with character-based representations to produce token embeddings, which are fed into a CRF layer to predict token labels.
+- ELMo-NER (Liu et al., 2020) uses pretrained word embeddings, a character-based CNN representation, two BiLSTM layers with ELMo to train the NER model.
+- BERT-NER adopts BERT-base model with sequence labeling framework to perform token-level prediction.
+- Dictionary Match recognizes entities by performing string matching with given dictionary. It can be viewed as the baseline of distantly supervised model to test the improvement of other methods over the distant supervision itself.
+- SwellShark (Fries et al., 2017) is a distantly supervised method designed for the biomedical domain. It needs regular expressions, and hand-tuning for special cases.
+- AutoNER (Shang et al., 2018b) uses a BiLSTM network to learn connection between adjacent tokens and extracts high-quality phrases to reduce false-negative labels.
+
+| Method | Description | BC5CDR | NCBI-Disease | LaptopReview |
| Pre | Rec | F1 | Pre | Rec | F1 | Pre | Rec | F1 |
| BiLSTM-CRF | | 88.84 | 85.16 | 86.96 | 86.11 | 85.49 | 85.80 | 84.80 | 66.51 | 74.55 |
| ELMo-NER | Gold Annotations | 88.17 | 88.39 | 88.28 | 85.34 | 90.94 | 88.05 | 85.14 | 80.58 | 82.80 |
| BERT-NER | | 87.24 | 90.75 | 88.96 | 85.90 | 90.10 | 87.95 | 79.26 | 82.42 | 80.81 |
| Dictionary Match | source | 95.94 | 50.82 | 66.44 | 92.20 | 49.64 | 64.54 | 82.43 | 39.45 | 53.36 |
| extended | 92.57 | 68.86 | 78.97 | 90.07 | 67.08 | 76.90 | 69.54 | 60.40 | 64.65 |
| SwellShark | Regex Design (RD) | 84.98 | 83.49 | 84.23 | 64.7 | 69.7 | 67.1 | - | - | - |
| RD + Case Tuning | 86.11 | 82.39 | 84.21 | 81.6 | 80.1 | 80.8 | - | - | - |
| AutoNER | +ELMo | 83.08 | 82.16 | 82.70 | 76.98 | 74.65 | 75.78 | 68.72 | 59.39 | 63.70 |
| +BERT | 82.89 | 83.17 | 83.03 | 80.24 | 87.97 | 83.93 | 62.75 | 62.19 | 62.47 |
| HAMNER | - | 86.01 | 86.34 | 86.17 | 82.03 | 83.56 | 82.79 | 74.02 | 62.02 | 67.46 |
| TEBNER | | 88.05 | 90.36 | 89.19 | 86.32 | 91.35 | 88.77 | 70.82 | 80.89 | 75.52 |
+
+- HAMNER (Liu et al., 2020) is the best distantly supervised method in the past. It extends the dictionary with headword-based matching and infers the entity spans with an entity typing model.
+
+Results The comparative results on three benchmark datasets are shown in Table 2. We observe that TEBNER achieves the best performance on all datasets. It should be emphasized that we use the same dictionary and phrases as the AutoNER and HAMNER. Due to the differences in data processing methods, our dictionary matching results are slightly different from them. Although SwellShark is designed for the biomedical domain and utilizes much more expert effort, TEBNER can easily surpasses it without human effort. Since the original AutoNER model uses all the raw texts for training (i.e., the training dataset is the union of the training, development, and test sets), Liu et al. (Liu et al., 2020) retrained the model with ELMo. To make a fair comparison with them, we use the AutoNER+ELMo (trained on the training set only) results reported in (Liu et al., 2020), which are slightly lower than original results in (Shang et al., 2018b). Moreover, we also train the AutoNER model with BERT and report the evaluation results in our paper. Compared with our proposed model that integrates multi-granularity boundary information, AutoNER only focuses on the ties between adjacent tokens and has poor performance on benchmark datasets. In particular, TEBNER outperforms the previous state-of-the-art method
+
+Table 2: Performance comparison of supervised and distantly supervised NER on three test datasets.
+
+| Dictionary | BC5CDR |
| Pre | Rec | F1 |
| Source | 97.40 | 66.15 | 78.79 |
| Extended (based HAMNER) | 91.89 | 84.48 | 88.03 |
| Extended (based KNN) | 92.82 | 87.26 | 89.95 |
| Extended (based TEBNER) | 93.94 | 95.32 | 94.63 |
+
+Table 3: Distantly supervised annotation quality on the training set.
+
+HAMNER by $\{3.02\%, 5.98\%, 8.06\% \}$ in terms of F1 score and surpasses the supervision model on the BC5CDR and NCBI datasets, which demonstrates the significant superiority of our proposed model.
+
+# 5.3 Impact of Different Modules
+
+To analyze the performance of different modules and investigate their impact on the final results, we also conduct experiments on following aspects.
+
+Effectiveness of Dictionary Extension To evaluate the effectiveness of our dictionary extender, we compare three extension methods and report their distantly supervised annotation quality on the training set. As shown in Table 3, our dictionary extension method can greatly increase the entity recall while slightly reducing the precision. For example, on the BC5CDR dataset, our method significantly boosts the recall from $66.15\%$ to $95.32\%$ with an acceptable precision loss from $97.40\%$ to
+
+
+Figure 3: Influence of annotated data size on the distantly supervised model.
+
+93.94%. Compare to the (Liu et al., 2020), our method significantly achieves $10.84\%$ and $6.60\%$ relative improvements on recall and F1 scores. It is worth noting that previous methods utilize complex strategies (i.e., headword matching, semantic similarity calculation, annotation weight setting) to improve the entity recall rate. Unlike them, our method mainly depends on contextual semantic information, which can be applied to any domain corpus. Moreover, we also try to extend the dictionary with a KNN model. Specifically, for each phrase, a closest entity will be recalled from the source dictionary based on the cosine similarity between the corresponding word embeddings. Then the type of the recalled entity will be assigned to the phrase. Limited by the size of the original dictionary, some entities with similar semantics but different types are easy to be recalled by KNN model, which leads to a decline in F1 score.
+
+Influence of the number of Annotations To evaluate the robustness of our model, we study the influence of the annotated data size on the final results. Concretely, we randomly select sentences from the distant annotations and evaluate our model trained on the selected texts. From Figure 3, we can observe that increasing the size of annotations will generally improve the performance of the model, and the improvement tends to flatten out with $80\%$ data. In particular, our model achieve $86.70\%$ test F1 score on the BC5CDR dataset with only $60\%$ data, which demonstrates that our TEBNER model can significantly reduce the human efforts to create NER taggers.
+
+| Model | F1(%) |
| Total | Δ |
| Full Model | 89.19 | - |
| - Dictionary Extension | 85.30 | 3.89 |
| - BERT("Break or Tie" tagging scheme) | 87.77 | 1.42 |
| - BERT("BIO" tagging scheme) | 86.65 | 2.54 |
| - Phrase Matching | 86.44 | 2.75 |
+
+Table 4: Results on the BC5CDR dataset to investigate the influence of different model components.
+
+Ablation studies To better explore the contribution of different modules to the overall performance, we conduct the ablation studies on BC5CDR dataset. From the results shown in table 4, we can observe that: (1) Dictionary extender is a necessary component that contributes $3.89\%$ gain of F1 to the ultimate performance, we attribute this gain to the context semantic information. (2) Removing "Break or Tie" tagging scheme degrades the performance by $1.42\%$ F1, which shows that the connection information reflecting the interdependence between adjacent tokens is useful for NER. (3) The "BIO" tagging scheme contributes much to the overall performance, since the F1 drops by $2.54\%$ if it is removed. (4) When we remove phrase matching result, the score drops by $2.75\%$ , which indicates that the participation of multi-aspect statistical information is important for our model.
+
+# 6 Conclusion
+
+In this paper, we propose a new dictionary extension method and design a boundary-aware model in specific domains using distant supervision. Our dictionary extender combines phrase mining method with entity classification model, which can be easily applied to any other domain corpus. By utilizing different tagging schemes to extract candidate entities from sentence and introducing AutoPhrase tool to extract high-quality phrases from corpus, our distantly supervised NER model can detect entities from both local and global perspectives. In experiments, we evaluate our method on different domain datasets and the results demonstrate the effectiveness of our model.
+
+# Acknowledgements
+
+This research is supported by the National Key Research and Development Program of China
+
+(NO.2017YFC0820700) and National Natural Science Foundation of China (No.61902394). We thank all authors for their contributions and all anonymous reviewers for their constructive comments.
+
+# References
+
+Yixin Cao, Zikun Hu, Tat-Seng Chua, Zhiyuan Liu, and Heng Ji. 2019. Low-resource name tagging learned with weakly labeled data. 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 2019, pages 261-270.
+Jason P. C. Chiu and Eric Nichols. 2016. Named entity recognition with bidirectional LSTM. Trans. Assoc. Comput. Linguistics, 4:357-370.
+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, NAACL-HLT 2019, pages 4171-4186.
+Rezarta Islamaj Dogan, Robert Leaman, and Zhiyong Lu. 2014. NCBI disease corpus: A resource for disease name recognition and concept normalization. J. Biomed. Informatics, pages 1-10.
+Zheng Fang, Yanan Cao, Ren Li, Zhenyu Zhang, Yanbing Liu, and Shi Wang. 2020. High quality candidate generation and sequential graph attention network for entity linking. In The Web Conference 2020, WWW 2020, pages 640-650.
+Jason A. Fries, Sen Wu, Alexander Ratner, and Christopher Re. 2017. Swellshark: A generative model for biomedical named entity recognition without labeled data. CoRR, abs/1704.06360.
+Zorik Gekhman, Roee Aharoni, Genady Beryozkin, Markus Freitag, and Wolfgang Macherey. 2020. Kobe: Knowledge-based machine translation evaluation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, EMNLP 2020, pages 3200-3207.
+Athanasios Giannakopoulos, Claudiu Musat, Andreea Hossmann, and Michael Baeriswyl. 2017. Unsupervised aspect term extraction with B-LSTM & CRF using automatically labelled datasets. In Proceedings of the 8th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, WASSA@EMNLP 2017, pages 180-188.
+Guillaume Lample, Miguel Ballesteros, Sandeep Subramanian, Kazuya Kawakami, and Chris Dyer. 2016. Neural architectures for named entity recognition.
+
+In NAACL HLT 2016, The 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 260-270.
+Jinhyuk Lee, Wonjin Yoon, Sungdong Kim, Donghyeon Kim, Sunkyu Kim, Chan Ho So, and Jaewoo Kang. 2020. Biobert: a pre-trained biomedical language representation model for biomedical text mining. Bioinform., pages 1234-1240.
+Belinda Z. Li, Sewon Min, Srinivasan Iyer, Yashar Mehdad, and Wen-tau Yih. 2020a. Efficient one-pass end-to-end entity linking for questions. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, pages 6433-6441.
+Jiao Li, Yueping Sun, Robin J. Johnson, Daniela Sciaky, Chih-Hsuan Wei, Robert Leaman, Allan Peter Davis, Carolyn J. Mattingly, Thomas C. Wiegers, and Zhiyong Lu. 2016. Biocreative VCDR task corpus: a resource for chemical disease relation extraction. Database J. Biol. Databases Curation.
+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, ACL 2020, pages 5849-5859.
+Chen Liang, Yue Yu, Haoming Jiang, Siawpeng Er, Ruijia Wang, Tuo Zhao, and Chao Zhang. 2020. BOND: bert-assisted open-domain named entity recognition with distant supervision. In The 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, SIGKDD 2020, pages 1054-1064.
+Pierre Lison, Jeremy Barnes, Aliaksandr Hubin, and Samia Touileb. 2020. Named entity recognition without labelled data: A weak supervision approach. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, pages 1518-1533.
+Shifeng Liu, Yifang Sun, Bing Li, Wei Wang, and Xi-ang Zhao. 2020. HAMNER: headword amplified multi-span distantly supervised method for domain specific named entity recognition. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, pages 8401-8408.
+Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019.
+Xuezhe Ma and Eduard H. Hovy. 2016. End-to-end sequence labeling via bi-directional LSTM-cnns-crf. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016.
+
+Matthew E. 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, NAACL-HLT 2018, pages 2227-2237.
+Maria Pontiki, Dimitris Galanis, John Pavlopoulos, Harris Papageorgiou, Ion Androutsopoulos, and Suresh Manandhar. 2014. Semeval-2014 task 4: Aspect based sentiment analysis. In Proceedings of the 8th International Workshop on Semantic Evaluation, SemEval@COLING 2014, pages 27-35.
+Jingbo Shang, Jialu Liu, Meng Jiang, Xiang Ren, Clare R. Voss, and Jiawei Han. 2018a. Automated phrase mining from massive text corpora. IEEE Trans. Knowl. Data Eng., 30.
+Jingbo Shang, Liyuan Liu, Xiaotao Gu, Xiang Ren, Teng Ren, and Jiawei Han. 2018b. Learning named entity tagger using domain-specific dictionary. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018, pages 2054-2064.
+Bailin Wang, Wei Lu, Yu Wang, and Hongxia Jin. 2018. A neural transition-based model for nested mention recognition. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, EMNLP 2018, pages 1011-1017.
+Hongning Wang, Yue Lu, and ChengXiang Zhai. 2011. Latent aspect rating analysis without aspect keyword supervision. In Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2011, pages 618-626.
+Yu Wang, Yun Li, Hanghang Tong, and Ziye Zhu. 2020. HIT: nested named entity recognition via head-tail pair and token interaction. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, pages 6027-6036.
+Mengge Xue, Bowen Yu, Zhenyu Zhang, Tingwen Liu, Yue Zhang, and Bin Wang. 2020. Coarse-to-fine pre-training for named entity recognition. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, pages 6345-6354.
+Changmeng Zheng, Yi Cai, Jingyun Xu, Ho-fung Leung, and Guandong Xu. 2019. A boundary-aware neural model for nested named entity recognition. 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 2019, pages 357-366.
\ No newline at end of file
diff --git a/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/images.zip b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..087cab3dc06b17fdd706c6af7c4373fe6e84ec0b
--- /dev/null
+++ b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6fbe1e2c198da62c5abe3cbf4205f1a50f70e7dda5d0565fc7a5556485dd6f00
+size 337926
diff --git a/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/layout.json b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..0f498678677d043e2c069cdfa0ff954aebeb354b
--- /dev/null
+++ b/tebnerdomainspecificnamedentityrecognitionwithtypeexpandedboundaryawarenetwork/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ec54303373fc850f7b8792089d1df8aa210577144ebe1e5085be9d04756d211e
+size 334407
diff --git a/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/379b4f98-c50f-49bb-84bb-a8c797cedfa3_content_list.json b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/379b4f98-c50f-49bb-84bb-a8c797cedfa3_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..705575314a08921da8f8d0492b5de323e87027d5
--- /dev/null
+++ b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/379b4f98-c50f-49bb-84bb-a8c797cedfa3_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1740686a7d6d64171a0eaa8d403471124f2530881f15c02eb880a5b53d91ba45
+size 65134
diff --git a/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/379b4f98-c50f-49bb-84bb-a8c797cedfa3_model.json b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/379b4f98-c50f-49bb-84bb-a8c797cedfa3_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..fdf720da6ce71a2314e75cecae528cf4e7af5f78
--- /dev/null
+++ b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/379b4f98-c50f-49bb-84bb-a8c797cedfa3_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c09c3dccc541690756175e36cf316a641e58ab37c4dc03849d6b637b4dbcfd76
+size 81329
diff --git a/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/379b4f98-c50f-49bb-84bb-a8c797cedfa3_origin.pdf b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/379b4f98-c50f-49bb-84bb-a8c797cedfa3_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..90885460d3e1c14f8e645e6f162b48d45c3f37d6
--- /dev/null
+++ b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/379b4f98-c50f-49bb-84bb-a8c797cedfa3_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:010707cf40bd97c4f0aa0df7c266ddf0771efbbb54ceba37d3131c6b9624d73f
+size 315157
diff --git a/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/full.md b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..7bdc19b18e4f358ec3c170db3d2be6846aa1604b
--- /dev/null
+++ b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/full.md
@@ -0,0 +1,280 @@
+# TEMP: Taxonomy Expansion with Dynamic Margin Loss through Taxonomy-Paths
+
+Zichen Liu $^{1}$ , Hongyuan Xu $^{1}$ , Yanlong Wen $^{1}$ , Ning Jiang $^{2}$ , Haiying Wu $^{2}$ , Xiaojie Yuan $^{1}$
+
+$^{1}$ TKLNDST, College of Computer Science, Nankai University, China
+
+$^{2}$ Mashang Consumer Finance Co, Ltd
+
+{liuzichen, xuhongyuan, wenyl, yuanxj}@dbis.nankai.edu.cn
+
+{ning.jiang,haiying.wu02}@msxf.com
+
+# Abstract
+
+As an essential form of knowledge representation, taxonomies are widely used in various downstream natural language processing tasks. However, with the continuously rising of new concepts, many existing taxonomies are unable to maintain coverage by manual expansion. In this paper, we propose TEMP, a self-supervised taxonomy expansion method, which predicts the position of new concepts by ranking the generated taxonomy-paths. For the first time, TEMP employs pre-trained contextual encoders in taxonomy construction and hypernym detection problems. Experiments prove that pre-trained contextual embeddings are able to capture hypernym-hyponym relations. To learn more detailed differences between taxonomy-paths, we train the model with dynamic margin loss by a novel dynamic margin function. Extensive evaluations exhibit that TEMP outperforms prior state-of-the-art taxonomy expansion approaches by $14.3\%$ in accuracy and $15.8\%$ in mean reciprocal rank on three public benchmarks.
+
+# 1 Introduction
+
+Taxonomies, tree-structured semantic hierarchies that organize entities by hypernym-hyponym (is-a) relations, play an important role in many NLP tasks such as question answering (Yang et al., 2017), query understanding (Hua et al., 2016) and information extraction (Demeester et al., 2016).
+
+Manually curated taxonomies usually face the limited coverage issue, especially when new concepts arise continuously. A low coverage taxonomy can largely hurt the performance of downstream tasks relied on it. Moreover, for maintaining and expanding existing taxonomies, the curation process that requires domain experts is expensive and time-consuming. Thus, we study the automatic taxonomy expansion task (Figure 1): given an existing taxonomy, a text corpus, and a set of concepts, the
+
+goal is to expand the taxonomy by inserting concepts into it.
+
+Two common strategies used to study taxonomy construction and expansion are pattern-based methods (e.g. the Hearst pattern (Hearst, 1992)) and distributional methods (Yu et al., 2015). Recent evidence suggests that the semantic information or structural features encoding in the representation is an effective way to solve the task, especially probability statistics from a large corpus (Mikolov et al., 2013), semantic information extracted from text data (Yin and Roth, 2018), and properties of hypernym-hyponym relations such as strict partial order (Dash et al., 2020).
+
+Since taxonomies can be formulated as directed acyclic graphs (DAGs), the graph structure has been seen as important information for taxonomy expansion and construction in recent works (Shang et al., 2020; Shen et al., 2020). However, according to our observation, the path composed of ancestor nodes in a taxonomy is a more appropriately encoded object in hypernym-hyponym relations. In a tree-structured taxonomy, all the ancestor nodes have an $is-a$ relation with the child node. In Figure 1, for example, "Science" - "Systematics" - "Biosystematics" is the taxonomy-path of word "Biosystematics". "Biosystematics" not only "is-a" "Systematics" but also "is-a" "Science". In addition, the serial structure of taxonomy-path is also more appropriate than the graph structure for transformers to encode.
+
+As far as we know, there has been no attempt to take pre-trained contextual encoders (such as BERT (Devlin et al., 2019)) as the core of taxonomy expansion or construction model. Pre-trained contextual encoders have been proved powerful in various NLP tasks such as Question Answer(QA)(Yang et al., 2019), Information Retrieval (IR) (Nogueira and Cho, 2019), Document Classification (Adhikari et al., 2019), etc. Compared with previous encoding approaches, pre-trained contextual en
+
+
+Figure 1: An example of expanding taxonomy. The dash boxes outline two candidates of all possible taxonomies to be predicted.
+
+
+
+coders have two main advantages. First, they are capable of deeply encoding textual content and capturing long distance dependencies. Second, most of them have been pre-trained on large text corpora to naturally support tasks using text features. Our proposed method, $\mathrm{TEMP}^1$ , is the first to show that fine-tuned pre-trained contextual encoders are able to identify hypernym-hyponym relations. To enhance the understanding of concepts, the model takes the query concept's definition as input besides the taxonomy-path.
+
+The diversity and heterogeneity of hypernym-hyponym relations is another reason for the difficulty of expanding taxonomies (Fu et al., 2014; Manzoor et al., 2020), which makes it hard for the model to learn the similarities and differences between relations on limited datasets. Inspired by the success of ARBORIST (Manzoor et al., 2020), we train the model with dynamic margin ranking loss (MRL) to handle this problem. Previous studies show that margin loss can optimize the model to learn the discriminative deep features (Lin and Xu, 2019) and that dynamic margins set by handcrafted rules can lead the model to learn more similarity information (Feng et al., 2020). Therefore, we design a margin function to calculate the margin between taxonomy-paths based on their semantic similarity.
+
+Contributions. In summary, our major contributions include:
+
+- We propose TEMP, a self-supervised taxonomy expansion method, that is the first to take contextual encoders (such as BERT) as the core of the model for the taxonomy expansion problem.
+
+- We employ the dynamic margin-based ranking loss with a novel dynamic margin function in the TEMP to make the model learn the discriminative difference between taxonomy-paths.
+- We take word definitions and taxonomy-paths generated in the existing taxonomy as the input of our model, which means that TEMP doesn't require large-scale corpora but only the definitions of concepts.
+
+Experiments on three benchmarks show that TEMP improves the previous state-of-the-art performance by $14.3\%$ in accuracy and $15.8\%$ in mean reciprocal rank on average.
+
+# 2 Related Work
+
+Automatic taxonomy construction has been a long-term task in literature in the last few decades. Most existing methods follow the paradigm of constructing taxonomy from scratch. They firstly extract $<$ Hypernym, Hyponym $>$ pairs from raw resources (Gupta et al., 2017) and organize them into a noisy hierarchy to further prune it via constraints like DAG (Fu et al., 2014; Liang et al., 2017b,a). These approaches exploit semantic information and structural features such as lexical-patterns (Hearst, 1992; Nakashole et al., 2012) or distributional embeddings (Yu et al., 2015; Shwartz et al., 2016; Le et al., 2019; Wang and He, 2020) to automatically construct taxonomies. However, recent practical applications have revealed that it is laborious to construct taxonomies from scratch when facing the continuously rising of new concepts, so solutions to the taxonomy expansion task are in urgent need.
+
+
+Figure 2: Overview of TEMP structure. Given one node in the existing taxonomy, a pair of positive and negative taxonomy-paths is generated. Through the generated taxonomy-paths, dynamic margin function returns a margin.
+
+Recently, numerous methods have been proposed to solve the aforementioned problem (Shen et al., 2018; Mao et al., 2020; Shen et al., 2020; Yu et al., 2020; Manzoor et al., 2020; Zhang et al., 2021). For example, Shen et al. (2020) proposes a position-enhanced graph neural network framework to encode the local structure of an anchor concept with a noise-robust training objective. Yu et al. (2020) converts candidate anchor positions from the whole existing taxonomy to mini-paths, in which way can better capture and integrate multiple sources of information via a multi-view co-training procedure. Manzoor et al. (2020) first designs a realistic approach to demonstratively model unobserved and heterogeneous edge semantics. Zhang et al. (2021) generalizes expansion task to the more general "one-to-pair" completion task and applies primal and auxiliary scorers based on the neural tensor network to rank candidate anchor positions.
+
+As far as we know, all the existing methods attempt to determine the attachment position by scoring between several nodes, we are the first to take the path as the unit for encoding and calculating scores. Besides, to the best of our knowledge, few state-of-the-art expansion approaches encode information out of supervision information in the existing taxonomy, we take pre-trained contextual encoder as core to aggregate more valuable information and resources such as word definition to improve performance.
+
+# 3 The TEMP Method
+
+In this section, we describe our proposed method TEMP. First, we introduce taxonomy-path, an im
+
+important concept in our method (Section 3.1). Our model takes concept definitions and taxonomy-pathas input and relies on the pre-trained contextual encoders as its core (Section 3.2). The parameters of the model are trained by margin ranking loss (MRL) with a dynamic margin function designed for taxonomy expansion (Section 3.3). Finally, we discuss how to sample self-supervision data and fine-tune the model with dynamic margin loss (Section 3.4).
+
+# 3.1 Taxonomy Paths
+
+The essence of taxonomy expansion is to attach a new concept to the correct position in the existing taxonomy. Therefore, most previous works (Shen et al., 2020; Manzoor et al., 2020; Shen et al., 2018) treat this task as finding the optimum hypermnym node for the new concept by measuring the taxonomic relatedness of candidate node-pairs. However, in taxonomies, not only the directed attached node has a hypermnym relation with the new concept but also every ancestor node of it does. To preserve more comprehensive information, TEMP finds the correct position by evaluating the generated taxonomy-paths.
+
+Taxonomy-Path: A taxonomy-path $P =$ [root, $n_1, n_2, \dots, n_D$ ], where $D$ is the depth of $n_D$ , root is the root node in the taxonomy. $n_{i-1}$ is the parent node of $n_i$ in the taxonomy.
+
+In a tree-structured taxonomy, each node has its unique corresponding taxonomy-path. For a new term, the framework generates the same number of candidate taxonomy-paths as nodes in the existing taxonomy. Then, TEMP ranks all the candidate
+
+
+Figure 3: The backbone of TEMP
+
+taxonomy-paths by scoring each of them.
+
+# 3.2 Model Backbone
+
+We use the pre-trained contextual encoder as the backbone of our model. We exploit the model to encode the definition of the last node in the taxonomy-path besides the taxonomy-path such that the model can capture more semantic information of the query term. The text encoding of TEMP refers to the encoding way in question answering task, with word definition as the question and taxonomy-path as the passage. Take the Word-Piece tokenization (Schuster and Nakajima, 2012) used by BERT as an example, to be in line with contextual encoders, the words in taxonomy-path $P$ and the definition sentence $S$ of the last node are concatenated to form the input string as shown in Figure 3. Given the input string, the contextual encoder returns a sequence of vectors:
+
+$\operatorname{Encoder}(S, P) = v_{[\mathrm{CLS}]}, v_1, \ldots, v_{[\mathrm{SEP}]}, v_{p_d}, \ldots, v_{\mathrm{root}}$
+
+where $v_{[CLS]}$ is the representation vector of the special [CLS] token. We feed the [CLS] representation into a multilayer perceptron (MLP) output layer to evaluate the taxonomy-path.
+
+Compared with the previous methods (Shwartz and Dagan, 2016; Panchenko et al., 2016; Yu et al., 2020) that normally designed lexical features like Ends with, Contains, Suffix match, Occurrence frequency, and so on, we believe that contextual encoders are sufficient to obtain the hierarchical information for the following two reasons: (1) Contextual encoders use subword algorithms for text encoding, such as WordPiece (Schuster and Nakajima, 2012) and Byte-Pair Encoding (Sennrich et al., 2016). So after the taxonomy-path is tokenized, the substring information among terms is intuitively showed to the model. (2) Contextual encoders are pre-trained in large corpora, which makes them empirically powerful even without explicit frequency information.
+
+# 3.3 Dynamic Margin Loss
+
+We train the model with Margin Ranking Loss (MRL) such that the optimum taxonomy-path is ranked higher than others. Margin Ranking Loss is defined as follows:
+
+$$
+\mathcal {L} = \sum_ {P \in \mathcal {P} ^ {+}} \sum_ {P ^ {\prime} \in \mathcal {P} ^ {-}} \max (0, f \left(P ^ {\prime}\right) - f (P) + \gamma \left(P, P ^ {\prime}\right)) \tag {1}
+$$
+
+where $\mathcal{P}^{+}$ is the set of taxonomy-paths in the taxonomy, $\mathcal{P}^{-}$ is the set of negative samples, and $\gamma(P, P')$ is a function designed for the margin between positive and negative taxonomy-paths. In traditional MRL, the output of the margin function is a constant value, which is manually set via cross-validation. All the negative taxonomy-paths will be roughly scored the same, which ignores the subtle similarity that is proved useful in both face recognition (Feng et al., 2020) and lexical entailment (Manzoor et al., 2020). To capture the semantic similarity of different taxonomy-paths, we set a dynamic margin function based on the semantic similarity as follows:
+
+$$
+\gamma (P, P ^ {\prime}) = \left(\frac {| P \cup P ^ {\prime} |}{| P \cap P ^ {\prime} |} - 1\right) * k \tag {2}
+$$
+
+where $k$ is a parameter used to adjust margins (usually between 0.1 and 1).
+
+This function is inspired by the word meaning similarity measure proposed by Wu and Palmer (1994). In a tree-structured taxonomy, the intersection of two different taxonomy-paths is the set of common super-concepts at the beginning of both paths. Minimizing the loss also minimizes the number of different nodes between the highest-ranked prediction and the true taxonomy-path. Therefore, the training with the margin function encourages negative taxonomy-paths that are more irrelevant to the last nodes in them to get a lower score. Such a design also fits the Wu&P metric which is introduced in Section 4.1.
+
+# 3.4 Sampling and Training
+
+In this section, we introduce how TEMP learns using self-supervision from the existing taxonomy.
+
+Sampling. Figure 2 shows an example of generating self-supervision data. Given one leaf node $n_q$ in the existing taxonomy, we take its corresponding
+
+taxonomy-path as a positive sample. Then, we randomly select one node $n_r$ (except its parent) with its corresponding taxonomy-path $P_r$ in the taxonomy. By adding $n_q$ to $P_r$ as its last node, we obtain a negative taxonomy-path $P_n$ . For each leaf node in the existing taxonomy, we generate a pair of positive and negative taxonomy-path. By repeating the above process (with different random choices) for each epoch, we obtain the full self-supervision dataset.
+
+Training. When training, the mini-batch consists of pairs of samples, which means the positive and corresponding negative taxonomy-paths must be fed into the model in the same batch. With the pair of taxonomy-paths as input, the margin function returns the corresponding margin. Then, we calculate the margin loss and update the model parameters.
+
+# 4 Experiments
+
+In this section, we first introduce the experimental setup (Section 4.1) and report the overall performance compared with baselines (Section 4.2). Then, we study the effectiveness of the key choices in TEMP by ablation experiments (Section 4.3). Furthermore, we discuss the factors that can affect the performance of TEMP (Section 4.4).
+
+# 4.1 Experimental Setup
+
+| Dataset | Environment | Science | food |
| |N| | 261 | 429 | 1486 |
| L| | 201 | 312 | 1184 |
| D| | 6 | 8 | 8 |
| Δ| | 3.78 | 5.16 | 5.36 |
+
+Table 1: Statistics of the taxonomy datasets for evaluation. $|\mathcal{N}|$ and $|\mathcal{L}|$ are the number of nodes and leaf nodes in the taxonomy. $|\mathcal{D}|$ and $|\Delta|$ indicate the depth of the taxonomy and the average depth of leaf nodes respectively.
+
+Datasets. We evaluate TEMP using all the three English datasets in Semeval-2016 task $13^{2}$ (Bordea et al., 2016). These datasets correspond to human-curated concept taxonomies of three different domains: environment, science, food (summarized in Table 1). We follow the setup as in Yu et al. (2020) that uses the randomly-grown taxonomies for self-supervised learning and the rest $20\%$ leaf concepts for testing.
+
+Metrics. When testing, TEMP ranks all candidate taxonomy-paths for each test concept. For the $i$ th node in $n$ testing nodes, We denote the ground truth taxonomy-path and the highest-ranked taxonomy-path as $y_{i}$ and $\hat{y}_i$ respectively. Following previous works (Yu et al., 2020; Shen et al., 2020; Jurgens and Pilehvar, 2016), we use these metrics:
+
+(1) Accuracy (Acc) measures the counting of the exactly predicted taxonomy-path.
+
+$$
+\mathrm {A c c} = \frac {1}{n} \sum_ {i = 1} ^ {n} \left(y _ {i} = \hat {y} _ {i}\right)
+$$
+
+(2) Mean reciprocal rank (MRR) calculates the average of reciprocal ranks of the true taxonomy-path.
+
+$$
+\mathrm {M R R} = \frac {1}{n} \sum_ {i = 1} ^ {n} \frac {1}{\operatorname {r a n k} (y _ {i})}
+$$
+
+(3) Wu & Palmer similarity (Wu&P) measures the semantic similarity between the predicted taxonomy-path and the truth taxonomy-path, calculated as
+
+$$
+\mathrm {W u} \& \mathrm {P} = \frac {1}{n} \sum_ {i = 1} ^ {n} \frac {2 \left| y _ {i} \cap \hat {y} _ {i} \right|}{\left| y _ {i} \right| + \left| \hat {y} _ {i} \right|}
+$$
+
+Baseline Methods. We compare with the following methods:
+
+- BERT+MLP: A distributional method that takes terms embeddings from a pre-trained but not fine-tuned BERT and then feeds them into a Multi-Layer Perceptron (MLP) to predict their relations. The experimental results come from Yu et al. (2020).
+- TaxoExpan (Shen et al., 2020): A self-supervised method for taxonomy expansion that adopts position-enhanced graph neural networks (GNNs) to encode local structure and InfoNCE loss for robust learning.
+- STEAM (Yu et al., 2020): One state-of-the-art taxonomy expansion framework which extracts features for query-anchor pairs from three views based on mini-path anchor format and is trained by a multi-view co-training procedure.
+- TMN (Zhang et al., 2021): A one-to-pair matching model which leverages auxiliary and primal signals using the base model neural
+
+| Dataset | Environment | Science | Food |
| Metric | Acc | MRR | Wu&P | Acc | MRR | Wu&P | Acc | MRR | Wu&P |
| BERT+MLP | 11.1 | 21.5 | 47.9 | 11.5 | 15.7 | 43.6 | 10.5 | 14.9 | 47.0 |
| TaxoExpan | 11.1 | 32.3 | 54.8 | 27.8 | 44.8 | 57.6 | 27.6 | 40.5 | 54.2 |
| STEAM | 36.1 | 46.9 | 69.6 | 36.5 | 48.3 | 68.2 | 34.2 | 43.4 | 67.0 |
| TMN | 35.0 | 43.6 | 54.0 | 41.9 | 53.2 | 75.9 | 34.7 | 47.2 | 65.9 |
| TEMP-BERT | 49.0 | 62.0 | 75.9 | 54.4 | 64.6 | 84.6 | 45.2 | 57.1 | 78.3 |
| TEMP-ELECTRA | 49.2 | 63.5 | 77.7 | 57.8 | 67.5 | 85.3 | 47.6 | 60.5 | 81.0 |
+
+Table 2: Baseline comparison on the three datasets (in %).
+
+| Dataset | Environment | Science | Food |
| Metric | Acc | MRR | Wu&P | Acc | MRR | Wu&P | Acc | MRR | Wu&P |
| No Definition | 48.7 | 61.9 | 71.9 | 34.1 | 46.7 | 70.5 | 32.4 | 43.7 | 64.8 |
| BCELoss | 10.5 | 26.6 | 57.4 | 16.4 | 31.4 | 64.2 | 8.0 | 18.0 | 49.8 |
| Con-Margin | 33.3 | 49.6 | 68.7 | 44.4 | 57.7 | 80.7 | 42.5 | 54.4 | 74.0 |
| No Path | 48.3 | 62.1 | 76.5 | 44.4 | 58.2 | 78.9 | 43.6 | 55.3 | 74.8 |
| TEMP-BERT | 49.0 | 62.0 | 75.9 | 54.4 | 64.6 | 85.3 | 45.2 | 57.1 | 78.3 |
+
+Table 3: Results of ablation experiments on the three datasets (in %).
+
+tensor network. It regulates concept embedding via the channel-wise gating mechanism to boost performance.
+
+Implementation Details. The baseline method experimented by us, TMN, is obtained from the code published by the original authors3. Because the implementation of TMN needs validation data to set the training epochs, we use $10\%$ terms for validating and $10\%$ for testing. For each benchmark, we try various learning rates and report the best performance. To reduce the randomness, we evaluated TEMP five times on five differently divided test sets and training sets for each dataset and report the average performance. The hyperparameter $k$ in Equation 2 is set to 0.2 on the three datasets. In the experiments of TEMP, all the pretrained contextual encoders are of base size with 12 layers4. We fine-tune the model with a batch size of 64 (which means 32 pairs of positive and negative samples). The optimizer is Adam with learning rate 2e-5, $\beta_{1} = 0.9$ , $\beta_{2} = 0.999$ which is recommended by the authors of BERT.
+
+The definitions of concepts used in training and testing are automatically gathered from the corresponding Wikipedia pages. We use the first line on the page as the word's definition. For each multi-word concept without a corresponding Wikipedia page, the definitions of the words that make the
+
+concept up are concatenated as its definition.
+
+# 4.2 Experimental Results
+
+Table 2 reports the performance of TEMP based on the most representative contextual encoder, BERT and the contextual encoder that achieves the best performance, ELECTRA, and the baseline methods on the three benchmarks.
+
+We summarize the evaluation results of the expansion task on the datasets in Table 2. As shown, TEMP-ELECTRA achieves the best performance on the three datasets and improves the state-of-the-art TMN model by $14.3\%$ , $15.8\%$ and $16.1\%$ for Acc, MRR, Wu&P on average.
+
+# 4.3 Ablation Studies
+
+We perform ablation studies to analyze the effectiveness of the key choices in TEMP: (1) optimizing the margin loss by semantic similarity dynamic margin function; (2) using word definitions for taxonomy expansion; and (3) predicting the attachment by encoding taxonomy-paths. Since BERT is currently the most representative contextual encoder, all the experiments in ablation studies are based on BERT. We design the following experiments and report the results in Table 3.
+
+The Effect of Dynamic Margin Function. We restrict TEMP to use a constant margin (Con-Margin). We experiment with different margin values and report the best performance. In the ex
+
+
+(a) Environment
+
+
+(b) Science
+
+
+(c) Food
+Figure 4: Results for different contextual encoders over three datasets.
+
+experimental results, the dynamic margin function doesn't greatly improve the performance in the food dataset as it does in the other datasets. For this result, there are two possible reasons: (1) Semantic similarity is more important on a small dataset. In other words, with large training data, the model can learn the discriminative features with a constant margin. (2) The function can't improve a lot on flat datasets. The food dataset has the same depth as the science dataset but its number of nodes is more than three times the number of nodes in the science dataset, which means that the food dataset is very flat.
+
+The Effect of Margin Loss. We modify TEMP to minimize Binary Cross-Entropy Loss (BCELoss). We find that the usage of margin loss is the main reason for the performance of TEMP.
+
+$$
+\begin{array}{l} B C E L o s s = \\ - \frac {1}{n} \sum_ {i = 1} ^ {n} \left[ y _ {i} \log \left(\hat {y} _ {i}\right) + \left(1 - y _ {i}\right) \log \left(1 - \hat {y} _ {i}\right) \right] \tag {3} \\ \end{array}
+$$
+
+The Effect of Definition. We remove the definition from the input of TEMP (No Definition). From the results, one can see that the definitions improve the performance a lot on science and food datasets but not on the environment dataset. The poor quality definitions of the environment dataset may lead to this result. There are more than half of the words that are multi-words without a Wikipedia page in the dataset. Besides, the performance of TEMP without word definitions is also closed to the performance of prior state-of-the-art methods. It proves that BERT captures the hypernym-hyponym relations between terms to a relatively good degree.
+
+The Effect of Encoding Paths. We modify the input of TEMP from taxonomy paths to the rela
+
+tion pairs (No Path). The experiments show that the effect of encoding the taxonomy-paths is more significant on the deeper taxonomies.
+
+# 4.4 Discussions
+
+In this subsection, we discuss the following three factors that affect the effect of the model: (1) pretrained encoders (2) parameter $k$ (3) the number of sibling nodes of test terms.
+
+Effect of Pre-trained Encoder. Figure 4 shows the preformance of TEMP on three datasets based on different pre-trained contextual encoders with the same experiment setup included ALBERT (albert-base-v2; Lan et al. (2019)), RoBERTa (roberta-base; Liu et al. (2019)), BERT (bert-base-uncased), ELECTRA(electra-base-discriminator). The performance of different encoders on different domain datasets shows consistency, and ELECTRA achieves the best performance on all datasets among the experimented contextual encoders. Another observation is that RoBERTa doesn't achieve better performance than BERT like it did on other tasks. The possible reason for it is that the text encoding algorithm used by RoBERTa, Byte-Pair Encoding is weaker in its ability to capture the substring information than WordPiece, the algorithm used by the other three encoders.
+
+Effect of $k$ . $k$ is the parameter in dynamic margin function (equation 2). Figure 5 shows the effect of $k$ on the Science dataset with BERT as the context encoder. As observed, when $0.1 \leq k \leq 1$ , there is little difference in performance among various $k$ . The obtained performance for different $k$ also indicates that TEMP is not sensitive to the parameter $k$ and has the advantage of robustness. We also try to use some larger $k$ , experiments show that when $k > 10$ , the loss doesn't converge.
+
+
+Figure 5: The performance of TEMP-BERT on the science dataset when varying $k$ .
+
+Effect of Sibling Nodes. To evaluate the effect of sibling nodes of test nodes in the self-supervised training data, we do the experiment in which the parent node of each test node retains a constant number of child nodes in the training taxonomy. In the $>5$ experiment, all the parents of test nodes have more than 5 child nodes in training data. Figure 6 shows the experimental results on the science dataset with BERT as the contextual encoder. From the experimental results, we get the following observations and conclusions: (1) As the number of sibling nodes in the training data increases, the performance of TEMP generally increases, which means that the sibling nodes in the test data make the model better learn the hypernym-hyponym relations. (2) When there is no sibling node in the training data, the performance in Acc and MRR is very low. However, compared with the other results with similar performance in Acc and MRR, it gets a higher score in Wu&P. This means that in this case, TEMP doesn't rank the ground-truth high, but the highest-ranked term is similar to the ground-truth in the taxonomy, such as the parent node of the ground-truth.
+
+# 5 Conclusion
+
+We proposed TEMP, a self-supervised method for taxonomy expansion, that relies on the pre-trained contextual encoder as its core. TEMP takes the definition of the query concept and the generated taxonomy-path as input to predict the attachment position. The model is trained by a margin ranking loss with a novel dynamic margin function to better capture the semantic similarity between taxonomy-
+
+
+Figure 6: The performance of TEMP-BERT on the science dataset when varying the number of sibling nodes of test terms.
+
+paths. Experiments on three datasets from different domains show that TEMP outperforms state-of-the-art methods. Further ablation studies show that our key choices in TEMP have an effect on the performance in varying degrees especially the use of margin loss.
+
+For future work, we plan to design sampling methods for TEMP to improve its performance and robustness. We also want to do interpretability studies about the effect of margin loss in model training.
+
+# Acknowledgements
+
+This research is supported by Chinese Scientific and Technical Innovation Project 2030 (No. 2018AAA0102100), National Natural Science Foundation of China (No. 62077031, 61772289, U1936206). We thank the reviewers for their constructive comments.
+
+# References
+
+Ashutosh Adhikari, Achyudh Ram, Raphael Tang, and Jimmy Lin. 2019. Docbert: Bert for document classification. arXiv preprint arXiv:1904.08398.
+Georgeta Bordea, Els Lefever, and Paul Buitelaar. 2016. Semeval-2016 task 13: Taxonomy extraction evaluation (texeval-2). In Proceedings of the 10th international workshop on semantic evaluation (semeval-2016), pages 1081-1091.
+Sarthak Dash, Md Faisal Mahbub Chowdhury, Alfio Gliozzo, Nandana Mihindukulasooriya, and Nicolas Rodolfo Fauceglia. 2020. Hypernym detection using strict partial order networks. In Proceedings of
+
+the AAAI Conference on Artificial Intelligence, volume 34, pages 7626-7633.
+Thomas Demeester, Tim Rocktäschel, and Sebastian Riedel. 2016. Lifted rule injection for relation embeddings. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1389-1399.
+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.
+Yushu Feng, Huan Wang, Haoji Roland Hu, Lu Yu, Wei Wang, and Shiyan Wang. 2020. Triplet distillation for deep face recognition. In 2020 IEEE International Conference on Image Processing (ICIP), pages 808-812. IEEE.
+Ruiji Fu, Jiang Guo, Bing Qin, Wanxiang Che, Haifeng Wang, and Ting Liu. 2014. Learning semantic hierarchies via word embeddings. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1199-1209.
+Amit Gupta, Rémi Lebret, Hamza Harkous, and Karl Aberer. 2017. Taxonomy induction using hypernym subsequences. In Proceedings of the 2017 ACM on Conference on Information and Knowledge Management, pages 1329-1338.
+Marti A Hearst. 1992. Automatic acquisition of hyponyms from large text corpora. In *Coling* 1992 volume 2: The 15th international conference on computational linguistics.
+Wen Hua, Zhongyuan Wang, Haixun Wang, Kai Zheng, and Xiaofang Zhou. 2016. Understand short texts by harvesting and analyzing semantic knowledge. IEEE transactions on Knowledge and data Engineering, 29(3):499-512.
+David Jurgens and Mohammad Taher Pilehvar. 2016. Semeval-2016 task 14: Semantic taxonomy enrichment. In Proceedings of the 10th international workshop on semantic evaluation (SemEval-2016), pages 1092-1102.
+Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2019. Albert: A lite bert for self-supervised learning of language representations. arXiv preprint arXiv:1909.11942.
+Matthew Le, Stephen Roller, Laetitia Papaxanthos, Douwe Kiela, and Maximilian Nickel. 2019. Inferring concept hierarchies from text corpora via hyperbolic embeddings. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3231-3241.
+
+Jiaqing Liang, Yanghua Xiao, Yi Zhang, Seung-won Hwang, and Haixun Wang. 2017a. Graph-based wrong is a relation detection in a large-scale lexical taxonomy. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 31.
+Jiaqing Liang, Yi Zhang, Yanghua Xiao, Haixun Wang, Wei Wang, and Pinpin Zhu. 2017b. On the transitivity of hypernym-hyponym relations in data-driven lexical taxonomies. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 31.
+Ting-En Lin and Hua Xu. 2019. Deep unknown intent detection with margin loss. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5491-5496.
+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.
+Emaad Manzoor, Rui Li, Dhananjay Shrouty, and Jure Leskovec. 2020. Expanding taxonomies with implicit edge semantics. In Proceedings of The Web Conference 2020, pages 2044-2054.
+Yuning Mao, Tong Zhao, Andrey Kan, Chenwei Zhang, Xin Luna Dong, Christos Faloutsos, and Jiawei Han. 2020. Octet: Online catalog taxonomy enrichment with self-supervision. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 2247-2257.
+Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Distributed representations of words and phrases and their compositionality. In Proceedings of the 26th International Conference on Neural Information Processing Systems-Volume 2, pages 3111-3119.
+Ndapandula Nakashole, Gerhard Weikum, and Fabian Suchanek. 2012. Patty: A taxonomy of relational patterns with semantic types. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning, pages 1135-1145.
+Rodrigo Nogueira and Kyunghyun Cho. 2019. Passage re-ranking with bert. arXiv preprint arXiv:1901.04085.
+Alexander Panchenko, Stefano Faralli, Eugen Ruppert, Steffen Remus, Hubert Naets, Cedrick Fairon, Simone Paolo Ponzetto, and Chris Biemann. 2016. TAXI at SemEval-2016 task 13: a taxonomy induction method based on lexico-syntactic patterns, substrings and focused crawling. In Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016), pages 1320-1327, San Diego, California. Association for Computational Linguistics.
+
+Mike Schuster and Kaisuke Nakajima. 2012. Japanese and korean voice search. In 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 5149-5152. IEEE.
+Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1715-1725.
+Chao Shang, Sarthak Dash, Md Faisal Mahbub Chowdhury, Nandana Mihindukulasooriya, and Alfio Gliozzo. 2020. Taxonomy construction of unseen domains via graph-based cross-domain knowledge transfer. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2198-2208.
+Jiaming Shen, Zhihong Shen, Chenyan Xiong, Chi Wang, Kuansan Wang, and Jiawei Han. 2020. Taxoexpan: Self-supervised taxonomy expansion with position-enhanced graph neural network. In Proceedings of The Web Conference 2020, pages 486-497.
+Jiaming Shen, Zeqiu Wu, Dongming Lei, Chao Zhang, Xiang Ren, Michelle T Vanni, Brian M Sadler, and Jiawei Han. 2018. Hiexpan: Task-guided taxonomy construction by hierarchical tree expansion. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 2180-2189.
+Vered Shwartz and Ido Dagan. 2016. CogALex-V shared task: LexNET - integrated path-based and distributional method for the identification of semantic relations. In Proceedings of the 5th Workshop on Cognitive Aspects of the Lexicon (CogALex - V), pages 80-85, Osaka, Japan. The COLING 2016 Organizing Committee.
+Vered Shwartz, Yoav Goldberg, and Ido Dagan. 2016. Improving hypernymy detection with an integrated path-based and distributional method. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2389-2398.
+Chengyu Wang and Xiaofeng He. 2020. Birre: learning bidirectional residual relation embeddings for supervised hypernymy detection. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 3630-3640.
+Zhibiao Wu and Martha Palmer. 1994. Verb semantics and lexical selection. In 32nd Annual Meeting of the Association for Computational Linguistics, pages 133-138.
+Shuo Yang, Lei Zou, Zhongyuan Wang, Jun Yan, and Ji-Rong Wen. 2017. Efficiently answering technical questions—a knowledge graph approach. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 31.
+
+Wei Yang, Yuqing Xie, Aileen Lin, Xingyu Li, Luchen Tan, Kun Xiong, Ming Li, and Jimmy Lin. 2019. End-to-end open-domain question answering with bertserini. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations), pages 72-77.
+Wenpeng Yin and Dan Roth. 2018. Term definitions help hypernymy detection. In Proceedings of the Seventh Joint Conference on Lexical and Computational Semantics, pages 203-213.
+Yue Yu, Yinghao Li, Jiaming Shen, Hao Feng, Jimeng Sun, and Chao Zhang. 2020. Steam: Self-supervised taxonomy expansion with mini-paths. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 1026-1035.
+Zheng Yu, Haixun Wang, Xuemin Lin, and Min Wang. 2015. Learning term embeddings for hypernymy identification. In Twenty-Fourth International Joint Conference on Artificial Intelligence.
+Jieyu Zhang, Xiangchen Song, Ying Zeng, Jiaze Chen, Jiaming Shen, Yuning Mao, and Lei Li. 2021. Taxonomy completion via triplet matching network. In AAAI.
\ No newline at end of file
diff --git a/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/images.zip b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..d158f2c8b582d26ff3c8eb483d15a1022887ad0c
--- /dev/null
+++ b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e159d26fe9446e1bfd0bfd8669c61cc18388d9873288337c528225d567ee6522
+size 355338
diff --git a/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/layout.json b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..1c9f51baab6a4c57794d0c0fe3f9a5cab16e8812
--- /dev/null
+++ b/temptaxonomyexpansionwithdynamicmarginlossthroughtaxonomypaths/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e754cb888e966e04d5e74da0702005bd81ec65ebcd34714edef23fd6d0a0987e
+size 320794
diff --git a/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/84b1db57-a952-46e4-9830-4f209a8f08a2_content_list.json b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/84b1db57-a952-46e4-9830-4f209a8f08a2_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..eb7351f50de92cf35700e30b2f8237b9d1e08945
--- /dev/null
+++ b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/84b1db57-a952-46e4-9830-4f209a8f08a2_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1ada2d9777bdffa9175e8f6fe7139d9e71d5b2ddd088cc35c723dfa3c0539765
+size 85073
diff --git a/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/84b1db57-a952-46e4-9830-4f209a8f08a2_model.json b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/84b1db57-a952-46e4-9830-4f209a8f08a2_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..3c635cc32e1acf5051e66f448c3cd8711173e82e
--- /dev/null
+++ b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/84b1db57-a952-46e4-9830-4f209a8f08a2_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:14077e0308ca91fa3a2af664d1715f734f4cf644f2e421de6d543240cbdb614d
+size 107663
diff --git a/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/84b1db57-a952-46e4-9830-4f209a8f08a2_origin.pdf b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/84b1db57-a952-46e4-9830-4f209a8f08a2_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..5513e26d3e5ea0546d9691421317c97d48934ee5
--- /dev/null
+++ b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/84b1db57-a952-46e4-9830-4f209a8f08a2_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9a1a0b7fa4811f8c5abb726668697d18e84b73fc5bfb280525818ed25b28ca44
+size 1094817
diff --git a/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/full.md b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..55a6a8b8404e887741ae0a46aff6ec4bb96f69ab
--- /dev/null
+++ b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/full.md
@@ -0,0 +1,356 @@
+# Text2Mol: Cross-Modal Molecule Retrieval with Natural Language Queries
+
+Carl Edwards, ChengXiang Zhai, Heng Ji
+
+University of Illinois Urbana-Champaign
+
+{cne2, czhai, hengji}@illinois.edu
+
+# Abstract
+
+We propose a new task, Text2Mol, to retrieve molecules using natural language descriptions as queries. Natural language and molecules encode information in very different ways, which leads to the exciting but challenging problem of integrating these two very different modalities. Although some work has been done on text-based retrieval and structure-based retrieval, this new task requires integrating molecules and natural language more directly. Moreover, this can be viewed as an especially challenging cross-lingual retrieval problem by considering the molecules as a language with a very unique grammar. We construct a paired dataset of molecules and their corresponding text descriptions, which we use to learn an aligned common semantic embedding space for retrieval. We extend this to create a cross-modal attention-based model for explainability and reranking by interpreting the attentions as association rules. We also employ an ensemble approach to integrate our different architectures, which significantly improves results from 0.372 to 0.499 MRR. This new multimodal approach opens a new perspective on solving problems in chemistry literature understanding and molecular machine learning. $^{1}$
+
+# 1 Introduction
+
+Discovering new properties and applications of different molecules is critical for accelerating discovery in medicine and science. Existing databases contain tens of millions of molecules; PubChem (Kim et al., 2016, 2019) alone has 110 million compounds. Many information retrieval (IR) tools for chemistry rely on queries based on natural language descriptions of the molecules and existing chemical reactions. Hundreds of millions of possible molecules cannot all possibly undergo laboratory
+
+Water is an oxygen hydride consisting of an oxygen atom that is covalently bonded to two hydrogen atoms.
+
+1.
+
+
+2.
+
+
+Figure 1: Given a natural language description of water, we want to rank the corresponding molecule $\mathrm{H}_2\mathrm{O}$ first among all the possible molecules.
+
+
+
+experimentation and be given attention by experts in order to create a description. To address this issue, it is critical to retrieve molecules directly from natural language descriptions. This approach allows newly discovered molecules to be easily integrated into the proposed IR framework. Our framework also allows for semantic-level search between natural language descriptions and molecules as well as for query expansion within traditional chemistry information retrieval systems.
+
+Over the past several years, chemists have begun to rely increasingly on computational techniques for cataloging molecules and predicting chemical reactions, products, and properties, such as yield, toxicity, and water solubility (Wu et al., 2018; Glavatskikh et al., 2019; Coley et al., 2017; Ahneman et al., 2018; Fooshee et al., 2018). However, natural language and molecules are very different modalities of data, which makes integrating them together a challenging task. We argue that these two modalities are complementary and should be considered together.
+
+Much current work focuses on images and language (Mogadala et al., 2020), but it is beneficial for the community to consider modalities beyond traditional ones, increasing their work's impact and efficacy. For example, integrating NLP and
+
+1The programs and data are publicly available at github.com/cnedwards/text2mol for research purposes.
+
+| Molecule | An electrically neutral group of atoms bonded together. |
| Compound | Two or more elements held together by chemical bonds. |
| Chemical fingerprint | Represents a molecule or substructure using a bitstring. This allows for efficient substructure search and similarity calculation. |
| Morgan fingerprint | A specific type of chemical fingerprint also known as ECFP. |
| SMILES string | A character-based sequence representation of a molecule.
+(for example, C1=CC=CC=C1 is the SMILES string for benzene) |
| Canonical SMILES | A unique SMILES string for a molecule. |
+
+Table 1: Relevant Terminology
+
+molecules could improve drug discovery and design.
+
+In pursuit of this goal, we propose a multimodal embedding approach for constructing an aligned semantic space between these two types of data to allow for cross-modal retrieval. No previous work has studied this retrieval problem. The closest is (Zhou et al., 2010), which uses a hybrid approach to document retrieval by replacing chemicals in text with canonical keywords in order to standardize different chemical synonyms. However, this does not take the semantic information of the molecule (properties beyond the atoms and graph structure, such as being a pollutant or hydrophobic) into account.
+
+Additionally, incorporating cross-modal attention can lead to insights on the relations between molecule substructures and text keywords. For example, we find that given "pollutant," the model focuses on the substructure F - C. This contributes to higher-level explainability between molecules and their descriptions.
+
+Our molecular encoder is based on the Mol2vec (Jaeger et al., 2018) algorithm, which creates "sentences" of substructure identifiers from molecules; we frame Text2Mol as a new, particularly challenging type of cross-lingual information retrieval (CLIR). This problem is much more challenging than traditional CLIR since the gap between the query and target is much larger. It also provides a useful benchmark for extending CLIR to incorporate multiple data modalities. Molecules are essentially a different language with a uniquely challenging grammar. In fact, several techniques apply models developed for natural language processing to SMILES strings—machine-readable character-based representations for molecules (Weininger, 1988; Weininger et al., 1989).
+
+The major novel contributions of this paper are:
+
+- A new task Text2Mol: Cross-modal Text
+
+Molecule Information Retrieval directly from natural language descriptions to molecules.
+
+- Cross-modal attention-based association rules between molecules and text are used to improve results and for explainability.
+- A new benchmark dataset with 33,010 text-compound pairs for cross-modal text-molecule IR which can be used for cross-lingual, multimodal, and explainable IR.
+
+# 2 Task Definition
+
+To push the boundaries of multimodal models, we present a new IR task: Text2Mol.
+
+Given a text query and list of molecules without any reference textual information (represented, for example, as SMILES strings, graphs, or other equivalent representations) retrieve the molecule corresponding to the query. Figure 1 shows an example of this task. From a text description of a molecule, the model must incorporate the information in the description into a semantic representation which can be used to directly retrieve the molecule.
+
+This requires the integration of two very different types of information: the structured knowledge represented by text and the chemical properties present in molecular graphs. We assume there is only one correct (relevant) molecule for each description, so we consider two measures for this task: Hits@1 and mean reciprocal rank (MRR).
+
+# 3 Related Work
+
+# 3.1 Multimedia Representation
+
+Much recent work in this area has fallen into the category of vision-language models which leverage transformers (Chen et al., 2019; Su et al., 2020; Lu et al., 2019). There are also more fine-grained
+
+multimedia embedding approaches, such as integrating events from images and their descriptions (Li et al., 2020) or multimodal pattern mining (Li et al., 2016). CLIP (Radford et al., 2021) uses natural language to train a zero-shot image classifier which can be easily applied to different datasets. Specifically, their loss function, which follows Sohn (2016), serves as a very efficient version of binary cross-entropy loss by comparing all samples in a mini-batch with each other. To our knowledge, we are the first to apply this technique to molecules and text, and we also extend this loss function to incorporate negative samples to allow for cross-modal attention between the two encoders.
+
+# 3.2 Molecule Representation
+
+One critical problem in the field of molecular machine learning is molecule representation. Fingerprinting methods have long been employed in cheminformatics to featurize molecule structural representations (Cereto-Massague et al., 2015; Sandfort et al., 2020). However, this approach does not allow these representations to be learned from the data. Other representations include techniques such as kernel PCA using Tanimoto similarity (Rensi and Altman, 2017; Mallory et al.). Recent advances in machine learning have begun to be applied to this problem. Jaeger et al. (2018) use the Morgan fingerprinting algorithm to convert each molecule into a 'sentence' of its substructures. A dataset of molecules can be interpreted as a corpus, and Mol2vec then applies Word2vec (Mikolov et al., 2013a,b) to create molecule representations. Additionally, other recent advances such as BERT (Devlin et al., 2019) have been applied to the domain such as MolBERT (Fabian et al., 2020) and ChemBERTa (Chithrananda et al., 2020), which use SMILES strings (Weininger et al., 1989) as inputs to pretrain a BERT-esque model.
+
+# 3.3 Substructure or Description Retrieval
+
+Although the biomedical domain has been more popular than chemistry (Zheng et al., 2014; Li et al., 2019; Li and Ji, 2019; Islamaj Dogan et al., 2019; Zhang et al., 2021; Lai et al., 2021), information retrieval in chemistry has long been studied and is summarized by Krallinger et al. (2017). Most work has focused on only a single modality: text or molecules. Text-based retrieval includes tasks such as finding relevant papers for a chemical or reaction and chemical entity recognition. Much work has also been done in graph and molecule
+
+based retrieval (Hagadone, 1992; Barnard, 1993; Yan et al., 2005; Kratochvil et al., 2018; Qu et al., 2019; Kratochvil, 2019; Goyal et al., 2020). Hybrid approaches have also been attempted; Zhou et al. (2010) replace chemical entities in text with a unique canonical key (thus standardizing synonyms). This also allows them to perform query expansion by including similar molecules from their database. In contrast to this, we perform direct semantic cross-modal retrieval task in our approach, as opposed to just augmenting queries. Work in chemical entity recognition has also incorporated hybrid approaches, mostly as chemical name to structure converters such as ChemSpot (Roktäschel et al., 2013) and OPSIN (Lowe et al., 2011).
+
+# 3.4 Cross-Lingual Retrieval
+
+Cross-lingual information retrieval (CLIR) is a technique to retrieve documents from a target language given a query in a different source language. Two common strategies are either translating the query into the target language or translating the document corpus into the source language (Zhang and Zhao, 2020). Further, work exists combining these approaches using interlingual semantics, such as via bilingual word embeddings (Vulic and Moens, 2015) or word embeddings and a dictionary (Bhattacharya et al., 2016).
+
+Our problem, cross-modal molecule retrieval from text, can be considered as a CLIR task which we approach using an interlingual semantic approach. The model is trained on a parallel corpus of molecules and descriptions.
+
+# 4 Methodology
+
+# 4.1 Model
+
+To accomplish this retrieval task, we need to connect text to molecules. To do so, we build an aligned semantic embedding space. Our approach consists of two distinct submodels: a text encoder and a molecule encoder. Both submodels create an embedding in the aligned space, and cosine similarity is used to rank the embeddings. A description embedding can be compared against a database of existing molecule embeddings, and this process scales easily using an approximate nearest neighbor search algorithm such as (Johnson et al., 2017). For the text encoder, we use SciBERT (Beltagy et al., 2019) and a linear projection to the embedding space followed by layer normalization (Ba
+
+
+Figure 2: Example of Morgan Fingerprinting from (Rogers and Hahn, 2010) for Butyramide. The algorithm updates the identifiers from radius $r = 0$ to $r = 1$ , as shown by the green circles.
+
+et al., 2016). For the molecule encoder, we consider two architectures. First, we use a multi-layer perceptron (MLP) that takes Mol2vec embeddings as input. Second, we integrate a graph convolutional network (GCN) (Kipf and Welling, 2017) into Mol2vec.
+
+Mol2vec (Jaeger et al., 2018) converts molecule graph structures into "sentences" of substructures. These substructures are created using Morgan fingerprinting (Rogers and Hahn, 2010), which is a type of topological fingerprint, which were historically used for quick substructure lookup. Morgan fingerprints incorporate a number of molecular properties based on the Daylight atomic invariants rule (Weininger et al., 1989). Atomic invariants such as the number of connections, number of non-hydrogen bonds, and atomic number are used to create the initial identifier for an atom. By using a circular hashing technique, they are able to create a unique identifier for a molecular substructure of some radius $r$ centered around a central atom, as shown in Figure 2. The algorithm starts with a radius of zero which is iteratively increased until the desired substructure size is obtained. In Mol2vec, these fingerprints are used as tokens for each atom. In this work, we use a default value of $r = 1$ , which gives two tokens for each atom ( $r = 0$ and $r = 1$ ). This set of tokens is canonicalized in the same way as the canonical SMILES representation (Weininger et al., 1989). This list of tokens can be interpreted as a "sentence", and Mol2vec builds a
+
+corpus of such sentences. It then uses the Word2vec skip-gram (Mikolov et al., 2013a,b) algorithm to create "word" embeddings, which it averages together to create molecule representations. We use a two-layer MLP followed by a linear projection and layer normalization to create a trainable representation from the Mol2vec embedding, followed by layer normalization.
+
+While the Morgan fingerprints (substructure tokens) incorporate some implicit graph information, we explicitly introduce the molecule graph structure using a GCN that takes a molecular graph as input with Mol2vec token embeddings as features. For example, rings are very important substructures in molecules. If the description mentions "aromatic ring" or "phenyl group," we want to be able to match this substructure in the molecule. We could potentially do so by increasing the maximum radius of the Morgan fingerprinting algorithm, but then there might not be enough examples of the resulting large-radius tokens to create a good representation given our corpus size. Particularly for large molecules, to capture the global structural information, we might need a very large radius which will create a lot of rare tokens (that get replaced by the UNK token). Instead, we explicitly incorporate the graph structure by using a GCN.
+
+The Mol2vec token features are input to a three-layer GCN to create node representations for each atom in the molecule. These representations are combined using global mean pooling, and passed through two more hidden layers to produce a molecule representation. Since Mol2vec produces multiple tokens based on Morgan fingerprints of different radii, we select the corresponding token with the largest radius.
+
+# 4.2 Cross-Modal Attention Model
+
+To improve the explainability of our approach, we introduce a model with cross-modal attention by modifying the base model to use a transformer decoder (Vaswani et al., 2017). This decoder uses the SciBERT output as a source sequence and the node representations from the Mol2vec GCN model as a target sequence, and the attentions can be used to learn multimodal association rules. The architecture is shown in Figure 3.
+
+# 4.3 Loss
+
+To optimize the models, we base our loss on the symmetric contrastive loss presented by Radford et al. (2021). The loss takes the output embed
+
+
+Figure 3: Model architecture for the cross-modal attention extension and association rules.
+
+dings of both submodels, multiplies by the exponent of a learned temperature parameter, $\tau$ , and then takes the outer product of the mini-batch. The identity matrix $I$ is used as labels. Categorical cross-entropy (CCE) is then applied along both axes, and the two losses are summed. This improves efficiency by allowing all the other samples in a mini-batch to serve as negatives. It corresponds to cosine similarity because the normalized dot product is minimized or maximized, for positives and negatives respectively. For batch embedding $m$ and $t$ of length $n$ ,
+
+$$
+L (m, t) = C C E \left(e ^ {\tau} m t ^ {T}, I _ {n}\right) + C C E \left(e ^ {\tau} t m ^ {T}, I _ {n}\right)
+$$
+
+We find this loss to be ineffective for training the cross-modal attention model because it encourages the model to ignore the textual information—i.e. information can leak from one encoder to the other. To remedy this problem, we modify this loss function to incorporate a matching task by introducing negative samples. We randomly sample new descriptions and replace their respective ones in the diagonal of the identity matrix with zeros, creating a binary classification task—does the description match the molecule? Since the rows with all zeros are no longer probability distributions, we instead use binary cross-entropy loss. This modified loss provides more signal than a pure matching task since it also receives signal from the other negatives, and it enforces the constraint that the model consider both the molecule and text description.
+
+# 4.4 Cross-Modal Reranking
+
+We want to better understand how the base networks work, so we introduce a modified model with cross-modal attention, which we also use to rerank the output of the base models. Given a training set of molecule-text pairs, $P$ , we first train the
+
+cross-modal matching model. We collect the attention weights of the final layer for each of these pairs. Next, the attention weights for molecule token, $m$ , and text token, $t$ , are aggregated to create association rules. We define the support for a rule $r$ from $t$ to $m$ as the sum of all attentions,
+
+$$
+supp(r) = \sum_{p\in P}\sum_{\substack{t^{\prime}\in p_{t}\\ m^{\prime}\in p_{m}}}\mathbb{1}_{\substack{t = t^{\prime}\\ m = m^{\prime}}}a_{t^{\prime},m^{\prime}}
+$$
+
+where $a_{i,j}$ is the attention weight between tokens $i$ and $j$ and $p_t$ and $p_m$ are the multisets of text and molecule tokens in $p$ , respectively.
+
+This produces association rules from every text token $t$ to every molecule token $m$ . We calculate the confidence for each of these rules by taking the support of the rule and dividing by the support of all the rules using $t$ ,
+
+$$
+\operatorname {c o n f} (t \Rightarrow m) = \frac {\operatorname {s u p p} (t , m)}{\sum_ {t ^ {\prime} \in T} \operatorname {s u p p} (t ^ {\prime} , m)}
+$$
+
+where $T$ is the set of all text tokens.
+
+Following this, given a molecule and text pair, we consider all association rules that can produce it, and we take the average of the top $k$ confidence values. For association-rule based reranking, Bharadwaj et al. (2014) takes the average of all confidence values. However, they have a comparatively smaller number of confidence rules. On the other hand, AnyBURL (Meilicke et al., 2019, 2020) finds maximum aggregation to be most effective. It also shows rule-based approaches can be very efficient (Ott et al., 2021). For our approach, we want to consider multiple one-to-one rules because we only use rules from one text token to one molecule token since the computational costs scale significantly due to the combinatorial number of many-to-many rules. By taking an average of only the top confidence values, we incorporate multiple one-to-one rules but ignore unimportant rules. This combines the two approaches to reranking while keeping in mind efficiency. We calculate a score by interpolating between the cosine similarities with association rule-based scores ( $AR$ ) linearly,
+
+$$
+S (a, b) = \alpha \cos (a, b) + (1 - \alpha) A R (a, b)
+$$
+
+where $\alpha \in [0,1]$ is selected on the validation set.
+
+# 4.5 Ensemble Approach
+
+Upon investigation of the baseline models, we found that the correct molecule was very frequently found in the top molecules. However, many of the molecules ranked above the correct molecule did not occur in the top results of the same model trained with different parameter initialization. We found that by taking an average of these rankings, the correct molecule's average rank would stay roughly the same, but the average rank of false positives increases. When these average ranks are used to reorder the results, the order of the incorrect and correct molecule switches. We find this method to be surprisingly effective, and we connect this to committee of neural networks (Drucker et al., 1994) in ensemble learning (Polikar, 2012). Additionally, we draw comparisons to Mixture of Experts-based models (Masoudnia and Ebrahimpour, 2014) such as Fan et al. (2006) and the Switch Transformer which contains 1.6 trillion parameters (Fedus et al., 2021). We compute the score, $S$ , as a weighted average,
+
+$$
+S (m) = \sum_ {i} w _ {i} R _ {i} (m) \qquad s. t. \sum_ {i} w _ {i} = 1
+$$
+
+for some molecule $m$ where $R_{i}$ is the rank assigned to that molecule by model $i$ and $w_{i}$ is the model weight. A lower score is more desirable.
+
+# 5 Experiments
+
+# 5.1 Data and Evaluation
+
+For our task, we create a dataset using PubChem (Kim et al., 2016, 2019) and Chemical Entities of Biological Interest (ChEBI) (Hastings et al., 2016). We collect ChEBI annotations of compounds scraped from PubChem, which consists of 102,980 compound-description pairs. Using this data, we create a dataset consisting of 33,010 pairs, which we call ChEBI-20, that contains descriptions of more than 20 words. We find that longer descriptions tend to be less noisy and more informative. We remove compounds which cannot be processed by RDKit (Landrum, 2021).
+
+We separate these datasets into $80\% / 10\% / 10\%$ train-validation-test splits. The alignment models are trained on the training data, and the results are evaluated by searching all molecules in the dataset. The molecules in the training set are processed by Mol2vec using default parameters: a radius of 1, a
+
+threshold for unknown tokens of 3, an embedding dimension of 300, and a window size of 10.
+
+# 5.2 Results
+
+To train the models, we use Adam optimizer (Kingma and Ba, 2015) and two different learning rates. The SciBERT model uses a finetuning learning rate of 3e-5, as used by Devlin et al. (2019). The rest of the model uses 1e-4 as used by Vaswani et al. (2017). We use a linear annealing rate for the learning rate with 1,000 steps of warmup. We train for 40 epochs with a batch size of 32. We also use a temperature value of 0.07 as suggested by Radford et al. (2021). We use the first 256 text tokens for the text encoder.
+
+# 5.2.1 Baseline Models
+
+The MLP and GCN encoder models both show similar performance. Three results for both are shown in Table 2. We believe the performance similarity between MLP and GCN is because the description is a bottleneck. However, they appear to be effective at different tasks. In the test set, the mean rank is significantly lower for the MLP models than the GCN models; however, the MRR values are fairly similar. This indicates that these two architectures have different strengths. Further, the difference in mean rank is much smaller in the validation set; the validation mean rank is 30.60 and 28.89 for the MLP and GCN ensembles respectively. This indicates that the GCN architecture is more effective for retrieving the most difficult examples in the validation set (since there are not outlier ranks to increase the mean), but the MLP is more effective at difficult examples in the test set. We further examine this in Section 5.4.
+
+# 5.2.2 Ensemble
+
+We find that the ensemble method shows significant performance improvements. The ensemble of the three GCN models increases Test Hits@1 by roughly $8\%$ from the baseline models. It is notable that the hyperparameters for these models are exactly the same, and the models are learning different ways of ranking which are complementary. To combine the different models, we find the heuristic of using uniform weights to be very effective.
+
+A further advantage of the ensemble approach is that it can incorporate different encoder architectures and retrieval schemes, which may have different understandings of how to solve the problem. We find that combining both architectures is
+
+| Training | Test |
| Model | Mean Rank | MRR | Hits@1 | Hits@10 | Mean Rank | MRR | Hits@1 | Hits@10 |
| MLP1 | 9.55 | 0.428 | 26.5% | 77.5% | 30.38 | 0.372 | 22.4% | 68.6% |
| MLP2 | 9.82 | 0.425 | 26.4% | 77.1% | 30.72 | 0.369 | 22.3% | 68.9% |
| MLP3 | 9.53 | 0.431 | 26.9% | 77.8% | 36.30 | 0.372 | 22.3% | 67.9% |
| GCN1 | 10.22 | 0.432 | 27.2% | 76.5% | 42.28 | 0.366 | 21.7% | 68.2% |
| GCN2 | 9.67 | 0.423 | 26.7% | 77.4% | 41.90 | 0.371 | 22.3% | 68.9% |
| GCN3 | 10.12 | 0.420 | 25.8% | 76.7% | 39.11 | 0.366 | 22.3% | 67.9% |
| MLP-Ensemble | 5.81 | 0.520 | 35.1% | 86.4% | 20.78 | 0.452 | 29.4% | 77.6% |
| GCN-Ensemble | 6.09 | 0.516 | 35.0% | 86.1% | 28.77 | 0.447 | 29.4% | 77.1% |
| All-Ensemble | 4.67 | 0.568 | 40.2% | 89.8% | 20.21 | 0.499 | 34.4% | 81.1% |
| MLP1+Attn | | | | | 30.37 | 0.375 | 22.8% | 68.7% |
| MLP1+FPGrowth | | | | | 30.37 | 0.374 | 22.6% | 68.6% |
+
+
+Figure 4: Validation MRR values for different combinations of architectures. The axes indicate the number of each architecture used. Ensembles with both architectures are more effective.
+
+more effective than either alone; this is shown in Figure 4. Ensembles that only incorporate one architecture are consistently outperformed by models that incorporate both. For example, using 3 MLP models has an MRR of 0.442 but using 2 MLP and 1 GCN model has an MRR of 0.449.
+
+# 5.3 Cross-Modal Attention and Reranking
+
+To better understand the behavior of the model, we apply cross-modal attention using a transformer decoder with 3 layers, and we rerank the top 10 of MLP1 using the 10 most confident association rules. We find cross-modal reranking to slightly improve our baseline model and to outperform traditional association rule mining, which can be accomplished by the FPGrowth algorithm (Han and Pei, 2000). Hits@1 for the baseline MLP model is
+
+Table 2: Results. FPGrowth is the frequent pattern growth algorithm (Han and Pei, 2000). Models 1, 2, and 3 only differ in initial parameter initialization.
+
+| Token | Substructure | Supp | Conf |
| Titanium | Ti=O | 1.29 | 0.65 |
| Aluminium | Al3+ | 4.31 | 0.23 |
| Manganese | Mn2+ | 10.08 | 0.30 |
| Toluene | C – C=C | 12.93 | 0.231 |
| Toluene | C7H8 | 23.79 | 0.425 |
| ##chloro | Cl – C | 18.81 | 0.207 |
| pollutant | F – C | 3.097 | 0.208 |
| chromatography | C – Si | 2.976 | 0.271 |
| acid | C – O – H | 2398.7 | 0.078 |
| crown | C – C – O | 4.18 | 0.325 |
+
+Table 3: Examples of interesting learned association rules from token to substructure. $\mathrm{C}_7\mathrm{H}_8$ is the chemical formula of toluene.
+
+increased by about $0.4\%$ , but normal association rules only improve it by $0.2\%$ .
+
+Mining these rules using attention also allows us to understand the connections the model is making. Examples of these rules are shown in Table 3. We primarily examine one-to-one rules; however, these one-to-one rules will often "split" the confidence among themselves. For example, toluene is a ring containing different substructures, so there will be multiple one-to-one rules required to capture the substructure. The rule from toluene to the three common substructure tokens in toluene has an increased confidence and support. Since we average the confidence values of all applicable rules, this is accounted for in reranking.
+
+One interesting phenomenon we find is that the model is very interested in O-H structures (hydroxyl groups). It is also interested in positively charged metal ions in salts. The token "acid" has many different rules; however, the most confident
+
+
+Inositol: Myo-inositol is an inositol having myo-configuration. It has a role as a member of compatible osmolytes, a nutrient, an EC 3.1.4.11 (phosphoinositide phospholipase C) inhibitor, a human metabolite, a Daphnia magna metabolite, [...]
+
+
+
+
+Cannabidiolate is a dihydroxybenzoate that is the conjugate base of cannabidiolic acid, obtained by deprotonation of the carboxy group. It derives from an olivetolate. It is a conjugate base of a cannabidiolic acid.
+Figure 5: Example queries that are predicted correctly by All-Ensemble.
+Figure 6: Example queries that are ranked incorrectly by All-Ensemble.
+
+is a hydroxyl (-OH) group, which matches basic chemical properties of acids. Rules involving rare tokens can result in high confidence values. For example, the rule "crown" implies $\mathrm{C} - \mathrm{C} - \mathrm{O}$ has a confidence of 0.325. This is because the dataset contains two "crown ether" molecules which have multiple occurrences of $\mathrm{C} - \mathrm{C} - \mathrm{O}$ .
+
+# 5.4 Qualitative Analysis
+
+Our technique is capable of retrieving large, complicated molecules as well as small ones. For example, it successfully retrieves both Argyssfrywff $(\mathrm{C_{79}H_{99}N_{19}O_{17}})$ and Inositol $(\mathrm{C_6H_{12}O_6})$ , shown in Figure 5. Argyssfrywff shows that the model is capable of composing molecules from constituent parts mentioned in the description.
+
+The MLP and GCN models capture different aspects of the molecules leading to different rankings. For example, MLP-ensemble ranks an alpha-mycolic acid $(\mathrm{C}_{15}\mathrm{H}_{26}\mathrm{O}_3)$ at 43; GCN-ensemble ranks it 3. The compound contains cyclopropyl
+
+
+Fura red is a 1-benzofuran substituted at position 2 by a (5-oxo-2-thioxoimidazolidin-4-ylidene)methyl group, and at C-5 and C-6 by heavily substituted oxygen and nitrogen functionalities [...]
+Clondronate(2-) is the dianion resulting from the removal of two protons from clondronic acid. It is a conjugate base of a cladronic acid.
+
+
+
+
+An alpha-mycolic acid is a class of mycolic acids characterized by the presence of two cis cyclopropyl groups in the meromycolic chain. It is an organic molecular entity and a mycolic acid. [...]
+
+groups (the triangles), shown in Figure 6, which the GCN captures. On the other hand, Clondronate(2-) $(\mathrm{CH}_2\mathrm{Cl}_2\mathrm{O}_6\mathrm{P}_2^{-2})$ is ranked 4,915 by the GCN but 61 by the MLP, showing large differences exist between the architectures. The models are also mutually beneficial; 2-Methylideneglutaric acid $(\mathrm{C}_6\mathrm{H}_8\mathrm{O}_4)$ is ranked 2nd by MLP and 3rd by GCN, but it is ranked 1st by All-Ensemble. Individual models trained identically (but with different initial parameters) also show this phenomenon. GCN 1, 2, and 3 rank Pierreione C $(\mathrm{C}_{27}\mathrm{H}_{28}\mathrm{O}_6)$ 2nd. GCN1 ranks Aspernidine A 1st, but it is ranked 49 and 64 by GCN 2 and 3, respectively. The average rank of Aspernidine A becomes 38, so GCN-Ensemble ranks Pierreione C 1st.
+
+The model is able to ignore irrelevant description information. For example, MLP achieves rank 1 for Rostratin D $(\mathrm{C_{18}H_{20}N_2O_6S_4})$ , whose description includes the unique and likely unuseful section "isolated from the whole broth of the marine-derived fungus Exserohilum rostratum." Instead, the model successfully identifies it from the following attributes: "bridged compound, a cyclic ketone, a lactam, an organic disulfide, an organic heterohexacyclic compound, a secondary alcohol, a dithiol and a diol."
+
+There are some very challenging queries where multiple molecules are very similar. For example, Pro-Arg and Arg-Pro share the same chemical formula $\mathrm{C_{11}H_{21}N_5O_3}$ . Fura red $(\mathrm{C_{41}H_{44}N_4O_{20}S})$ is the most challenging query for the model; it is ranked at 8,320 by All-Ensemble. Its entire description is based off of 1-benzofuran, but the substitutions are each larger than the original molecule and poorly defined.
+
+# 5.5 Remaining Challenges
+
+One further challenge is integrating external domain knowledge. Many current errors can be eliminated by applying this information, such as assuming "oxide" means the molecule should contain an oxygen. Although our association rule approach learns some of these, external knowledge can provide stronger rules. We observe that descriptions appear to be the limiting factor in this model, which is consistent with the similar performance of the GCN and MLP encoders. Comprehensive techniques for extracting information from external knowledge could lead to significant improvements, which we leave for future work.
+
+# 6 Conclusions and Future Work
+
+In this work, we present Text2Mol: a novel and challenging cross-modal information retrieval task to retrieve molecules using natural language descriptions. To tackle this problem, we apply contrastive representation learning to a BERT-based text encoder and both MLP and GCN-based molecule encoders. We show that these models are complementary and that an ensemble approach combines them very effectively. We also show that the ensemble approach is effective for combining identically trained neural networks (with different parameter initialization), and we consider attention-based association rules. Improved encoder architectures will likely yield improvements, and further investigation of how model architectural choices affect these rules and their interactions for reranking may be interesting as well. In the future, we plan to further improve results by integrating external knowledge as constraints. It should also be noted that this task is possible in the reverse direction, from molecules to descriptions. This has many possible applications, such as finding relevant descriptions for newly discovered molecules.
+
+# Acknowledgements
+
+This research is based upon work supported by the Molecule Maker Lab Institute: An AI Research Institutes program supported by NSF under Award No. 2019897 and NSF No. 2034562. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation therein.
+
+# References
+
+Derek T. Ahneman, Jesus G. Estrada, Shishi Lin, Spencer D. Dreher, and Abigail G. Doyle. 2018. Predicting reaction performance in c–n cross-coupling using machine learning. Science, 360(6385):186-190.
+Jimmy Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. 2016. Layer normalization. arXiv preprint arXiv:1607.06450.
+John M. Barnard. 1993. Substructure searching methods: Old and new. Journal of chemical information and computer sciences, 33(4):532-538.
+Iz Beltagy, Kyle Lo, and Arman Cohan. 2019. SciBERT: A pretrained language model for scientific text. 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 3615-3620, Hong Kong, China. Association for Computational Linguistics.
+Samarth Bharadwaj, Mayank Vatsa, and Richa Singh. 2014. Aiding face recognition with social context association rule based re-ranking. In IEEE International Joint Conference on Biometrics, pages 1-8. IEEE.
+Paheli Bhattacharya, Pawan Goyal, and Sudeshna Sarkar. 2016. Using word embeddings for query translation for Hindi to english cross language information retrieval. Computación y sistemas, 20(3):435-447.
+Adrià Cereto-Massague, María J. Ojeda, Cristina Valls, Miquel Mulero, Santiago Garcia-Vallé, and Gerard Pujadas. 2015. Molecular fingerprint similarity search in virtual screening. Methods, 71:58-63.
+Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. 2019. Uniter: Learning universal image-text representations.
+
+Seyone Chithrananda, Gabe Grand, and Bharath Ramsundar. 2020. Chemberta: Large-scale self-supervised pretraining for molecular property prediction. arXiv preprint arXiv:2010.09885.
+Connor W. Coley, Regina Barzilay, Tommi S. Jaakkola, William H. Green, and Klavs F. Jensen. 2017. Prediction of organic reaction outcomes using machine learning. ACS central science, 3(5):434-443.
+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.
+Harris Drucker, Corinna Cortes, Lawrence D. Jackel, Yann LeCun, and Vladimir Vapnik. 1994. Boosting and other ensemble methods. *Neural Computation*, 6(6):1289-1301.
+Benedek Fabian, Thomas Edlich, Hélène Gaspar, Marwin Segler, Joshua Meyers, Marco Fiscato, and Mohamed Ahmed. 2020. Molecular representation learning with language models and domain-relevant auxiliary tasks. arXiv preprint arXiv:2011.13230.
+Weiguo Fan, Michael Gordon, and Praveen Pathak. 2006. On linear mixture of expert approaches to information retrieval. Decision Support Systems, 42(2):975-987.
+William Fedus, Barret Zoph, and Noam Shazeer. 2021. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. arXiv preprint arXiv:2101.03961.
+David Fooshee, Aaron Mood, Eugene Gutman, Mohammadamin Tavakoli, Gregor Urban, Frances Liu, Nancy Huynh, David Van Vranken, and Pierre Baldi. 2018. Deep learning for chemical reaction prediction. Molecular Systems Design & Engineering, 3(3):442-452.
+Marta Glavatskikh, Jules Leguy, Gilles Hunault, Thomas Cauchy, and Benoit Da Mota. 2019. Dataset's chemical diversity limits the generalizability of machine learning predictions. Journal of Cheminformatics, 11(1):1-15.
+Kunal Goyal, Utkarsh Gupta, Abir De, and Soumen Chakrabarti. 2020. Deep neural matching models for graph retrieval. In Proceedings of the 43rd International ACM SIGIR conference on research and development in Information Retrieval, SIGIR 2020, Virtual Event, China, July 25-30, 2020, pages 1701-1704. ACM.
+Thomas R. Hagadone. 1992. Molecular substructure similarity searching: efficient retrieval in two-dimensional structure databases. Journal of chemical information and computer sciences, 32(5):515-521.
+
+Jiawei Han and Jian Pei. 2000. Mining frequent patterns by pattern-growth: methodology and implications. ACM SIGKDD explorations newsletter, 2(2):14-20.
+Janna Hastings, Gareth Owen, Adriano Dekker, Marcus Ennis, Namrata Kale, Venkatesh Muthukrishnan, Steve Turner, Neil Swainston, Pedro Mendes, and Christoph Steinbeck. 2016. Chebi in 2016: Improved services and an expanding collection of metabolites. *Nucleic acids research*, 44(D1):D1214–D1219.
+Rezarta Islamaj Dogan, Sun Kim, Andrew Chatur-Aryamontri, Chih-Hsuan Wei, Donald C. Comeau, Rui Antunes, Sergio Matos, Qingyu Chen, Aparna Elangovan, Nagesh C. Panyam, et al. 2019. Overview of the biocreative vi precision medicine track: mining protein interactions and mutations for precision medicine. Database, 2019.
+Sabrina Jaeger, Simone Fulle, and Samo Turk. 2018. Mol2vec: unsupervised machine learning approach with chemical intuition. Journal of chemical information and modeling, 58(1):27-35.
+Jeff Johnson, Matthijs Douze, and Hervé Jégou. 2017. Billion-scale similarity search with gpus. arXiv preprint arXiv:1702.08734.
+Sunghwan Kim, Jie Chen, Tiejun Cheng, Asta Gindulyte, Jia He, Siqian He, Qingliang Li, Benjamin A. Shoemaker, Paul A. Thiessen, Bo Yu, et al. 2019. Pubchem 2019 update: improved access to chemical data. *Nucleic acids research*, 47(D1):D1102-D1109.
+Sunghwan Kim, Paul A. Thiessen, Evan E. Bolton, Jie Chen, Gang Fu, Asta Gindulyte, Lianyi Han, Jane He, Siqian He, Benjamin A. Shoemaker, et al. 2016. Pubchem substance and compound databases. *Nucleic acids research*, 44(D1):D1202-D1213.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Thomas N. Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulouse, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net.
+Martin Krallinger, Abdulia Rabal, Analia Lourenco, Julien Oyarzabal, and Alfonso Valencia. 2017. Information retrieval and text mining technologies for chemistry. Chemical reviews, 117(12):7673-7761.
+Miroslav Kratochvil, Jiří Vondrášek, and Jakub Galgonek. 2018. Sachem: a chemical cartridge for high-performance substructure search. Journal of cheminformatics, 10(1):1-11.
+
+Miroslav Kratochvil. 2019. Accelerating structure search in small-molecule databases. Master's thesis.
+Tuan Lai, Heng Ji, ChengXiang Zhai, and Quan H. Tran. 2021. Joint biomedical entity and relation extraction with knowledge-enhanced collective inference. 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 6248-6260, Online. Association for Computational Linguistics.
+Greg Landrum. 2021. Rdkit: Open-source cheminformatics software.
+Diya Li, Lifu Huang, Heng Ji, and Jiawei Han. 2019. Biomedical event extraction based on knowledge-driven tree-LSTM. 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 1421-1430, Minneapolis, Minnesota. Association for Computational Linguistics.
+Diya Li and Heng Ji. 2019. Syntax-aware multi-task graph convolutional networks for biomedical relation extraction. In Proceedings of the Tenth International Workshop on Health Text Mining and Information Analysis (LOUHI 2019), pages 28-33, Hong Kong. Association for Computational Linguistics.
+Hongzhi Li, Joseph G. Ellis, Heng Ji, and Shih-Fu Chang. 2016. Event specific multimodal pattern mining for knowledge base construction. In Proceedings of the 2016 ACM Conference on Multimedia Conference, MM 2016, Amsterdam, The Netherlands, October 15-19, 2016, pages 821-830.
+Manling Li, Alireza Zareian, Qi Zeng, Spencer Whitehead, Di Lu, Heng Ji, and Shih-Fu Chang. 2020. Cross-media structured common space for multimedia event extraction. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2557-2568, Online. Association for Computational Linguistics.
+Daniel M. Lowe, Peter T. Corbett, Peter Murray-Rust, and Robert C. Glen. 2011. Chemical name to structure: Opsin, an open source solution. Journal of Chemical Information and Modeling, 51(3):739-753. PMID: 21384929.
+Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. 2019. Vilbert: Pretraining task-agnostic visi-olinguistic representations for vision-and-language tasks. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 13-23.
+Emily K. Mallory, Ambika Acharya, Stefano E. Rensi, Peter J. Turnbaugh, Roselie A. Bright, and Russ B.
+
+Altman. Chemical reaction vector embeddings: towards predicting drug metabolism in the human gut microbiome. In Biocomputing 2018, pages 56-67.
+Saeed Masoudnia and Reza Ebrahimpour. 2014. Mixture of experts: a literature survey. Artificial Intelligence Review, 42(2):275-293.
+Christian Meilicke, Melisachew W. Chekol, Manuel Fink, and Heiner Stuckenschmidt. 2020. Reinforced anytime bottom up rule learning for knowledge graph completion. arXiv preprint arXiv:2004.04412.
+Christian Meilicke, Melisachew W. Chekol, Daniel Ruffinelli, and Heiner Stuckenschmidt. 2019. Anytime bottom-up rule learning for knowledge graph completion. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, pages 3137-3143. ijcai.org.
+Tomás Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013a. Efficient estimation of word representations in vector space. In 1st International Conference on Learning Representations, ICLR 2013, Scottsdale, Arizona, USA, May 2-4, 2013, Workshop Track Proceedings.
+Tomás Mikolov, Ilya Sutskever, Kai Chen, Gregory S. Corrado, and Jeffrey Dean. 2013b. Distributed representations of words and phrases and their compositionality. In Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013. Proceedings of a meeting held December 5-8, 2013, Lake Tahoe, Nevada, United States, pages 3111-3119.
+Aditya Mogadala, Marimuthu Kalimuthu, and Dietrich Klakow. 2020. Trends in integration of vision and language research: A survey of tasks, datasets, and methods. arXiv preprint arXiv:1907.09358.
+Simon Ott, Christian Meilicke, and Matthias Samwald. 2021. SAFRAN: An interpretable, rule-based link prediction method outperforming embedding models. In 3rd Conference on Automated Knowledge Base Construction.
+Robi Polikar. 2012. Ensemble learning. In Ensemble machine learning, pages 1-34. Springer.
+Jingwei Qu, Penghui Sun, Xin Li, Bei Wang, Xiaqing Lu, Zhi Tang, and Chengcui Zhang. 2019. A retrieval system of medicine molecules based on graph similarity. IEEE MultiMedia, 26(4):17-27.
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. 2021. Learning transferable visual models from natural language supervision. In Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of
+
+Proceedings of Machine Learning Research, pages 8748-8763. PMLR.
+Stefano Rensi and Russ B. Altman. 2017. Flexible analog search with kernel pca embedded molecule vectors. Computational and structural biotechnology journal, 15:320-327.
+Tim Rocktäschel, Torsten Huber, Michael Weidlich, and Ulf Leser. 2013. WBI-NER: The impact of domain-specific features on the performance of identifying and classifying mentions of drugs. In Second Joint Conference on Lexical and Computational Semantics (*SEM), Volume 2: Proceedings of the Seventh International Workshop on Semantic Evaluation (SemEval 2013), pages 356-363, Atlanta, Georgia, USA. Association for Computational Linguistics.
+David Rogers and Mathew Hahn. 2010. Extended-connectivity fingerprints. Journal of chemical information and modeling, 50(5):742-754.
+Frederik Sandfort, Felix Strieth-Kalthoff, Marius Kühnemund, Christian Beecks, and Frank Glorius. 2020. A structure-based platform for predicting chemical reactivity. Chem, 6(6):1379-1390.
+Kihyuk Sohn. 2016. Improved deep metric learning with multi-class n-pair loss objective. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 1849-1857.
+Weijie Su, Xizhou Zhu, Yue Cao, Bin Li, Lewei Lu, Furu Wei, and Jifeng Dai. 2020. VL-BERT: pretraining of generic visual-linguistic representations. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
+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.
+Ivan Vulic and Marie-Francine Moens. 2015. Monolingual and cross-lingual information retrieval models based on (bilingual) word embeddings. In Proceedings of the 38th International ACM SIGIR Conference on Research and Development in Information Retrieval, Santiago, Chile, August 9-13, 2015, pages 363-372. ACM.
+David Weininger. 1988. Smiles, a chemical language and information system. 1. introduction to methodology and encoding rules. Journal of chemical information and computer sciences, 28(1):31-36.
+David Weininger, Arthur Weininger, and Joseph L. Weininger. 1989. Smiles. 2. algorithm for generation of unique smiles notation. Journal of chemical information and computer sciences, 29(2):97-101.
+
+Zhenqin Wu, Bharath Ramsundar, Evan N. Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S. Pappu, Karl Leswing, and Vijay Pande. 2018. Molecularnet: a benchmark for molecular machine learning. Chemical science, 9(2):513-530.
+Xifeng Yan, Philip S. Yu, and Jiawei Han. 2005. Substructure similarity search in graph databases. In Proceedings of the 2005 ACM SIGMOD international conference on Management of data, pages 766-777.
+Liang Zhang and Xiaobing Zhao. 2020. An overview of cross-language information retrieval. In International Conference on Artificial Intelligence and Security, pages 26-37. Springer.
+Zixuan Zhang, Nikolaus Parulian, Heng Ji, Ahmed Elsayed, Skatje Myers, and Martha Palmer. 2021. Fine-grained information extraction from biomedical literature based on knowledge-enriched Abstract Meaning Representation. 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 6261-6270, Online. Association for Computational Linguistics.
+Jin Guang Zheng, Daniel Howsmon, Boliang Zhang, Juergen Hahn, Deborah McGuinness, James Hendler, and Heng Ji. 2014. Entity linking for biomedical literature. In *BMC Medical Informatics and Decision Making*.
+Yingyao Zhou, Bin Zhou, Shumei Jiang, and Frederick J. King. 2010. Chemical-text hybrid search engines. Journal of chemical information and modeling, 50(1):47-54.
+
+
+A Supporting Figures
+Figure 7: This figure shows the ensemble validation MRR from different weighted averages of the three GCN models. GCN3_weight = 1 - GCN1_weight - GCN2_weight. The MRR is clearly lower in the corners, where only rankings from one model are used because the others have zero weight. This figure illustrates that using uniform weights is an effective heuristic.
+
+# B Reproducibility
+
+The MLP and GCN models were each run three times. The GCN and MLP use 600 hidden units. The mol2vec input and the model outputs are 300-dimensional. GCN uses the substructure representations with the largest radius. MLP contains 110,871,865 parameters. GCN contains 111,953,665 parameters. The cross-modal attention model contains 128,978,441 parameters and attends the first 512 molecule substructures. It achieves about $97\%$ classification accuracy for the matching task from the negative samples. The number of one-to-one association rules with confidence greater than 0.1 and support greater than 2 is 1,835. The MLP and GCN take approximately 7 hours on a NVIDIA V100 and the cross-modal attention model takes approximately 9 hours. We find that early stopping is not useful and that layer normalization increases training speed. The value of $\alpha$ for reranking was selected by grid search for high validation MRR. For the metrics, given a list of rankings $R$ ,
+
+$$
+\begin{array}{l} M e a n R a n k = \frac {1}{n} \sum_ {i = 1} ^ {n} R _ {i} \\ M R R = \frac {1}{n} \sum_ {i = 1} ^ {n} \frac {1}{R _ {i}} \\ \end{array}
+$$
+
+Validation
+
+| Model | Mean Rank | MRR | Hits@ 1 | Hits@10 |
| MLP1 | 43.66 | 0.374 | 22.5% | 68.8% |
| MLP2 | 47.42 | 0.360 | 22.1% | 68.9% |
| MLP3 | 41.15 | 0.376 | 21.2% | 68.2% |
| GCN1 | 41.78 | 0.367 | 22.2% | 68.4% |
| GCN2 | 41.23 | 0.367 | 22.1% | 68.9% |
| GCN3 | 42.19 | 0.360 | 21.2% | 68.2% |
| MLP-Ensemble | 30.60 | 0.442 | 28.7% | 76.5% |
| GCN-Ensemble | 28.89 | 0.435 | 27.7% | 76.6% |
| All-Ensemble | 24.95 | 0.479 | 31.7% | 80.2% |
+
+Table 4: Reproducibility results for the validation set.
+
+$$
+\text {H i t s} @ m = \frac {1}{n} \sum_ {i = 1} ^ {n} \mathbb {1} _ {R _ {i} \leq m}
+$$
\ No newline at end of file
diff --git a/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/images.zip b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..226c41d8a9154b00b403e9333d59619c0b224f77
--- /dev/null
+++ b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3315574edc3e3d1de82d79f828778a6292d47b254e66145fb8dcb894d2f92a76
+size 496810
diff --git a/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/layout.json b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..376cb2e195c4f1e65eb77edb26e7d7961b1cbf7d
--- /dev/null
+++ b/text2molcrossmodalmoleculeretrievalwithnaturallanguagequeries/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:59b8dbaf3a44681ee0f4b51c083fa4095a27dc999a497e7f624f9fedbbfd3552
+size 396905
diff --git a/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/64916dec-2a89-41be-a4d6-c317e6836386_content_list.json b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/64916dec-2a89-41be-a4d6-c317e6836386_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..e8aa52c2e8f93fe2a54b5e1c815b62b59e9aaac0
--- /dev/null
+++ b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/64916dec-2a89-41be-a4d6-c317e6836386_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:46fcdb01b117028003e55b953ebdfa6a2bc1d0a63525bf640d2ebf5897da9e01
+size 106063
diff --git a/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/64916dec-2a89-41be-a4d6-c317e6836386_model.json b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/64916dec-2a89-41be-a4d6-c317e6836386_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..4de303e4e652f058427d87334a05945d3dd41f96
--- /dev/null
+++ b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/64916dec-2a89-41be-a4d6-c317e6836386_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1d5c44e944bbf88566ad2cc1f0c67b6e888ab371e676aa7e3305009b032cc2ff
+size 124936
diff --git a/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/64916dec-2a89-41be-a4d6-c317e6836386_origin.pdf b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/64916dec-2a89-41be-a4d6-c317e6836386_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..82d9a9c5c4491d256d4b814b2a5c77a3738c9cde
--- /dev/null
+++ b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/64916dec-2a89-41be-a4d6-c317e6836386_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dfa72c295537386263674a424465105cfc9efa1fe0f53188d52bfd48d4126d96
+size 720077
diff --git a/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/full.md b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..dd2ec4588a1f9bb319fab30526f6f1de972bfd53
--- /dev/null
+++ b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/full.md
@@ -0,0 +1,420 @@
+# Text AutoAugment: Learning Compositional Augmentation Policy for Text Classification
+
+Shuhuai Ren $^{1}$ , Jinchao Zhang $^{3}$ , Lei Li $^{1}$ , Xu Sun $^{1,2}$ , Jie Zhou $^{3}$
+
+1MOE Key Lab of Computational Linguistics, School of EECS, Peking University
+
+$^{2}$ Center for Data Science, Peking University
+
+$^{3}$ Pattern Recognition Center, WeChat AI, Tencent Inc, China
+
+{shuhuai_ren, lilei}@stu.pku.edu.cn, xusun@pku.edu.cn
+
+{dayerzhang, jiezhou}@tencent.com
+
+# Abstract
+
+Data augmentation aims to enrich training samples for alleviating the overfitting issue in low-resource or class-imbalanced situations. Traditional methods first devise task-specific operations such as Synonym Substitute, then preset the corresponding parameters such as the substitution rate artificially, which require a lot of prior knowledge and are prone to fall into the sub-optimum. Besides, the number of editing operations is limited in the previous methods, which decreases the diversity of the augmented data and thus restricts the performance gain. To overcome the above limitations, we propose a framework named Text AutoAugment (TAA) to establish a compositional and learnable paradigm for data augmentation. We regard a combination of various operations as an augmentation policy and utilize an efficient Bayesian Optimization algorithm to automatically search for the best policy, which substantially improves the generalization capability of models. Experiments on six benchmark datasets show that TAA boosts classification accuracy in low-resource and class-imbalanced regimes by an average of $8.8\%$ and $9.7\%$ , respectively, outperforming strong baselines. $^{1}$
+
+# 1 Introduction
+
+Model performance on Natural Language Processing (NLP) tasks, such as text classification, often heavily depends on the size and the quality of the training data. However, it is time-consuming and labor-intensive to obtain sufficient training instances, and models face low-resource regimes most of the time. Data augmentation (Simard et al., 1996; Szegedy et al., 2015; Wei and Zou, 2019) aims to enlarge the training dataset by synthesizing additional distinct and label-invariant instances based on raw instances to improve the model per
+
+
+Figure 1: Test accuracy on IMDB dataset with different editing operations and parameters for data augmentation. The operations and parameters without elaborate selection lead to a degrade of performance.
+
+formance. Data augmentation approaches demonstrate their superiority in many scenarios, especially when data resources are insufficient (Hu et al., 2019b; Anaby-Tavor et al., 2020; Chen et al., 2021) and class-imbalanced (Ren et al., 2018; Hu et al., 2019b).
+
+Previous data augmentation methods can be roughly divided into two categories: generation-based (Sennrich et al., 2016; Imamura et al., 2018; Kobayashi, 2018; Anaby-Tavor et al., 2020; Quteineh et al., 2020) and editing-based methods (Wei and Zou, 2019; Xie et al., 2020). Generation-based methods utilize conditional generation models (Sutskever et al., 2014; Ott et al., 2019) to synthesize the paraphrases (Kumar et al., 2019; Hu et al., 2019a) of the original sentences, which have advantages in instance fluency and label preservation but suffer from the heavy cost of model pre-training and decoding. Editing-based methods instead apply label-invariant sentence editing operations (swap, delete, etc.) on the raw instance, which are simpler and more efficient in practice. However, the editing-based methods are
+
+
+Figure 2: The structure and usage of augmentation policy $\mathcal{P}$ . A policy $\mathcal{P}$ consists of $N$ atomic editing operations $\mathcal{O} = \langle t, p, \lambda \rangle$ . Given a text, we randomly pick $N^*$ operations from $\mathcal{P}$ then apply the operations sequentially. In this case, $N = 4$ and $N^* = 2$ . Red operation $\mathcal{O}$ indicates it is finally applied to the text according to probability $p$ . The modification to the original text caused by it is also showed in Red. We use RS (Random Swap), RD (Random Delete), TI (TF-IDF Insert), TS (TF-IDF Substitute) for abbreviation. Best viewed in color.
+
+sensitive to the preset hyper-parameters including the type of the applied operations and the proportion of words to be edited. As shown in Figure 1, we probe the classification accuracy on IMDB dataset (Maas et al., 2011) with different editing operations and magnitudes (proportion of edited words). We find that inappropriate hyper-parameter settings, e.g. TF-IDF Substitute (Xie et al., 2020) with a magnitude larger than 0.4, lead to inferior results. Therefore, heuristic hyper-parameter setting is prone to fall into the sub-optimum and lacks effectiveness. Besides, most of the editing-based methods (Kobayashi, 2018; Hu et al., 2019b; Sennrich et al., 2016; Imamura et al., 2018; Andreas, 2020) only apply a single operation on the sentence once a time, which restrict the diversity of the augmented dataset and thus limit the performance gain.
+
+To overcome the limitations above, we propose a framework named Text AutoAugment (TAA) to establish a learnable and compositional paradigm for the data augmentation. Our goal is to automatically learn the optimal editing-based data augmentation policy for obtaining a higher quality augmented dataset and thus enhancing the target text classification model. We design an augmentation policy as a set of various editing operations: policy $= \{\mathrm{op}_1,\dots ,\mathrm{op}_N\}$ and each operation is defined with a parameter triplet: $\mathrm{op} = \langle \mathrm{type}t$ , probability $p$ , magnitude $\lambda \rangle$ . Such a compositional structure allows more than one operation to be applied to the original sentence and can improve the diversity of the synthetic instances. In conclusion, a policy solution consists of two kinds of knowledge to learn: the operation set and the editing parameters for each operation. To search the optimal policy, we propose a novel objective function and utilize the sequential Model-based
+
+Global Optimization (SMBO) (Bergstra et al., 2011), an efficient and widely used method in AutoML (Yao et al., 2018), to learn the optimal configuration of the compositional policy.
+
+Given a target dataset, our algorithm learns an augmentation policy automatically and adaptively. The implementation based on distributed learning frameworks can efficiently obtain promising results in several GPU hours. To summarize, our contribution is two-fold:
+
+- We present a learnable and compositional framework for data augmentation. Our proposed algorithm automatically searches for the optimal compositional policy, which improves the diversity and quality of augmented samples.
+- In low-resource and class-imbalanced regimes of six benchmark datasets, TAA significantly improves the generalization ability of deep neural networks like BERT and effectively boosts text classification performance.
+
+# 2 Text AutoAugment
+
+In this section, we introduce the Text AutoAugment framework to search for the optimal augmentation policy automatically. Our augmentation policy is composed of various operations and forms a hierarchical structure, which is first detailed in Section 2.1. Then we give an overview of the proposed learnable augmentation method and establish a global objective function for it (Section 2.2). The specific policy optimization algorithm is presented at last (Section 2.3).
+
+# 2.1 Compositional Augmentation Policy
+
+To generate a much broader set of augmentations, we introduce a compositional policy instead of a single operation. Figure 2 shows the structure and usage of the policy $\mathcal{P}$ . Specifically, our policy is a set of $N$ various editing operations:
+
+$$
+\mathcal {P} = \{\mathcal {O} _ {1}, \dots , \mathcal {O} _ {i}, \dots , \mathcal {O} _ {N} \}
+$$
+
+The operation $\mathcal{O}$ is an atomic component and is responsible for applying an editing transformation on a text $x$ to synthesize an augmented instance $x_{\mathrm{aug}}$ . Each operation $\mathcal{O}_i$ is defined as a triplet:
+
+$$
+\mathcal {O} _ {i} = \langle t _ {i}, p _ {i}, \lambda_ {i} \rangle
+$$
+
+with three parameters: (1) Type $t \in \{\text{Random Swap, Random Delete, TF-IDF Insert, TF-IDF Substitute, WordNet Substitute}\}$ .2 (2) Probability $p \in [0,1]$ of being applied. (3) Magnitude $\lambda \in [0,0.5]$ which determines the proportion of the words to be edited.
+
+The augmented text after an operation can be formulated as:
+
+$$
+\mathcal {O} _ {i} \left(x; \langle t _ {i}, p _ {i}, \lambda_ {i} \rangle\right) = \left\{ \begin{array}{l l} \mathcal {O} _ {i} \left(x; \langle t _ {i}, \lambda_ {i} \rangle\right) & \text {w i t h} p _ {i} \\ x & \text {w i t h} 1 - p _ {i} \end{array} \right. \tag {1}
+$$
+
+It means that for a given text $x$ , it has probability $p_i$ to be applied with the operation $\mathcal{O}_i$ for synthesizing the transformed text $x_{\mathrm{aug}} = \mathcal{O}_i(x; \langle t_i, \lambda_i \rangle)$ under the magnitude $\lambda_i$ , while has probability $1 - p_i$ to remain identical, i.e., $x_{\mathrm{aug}} = x$ .
+
+To further increase the diversity of augmented data and enlarge the support of the training distribution, our policy applies more than one operation to the original sentence in a recursive way. Specifically, we randomly sample $N^{*}$ editing operations from the policy $\mathcal{P}$ and apply them to a given text consecutively. The $N^{*}$ atomic operations can be combined as a compositional operation with the recursive depth equals $N^{*}$ . For example, when $N^{*} = 2$ and the sampled operations are $[\mathcal{O}_i, \mathcal{O}_j]$ , the final augmented instance can be denoted as:
+
+$$
+x _ {\mathrm {a u g}} = \mathcal {O} _ {j} \left(\mathcal {O} _ {i} \left(x; \langle t _ {i}, p _ {i}, \lambda_ {i} \rangle\right); \langle t _ {j}, p _ {j}, \lambda_ {j} \rangle\right).
+$$
+
+In other words, one policy can synthesize up to $A_{N}^{N^{*}} \times 2^{N^{*}}$ augmented instances, where $A$ denotes a permutation. Note that our policy is determined by only $N \times 3$ parameters, which does NOT cause
+
+the problem of search space explosion. As discussed before, the setting of these parameters in a policy has a great impact on the quality of augmented data and the model performance, which motivates us to devise a learnable framework for automatically selecting the optimal parameters instead of a naive grid search or cumbersome manual tuning.
+
+# 2.2 Learnable Data Augmentation Policy
+
+In this subsection, we first review the data augmentation and model training with the traditional objective function. We then propose a new objective function to learn the optimal policy for obtaining a augmented dataset with higher quality and improving the model performance.
+
+Given an input space $\mathcal{X}$ and output space $\mathcal{Y}$ of the text classification task, a model $f$ is responsible for learning a mapping from input texts $x\in \mathcal{X}$ to target labels $y\in \mathcal{Y}$ . In some scenarios, the training set $\mathcal{D}_{\mathrm{train}}$ is extremely small or imbalanced, which leads to a large generalization error on the test set. Therefore, data augmentation is incorporated as an implicit regularizer (Hernandez-Garcia and Konig, 2018) to help models learn better patterns (Simard et al., 1996) and further improve the generalization ability. Let $\mathcal{D}_{\mathrm{aug}}(\mathcal{P})$ be the augmented dataset containing both training set and the synthetic data generated by the policy $\mathcal{P}$ , the loss function $\mathcal{L}$ of model training on the augmented dataset can be formulated as a sum of instance-level loss $l$ such as cross-entropy:
+
+$$
+\mathcal {L} = \sum_ {(x, y) \in \mathcal {D} _ {\mathrm {a u g}} (\mathcal {P})} l (f (x), y). \tag {2}
+$$
+
+In traditional methods, the parameters of data augmentation are preset before training then tuned on the validation set $\mathcal{D}_{\mathrm{val}}$ , which is similar to the paradigm of hyper-parameters tuning. For this reason, we cast the problem of augmentation policy optimization as the Combined Algorithm Selection and Hyper-parameter (CASH) optimization problem (Thornton et al., 2013; Feurer et al., 2019) in AutoML (Yao et al., 2018). Formally, let $\mathbb{F}$ and $\mathbb{P}$ be the search space of models and policies, respectively. Each model $f$ is trained on $\mathcal{D}_{\mathrm{aug}}(\mathcal{P})$ augmented by the policy $\mathcal{P}$ . We propose a novel metric to measure the loss of a policy and a model:
+
+$$
+\mathcal {J} := \mathcal {J} (f, \mathcal {D} _ {\text {a u g}} (\mathcal {P}), \mathcal {D} _ {\text {v a l}}) \tag {3}
+$$
+
+Here, $\mathcal{J}\left(f,\mathcal{D}_{\mathrm{aug}}(\mathcal{P}),\mathcal{D}_{\mathrm{val}}\right)$ denotes the loss that the model $f$ achieves on the validation set $\mathcal{D}_{\mathrm{val}}$
+
+
+Figure 3: The overview of the optimization procedure in the Text AutoAugment algorithm. In each iteration, the optimizer samples a policy and trains a corresponding model on the augmented training set. After that, the loss on the validation set is calculated to update the policy optimizer then execute the next iteration.
+
+after trained on the augmented set $\mathcal{D}_{\mathrm{aug}}(\mathcal{P})$ . It quantifies the generalization ability of the model after augmentation thus reflects the quality of the augmented data. Consequently, the objective function of our policy optimization can be written as
+
+$$
+f ^ {*}, \mathcal {P} ^ {*} = \underset { \begin{array}{c} f \in \mathbb {F} \\ \mathcal {P} \in \mathbb {P} \end{array} } {\arg \min } \mathcal {J} (f, \mathcal {D} _ {\text {a u g}} (\mathcal {P}), \mathcal {D} _ {\text {v a l}}). \tag {4}
+$$
+
+Through minimizing the validation loss of the model, we can find the optimal configuration of the policy $\mathcal{P}$ and improve the quality of the augmented data.
+
+# 2.3 Augmentation Policy Optimization
+
+Like the optimization of hyper-parameters of a deep learning model, our objective function for policy optimization depends on the validation loss, which can not be solved by gradient-based methods such as back-propagation. To tackle this problem, we introduce Sequential Model-based Global Optimization (SMBO) (Bergstra et al., 2011), a kind of Bayesian optimizer widely used in AutoML, to our TAA framework. Our optimization procedure is illustrated in Figure 3. In a nutshell, the SMBO optimizer builds a probability model of the objective function as a surrogate and uses it to samples the most promising policy, then evaluates the policy in the true objective function. In practice, we use Tree-structured Parzen Estimator (TPE) (Bergstra et al., 2011) as a surrogate agent $M$ to model the function between the policy and the objective loss in Eq. 7.
+
+# Algorithm 1: TAA Algorithm
+
+Input: Number of iterations $T$
+Input: Training set $D_{\mathrm{train}}$
+Input: Validation set $D_{\mathrm{val}}$ $\mathcal{H} \gets \emptyset$ // Initialize history
+for $i = 1$ to $T$ do
+ $\mathcal{P}_i \gets \arg \max_{\mathcal{P}} \operatorname{EI}(\mathcal{P})$ // Eq. 8
+Train $f_i$ // Eq. 2
+Evaluate $\mathcal{I}_i$ // Eq. 7
+ $\mathcal{H} \gets \mathcal{H} \cup (f_i, \mathcal{P}_i, \mathcal{I}_i)$
+Update surrogate model $M$ to fit $\mathcal{H}$
+end
+ $f^*, \mathcal{P}^* = \arg \min_{\substack{f \in \mathcal{H} \\ \mathcal{P} \in \mathcal{H}}} \mathcal{I}$ // Eq. 4
+return $f^*$ and $\mathcal{P}^*$
+
+This process is carried out in an iterative manner. At each iteration, the SMBO optimizer samples an augmentation policy $\mathcal{P}_i$ to synthesize the augmented set $\mathcal{D}_{\mathrm{aug}}(\mathcal{P}_i)$ , and then trains a model $f_i$ based on it. The loss $\mathcal{I}_i$ of the policy $\mathcal{P}_i$ is then evaluated by Eq. 7 and merged into the observation history $\mathcal{H}$ to help update the surrogate model.
+
+The specific updating procedure of TPE is introduced in Appendix B. After that, we employ the following Expected Improvement (EI) criterion as an acquisition function to sample the next promising policy:
+
+$$
+\operatorname {E I} (\mathcal {P}) = \mathbb {E} \left[ \max \left(\mathcal {J} ^ {\dagger} - \mathcal {J}, 0\right) \right] \tag {5}
+$$
+
+Here, $\mathcal{I}^{\dagger}$ is a threshold calculated by the observation history and the surrogate model. Eq. 8 is the expectation under the surrogate model that the loss $\mathcal{I}$ of a policy will exceed (negatively) the threshold $\mathcal{I}^{\dagger}$ . Note that our target is to find the policy that minimizes the loss $\mathcal{I}$ , the policy that maximizes the expected improvement will be chosen in the next iteration. The TAA framework is summarized in Algorithm 1. $^3$
+
+# 3 Experiments
+
+# 3.1 Benchmark Datasets
+
+We conduct experiments on six benchmark datasets, including IMDB (Maas et al., 2011), SST-2, SST-5 (Socher et al., 2013), TREC (Li and Roth, 2002), YELP-2 and YELP-5 (Zhang et al., 2015). The statistics of the datasets are listed in Appendix C.
+
+# 3.2 Baselines
+
+We compare our TAA method with the following representative baselines:
+
+Back Translation (BT) (Sennrich et al., 2016; Imamura et al., 2018). We utilize WMT'19 English-German translation models (Ng et al., 2019) based on Transformer (Vaswani et al., 2017) to translate the text from English to German, and then translate it back to English. We use random sampling for decoding as recommended by (Xie et al., 2020; Edunov et al., 2018), and set the temperature to 0.8 to generate more diverse paraphrases.
+
+Contextual Word Substitute (CWS) (Kobayashi, 2018). CWS masks some words in the original text stochastically, then predicts new words for substitution using a label-conditional language model (LM). The proportion $\alpha$ of words to be masked and predicted is 0.15.
+
+Easy Data Augmentation (EDA) (Wei and Zou, 2019). Given a text from the training set, EDA randomly applies one of four simple editing operations including Synonym Replacement, Random Insertion, Random Swap, and Random Deletion. We set the proportion of words to be edited to 0.05 according to the recommendations in the paper.
+
+Learning Data Manipulation (LDM) (Hu et al., 2019b). LDM is also a learnable data augmentation method, but uses only one operation: aforementioned CWS. LDM establishes a reinforcement learning system to iteratively optimize the parameters of the task model and label-conditional LM.
+
+The main characteristics of the baselines are summarized in Table 1.
+
+# 3.3 Experimental Settings
+
+We choose large-scale pre-trained BERT (base, uncased version) (Devlin et al., 2019) as the backbone model. We adopt the Adam optimizer (Kingma and Ba, 2015) and a linear warmup scheduler with an initial learning rate of 4e-5. The training epoch is 20 for TREC and 10 for the reset datasets. We pick the best checkpoint according to the validation loss. Note that the validation loss is also the criterion for policy optimization, so we split out two validation sets with the same size during the phase of policy optimization. One is used for evaluating the model checkpoints, and the other is for evaluating the sampled policy. All experiments are conducted with 8 Tesla P40 GPUs. Following previous works (Hu et al., 2019b; Xie et al., 2020; Wei and Zou, 2019),
+
+| Baselines | Learnable | Compositional | Op. Level |
| BT | X | X | Sentence |
| CWS | X | X | Word |
| EDA | X | ✓ | Word |
| LDM | ✓ | X | Word |
| TAA (Ours) | ✓ | ✓ | Word |
+
+Table 1: Comparison of baselines.
+
+we verify the performance of all data augmentation baselines in two special data scenarios:
+
+Low-resource Regime. For every dataset in Section 3.1, we constrain the amount of available labeled data by sub-sampling a smaller training and validation set. In order to maintain the distribution of the original dataset, we apply Stratified ShuffleSplit (Esfahani and Dougherty, 2014) to split the training and validation set. The final datasets IMDB, SST-5, TREC, YELP-2, and YELP-5 have 80, 200, 120, 80, 200 labeled training samples, respectively, which pose significant challenges for learning a well-performing classifier. The number of validation samples is 60, 150, 60, 60, 150, respectively. In low-resource regime, we introduce a parameter $n_{\mathrm{aug}}$ , representing the magnification of augmentation. For example, $n_{\mathrm{aug}} = 16$ means that we synthesize 16 samples for each given sample.
+
+Class-imbalanced Regime. For binary sentiment classification datasets IMDB and SST-2, we subsample the training samples from an imbalanced class distribution. After sub-sampling, the negative class of the training set has 1000 samples, while the positive class has only 20/50/100 training samples respectively in three experiments. In this regime, we only augment the samples in positive class by 50/20/10 times, so that the final data amount of the positive and negative class are the same. We set up another baseline Over-Sampling (OS) for this scenario, which over-samples the training samples in the positive class by 50/20/10 times. Following the settings of the previous work (Ren et al., 2018; Hu et al., 2019b), the validation set for training and policy optimization is balanced.
+
+In both low-resource and class-imbalanced regimes, the test set for final evaluation is balanced and intact without any reduction, which indicates that accuracy is a fair metric for evaluation. The size of policy $N$ and the number of the operations sampled for each text $N^*$ is 8 and 2, respectively. For a fair comparison, we use 3 random seeds for data sub-sampling and run 5 times under each seed.
+
+| Method | IMDB (80) | SST-5 (200) | TREC (120) | YELP-2 (80) | YELP-5 (200) | Average |
| No Aug | 64.74±3.41 | 36.14±3.99 | 69.31±5.37 | 73.87±4.22 | 36.62±4.67 | 56.14±4.33 |
| CWS | 73.44±3.56 | 39.22±2.66 | 74.31±5.01 | 78.87±3.96 | 43.05±2.18 | 61.77±3.47 |
| EDA | 73.93±1.88 | 39.72±1.93 | 71.59±4.39 | 77.46±4.78 | 43.17±2.76 | 61.17±3.15 |
| LDM | 70.39±3.61 | 40.25±1.48 | 75.33±4.77 | 79.70±2.85 | 43.85±0.96 | 61.90±2.73 |
| BT | 74.13±3.10 | 39.40±3.87 | 78.08±4.07 | 78.97±2.95 | 42.19±2.53 | 62.55±3.30 |
| TAA(Ours) | 75.68*±3.27 | 40.28±1.80 | 81.47**±3.87 | 81.75*±3.57 | 45.29*±1.76 | 64.89±2.85 |
+
+Table 2: Test accuracy (\%) with standard deviation of different augmentation methods in low-resource regime. IMDB (80) means the number of training samples after sub-sampling is 80. * and ** indicate statistically significant $(\mathrm{p} < .05$ and $\mathrm{p} < .01)$ improvements over the best baseline. Here $n_{\mathrm{aug}} = 16$ .
+
+Finally, we report the results on the average of 15 runs with standard deviation (denoted as $\pm$ ).
+
+# 3.4 Main Results
+
+We train the model on the training set augmented by baselines in Section 3.2, then conduct evaluations on the balanced and intact test set.
+
+Low-resource Regime. Table 2 shows the test accuracy of TAA on five datasets. In the low-resource regime, the model suffers from a severe overfitting problem. For example, the accuracy on the subtraining set of TREC is as high as $98.06\% \pm 1.34\%$ , while only obtains $69.3\% \pm 5.4\%$ on the test set. Several kinds of data augmentation baselines have greatly improved the generalization ability of the model. As shown in Figure 1, however, the performance of the augment operations is very sensitive to their parameters like the magnitude. The heuristic-based approaches such as EDA and CWS are likely to be trapped in sub-optimum because of the manually parameters setting. On the contrary, our Text AutoAugment algorithm with a learnable and compositional policy outperforms all the baselines by a considerable margin. Compared to the model without augmentation, TAA boosts the accuracy by $8.8\%$ averagely. Note that it does not cost too much time of computation to achieve such performance. When the number of iterations $T$ (see Algorithm 1) is 200, it only requires $4.24 \pm 0.10$ GPU hours on 8 NVIDIA Tesla P40 GPUs to finish the optimization.
+
+Class-imbalanced Regime. To verify that TAA can also improve the performance of the model in class-imbalanced regime, we conduct experiments based on the settings in Section 3.3. As illustrated in Table 3, the over-sampling method alleviates the overfitting problem to some extent but is not as efficient as augmentation baselines. In contrast,
+
+
+Figure 4: Transferability of the policies searched by TAA from one source dataset to other target datasets. The number denotes the performance degradation when the policy is transferred to the target dataset.
+
+our TAA boosts the test accuracy by an average of about $9.7\%$ , which surpasses other algorithms.
+
+In both low-resource and class-imbalanced regimes, our TAA framework based on multiple learnable operations surpasses BT & CWS based on single unlearnable operation, EDA based on multiple unlearnable operations, and LDM based on single learnable operation.
+
+# 4 Analysis
+
+We analyse the learned policies on four aspects including transferability, scalability, magnification and structure. Besides, we evaluate the diversity and semantics preservation of the augmented data, and further conduct a case study. The final policies searched by our TAA algorithm are listed in Appendix D.
+
+# 4.1 Transferability
+
+We conduct experiments to study whether the policies searched on one source dataset can be applied to other target datasets. As illustrated in Figure 4,
+
+| Method | SST-2 (20:1000) | SST-2 (50:1000) | SST-2 (100:1000) | IMDB (20:1000) | IMDB (50:1000) | IMDB (100:1000) | Average |
| No Aug | 50.17±1.30 | 55.01±6.33 | 68.01±8.80 | 50.05±0.00 | 51.84±4.56 | 65.81±7.65 | 56.82±4.77 |
| OS | 52.01±1.80 | 58.58±5.56 | 68.97±3.48 | 52.29±2.69 | 59.08±6.33 | 68.63±4.67 | 59.93±4.09 |
| BT | 54.05±4.20 | 59.47±5.67 | 71.70±5.29 | 52.24±2.90 | 57.43±6.85 | 67.20±6.89 | 60.35±5.46 |
| EDA | 52.91±3.87 | 59.53±5.86 | 70.05±5.34 | 57.29±5.74 | 64.09±7.18 | 71.28±4.94 | 62.53±5.49 |
| CWS | 53.09±1.98 | 64.62±5.05 | 74.67±3.88 | 55.58±3.34 | 64.37±3.55 | 74.33±4.92 | 64.44±3.79 |
| TAA(Ours) | 56.45*±3.67 | 66.05±4.85 | 75.12±5.20 | 56.92±2.80 | 66.73*±4.20 | 77.87*±3.18 | 66.52±3.98 |
+
+Table 3: Test accuracy (\%) with standard deviation in class-imbalanced regime. SST-2 (20:1000) means the positive class of SST-2 has 20 training samples while the negative class has 1000 training samples. * indicates statistically significant $(p < .05)$ improvements over the best baseline.
+
+| Dataset | No Aug | TAA | Improvement (↑) |
| IMDB | 88.77 | 89.37 | 0.60 |
| SST-5 | 52.29 | 52.55 | 0.26 |
| TREC | 96.40 | 97.07 | 0.67 |
| YELP-2 | 95.85 | 96.04 | 0.19 |
| YELP-5 | 65.55 | 65.73 | 0.18 |
| Average | 79.77 | 80.15 | 0.38 |
+
+Table 4: Test accuracy $(\%)$ of TAA on full datasets. Here $n_{\mathrm{aug}} = 4$ for IMDB, SST-5 and TREC. $n_{\mathrm{aug}} = 2$ for YELP-2 and YELP-5.
+
+the transfer of the policy to other datasets only results in a slight performance degeneration of $1.1\%$ on average and can boosts the test accuracy by $7.7\%$ comparing to no augmentation. The policies maintain better transferability when the gap of class number and sequence length is smaller between the source and target datasets.
+
+# 4.2 Scalability
+
+In order to investigate whether the TAA policy is still helpful as the amount of training data increases, we apply the policies searched in the low-resource regime to the corresponding full datasets. Note that the only difference between the experimental setting here and that in the low-resource and class-imbalanced regimes is the amount of the training data. The test sets are intact and balanced in all three situations. As shown in Table 4, the policies searched on a subset with only 2k training samples on average have great scalability. Such policies can improve the quality and diversity of the full training set, and further, improve the model performance by an average of 0.38.
+
+
+Figure 5: Test accuracy $(\%)$ with different $n_{\mathrm{aug}}$ on SST-5 and TREC, respectively. Each curve in the sub-figure denotes a kind of baseline. Shaded regions indicate standard deviation over 15 trials.
+
+
+
+# 4.3 Impact of Augment Magnification
+
+Figure 5 shows the results of each method with different augment magnification $n_{\mathrm{aug}}$ . We find that CWS and LDM achieve their best performance on SST-5 when $n_{\mathrm{aug}} = 4$ , but the accuracy drops sharply as $n_{\mathrm{aug}}$ continues to increase. The performance improvement from methods with a single operation cannot scale with more augmented samples, presumably because of the lack of novel information. Worsely, EDA, which is based on unlearnable multiple operations, even harms the model training on TREC, due to its inappropriate parameter setting with human experience (Wei and Zou, 2019). In virtue of the compositional and learnable policy, the augmented data synthesized by TAA are effective and perform well in most cases.
+
+# 4.4 Impact of the Policy Structure
+
+We change the size of the policy $N$ and the number of the operations sampled for each text $N^{*}$ and re-execute the experiments to explore the impact of the policy structure. The left panel in Figure 6 shows the results with different $N^{*}$ . As $N^{*}$ increases, the original text is likely to be applied with more operations sequentially, which causes slight
+
+
+Figure 6: Performance of TAA with respect to the structure of augmentation policy.
+
+| Method | IMDB (80) | SST-5 (200) | TREC (120) | YELP-2 (80) | YELP-5 (200) | Average |
| CWS | 0.302 | 0.731 | 0.827 | 0.390 | 0.393 | 0.529 |
| EDA | 0.304 | 0.747 | 0.839 | 0.397 | 0.399 | 0.537 |
| BT | 0.345 | 0.745 | 0.849 | 0.439 | 0.440 | 0.564 |
| TAA(Ours) | 0.345 | 0.751 | 0.841 | 0.445 | 0.446 | 0.566 |
+
+Table 5: Distinct-2 of different augmentation methods in low-resource regimes.
+
+damage to the performance of TAA. While the right panel shows that the more operations a policy contains, the better TAA performs. Therefore, for the compositional data augmentation algorithm, it is helpful to generate more diverse samples. Other ablation studies on operation type and searching algorithm can be found in Appendix E.
+
+# 4.5 Diversity of Augmented Data
+
+We evaluate the diversity of the augmented data by computing the Dist-2 (Li et al., 2016), which measures the number of distinct bi-grams in generated sentences. The metric is scaled using the total number of bi-grams in the generated sentence, which ranges from 0 to 1 where a larger value indicates higher diversity. As shown in Table 5, TAA achieves the best overall performance, even slightly outperforms the generation-based method, i.e., back-translation. The results validate the effectiveness of applying various editing operations in the compositional augmentation policy, and demonstrate the superiority of our well-designed algorithm for automatic hyper-parameters tuning.
+
+# 4.6 Semantics Preservation of Augmented Data
+
+The augmented sentence are supposed to preserve the semantic meaning of the original sentence, for enriching rather than deviating from the original data set support. We propose to evaluate semantic similarity between the generated sentences and
+
+the original ones, based on sentence embedding cosine similarity. In more detail, for the sentence pair $(x, x_{\mathrm{aug}})$ consists of the original sentence $x$ and the corresponding augmented text $x_{\mathrm{aug}}$ , we utilize Sentence-BERT (Reimers and Gurevych, 2019) library, which achieves the state-of-the-art performance on various semantic textual similarity benchmarks, to obtain dense vector representations of sentences $(\mathbf{x}, \mathbf{x}_{\mathrm{aug}})$ . The semantic preservation score $\mathrm{SP}(x, x_{\mathrm{aug}})$ is defined as:
+
+$$
+\mathrm {S P} (x, x _ {\mathrm {a u g}}) = \frac {\mathbf {x} \cdot \mathbf {x} _ {\mathrm {a u g}}}{\| \mathbf {x} \| \| \mathbf {x} _ {\mathrm {a u g}} \|}. \tag {6}
+$$
+
+We compute the average semantic preservation score for the whole augmented datasets using different augmentation methods, and the results are listed in Table 6. It can be found that our TAA achieves the best results, comparable with the generation-based method back-translation. We note that our method achieves the highest semantic preservation score when the number of training samples is relatively small, which demonstrates that our method can generalize to extreme low-resource scenarios.
+
+# 4.7 Case Study
+
+Figure 7 shows some cases of augmented texts generated by TAA. Given the original text with the label "positive", the modifications applied by TAA distort the semantics and sentence structure at the beginning. As the number of iteration $T$ increases, TAA captures the feature of the dataset adaptively, helping it achieve a better balance between diversity and quality on augmented samples.
+
+# 5 Related Work
+
+Previous data augmentation algorithms in NLP can be categorized into generation-based and editing-based methods. For generation-based methods, back-translation (Sennrich et al., 2016; Imamura et al., 2018; Luque, 2019; Zhang et al., 2020) generates the paraphrase of a text by translating it to an intermediate language and back. Kobayashi (2018) masks some words then uses a label-conditional language model to predict them. Anaby-Tavor et al. (2020) and Kumar et al. (2020) leverage various language models such as GPT-2 (Radford et al., 2019) and BART (Lewis et al., 2020) to generate a continuation of the original sentences. For editing-based methods, Wei and Zou (2019) propose the Easy Data Augmentation (EDA) technique, which randomly selects editing operations from four candidates for the augmentation. Xie et al. (2020)
+
+| Method | IMDB (80) | SST-5 (200) | TREC (120) | YELP-2 (80) | YELP-5 (200) | Average |
| CWS | 0.698 | 0.796 | 0.784 | 0.739 | 0.736 | 0.751 |
| EDA | 0.738 | 0.665 | 0.610 | 0.785 | 0.785 | 0.717 |
| BT | 0.738 | 0.799 | 0.892 | 0.741 | 0.747 | 0.783 |
| TAA(Ours) | 0.771 | 0.776 | 0.847 | 0.794 | 0.726 | 0.783 |
+
+Table 6: Cosine similarity of sentence embeddings between the augmented sentence and the original one. IMDB (80) means the number of training samples after sub-sampling is 80. Here $n_{\mathrm{aug}} = 16$ and number of iterations $T$ is 200.
+
+| Label: Positive Original text: A deeply felt and vividly detailed story about newcomers in a strange new world. |
| Iteration | Sampled operations | Synthetic text |
| T=1 | <WS, 0.9, 0.4> | A deeply felt and vividly detailed story about newcomers in a strange new world. |
| <RS, 0.2, 0.5> | A deeply felt and vividly depression detailed story about newcomers in a strange new world. |
| T=100 | <WS, 0.5, 0.8> | A deeply felt vividly and about elaborate tale in newcomer earth a young unknown. |
| <TI, 0.2, 0.8> | A deeply felt and vividly detailed story about newcomers in a strange new world. |
| T=200 | <TS, 0.7, 0.1> | A deeply felt and vividly detailed story particularly about newcomers in a strange new world. |
| <WS, 0.4, 0.2> | A deeply felt and vividly elaborate story about newcomers in a foreign new world. |
+
+Figure 7: Examples of augmented texts generated by TAA on SST-5 after 1/100/200 iteration of exploration. Red operation $\mathcal{O} = \langle t,p,\lambda \rangle$ indicates it is finally applied according to probability $p$ . We use RS (Random Swap), RD (Random Delete), TI (TF-IDF Insert), TS (TF-IDF Substitute) and WS (WordNet Substitute) for abbreviation.
+
+propose to substitute uninformative words with low TF-IDF scores. These methods require a lot of prior knowledge to preset their parameters and are prone to fall into the sub-optimum.
+
+Recently, some algorithms are proposed for automatically learning augmentation policy in the field of Computer Vision (Cubuk et al., 2019; Ho et al., 2019; Lim et al., 2019; Hataya et al., 2020; Li et al., 2020) and NLP (Cai et al., 2020; Miao et al., 2021). However, their modelings are different from ours. Specifically, AutoAugment (Cubuk et al., 2019) establishes a Reinforcement Learning (RL) framework to search for the best augmentation policy. In order to reduce the time of policy exploration, Ho et al. (2019) replace the RL framework with a population-based algorithm. Lim et al. (2019) leverage 5-fold cross-validation and augments the validation set instead of the training set. While in our proposed approach, the objective function for policy optimization is designed as the loss that models achieve on the validation set after trained on the augmented set. Besides, we utilize SMBO as the optimization algorithm, which can return a promising result efficiently. In the field of NLP, TAA surpasses both EDA (Wei and Zou, 2019) and LDM (Hu et al., 2019b) via a learnable and compositional augmentation policy.
+
+# 6 Conclusion
+
+In this paper, we propose an effective method called Text AutoAugment (TAA) to establish a compositional and learnable paradigm for data augmentation. TAA regards a combination of various editing operations as an augmentation policy and utilizes SMBO for policy learning. Experiments show that TAA can substantially improve the generalization ability of models as well as lighten the burden of artificial augmentation designing.
+
+# Acknowledgements
+
+We thank all the anonymous reviewers for their constructive comments, and Xuancheng Ren and Guangxiang Zhao for their valuable suggestions in preparing the manuscript. This is a joint work between Pattern Recognition Center, WeChat AI, Tencent Inc. and Peking University, and is partly supported by Beijing Academy of Artificial Intelligence (BAAI). Xu Sun is the corresponding author of this paper.
+
+# References
+
+Ateret Anaby-Tavor, Boaz Carmeli, Esther Goldbraich, Amir Kantor, George Kour, Segev Shlomov, Naama Tepper, and Naama Zwerdling. 2020. Do not have
+
+enough data? deep learning to the rescue! 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 7383-7390. AAAI Press.
+Jacob Andreas. 2020. Good-enough compositional data augmentation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 7556-7566. Association for Computational Linguistics.
+James Bergstra, Rémi Bardenet, Yoshua Bengio, and Balázs Kégl. 2011. Algorithms for hyper-parameter optimization. In Advances in Neural Information Processing Systems 24: 25th Annual Conference on Neural Information Processing Systems 2011. Proceedings of a meeting held 12-14 December 2011, Granada, Spain, pages 2546-2554.
+Hengyi Cai, Hongshen Chen, Yonghao Song, Cheng Zhang, Xiaofang Zhao, and Dawei Yin. 2020. Data manipulation: Towards effective instance learning for neural dialogue generation via learning to augment and reweight. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 6334-6343. Association for Computational Linguistics.
+Jiaao Chen, Derek Tam, Colin Raffel, Mohit Bansal, and Diyi Yang. 2021. An empirical survey of data augmentation for limited data learning in NLP. CoRR, abs/2106.07499.
+Ekin D. Cubuk, Barret Zoph, Dandelion Mané, Vijay Vasudevan, and Quoc V. Le. 2019. Autoaugment: Learning augmentation strategies from data. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 113-123. Computer Vision Foundation / IEEE.
+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, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186. Association for Computational Linguistics.
+Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018. Understanding back-translation at scale. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 489-500. Association for Computational Linguistics.
+
+Mohammad Shahrokh Esfahani and Edward R. Dougherty. 2014. Effect of separate sampling on classification accuracy. Bioinform., 30(2):242-250.
+Matthias Feurer, Aaron Klein, Katharina Eggensperger, Jost Tobias Springenberg, Manuel Blum, and Frank Hutter. 2019. *Auto-sklearn: Efficient and robust automated machine learning.* In *Automated Machine Learning - Methods, Systems, Challenges*, The Springer Series on Challenges in Machine Learning, pages 113-134. Springer.
+Ryuichiro Hataya, Jan Zdenek, Kazuki Yoshizoe, and Hideki Nakayama. 2020. Faster autoaugment: Learning augmentation strategies using backpropagation. In Computer Vision - ECCV 2020 - 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXV, volume 12370 of Lecture Notes in Computer Science, pages 1-16. Springer.
+Alex Hernández-García and Peter König. 2018. Data augmentation instead of explicit regularization. CoRR, abs/1806.03852.
+Daniel Ho, Eric Liang, Xi Chen, Ion Stoica, and Pieter Abbeel. 2019. Population based augmentation: Efficient learning of augmentation policy schedules. In Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 2731-2741. PMLR.
+J. Edward Hu, Rachel Rudinger, Matt Post, and Benjamin Van Durme. 2019a. PARABANK: monolingual bitext generation and sentential paraphrasing via lexically-constrained neural machine translation. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pages 6521-6528. AAAI Press.
+Zhiting Hu, Bowen Tan, Ruslan Salakhutdinov, Tom M. Mitchell, and Eric P. Xing. 2019b. Learning data manipulation for augmentation and weighting. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 15738-15749.
+Kenji Imamura, Atsushi Fujita, and Eiichiro Sumita. 2018. Enhancement of encoder and attention using target monolingual corpora in neural machine translation. In Proceedings of the 2nd Workshop on Neural Machine Translation and Generation, NMT@ACL 2018, Melbourne, Australia, July 20, 2018, pages 55-63. Association for Computational Linguistics.
+
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Sosuke Kobayashi. 2018. Contextual augmentation: Data augmentation by words with paradigmatic relations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 2 (Short Papers), pages 452-457. Association for Computational Linguistics.
+Ashutosh Kumar, Satwik Bhattachamishra, Manik Bhandari, and Partha P. Talukdar. 2019. Submodular optimization-based diverse paraphrasing and its effectiveness in data augmentation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 3609-3619. Association for Computational Linguistics.
+Varun Kumar, Ashutosh Choudhary, and Eunah Cho. 2020. Data augmentation using pre-trained transformer models. CoRR, abs/2003.02245.
+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, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 7871-7880. Association for Computational Linguistics.
+Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. 2016. A diversity-promoting objective function for neural conversation models. In *NAACL HLT* 2016, The 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego California, USA, June 12-17, 2016, pages 110-119. The Association for Computational Linguistics.
+Xin Li and Dan Roth. 2002. Learning question classifiers. In 19th International Conference on Computational Linguistics, COLING 2002, Howard International House and Academia Sinica, Taipei, Taiwan, August 24 - September 1, 2002.
+Yonggang Li, Guosheng Hu, Yongtao Wang, Timothy M. Hospedales, Neil Martin Robertson, and Yongxing Yang. 2020. DADA: differentiable automatic data augmentation. CoRR, abs/2003.03780.
+Sungbin Lim, Ildoo Kim, Taesup Kim, Chiheon Kim, and Sungwoong Kim. 2019. Fast autoaugment. In Advances in Neural Information Processing Systems
+
+32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 6662-6672.
+Franco Martin Luque. 2019. Atalaya at TASS 2019: Data augmentation and robust embeddings for sentiment analysis. In Proceedings of the Iberian Languages Evaluation Forum co-located with 35th Conference of the Spanish Society for Natural Language Processing, IberLEF@SEPLN 2019, Bilbao, Spain, September 24th, 2019, volume 2421 of CEUR Workshop Proceedings, pages 561-570. CEUR-WS.org.
+Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. 2011. Learning word vectors for sentiment analysis. In The 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, Proceedings of the Conference, 19-24 June, 2011, Portland, Oregon, USA, pages 142-150. The Association for Computer Linguistics.
+Zhengjie Miao, Yuliang Li, and Xiaolan Wang. 2021. Rotom: A meta-learned data augmentation framework for entity matching, data cleaning, text classification, and beyond. In SIGMOD '21: International Conference on Management of Data, Virtual Event, China, June 20-25, 2021, pages 1303-1316. ACM.
+Jonas Mueller and Aditya Thyagarajan. 2016. Siamese recurrent architectures for learning sentence similarity. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12-17, 2016, Phoenix, Arizona, USA, pages 2786-2792. AAAI Press.
+Nathan Ng, Kyra Yee, Alexei Baevski, Myle Ott, Michael Auli, and Sergey Edunov. 2019. Facebook fair's WMT19 news translation task submission. In Proceedings of the Fourth Conference on Machine Translation, WMT 2019, Florence, Italy, August 1-2, 2019 - Volume 2: Shared Task Papers, Day 1, pages 314-319. Association for Computational Linguistics.
+Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. *fairseq: A fast, extensible toolkit for sequence modeling.* In *Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies*, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Demonstrations, pages 48-53. Association for Computational Linguistics.
+Husam Quteineh, Spyridon Samothrakis, and Richard Sutcliffe. 2020. Textual data augmentation for efficient active learning on tiny datasets. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, Online, November 16-20, 2020, pages 7400-7410. Association for Computational Linguistics.
+
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI blog.
+Nils Reimers and Iryna Gurevych. 2019. Sentence-bert: Sentence embeddings using siamese bert-networks. 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 2019, Hong Kong, China, November 3-7, 2019, pages 3980-3990. Association for Computational Linguistics.
+Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. 2018. Learning to reweight examples for robust deep learning. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholm, Sweden, July 10-15, 2018, volume 80 of Proceedings of Machine Learning Research, pages 4331-4340. PMLR.
+Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Improving neural machine translation models with monolingual data. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. The Association for Computer Linguistics.
+Patrice Y. Simard, Yann LeCun, John S. Denker, and Bernard Victorri. 1996. Transformation invariance in pattern recognition-tangent distance and tangent propagation. In Neural Networks: Tricks of the Trade, volume 1524 of Lecture Notes in Computer Science, pages 239-27. Springer.
+Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Y. 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, EMNLP 2013, 18-21 October 2013, Grand Hyatt Seattle, Seattle, Washington, USA, A meeting of SIGDAT, a Special Interest Group of the ACL, pages 1631-1642. ACL.
+Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pages 3104-3112.
+Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. 2015. Going deeper with convolutions. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2015, Boston, MA, USA, June 7-12, 2015, pages 1-9. IEEE Computer Society.
+Chris Thornton, Frank Hutter, Holger H. Hoos, and Kevin Leyton-Brown. 2013. Auto-weka: combined
+
+selection and hyperparameter optimization of classification algorithms. In The 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD 2013, Chicago, IL, USA, August 11-14, 2013, pages 847-855. ACM.
+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.
+Jason W. Wei and Kai Zou. 2019. EDA: easy data augmentation techniques for boosting performance on text classification 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 2019, Hong Kong, China, November 3-7, 2019, pages 6381-6387. Association for Computational Linguistics.
+Qizhe Xie, Zihang Dai, Eduard H. Hovy, Thang Luong, and Quoc Le. 2020. Unsupervised data augmentation for consistency training. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual.
+Quanming Yao, Mengshuo Wang, Hugo Jair Escalante, Isabelle Guyon, Yi-Qi Hu, Yu-Feng Li, Wei-Wei Tu, Qiang Yang, and Yang Yu. 2018. Taking human out of learning applications: A survey on automated machine learning. CoRR, abs/1810.13306.
+Xiang Zhang, Junbo Jake Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 649-657.
+Yi Zhang, Tao Ge, and Xu Sun. 2020. Parallel data augmentation for formality style transfer. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 3221-3228. Association for Computational Linguistics.
+
+# A Editing Operations for Augmentation
+
+We use five simple and effect operations including Random Swap (Wei and Zou, 2019), Random Delete (Wei and Zou, 2019), WordNet Substitute (Zhang et al., 2015; Mueller and Thyagarajan, 2016; Wei and Zou, 2019), TF-IDF Substitute (Xie et al., 2020) and TF-IDF Insert (Xie et al., 2020) as the basic component of our augmentation policy. All operations used here are word-level, considering their low complexity and high effectiveness. The detailed description is shown in Table 7.
+
+# B Sequential Model-based Global Optimization (SMBO)
+
+Recall the TAA framework in Section 2, our objective is to search for the optimal augmentation policy $\mathcal{P}$ that minimizes the following loss:
+
+$$
+\mathcal {J} = \mathcal {J} (f, \mathcal {D} _ {\mathrm {a u g}} (\mathcal {P}), \mathcal {D} _ {\mathrm {v a l}}). \tag {7}
+$$
+
+We leverage the Sequential Model-based Global Optimization (SMBO) as our optimizer for the policy learning. The optimization procedure is carried out in an iterative manner. To build the relation between the policy $\mathcal{P}$ and the objective loss $\mathcal{J}$ and sample the most promising policy at each iteration, we use the Tree-structured Parzen Estimator (TPE) (Bergstra et al., 2011) as a surrogate agent $M$ to model the conditional probability $p_{M}(\mathcal{J} \mid \mathcal{P})$ . Besides, we employ the following Expected Improvement (EI) criterion as an acquisition function for policy sampling in the current iteration:
+
+$$
+\begin{array}{l} \operatorname {E I} (\mathcal {P}) = \mathbb {E} \left[ \max \left(\mathcal {J} ^ {\dagger} - \mathcal {J}, 0\right) \right] \\ = \int_ {- \infty} ^ {\mathcal {I} ^ {\dagger}} \left(\mathcal {I} ^ {\dagger} - \mathcal {I}\right) p _ {M} (\mathcal {I} \mid \mathcal {P}) d \mathcal {I} \tag {8} \\ \end{array}
+$$
+
+Here, $\mathcal{I}^{\dagger}$ is a threshold and Eq. 8 stands for the expectation under the surrogate model that the loss $\mathcal{I}$ of a policy will exceed (negatively) the threshold $\mathcal{I}^{\dagger}$ . We expect the loss of the sampled policy in each iteration to be smaller than the current threshold, thus the policy that maximizes the Expected Improvement will be chosen in the next iteration.
+
+Instead of directly representing $p_{M}(\mathcal{I}\mid \mathcal{P})$ for calculating the Expected Improvement, the TPE builds a model of $p_M(\mathcal{P}\mid \mathcal{I})$ by applying Bayes rule. The TPE splits the historical observations of policies in two groups: the best performing one (e.g., the upper quartile) and the rest. The threshold $\mathcal{I}^{\dagger}$ is defined as the splitting value for the two
+
+groups and the likelihood probability for being in each of these groups is modeled as:
+
+$$
+p _ {M} (\mathcal {P} \mid \mathcal {J}) = \left\{ \begin{array}{l l} l (\mathcal {P}) & \text {i f} \mathcal {J} < \mathcal {J} ^ {\dagger} \\ g (\mathcal {P}) & \text {i f} \mathcal {J} > \mathcal {J} ^ {\dagger} \end{array} \right. \tag {9}
+$$
+
+Here, $l(\mathcal{P})$ models the distribution of previous sampled policies whose loss is less than the threshold, and $g(\mathcal{P})$ models the distribution of the other policies whose loss is greater than the threshold. The two densities $l$ and $g$ are modeled using Parzen estimators (also known as kernel density estimators), which are a simple average of kernels centered on existing data points. With Bayes Rule, we can prove that the Expected Improvement which we are trying to maximize is proportional to the ratio $l(\mathcal{P}) / g(\mathcal{P})$ :
+
+$$
+\begin{array}{l} \operatorname {E I} (\mathcal {P}) = \int_ {- \infty} ^ {\mathcal {I} ^ {\dagger}} \left(\mathcal {J} ^ {\dagger} - \mathcal {J}\right) p _ {M} (\mathcal {J} \mid \mathcal {P}) d \mathcal {J} \\ = \int_ {- \infty} ^ {\mathcal {I} ^ {\dagger}} \left(\mathcal {J} ^ {\dagger} - \mathcal {J}\right) \frac {p _ {M} (\mathcal {P} \mid \mathcal {J}) p (\mathcal {J})}{p (\mathcal {P})} d \mathcal {J} \\ = \frac {l (\mathcal {P})}{p (\mathcal {P})} \int_ {- \infty} ^ {\mathcal {I} ^ {\dagger}} \left(\mathcal {J} ^ {\dagger} - \mathcal {J}\right) p (\mathcal {J}) d \mathcal {J} \\ = \frac {l (\mathcal {P})}{p (\mathcal {P})} \left[ \gamma \mathcal {J} ^ {\dagger} - \int_ {- \infty} ^ {\mathcal {J} ^ {\dagger}} p (\mathcal {J}) d \mathcal {J} \right] \\ = \frac {l (\mathcal {P})}{\gamma l (\mathcal {P}) + (1 - \gamma) g (\mathcal {P})} \left[ \gamma \mathcal {J} ^ {\dagger} - \int_ {- \infty} ^ {\mathcal {J} ^ {\dagger}} p (\mathcal {J}) d \mathcal {J} \right] \\ \propto \left(\gamma + \frac {g (\mathcal {P})}{l (\mathcal {P})} (1 - \gamma)\right) ^ {- 1} \tag {10} \\ \end{array}
+$$
+
+Accordingly, the maximization of the Expected Improvement can be achieved by maximizing the ratio $l(\mathcal{P}) / g(\mathcal{P})$ . In other words, we should sample the polices which are more likely under $l(\mathcal{P})$ than under $g(\mathcal{P})$ . The TPE works by drawing sample polices from $l(\mathcal{P})$ , evaluating them in terms of $l(\mathcal{P}) / g(\mathcal{P})$ , and returning the set that yields the highest value under $l(\mathcal{P}) / g(\mathcal{P})$ corresponding to the greatest expected improvement. These policies are then evaluated on the objective function and the results are merged into the observation history. The algorithm builds $l(\mathcal{P})$ and $g(\mathcal{P})$ using the history to update the probability model $M$ of the objective function that improves with each iteration.
+
+# C Statistics of Datasets
+
+We conduct experiments on six popular datasets including IMDB (Maas et al., 2011), SST-2, SST-5 (Socher et al., 2013), TREC (Li and Roth, 2002), YELP-2 and YELP-5 (Zhang et al., 2015). The statistics of datasets used are listed in Table 8.
+
+| Operation Name | Description |
| Random Swap (RS) | Swap two adjacent words randomly. |
| Random Delete (RD) | Delete words randomly. |
| WordNet Substitute (WS) | Substitute words with their synonyms according to WordNet. |
| TF-IDF Substitute (TS) | Substitute uninformative words with low TF-IDF scores. |
| TF-IDF Insert (TI) | Insert informative words with high TF-IDF. |
+
+Table 7: Description of all the augment operations in the search space.
+
+| Dataset | # Classes | # Train samples | # Test samples | Average length | Task |
| IMDB | 2 | 25,000 | 25,000 | 326 | Sentiment Analysis |
| SST-2 | 2 | 7,791 | 1,821 | 18 | Sentiment Analysis |
| SST-5 | 5 | 9,643 | 2,210 | 19 | Sentiment Analysis |
| TREC | 6 | 5,452 | 500 | 10 | Question Classification |
| YELP-2 | 2 | 560,000 | 38,000 | 139 | Review Classification |
| YELP-5 | 5 | 650,000 | 50,000 | 141 | Review Classification |
+
+Table 8: Statistics on the datasets.
+
+| Policy | IMDB (80) | SST-5 (200) | TREC (120) | YELP-2 (80) | YELP-5 (200) |
| Op1 | <TS, 0.77, 0.07> | <RD, 0.44, 0.22> | <WS, 0.75, 0.44> | <TS, 0.95, 0.26> | <RD, 0.34, 0.32> |
| Op2 | <TS, 0.50, 0.31> | <WS, 0.59, 0.50> | <WS, 0.33, 0.26> | <RD, 0.08, 0.49> | <WS, 0.69, 0.19> |
| Op3 | <RD, 0.72, 0.05> | <TI, 0.66, 0.11> | <RS, 0.60, 0.02> | <WS, 0.57, 0.41> | <RD, 0.70, 0.15> |
| Op4 | <TI, 0.66, 0.09> | <TS, 0.11, 0.25> | <WS, 0.59, 0.36> | <RD, 0.85, 0.02> | <RD, 0.85, 0.27> |
| Op5 | <TI, 0.69, 0.13> | <WS, 0.69, 0.09> | <TI, 0.59, 0.17> | <RS, 0.30, 0.15> | <TS, 0.72, 0.35> |
| Op6 | <RS, 0.26, 0.05> | <WS, 0.41, 0.07> | <WS, 0.63, 0.34> | <TS, 0.55, 0.05> | <RD, 0.58, 0.47> |
| Op7 | <TS, 0.77, 0.50> | <TS, 0.69, 0.02> | <TS, 0.22, 0.37> | <TS, 0.63, 0.34> | <RS, 0.48, 0.22> |
| Op8 | <TS, 0.36, 0.25> | <WS, 0.99, 0.22> | <RS, 0.96, 0.03> | <WS, 0.13, 0.28> | <TS, 0.72, 0.50> |
+
+Table 9: TAA policies searched in the low-resource regime. Each policy finally consists of 8 atomic editing operations and each operation satisfies the form of $\mathcal{O} = \langle t,p,\lambda \rangle$ . We use RS (Random Swap), RD (Random Delete), WS (WordNet Substitute), TI (TF-IDF Insert), TS (TF-IDF Substitute) for simplification.
+
+# D Searched Policy
+
+The policies searched by our TAA algorithm are listed in Table 9. Each policy finally consists of 8 atomic editing operations and each operation satisfies the form of $\mathcal{O} = \langle t,p,\lambda \rangle$ . All the policies can be used directly to augment the full training set to further boost the model performance on the corresponding downstream tasks.
+
+# E Ablation Study of TAA Policy
+
+# E.1 Searching Algorithm Ablation
+
+To verify the effectiveness of our optimization algorithm, we re-execute the experiment on the same search space described in Section 2.1, but do NOT conduct any policy optimization. For each text in the training set, a random policy is sampled to synthesize the augmented data. We call this method Text AutoAugment-Random (TAA-R). Table 10
+
+illustrates the results of TAA and TAA-R. Generally, the augmentation policy after optimization performs better than the random policy by $1.92\%$ . Note that we incorporate prior knowledge in Section 2.1 to constrain the range of the operation magnitude, which ensures the performance of the operation and avoids generating bad samples.
+
+# E.2 Operation Type Ablation
+
+We conduct operation type ablation study to examine the effect of the operation types search space. Specifically, we eliminate one operation type while keeps others for searching the optimal policy, and evaluate the task performance using the learned policy. The task performance difference with different ablated operations on IMDB and SST-2 dataset are shown in Table 11. We find that the elimination of operation type generally leads to a decrease of task performance, indicating that the effect of differ
+
+| Method | Low-resource Regime | Class-imbalanced Regime | Overall |
| IMDB (80) | SST-5 (200) | TREC (120) | IMDB (20:1000) | IMDB (50:1000) | IMDB (100:1000) | Average |
| TAA-R | 72.64±5.55 | 38.60±2.12 | 77.72±4.01 | 55.72±3.74 | 63.60±5.71 | 74.37±4.22 | 63.78±4.23 |
| TAA | 75.68*±3.27 | 40.28**±1.80 | 81.47**±3.87 | 56.92±2.80 | 66.73*±4.20 | 77.87*±3.18 | 66.49±3.19 |
+
+Table 10: Test accuracy (%) for TAA-R and TAA in low-resource and class-imbalanced regime. * and ** indicate statistically significant (p < .05 and p < .01) improvements over TAA-R.
+
+| Dataset | Full Space | w/o RS | w/o RD | w/o TI | w/o TS | w/o WS |
| IMDB(80) | 75.68 | -0.12 | -1.03 | +0.89 | -0.07 | -1.47 |
| SST-2(50:1000) | 66.05 | -2.09 | -1.64 | -0.94 | -0.47 | +1.27 |
+
+Table 11: Test accuracy (%) in the ablation study of operation type. We use RS (Random Swap), RD (Random Delete), WS (WordNet Substitute), TI (TF-IDF Insert), TS (TF-IDF Substitute) for simplification.
+
+ent operations are complementary with each other. We attribute it to that more operations types will improve the diversity of the combinations of text manipulation, thus boosting the dataset quality and benefiting the generalizability of the model.
\ No newline at end of file
diff --git a/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/images.zip b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..60988f33661488464e1f954341f43499e80ad4e0
--- /dev/null
+++ b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:59401b2727ea06a7f63fc0107d5b888b01ea1c890ff829ffcde7dff59fad3885
+size 804304
diff --git a/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/layout.json b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..e97c18219481518d37164e6429b5c8a06ef5dcd4
--- /dev/null
+++ b/textautoaugmentlearningcompositionalaugmentationpolicyfortextclassification/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f4e527d54ee70b2bcb2eac97e876acaafd8964a504fd9955381d6beba8899542
+size 521076
diff --git a/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/57981e35-a9e8-45a2-88de-f0e1ec617543_content_list.json b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/57981e35-a9e8-45a2-88de-f0e1ec617543_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..fc61fff222bfacec3fd5f19dba47b49fa5876a29
--- /dev/null
+++ b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/57981e35-a9e8-45a2-88de-f0e1ec617543_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7252fad758a6ace0d872ce502a798439d5cebef634a2463848e057b2fd64d887
+size 102901
diff --git a/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/57981e35-a9e8-45a2-88de-f0e1ec617543_model.json b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/57981e35-a9e8-45a2-88de-f0e1ec617543_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..f8ec0a6f50a0174334f39eb4c7cd37441386bb6a
--- /dev/null
+++ b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/57981e35-a9e8-45a2-88de-f0e1ec617543_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e2feed670ea189522c1ec23f68e0c9c044e4c27490dd8414a601fb8bd60f49a2
+size 121612
diff --git a/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/57981e35-a9e8-45a2-88de-f0e1ec617543_origin.pdf b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/57981e35-a9e8-45a2-88de-f0e1ec617543_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..1859343f913d55224fef614ba2fc46413f140548
--- /dev/null
+++ b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/57981e35-a9e8-45a2-88de-f0e1ec617543_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:50f759a2241dc0e210bb625b45929749f580996aa1e9531084c8abd666b4310d
+size 559035
diff --git a/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/full.md b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..c654b045828abe44e3cef093e192c14112c593f0
--- /dev/null
+++ b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/full.md
@@ -0,0 +1,438 @@
+# Text Counterfactuals via Latent Optimization and Shapley-Guided Search
+
+Quintin Pope and Xiaoli Z. Fern
+
+School of Electrical Engineering and Computer Science
+
+Oregon State University
+
+popeq, xfern@oregonstate.edu
+
+# Abstract
+
+We study the problem of generating counterfactual text for a classifier as a means for understanding and debugging classification. Given a textual input and a classification model, we aim to minimally alter the text to change the model's prediction. White-box approaches have been successfully applied to similar problems in vision where one can directly optimize the continuous input. Optimization-based approaches become difficult in the language domain due to the discrete nature of text. We bypass this issue by directly optimizing in the latent space and leveraging a language model to generate candidate modifications from optimized latent representations. We additionally use Shapley values to estimate the combinatoric effect of multiple changes. We then use these estimates to guide a beam search for the final counterfactual text. We achieve favorable performance compared to recent white-box and black-box baselines using human and automatic evaluations. Ablation studies show that both latent optimization and the use of Shapley values improve success rate and the quality of the generated counterfactuals.
+
+# 1 Introduction
+
+Deep neural networks have achieved state-of-the-art performances for many natural language processing (NLP) tasks (Otter et al., 2020; Ruder et al., 2019). When applying such models in real world applications, understanding their behavior can be challenging — the ever-increasing complexity of such models makes it difficult to understand and debug their predictions. A human can explain why an example belongs to a specific concept class by constructing a counterfactual of an example that is minimally altered but belongs to a different class. Contrasting the original example with its counterfactual highlights the critical aspects signifying the concept class. We study a similar approach to understand deep NLP models' classification criteria.
+
+Given a classifier and an input text, our goal is to generate a counterfactual by making a set of minimal modifications to the text that change the label assigned by the classifier. Additionally, our goal is to understand the model's behavior when processing naturally occurring inputs, hence we wish to generate grammatically correct and semantically plausible counterfactuals.
+
+Automatic generation of text counterfactuals has been studied in different settings. Qin et al. (2019) considered counterfactual story rewriting which aims to minimally rewrite an original story to be compatible with a counterfactual event. Wu et al. (2021) used a fine-tuned GPT-2 model to generate general purpose counterfactuals that are not tied to a particular classification model. Yang et al. (2020) aim to generate plausible-sounding counterfactuals that flip a classification model's decision for financial texts.
+
+Related, textual adversaries also aim to change the model prediction (with modifications resembling natural text). The difference is that adversaries further aim to escape human detection (not changing a human's classification), whereas counterfactuals do not have such requirement.
+
+Another line of related work is style transfer (Sudhakar et al., 2019; Wang et al., 2019; Hu et al., 2017), which aim to modify a given text according to a target style. It differs from adversary or counterfactual generation in that it seeks to fully change all style-related phrases, as opposed to minimally perturbing a text to change a classifier's decision.
+
+White-box approaches have been widely used to generate adversaries or counterfactuals for vision tasks where the continuous inputs can be optimized to alter model predictions (Goodfellow et al., 2014; Carlini and Wagner, 2017; Neal et al., 2018). Such optimization based approaches are difficult to apply to language due to the discrete nature of text. We circumvent this difficulty by directly optimizing in the latent space of the input towards the desired
+
+classification. We then exploit the language generation capability of pre-trained language models, available for most state-of-the-art NLP models such as BERT (Devlin et al., 2019) or RoBERTa (Liu et al., 2019), to generate semantically plausible substitutions from the optimized latent representations. We further introduce Shapley values to estimate the combinatoric effect of multiple simultaneous changes, which are then used to guide a beam search to generate the final counterfactual.
+
+Leveraging pre-trained language models to generate alternative texts has been a popular black-box approach in the recent literature on text adversaries (Li et al., 2020b; Garg and Ramakrishnan, 2020; Li et al., 2020a). Our work presents a first attempt to combine the strength of white-box optimization and the power of pre-trained language models. While Shapley values have been widely studied for the problem of feature importance (Lundberg and Lee, 2017; Sundararajan and Najmi, 2020) and data valuation (Jia et al., 2020), this is the first effort demonstrating their usefulness for text generation.
+
+We compare our method to several white-box and black-box baselines on two different text classification tasks. Automatic and human evaluation results show that our method significantly improves the success rate of counterfactual generation, while reducing the fraction of input tokens modified and enhancing the semantic plausibility of generated counterfactuals. We also show through ablation studies that both counterfactual optimization of the latent representations and Shapley value estimates contribute to our method's strong performance.
+
+# 2 Proposed Method
+
+Problem statement. We are given a text classification model, $M$ , an initial input token sequence, $X = \{x_0,\dots,x_{n - 1}\}$ , with vocabulary $V$ . Model $M$ outputs a classification score $\hat{y} = M(X)\in (0,1)$ , representing $P(y = 1|X)$ . Based on the score, a class label $y\in \{0,1\}$ is assigned. We seek to generate a counterfactual of $X$ , which is defined as a set of tokens, $X^{\prime} = \{x^{\prime}_{0},\dots,x^{\prime}_{n - 1}\}$ , that differs from $X$ in no more than $C_{max}$ percent of locations, is grammatically plausible, and leads to a different classification, $y^\prime$ . Here $C_{max}$ is an input parameter for maximum changes allowed, and smaller $C_{max}$ imposes stronger restrictions.
+
+Note that our setup assumes binary classification, but can be easily extended to multi-class scenario to generate either targeted (with specified $y'$ ) or
+
+un-targeted counterfactuals (with unspecified $y^\prime$ ).
+
+Method overview. Our method consists of three steps. First, we generate a set of candidate token substitutions for each position. Second, we evaluate the capacity of these candidate substitutions to change model classification (individually and collectively). Finally, we construct the counterfactual by beam search.
+
+# 2.1 Generating candidate substitutions
+
+We generate candidate substitutions by first performing latent space optimization and then generate substitutions from the trajectory of latent representations using a language model.
+
+Given an input token sequence $X = \{x_0, \dots, x_{n-1}\}$ , we assume model $M$ contains an embedding layer that maps this discrete input sequence into continuous embedding $E = \{e_0, \dots, e_{n-1}\}$ . The goal is to optimize a sparsely altered $E' = \{e_0', \dots, e_{n-1}'\}$ such that the model will output $y'$ , a target class different from $M$ 's initial prediction $y$ . With slight abuse of notation, let $M(E')$ denote $M$ 's classification score when replacing $E$ with $E'$ as the input embedding, we optimize the following objective.
+
+$$
+\min _ {E ^ {\prime}} C E \left(M \left(E ^ {\prime}\right), y ^ {\prime}\right) + \sum_ {j = 0} ^ {n - 1} \left| e _ {j} ^ {\prime} - e _ {j} \right| (1)
+$$
+
+which minimizes the cross-entropy between $M(E')$ and the desired $y'$ , with a LASSO regularization to favor sparse divergence from the original $E$ .
+
+To reduce the sensitivity to the stopping point of optimization and produce diverse candidates, we optimize $E'$ for $K$ steps and consider the full optimization trajectory $\{E_k': k = 1 \dots K\}$ to generate the candidate substitutions using the pretrained language model associated with model $M$ .
+
+Directly using the pre-trained language model is problematic because it does not operate in the same latent space as model $M$ , whose encoder has been fine tuned for the specific classification task at hand. A simple fix to this problem is to use the fine-tuned encoder of $M$ (which is used to optimize $E^{\prime}$ ) and retrain the associated language modeling head. This produces a language model that operates in the same space as the optimized embedding.
+
+Specifically, we feed each $E_k^{\prime}$ $(k = 1,\dots ,K)$ through the encoder of $M$ and the retrained language modeling head to generate a logit matrix $T_{k}$ of size $|V|\times n$ , where $T_{k}(s,t)$ quantifies the likelihood of observing the $s$ -th token of the vocabulary at the $t$ -th location given the overall context of $E_k^{\prime}$ .
+
+To generate $K$ candidate substitutions for each position $t$ , we iteratively process $T_{1}, \dots, T_{K}$ , selecting the token with the highest logit score excluding the original $x_{t}$ and previous selections. Let $S_{t}^{k}$ be the set of candidate substitutions for position $t$ generated at iteration $k$ considering $T_{k}$ , it is computed as follows.
+
+$$
+\mathcal {S} _ {t} ^ {k} = \mathcal {S} _ {t} ^ {k - 1} \cup \underset {s \notin \mathcal {S} _ {t} ^ {k - 1} \cup x _ {t}} {\operatorname {a r g m a x}} T _ {k} (s, t) \tag {2}
+$$
+
+At the end of this step, we produce a set of $K$ candidate substitutions for each input position.
+
+# 2.2 Evaluating Candidate Substitutions
+
+In the second step, we compute a metric that measures each candidate substitution's capacity to change the classification when applied in combination with other substitutions. Toward this goal, we consider Shapley value, which was originally proposed in cooperative game theory (Shapley, 1951) and has been used to measure feature importance for model interpretability (Lundberg and Lee, 2017).
+
+For a multi-player coalition-based game, the Shapley value of a player represents how valuable the player is as a potential coalition member. In our context, a coalition $L$ is a set of simultaneous substitutions and value $V(L)$ is measured by $L$ 's capacity to change model $M$ 's prediction. Let $X_{L}$ denote the input generated by applying all substitutions in $L$ to $X$ , and $M(X_{L})$ be $M$ 's prediction score. We define $V(L)$ to be $M(X_{L}) - M(X)$ if we wish to flip a negative prediction and $M(X) - M(X_{L})$ otherwise.
+
+The Shapley value of a single substitution $s$ measures the expected marginal value of adding $s$ to a coalition not already containing $s$ . To ensure computational tractability, we constrain the size of the coalition to be a fixed value $c_{s}$ . As such, coalitions of any other sizes will have value zero. Conceptually this measures the potential value of substitution $s$ when we modify exactly $c_{s}$ tokens.
+
+Under this setting, it is straightforward to show that the Shapley value of a single substitution $s$ can
+
+be estimated by the following equation:
+
+$$
+S V (s) = \frac {1}{\left| \mathcal {L} _ {s} \right|} \sum_ {L \in \mathcal {L} _ {s}} V (L) - \frac {1}{\left| \mathcal {L} _ {/ s} \right|} \sum_ {L \in \mathcal {L} _ {/ s}} V (L) \tag {3}
+$$
+
+$\mathcal{L}_s(\mathcal{L}_{/s})$ denotes the set of coalitions containing (not containing) $s$ that satisfy the size constraint.
+
+Fully enumerating $\mathcal{L}_s$ and $\mathcal{L}_{/s}$ to compute Equation 3 is infeasible in most situations. We use two strategies to improve efficiency. First, we apply filtering to remove unimportant locations from further consideration. We adapt the NormGrad saliency method described by Rebuffi et al. (2020) to text and use the following gradient-based saliency score.
+
+$$
+\operatorname {s a l i e n c y} (i) = \left| \left(\nabla_ {e _ {i}} \hat {y}\right) \odot e _ {i} \right| ^ {2} \tag {4}
+$$
+
+where $\nabla_{e_i}\hat{y}$ denotes the gradient of the original classification score $\hat{y}$ with respect to $e_i$ , the embedding of the $i$ -th token, and $\odot$ represents the Hadamard product (elementwise multiplication).
+
+Our second strategy is to approximate the Shapley values by sampling in the space of allowed substitutions. Suppose we want to evaluate each substitution $w$ times on average and there are a total of $N_{s}$ substitutions to be evaluated. It is interesting to note that we do not need $N_{s} \cdot w$ evaluations since each evaluation simultaneously contributes to the estimates of all $c_{s}$ substitutions that it contains.
+
+We apply filtering to consider only the top $C_{max} \times n$ locations, and fix the coalition size to be 50% of that ( $c_s = 0.5 \times C_{max} \times n$ ). Each important location contributes $K$ candidate substitutions. For input of length $n$ , there are $C_{max} \times K \times n$ total substitutions to evaluate. Because each coalition evaluation covers $0.5 \times C_{max} \times n$ substitutions, to evaluate each substitution $w$ times on average, we need to evaluate $2 \times w \times K$ coalitions, which is independent of $n$ and $C_{max}$ .
+
+# 2.3 Constructing the Counterfactual
+
+In the final step, we search for the optimal subset of substitutions via breadth-first beam search. The search space covers all possible subsets of nonconflicting substitutions, each subset corresponding to a unique candidate counterfactual.
+
+We initialize the beam with the root of the search tree, which is the empty subset. At each iteration, we expand a node in the beam with a successor function returning $b$ successors, each adding a single substitution. For a given search node, denoted
+
+by its subset $L$ , we construct $b$ successors by selecting $b$ substitutions with the best Shapley values that do not conflict in location with any $s \in L$ or introduce a redundant subset.
+
+We then evaluate each successor node by applying its substitutions to the original input $X$ and computing model $M$ 's output on the resulting $X'$ . We rank all successors based on the model's score for the desired class $y'$ minus the fraction of tokens modified by the successor in question and populate the new beam with the top $b$ candidates.
+
+We limit the search depth to be $C_{max} \times n$ , constraining our method to never modify more than $C_{max}$ percent of the input tokens. During search, if we generate a candidate that $M$ classifies as $y'$ , we stop immediately and return that candidate as our final output. As such, the time we spend for beam search depends on how quickly we find a successful counterfactual.
+
+# 2.4 Summary of approach
+
+We summarize our method as text Countercounticals via Latent Optimization and Shapley-guided Search (CLOSS). CLOSS has three primary hyperparameters: $K$ , the number of candidate substitutions generated per token locations; $w$ , the average number of times we wish to evaluate each substitution; $b$ , the beam width of the beam search that constructs the final counterfactual. The default values are $K = 30$ , $w = 5$ , $b = 15$ . The impact of these parameters will be explored in the experiments.
+
+# 3 Empirical Evaluation
+
+To evaluate our proposed method, we consider two different text classification tasks: sentiment classification and natural language inferences.
+
+# 3.1 Experimental Setup
+
+Data sources. We use the IMDB dataset (Maas et al., 2011) for sentiment classification. This is a binary classification dataset based on movie reviews from IMDB. For the natural language inference task, we use the QNLI dataset (Rajpurkar et al., 2016), which is a binary task derived from the Stanford question answering dataset. Each example contains a question and a context. The classifier must determine if the context answers the question.
+
+Following the evaluation scheme used by Li et al. (2020a), we sample 1000 random data points from IMDB of length less than or equal to 100 words as
+
+our "short" IMDB data. We do not filter the QNLI dataset. The average word counts for short IMDB and QNLI are shown in Table 1 (row 1).
+
+Classification models. For each task, we consider two classification models, RoBERTa (Liu et al., 2019) and BERT (Devlin et al., 2019), trained by TextAttack (Morris et al., 2020). We report the performance of both models in Table 1 (rows 2-3).
+
+ | IMDB short | QNLI |
| Avg. words | 57.4 | 37.2 |
| RoBERTa acc. | 0.971 | 0.934 |
| BERT acc. | 0.974 | 0.908 |
+
+Table 1: Model and dataset statistics
+
+Evaluation criteria. We consider the following performance metrics that measure the ability of a method to successfully generate counterfactuals and the quality of the generated counterfactuals.
+
+- Failure rate (%F): the percent of inputs for which the method fails to change the model's prediction.
+
+- Fraction of tokens changed (\%C): the average token modification rate among successfully generated counterfactuals.
+
+- BLEU: the average BLEU score between successfully generated counterfactuals and their original inputs.
+
+- Perplexity (P): Following Zang et al. (2020), we use the exponentiated language modeling loss of GPT-2 (Radford et al., 2019) to compute perplexity to score linguistic plausibility.
+
+Baselines. We compare against adversarial baselines because we were unable to find counterfactual methods with open-source implementations. We carefully identified a set of baselines closely related to CLOSS with respect to the methodology, specifically focusing on black box methods that leverage pretrained language models (BERTAttack, BAE), and a white-box method using gradients and beamsearch (Hot-Flip). Unless otherwise stated, we use the implementations in the TextAttack package (Morris et al., 2020). All black-box methods use some saliency measure to prioritize substituting important tokens. While CLOSS estimates saliency from the gradient, the black-box baselines use leave-a-token-out estimates, i.e., by removing or masking a token.
+
+BERT Adversarial Example (BAE) (Garg and
+
+Ramakrishnan, 2020) is a black-box method that generates potential substitutions by masking out input tokens and using the pre-trained BERT language model to suggest replacements.
+
+BERT-Attack (Li et al., 2020b) is also a black-box method. It generates substitutions by feeding the entire unmasked input into the BERT language model to suggest replacements.
+
+Textfloer (Jin et al., 2020) is a black-box method that uses word embeddings by Mrkšić et al. (2016) to generate substitutions by selecting the vocabulary tokens whose embeddings have the highest cosine similarity with the original token.
+
+Probability Weighted Word Saliency (PWWS) (Ren et al., 2019) is a black-box method that uses WordNet synonyms as potential substitutions to preserve the semantic content.
+
+HotFlip (Ebrahimi et al., 2018) is a white-box method that uses model gradients to estimate the impact of every possible token substitution on the model's classification and then applies beam search to generate counterfactuals. HotFlip implemented in TextAttack only works for word or character-level classifiers, not WordPiece (Schuster and Nakajima, 2012) classifiers like RoBERTa and BERT. Hence we implemented our own version of HotFlip3 to be exactly comparable to our method.
+
+Adaptation of adversarial baselines for fair comparison. Adversaries differ from counterfactuals in that they additionally seek to retain the text's "true" class, relative to human judgement. In this regard, generating adversaries is more difficult than generating counterfactuals. Here we adapt the (adversary-generating) baselines to generate counterfactuals, thereby allowing fair comparison.
+
+All original baseline implementations employ certain heuristic constraints to preserve the original semantic content (and thus, true class) of the input. Most methods require a minimum cosine similarity between the Universal Sentence Encoder (Cer et al., 2018) (USE) representations of the modified text with the original input. Additional heuristics include not substituting stop words and requiring substitutions to have the same part-of-speech as the original. These heuristics directly modify the search space for a generation method, and thus can impact both the success and quality of counterfactual generation.
+
+For CLOSS and our implementation of HotFlip, we do not employ such heuristics. Additionally, we created an unconstrained version of the TextAttack (Morris et al., 2020) implementations (denoted by suffix '-U') of all other baselines by removing the adversarial constraints. Arguably, PWWS-U and TextFooler-U remain more constrained than CLOSS because they only use synonyms (WordNet and embedding based, respectively) for substitutions. However, the search spaces of BAE-U, BERT-Attack-U, and HotFlip are fully comparable to CLOSS.
+
+TextAttack by default ignores any input misclassified by the model $M$ , because the concept of an "adversarial" example does not readily extend to misclassified inputs. For counterfactual generation, we do not have this concern. Hence our evaluation seeks to generate a counterfactual that flips the model's classification regardless of its correctness.
+
+Baseline parameters. For HotFlip, we consider two versions: a default version (HotFlip D) that uses parameters suggested by Ebrahimi et al. (2018) and an optimized version (HotFlip O), where the parameters and search procedure are optimized for performance. See Appendix 1 for details of our HotFlip implementations. For all other baselines, we use the default parameters from TextAttack, which are the recommended parameters from the original papers.
+
+# 3.2 Results
+
+We report the results of all methods for short IMDB and QNLI in Table 2. Note that BERT-Attack restrains manipulations of multi-token words in a manner that is computationally intractable on our datasets; thus we do not report performance for the original BERT-Attack. Here we limit all methods to change no more than $15\%$ of tokens by setting $C_{max} = 0.15$ . The impact of different $C_{max}$ values will be explored later in Figure 1.
+
+Comparing to white-box baseline. The default HotFlip implementation substantially underperforms by all measures. Optimizing the parameters and search procedure for HotFlip leads to greatly improved performance. Comparing CLOSS with HotFlip O, we note that the failure rate of our method is slightly worse for QNLI and slightly better for IMDB short. For both datasets, the counterfactuals generated by CLOSS have fewer modifications and higher BLEU scores. The most striking difference is in the perplexity score, where
+
+IMDB short
+
+| Method | RoBERTa | BERT |
| %F | %C | BLEU | P | %F | %C | BLEU | P |
| CLOSS | 4.2 | 3.1 | 0.92 | 72.4 | 4.1 | 2.8 | 0.93 | 98.9 |
| HotFlip D | 37.0 | 6.5 | 0.86 | 145 | 22.8 | 5.2 | 0.89 | 140 |
| HotFlip O | 7.1 | 5.1 | 0.88 | 122 | 4.5 | 4.18 | 0.90 | 129 |
| BAE | 69.4 | 4.6 | 0.86 | 110 | 67.5 | 4.0 | 0.88 | 136 |
| PWWS | 14.6 | 5.9 | 0.83 | 96 | 14.0 | 4.7 | 0.86 | 125 |
| Text,Fooler | 22.3 | 6.3 | 0.82 | 91.5 | 31.9 | 5.7 | 0.83 | 132 |
| BAE-U | 16.6 | 5.7 | 0.85 | 107 | 25.1 | 4.9 | 0.87 | 141 |
| Bert-Attack-U | 6.3 | 4.4 | 0.90 | 78.2 | 22.2 | 4.7 | 0.88 | 120 |
| PWWS-U | 12.1 | 5.9 | 0.83 | 102 | 11.7 | 4.6 | 0.86 | 134 |
| Text,Fooler-U | 12.7 | 5.7 | 0.85 | 93.9 | 21.0 | 5.2 | 0.86 | 142 |
+
+QNLI
+
+| Method | RoBERTa | BERT |
| %F | %C | BLEU | P | %F | %C | BLEU | P |
| CLOSS | 5.1 | 3.3 | 0.92 | 92.4 | 3.5 | 3.3 | 0.92 | 143 |
| HotFlip D | 18.8 | 4.7 | 0.90 | 130 | 19.1 | 4.4 | 0.90 | 174 |
| HotFlip O | 3.4 | 4.0 | 0.90 | 125 | 2.1 | 3.8 | 0.91 | 178 |
| BAE | 34.6 | 3.7 | 0.87 | 94.4 | 33.2 | 4.0 | 0.87 | 175 |
| PWWS | 22.7 | 4.2 | 0.87 | 95.1 | 14.9 | 4.4 | 0.86 | 184 |
| TextFooer | 19.4 | 4.6 | 0.86 | 90.1 | 13.1 | 4.9 | 0.86 | 176 |
| BAE-U | 6.8 | 4.2 | 0.87 | 104 | 6.0 | 4.1 | 0.88 | 178 |
| Bert-Attack-U | 6.7 | 4.0 | 0.89 | 87.1 | 4.9 | 3.8 | 0.90 | 156 |
| PWWS-U | 16.0 | 4.3 | 0.87 | 107 | 8.7 | 4.3 | 0.87 | 201 |
| TextFooer-U | 7.4 | 4.4 | 0.87 | 101 | 4.6 | 4.3 | 0.88 | 180 |
+
+Table 2: Comparison of CLOSS with baselines on the short IMDB and QNLI data. 'U' indicates unconstrained version of the baselines. Our implementation of HotFlip uses exactly the same set of constraints as CLOSS. CLOSS values are averaged over three runs.
+
+CLOSS wins by a large margin. This is not surprising as HotFlip does not care about the semantic plausibility of the generated sentences whereas our method uses the language model to propose semantically plausible substitutions. Note that GPT-2 and RoBERTa are cased models, while BERT is uncased. This explains BERT's higher perplexity.
+
+Comparing to black-box methods. We first observe that the heuristic constraints used by these methods have a drastic impact on the performance. Specifically, by removing these constraints, the failure rates of all methods are much reduced. However, the resulting counterfactuals tend to have lower quality, indicated by increased perplexity. Comparing CLOSS to both variants, we see that our method was able to achieve a highly competitive failure rate with few edits. CLOSS also achieves the lowest perplexity in most cases with the exception of RoBERTa model on QNLI, where BERTAttack-U have slightly lower perplexity.
+
+# 3.3 Impact of Varying $C_{max}$
+
+We considering different $C_{max}$ values including 0.1, 0.15, 0.2, 0.3 and 0.5. Figure 1 plots the perplexity against failure rate for different values of $C_{max}^4$ . Increasing $C_{max}$ allows methods to change more input tokens, reducing their failure rates. However, higher $C_{max}$ also leads to greater distortion of the input, raising the perplexity. Thus, methods with better perplexity/fail rate tradeoffs have curves that fall closer to the lower-left corner of the plots. In this regard, CLOSS has the best performance on all comparisons, except for against BERT-Attack on RoBERTa QNLI, where the two methods appear comparable.
+
+# 3.4 Ablation studies
+
+We consider three ablated versions of CLOSS.
+
+CLOSS-EO removes the optimization step and in
+
+
+(a) BERTIMDB
+
+
+(b) RoBERTa IMDB
+
+
+(c) BERT QNLI
+
+
+(d) RoBERTa QNLI
+Figure 1: Plots of perplexity against failure rate as the maximum allowed percent of tokens changed ( $C_{max}$ ) varies. Values for $C_{max}$ are $10\%$ , $15\%$ , $20\%$ , $30\%$ and $50\%$ . CLOSS values are averaged over three runs.
+
+stead generates potential substitutions by feeding the original input into the default pre-trained language model associated with model $M$ .
+
+CLOSS-RTL skips retraining the language modeling head and uses the language modeling head of the pretrained language model. As a result, the language modeling head for this ablation has a different latent space compared to the fine-tuned encoder of classifier $M$ .
+
+CLOSS-SV removes the Shapley value estimates of each substitution's impact on classification. Instead, we priority substitutions during beam search based on the token saliency (Eq. 4).
+
+We compare the performance of CLOSS with its ablations in Table 3. Here we omit BLEU score because it strongly correlates with $\% \mathrm{C}$ in Tables 2,
+
+Effect of embedding optimization. By removing the optimization step, CLOSS-EO has significantly more failures, but lower perplexity. This is not surprising because optimizing the embedding increases the chance to flip the prediction but carries the risk of producing "unnatural" embeddings that lie outside the space of texts previously observed by the language model. This also sug
+
+gests that CLOSS-EO can be a good candidate for scenarios where "naturalness" of the text is critical.
+
+Effect of retraining language modeling head. It is interesting to note that CLOSS-RTL has comparable perplexity to CLOSS, but a higher failure rate. We believe this is because the retrained language modeling head can generate tokens that better match the data distribution of IMDB and QNLI (but not of English text in general), i.e., the distribution of tokens to which the classifier $M$ is sensitive.
+
+Effect of Shapley values. By removing Shapley value estimates, CLOSS-SV sees substantial degradations in all measures, suggesting critical importance of this step to our method.
+
+# 3.5 Computational Considerations
+
+The estimation of Shapley value for CLOSS incurs a substantial cost in terms of number of queries to the given model. Indeed, the number of queries used by CLOSS can be significantly higher than some baselines5. This section takes a closer look at
+
+ | IMDB | QNLI |
| RoBERTa | BERT | RoBERTa | BERT |
| Method | %F | %C | P | %F | %C | P | %F | %C | P | %F | %C | P |
| CLOSS | 4.2 | 3.13 | 72.4 | 4.1 | 2.76 | 98.9 | 5.1 | 3.33 | 92.4 | 3.5 | 3.31 | 143 |
| CLOSS-SV | 9.4 | 5.73 | 84.5 | 11.6 | 5.06 | 116 | 7.3 | 5.13 | 108 | 6.4 | 5.05 | 159 |
| CLOSS-EO | 7.3 | 3.25 | 63.3 | 8.4 | 3.17 | 94.9 | 7.2 | 3.51 | 72.2 | 6.1 | 3.51 | 122 |
| CLOSS-RTL | 5.5 | 3.2 | 73.7 | 7.5 | 2.9 | 102 | 7.9 | 3.7 | 94.7 | 5.7 | 3.4 | 136 |
+
+Table 3: Ablation results on IMDB and QNLI. Values are averaged over three runs.
+
+
+(a)
+
+
+(b)
+
+
+(c)
+Figure 2: (a) Plot of failure rate of CLOSS and CLOSS-SV as a function of the number of model queries for short IMDB. Beam width ranges from 5 to 20 for both approaches. (b) Plot of failure rate of CLOSS in flipping BERT's prediction as a function of $w$ for both short and long IMDB. (c) Plot of number of BERT model queries used by CLOSS as a function of $w$ for both short and long IMDB.
+
+the computational trade-offs surrounding Shapley value estimations.
+
+Shapley or not. Given the computational cost of estimating Shapley values, would a more thorough search (e.g., using larger beam width) remove the need for computing Shapley values? To explore this question, we consider different beam width $b = 5, 10, 15$ and 20, and plot the resulting failure rates of CLOSS and CLOSS-SV against the number of queries to the model for short IMDB and BERT in Figure 2 (a). The figure shows that even with larger beam width and higher number of queries, the performance of CLOSS-SV still trails behind CLOSS. It also shows that the Shapley value guided search reduces CLOSS's sensitivity to the beam width $b$ both in terms of failure rate and the number of queries needed.
+
+Precision of Shapley. The Shapley value is estimated via sampling and the sampling rate is controlled by the parameter $w$ . Intuitively, larger $w$ leads to more accurate Shapley values, but incurs higher computation cost. We explore how sensitive our method is to the parameter $w$ in Figure 2(b&c).
+
+Specifically, Figure 2(b) plot the failure rate of CLOSS in flipping BERT's prediction for both
+
+short and long IMDB. We see that as long as $w$ is reasonably large ( $\geq 5$ ), the performance is fairly robust. Note that other measures like perplexity and BLEU score show similar trends, which are shown in Figure 3 in the Appendix.
+
+Figure 2(c), on the other hand, plots the average number of queries to model $M$ required with $w$ from 1 to 10. We see an interesting phenomenon for long IMDB where increased $w$ actually leads to decreased number of queries. This may appear counter-intuitive at first sight, it actually demonstrates the power of good Shapley value estimates in speeding up the search. This phenomenon, however, was not observed for the short IMDB data, likely due to the substantially smaller search space thanks to the shorter input length.
+
+# 4 Human and Qualitative Evaluation
+
+Human evaluations. For human evaluations, we choose to compare CLOSS against Bert-Attack and HotFlip O, the two baselines performing the best in perplexity and flip rate respectively.
+
+We randomly selected 100 original texts from IMDB for evaluation with the restriction that all three methods must successfully flip the classification changing $15\%$ or less of the original tokens. Additionally, we exclude texts with more than 50 tokens to ease the burden on evaluators. Using the
+
+BERT classifier, We apply BERT-Attack, CLOSS and HotFlip to generate counterfactuals for each input. Eight human evaluators are each assigned 25 original texts and asked to rank (ties allowed) the three counterfactuals in order of grammatical correctness. Each input is evaluated by two evaluators, the inter-evaluator agreement per pairwise comparison is $75.4\%$ . Human evaluators ranked CLOSS competitively with BERT-Attack and HotFlip, assigning average ranks of 1.54 to CLOSS, 1.68 to Bert-Attack and 2.50 to HotFlip. The difference between CLOSS and HotFlip is statistically significant (one-sided sign test, $p$ -value $< 0.0001$ ).
+
+Qualitative analysis of generated text. Inspecting the generated countnerfactuals, we observe some interesting patterns, summarized below. See Appendix (Tables 5 and 6) for specific examples.
+
+For the IMDB dataset, CLOSS often changes one or two sentiment words while the rest of the input still supports the original prediction. This suggests that the model may be triggered by a few sentiment words, ignoring most input. Identifying such critical substitutions will allow us to inspect the patterns of these "triggers" to reveal the weakness of the classifier. We also observe that when the model misclassifies, it often takes little change to correct the model, which helps debug the mistake.
+
+Sometimes CLOSS introduces synergistic changes where each change's capacity to influence the classification seems contingent on the other. Finally, CLOSS sometimes distorts sentimentphrases into non-words to remove their impact on classification, possibly making up for the lack of ability to remove words.
+
+For the QNLI dataset, unsurprisingly, we note that changing from entailment to non-entailment is far easier than the opposite (see Figures 5(c,d) in Appendix), and often requires changing only a few words shared by the Question and Context. Conversely, CLOSS can sometimes change non-entailment to entailment by introducing some shared word(s). This suggests that the model relies heavily on overlapping words to decide entailment.
+
+More detailed analysis can be found in the Appendix, including how CLOSS's changes are distributed among part of speech tags (Figure 4) and a failure analysis for CLOSS (A.7, Table 7).
+
+# 5 Conclusion
+
+We are motivated by how humans use counterfactuals to explain the concept of a class and seek to
+
+automatically generate counterfactual text input as a means to understand a deep NLP model and its definition of class. We assume full white-box access to the given model and perform optimization in the latent space to maximize the probability of predicting a target class. We then map from the optimized latent representation to candidate token substitutions using a language model. A key novelty of CLOSS is using Shapley values to estimate the potential of a token substitution in changing the model's prediction when used in combination with other substitutions. The Shapley value is then used to guide a breadth-first beam search to generate the final counterfactual. Through both automatic and human evaluations, we show that CLOSS achieves highly competitive performance both in terms of the success rate of generating counterfactuals as well as the quality of the generated counterfactuals.
+
+Our approach has several limitations. As a white-box approach, we require full access to the model, which can be restrictive in practical applications. Our approach currently only considers substitutions, excluding deletions and insertions. Finally, our method is only applicable to models that are based on pre-trained language models. Future work will adapt CLOSS to adversarial and black box settings. We also hope to improve the efficiency of CLOSS via more efficient Shapley value estimation (Chen et al., 2018; Jia et al., 2020).
+
+# Acknowledgements
+
+This work was partially supported by DARPA under grant N66001-17-2-4030.
+
+# References
+
+Nicholas Carlini and David Wagner. 2017. Towards evaluating the robustness of neural networks. In 2017 IEEE symposium on security and privacy (sp), pages 39-57. IEEE.
+Daniel Cer, Yinfei Yang, Sheng yi Kong, Nan Hua, Nicole Limtiaco, Rhomni St. John, Noah Constant, Mario Guajardo-Cespedes, Steve Yuan, Chris Tar, Yun-Hsuan Sung, Brian Strope, and Ray Kurzweil. 2018. Universal sentence encoder.
+Jianbo Chen, Le Song, Martin J. Wainwright, and Michael I. Jordan. 2018. L-shapley and c-shapley: Efficient model interpretation for structured data.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Bert: Pre-training of deep bidirectional transformers for language understanding.
+
+Javid Ebrahimi, Anyi Rao, Daniel Lowd, and Dejing Dou. 2018. Hotflip: White-box adversarial examples for text classification.
+Siddhant Garg and Goutham Ramakrishnan. 2020. Bae: Bert-based adversarial examples for text classification.
+Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. 2014. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572.
+Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. 2017. Toward controlled generation of text. In International Conference on Machine Learning, pages 1587-1596. PMLR.
+Ruoxi Jia, David Dao, Boxin Wang, Frances Ann Hubis, Nick Hynes, Nezihe Merve Gurel, Bo Li, Ce Zhang, Dawn Song, and Costas Spanos. 2020. Towards efficient data valuation based on the shapley value.
+Di Jin, Zhijing Jin, Joey Tianyi Zhou, and Peter Szolovits. 2020. Is bert really robust? a strong baseline for natural language attack on text classification and entailment.
+Dianqi Li, Yizhe Zhang, Hao Peng, Liquin Chen, Chris Brockett, Ming-Ting Sun, and Bill Dolan. 2020a. Contextualized perturbation for textual adversarial attack.
+Linyang Li, Ruotian Ma, Qipeng Guo, Xiangyang Xue, and Xipeng Qiu. 2020b. Bert-attack: Adversarial attack against bert using bert.
+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.
+Scott Lundberg and Su-In Lee. 2017. A unified approach to interpreting model predictions.
+Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. 2011. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 142-150, Portland, Oregon, USA. Association for Computational Linguistics.
+John X. Morris, Eli Lifland, Jin Yong Yoo, Jake Grigsby, Di Jin, and Yanjun Qi. 2020. Textattack: A framework for adversarial attacks, data augmentation, and adversarial training in nlp.
+Nikola Mrkšić, Diarmuid Řeaghdha, Blaise Thomson, Milica Gašić, Lina Rojas-Barahona, Pei-Hao Su, David Vandyke, Tsung-Hsien Wen, and Steve Young. 2016. Counter-fitting word vectors to linguistic constraints.
+
+Lawrence Neal, Matthew Olson, Xiaoli Fern, Weng-Keen Wong, and Fuxin Li. 2018. Open set learning with counterfactual images. In Proceedings of the European Conference on Computer Vision (ECCV).
+D. W. Otter, J. R. Medina, and J. K. Kalita. 2020. A survey of the usages of deep learning for natural language processing. IEEE Transactions on Neural Networks and Learning Systems, pages 1-21.
+Lianhui Qin, Antoine Bosselut, Ari Holtzman, Chandra Bhagavatula, Elizabeth Clark, and Yejin Choi. 2019. Counterfactual story reasoning and generation. 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 5046-5056.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners.
+Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text.
+Sylvestre-Alvise Rebuffi, Ruth Fong, Xu Ji, and Andrea Vedaldi. 2020. There and back again: Revisiting backpropagation saliency methods.
+Shuhuai Ren, Yihe Deng, Kun He, and Wanxiang Che. 2019. Generating natural language adversarial examples through probability weighted word saliency. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1085-1097, Florence, Italy. Association for Computational Linguistics.
+Sebastian Ruder, Matthew E. Peters, Swabha Swayamdipta, and Thomas Wolf. 2019. Transfer learning in natural language processing. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Tutorials, pages 15-18, Minneapolis, Minnesota. Association for Computational Linguistics.
+M. Schuster and K. Nakajima. 2012. Japanese and Korean voice search. In 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 5149-5152.
+Lloyd Shapley. 1951. Notes on the n-person game - ii: The value of an n-person game.
+Akhilesh Sudhakar, Bhargav Upadhyay, and Arjun Maheswaran. 2019. "transforming" delete, retrieve, generate approach for controlled text style transfer. 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 3269-3279, Hong Kong, China. Association for Computational Linguistics.
+
+Mukund Sundararajan and Amir Najmi. 2020. The many shapley values for model explanation.
+
+Ke Wang, Hang Hua, and Xiaojun Wan. 2019. Controllable unsupervised text attribute transfer via editing entangled latent representation.
+
+Tongshuang Wu, Marco Tulio Ribeiro, Jeffrey Heer, and Daniel S. Weld. 2021. Polyjuice: Automated, general-purpose counterfactual generation.
+
+Linyi Yang, Eoin M. Kenny, Tin Lok James Ng, Yi Yang, Barry Smyth, and Ruihai Dong. 2020. Generating plausible counterfactual explanations for deep transformers in financial text classification.
+
+Yuan Zang, Fanchao Qi, Chenghao Yang, Zhiyuan Liu, Meng Zhang, Qun Liu, and Maosong Sun. 2020. Word-level textual adversarial attacking as combinatorial optimization. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6066-6080, Online. Association for Computational Linguistics.
+
+# A Appendix
+
+# A.1 Optimized HotFlip.
+
+For each candidate in original HotFlip's beam search, we score every possible single-token substitution by using gradients to estimate the substitution's impact on the classification. The score of a candidate counterfactual is the sum of the scores of each individual substitution introduced by the candidate.
+
+These scores form a surrogate value function, which the beam search aims to maximize. At each step of the beam search, we can generate the successors (children) for each current beam members (parent) by applying a single substitution to any location in the parent text.
+
+In our optimized HotFlip, we change the search procedure to promote diversity in the beam search by requiring every child generated off a common parent modify distinct locations in the text. We observe that this small modification substantially boost the performance HotFlip's performance. We also increase the beam size from the 10 suggested by Ebrahimi et al. (2018) to 100. Note that the original HotFlip's parameters are designed for character-level modification, which has a substantially smaller space of possible substitutions for each location. This might explain the poor performance of HotFlip D, and the need to modify the search procedure for token-level generation.
+
+# A.2 Average Number of Queries
+
+In Table 4, we present the average number of queries to the given model for CLOSS and baseline
+
+methods. We show two numbers per cell, where the first number is the average query number of all attempts (success or fail). The second number is the average number of queries for successful trials that modify $15\%$ or less of input tokens.
+
+# A.3 Performance when varying $w$
+
+In Figure 3, we plot the other performance measures including $\% \mathrm{C}$ , BLEU and Perplexity, as a function of parameter $w$ .
+
+# A.4 Qualitative Analysis
+
+In tables 5 and 6, we present examples of counterfactuals generated by CLOSS that highlight interesting patterns we notice.
+
+# A.5 Part of Speech Changes
+
+In Figure 4, we show the percentages of total changes that occur in each part of speech type. We split the results by direction of change. Note that for IMDB, CLOSS tends to modify adjectives more when flipping from negative to positive compared to flipping from positive to negative.
+
+When flipping entailment to non-entailment, CLOSS is more likely to modify nouns compared to flipping non-entailment to entailment. This may re
+
+# A.6 Distribution over Percent of Tokens Changed
+
+Figure 5 contains histograms showing the distribution of percent of tokens changed over successfully generated counterfactuals. Note that flipping entailment to non-entailment requires fewer changes than the reverse.
+
+# A.7 Error Analysis
+
+We explore potential sources of counterfactual generation failure in table 7 by significantly increasing the computational resources devoted to certain steps of CLOSS and recording the resulting generation failure rate $(\% \mathrm{F})$
+
+Even greatly increasing $w$ does not reduce $\% \mathrm{F}$ significantly. In comparison, increasing beam width is more effective, especially in regards to IMDB. The most effective interventions are to increase either $K$ or render all tokens salient and scale $w$ in proportion to the associated increase in potential substitutions. Note that when we increase $K$ without changing $w$ , the compute spent on estimating Shapley values scales linearly with $K$ .
+
+| Method | IMDB | QNLI |
| RoBERTa | BERT | RoBERTa | BERT |
| CLOSS | 558|485 | 537|457 | 455|405 | 424|389 |
| HotFlip D | 65.3|47.5 | 51.7|38.0 | 28.7|22.4 | 27.0|19.9 |
| HotFlip O | 305|265 | 234|205 | 90.0|82.3 | 71.0|66.7 |
| BAE | 142|111 | 138|110 | 94.7|81.7 | 97.1|85.7 |
| PWWS | 483|466 | 475|455 | 246|236 | 238|236 |
| Textfooler | 259|190 | 298|171 | 144|102 | 127|104 |
| BAE-U | 424|285 | 494|252 | 172|148 | 180|142 |
| BERT-Attack-U | 277|231 | 451|262 | 172|149 | 182|140 |
| PWWS-U | 575|561 | 568|549 | 299|290 | 290|287 |
| Textfooler-U | 358|272 | 426|259 | 181|152 | 179|145 |
+
+Table 4: Average queries per sample for CLOSS and baselines.
+
+
+(a)
+
+
+(b)
+Figure 3: (a) Plot of average percent tokens changed by CLOSS as a function of $w$ for both short and long IMDB. (b) Plot of CLOSS average BLEU score as a function of $w$ for both short and long IMDB. (c) Plot of CLOSS average perplexity as a function of $w$ for both short and long IMDB.
+
+
+(c)
+
+These results suggest failures in the beam search are more of a bottleneck on performance than failing to identify useful substitutions with Shapley values.
+
+However, we can significantly improve performance by increasing both the pool of potential substitutions and the compute spent on estimating Shapley values. This implies many generation failures happen because the pool of potential substitutions the default CLOSS hyperparameters are able to search through does not contain substitutions able to flip the classification.
+
+| Description | Text |
| (a) We can flip the class by changing a small fraction of the sentiment regions. | Old: Ruth Gordon is one of the more sympathetic killers that Columbo has ever had to deal with. And, the plot is ingenious all the way around. This is one of the best Columbo episodes ever. Mariette Hartley and G. D. Spradlin are excellent in their supporting roles. And Peter Falk delivers a little something extra in his scenes with Gordon. |
| New: Ruth Gordon is one of the more sympathetic killers that Columbo has ever had to deal with. And, the plot is ingenious all the way around. This is one of the worse Columbo episodes ever. Mariette Hartley and G. D. Spradlin are excellent in their supporting roles. And Peter Falk delivers a little something extra in his scenes with Gordon. |
| Old: ruth gordon is one of the more sympathetic killers that columbo has ever had to deal with. and, the plot is ingenious all the way around. this is one of the best columbo episodes ever. mariette hartley and g. d. spradlin are excellent in their supporting roles. and peter falk delivers a little something extra in his scenes with gordon. |
| New: ruth gordon is one of the more sympathetic killers that columbo has ever had to deal with. and, the plot is ingenious all the way around. this is one of the worst columbo episodes ever. mariette hartley and g. d. spradlin are excellent in their supporting roles. and peter falk delivers a little something extra in his scenes with gordon. |
| (b) We sometimes see synergistic changes where each change's capacity to influence the classification seems contingent on the other. | Old: Excellent documentary that still manages to shock and enlighten. Unfortunately, times haven't changed much since this was made and it is thus an important piece for all freedom-conscious Americans to see. |
| New: Very pathetic that still manages to shock and enlighten. Unfortunately, times haven't changed much since this was made and it is thus an important piece for all freedom-conscious Americans to see. |
| Old: I love all his work but this looks like nothing.. sorry.. This looks more like a "David Lynch copycat". I think people like it only because "it's from David Lynch". |
| New: I love all his work but this hits like everything.. sorry.. This looks more like a "David Lynch copycat". I think people like it only because "it's from David Lynch". |
| (c) RoBERTa incor-rectly classified text as positive. Flipping to negative requires little changes. | Old: Some good movies keep you in front of the TV, and you are dying to see the result.This movie does not have highs and lows. It simply describes a young girl's family life in Africa. People come and go, the weather and the background are all the same.New: Some decent movies keep you in front of the TV, and you are dying to see the result.This movie does not have highs and lows. It simply describes a young girl's family life in Africa. People come and go, the weather and the background are all the same. |
| (d) BERT classifies as negative. Greater changes required to flip to positive. | Old: some good movies keep you in front of the tv, and you are dying to see the result,this movie does not have highs and lows. it simply describes a young girl's family life in africa. people come and go, the weather and the background are all the same.New: some good movies keep you in front of the tv, and you are loving to see the result,this movie does not lack highs and lows. it simply describes a young girl's family life in africa. people come and go, the weather and the background are all the same. |
| (e) Sometimes distorts words/grammar; Note how CLOSS re-moves "I loved this" by converging "loved this" into "lovedoo", thereby removing the original's positive sentiment | Old: I loved this mini series. Tara Fitzgerald did an incredible job portraying Helen Graham, a beautiful young woman hiding, along with her young son, from a mysterious past. As an anglophile who loves romances... this movie was just my cup of tea and I would recommend it to anyone looking to escape for a few hours into the England of the 1800's. I also must mention that Toby Stephens who portrays the very magnetic Gilbert Markham is reason enough to watch this wonderful production.New: I lovedoo mini series. Tara Fitzgerald did an incredible job portraying Helen Graham, a beautiful young woman hiding, along with her young son, from a mysterious past. As an anglophile who loves romances... this movie was just my cup of tea and I would recommend it to anyone looking to escape for a few hours into the England of the 1800's. I also must mention that Toby Stephens who portrays the very magnetic Gilbert Markham does reason enough to watch this dreadful production. |
| (f) Non-words can significantly change sentiment classification. "thisecrated" doesn't seem particularly sentiment-related, yet it can flip the classification of this otherwise very positive review. | Old: absolutely fantastic! whatever i say wouldn't do this underrated movie the justice it deserves. watch it now! fantastic!New: absolutely fantastic! whatever i say wouldn't do thisecrated movie the justice it deserves. watch it now! fantastic! |
+
+Table 5: Example IMDB counterfactuals generated by CLOSS. Each row demonstrates an interesting pattern of behavior we observed. We use green to highlight words whose changes flip the text to positive and red for changes that flip texts to negative.
+
+| Description | Text |
| (a) CLOSS can often flip entailment to non-entailment by changing a word that appears in both the Question and Context. | Old: Question: When was Luther's last sermon?
+Context: His last sermon was delivered at Eisleben, his place of birth, on 15 February 1546, three days before his death.
+New: Question: When was Luther's new sermon?
+Context: His last sermon was delivered at Eisleben, his place of birth, on 15 February 1546, three days before his death.
+Old: Question: when was luther's last sermon?
+Context: his last sermon was delivered at eisleben, his place of birth, on 15 february 1546, three days before his death.
+New: Question: when was luther's traveling sermon?
+Context: his last sermon was delivered at eisleben, his place of birth, on 15 february 1546, three days before his death. |
| (b) CLOSS can sometimes induce entailment by changing a word in the Question (Context) to match one in the Context (Question). | Old: Question: Who were the ESPN Deportes commentators for Super Bowl 50?
+Context: On December 28, 2015, ESPN Deportes announced that they had reached an agreement with CBS and the NFL to be the exclusive Spanish-language broadcaster of the game, marking the third dedicated Spanish-language broadcast of the Super Bowl.
+New: Question: Who were the ESPN Deportes agreements for Super Bowl 50?
+Context: On December 28, 2015, ESPN Deportes announced that they had reached an agreement with CBS and the NFL to be the exclusive Spanish-language broadcaster of the game, marking the third dedicated Spanish-language broadcast of the Super Bowl. |
| (c) If lexical overlap fails, we often need many edits to change non-entailment to entailment. | Old: Question: Who was the number two draft pick for 2011?
+Context: This was the first Super Bowl to feature a quarterback on both teams who was the #1 pick in their draft classes.
+New: Question: Who was the show two draft pick for Kate?
+Context: This was the first Super half to feature a Premier on both teams who was the #1 pick in their draft classes. |
+
+Table 6: Example QNLI counterfactuals generated by CLOSS. Each row demonstrates an interesting pattern of behavior we observe. We use green to highlight words whose changes flip the text to entailment and red for changes that flip texts to non-entailment.
+
+| Change | RoBERTa IMDB | BERT IMDB | RoBERTa QNLI | BERT QNLI |
| CLOSS | 4.2 | 4.1 | 5.1 | 3.5 |
| Increase beam width | 0.9 | 0.8 | 2.6 | 3.3 |
| Increase w | 2.1 | 3.2 | 3.9 | 4.0 |
| Increase K | 0.4 | 0.3 | 1.4 | 2.4 |
| Everything salient, fixed w | 6.2 | 9.3 | 6.4 | 4.0 |
| Everything salient, scale w | 0.53 | 0.93 | 0.53 | 0.23 |
+
+Table 7: Shows the impact on failure rate of significantly increasing CLOSS hyperparameters. Beam width increases from 15 to 100, w from 5 to 50, K from 30 to 300.
+
+
+(a) BERTIMDB
+
+
+(b) RoBERTa IMDB
+
+
+(c) BERTQNLI
+
+
+(d) RoBERTa QNLI
+
+
+Figure 4: Barcharts showing how the changes CLOSS makes are distributed among each part of speech tag.
+
+
+
+
+(a) BERT IMDB
+(c) BERTQNLI
+
+
+(b) RoBERTa IMDB
+(d) RoBERTa QNLI
+Figure 5: Histograms showing the distribution of percent of tokens changed over successfully generated counterfactuals.
\ No newline at end of file
diff --git a/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/images.zip b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..a492b9f76dfcc94ffba44d9609cda0dc6362e202
--- /dev/null
+++ b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:98dc0f6b297a88a0eb414e900eb9a80d28374ea69e2cb5ecaeb1e7912674862e
+size 1542082
diff --git a/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/layout.json b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..9bab32cb3fc21d056b2194c7c779f5ec8b9a1eff
--- /dev/null
+++ b/textcounterfactualsvialatentoptimizationandshapleyguidedsearch/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:963af9175fa2aa4792915a52f3f863dc3b4dc50edae102e492f7ec0d5573448e
+size 537044
diff --git a/textdetoxificationusinglargepretrainedneuralmodels/c375685d-d65f-42de-9c5d-aeca13427e8d_content_list.json b/textdetoxificationusinglargepretrainedneuralmodels/c375685d-d65f-42de-9c5d-aeca13427e8d_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..5c42776c6122045731309fd7b850ef16aac57ec5
--- /dev/null
+++ b/textdetoxificationusinglargepretrainedneuralmodels/c375685d-d65f-42de-9c5d-aeca13427e8d_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:29625bd01fbfa2b1e65ca2b3e4c799154a9ae4da5e72944205b9f11f4eb3e8ad
+size 126835
diff --git a/textdetoxificationusinglargepretrainedneuralmodels/c375685d-d65f-42de-9c5d-aeca13427e8d_model.json b/textdetoxificationusinglargepretrainedneuralmodels/c375685d-d65f-42de-9c5d-aeca13427e8d_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..5afb18fb77bda8cf0615c19327447a21f8e206af
--- /dev/null
+++ b/textdetoxificationusinglargepretrainedneuralmodels/c375685d-d65f-42de-9c5d-aeca13427e8d_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6dee8a89c133f675a0e79d22f9a7add8ac5b23b3691f9b3de30155e780ace7f1
+size 149290
diff --git a/textdetoxificationusinglargepretrainedneuralmodels/c375685d-d65f-42de-9c5d-aeca13427e8d_origin.pdf b/textdetoxificationusinglargepretrainedneuralmodels/c375685d-d65f-42de-9c5d-aeca13427e8d_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..617aa84f6a3ac664a93630de4c0c634b5892b0af
--- /dev/null
+++ b/textdetoxificationusinglargepretrainedneuralmodels/c375685d-d65f-42de-9c5d-aeca13427e8d_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:76889d6c49ef13acafefae5853838cdbcf7f25dc45ddc05513fc981ef007e633
+size 531591
diff --git a/textdetoxificationusinglargepretrainedneuralmodels/full.md b/textdetoxificationusinglargepretrainedneuralmodels/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..a0ff22df5f38c1e5a7b490e197f1b029d2cfcb19
--- /dev/null
+++ b/textdetoxificationusinglargepretrainedneuralmodels/full.md
@@ -0,0 +1,448 @@
+# Text Detoxification using Large Pre-trained Neural Models
+
+David Dale†, Anton Voronov‡, Daryna Dementieva‡, Varvara Logacheva‡, Olga Kozlova†, Nikita Semenov†, and Alexander Panchenko‡
+
+$^{\ddagger}$ Skolkovo Institute of Science and Technology, Moscow, Russia
+
+†Mobile TeleSystems (MTS), Moscow, Russia
+
+{d.dale,anton.voronov,daryna.dementieva,v.logacheva,a.panchenko} @skoltech.ru
+
+{oskozlo9,nikita.semenov} $@$ mts.ru
+
+# Abstract
+
+We present two novel unsupervised methods for eliminating toxicity in text. Our first method combines two recent ideas: (1) guidance of the generation process with small style-conditional language models and (2) use of paraphrasing models to perform style transfer. We use a well-performing paraphraseer guided by style-trained language models to keep the text content and remove toxicity. Our second method uses BERT to replace toxic words with their non-offensive synonyms. We make the method more flexible by enabling BERT to replace mask tokens with a variable number of words. Finally, we present the first large-scale comparative study of style transfer models on the task of toxicity removal. We compare our models with a number of methods for style transfer. The models are evaluated in a reference-free way using a combination of unsupervised style transfer metrics. Both methods we suggest yield new SOTA results.
+
+# 1 Introduction
+
+Identification of toxicity in user texts is an active area of research (Zampieri et al., 2020; D'Sa et al., 2020; Han and Tsvetkov, 2020). The task of automatic rewriting of offensive content attracted less attention, yet it may find various useful applications such as making online world a better place by suggesting to a user posting a more neutral version of an emotional comment. The existing works on text detoxification (dos Santos et al., 2018; Tran et al., 2020; Laugier et al., 2021) cast this task as style transfer. The style transfer task is generally understood as rewriting of text with the same content and with altering of one or several attributes which constitute the "style", such as authorship (Voigt et al., 2018), sentiment (Shen et al., 2017), or degree of politeness (Madaan et al., 2020). Despite the goal of preserving the content, in many cases changing the style attributes changes the meaning of a sen
+
+tence significantly. $^{1}$ So in fact the goal of many style transfer models is to transform a sentence into a somewhat similar sentence of a different style on the same topic. $^{2}$ We suggest that detoxification needs better preservation of the original meaning than many other style transfer tasks, such as sentiment transfer, so it should be performed differently.
+
+We present two models for text detoxification, which have extra control for content preservation. The first model, ParaGeDi, is capable of fully regenerating the input. It is based on two ideas: external control of an output of a generation model by a class-conditioned LM (Krause et al., 2020) and formulation of style transfer task as paraphrasing (Krishna et al., 2020). Being based on a paraphrase model, ParaGeDi explicitly aims at preserving the meaning of the original sentence. The second approach, CondBERT, inspired by Wu et al. (2019a), follows the pointwise editing setup. It uses BERT to replace toxic spans found in the sentence with their non-toxic alternatives. The semantic similarity is maintained by showing the original text to BERT and reranking its hypotheses based on the similarity between the original words and their substitutes. Interestingly, BERT does not need any class-conditional pre-training to successfully change the text style from toxic to normal.
+
+In addition, we perform a large-scale evaluation of style transfer models on detoxification task, comparing our new models with baselines and state-of-the-art approaches. We release our code and data.
+
+Our contributions are as follows:
+
+- We propose two novel detoxification methods based on pre-trained neural language models: ParaGeDi (paraphrasing GeDi) and CondBERT (conditional BERT).
+
+- We conduct an evaluation of these models and their comparison with a number of state-of-the-art models for text detoxification and sentiment transfer and release the detoxification dataset.
+- We create an English parallel corpus for the detoxification task by retrieving toxic/safe sentence pairs from the ParaNMT dataset (Wieting and Gimpel, 2018). We show that it can further improve our best-performing models.
+
+# 2 Related Work
+
+One of the most straightforward ways of solving style transfer task is to "translate" a source sentence into the target style using a supervised encoder-decoder model (Rao and Tetreault, 2018). Since the source and the target are in the same language, pretrained LMs such as GPT-2 (Radford et al., 2019) can be applied for this task — fine-tuning them on relatively small parallel corpora gives a good result (Wang et al., 2019). However, this method is used quite rarely because of the lack of sufficiently large parallel data. The rest of described models are trained in an unsupervised way.
+
+Pointwise Editing Models A relatively easy yet efficient style transfer method is to leave the sentence intact and manipulate only individual words associated with the style. Delete-Retrieve-Generate (DRG) framework (Li et al., 2018) was the first effort to perform such transfer. It proposes four methods based on this principle. Two of them perform well on our data: DRG-RetrieveOnly retrieves a sentence with the opposite style which is similar to the original sentence and returns it, and DRG-TemplateBased takes the style attributes from it and plugs them into the original sentence. Here, the performance depends on the methods for the identification of style markers and retrieval of replacements. Words associated with style are typically identified either based on their frequencies as in the original paper, some works use attention weights as features (Sudhakar et al., 2019).
+
+Alternatively, style transfer can use Masked Language Modelling (MLM). An MLM trained on a dataset with style labels picks a replacement word based not only on the context, but also on the style label. An example of such model is Mask & Infill (Wu et al., 2019b). It is most similar to CondBERT method we propose. However, CondBERT performs additional control over the style and the content preservation and is able to make multi-word replacements. Another similar model
+
+of this type is described by Malmi et al. (2020). It has a more complicated structure: there, two MLMs trained on corpora of different styles perform replacements jointly.
+
+End-to-end Architectures In contrast to these models, there exist end-to-end architectures for style transfer. They encode the source sentence, then manipulate the resulting hidden representation in order to incorporate a new style, and then decode it. Some of them disentangle the hidden representation into the representation of content and style (John et al., 2019). The others force the encoder to represent style-independent content (Hu et al., 2017). Alternatively, the model DualRL by Luo et al. (2019) performs a direct transfer from the source to the target style. The task is paired with the dual task (back transfer to the source style) which allows models to train without parallel data. The Deep Latent Sequence Model (DLSM) model by He et al. (2020) uses amortized variational inference to jointly train models for the primal and dual tasks. The Stable Style Transformer (SST) method (Lee, 2020) trains a pair of sequence-to-sequence transformers for primal and dual tasks using cross-entropy of a pretrained style classifier as an additional discriminative loss. The Style Transfer as Paraphrase (STRAP) method by Krishna et al. (2020) views a style transfer model as a paraphraser that adds attributes of a particular style to a text. The authors create pseudo-parallel data by transferring style-marked texts to neutral with a pre-trained general-purpose paraphraser and then train sequence-to-sequence models on these neutral-to-styled parallel datasets. Our ParaGeDi model is conceptually similar to these methods. However, unlike these methods, the style is not infused into the model or a sentence representation but is imposed on the generator by another model.
+
+Detoxification Detoxification of text is a relatively new style transfer task. The first work on this topic by (dos Santos et al., 2018) is an end-to-end seq2seq model trained on a non-parallel corpus with autoencoder loss, style classification loss and cycle-consistency loss. A more recent work by Tran et al. (2020) uses a pipeline of models: a search engine finds non-toxic sentences similar to the given toxic ones, an MLM fills the gaps that were not matched in the found sentences, and a seq2seq model edits the generated sentence to make it more fluent. Finally, Laugier et al. (2021)
+
+detoxify sentences by fine-tuning T5 as a denoising autoencoder with additional cycle-consistency loss. Dathathri et al. (2020) and Krause et al. (2020) approach a similar problem: preventing a language model from generating toxic text. They do not need to preserve the meaning of the input text. However, the idea of applying a discriminator to control an LM during generation can be used for style transfer, as we show in our experiments.
+
+# 3 Paraphrasing GeDi Model
+
+The recently proposed GeDi model (Krause et al., 2020) performs text generation from scratch guided by a language model informed about specific attributes of a text, e.g. style or topic. We extend this model by enabling it to paraphrase the input text.
+
+# 3.1 GeDi
+
+The original GeDi model consists of two components: a generation model (GPT-2) and a discrimination model, which is also a GPT-2 trained on sentences with additional sentence-level style labeling — during training the style label is prepended to a sentence. This makes the discriminating model learn the word distributions conditioned on a particular label. At each generation step, the distribution of the next token predicted by the main model $P_{LM}$ is modified using an additional class-conditional language model $P_{D}$ and the Bayes rule:
+
+$$
+P \left(x _ {t} \mid x _ {< t}, c\right) \propto P _ {L M} \left(x _ {t} \mid x _ {< t}\right) P _ {D} \left(c \mid x _ {t}, x _ {< t}\right)
+$$
+
+Here, $x_{t}$ is the current token, $x_{< t}$ is the prefix of the text, and $c$ is the desired attribute (e.g. toxicity or sentiment) — one of $C$ classes. The first term is produced by the main language model $P_{LM}$ , and the second term is calculated using the Bayes rule and the additional class-conditional language model $P_{CC}$ . Thus, the tokens which are more likely to appear in a text of the chosen style get a higher probability:
+
+$$
+P _ {D} (c \mid x _ {t}, x _ {< t}) \propto P (c) P _ {C C} (x, x _ {< t} \mid c)
+$$
+
+The name GeDi stands for Generative Discriminator, because a language model, which is generative by its nature, is used as a discriminator for guiding the generation process. GeDi was successfully applied to guiding a GPT-2 language model towards generating texts of particular topics and making the generated text less toxic.
+
+# 3.2 ParaGeDi
+
+In order to enable GeDi to preserve the meaning of the input text, we replace the regular language
+
+
+Figure 1: The overview of ParaGeDi model.
+
+model in it with a model capable of paraphrasing. If we denote the original text by $x$ , the generated text of length $T$ by $y$ , and the desired style by $c$ , ParaGeDi models the following probability:
+
+$$
+\begin{array}{l} P (y _ {t} | y _ {< t}, x, c) \propto P _ {L M} (y _ {t} | y _ {< t}, x) P (c | y _ {t}, y _ {< t}, x) \\ \approx P _ {L M} \left(y _ {t} \mid y _ {< t}, x\right) P _ {D} \left(c \mid y _ {t}, y _ {< t}\right) \\ \end{array}
+$$
+
+The last step is an approximation because the class probability should be conditioned on both $x$ and $y$ . However, this approximation, although not being fully justified, allows us to decouple the paraphrase model (which requires a parallel corpus for training) from the style model (which requires only texts with style labels, not necessarily parallel). The paraphrase and the style model can be trained independently. Moreover, we can plug in any paraphrase as long as it shares the vocabulary with the class-conditional LM. The third (optional) component of this model is a reranker — an external model which reweighs the hypotheses generated by the style LM-guided paraphrase with respect to the style. Our reranker is a pre-trained toxicity classifier which chooses the least toxic hypothesis generated by the ParaGeDi model. Figure 1 illustrates the workflow of our model.
+
+ParaGeDi is trained as follows. Its loss $\mathcal{L}_{ParaGeDi}$ consists of a linear combination of two losses: the generative loss $\mathcal{L}_G$ used in LM training, and the discriminative loss $\mathcal{L}_D$ which further pushes different classes away from one another.
+
+$$
+\begin{array}{l} \mathcal {L} _ {G} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \frac {1}{T _ {i}} \sum_ {t = 1} ^ {T _ {i}} \log P (y _ {t} ^ {(i)} | y _ {< t} ^ {(i)}, c ^ {(i)}) \\ \mathcal {L} _ {D} = - \frac {1}{N} \sum_ {i = 1} ^ {N} \log P (c ^ {(i)} | y _ {1: T _ {i}} ^ {(i)}) \\ \mathcal {L} _ {P a r a G e D i} = \lambda \mathcal {L} _ {D} + (1 - \lambda) \mathcal {L} _ {G} \\ \end{array}
+$$
+
+We enhance the model with a number of inference heuristics that improve content preservation and increase the style transfer accuracy. First, we use a heuristic from the original GeDi model. We raise the conditional LM probability to the power $w > 1$ , which biases the discriminator towards the correct class during generation:
+
+$$
+P (y _ {t} | y _ {< t}, x, c) \propto P _ {L M} (y _ {t} | y _ {< t}, x) P _ {C C} (c | y _ {t}, y _ {< t}) ^ {w}
+$$
+
+Besides that, we suggest two new heuristics:
+
+Smoothing of probabilities - adding a small $\alpha > 0$ to all probabilities from the conditional language model discourages the generation of tokens with low probability conditional on all classes:
+
+$$
+P _ {\alpha} (c | x _ {t}, x _ {< t}) = \frac {\alpha + P (c) P _ {C C} (x , x _ {< t} | c)}{\sum_ {c ^ {\prime} \in C} (\alpha + P (c ^ {\prime}) P _ {C C} (x , x _ {< t} | c ^ {\prime}))}
+$$
+
+Asymmetric lower and upper bounds ( $l$ and $u$ ) for class-conditional corrections:
+
+$$
+P _ {\alpha , l, u} \left(c \mid x _ {t}, x _ {< t}\right) = \max \left(l, \min \left(u, P _ {\alpha} \left(c \mid x _ {t}, x _ {< t}\right)\right)\right).
+$$
+
+By decreasing the value of $u$ we discourage the insertion of new tokens, as opposed to prohibiting existing tokens. For the problem of detoxification, it means that the model will try less to insert polite words than to delete toxic words from the sentence.
+
+# 4 Conditional BERT Model
+
+BERT (Devlin et al., 2019) has been trained on the task of filling in gaps ("masked LM"), we can use it to insert non-toxic words instead of the toxic ones. This approach has been suggested by Wu et al. (2019a) as a method of data augmentation. The authors identify words belonging to the source style, replace them with the [MASK] token, and the BERT model then inserts new words of the desired style in the designated places. To push BERT towards the needed style, the authors fine-tune BERT on a style-labelled dataset by replacing segmentation embeddings of original BERT with trainable style embeddings.
+
+We perform some changes to this model to adapt it for the detoxification task. While in the original conditional BERT model the words are masked randomly, we select the words associated with toxicity. This can be done in different ways, e.g. by training a word-level toxicity classifier or manually creating a vocabulary of rude and toxic words. We use a method which does not require any additional data or human effort. We train a logistic
+
+bag-of-words toxicity classifier. This is a logistic regression model which classifies sentences as toxic or neutral and uses their words as features. As a byproduct of the training process, each feature (word) yields a weight which roughly corresponds to its importance for classification. The words with the highest weights are usually toxic. We use the normalised weights from the classifier as toxicity score. The overview of CondBERT is shown in Figure 2.
+
+
+Figure 2: The overview of the CondBERT model.
+
+For each word in a sentence, we compute the toxicity score and then define toxic words as the words with the score above a threshold $t = \max(t_{min}, \max(s_1, s_2, \dots, s_n) / 2)$ , where $s_1, s_2, \dots, s_n$ are scores of all words in a sentence and $t_{min} = 0.2$ is a minimum toxicity score. This adaptive threshold allows balancing the percentage of toxic words in a sentence so that we avoid cases when too many or no words are marked as toxic.
+
+To preserve the meaning of the replaced word, we employ the content preservation heuristics suggested by Arefyev et al. (2020): (i) Preserve the original tokens instead of masking them before the replacement; (ii) Rerank the replacement words suggested by BERT by the similarity of their embedding with the embedding of the original word.
+
+Despite using class-specific sentence embeddings, conditional BERT often predicts toxic words, apparently paying more attention to the context than to the embeddings of the desired class. To force the model to generate non-toxic words we calculate the toxicity of each token in BERT vocabulary and penalize the predicted probabilities of tokens with positive toxicities.
+
+Finally, we enable BERT to replace a single [MASK] token with multiple tokens. We generate each next token progressively by beam search and score each multitoken sequence by the harmonic mean of the probabilities of its tokens.
+
+# 5 Detoxification Experiments
+
+We train the two new models and a number of other systems for text detoxification. Below we describe datasets, evaluation setup, and results.
+
+# 5.1 Toxicity Classifier
+
+We train two binary classifiers of toxicity. One of them is used to rerank hypotheses in the ParaGeDi model, and the other participates in the evaluation. We train these two classifiers on different sets of data. The overall dataset is the merge of the English parts of the three datasets by Jigsaw (Jigsaw, 2018, 2019, 2020), containing around 2 million examples. We split it into two parts and fine-tune a RoBERTa model (Liu et al., 2019) on it. We use the roberta-large model from the original repository. The classifiers perform closely on the test set of the first Jigsaw competition, reaching the AUC-ROC of 0.98 and $\mathrm{F_1}$ -score of 0.76.
+
+# 5.2 Dataset
+
+For training and testing of the style transfer models, we use the English data from the first Jigsaw competition (Jigsaw, 2018). The majority of our methods are trained on non-parallel corpora of source and target styles. To prepare the toxic dataset, we divide the comments labelled as toxic into sentences (the original comments are often too long) and classify each of them with our toxicity classifier. Sentences classified as toxic are used as the toxic part of the dataset (we find 154,771 of them). To select the neutral part of the dataset, we randomly pick the same number of non-toxic sentences from the sentence-separated Jigsaw data. The test set is prepared analogously to the test set of the Jigsaw competition: we use 10,000 sentences with the highest toxicity score according to our classifier.
+
+# 5.3 Metrics
+
+There is no parallel test set available for the detoxification task, so we cannot use BLEU, METEOR or ROUGE metrics and resort to referenceless evaluation. Style transfer models need to change the style, preserve content and produce a fluent text. These parameters are often inversely correlated, so we need a compound metric to find a balance between them. We follow the evaluation strategy of Krishna et al. (2020) and use the metric $\mathbf{J}$ , which is the multiplication of sentence-level style accuracy, content preservation, and fluency. The system-level $\mathbf{J}$ is the average of sentence-level scores. Style accu
+
+racy (ACC) is measured with a pre-trained toxicity classifier described in Section 5.1. Content preservation (SIM) is evaluated as the similarity of sentence-level embeddings of the original and transformed texts computed by the model of Wieting et al. (2019). Fluency (FL) measured with the classifier of linguistic acceptability trained on the CoLA dataset (Warstadt et al., 2019). J is computed as the average of their sentence-level product. In addition to that, we tried a similar aggregated metric GM (Pang and Gimpel, 2019; Laugier et al., 2021) which uses perplexity as the measure of fluency and employs a different aggregation method. Our preliminary experiments showed that J and GM are strongly correlated, so we keep only J for further evaluation.
+
+# 5.4 Implementation Details
+
+For ParaGeDi, we use a pre-trained T5-based (Raffel et al., 2020) paraphraser, $^{4}$ fine-tuned on a random subsample of the ParaNMT dataset (Wieting and Gimpel, 2018). As a discriminator, we fine-tune the gpt2-medium model (Radford et al., 2019) on the training part of the Jigsaw-1 dataset using two control codes for toxic and polite texts. Before fine-tuning, we change the vocabulary of the discriminator to match that of T5, and update its embeddings accordingly. We train the discriminator using a combined generative and discriminative loss from Krause et al. (2020), adapting their code for this purpose.
+
+We use beam search decoding with 10 beams to generate paraphrase candidates with the paraphraseer and discriminator described above. We apply the classifier from section 5.1 to select the least toxic candidate from the 10 resulting paraphrases.
+
+# 5.5 Competing Methods
+
+We compare our models with state-of-the-art methods described in Section 2: DRG-TemplateBased, DRG-RetrieveOnly, Mask&Infill, DLSM, STRAP, and SST. We also implement three other baselines: Machine Translation, Detoxifying GPT-2, and Paraphraser. We do not directly compare our models with GeDi, because it is a language model and was not explicitly trained to transform texts.
+
+Machine Translation There is evidence that automatic translation tends to eliminate toxicity (Prabhumoye et al., 2018). Thus, we use a chain
+
+of Machine Translation models for detoxification. Namely, we perform English $\rightarrow$ Pivot $\rightarrow$ English translation. We choose French and Igbo as pivot languages. French is resource-rich and structurally similar to English, which ensures high-quality translations. Conversely, Igbo is low-resourced and syntactically different. Both experiments are conducted using Google Translate API.
+
+Detoxifying GPT-2 GPT-2 (Radford et al., 2019) can be adapted to a wide range of NLP tasks using a very small task-specific dataset. We experiment with the model's ability to perform sequence-to-sequence tasks. We train it on a parallel dataset of 200 toxic and safe sentences. We randomly select toxic sentences from the Google Jigsaw toxic comments dataset (Jigsaw, 2018) and manually rewrite them in the neutral tone.
+
+Paraphraser Krishna et al. (2020) suggest that a general-purpose paraphrase can remove style markers from text. We check this assumption.
+
+# 5.6 Results
+
+The performance of all tested models is given in Table 1. Both ParaGeDi and CondBERT outperform other models by a large margin. The success of CondBERT is explained by its use of heuristics targeted at the components of the metric: (i) it is penalized for generating toxic tokens, which ensures a high ACC score, (ii) over $80\%$ tokens stay unchanged, and the replacements are selected with respect to the similarity to the original words, increasing the overall SIM score, (iii) MLM is pretrained to replace masked tokens with plausible substitutes, increasing FL. ParaGeDi is behind in terms of similarity but has a slightly higher fluency because generation is a better strategy in terms of text naturalness than pointwise corrections. The closest competitor of our models is Mask&Infill which uses similar principles as CondBERT. However, some engineering decisions (e.g. masking of all words at once) result in a substantial drop in fluency and some decrease in style transfer accuracy.
+
+Surprisingly, many advanced models perform below the simplistic (DRG) models TemplateBased and RetrieveOnly. TemplateBased achieves a high similarity because it keeps most of the original sentence intact, and RetrieveOnly yields a high similarity and style transfer accuracy, because it outputs real non-toxic sentences from the training data. DLSM and SST models perform full re-generation of text (as opposed to pointwise corrections). More
+
+importantly, their decoders are trained from scratch on a relatively small dataset, hence their low fluency scores. Conversely, STRAP, which also generates the sentence, has the access to the larger pseudo-parallel data, resulting in higher fluency.
+
+Another finding is that MT has detoxification ability. However, it is inversely correlated with its quality: the $\mathrm{En}\rightarrow \mathrm{Ig}\rightarrow \mathrm{En}$ detoxifies $37\%$ of sentences but has low SIM and FL scores. Conversely, $\mathrm{En}\rightarrow \mathrm{Fr}\rightarrow \mathrm{En}$ yields a better output which keeps most of the original features, including toxicity. The same applies to the T5 paraphraseer. On the other hand, the GPT-2 model can be trained to detoxify even on a very small number of parallel sentences (200 in our experiments). Although it performs below many other models, we suggest that training it on a larger parallel dataset can boost its performance. We show examples of the paraphrases by the best-performing models in Table 2.
+
+Additional examples and qualitative analysis can be found in Appendices F and E, respectively.
+
+# 5.7 Parameter Selection
+
+Our models use multiple parameters and heuristics. We perform an ablation study to explore their usefulness. It turns out that the crucial features of CondBERT are multiword replacement which ensures high fluency and toxicity penalty which increases style strength. On the other hand, masking of all tokens at once as well as control of similarity do not affect the quality. More details on the CondBERT ablation study are given in Appendix B.
+
+ParaGeDi has only one training hyperparameter $\lambda$ which controls the strength of its discriminative loss. We discover its value has only a marginal effect on the overall quality: the value of $\mathbf{J}$ decreases only for $\lambda = 1$ which constitutes the absence of generative loss (see Figure 3). The style strength control influences the style accuracy, whereas the use of word probability upper bound increases the similarity, and the absence of beam search decreases fluency. On the other hand, reranking, beam size, smoothing do not affect the model performance. An ablation study of the ParaGeDi model can be found in Appendix C.
+
+# 6 Mining a Parallel Detoxifying Corpus
+
+The STRAP model (Krishna et al., 2020) is based on the assumption that a regular paraphrase can transform a stylistically marked text into a neutral text. Although our experiments show that a para-
+
+| Model | ACC | SIM | FL | J |
| CondBERT (ours) | 0.94 | 0.69 | 0.77 | 0.50 ± 0.0037* |
| ParaGeDi (ours) | 0.95 | 0.66 | 0.80 | 0.50 ± 0.0032* |
| Mask&Infill (Wu et al., 2019b) | 0.78 | 0.80 | 0.49 | 0.31 ± 0.0041 |
| DRG-TemplateBased (Li et al., 2018) | 0.66 | 0.82 | 0.59 | 0.30 ± 0.0041 |
| DRG-RetrieveOnly (Li et al., 2018) | 0.93 | 0.33 | 0.84 | 0.26 ± 0.0019 |
| DLSM (He et al., 2020) | 0.62 | 0.72 | 0.48 | 0.17 ± 0.0033 |
| Detoxifying GPT-2 (baseline) | 0.54 | 0.48 | 0.72 | 0.17 ± 0.0026 |
| STRAP (Krishna et al., 2020) | 0.29 | 0.69 | 0.80 | 0.15 ± 0.0027 |
| En→Ig→En MT (baseline) | 0.37 | 0.68 | 0.57 | 0.12 ± 0.0025 |
| T5 paraphraser (baseline) | 0.15 | 0.90 | 0.87 | 0.11 ± 0.0029 |
| SST (Lee, 2020) | 0.80 | 0.55 | 0.12 | 0.05 ± 0.0019 |
| En→Fr→En MT (baseline) | 0.06 | 0.91 | 0.81 | 0.04 ± 0.0019 |
+
+Table 1: Performance of detoxification models. Gray lines denote baselines, green lines denote models suggested in this work. The models are sorted with respect to the aggregated J score. The asterisk * denotes the scores that are significantly higher than the third best model (Mask&Infill) with $p < 0.01$ , based on the paired t-test.
+
+| Input | no room for those stupid antics . |
| ParaGeDi (ours) | There's no space for all those adversities. |
| CondBERT (ours) | no room for those . . . those bizarre exploits . |
| Mask&Infill | no room for those compelling antics . |
| DRG-TemplateBased | no room for those conventions antics . |
| Input | zoological conspiracy theories ( arabisraeli conflict ) , by contrast , sucks horribly . |
| ParaGeDi (ours) | By contrast, the zoological theories of conspiracy (the Arab-Israeli conflict) suffer horribly. |
| CondBERT (ours) | zoological conspiracy theories ( arabisraeli conflict ) , by contrast , worked out badly . |
| Mask&Infill | zoological conspiracy theories ( arabisraeli conflict ) , by contrast , ends horribly . |
| DRG-TemplateBased | zoological conspiracy theories ( arabisraeli conflict ) , by contrast , instrumental horribly . |
| Input | this whole article is bullshit . |
| ParaGeDi (ours) | This article's not a good deal. |
| CondBERT (ours) | this whole article is considered incomplete . |
| Mask&Infill | this whole article is compelling . |
| DRG-TemplateBased | this whole article is substantially . |
+
+
+Figure 3: Performance of ParaGeDi with the varying $\lambda$ parameter (greater $\lambda$ corresponds to the stronger influence of the discriminative loss and smaller $\lambda$ means the stronger influence of the generative loss).
+
+phrasing, as well as an MT model, are bad detoxifiers on their own (see Section 5.6), we suggest that it is possible to find occasional detoxifying sentence pairs in a large parallel dataset of paraphrases.
+
+Experimental Setup To test this hypothesis, we classify the sentences from the ParaNMT para
+
+Table 2: Examples of detoxification by different models.
+
+| Model | ACC | SIM | FL | J |
| Paraphraser |
| regular | 0.15 | 0.90 | 0.87 | 0.11 ±0.003 |
| mined | 0.42 | 0.87 | 0.91 | 0.31 ±0.004 |
| ParaGeDi |
| regular | 0.94 | 0.66 | 0.77 | 0.50 ±0.003 |
| mined | 0.98 | 0.66 | 0.84 | 0.54 ±0.003 |
+
+Table 3: Comparison of paraphrasers for ParaGeDi.
+
+phrase dataset (Wieting and Gimpel, 2018) with our toxicity classifier described in Section 5.1 and obtain 500,000 paraphrase pairs where one sentence is more toxic than the other (for more details on the data collection process please see Appendix D). We then compare the regular paraphraser from Section 5.4 fine-tuned on a random subset of ParaNMT (regular) with its version fine-tuned on the mined toxic/safe parallel paraphrase corpus (mined). We also plug both paraphrasers into ParaGeDi model and compare the overall performance. The results are shown in Table 3.
+
+Discussion of Results None of the paraphrasers
+
+can fully detoxify the test set, but the mined paraphraseer gets a better ACC than the regular one (42% vs 15%). When we replace the regular paraphraseer with the detoxifying one in ParaGeDi, both detoxification rate and fluency improve without loss in the similarity score. This leaves us with the J score of 0.54, which is the highest score we obtained in our detoxification experiment. We do not include it in the main results (Table 1) because this model is not unsupervised. However, this result shows that the general-purpose ParaNMT corpus contains a large number of toxic/safe paraphrase pairs. We believe that mining parallel training sets from large corpora, as opposed to unsupervised methods of style transfer, is a fruitful direction.
+
+# 7 Human Evaluation of Detoxification
+
+While the automatic reference-free evaluation is cheap and fast, it may be unreliable. Toxicity and fluency classifiers are not perfect and can return erroneous evaluations. The embedding distance which is used to measure the content preservation was shown to weakly correlate with human judgements (Yamshchikov et al., 2021). Thus, we evaluate the best-performing models manually.
+
+Experimental Setup We design our manual evaluation setup to be as close as possible to the automatic evaluation. We evaluate our models along the same three metrics: style accuracy $(\mathrm{ACC}_m)$ , content similarity $(\mathrm{SIM}_m)$ , and fluency $(\mathrm{FL}_m)$ . For all metrics we use a ternary scale: $\{0, 0.5, 1\}$ corresponding to a bad, partially acceptable, and fully acceptable sentence.
+
+We ask five annotators to evaluate the models. Annotators are NLP researchers with MSc degree or above and with a good command of English. Prior to the annotation, we arranged a preliminary round to reach common annotation understanding. Each sentence is evaluated by three annotators, the final score for a sentence is computed as the average of their scores. We measure the inter-annotator agreement in terms of Krippendorff's $\alpha$ . We obtained the score of 0.42 for the style accuracy, 0.31 for content preservation, and 0.52 for fluency: a moderate agreement for style and fluency annotation, and low agreement for content annotation.
+
+We evaluate three models: our new models ParaGeDi and CondBERT, and Mask&Infill whose automatic scores were the highest among the existing models. The evaluation was conducted on 200 source sentences, each of them was transformed
+
+ | ACCm | SIMm | FLm | Jm |
| ParaGeDi (ours) | 93.41 | 64.75 | 91.25 | 55.34 |
| CondBERT (ours) | 91.00 | 63.92 | 86.41 | 50.47 |
| Mask&Infill (top 1) | 75.33 | 59.08 | 62.08 | 27.33 |
+
+Table 4: The results of manual evaluation sorted by $\mathbf{J}_{\mathbf{m}}$ . The differences between our models and Mask&Infill are statistically significant with $\alpha < 0.05$ based on the paired $t$ -test. Differences between ParaGeDi and CondBERT are significant only for the $\mathrm{FL}_m$ metric.
+
+by each of the evaluated models. The input (toxic) sentences for the evaluation were manually pre-selected to filter out disfluent or senseless utterances (this pre-selection did not consider the outputs). To compensate for the low inter-annotator agreement, we annotate each sample three times and report the average score.
+
+Discussion of Results We show the performance of models in terms of human evaluation in Table 4. The model scores are the averaged sentence scores. We combine the three metrics into a joint quality score which we denote as $\mathbf{J}_{\mathbf{m}}$ . Sentence-level $\mathbf{J}_{\mathbf{m}}$ is a multiplication of sentence $\mathrm{ACC}_m$ , $\mathrm{SIM}_m$ , and $\mathrm{FL}_m$ , and the model $\mathbf{J}_{\mathbf{m}}$ scores are the average of sentence scores. This manual evaluation corroborates the superiority of our models over Mask&Infill model. At the same time, it confirms that our two models are not significantly different. Although ParaGeDi outperforms CondBERT in terms of all metrics, the difference in scores is statistically significant only for $\mathrm{FL}_m$ .
+
+Besides the evaluation itself, we investigated to what extent the automatic metrics reflect the human judgements. To do that, we compute their Spearman's $\rho$ correlation score with human judgements (see Table 6). For style, we consider the accuracy of toxicity classifier that we used for the evaluation (ACC) and its version which returns the confidence instead of the binary label (ACC-soft). For content we compare SIM (embedding similarity used for computing the J score) and BLEU score between the original and detoxified sentence. For fluency, we consider the linguistic acceptability classifier (FL) and perplexity of the GPT-2 (Radford et al., 2019) language model (PPL) which is used for evaluating fluency in many works on style transfer and other generation tasks.
+
+This evaluation shows that the tested metrics of content preservation show only weak correlation with manual scores, which agrees with the previous research (Yamshchikov et al., 2021). The correla
+
+| Model | ACC | SIM | FL | J | BLEU |
| human | 0.81 | 0.65 | 0.84 | 0.445 ± 0.011 | 1.000 |
| ParaGeDi (ours) | 0.93 | 0.62 | 0.88 | 0.515 ± 0.009* | 0.038 ± 0.005 |
| Mask & Infill (Wu et al., 2019b) | 0.89 | 0.76 | 0.62 | 0.420 ± 0.013 | 0.145 ± 0.008 |
| DualRL (Luo et al., 2019) | 0.87 | 0.75 | 0.63 | 0.395 ± 0.012 | 0.152 ± 0.008 |
| CondBERT (ours) | 0.86 | 0.65 | 0.62 | 0.338 ± 0.012 | 0.125 ± 0.007 |
| SST (Lee, 2020) | 0.74 | 0.65 | 0.41 | 0.225 ± 0.011 | 0.100 ± 0.007 |
| DRG-RetrieveOnly (Li et al., 2018) | 0.95 | 0.29 | 0.83 | 0.225 ± 0.006 | 0.004 ± 0.001 |
| DRG-TemplateBased (Li et al., 2018) | 0.82 | 0.70 | 0.24 | 0.115 ± 0.009 | 0.117 ± 0.007 |
+
+Table 5: Performance of the sentiment transfer models on the YELP dataset. The models are sorted with respect to the aggregated J score. * indicates the score which is significantly higher than the next best model with $p < {0.01}$ .
+
+| ACCm | SIMm | FLm |
| ACC-soft | 0.59 | SIM | 0.34 | FL | 0.54 |
| ACC | 0.51 | BLEU | 0.19 | PPL | 0.45 |
+
+Table 6: Spearman's $\rho$ of automatic metrics for evaluating style, content, and fluency with our human scores.
+
+tion of automatic style and fluency metrics with human judgements is moderate. It turns out that the confidence of style classifier is a better style accuracy metric than a binary classifier and the acceptability classifier works better than perplexity, confirming the criticism of perplexity as a fluency metric (Krishna et al., 2020).
+
+# 8 Sentiment Transfer Experiments
+
+Text detoxification is not as well-established as other style transfer tasks, which makes it is difficult to put our models in the context of other works on style transfer. Thus, we conduct an experiment on a different domain, namely, sentiment transfer.
+
+Experimental Setup We train ParaGeDi and CondBERT on the Yelp reviews dataset (Li et al., 2018) and compare them with Mask&Infill, SST, DRG-TemplateBased, DRG-RetrieveOnly, and DualRL models (see Section 2). We tune the hyperparameters of ParaGeDi and CondBERT on the Yelp development set and use the outputs of other models generated by their authors.
+
+We evaluate the models using the J as in our detoxification experiments. For the evaluation of style transfer accuracy, we train two sentiment classifiers on two disjoint parts of the Yelp dataset as in Section 5.1. We use one for inference and another for evaluation. We also compute the BLEU score against human references provided by Li et al. (2018). The results are shown in Table 5, averaged over two transfer directions.
+
+Discussion of Results ParaGedi outperforms other models in terms of J. As before, the other models fail to generate fluent texts because they re
+
+place only specific words or because they learn to generate texts from scratch. ParaGeDi model is the only competitor which combines pre-trained models and with full regeneration. The performance of the CondBERT model is low on this task, corroborating that detoxification and style transfer for other domains require different techniques.
+
+On the other hand, the BLEU score questions this result. Compared to the human references, the best-performing model is DualRL followed by the two MLM-based models: Mask&Infill and our CondBERT. The evaluation of reference human answers also questions the referenceless metrics. First, we see that the ACC score is limited by the classifier performance. Since it gives only 0.81 to presumably $100\%$ correct manually written sentences, the small differences in ACC should not be considered significant, and the ACC above 0.81 is unreliable. Overall, since the score of human answers is close to those of ParaGeDi and Mask&Infill, ParaGeDi can still be considered a strong style transfer model, and more precise evaluation should be done by humans because metrics cannot distinguish between the models at this level.
+
+# 9 Conclusion
+
+We present two style transfer models tailored for detoxification, i.e. transfer from toxic to non-toxic texts. Both of them combine high-quality pretrained LMs with the extra style guidance. ParaGeDi is based on a paraphraseer guided by a style-conditioned GPT-2 model. CondBERT model is based on BERT which does not need any fine-tuning, and all style control is performed with a pre-trained toxicity classifier. We conduct a large-scale study of style transfer models exploiting both automatic and manual evaluation. Our experiments show that the proposed methods outperform other state-of-the-art style transfer models on the tasks of detoxification and sentiment transfer.
+
+# Ethical Statement
+
+Toxicity is a sensitive topic where the unexpected results and byproducts of research can cause harm. Therefore, we would like to consider some ethical concerns related to our work.
+
+On Definition of Toxicity Toxicity is an umbrella term for almost any undesirable behaviour on the Internet. It ranges from "mild" phenomena like condescending language (Perez Almendros et al., 2020) to grave insults or oppression based on racial or other social-demographic characteristics.
+
+While annotators agree when labelling serious cases of toxicity such as hate speech (Fortuna and Nunes, 2018), the labelling of less severe toxicity is subjective and depends on the annotator's background (Al Kuwatly et al., 2020). This can cause the underestimation of certain types of toxicity. To define the toxicity in the most objective feasible way, we adopt a data-driven approach as presented in detail formally in Appendix A. Both models we propose recognise toxicity based on a toxicity-labelled dataset and do not require any additional manually created dictionaries or rules. Thus, their understanding of toxicity can be tuned with the input data. This ensures that given a corpus with unbiased toxicity labelling our models can produce unbiased detoxification.
+
+On the other hand, in case the training corpus is biased, the model can reproduce the biases, so it should be applied with caution.
+
+Toxification of Texts Detoxification task implies the possibility to perform the opposite transformation, i.e. to rewrite a neutral text into a toxic one. Various style transfer models, including ours, could in principle be used to complete this task. However, in case of CondBERT, the quality of such transformation would be bad, and it would be almost impossible to pass the results of this "toxification" off as real toxic sentences. The reason for that is the structure of toxic data.
+
+One of the main properties of toxic style is the presence of lexical markers of this style (rude or obscene words). Such markers (i) carry most of stylistic information of a sentence (i.e. their presence is a strong indicator of this class), (ii) have synonyms which are free from this stylistic information. Both our methods strongly rely on these properties. They identify toxic words and replace them with non-toxic synonyms. On the other hand, if performing the opposite transformation, we can
+
+not use these properties any more. First, there do not exist non-toxic words which are strong indicators of neutral (non-toxic) style. Second, it is almost infeasible to identify non-toxic words which have toxic synonyms and replace them appropriately. Therefore, we suggest that CondBERT is not suitable for toxification.
+
+The above arguments do not prove that CondBERT or ParaGeDi cannot be applied for toxicification. However, they suggest that the quality of the resulting text might not be higher than with simpler toxicification methods (e.g. handwritten rules for inserting rude words).
+
+Detoxification as a Censorship Another concern is the fact the detoxification technology could no used to rewrite user-generated messages, which might be considered a form of censorship. We would like to look at that from a different perspective. The social media currently already perform censorship, e.g. Instagram provides tools for removal of messages based on automatically identified harmful content.[5]
+
+On the other hand, we suggest mitigating this policy by rewriting toxic messages instead of removing them altogether. Last but not least, we suggest that user messages should not be modified without user consent. The detoxificaiton models should be used for suggesting detoxifying edits rather than performing them automatically.
+
+At the same time, detoxification models can make chatbots safer by detoxifying (if necessary) their answers before sending them to users. An automatically generated toxic comment by a neural chatbot may be the result of pre-training on the biased textual data - a problem which is currently unsolved completely (Gehman et al., 2020). Therefore, a detoxification of automatically generated content might be a valid use-case for minimizing reputational losses for the company created such an unmoderated chatbot (Babakov et al., 2021).
+
+# Acknowledgements
+
+This research was conducted under the framework of the joint MTS-Skoltech laboratory. We are grateful to the reviewers for their helpful suggestions which substantially improved this work.
+
+# References
+
+Hala Al Kuwatly, Maximilian Wich, and Georg Groh. 2020. Identifying and measuring annotator bias based on annotators' demographic characteristics. In Proceedings of the Fourth Workshop on Online Abuse and Harms, pages 184-190, Online. Association for Computational Linguistics.
+Nikolay Arefyev, Boris Sheludko, Alexander Podolskiy, and Alexander Panchenko. 2020. Always keep your target in mind: Studying semantics and improving performance of neural lexical substitution. In Proceedings of the 28th International Conference on Computational Linguistics, pages 1242-1255, Barcelona, Spain (Online). International Committee on Computational Linguistics.
+Nikolay Babakov, Varvara Logacheva, Olga Kozlova, Nikita Semenov, and Alexander Panchenko. 2021. Detecting inappropriate messages on sensitive topics that could harm a company's reputation. In Proceedings of the 8th Workshop on Balto-Slavic Natural Language Processing, pages 26-36, Kiyv, Ukraine. Association for Computational Linguistics.
+Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung, Eric Frank, Piero Molino, Jason Yosinski, and Rosanne Liu. 2020. Plug and play language models: A simple approach to controlled text generation. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
+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.
+Ashwin Geet D'Sa, Irina Illina, and Dominique Fohr. 2020. Towards non-toxic landscapes: Automatic toxic comment detection using DNN. In Proceedings of the Second Workshop on Trolling, Aggression and Cyberbullying, pages 21-25, Marseille, France. European Language Resources Association (ELRA).
+Paula Fortuna and Sérgio Nunes. 2018. A survey on automatic detection of hate speech in text. ACM Comput. Surv., 51(4).
+Samuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi, and Noah A. Smith. 2020. RealToxicityPrompts: Evaluating neural toxic degeneration in language models. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 3356-3369, Online. Association for Computational Linguistics.
+Xiaochuang Han and Yulia Tsvetkov. 2020. Fortifying toxic speech detectors against veiled toxicity. In
+
+Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7732-7739, Online. Association for Computational Linguistics.
+Junxian He, Xinyi Wang, Graham Neubig, and Taylor Berg-Kirkpatrick. 2020. A probabilistic formulation of unsupervised text style transfer. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
+Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P. Xing. 2017. Toward controlled generation of text. In Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pages 1587-1596. PMLR.
+Jigsaw. 2018. Toxic comment classification challenge. https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge. Accessed: 2021-03-01.
+Jigsaw. 2019. Jigsaw unintended bias in toxicity classification. https://www.kaggle.com/c/jigsaw-unintended-bias-in-toxicity-classification. Accessed: 2021-03-01.
+Jigsaw. 2020. Jigsaw multilingual toxic comment classification. https://www.kaggle.com/c/jigsaw-multilingual-toxic-comment-classification. Accessed: 2021-03-01.
+Vineet John, Lili Mou, Hareesh Bahuleyan, and Olga Vechtomova. 2019. Disentangled representation learning for non-parallel text style transfer. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28–August 2, 2019, Volume 1: Long Papers, pages 424–434. Association for Computational Linguistics.
+Ben Krause, Akhilesh Deepak Gotmare, Bryan McCann, Nitish Shirish Keskar, Shafiq R. Joty, Richard Socher, and Nazneen Fatema Rajani. 2020. Gedi: Generative discriminator guided sequence generation. CoRR, abs/2009.06367.
+Kalpesh Krishna, John Wieting, and Mohit Iyyer. 2020. Reformulating unsupervised style transfer as paraphrase generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 737-762, Online. Association for Computational Linguistics.
+Guillaume Lample, Sandeep Subramanian, Eric Michael Smith, Ludovic Denoyer, Marc'Aurelio Ranzato, and Y-Lan Boureau. 2019. Multiple-attribute text rewriting. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.
+
+Leo Laugier, John Pavlopoulos, Jeffrey Sorensen, and Lucas Dixon. 2021. Civil rephrases of toxic texts with self-supervised transformers. CoRR, abs/2102.05456.
+Joosung Lee. 2020. Stable style transformer: Delete and generate approach with encoder-decoder for text style transfer. In Proceedings of the 13th International Conference on Natural Language Generation, INLG 2020, Dublin, Ireland, December 15-18, 2020, pages 195-204. Association for Computational Linguistics.
+Juncen Li, Robin Jia, He He, and Percy Liang. 2018. Delete, retrieve, generate: a simple approach to sentiment and style transfer. 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 1865-1874, New Orleans, Louisiana. Association for Computational Linguistics.
+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. CoRR, abs/1907.11692.
+Fuli Luo, Peng Li, Jie Zhou, Pengcheng Yang, Baobao Chang, Xu Sun, and Zhifang Sui. 2019. A dual reinforcement learning framework for unsupervised text style transfer. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, pages 5116-5122. ijcai.org.
+Aman Madaan, Amrith Setlur, Tanmay Parekh, Barnabas Poczos, Graham Neubig, Yiming Yang, Ruslan Salakhutdinov, Alan W Black, and Shrimai Prabhumoye. 2020. Politeness transfer: A tag and generate approach. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1869-1881, Online. Association for Computational Linguistics.
+Eric Malmi, Aliaksei Severyn, and Sascha Rothe. 2020. Unsupervised text style transfer with padded masked language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8671-8680, Online. Association for Computational Linguistics.
+Richard Yuanzhe Pang and Kevin Gimpel. 2019. Unsupervised evaluation metrics and learning criteria for non-parallel textual transfer. In Proceedings of the 3rd Workshop on Neural Generation and Translation, pages 138-147, Hong Kong. Association for Computational Linguistics.
+Carla Perez Almendros, Luis Espinosa Anke, and Steven Schockaert. 2020. Don't patronize me! an annotated dataset with patronizing and condescending language towards vulnerable communities. In Proceedings of the 28th International Conference on Computational Linguistics, pages 5891-5902,
+
+Barcelona, Spain (Online). International Committee on Computational Linguistics.
+Shrimai Prabhumoye, Yulia Tsvetkov, Ruslan Salakhutdinov, and Alan W Black. 2018. Style transfer through back-translation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 866–876, Melbourne, Australia. Association for Computational Linguistics.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21:140:1-140:67.
+Sudha Rao and Joel Tetreault. 2018. Dear sir or madam, may I introduce the GYAFC dataset: Corpus, benchmarks and metrics for formality style transfer. 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 129-140, New Orleans, Louisiana. Association for Computational Linguistics.
+Cicero Nogueira dos Santos, Igor Melnyk, and Inkit Padhi. 2018. Fighting offensive language on social media with unsupervised text style transfer. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 2: Short Papers, pages 189-194. Association for Computational Linguistics.
+Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi Jaakkola. 2017. Style transfer from non-parallel text by cross-alignment. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc.
+Akhilesh Sudhakar, Bhargav Upadhyay, and Arjun Maheswaran. 2019. "transforming" delete, retrieve, generate approach for controlled text style transfer. 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 2019, Hong Kong, China, November 3-7, 2019, pages 3267-3277. Association for Computational Linguistics.
+Minh Tran, Yipeng Zhang, and Mohammad Soleymani. 2020. Towards A friendly online community: An unsupervised style transfer framework for profanity redaction. In Proceedings of the 28th International Conference on Computational Linguistics, COLING 2020, Barcelona, Spain (Online), December 8-13, 2020, pages 2107-2114. International Committee on Computational Linguistics.
+
+Rob Voigt, David Jurgens, Vinodkumar Prabhakaran, Dan Jurafsky, and Yulia Tsvetkov. 2018. Rtgender: A corpus for studying differential responses to gender. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation, LREC 2018, Miyazaki, Japan, May 7-12, 2018. European Language Resources Association (ELRA).
+Yunli Wang, Yu Wu, Lili Mou, Zhoujun Li, and Wenhan Chao. 2019. Harnessing pre-trained neural networks with rules for formality style transfer. 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 2019, Hong Kong, China, November 3-7, 2019, pages 3571-3576. Association for Computational Linguistics.
+Alex Warstadt, Amanpreet Singh, and Samuel R. Bowman. 2019. Neural network acceptability judgments. Trans. Assoc. Comput. Linguistics, 7:625-641.
+John Wieting, Taylor Berg-Kirkpatrick, Kevin Gimpel, and Graham Neubig. 2019. Beyond BLEU: training neural machine translation with semantic similarity. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28-August 2, 2019, Volume 1: Long Papers, pages 4344-4355. Association for Computational Linguistics.
+John Wieting and Kevin Gimpel. 2018. *Paranmt-50m: Pushing the limits of paraphrastic sentence embeddings with millions of machine translations.* In *Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics*, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pages 451-462. Association for Computational Linguistics.
+Xing Wu, Shangwen Lv, Liangjun Zang, Jizhong Han, and Songlin Hu. 2019a. Conditional BERT contextual augmentation. In Computational Science - ICCS 2019 - 19th International Conference, Faro, Portugal, June 12-14, 2019, Proceedings, Part IV, volume 11539 of Lecture Notes in Computer Science, pages 84-95. Springer.
+Xing Wu, Tao Zhang, Liangjun Zang, Jizhong Han, and Songlin Hu. 2019b. Mask and infill: Applying masked language model for sentiment transfer. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, pages 5271-5277. ijcai.org.
+Ivan P. Yamshchikov, Viacheslav Shibaev, Nikolay Khlebnikov, and Alexy Tikhonov. 2021. Styletransfer and paraphrase: Looking for a sensible semantic similarity metric. 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 14213-14220. AAAI Press.
+
+Marcos Zampieri, Preslav Nakov, Sara Rosenthal, Pepa Atanasova, Georgi Karadzhov, Hamdy Mubarak, Leon Derczynski, Zeses Pitenis, and Căgni Öltekin. 2020. SemEval-2020 task 12: Multilingual offensive language identification in social media (OffenseEval 2020). In Proceedings of the Fourteenth Workshop on Semantic Evaluation, pages 1425–1447, Barcelona (online). International Committee for Computational Linguistics.
+
+# A Definition of Text Detoxification Task
+
+In our work, we adhere to the data-driven definition of toxicity. The toxicity is a particular binary value associated with a text: {toxic, neutral}. We assume that this textual characteristic is measurable using a function $\sigma(x_i) \rightarrow s_i$ that obtains as input text $x_i$ and returns the corresponding style label $s_i$ . For instance, it can be implemented using a text classifier.
+
+Let us assume a set of two discreet mutually exclusive styles $S = \{s^{src}, s^{tg}\}$ which corresponds to the source toxic and target neutral styles. Let us consider two text corpora $D^{src} = \{d_1^{src}, d_2^{src}, \dots, d_n^{src}\}$ and $D^{tg} = \{d_1^{tg}, d_2^{tg}, \dots, d_m^{tg}\}$ belonging to the source and target styles $s^{src}$ and $s^{tg}$ , respectively. For each text $d_i$ , let us assume that it has a style $s_i$ measurable with the function $\sigma : D \to S$ . There also exists a binary function $\delta : D \times D \to [0,1]$ that indicates the semantic similarity of two input texts and a unary function $\psi : D \to [0,1]$ that indicates the degree of the text fluency. In general, the sizes of the source and the target corpora $D^{src}$ and $D^{tg}$ are different ( $n \neq m$ ) and the texts in them are not aligned, i.e., in general, $\delta(d_i^{src}, d_i^{tg}) \neq 1$ . If $n = m$ and $\delta(d_i^{src}, d_i^{tg}) = 1$ for all texts, this is a special case of a parallel style-aligned corpus. Given the introduced notations, we define the task of text detoxification as follows:
+
+A text detoxification model is a function $\alpha : S \times S \times D \to D$ that, given a source style $s^{src}$ , a target style $s^{tg}$ , and an input text $d^{src}$ , produces an output text $d^{tg}$ such that:
+
+- The style of the text changes from the source style $s^{src}$ to the target style $s^{tg}$ : $\sigma(d^{src}) \neq \sigma(d^{tg})$ , $\sigma(d^{tg}) = s^{tg}$ ;
+- The content of the source text is saved in the target text as much as required for the task: $\delta(d^{src}, d^{tg}) \geq t^{\delta}$ ;
+- The fluency of the target text achieves the required level: $\psi(d^{tg}) > t^{\psi}$ ,
+
+where $t^\delta$ and $t^\psi$ are the error tolerance threshold values for the content preservation $(\delta)$ and fluency $(\psi)$ functions.
+
+When removing the toxicity from a text, we inevitably change a part of its meaning, so full content preservation cannot be reached. However, we should attempt to save the content as much as possible and adjust $t^\delta$ to the needs of this task.
+
+Thus, the task of obtaining a text detoxification model with the best parameters set may be viewed as maximizing the probabil-
+
+ity $P(d^{tg}|d^{src},s^{src},s^{tg})$ given the three above-mentioned constraints based on parallel or nonparallel text corpora $D^{src}$ and $D^{tg}$ .
+
+# B CondBERT Ablation Study
+
+Our CondBERT model was inspired by Wu et al. (2019a) and is similar to Wu et al. (2019b), but has some unique properties. We test their importance with the ablation study on the detoxification task.
+
+| Model | ACC | SIM | FL | J |
| Full model | 0.91 | 0.73 | 0.75 | 0.50 |
| Mask all toxic tokens | 0.94 | 0.69 | 0.77 | 0.50 |
| No similarity penalty | 0.92 | 0.73 | 0.75 | 0.50 |
| No multiword replacement | 0.87 | 0.80 | 0.56 | 0.40 |
| No toxicity penalty | 0.57 | 0.79 | 0.82 | 0.33 |
+
+Table 7: Results of the CondBERT ablation study on detoxification.
+
+We use two heuristics for content preservation: not masking the toxic tokens and reranking replacement candidates with respect to their similarity to the original tokens. Removing any of these heuristics leads to lower content preservation and higher style accuracy, showing the inverse correlation of these properties (see Table 7). However, the J score for these models stays the same. On the other hand, turning off the possibility of filling a single mask with multiple words reduces the fluency and style accuracy, although obviously yields a better content preservation score, because the output sentence contains less new words. This affects the J score which is reduced for this model. Finally, the greatest impact on the J metric is caused by eliminating the toxicity penalty. The ACC is reduced dramatically, and although the other two metrics slightly grow compared to the full model, they cannot compensate for the low style accuracy.
+
+# C ParaGeDi Ablation Study
+
+ParaGeDi model consists of a paraphrase, a language model trained with the generative-discriminative loss, and a style classifier for reranking hypotheses. In addition to that, we use a number of heuristics during inference. We conduct ablation study on the detoxification task to understand the usefulness of these components. We test the following variations of ParaGeDi:
+
+- no discriminative loss $(\lambda = 0)$ ,
+- no generative loss $(\lambda = 1)$ ,
+- no upper bound ( $u = \infty$ ),
+- no discriminator $(w = 0)$ ,
+
+| Model | ACC | SIM | FL | J |
| Full ParaGeDi | 0.95 | 0.66 | 0.79 | 0.50 |
| no reranking | 0.87 | 0.70 | 0.80 | 0.50 |
| beam of size 5 | 0.93 | 0.67 | 0.79 | 0.50 |
| no discriminative loss | 0.90 | 0.68 | 0.81 | 0.49 |
| no smoothing | 0.96 | 0.63 | 0.78 | 0.47 |
| no beam search | 0.88 | 0.66 | 0.70 | 0.41 |
| no control of style strength | 0.56 | 0.80 | 0.81 | 0.38 |
| no generative loss | 0.77 | 0.70 | 0.67 | 0.37 |
| no upper bound | 0.99 | 0.35 | 0.76 | 0.27 |
+
+Table 8: Results of the ParaGeDi ablation study.
+
+- no extra control of style strength $(w = 1)$ ,
+- no probability smoothing $(\alpha = 0)$ ,
+- no reranking,
+- no beam search (beam size of 1).
+
+In each configuration, all other parameters are fixed. The performance of models is given in Table 8.
+
+Decreasing the number of beams leads to the deterioration of fluency and of style strength because of the smaller number options for the reranker to choose from. Removing the reranker leads to lower style strength with small gains in similarity or fluency. Turning off the smoothing of probabilities makes similarity and fluency degrade a little. Removing the upper bound on the discriminative correction leads to nearly $100\%$ style transfer but to very low similarity of the generated sentences to the original ones, as the model starts hallucinating. Decreasing the $w$ parameter reduces style accuracy but improves fluency and similarity, showing a clear trade-off between them.
+
+The individual components of the loss are slightly less important for style than inference parameters. With only the discriminative loss the model is still able to successfully transform style in $77\%$ of the cases, and the generative loss alone is able to change the style in $90\%$ cases. The latter figure shows that the model equipped with style labels can discriminate between styles even if it was not explicitly trained to do that. On the other hand, the elimination of the generative loss results in a significant drop in fluency. Although the class-conditional LM in ParaGeDi is a GPT2 model which has already been trained for generation task, the lack of generation-based fine-tuning reduces the quality of the resulting text.
+
+# D Details of Mining the Parallel Corpus
+
+Here we describe in more detail the process of mining of a detoxifying parallel paraphrase corpus. We
+
+use the ParaNMT dataset (Wieting and Gimpel, 2018) comprised of 50 million English sentences and their paraphrases back-translated from Czech. We filter the dataset keeping only the sentence pairs with moderate similarity (0.6 to 0.95) and similar length (with difference at most $40\%$ ), which is approximately $50\%$ of the dataset. We compute the similarity as the cosine distance between the averaged BERT embeddings of all words in a sentence. After this similarity- and length-based filtering we score each sentence with a RoBERTa-based toxicity classifier from Section 5.1 and keep only the pairs with the difference in toxicity scores of at least $50\%$ . Thus, we obtain 500,000 sentence pairs. Their examples are given in Table 9.
+
+Manual inspection of a random sample of the selected pairs shows that around $10\%$ of them are invalid paraphrases, $40\%$ are in fact both toxic or both safe, and around $50\%$ of them are valid detoxifying paraphrases. This suggests that with more rigorous filtering we can yield a corpus for detoxification of around 250,000 high-quality parallel sentences, which is larger than the majority of existing parallel style transfer datasets.
+
+# E Qualitative Analysis
+
+Both automatic and manual joint scores show that our best models are halfway between useless and perfect. But the actual success rate is much less than half. We call a detoxified sentence "perfect" if all three annotators gave it the maximal scores for all three aspects. With this definition, only $20\%$ of ParaGeDi sentences and $14\%$ of CondBERT sentences are perfect, and only about $1.5\%$ of Mask&Infill sentences are perfect.
+
+As you can judge from Table 4, the main cause of imperfection for all models is distortion of meaning. Below we describe our manual investigation into the causes of this distortion.
+
+In half of the cases, ParaGeDi conveys the meaning more or less adequately. Its mistakes include:
+
+- replacement of toxic words by similarly looking less toxic words with different meaning (e.g. "whore" $\rightarrow$ "Who's who", "stop behaving like fascist thugs" $\rightarrow$ "Stop looking at fascism", "taxman massive cunt, only outdone by linuxcunt himself." $\rightarrow$ "Taxman's massive cut, outdone by Linuxcune himself").
+- replacement of sentence meaning ("the election was yours to lose") $\rightarrow$ "the election is to be won", "this crap hole institute run by motherfuckers and
+
+ | Reference | Translation | sim | ld | toxref | toxtrn |
| 0 | If Alkar is flooding her with psychic waste, that explains the high level of neurotransmitters. | if Alkar floods her with her mental waste, it would explain the high levels of neurotransmitter. | 0.78 | 0.01 | 0.01 | 0.98 |
| 1 | Now you're getting nasty. | you're becoming disgusting. | 0.75 | 0.07 | 0.06 | 0.99 |
| 2 | Well, we could spare your life, for one. | well, we can spare your life. | 0.92 | 0.27 | 0.21 | 0.98 |
| 3 | Ah! Monkey, you've got to snap out of it. | monkey, you have to wake up. | 0.66 | 0.31 | 0.05 | 0.99 |
| 4 | I've got orders to put her down. | I have orders to kill her. | 0.73 | 0.18 | 0.01 | 0.99 |
| 5 | I'm not gonna have a child... ...with the same genetic disorder as me who's gonna die. L... | I'm not going to breed kids with a genetic disorder that makes them die. | 0.70 | 0.20 | 0.95 | 0.04 |
| 6 | They're all laughing at us, so we'll kick your ass. | they're laughing at us. We'll show you. | 0.62 | 0.23 | 0.99 | 0.00 |
| 7 | Maine was very short on black people back then. | there wasn't much black in Maine then. | 0.72 | 0.19 | 0.96 | 0.15 |
| 8 | Briggs, what the hell's happening? | Briggs, what the hell is going on? | 0.92 | 0.00 | 0.16 | 0.84 |
| 9 | Another one simply had no clue what to do, so whenever he met my brother he'd beat the crap out of him, and then say: | another simply didn't know what to do, so whenever he met my brother, he nearly beat the shit out of him. | 0.88 | 0.10 | 0.05 | 0.93 |
| 10 | I suppose you want me to buy you flowers and chocolates and whisper sweet nothings. | you'd probably want me to buy you some chocolates and flowers... and whispered some pretty rubbish. | 0.80 | 0.16 | 0.00 | 0.98 |
| 11 | So now their spirits are cursed, walking back roads, waterways, and if they find an unfaithful man, they kill him, and that man is never seen again. | their souls are cursed, they guard the paths, he says, and when they encounter an unfaithful man, he will be killed, and his body will never be found. | 0.75 | 0.01 | 0.84 | 0.14 |
| 12 | Freezing him. | I'll freeze him! | 0.78 | 0.18 | 0.01 | 0.57 |
| 13 | Come on, Cal, leave that shit alone. | come on, Cal, put it down. | 0.66 | 0.27 | 0.99 | 0.00 |
| 14 | So he's the Top dog. | he's the tallest son of a bitch. | 0.61 | 0.36 | 0.00 | 0.99 |
| 15 | I swore when I went out with Xander Harris.... ...I'd rather die than datea fixer-upper again. | when I was dating Alex Harris, I swore I'd rather die than go out with a loser. | 0.79 | 0.15 | 0.01 | 0.99 |
| 16 | I'm famous, and you're done. | I'm famous, and you're dead. | 0.82 | 0.00 | 0.00 | 0.98 |
| 17 | To quote Jake Oppenheimer: I, who am about to die, must seem to them something "God-awful."... | to quote Jake and Oppenheimer: "I must die, I must feel like a terrible god." | 0.70 | 0.18 | 0.00 | 0.68 |
| 18 | "Could you please be quiet, Miss Lavish?" said Moist. | 'could you keep your mouth shut, Miss Opulent?' 'Said Moist. | 0.81 | 0.10 | 0.00 | 0.76 |
| 19 | Murder for hire. | murder to order. | 0.70 | 0.00 | 0.07 | 0.96 |
+
+Table 9: Examples of mined detoxifying paraphrases. Here sim is similarity between sentences, computed by (Wieting and Gimpel, 2018), ld is relative difference in length, $\mathbf{t o x}_{\mathrm{ref}}$ and $\mathbf{t o x}_{\mathrm{tn}}$ are toxicity scores calculated by our classifier.
+
+bastards” $\rightarrow$ “a deloitte institute for mothers and their children”)
+
+- Avoiding the toxic or difficult part, for example "why we gotta have this miscegenation crap ?" $\rightarrow$ "Why do we need to have it?". In some cases, however, ParaGeDi masks or rephrases the toxic part of the message, while still preserving the general meaning, for example "start there first you idiot!" $\rightarrow$ "Let's start there first."
+
+In general, ParaGeDi makes the impression of fantasising too much, because it often rewrites the whole sentence, and from time to time changes its structure significantly.
+
+CondBERT, on the other hand, usually preserves the sentence structure, but often replaces words with inappropriate substitutes, often antonyms: "selfish" $\rightarrow$ "misunderstood", "racists" $\rightarrow$ "politicians", "cunt" $\rightarrow$ "nursemaid", "to troll and harass"
+
+to try out and help", "asskissers" $\rightarrow$ "honest people", "retarded" $\rightarrow$ "beautiful", "whore" $\rightarrow$ "sweetheart". Sometimes these replacements are more adequate, e.g. "old cock" $\rightarrow$ "old-fashioned stuff", "your attitude is shit" $\rightarrow$ "your attitude is completely wrong", "bitch i warned yall" $\rightarrow$ "i guess i warned you". But the proportion of sentences with the meaning preserved is smaller for CondBERT, being less than $40\%$ .
+
+The DLSM and Template-based DRG models often preserve the meaning by just preserving the toxic words, so their total success rate is low. The Retrieve-only DRG model almost never preserves the meaning. The Mask&Infill model seems to be overfitted: it often replaces toxic words with irrelevant non-toxic words (e.g. "crap" $\rightarrow$ "compelling") that the model apparently considers to be the "markers" of the non-toxic style. These properties make
+
+the baselines unsuitable for the detoxification task without adaptation, and the CondBERT model is in fact such an adaptation.
+
+Typical mistakes of both ParaGeDi and CondBERT can be attributed mostly to the insufficiency of semantic understanding: they often replace toxic words with semantically related words of different (often opposite) meaning, or simply with similarly looking words. We conjecture that with a paraphraseer trained on a larger corpus (we have used only $2\%$ of ParaNMT) or on more difficult examples would improve the ability of ParaGeDi to preserve meaning.
+
+Generally, our models produce the impression of not being mature enough for fully automatic use with texts where meaning is important. However, they can be used to suggest detoxification options to human writers, or to detoxify the output of chit-chat bots where the cost of producing an inarticulate utterance is considerably less than the cost of producing a toxic one.
+
+# F Examples of Detoxification
+
+Table 10 shows the examples of detoxification by our models ParaGeDi and CondBERT and the best competitor Mask&Infill.
+
+| Input | id have relatives signing up for aol finally in the mid to late 90s forwarding me stupid conservative conspiracy theory garbage . |
| ParaGeDi (ours) | I'd have relatives sign up for aol in the mid-to late 90s. and send me some unorthodox conspiracy theories. |
| CondBERT (ours) | id have relatives signing up for aol finally in the mid to late 90s forwarding me with some very conservative conspiracy theory stuff . |
| Mask&Infill | id have relatives signing up for aol finally in the mid to late 90s forwarding me to conservative conspiracy theory ideas . |
| Input | why dont you bung off . smoke a fag . and have a cuppa ? |
| ParaGeDi (ours) | Why don't you take a break. smoke a cigar. and have a cup of tea? |
| CondBERT (ours) | why dont you bung off . smoke a great deal . and have a cuppa ? |
| Mask&Infill | why dont you bung off . smoke a compelling compelling . and have a cuppa ? |
| Input | can someone please fix that crap ? |
| ParaGeDi (ours) | Can someone please do that? |
| CondBERT (ours) | can someone please fix that stuff ? |
| Mask&Infill | can someone please fix that compelling ? |
| Input | its a very stupid name ! |
| ParaGeDi (ours) | It's a very strange name! |
| CondBERT (ours) | its a very . . . strange . . . name ! |
| Mask&Infill | its a very compelling name ! |
| Input | im a rookie pilot and would have never have done something this stupid . |
| ParaGeDi (ours) | I've been a pilot for a while. and I never would have done anything like |
| CondBERT (ours) | im a rookie pilot and would have never have done something this wrong . |
| Mask&Infill | im a rookie pilot and would have never have done something this compelling . |
| Input | cut the damn funding and lets move on to the next program . |
| ParaGeDi (ours) | Cut the funding and move on to the next program. |
| CondBERT (ours) | cut the amount of the funding and lets move on to the next program . |
| Mask&Infill | cut the compelling funding and lets move on to the next program . |
| Input | bitch i warned yell . didnt i ? |
| ParaGeDi (ours) | Bits I've warned a lot. right? |
| CondBERT (ours) | i guess i warned you . didnt i ? |
| Mask&Infill | compelling i warned yall . didnt i ? |
| Input | i was such an asshole . |
| ParaGeDi (ours) | I was an ad. |
| CondBERT (ours) | i was such an emotional mess . |
| Mask&Infill | i was such an compelling . |
| Input | your statements show me how ignorant you are . |
| ParaGeDi (ours) | Your statements show me that you'd be indifferent. |
| CondBERT (ours) | your statements show me how very wronged you are . |
| Mask&Infill | your statements show me how compelling you are . |
| Input | trump will see justin as a lightweight fool . |
| ParaGeDi (ours) | Trump will see justin as a light-hearted man. |
| CondBERT (ours) | trump will see justin as a lightweight world title contender . |
| Mask&Infill | trump will see justin as a lightweight compelling . |
| Input | this whole article is bullshit . |
| ParaGeDi (ours) | This article's not a good deal. |
| CondBERT (ours) | this whole article is considered incomplete . |
| Mask&Infill | this whole article is compelling . |
| Input | please dont revert my edits without good reasoning just makes you look stupid . |
| ParaGeDi (ours) | Please do not reverse my edits without a good reason. |
| CondBERT (ours) | please dont try to do my edits without good reasoning just makes you look pretty bad . |
| Mask&Infill | please dont revert my edits without good reasoning just makes you look compelling . |
| Input | do some research before you make a fool of yourself . |
| ParaGeDi (ours) | Do a bit of research. |
| CondBERT (ours) | do some research before you make a bigger picture out of my life . |
| Mask&Infill | do some research before you make a compelling of yourself . |
| Input | try not to make wikipedia look so stupid . |
| ParaGeDi (ours) | Try not to make Wikipedia seem like a bad idea. |
| CondBERT (ours) | try not to make wikipedia look so unsettling . |
| Mask&Infill | try not to make wikipedia look so compelling . |
| Input | i will make sure i revert any stupid edits you make from now on . |
| ParaGeDi (ours) | I'll be sure to correct any wrong edits that you make. from now on. |
| CondBERT (ours) | i will make sure i do not make any mistake about any edits you make from now on . |
| Mask&Infill | i will make sure i revert any compelling edits you make from now on . |
+
+Table 10: Examples of detoxification by the best-performing models considered in our study.
\ No newline at end of file
diff --git a/textdetoxificationusinglargepretrainedneuralmodels/images.zip b/textdetoxificationusinglargepretrainedneuralmodels/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..2b9f2df5559bcf8e4a70903d13ee0a9edac7f1c0
--- /dev/null
+++ b/textdetoxificationusinglargepretrainedneuralmodels/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bf51159254e1431534a739547d443fb741cb3756d0ec889de6b9b0bfb83ece51
+size 1147624
diff --git a/textdetoxificationusinglargepretrainedneuralmodels/layout.json b/textdetoxificationusinglargepretrainedneuralmodels/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..7c26b23bf98eb4d70b9e6833c0983c7f7d4a39dc
--- /dev/null
+++ b/textdetoxificationusinglargepretrainedneuralmodels/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8b817d94ea1f9c257ef3dd4fca1f1910462e7c078a62e4a0c7fe39b7524fe4b8
+size 552693
diff --git a/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/d514dd00-a8f8-4644-ab58-94dcd823a2a7_content_list.json b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/d514dd00-a8f8-4644-ab58-94dcd823a2a7_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..947dbb17b3c05529ebccb8eedea434b478a28a33
--- /dev/null
+++ b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/d514dd00-a8f8-4644-ab58-94dcd823a2a7_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:567db66e6af9bf625370c58dcdea20bea0ac18d094559941811551337c4b85d5
+size 106114
diff --git a/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/d514dd00-a8f8-4644-ab58-94dcd823a2a7_model.json b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/d514dd00-a8f8-4644-ab58-94dcd823a2a7_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..9aa25e7009d9f7eb4dd4e5415bf92f1a0514749e
--- /dev/null
+++ b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/d514dd00-a8f8-4644-ab58-94dcd823a2a7_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:42d750cb8b94e01ae58ace8ae398251261f37a7e49b22d65382599727f892ddc
+size 126872
diff --git a/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/d514dd00-a8f8-4644-ab58-94dcd823a2a7_origin.pdf b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/d514dd00-a8f8-4644-ab58-94dcd823a2a7_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..0c107e57a5c786666007f964f7180b5f5b1cc3d6
--- /dev/null
+++ b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/d514dd00-a8f8-4644-ab58-94dcd823a2a7_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f3cdc2a5399c58d363ffb637be9909f8b7ba9321ed171d42d78acda00eabb3fd
+size 632710
diff --git a/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/full.md b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..9150da845548e22706c5f17089fe6abd0b7ce075
--- /dev/null
+++ b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/full.md
@@ -0,0 +1,362 @@
+# The Devil is in the Detail: Simple Tricks Improve Systematic Generalization of Transformers
+
+Róbert Csordás Kazuki Irie Jürgen Schmidhuber
+The Swiss AI Lab IDSIA, USI & SUPSI, Lugano, Switzerland
+{robert, kazuki, juergen}@idsia.ch
+
+# Abstract
+
+Recently, many datasets have been proposed to test the systematic generalization ability of neural networks. The companion baseline Transformers, typically trained with default hyper-parameters from standard tasks, are shown to fail dramatically. Here we demonstrate that by revisiting model configurations as basic as scaling of embeddings, early stopping, relative positional embedding, and Universal Transformer variants, we can drastically improve the performance of Transformers on systematic generalization. We report improvements on five popular datasets: SCAN, CFQ, PCFG, COGS, and Mathematics dataset. Our models improve accuracy from $50\%$ to $85\%$ on the PCFG productivity split, and from $35\%$ to $81\%$ on COGS. On SCAN, relative positional embedding largely mitigates the EOS decision problem (Newman et al., 2020), yielding $100\%$ accuracy on the length split with a cutoff at 26. Importantly, performance differences between these models are typically invisible on the IID data split. This calls for proper generalization validation sets for developing neural networks that generalize systematically. We publicly release the code to reproduce our results1.
+
+# 1 Introduction
+
+Systematic generalization (Fodor et al., 1988) is a desired property for neural networks to extrapolate compositional rules seen during training beyond training distribution: for example, performing different combinations of known rules or applying them to longer problems. Despite the progress of artificial neural networks in recent years, the problem of systematic generalization still remains unsolved (Fodor and McLaughlin, 1990; Lake and Baroni, 2018; Liska et al., 2018; Greff et al., 2020; Hupkes et al., 2020). While there has been much progress
+
+in the past years (Bahdanau et al., 2019; Korrel et al., 2019; Lake, 2019; Li et al., 2019; Russian et al., 2019), in particular on the popular SCAN dataset (Lake and Baroni, 2018) where some methods even achieve $100\%$ accuracy by introducing some non-trivial symbolic components into the system (Chen et al., 2020; Liu et al., 2020), the flexibility of such solutions is questionable. In fact, the existing SCAN-inspired solutions have limited performance gains on other datasets (Furrer et al., 2020; Shaw et al., 2020). It is thus not enough to solely focus on the SCAN dataset to progress research on systematic generalization.
+
+Recently, many datasets have been proposed for testing systematic generalization, including PCFG (Hupkes et al., 2020) and COGS (Kim and Linzen, 2020). The baseline Transformer models which are released together with the dataset are typically shown to dramatically fail at the task. However, the configurations of these baseline models are questionable. In most cases, some standard practices from machine translation are applied without modification. Also, some existing techniques such as relative positional embedding (Shaw et al., 2018; Dai et al., 2019), which are relevant for the problem, are not part of the baseline.
+
+In order to develop and evaluate methods to improve systematic generalization, it is necessary to have not only good datasets but also strong baselines to correctly evaluate the limits of existing architectures and to avoid false sense of progress over bad baselines. In this work, we demonstrate that the capability of Transformers (Vaswani et al., 2017) and in particular its universal variants (Dehghani et al., 2019) on these tasks are largely underestimated. We show that careful designs of model and training configurations are particularly important for these reasoning tasks testing systematic generalization. By revisiting configurations such as basic scaling of word and positional embeddings, early stopping strategy, and relative positional em
+
+bedding, we dramatically improve the performance of the baseline Transformers. We conduct experiments on five datasets: SCAN (Lake and Baroni, 2018), CFQ (Keysers et al., 2020), PCFG (Hupkes et al., 2020), COGS (Kim and Linzen, 2020), and Mathematical dataset (Saxton et al., 2019). In particular, our new models improve the accuracy on the PCFG productivity split from $50\%$ to $85\%$ , on the systematicity split from $72\%$ to $96\%$ , and on COGS from $35\%$ to $81\%$ over the existing baselines. On the SCAN dataset, we show that our models with relative positional embedding largely mitigate the so-called end-of-sentence (EOS) decision problem (Newman et al., 2020), achieving $100\%$ accuracy on the length split with a cutoff at 26.
+
+Also importantly, we show that despite these dramatic performance gaps, all these models perform equally well on IID validation datasets. The consequence of this observation is the need for proper generalization validation sets for developing neural networks for systematic generalization.
+
+We thoroughly discuss guidelines that empirically yield good performance across various datasets, and we will publicly release the code to make our results reproducible.
+
+# 2 Datasets and Model Architectures for Systematic Generalization
+
+Here we describe the five datasets, and specify the Transformer model variants we use in our experiments. The selected datasets include both already popular ones and recently proposed ones. Statistics of the datasets can be found in Table 10 in the appendix.
+
+# 2.1 Datasets
+
+Many datasets in the language domain have been proposed to test systematic generalization. All datasets we consider here can be formulated as a sequence-to-sequence mapping task (Sutskever et al., 2014; Graves, 2012). Common to all these datasets, the test set is sampled from a distribution which is systematically different from the one for training: for example, the test set might systematically contain longer sequences, new combinations or deeper compositions of known rules. We call this split the generalization split. Most of the datasets also come with a conventional split, where the train and test (and validation, if available) sets are independently and identically distributed samples. We call this the IID split. In this paper, we consider the
+
+following five datasets:
+
+SCAN (Lake and Baroni, 2018). The task consists of mapping a sentence in natural language into a sequence of commands simulating navigation in a grid world. The commands are compositional: e.g. an input jump twice should be translated to JUMP JUMP. It comes with multiple data splits: in addition to the "simple" IID split, in the "length" split, the training sequences are shorter than test ones, and in the "add primitive" splits, some commands are presented in the training set only in isolation, without being composed with others. The test set focuses on these excluded combinations.
+
+CFQ (Keysers et al., 2020). The task consists of translating a natural language question to a Freebase SPARQL query. For example Was M0 a director and producer of M1 should be translated to SELECT count $(\star)$ WHERE {M0 ns:filmdirector.film M1 . M0 ns:film.producer.film | ns:filmproduction_company.films M1}. The authors introduce splits based on "compound divergence" which measures the difference between the parse trees in the different data splits. The authors experimentally show that it is well correlated with generalization difficulty. It also comes with a length-based split.
+
+PCFG (Hupkes et al., 2020). The task consists of list manipulations and operations that should be executed. For example, reverse copy O14 O4 C12 J14 W3 should be translated to W3 J14 C12 O4 O14. It comes with different splits for testing different aspects of generalization. In this work, we focus on the "productivity" split, which focuses on generalization to longer sequences, and on the "systematicity" split, which is about recombining constituents in novel ways.
+
+COGS (Kim and Linzen, 2020). The task consists of semantic parsing which maps an English sentence to a logical form. For example, The puppy slept. should be translated to * puppy (x_1); sleep . agent (x_2, x_1). It comes with a single split, with a training, IID validation and OOD generalization testing set.
+
+Mathematics Dataset (Saxton et al., 2019). The task consists of high school level textual math questions, e.g. What is -5 - 110911? should be translated to -110916. The data is
+
+split into different subsets by the problem category, called modules. Some of them come with an extrapolation set, designed to measure generalization. The amount of total data is very large and thus expensive to train on, but different modules can be studied individually. We focus on "add_or_sub" and "place_value" modules.
+
+# 2.2 Model Architectures
+
+We focus our analysis on two Transformer architectures: standard Transformers (Vaswani et al., 2017) and Universal Transformers (Dehghani et al., 2019), and in both cases with absolute or relative positional embedding (Dai et al., 2019). Our Universal Transformer variants are simply Transformers with shared weights between layers, without adaptive computation time (Schmidhuber, 2012; Graves, 2016) and timestep embedding. Positional embedding are only added to the first layer.
+
+Universal Transformers are particularly relevant for reasoning and algorithmic tasks. For example, if we assume a task which consists in executing a sequence of operations, a regular Transformer will learn successive operations in successive layers with separate weights. In consequence, if only some particular orderings of the operations are seen during training, each layer will only learn a subset of the operations, and thus, it will be impossible for them to recombine operations in an arbitrary order. Moreover, if the same operation has to be reused multiple times, the network has to re-learn it, which is harmful for systematic generalization and reduces the data efficiency of the model (Csordás et al., 2021). Universal Transformers have the potential to overcome this limitation: sharing the weights between each layer makes it possible to reuse the existing knowledge from different compositions. On the downside, the Universal Transformer's capacity can be limited because of the weight sharing.
+
+# 3 Improving Transformers on Systematic Generalization
+
+In this section, we present methods which greatly improve Transformers on systematic generalization tasks, while they could be considered as details in standard tasks. For each method, we provide experimental evidences on a few representative datasets. In Section 4, we apply these findings to all datasets.
+
+# 3.1 Addressing the EOS Decision Problem with Relative Positional Embedding
+
+The EOS decision problem. A thorough analysis by Newman et al. (2020) highlights that LSTMs and Transformers struggle to generalize to longer output lengths than they are trained for. Specifically, it is shown that the decision when to end the sequence (the EOS decision) often overfits to the specific positions observed in the train set. To measure whether the models are otherwise able to solve the task, they conduct a so-called oracle evaluation: they ignore the EOS token during evaluation, and use the ground-truth sequence length to stop decoding. The performance with this evaluation mode is much better, which illustrates that the problem is indeed the EOS decision. More surprisingly, if the model is trained without EOS token as part of output vocabulary (thus it can only be evaluated in oracle mode), the performance is further improved. It is concluded that teaching the model when to end the sequence has undesirable side effects on the model's length generalization ability.
+
+We show that the main cause of this EOS decision problem in the case of Transformers is the absolute positional embedding. Generally speaking, the meaning of a word is rarely dependent on the word's absolute position in a document but depends on its neighbors. Motivated by this assumption, various relative positional embedding methods (Shaw et al., 2018; Dai et al., 2019) have been proposed. Unfortunately, they have not been considered for systematic generalization in prior work (however, see Sec. 5), even though they are particularly relevant for that.
+
+We test Transformers with relative positional embedding in the form used in Transformer XL (Dai et al., 2019). Since it is designed for auto-regressive models, we directly apply it in the decoder of our model, while for the encoder, we use a symmetrical variant of it (see Appendix C). The interface between encoder and decoder uses the standard attention without any positional embedding.
+
+Our experimental setting is similar to Newman et al. (2020). The length split in SCAN dataset restricts the length of the train samples to 22 tokens (the test set consists of samples with an output of more than 22 tokens). This removes some compositions from the train set entirely, which introduces additional difficulty to the task. $80\%$ of the test set consists of these missing compositions. In order to mitigate the issue of unknown composition
+
+Table 1: Exact match accuracies on length splits with different cutoffs. Reported results are the median of 5 runs. Trafo denotes Transformers. The numbers in the rows $+\mathrm{EOS} + \mathrm{Oracle}$ and $-\mathrm{EOS} + \mathrm{Oracle}$ are taken from Newman et al. (2020) as reference numbers but they can not be compared to others as they are evaluated with oracle length. Our models use different hyperparameters compared to theirs. We refer to Section 3.1 for details.
+
+ | l (length cutoff) | 22 | 24 | 25 | 26 | 27 | 28 | 30 | 32 | 33 | 36 | 40 |
| Reference | +EOS | 0.00 | 0.05 | 0.04 | 0.00 | 0.09 | 0.00 | 0.09 | 0.35 | 0.00 | 0.00 | 0.00 |
| +EOS+Oracle | 0.53 | 0.51 | 0.69 | 0.76 | 0.74 | 0.57 | 0.78 | 0.66 | 0.77 | 1.00 | 0.97 |
| -EOS+Oracle | 0.58 | 0.54 | 0.67 | 0.82 | 0.88 | 0.85 | 0.89 | 0.82 | 1.00 | 1.00 | 1.00 |
| Ours (+EOS) | Trafo | 0.00 | 0.04 | 0.19 | 0.29 | 0.30 | 0.08 | 0.24 | 0.36 | 0.00 | 0.00 | 0.00 |
| + Relative PE | 0.20 | 0.12 | 0.31 | 0.61 | 1.00 | 1.00 | 1.00 | 0.94 | 1.00 | 1.00 | 1.00 |
| Universal Trafo | 0.02 | 0.05 | 0.14 | 0.21 | 0.26 | 0.00 | 0.06 | 0.35 | 0.00 | 0.00 | 0.00 |
| + Relative PE | 0.20 | 0.12 | 0.71 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
+
+and focus purely on the length problem, Newman et al. (2020) re-split SCAN by introducing different length cutoffs and report the performance of each split. We test our models similarly. However, our preliminary experiments showed the performance of the original model is additionally limited by being too shallow: it uses only 2 layers for both the encoder and decoder. We increased the number of layers to 3. To compensate for the increased number of parameters, we decrease the size of the feed-forward layers from 1024 to 256. In total, this reduces the number of parameters by $30\%$ . We train our models with Adam optimizer, a learning rate of $10^{-4}$ , batch size of 128 for 50k steps.
+
+The results are shown in Table 1. In order to show that our changes of hyperparameters are not the main reason for the improved performance, we report the performance of our modified model without relative positional embedding (row Trafo). We also include the results from Newman et al. (2020) for reference. We report the performance of Universal Transformer models trained with identical hyperparameters. All our models are trained to predict the EOS token and are evaluated without oracle (+EOS configuration). It can be seen that both our standard and Universal Transformers with absolute positional embedding have near-zero accuracy for all length cutoffs, whereas models with relative positional embedding excel: they even outperform the models trained without EOS prediction and evaluated with the ground-truth length.
+
+Although Table 1 highlights the advantages of relative positional embedding and shows that they can largely mitigate the EOS-overfitting issue, this does not mean that the problem of generalizing to longer sequences is fully solved. The sub-optimal performance on short length cutoffs (22-25) indicates that the model finds it hard to zero-shot gen
+
+eralize to unseen compositions of specific rules. To improve these results further, research on models which assume analogies between rules and compositions are necessary, such that they can recombine known constituents without any training example.
+
+Further benefits of relative positional embedding. In addition to the benefit highlighted in the previous paragraph, we found that models with relative positional embedding are easier to train in general. They converge faster (Figure 6 in the appendix) and are less sensitive to batch size (Table 9 in the appendix). As another empirical finding, we note that relative Transformers without shared layers sometimes catastrophically fail before reaching their final accuracy: the accuracy drops to 0, and it never recovers. We observed this with PCFG productivity split and the "Math: place_value" task. Reducing the number of parameters (either using Universal Transformers or reducing the state size) usually stabilizes the network.
+
+# 3.2 Model Selection Should Be Done Carefully
+
+The danger of early stopping. Another crucial aspect greatly influencing the generalization performance of Transformers is model selection, in particular early stopping. In fact, on these datasets, it is a common practice to use only the IID split to tune hyperparameters or select models with early stopping (e.g. Kim and Linzen (2020)). However, since any reasonable models achieve nearly $100\%$ accuracy on the IID validation set, there is no good reason to believe this to be a good practice for selecting models for generalization splits. To test this hypothesis, we train models on COGS dataset without early stopping, but with a fixed number of 50k training steps. The best model achieved a test accuracy of $81\%$ , while the original performance
+
+
+Figure 1: Generalization accuracy on COGS as a function of training steps for standard Transformers with different embedding scaling schemes. The vertical lines show the median of the early stopping points for the five runs. Early stopping parameters are from Kim and Linzen (2020). "Token Emb. Up., Noam" corresponds to the baseline configuration (Kim and Linzen, 2020). See Sec. 3.3 for details on scaling.
+
+Table 2: Final IID validation and generalizations accuracy for COGS (50k steps) and PCFG Productivity set (300k steps) with different scaling (Section 3.3). Token Embedding Upscaling (TEU) is unstable on PCFG with our hyperparameters. Position Embedding Downscaling (PED) performs the best on both datasets.
+
+ | | IID Validation | Gen. Test |
| COGS | TEU | 1.00 ± 0.00 | 0.78 ± 0.03 |
| No scaling | 1.00 ± 0.00 | 0.62 ± 0.06 |
| PED | 1.00 ± 0.00 | 0.80 ± 0.00 |
| PCFG | TEU | 0.92 ± 0.07 | 0.47 ± 0.27 |
| No scaling | 0.97 ± 0.01 | 0.63 ± 0.02 |
| PED | 0.96 ± 0.01 | 0.65 ± 0.03 |
+
+by Kim and Linzen (2020) is $35\%$ . Motivated by this huge performance gap, we had no other choice but to conduct an analysis on the generalization split to demonstrate the danger of early stopping and discrepancies between the performance on the IID and generalization split. The corresponding results are shown in Figure 1 (further effect of embedding scaling is discussed in next Sec. 3.3) and Table 2. Following Kim and Linzen (2020), we measure the model's performance every 500 steps, and mark the point where early stopping with patience of 5 would pick the best performing model. It can be seen that in some cases the model chosen by early stopping is not even reaching half of the final generalization accuracy.
+
+To confirm this observation in the exact setting of Kim and Linzen (2020), we also disabled the early stopping in the original codebase ${}^{2}$ ,and observed that the accuracy improved to 65% without any other tricks. We discuss further performance improvements on COGS dataset in Section 4.4.
+
+
+Figure 2: Relationship between validation loss and test accuracy (same distribution) on CFQ MCD 1 split for a relative Transformer. The color shows the training step. Five runs are shown. The loss has a logarithmic scale. High accuracy corresponds to higher loss, which is unexpected. For detailed analysis, see Figure 5.
+
+The lack of validation set for the generalization split. A general problem raised in the previous paragraph is the lack of validation set for evaluating models for generalization. Most of the datasets come without a validation set for the generalization split (SCAN, COGS, and PCFG). Although CFQ comes with such a set, the authors argue that only the IID split should be used for hyperparameter search, and it is not clear what should be used for model development.
+
+In order to test novel ideas, a way to gradually measure progress is necessary, such that the effect of changes can be evaluated. If the test set is used for developing the model, it implicitly risks overfitting to this test set. On the other hand, measuring performance on the IID split does not necessarily provide any valuable information about the generalization performance on the systematically different test set (see Table 2). The IID accuracy of all the considered datasets is $100\%$ (except on PCFG where it's also almost $100\%$ ); thus, no further improvement, nor potential difference between generalization performance of models can be measured (see also Table 8 in the appendix).
+
+It would be beneficial if future datasets would have a validation and test set for both the IID and the generalization split. For the generalization split, the test set could be designed to be more difficult than the validation set. This way, the validation set can be used to measure progress during development, but overfitting to it would prevent the model to generalize well to the test set. Such a division can be easily done on the splits for testing productivity. For other types of generalization, we could use multiple datasets sharing the same generalization problem. Some of them could be dedicated for development and others for testing.
+
+
+
+
+Figure 3: Test loss and accuracy on PCFG during training. The loss exhibits an epoch-wise double descent phenomenon (Nakkiran et al., 2019), while the accuracy increases monotonically. Standard Transformer with PED (Sec. 3.3), Universal Transformer with absolute, and relative positional embeddings are shown.
+
+Intriguing relationship between generalization accuracy and loss. Finally, we also note the importance of using accuracy (instead of loss) as the model selection criterion. We find that the generalization accuracy and loss do not necessarily correlate, while sometimes, model selection based on the loss is reported in practice e.g. in Kim and Linzen (2020). Examples of this undesirable behavior are shown on Figure 2 for CFQ and on Figure 4 in the appendix for COGS dataset. On these datasets, the loss and accuracy on the generalization split both grows during training. We conducted an analysis to understand the cause of this surprising phenomenon, we find that the total loss grows because the loss of the samples with incorrect outputs increases more than it improves on the correct ones. For the corresponding experimental results, we refer to Figure 5 in the appendix. We conclude that even if a validation set is available for the generalization split, it would be crucial to use the accuracy instead of the loss for early stopping and hyperparameter tuning.
+
+Finally, on PCFG dataset, we observed epochwise double descent phenomenon (Nakkiran et al., 2019), as shown in Figure 3. This can lead to equally problematic results if the loss is used for model selection or tuning.
+
+# 3.3 Large Impacts of Embedding Scaling
+
+The last surprising detail which greatly influences generalization performance of Transformers is the choice of embedding scaling scheme. This is espe
+
+cially important for Transformers with absolute positional embedding, where the word and positional embedding have to be combined. We experimented with the following scaling schemes:
+
+1. Token Embedding Upscaling (TEU). This is the standard scaling used by Vaswani et al. (2017). It uses Glorot initialization (Glorot and Bengio, 2010) for the word embeddings. However, the range of the sinusoidal positional embedding is always in $[-1, 1]$ . Since the positional embedding is directly added to the word embeddings, this discrepancy can make the model untrainable. Thus, the authors upscale the word embeddings by $\sqrt{d_{\mathrm{model}}}$ where $d_{\mathrm{model}}$ is the embedding size. OpenNMT3, the framework used for the baseline models for PCFG and COGS datasets respectively by Hupkes et al. (2020) and Kim and Linzen (2020), also uses this scaling scheme.
+
+2. No scaling. It initializes the word embedding with $\mathcal{N}(0,1)$ (normal distribution with mean 0 and standard deviation of 1). Positional embeddings are added without scaling.
+3. Position Embedding Downscaling (PED), which uses Kaiming initialization (He et al., 2015), and scales the positional embeddings by $\frac{1}{\sqrt{d_{\mathrm{model}}}}$ .
+
+The PED differs from TEU used in Vaswani et al. (2017) in two ways: instead of scaling the embedding up, PED scales the positional embedding down and uses Kaiming instead of Glorot initialization. The magnitude of the embeddings should not depend on the number of words in the vocabulary but on the embedding dimension.
+
+Table 2 shows the results. Although "no scaling" variant is better than TEU on the PCFG test set, it is worse on the COGS test set. PED performs consistently the best on both datasets. Importantly, the gap between the best and worst configurations is large on the test sets. The choice of scaling thus also contributes in the large improvements we report over the existing baselines.
+
+# 4 Results Across Different Datasets
+
+In this section, we apply the methods we illustrated in the previous section across different datasets. Table 3 provides an overview of all improvements we
+
+obtain on all considered datasets. Unless reported otherwise, all results are the mean and standard deviation of 5 different random seeds. If multiple embedding scaling schemes are available, we pick the best performing one for a fair comparison. Transformer variants with relative positional embedding outperform the absolute variants on almost all tested datasets. Except for COGS and CFQ MCD 1, the universal variants outperform the standard ones. In the following, we discuss and highlight the improvements we obtained for each individual dataset.
+
+# 4.1 SCAN
+
+We focused on the length split of the dataset. We show that it is possible to mitigate the effect of overfitting to the absolute position of the EOS token by using relative positional embedding. We already discussed the details in Sec. 3.1 and Table 1.
+
+# 4.2 CFQ
+
+On the output length split of CFQ, our Universal Transformer with absolute positional embedding achieves significantly better performance than the one reported in Keysers et al. (2020): $77\%$ versus $\sim 66\%$ . Here, we were unable to identify the exact reason for this large improvement. The only architectural difference between the models is that ours does not make use of any timestep (i.e. layer ID) embedding. Also, the positional embedding is only injected to the first layer in case of absolute positional embeddings (Sec. 2.2). The relative positional embedding variant performs even better, achieving $81\%$ . This confirms the importance of using relative positional embedding as a default choice for length generalization tasks, as we also demonstrated on SCAN in Sec. 3.1.
+
+On the MCD splits, our results slightly outperform the baseline in Keysers et al. (2020), as shown in Table 3. Relative Universal Transformers perform marginally better than all other variants, except for MCD 1 split, where the standard Transformer wins with a slight margin. We use hyperparameters from Keysers et al. (2020). We report performance after 35k training training steps.
+
+# 4.3 PCFG
+
+The performance of different models on the PCFG dataset is shown on Table 3. First of all, simply by increasing the number of training epochs from
+
+25, used by Hupkes et al. (2020), to $\sim 237$ (300k steps), our model achieves $65\%$ on the productivity split compared to the $50\%$ reported in Hupkes et al. (2020) and $87\%$ compared to $72\%$ on the systematicity split. Furthermore, we found that Universal Transformers with relative positional embeddings further improve performance to a large extent, achieving $85\%$ final performance on the productivity and $96\%$ on the systematicity split. We experienced instabilities while training Transformers with relative positional embeddings on the productivity split; thus, the corresponding numbers are omitted in Table 3 and Figure 6 in the appendix.
+
+# 4.4 COGS
+
+On COGS, our best model achieves the generalization accuracy of $81\%$ which greatly outperforms the $35\%$ accuracy reported in Kim and Linzen (2020). As we discussed in Sec. 3.2, just by removing early stopping in the setting of Kim and Linzen (2020), the performance improves to $65\%$ . Moreover, the baseline with early stopping is very sensitive to the random seed and even sensitive to the GPU type it is run on. Changing the seed in the official repository from 1 to 2 causes a dramatic performance drop with a $2.5\%$ final accuracy. By changing the scaling of embeddings (Sec. 3.3), disabling label smoothing, fixing the learning rate to $10^{-4}$ , we achieved $81\%$ generalization accuracy, which is stable over multiple random seeds.
+
+Table 3 compares different model variants. Standard Transformers with absolute and relative positional encoding perform similarly, with the relative positional variant having a slight advantage. Here Universal Transformers perform slightly worse.
+
+# 4.5 Mathematics Dataset
+
+We also test our approaches on subsets of Mathematics Dataset (Saxton et al., 2019). Since training models on the whole dataset is too resource-demanding, we only conduct experiments on two subsets: "place_value" and "add_or_sub".
+
+The results are shown in Table 3. While we can not directly compare our numbers with those reported in Saxton et al. (2019) (a single model is jointly trained on the whole dataset there), our results show that relative positional embedding is advantageous for the generalization ability on both subsets.
+
+Table 3: Test accuracy of different Transformer (Trafo) variants on the considered datasets. See Sec. 4 for details. The last column shows previously reported accuracies. References: [1] Newman et al. (2020), [2] Keysers et al. (2020), [3] https://github.com/google-research/google-research/tree/master/ cfq, [4] Hupkes et al. (2020), [5] Kim and Linzen (2020), [6] Saxton et al. (2019). Results marked with * cannot be directly compared because of different training setups. $\sim$ denotes approximative numbers read from charts reported in previous works.
+
+ | Trafo | Uni. Trafo | Rel. Trafo | Rel. Uni. Trafo | Prior Work |
| SCAN (length cutoff=26) | 0.30 ± 0.02 | 0.21 ± 0.01 | 0.72 ± 0.21 | 1.00 ± 0.00 | 0.00[1] |
| CFQ Output length | 0.57 ± 0.00 | 0.77 ± 0.02 | 0.64 ± 0.06 | 0.81 ± 0.01 | ~ 0.66[2] |
| CFQ MCD 1 | 0.40 ± 0.01 | 0.39 ± 0.03 | 0.39 ± 0.01 | 0.39 ± 0.04 | 0.37 ± 0.02[3] |
| CFQ MCD 2 | 0.10 ± 0.01 | 0.09 ± 0.02 | 0.09 ± 0.01 | 0.10 ± 0.02 | 0.08 ± 0.02[3] |
| CFQ MCD 3 | 0.11 ± 0.00 | 0.11 ± 0.01 | 0.11 ± 0.01 | 0.11 ± 0.03 | 0.11 ± 0.00[3] |
| CFQ MCD mean | 0.20 ± 0.14 | 0.20 ± 0.14 | 0.20 ± 0.14 | 0.20 ± 0.14 | 0.19 ± 0.01[2] |
| PCFG Productivity split | 0.65 ± 0.03 | 0.78 ± 0.01 | - | 0.85 ± 0.01 | 0.50 ± 0.02[4] |
| PCFG Systematicity split | 0.87 ± 0.01 | 0.93 ± 0.01 | 0.89 ± 0.02 | 0.96 ± 0.01 | 0.72 ± 0.00[4] |
| COGS | 0.80 ± 0.00 | 0.78 ± 0.03 | 0.81 ± 0.01 | 0.77 ± 0.01 | 0.35 ± 0.06[5] |
| Math: add_or_sub | 0.89 ± 0.01 | 0.94 ± 0.01 | 0.91 ± 0.03 | 0.97 ± 0.01 | ~ 0.91[6]* |
| Math: place_value | 0.12 ± 0.07 | 0.20 ± 0.02 | - | 0.75 ± 0.10 | ~ 0.69[6]* |
+
+# 5 Related Work
+
+Many recent papers focus on improving generalization on the SCAN dataset. Some of them develop specialized architectures (Korrel et al., 2019; Li et al., 2019; Russin et al., 2019; Gordon et al., 2020; Herzig and Berant, 2020) or data augmentation methods (Andreas, 2020), others apply meta-learning (Lake, 2019). As an alternative, the CFQ dataset proposed in (Keysers et al., 2020) is gaining attention recently (Guo et al., 2020; Furrer et al., 2020). Mathematical problem solving has also become a popular domain for testing generalization of neural networks (Kaiser and Sutskever, 2016; Schlag et al., 2019; Charton et al., 2021). The PCFG (Hupkes et al., 2020) and COGS (Kim and Linzen, 2020) are also datasets proposed relatively recently. Despite increasing interests in systematic generalization tasks, interestingly, no prior work has questioned the baseline configurations which could be overfitted to the machine translation tasks.
+
+Generalizing to longer sequences have been proven to be especially difficult. Currently only hybrid task-specific neuro-symbolic approaches can solve it (Nye et al., 2020; Chen et al., 2020; Liu et al., 2020). In this work, we focus on a subproblem required for length generalization: the EOS decision problem (Newman et al., 2020), and we show that it can be mitigated by using relative positional embeddings.
+
+The study of generalization ability of neural networks at different stages of training has been a
+
+general topic of interest (Nakkiran et al., 2019; Roelofs, 2019). Our analysis has shown that this question is particularly relevant to the problem of systematic generalization, as demonstrated by large performance gaps in our experiments, which has not been discussed in prior work.
+
+Prior work proposed several sophisticated initialization methods for Transformers (Zhang et al., 2019; Zhu et al., 2021), e.g. with a purpose of removing the layer normalization components (Huang et al., 2020). While our work only revisited basic scaling methods, we demonstrated their particular importance for systematic generalization.
+
+In recent work, Ontañón et al. (2021) have also focused on improving the compositional generalization abilities of Transformers. In addition to relative positional encodings and Universal Transformers, novel architectural changes such as "copy decoder" as well as dataset-specific "intermediate representations" (Herzig et al., 2021) have been studied. However, other aspects we found crucial, such as early stopping, scaling of the positional embeddings, and the validation set issues have not been considered. In consequence, our models achieve substantially higher performance than the best results reported by Ontañón et al. (2021) across all standard datasets: PCFG, COGS, and CFQ (without intermediate representations).
+
+Finally, our study focused on the basic Trans
+
+former architectures. However, the details discussed above in the context of algorithmic tasks should also be relevant for other Transformer variants and fast weight programmers (Schmidhuber, 1992; Schlag et al., 2021; Irie et al., 2021), as well as other architectures specifically designed for algorithmic reasoning (Graves et al., 2016; Kaiser and Sutskever, 2016; Csordás and Schmidhuber, 2019; Freivalsd et al., 2019).
+
+# 6 Conclusion
+
+In this work we showed that the performance of Transformer architectures on many recently proposed datasets for systematic generalization can be greatly improved by revisiting basic model and training configurations. Model variants with relative positional embedding often outperform the ones with absolute positional embedding. They also mitigate the EOS decision problem, an important problem previously found by Newman et al. (2020) when considering the length generalization of neural networks. This allows us to focus on the problem of compositions in the future, which is the remaining problem for the length generalization.
+
+We also demonstrated that reconsidering early stopping and embedding scaling can greatly improve baseline Transformers, in particular on the COGS and PCFG datasets. These results shed light on the discrepancy between the model performance on the IID validation set and the test accuracy on the systematically different generalization split. As a consequence, currently common practice of validating models on the IID dataset is problematic. We conclude that the community should discuss proper ways to develop models for systematic generalization. In particular, we hope that our work clearly demonstrated the necessity of a validation set for systematic generalization in order to establish strong baselines and to avoid a false sense of progress.
+
+# Acknowledgments
+
+We thank Aleksandar Stanić and Imanol Schlag for their helpful comments and suggestions on an earlier version of the manuscript. This research was partially funded by ERC Advanced grant no: 742870, project AlgoRNN, and by Swiss National Science Foundation grant no: 200021_192356, project NEUSYM. We thank hardware donations from NVIDIA & IBM.
+
+# References
+
+Jacob Andreas. 2020. Good-enough compositional data augmentation. In Proc. Association for Computational Linguistics (ACL), pages 7556-7566, Virtual only.
+Dzmitry Bahdanau, Harm de Vries, Timothy J O'Donnell, Shikhar Murty, Philippe Beaudoin, Yoshua Bengio, and Aaron Courville. 2019. CLOSURE: Assessing systematic generalization of CLEVR models. In ViGIL workshop, NeurIPS, Vancouver, Canada.
+Francois Charton, Amaury Hayat, and Guillaume Lample. 2021. Learning advanced mathematical computations from examples. In Int. Conf. on Learning Representations (ICLR), Virtual only.
+Xinyun Chen, Chen Liang, Adams Wei Yu, Dawn Song, and Denny Zhou. 2020. Compositional generalization via neural-symbolic stack machines. In Proc. Advances in Neural Information Processing Systems (NeurIPS), Virtual only.
+Róbert Csordás and Jürgen Schmidhuber. 2019. Improving differentiable neural computers through memory masking, de-allocation, and link distribution sharpness control. In Int. Conf. on Learning Representations (ICLR), New Orleans, LA, USA.
+Róbert Csordás, Sjoerd van Steenkiste, and Jürgen Schmidhuber. 2021. Are neural nets modular? inspecting functional modularity through differentiable weight masks. In Int. Conf. on Learning Representations (ICLR), Virtual only.
+Zihang Dai, Zhilin Yang, Yiming Yang, Jaime G Carbonell, Quoc Le, and Ruslan Salakhutdinov. 2019. Transformer-xl: Attentive language models beyond a fixed-length context. In Proc. Association for Computational Linguistics (ACL), pages 2978-2988, Florence, Italy.
+Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Lukasz Kaiser. 2019. Universal transformers. In Int. Conf. on Learning Representations (ICLR), New Orleans, LA, USA.
+Jerry Fodor and Brian P McLaughlin. 1990. Connectionism and the problem of systematicity: Why smolensky's solution doesn't work. Cognition, 35(2):183-204.
+Jerry A Fodor, Zenon W Pylyshyn, et al. 1988. Connectionism and cognitive architecture: A critical analysis. Cognition, 28(1-2):3-71.
+Karlis Freivalds, Emils Ozolins, and Agris Sostaks. 2019. Neural shuffle-exchange networks - sequence processing in o(n log n) time. In Proc. Advances in Neural Information Processing Systems (NeurIPS), Vancouver, Canada.
+
+Daniel Furrer, Marc van Zee, Nathan Scales, and Nathanael Schärli. 2020. Compositional generalization in semantic parsing: Pre-training vs. specialized architectures. *Preprint arXiv:2007.08970*.
+Xavier Glorot and Yoshua Bengio. 2010. Understanding the difficulty of training deep feedforward neural networks. In Proc. Int. Conf. on Artificial Intelligence and Statistics (AISTATS), pages 249-256, Sardinia, Italy.
+Jonathan Gordon, David Lopez-Paz, Marco Baroni, and Diane Bouchacourt. 2020. Permutation equivariant models for compositional generalization in language. In Int. Conf. on Learning Representations (ICLR), Addis Ababa, Ethiopia.
+Alex Graves. 2012. Sequence transduction with recurrent neural networks. In Workshop on Representation Learning, ICML, Edinburgh, Scotland.
+Alex Graves. 2016. Adaptive computation time for recurrent neural networks. In Int. Conf. on Learning Representations (ICLR) Workshop Track, Vancouver, Canada.
+Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka Grabska-Barwinska, Sergio Gomez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John P. Agapiou, Adrià Puigdomènech Badia, Karl Moritz Hermann, Yori Zwols, Georg Ostrovski, Adam Cain, Helen King, Christopher Summerfield, Phil Blunsom, Koray Kavukcuoglu, and Demis Hassabis. 2016. Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626):471-476.
+Klaus Greff, Sjoerd van Steenkiste, and Jürgen Schmidhuber. 2020. On the binding problem in artificial neural networks. Preprint arXiv:2012.05208.
+Yinuo Guo, Zeqi Lin, Jian-Guang Lou, and Dongmei Zhang. 2020. Hierarchical poset decoding for compositional generalization in language. In Proc. Advances in Neural Information Processing Systems (NeurIPS), Virtual only.
+Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2015. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proc. IEEE Int. Conf. on Computer Vision (ICCV), pages 1026-1034, Santiago, Chile.
+Jonathan Herzig and Jonathan Berant. 2020. Span-based semantic parsing for compositional generalization. Preprint arXiv:2009.06040.
+Jonathan Herzig, Peter Shaw, Ming-Wei Chang, Kelvin Guu, Panupong Pasupat, and Yuan Zhang. 2021. Unlocking compositional generalization in pre-trained models using intermediate representations. Preprint arXiv:2104.07478.
+
+Xiao Shi Huang, Felipe Perez, Jimmy Ba, and Mak-sims Volkovs. 2020. Improving transformer optimization through better initialization. In Proc. Int. Conf. on Machine Learning (ICML), pages 4475-4483, Virtual only.
+Dieuwke Hupkes, Verna Dankers, Mathijs Mul, and Elia Bruni. 2020. Compositionality decomposed: How do neural networks generalise? Journal of Artificial Intelligence Research, pages 757-795.
+Kazuki Irie, Imanol Schlag, Robert Csordás, and Jürgen Schmidhuber. 2021. Going beyond linear transformers with recurrent fast weight programmers. Preprint arXiv:2106.06295.
+Lukasz Kaiser and Ilya Sutskever. 2016. Neural GPUs learn algorithms. In Int. Conf. on Learning Representations (ICLR), San Juan, Puerto Rico.
+Daniel Keysers, Nathanael Scharli, Nathan Scales, Hylke Buisman, Daniel Furrer, Sergii Kashubin, Nikola Momchev, Danila Sinopalnikov, Lukasz Stafiniak, Tibor Tihon, Dmitry Tsarkov, Xiao Wang, Marc van Zee, and Olivier Bousquet. 2020. Measuring compositional generalization: A comprehensive method on realistic data. In Int. Conf. on Learning Representations (ICLR), Addis Ababa, Ethiopia.
+Najoung Kim and Tal Linzen. 2020. COGS: A compositional generalization challenge based on semantic interpretation. In Proc. Conf. on Empirical Methods in Natural Language Processing (EMNLP), pages 9087-9105, Virtual only.
+Kris Korrel, Dieuwke Hupkes, Verna Dankers, and Elia Bruni. 2019. Transcoding compositionally: Using attention to find more generalizable solutions. In Proc. BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP, ACL, pages 1-11, Florence, Italy.
+Brenden M Lake. 2019. Compositional generalization through meta sequence-to-sequence learning. In Proc. Advances in Neural Information Processing Systems (NeurIPS), pages 9788-9798, Vancouver, Canada.
+Brenden M. Lake and Marco Baroni. 2018. Generalization without systematicity: On the compositional skills of sequence-to-sequence recurrent networks. In Proc. Int. Conf. on Machine Learning (ICML), pages 2873-2882, Stockholm, Sweden.
+Yuanpeng Li, Liang Zhao, Jianyu Wang, and Joel Hestness. 2019. Compositional generalization for primitive substitutions. In Proc. Conf. on Empirical Methods in Natural Language Processing and Int.Joint Conf. on Natural Language Processing (EMNLP-IJCNLP), pages 4292-4301, Hong Kong, China.
+Adam Liska, Germán Kruszewski, and Marco Baroni. 2018. Memorize or generalize? searching for a compositional RNN in a haystack. In AEGAP Workshop ICML, Stockholm, Sweden.
+
+Qian Liu, Shengnan An, Jian-Guang Lou, Bei Chen, Zeqi Lin, Yan Gao, Bin Zhou, Nanning Zheng, and Dongmei Zhang. 2020. Compositional generalization by learning analytical expressions. In Proc. Advances in Neural Information Processing Systems (NeurIPS), Virtual only.
+Preetum Nakkiran, Gal Kaplun, Yamini Bansal, Tristan Yang, Boaz Barak, and Ilya Sutskever. 2019. Deep double descent: Where bigger models and more data hurt. In Int. Conf. on Learning Representations (ICLR), Addis Ababa, Ethiopia.
+Benjamin Newman, John Hewitt, Percy Liang, and Christopher D Manning. 2020. The eos decision and length extrapolation. In Proc. BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP, EMNLP, pages 276-291, Virtual only.
+Maxwell I Nye, Armando Solar-Lezama, Joshua B Tenenbaum, and Brenden M Lake. 2020. Learning compositional rules via neural program synthesis. Preprint arXiv:2003.05562.
+Santiago Ontañón, Joshua Ainslie, Vaclav Cvicek, and Zachary Fisher. 2021. Making transformers solve compositional tasks. Preprint arXiv:2108.04378.
+Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch: An imperative style, high-performance deep learning library. In Proc. Advances in Neural Information Processing Systems (NeurIPS), pages 8024-8035, Vancouver, Canada.
+Rebecca Roelofs. 2019. Measuring Generalization and overfitting in Machine learning. Ph.D. thesis, UC Berkeley.
+Jake Russian, Jason Jo, Randall C O'Reilly, and Yoshua Bengio. 2019. Compositional generalization in a deep seq2seq model by separating syntax and semantics. Preprint arXiv:1904.09708.
+David Saxton, Edward Grefenstette, Felix Hill, and Pushmeet Kohli. 2019. Analysing mathematical reasoning abilities of neural models. In Int. Conf. on Learning Representations (ICLR), New Orleans, LA, USA.
+Imanol Schlag, Kazuki Irie, and Jürgen Schmidhuber. 2021. Linear transformers are secretly fast weight programmers. In Proc. Int. Conf. on Machine Learning (ICML), volume 139, pages 9355-9366, Virtual only.
+Imanol Schlag, Paul Smolensky, Roland Fernandez, Nebojsa Jojic, Jurgen Schmidhuber, and Jianfeng Gao. 2019. Enhancing the transformer with explicit relational encoding for math problem solving. Preprint arXiv:1910.06611.
+
+Jürgen Schmidhuber. 1992. Learning to control fast-weight memories: An alternative to recurrent nets. Neural Computation, 4(1):131-139.
+Jürgen Schmidhuber. 2012. Self-delimiting neural networks. Preprint arXiv:1210.0118.
+Peter Shaw, Ming-Wei Chang, Panupong Pasupat, and Kristina Toutanova. 2020. Compositional generalization and natural language variation: Can a semantic parsing approach handle both? Preprint arXiv:2010.12725.
+Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. 2018. Self-attention with relative position representations. In Proc. North American Chapter of the Association for Computational Linguistics on Human Language Technologies (NAACL-HLT), pages 464-468, New Orleans, Louisiana, USA.
+Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In Proc. Advances in Neural Information Processing Systems (NIPS), pages 3104-3112, Montreal, Canada.
+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 Proc. Advances in Neural Information Processing Systems (NIPS), pages 5998-6008, Long Beach, CA, USA.
+Biao Zhang, Ivan Titov, and Rico Sennrich. 2019. Improving deep transformer with depth-scaled initialization and merged attention. In Proc. Conf. on Empirical Methods in Natural Language Processing and Int.Joint Conf. on Natural Language Processing (EMNLP-IJCNLP), pages 898-909, Hong Kong, China.
+Chen Zhu, Renkun Ni, Zheng Xu, Kezhi Kong, W Ronny Huang, and Tom Goldstein. 2021. Gradinit: Learning to initialize neural networks for stable and efficient training. Preprint arXiv:2102.08098.
+
+# A Evaluation Metrics
+
+For all tasks, accuracy is computed on the sequence-level, i.e. all tokens in the sequence should be correct for the output to be counted as correct. For the losses, we always report the average token-wise cross entropy loss.
+
+# B Hyperparameters
+
+For all of our models we use an Adam optimizer with the default hyperparameters of PyTorch (Paszke et al., 2019). We only change the learning rate. We use dropout with probability of 0.1 after each component of the transformer: both after the attention heads and linear transformations. We specify the dataset-specific hyperparameters in Table 4. For all Universal Transformer experiments, we use both the "No scaling" and the "Positional Embedding Downscaling" methods. For the standard Transformers with absolute positional embedding we test different scaling variants on different datasets shown in Table 6. When multiple scaling methods are available, we choose the best performing ones when reporting results in Table 3. We always use the same number of layers for both encoder and decoder. The embedding and the final softmax weights of the decoder are always shared (tied embeddings).
+
+The number of parameters for different models and the corresponding to representative execution time is shown in Table 5.
+
+# C Relative Positional Embedding
+
+We use the relative positional embedding variant of self attention from Dai et al. (2019). Here, we use a decomposed attention matrix of the following form:
+
+$$
+\begin{array}{l} \boldsymbol {A} _ {i, j} ^ {\text {r e l}} = \underbrace {\boldsymbol {H} _ {i} ^ {\top} \boldsymbol {W} _ {q} ^ {\top} \boldsymbol {W} _ {k , E} \boldsymbol {H} _ {j}} _ {(a)} + \underbrace {\boldsymbol {H} _ {i} ^ {\top} \boldsymbol {W} _ {q} ^ {\top} \boldsymbol {W} _ {k , P} \boldsymbol {P} _ {i - j}} _ {(b)} \\ + \underbrace {\boldsymbol {u} ^ {\top} \boldsymbol {W} _ {k , E} \boldsymbol {H} _ {j}} _ {(c)} + \underbrace {\boldsymbol {v} ^ {\top} \boldsymbol {W} _ {k , P} \boldsymbol {P} _ {i - j}} _ {(d)} \\ \end{array}
+$$
+
+where $H_{i}$ is the hidden state of the $i^{\mathrm{th}}$ column of the Transformer, $P_{i}$ is an embedding for position (or in this case distance) $i$ . Matrix $W_{q}$ maps the states to queries, $W_{k,E}$ maps states to keys, while $W_{k,P}$ maps positional embedding to keys. $u$ and $v$ are learned vectors. Component (a) corresponds to
+
+content-based addressing, (b) to content based relative positional addressing, (c) represents a global content bias, while (d) represents a global position bias.
+
+We use sinusoidal positional embedding $\pmb{P}_i \in \mathbb{R}^{d_{\mathrm{model}}}$ . The relative position, $i$ , can be both positive and negative. Inspired by Vaswani et al. (2017), we define $P_{i,j}$ as:
+
+$$
+\boldsymbol {P} _ {i, j} = \left\{ \begin{array}{l l} \sin \left(i / 1 0 0 0 0 ^ {2 j / d _ {\mathrm {m o d e l}}}\right), & \text {i f} j = 2 k \\ \cos \left(i / 1 0 0 0 0 ^ {2 j / d _ {\mathrm {m o d e l}}}\right) & \text {i f} j = 2 k + 1 \end{array} \right. \tag {1}
+$$
+
+Prior to applying the softmax, $A_{i,j}^{\mathrm{rel}}$ is scaled by $\frac{1}{\sqrt{d_{\mathrm{model}}}}$ , as in Vaswani et al. (2017).
+
+We never combine absolute with relative positional embedding. In case of a relative positional variant of any Transformer model, we do not add absolute positional encoding to the word embeddings. We use relative positional attention in every layer, except at the interface between encoder and decoder, where we use the standard formulation from Vaswani et al. (2017), without adding any positional embedding.
+
+# D Embedding Scaling
+
+In this section, we provide full descriptions of embedding scaling strategies we investigated. In the following, $w_{i}$ denotes the word index at input position $i$ , $\pmb{E}_{w} \in \mathbb{R}^{d_{\mathrm{model}}}$ denotes learned word embedding for word index $w$ . Positional embedding for position $i$ is defined as in Eq. 1.
+
+Token Embedding Upscaling. Vaswani et al. (2017) combine the input word and positional embeddings for each position $i$ as $\pmb{H}_i = \sqrt{d_{\mathrm{model}}} \pmb{E}_{w_i} + \pmb{P}_i$ . Although in the original paper, the initialization of $\pmb{E}$ is not discussed, most implementations use Glorot initialization (Glorot and Bengio, 2010), which in this case means that each component of $\pmb{E}$ is drawn from $\mathcal{U}(-\sqrt{\frac{6}{d_{\mathrm{model}} + N_{\mathrm{words}}}}, \sqrt{\frac{6}{d_{\mathrm{model}} + N_{\mathrm{words}}}})$ where $\mathcal{U}(a,b)$ represents the uniform distribution in range $[a,b]$ .
+
+No scaling. This corresponds to how PyTorch initializes embedding layers by default: each element of $\pmb{E}$ is drawn from $\mathcal{N}(0,1)$ . $\mathcal{N}(\mu, \sigma)$ is the normal distribution with mean $\mu$ and standard deviation of $\sigma$ . The word embeddings are combined with the positional embeddings without any scaling: $H_{i} = E_{w_{i}} + P_{i}$
+
+Table 4: Hyperparameters used for different tasks. We denote the feedforward size as $d_{\mathrm{FF}}$ . For the learning rate of CFQ (denoted by $*$ ), the learning rate seemingly differs from Keysers et al. (2020). In fact, although Keysers et al. (2020) use Noam learning rate scheduling, scaling by $\frac{1}{\sqrt{d_{\mathrm{model}}}}$ is not used, so we had to compensate for this to make them functionally equivalent.
+
+ | dmodel | dFF | nhhead | nlayers | batch size | learning rate | warmup | schedule |
| SCAN | 128 | 256 | 8 | 3 | 256 | 10-3 | - | - |
| CFQ - Non-universal | 128 | 256 | 16 | 2 | 4096 | 0.9* | 4000 | Noam |
| CFQ - Universal | 256 | 512 | 4 | 6 | 2048 | 2.24* | 8000 | Noam |
| PCFG | 512 | 2048 | 8 | 6 | 64 | 10-4 | - | - |
| COGS | 512 | 512 | 8 | 2 | 128 | 10-4 | - | - |
| COGS Noam | 512 | 512 | 8 | 2 | 128 | 2 | 4000 | Noam |
| Mathematics | 512 | 2048 | 8 | 6 | 256 | 10-4 | - | - |
+
+Table 5: Model sizes and execution times. One representative split is shown per dataset. Other splits have the same number of parameters, and their execution time is in the same order of magnitude.
+
+| Dataset | Model | No. of params | Execution time | GPU type |
| SCAN | Standard | 992k | 1:30 | Titan X Maxwell |
| Universal | 333k | 1:15 |
| Relative Pos. | 1.1M | 1:45 |
| Universal, Relative Pos. | 366k | 1:30 |
| CFQ MCD 2 | Standard | 685k | 10:00 | Tesla V100-SXM2-32GB-LS |
| Universal | 1.4M | 12:00 |
| Relative Pos. | 751k | 14:15 |
| Universal, Relative Pos. | 1.5M | 14:00 |
| PCFG Systematicity | Standard | 44.7M | 20:30 | Tesla V100-PCIE-16GB |
| Universal | 7.9M | 17:00 |
| Relative Pos. | 47.8M | 21:30 |
| Universal, Relative Pos. | 8.4M | 21:30 |
| COGS | Standard | 9.3M | 17:30 | Tesla V100-SXM2-32GB-LS |
| Universal | 5.1M | 17:15 |
| Relative Pos. | 10.3M | 21:00 |
| Universal, Relative Pos. | 5.6M | 20:00 |
| Math: add_or_sub | Standard | 4.4M | 8:00 | Tesla P100-SXM2-16GB |
| Universal | 7.4M | 7:30 |
| Relative Pos. | 4.7M | 8:30 |
| Universal, Relative Pos. | 7.9M | 8:00 |
+
+Table 6: Scaling types used for standard transformers with absolute positional embedding on different datasets. TEU denotes Token Embedding Upscaling, PED denotes Position Embedding Downscaling.
+
+ | TEU | No scaling | PED |
| SCAN | | ✓ | ✓ |
| CFQ MCD | | ✓ | ✓ |
| CFQ Length | ✓ | ✓ | ✓ |
| PCFG Productivity | ✓ | ✓ | ✓ |
| PCFG Systematicity | ✓ | ✓ | ✓ |
| COGS | ✓ | ✓ | ✓ |
| Mathematics | | ✓ | ✓ |
+
+Position Embedding Downscaling. We propose to use Kaiming initialization (He et al., 2015) for the word embeddings: each element of $E \sim \mathcal{N}(0, \frac{1}{\sqrt{d_{\mathrm{model}}}})$ . Instead of scaling up the word em
+
+beddings, the positional embeddings are scaled down: $H_{i} = E_{w_{i}} + \frac{1}{\sqrt{d_{\mathrm{model}}}} P_{i}$
+
+# E Analyzing the Positively Correlated Loss and Accuracy
+
+In Sec. 3.2, we reported that on the generalization splits of some datasets both the accuracy and the loss grows together during training. Here we further analyze this behavior in Figure 5 (see the caption).
+
+# F Accuracies on the IID Split
+
+To show that the IID accuracy does not provide any useful signal for assessing the quality of the final model, we report IID accuracies of the models from Table 3 in Table 8. We only show datasets for which an IID validation set is available in the same split
+
+Table 7: Test accuracy of different Transformer (Trafo) variants and different initializations on the considered datasets. This is a more detailed version of Table 3, with detailed scores for all initialization variants. The last column shows previously reported accuracies. References: [1] Newman et al. (2020), [2] Keysers et al. (2020), [3] https://github.com/google-research/google-research/tree/master/cfq, [4] Hupkes et al. (2020), [5] Kim and Linzen (2020), [6] Saxton et al. (2019). Results marked with $*$ cannot be directly compared because of different training setups. $\sim$ denotes imprecise numbers read from charts in prior works. For the configuration marked by $\dagger$ , the results are obtained by running 8 seeds from which 3 crashed, resulting in 5 useful runs reported below. Crashed runs suddenly drop their accuracy to 0, which never recovers during the training. The reason for the crashing is the overly big learning rate (2.24, from the baseline). We run another 10 seeds with learning rate of 2.0, obtaining similar final accuracy of $0.75 \pm 0.02$ , but without any crashed runs.
+
+ | Init | Trafo | Uni. Trafo | Rel. Trafo | Rel. Uni. Trafo | Reported |
| SCAN (length cutoff=26) | PED | 0.30 ± 0.02 | 0.21 ± 0.01 | - | - | 0.00[1] |
| No scaling | 0.15 ± 0.07 | 0.14 ± 0.05 | 0.72 ± 0.21 | 1.00 ± 0.00 |
| CFQ Output length | PED | 0.56 ± 0.02 | 0.60 ± 0.34 | - | - | ~ 0.66[2] |
| TEU | 0.57 ± 0.00 | 0.74 ± 0.02 † | - | - |
| No scaling | 0.53 ± 0.04 | 0.77 ± 0.02 | 0.64 ± 0.06 | 0.81 ± 0.01 |
| CFQ MCD 1 | PED | 0.36 ± 0.02 | 0.37 ± 0.05 | - | - | 0.37 ± 0.02[3] |
| No scaling | 0.40 ± 0.01 | 0.39 ± 0.03 | 0.39 ± 0.01 | 0.39 ± 0.04 |
| CFQ MCD 2 | PED | 0.08 ± 0.01 | 0.09 ± 0.01 | - | - | 0.08 ± 0.02[3] |
| No scaling | 0.10 ± 0.01 | 0.09 ± 0.02 | 0.09 ± 0.01 | 0.10 ± 0.02 |
| CFQ MCD 3 | PED | 0.10 ± 0.00 | 0.11 ± 0.00 | - | - | 0.11 ± 0.00[3] |
| No scaling | 0.11 ± 0.00 | 0.11 ± 0.01 | 0.11 ± 0.01 | 0.11 ± 0.03 |
| CFQ MCD mean | PED | 0.18 ± 0.13 | 0.19 ± 0.14 | - | - | 0.19 ± 0.01[2] |
| No scaling | 0.20 ± 0.14 | 0.20 ± 0.14 | 0.20 ± 0.14 | 0.20 ± 0.14 |
| PCFG Productivity split | PED | 0.65 ± 0.03 | 0.78 ± 0.01 | - | - | 0.50 ± 0.02[4] |
| TEU | 0.47 ± 0.27 | 0.78 ± 0.01 | - | - |
| No scaling | 0.63 ± 0.02 | 0.76 ± 0.01 | - | 0.85 ± 0.01 |
| PCFG Systematicity split | PED | 0.87 ± 0.01 | 0.93 ± 0.01 | - | - | 0.72 ± 0.00[4] |
| TEU | 0.75 ± 0.08 | 0.92 ± 0.01 | - | - |
| No scaling | 0.86 ± 0.02 | 0.92 ± 0.00 | 0.89 ± 0.02 | 0.96 ± 0.01 |
| COGS | PED | 0.80 ± 0.00 | 0.77 ± 0.02 | - | - | 0.35 ± 0.06[5] |
| TEU | 0.78 ± 0.03 | 0.78 ± 0.03 | - | - |
| No scaling | 0.62 ± 0.06 | 0.51 ± 0.07 | 0.81 ± 0.01 | 0.77 ± 0.01 |
| Math: add_or_sub | PED | 0.80 ± 0.01 | 0.92 ± 0.02 | - | - | ~ 0.91[6]* |
| No scaling | 0.89 ± 0.01 | 0.94 ± 0.01 | 0.91 ± 0.03 | 0.97 ± 0.01 |
| Math: place_value | PED | 0.00 ± 0.00 | 0.20 ± 0.02 | - | - | ~ 0.69[6]* |
| No scaling | 0.12 ± 0.07 | 0.12 ± 0.01 | - | 0.75 ± 0.10 |
+
+
+(a) COGS: IID Validation set
+
+
+(b) COGS: Generalization test set
+
+as the one reported in Table 3. This complements the IID and generalization accuracies on COGS and PCFG with different embedding scalings we reported in Table 2. With the exception of standard Transformer on PCFG and the "place_value" module of the Mathematics dataset, all other validation accuracies are $100\%$ , while their generalization accuracy vary wildly.
+
+# G Additional Results
+
+Figure 4 shows that both the test loss and accuracy grows on COGS dataset during training. Additionally, it shows the expected, IID behavior on the same dataset for contrast.
+
+Figure 6 shows the relative change in convergence speed when using relative positional embeddings.
+
+
+(a) Decomposed loss
+
+
+(b) Histogram of "good" loss (first and last measurement)
+
+
+Figure 4: Relationship between the loss and accuracy on (a) IID validation set and (b) the generalization test set on COGS (it comes without a validation set for the generalization splits). Standard Transformers are used. The color shows the training step. Five runs are shown. The loss is shown on a logarithmic scale. On the IID validation set (a), the accuracy increases when the loss decreases, as expected. In contrast, on the generalization split (b), high accuracy corresponds to higher loss. For generalization validation loss versus generalization accuracy on CFQ MCD 1, see Figure 2. For the analysis of the underlying reason, see Figure 5.
+(c) Histogram of "bad" loss (first and last measurement)
+
+
+Figure 5: Analysis of the growing test loss on the systematically different test set on CFQ MCD 1 split. We measure the loss individually for each sample in the test set. We categorize samples as "good" if the network output on the corresponding input matched the target exactly any point during the training, and as "bad" otherwise. (a) The total loss (increasing) can be decomposed to the loss of the "good" samples (decreasing), and the loss of the "bad" samples (increasing). (b, c) The histogram of the loss for the "good" and "bad" samples at the beginning and end of the training. The loss of the "good" samples concentrates near zero, while the "bad" samples spread out and the corresponding loss can be very high. The net effect is a growing total loss.
+Figure 6: Relative change in convergence speed by using relative positional embeddings instead of absolute. Convergence speed is measured as the mean number of steps needed to achieve $80\%$ of the final performance of the model. Relative variants usually converge faster. Universal Transformers benefit more than the non-universal ones. The non-universal variants are not shown for PCFG and "Math: place_value", because the relative variants do not converge (see Sec. 3.1).
+
+Table 8: IID validation accuracy for datasets where IID test set is available. CFQ and PCFG are not shown because they require the model to be trained on a separate, IID split. The other settings correspond to Table 3 in the main text. Generalization split test accuracies are shown in parenthesis for easy comparison.
+
+ | Transformer | Uni. Transformer | Rel. Transformer | Rel. Uni. Transformer |
| SCAN (length cutoff=26) | 1.00 ± 0.00 (0.30) | 1.00 ± 0.00 (0.21) | 1.00 ± 0.00 (0.72) | 1.00 ± 0.00 (1.00) |
| COGS | 1.00 ± 0.00 (0.80) | 1.00 ± 0.00 (0.78) | 1.00 ± 0.00 (0.81) | 1.00 ± 0.00 (0.77) |
| Math: add_or_sub | 1.00 ± 0.00 (0.89) | 1.00 ± 0.00 (0.94) | 1.00 ± 0.00 (0.91) | 1.00 ± 0.00 (0.97) |
| Math: place_value | 0.80 ± 0.45 (0.12) | 1.00 ± 0.00 (0.20) | - | 1.00 ± 0.00 (0.75) |
+
+Table 9: Accuracy of different Transformer variants on CFQ. "Big" variant has a batch size of 4096, and is trained with Noam scheduler (learning rate 0.9). "Small" variant has a batch size of 512 and a fixed learning rate of $10^{-4}$ . The ratio of accuracies of "small" and "big" variants are also shown in the "Ratio" column, indicating the relative performance drop caused by decreasing the batch size. Relative variants experience less accuracy drop.
+
+ | Variant | Transformer | Rel. Transformer | Uni. Transformer | Rel. Uni. Transformer |
| CFQ MCD 1 | Big | 0.40 ± 0.01 | 0.39 ± 0.02 | 0.41 ± 0.03 | 0.42 ± 0.02 |
| Small | 0.26 ± 0.02 | 0.32 ± 0.01 | 0.28 ± 0.00 | 0.36 ± 0.01 |
| Ratio | 0.65 | 0.80 | 0.68 | 0.85 |
| CFQ MCD 2 | Big | 0.10 ± 0.01 | 0.09 ± 0.01 | 0.09 ± 0.00 | 0.09 ± 0.02 |
| Small | 0.05 ± 0.01 | 0.07 ± 0.01 | 0.04 ± 0.01 | 0.10 ± 0.01 |
| Ratio | 0.51 | 0.76 | 0.50 | 1.05 |
| CFQ MCD 3 | Big | 0.11 ± 0.00 | 0.11 ± 0.01 | 0.11 ± 0.01 | 0.12 ± 0.02 |
| Small | 0.09 ± 0.00 | 0.09 ± 0.00 | 0.09 ± 0.01 | 0.11 ± 0.01 |
| Ratio | 0.80 | 0.85 | 0.85 | 0.98 |
| CFQ Out. len. | Big | 0.57 ± 0.02 | 0.64 ± 0.04 | 0.76 ± 0.03 | 0.81 ± 0.02 |
| Small | 0.41 ± 0.03 | 0.51 ± 0.02 | 0.55 ± 0.02 | 0.70 ± 0.03 |
| Ratio | 0.72 | 0.80 | 0.73 | 0.87 |
+
+Table 10: Dataset statistics. "#" denotes number of samples. Vocabulary size shows the union of input and output vocabularies. Train and test length denotes the maximum input/output length in the train and test set, respectively.
+
+| Dataset | # train | # IID valid. | # gen. test | # gen. valid. | Voc. size | Train len. | Test len. |
| Scan (length cutoff=26) | 16458 | 1828 | 2624 | - | 19 | 9/26 | 9/48 |
| CFQ MCD 1 | 95743 | - | 11968 | 11968 | 181 | 29/95 | 30/103 |
| CFQ MCD 2 | 95743 | - | 11968 | 11968 | 181 | 29/107 | 30/91 |
| CFQ MCD 3 | 95743 | - | 11968 | 11968 | 181 | 29/107 | 30/103 |
| CFQ Output Length | 100654 | - | 9512 | 9512 | 181 | 29/77 | 29/107 |
| PCFG Productivity | 81010 | - | 11333 | - | 535 | 53/200 | 71/736 |
| PCFG Systematicity | 82168 | - | 10175 | - | 535 | 71/736 | 71/496 |
| COGS | 24155 | 3000 | 21000 | - | 871 | 22/153 | 61/480 |
| Math: add_or_sub | 1969029 | 10000 | 10000 | - | 69 | 60/19 | 62/23 |
| Math: place_value | 1492268 | 9988 | 10000 | - | 69 | 50/1 | 52/1 |
\ No newline at end of file
diff --git a/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/images.zip b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..c37a3819ad627c25ede89b62f23e319a5b6b4f45
--- /dev/null
+++ b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:90e30bd2d7cde82f5f098d70d28b01535d2c4e39d06151094e3671e580630b15
+size 828693
diff --git a/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/layout.json b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..48350a86f91a465267b239391e609585bd602742
--- /dev/null
+++ b/thedevilisinthedetailsimpletricksimprovesystematicgeneralizationoftransformers/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2db61e5149f17c4bfb0b56846fe414a0ba4b9bab7cda8042bf20c14ddccb61ae
+size 454218
diff --git a/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/cb036867-6ca7-49c9-8732-5a4cea4f4102_content_list.json b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/cb036867-6ca7-49c9-8732-5a4cea4f4102_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..9bf2036827204d363e2a7f77312dd44126b4fe2f
--- /dev/null
+++ b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/cb036867-6ca7-49c9-8732-5a4cea4f4102_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:68cd800d1f402d623659f2b5dede0099fc7aaa96828f376bae0890dd112b1fc5
+size 55945
diff --git a/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/cb036867-6ca7-49c9-8732-5a4cea4f4102_model.json b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/cb036867-6ca7-49c9-8732-5a4cea4f4102_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..fb64260437e7e33b0bf6fac92773afc187456f31
--- /dev/null
+++ b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/cb036867-6ca7-49c9-8732-5a4cea4f4102_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bea34b30e4ab70c72155cab8f4b8ed9d47ddb2ccfa32733d0de4e514bb95e451
+size 68307
diff --git a/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/cb036867-6ca7-49c9-8732-5a4cea4f4102_origin.pdf b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/cb036867-6ca7-49c9-8732-5a4cea4f4102_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..1e331d2c0bb169adab88f172a260d4c9d6174b8a
--- /dev/null
+++ b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/cb036867-6ca7-49c9-8732-5a4cea4f4102_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1f306fe39e227b42f0a4e02b8f01d6ea55863b34ce18b20a0676972aa8528662
+size 711969
diff --git a/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/full.md b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..782ea9df6cb3cc4aafcb4f6b83cca7167c1322f7
--- /dev/null
+++ b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/full.md
@@ -0,0 +1,226 @@
+# The Effect of Efficient Messaging and Input Variability on Neural-Agent Iterated Language Learning
+
+Yuchen Lian $^{1,2}$ , Arianna Bisazza $^{3}$ , Tessa Verhoef $^{2}$
+
+$^{1}$ Faculty of Electronic and Information Engineering, Xi'an Jiaotong University
+
+$^{2}$ Leiden Institute of Advanced Computer Science, Leiden University
+
+$^{3}$ Center for Language and Cognition, University of Groningen
+
+{y.lian, t.veroef}@liacs.leidenuniv.nl
+
+a.bisazza@rug.nl
+
+# Abstract
+
+Natural languages display a trade-off among different strategies to convey syntactic structure, such as word order or inflection. This trade-off, however, has not appeared in recent simulations of iterated language learning with neural network agents (Chaabouni et al., 2019b). We re-evaluate this result in light of three factors that play an important role in comparable experiments from the Language Evolution field: (i) speaker bias towards efficient messaging, (ii) non systematic input languages, and (iii) learning bottleneck. Our simulations show that neural agents mainly strive to maintain the utterance type distribution observed during learning, instead of developing a more efficient or systematic language.
+
+# 1 Introduction
+
+The world's languages show immense variety, but linguistic patterns also show important universal tendencies (Greenberg, 1963). It has been argued that these common design features are shaped by human cognitive constraints and pressures during communication and transmission (Kirby et al., 2014). A well-known example of these tendencies is the trade-off between case marking and word order as redundant strategies to encode the role of sentence constituents (Sinnemäki, 2008; Futrell et al., 2015): flexible order typically correlates with the presence of case marking (e.g. in Russian), while fixed order is often observed in languages with little or no case marking (e.g. English).
+
+Researchers interested in language universals and their origins have extensively used agent-based modeling techniques to study the impact of social processes on the emergence of linguistic structures (de Boer, 2006). Besides the horizontal transmission that is often modeled in the referential game setup, the process of iterated learning, where signals are transmitted vertically from generation to generation, has been identified to shape language (Kirby, 2001; Kirby et al., 2014).
+
+Recently, the advent of deep learning based NLP has triggered a renewed interest in agent-based simulations of language emergence. Most existing studies simulate the emergence of language by letting neural network agents play referential games and studying the signals they use (Kottur et al., 2017; Havrylov and Titov, 2017; Lazaridou et al., 2018; Chaabouni et al., 2019a; Dagan et al., 2021). By contrast, Chaabouni et al. (2019b) expose their agents to a pre-defined language, which is then learned and reproduced iteratively by a chain of agents. They analyze how specific properties of the initial languages affect learnability, and further investigate how agent biases affect the evolution across generations. Among others, they studied whether neural agents tend to avoid redundant coding strategies as natural languages do. However, the case-marking/word-order trade-off did not clearly appear in their iterated learning experiments.
+
+In this work, we re-evaluate this finding in light of three factors that play an important role in comparable experiments from the Language Evolution field: (i) speaker bias towards efficient messaging (i Cancho and Solé, 2003), (ii) unpredictable variation in the initial languages (Smith and Wonnacott, 2010; Fedzechkina et al., 2017), (iii) exposure to a limited set of example utterances, known as 'learning bottleneck' (Kirby et al., 2014). We follow the iterated learning setup of Chaabouni et al. (2019b) where neural agents are trained to communicate about trajectories in a simple gridworld, exchanging instructions in miniature languages (Fig. 1).1
+
+# 2 Miniature Languages
+
+Word order and case marking are two different mechanisms to convey sentence constituent roles, both widely attested among world languages. Both
+
+| Type | Utterance |
| Fix+Marker | m1 up 2 m2 left 3 m3 down 1 |
| Fix | up 2 left 3 down 1 |
| Free-order | m1 up 2 m3 down 1 m2 left 3 |
| +Marker | m2 left 3 m1 up 2 m3 down 1 |
| m3 down 1 m1 up 2 m2 left 3 |
| ... |
+
+Figure 1: Utterances corresponding to 'UP UP LEFT LEFT LEFT DOWN', in three basic languages.
+
+have been shown to serve as equally valuable cues to learn grammatical roles during language learning by children (Slobin and Bever, 1982), and by simple recurrent neural networks (Lupyan and Christiansen, 2002). To model these mechanisms we use simple artificial languages based on Chaabouni et al. (2019b). The meaning space is composed of trajectories defined by random combinations of four oriented actions {LEFT, RIGHT, UP, DOWN}. Each utterance or sentence (S) consists of several phrases (P), which in turn are composed of a command (C) and a quantifier (Q):
+
+$$
+S \rightarrow P _ {i} P _ {j} P _ {k} \dots \tag {1}
+$$
+
+$$
+P _ {i} \left| P _ {j} \right| P _ {k} | \dots \rightarrow C Q \tag {2}
+$$
+
+$$
+C \rightarrow (l e f t | r i g h t | u p | d o w n) \tag {3}
+$$
+
+$$
+Q \rightarrow (1 | 2 | 3) \tag {4}
+$$
+
+where left,right,up,down,1,2,3 are spoken words which are atomic elements of the language. We consider three basic language types: Fixed-order with marker (redundant), Fixed-order without marker (non-redundant), and Free-order with marker (non-redundant). See examples in Fig. 1.
+
+Fixed-order vs. Free-order This concerns Rule 1: In a fixed-order language, the order of phrases strictly corresponds to the temporal order of instructions in the trajectory.2 Free-order languages, instead, allow any permutation of phrases. For instance, there are in total six possible free-order utterances for a 3-phrase trajectory (Fig. 1).
+
+Case Marking In a case-marking language, each phrase is preceded by a temporal marker indicating its role. Thus, Rule 2 changes to: $P_{i} \rightarrow m_{i} C Q$ with the marker $m_{i}$ indicating that $C Q$ is the $i^{th}$ action segment. Note that a fully free-order language is unintelligible without markers.
+
+# 3 Neural-Agents Iterated Learning
+
+We strictly follow the iterated learning setup of Chaabouni et al. (2019b) unless explicitly noted.
+
+Agent architecture Agents are implemented as 1-layer attentional Seq2Seq (Sutskever et al., 2014; Bahdanau et al., 2015) LSTM (Hochreiter and Schmidhuber, 1997) networks. Each agent acts as both speaker (receiving trajectories and describing them with utterances) and listener (receiving utterances and trying to induce the corresponding trajectories). The vocabulary contains both actions and words; embeddings of the encoder input and decoder output are tied (Press and Wolf, 2017).
+
+Individual and iterated learning Given trajectory-utterance pairs, agents are trained by teacher forcing (Salakhutdinov, 2014) in both listening and speaking mode, using the early-stopping and optimizer settings of Chaabouni et al. (2019b). Iterated learning (Kirby, 2001) is implemented by letting a trained adult agent teach a randomly initialized child agent, and repeating this process for a number of generations. At each generation, two steps are performed: (1) a trained adult agent receives a batch of trajectories and generates utterances by sampling from its own decoder outputs; (2) a randomly initialized child agent is trained on these agent-specific trajectory-utterance pairs. As an exception, the generation-0 agent is directly trained on the corpus generated by a given miniature grammar.
+
+Evaluation In both speaking and listening mode, sequences are generated by greedy decoding and evaluated by sentence-level accuracy. Listener evaluation is standard as the true meaning of an utterance is unique. For speakers in the first generation, instead, we consider all acceptable utterances according to the grammar as candidate targets; for later generations, we take $k = i!$ utterances sampled from the parent's speaking network as targets ( $i$ is the maximum number of phrases per trajectory). Validation for early stopping is performed similarly. These evaluation procedures allow a child agent's language to deviate from the parent language, even while achieving perfect accuracy.
+
+For each experiment, we report speaking accuracy, listening accuracy, as well as average utterance length across generations. To get more insight into language changes, we plot the distribution of utterance types in the adult speaking agents across generations. Specifically, we count how often an utterance belongs to one of the basic language types (fix, fix Marker, free, free Marker), and how often markers are dropped for some of the phrases (fix_drop, free_drop). Utterances that do not fall into any of these categories are labeled as 'other'.
+
+For more technical details on the agents and evaluation, see Appendix A. Example utterances at various generations are shown in Appendix B.
+
+# 4 Effect of Least-Effort Bias
+
+A bias towards efficient messaging has been proposed as explaining factor for several tendencies observed in natural languages (i Cancho and Solé, 2003; Kanwal et al., 2017; Fedzechkina et al., 2017). Could the lack of such a bias in neural networks explain the survival of redundant languages? To verify this, we design a simple mechanism simulating an agent's preference to minimize utterance length, based on Chaabouni et al. (2019b)'s framework: To teach the next generation, given a trajectory $\mathbf{t}$ , an adult agent generates $n$ (possibly identical) utterances $\{\hat{u}\} = \{u_1, u_2, \dots u_n\}$ by sampling from its trained network. Instead of modifying the training process, we exploit the diversity occurring in the sampled utterances and hard-code a shorter-sentence selection bias into this adult language generation. As shown in Algorithm 1, the sampling function is called $n$ times to generate $n$ samples. In turn, at each iteration, we ask the adult speaker to generate $\ell$ sentences and select each time the shortest one. Thus, we can control the bias strength by varying the number of generated samples $(\ell)$ in each of the $n$ iterations. As $\ell$ increases, the chances of sampling a shorter sentence increase, resulting in a stronger pressure; $\ell = 1$ means no bias. We expect this least-effort bias will cause the redundant disambiguation mechanism to gradually disappear, and the fixed-order strategy to dominate as that always leads to shorter utterances.
+
+Results Fig. 2 shows the iterated learning results of the Fixed+Marker language with various levels of least-effort bias $\ell = \{1,3,5,8\}$ , which represent no pressure, low-, medium- and high-level pressure towards shorter utterances, respectively. The experiment without least-effort pressure
+
+Algorithm 1: Shorter-sentence selection
+Input: Trajectory t
+Output: n sampled utterances { $\hat{u}$ }
+for $j = 1:n$ do
+if shorter_selection then
+uttrs = Adultspeaker(t).sample(ℓ)
+uttr_select = uttrs[0]
+for i = 1 : ℓ do
+u = uttrs[i]
+if len(u) ≤ len(uttr_select) then
+uttr_select = u
+else
+uttr_select = Adultspeaker(t).sample(1)
+ $\{\hat{u}\}$ .append(uttr_select)
+
+$(\ell = 1)$ corresponds to the setup of Chaabouni et al. (2019b), in which the redundant language was found to remain stable across generations.
+
+We find that, while speaking accuracy remains stable (2a), our least-effort pressure leads to a severe drop in listening accuracy (2b) and a dramatic increase of other types in the speaking adult agent starting from the fifth generation (2d). Stronger levels of pressure lead to a faster decrease of average utterance length (2c), which was expected. However, manual inspection of the utterances (Appendix B) reveals that agents start dropping entire phrases, thereby losing information, instead of either dropping markers or changing the word order.
+
+# 5 Effect of Input Language Variability
+
+In the languages of Chaabouni et al. (2019b), markers are either present and fully systematic, or not present at all. If there is no marker example in the initial language, it is unlikely an agent would suddenly invent it. Conversely, a fully systematic use of markers may be perfectly learnable by the agent, unlikely to change or disappear over generations. Unpredictable variation, instead, is a common feature of the artificial languages used in human learning studies. For example Fedzechkina et al. (2017) combine optional case marking with either fixed or free word order, while Smith and Wonnacott (2010) use two plural markers with different distributions over nouns. Inspired by this, we experiment with unpredictable variations in the use of markers, namely: (i) variability among utterances, where each utterance is consistent with one of the basic language types chosen at random, and (ii) variability within utterances, where the use of markers is also unpredictable within a single utterance.
+
+# 5.1 Variability Among Utterances
+
+For every trajectory in the initial training set, two utterances are generated for each of the three basic
+
+
+(a) Speaking accuracy
+
+
+(b) Listening accuracy
+Figure 2: Iterated learning of the Fixed+Marker language with least-effort pressure of varying strength $(\ell)$ , over 10 generations. Results in (a,b,c) are averaged over three random-seed initializations. (d) shows the distribution of utterance types of the speaking adult agents with $\ell = 3$ (one seed only).
+
+
+(c) Average utterance length
+
+
+(d) Utterance types $(\ell = 3)$
+
+language types: (i) Fixed-order+Marker, (ii) Fixed-order without markers and (iii) Free-order+Marker. Our goal here is to find out whether the agents will tend to prefer any of the three language types over generations, according to their inherent biases.
+
+Results Results are shown in Fig. 3 (blue lines). The overall high speaking accuracy suggests that the agents can learn to imitate their parents' language very well. We observe a slow, but steady, loss in listening accuracy, which we attribute to the random sampling errors from the parent speaker and the natural presence of errors in the neural network learning process. Besides a steady increase of un categorizable utterances (other) in Fig. 3d, the distribution of the three language types remains relatively stable even after 20 generations. We looked for sentences where only some of the markers are dropped (free_drop/fix_drop) but found almost none. See examples in Appendix B. These results show that mixing language types in the initial training set is not sufficient to induce the loss of redundant encoding with agent learners, as opposed to human learners (Fedzechkina et al., 2017).
+
+Results with Least-Effort Bias We also study the combination of the two factors (Mix+pressure) using medium pressure $(\ell = 3)$ . This setup (Fig. 3, green lines) leads to a more efficient language during the first five generations, as shown by the initially stable speaking and listening accuracy and a decrease of average length. This phase corresponds to a proliferation of fixed-order no-marker sentences and the disappearance of the other language types (3e). In only two generations, this language has reached the shortest possible overall length while remaining intelligible. After a while, however, child agents start to receive shorter but incorrect utterances, resulting in a drop of listening accuracy and, finally, an unintelligible language.
+
+# 5.2 Variability Within Utterances
+
+We design a more unpredictable language where each phrase marker is randomly dropped according to a given probability (10%). Half of the utterances are fixed- and half are free-order. See examples in Appendix B. This language is closely inspired by those of Fedzechkina et al. (2017). We expect agents will either stop using markers completely over generations, or use them more consistently.
+
+Results Despite the relatively small probability of dropping a marker, speaking and listening accuracies drop rapidly (3a and 3b, grey lines) and other utterances become dominant (Fig. 3f). This language becomes unintelligible before regularization is observed, again challenging our expectations.
+
+# 6 Effect of Learning Bottleneck
+
+Although real languages support the production of enormous sets of utterances, human learners master them by exposure to a limited number of examples. This learning bottleneck acts as a pressure forcing languages to regularize during cultural transmission (Smith et al., 2003; Brighton et al., 2005). Human-based experiments and computational simulations have found that this pressure can lead to increased structure in emerging language systems (Kirby et al., 2014). We apply a learning bottleneck to our mixed language experiment (Sect. 5.1) by randomly sub-sampling, at each iteration, $50\%$ of the data used to train the next generation. Evaluation and training details are the same as in Sect. 5.1.
+
+Results We find that training data sub-sampling leads to a slightly steeper drop in listening accuracy (yellow vs. blue line in Fig. 3b), but the respective distributions of utterance types (Fig. 3g vs. 3d) remain very similar, suggesting the learning bottle
+
+
+(a) Speaking accuracy
+
+
+(b) Listening accuracy
+
+
+(c) Average utterance length
+
+
+(d) Utterance types (Mix)
+
+
+(e) Utter. types (Mix+pressure)
+
+
+Figure 3: Mixed language learning without and with least-effort pressure, drop-marker language without least-effort pressure, and mixed language with learning bottleneck. Results in (a,b,c) are averaged over three random seeds. (d,e,f,g) show the respective distributions of utterance types in the speaking adult agents (one seed only).4
+
+
+(f) Utter. types (Mix_drop)
+(g) Utter. types (Bottleneck)
+
+neck does not result in a more structured language.
+
+# 7 Discussion and Conclusions
+
+Neural-agent iterating learning is a promising framework to study the impact of social processes on the emergence of patterns and language universals, like the word order/case marking tradeoff. However, previous work with LSTM-based agents (Chaabouni et al., 2019b) has failed to replicate this human-like pattern. We re-evaluated this finding by (i) hard-coding a least-effort bias into our agents, (ii) designing less systematic input languages, and (iii) introducing a learning bottleneck. In all cases, our agents proved to be accurate learners, but the patterns of language change over generations did not match our expectations. Specifically, least-effort bias (\$4) and highly unpredictable input language (\$5.2) led to communication failure, whereas moderate input language variability (\$5.1) and learning bottleneck (\$6) led to a stable language distribution, confirming previous observations on the survival of redundant coding strategies in neural-agent iterated learning (Chaabouni et al., 2019b). Only combining least-effort bias with moderate language variability (\$5.1) led to a temporary optimization of the language, but that was again followed by communication failure.
+
+In real language use, the pressure to reduce effort is balanced with communicative needs (Kirby et al., 2015; Regier et al., 2015) and does normally not
+
+lead to severe language degradation. Future work should design subtler least-effort biases, for instance considering efficiency in terms of grammatical structure and cognitive effort. Moreover, our results with non fully systematic languages show that agents strive to preserve the initial utterance type distribution. In human learning, this behavior is called probability matching and is affected by task complexity: more difficult tasks tend to regularization or over-matching (Ferdinand et al., 2019; Kam and Newport, 2009), where the more frequent variant is chosen more often than it appeared in the input. Over many generations, even a slight overmatching can lead to the emergence of linguistic regularities (Smith and Wonnacott, 2010) like the word order/case marking trade-off observed in human learners by Fedzechkina et al. (2017). We conclude that the current neural-agent iterated learning framework is not yet ready to simulate language evolution processes in a human-like way. More natural cognitive biases supporting efficiency should be modeled, while the speaker objective should be balanced with a measure of communicative success, such as the likelihood of a message to be understood by the listener (Goodman and Frank, 2016; Scontras et al., 2021).
+
+# Acknowledgements
+
+Lian was partly funded by the China Scholarship Council (CSC 201906280463). Bisazza was partly funded by the Netherlands Organization for Scientific Research (NWO project 639021646).
+
+# References
+
+Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Henry Brighton, Kenny Smith, and Simon Kirby. 2005. Language as an evolutionary system. *Physics of Life Reviews*, 2(3):177-226.
+Rahma Chaabouni, Eugene Kharitonov, Emmanuel Dupoux, and Marco Baroni. 2019a. Anti-efficient encoding in emergent communication. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 6290-6300.
+Rahma Chaabouni, Eugene Kharitonov, Alessandro Lazaric, Emmanuel Dupoux, and Marco Baroni. 2019b. Word-order biases in deep-agent emergent communication. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5166-5175, Florence, Italy. Association for Computational Linguistics.
+Gautier Dagan, Dieuwke Hupkes, and Elia Bruni. 2021. Co-evolution of language and agents in referential games. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2993-3004, Online. Association for Computational Linguistics.
+Bart de Boer. 2006. Computer modelling as a tool for understanding language evolution. In Evolutionary epistemology, language and culture, pages 381-406. Springer.
+Maryia Fedzechkina, Elisaa L Newport, and T Florian Jaeger. 2017. Balancing effort and information transmission during language acquisition: Evidence from word order and case marking. Cognitive science, 41(2):416-446.
+Vanessa Ferdinand, Simon Kirby, and Kenny Smith. 2019. The cognitive roots of regularization in language. Cognition, 184:53-68.
+Richard Futrell, Kyle Mahowald, and Edward Gibson. 2015. Quantifying word order freedom in dependency corpora. In Proceedings of the Third International Conference on Dependency Linguistics (Depling 2015), pages 91-100, Uppsala, Sweden. Uppsala University, Uppsala, Sweden.
+Noah D. Goodman and Michael C. Frank. 2016. Pragmatic language interpretation as probabilistic inference. Trends in cognitive sciences, 20(11):818-829.
+Joseph Harold Greenberg. 1963. Universals of language.
+
+Serhii Havrylov and Ivan Titov. 2017. Emergence of language with multi-agent games: Learning to communicate with sequences of symbols. 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 2149-2159.
+Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735-1780.
+Ramon Ferrer i Cancho and Ricard V Solé. 2003. Least effort and the origins of scaling in human language. Proceedings of the National Academy of Sciences, 100(3):788-791.
+Carla L Hudson Kam and Elissa L Newport. 2009. Getting it right by getting it wrong: When learners change languages. Cognitive psychology, 59(1):30-66.
+Jasmeen Kanwal, Kenny Smith, Jennifer Culbertson, and Simon Kirby. 2017. Zipf's law of abbreviation and the principle of least effort: Language users optimise a miniature lexicon for efficient communication. Cognition, 165:45-52.
+Simon Kirby. 2001. Spontaneous evolution of linguistic structure—an iterated learning model of the emergence of regularity and irregularity. IEEE Transactions on Evolutionary Computation, 5(2):102-110.
+Simon Kirby, Tom Griffiths, and Kenny Smith. 2014. Iterated learning and the evolution of language. Current opinion in neurobiology, 28:108-114.
+Simon Kirby, Monica Tamariz, Hannah Cornish, and Kenny Smith. 2015. Compression and communication in the cultural evolution of linguistic structure. Cognition, 141:87-102.
+Satwik Kottur, José Moura, Stefan Lee, and Dhruv Batra. 2017. Natural language does not emerge 'naturally' in multi-agent dialog. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2962-2967, Copenhagen, Denmark. Association for Computational Linguistics.
+Angeliki Lazaridou, Karl Moritz Hermann, Karl Tuys, and Stephen Clark. 2018. Emergence of linguistic communication from referential games with symbolic and pixel input. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net.
+Gary Lupyan and Morten H. Christiansen. 2002. Case, word order, and language learnability: Insights from connectionist modeling. In Proceedings of the Twenty-Fourth Annual Conference of the Cognitive Science Society.
+
+Ofir Press and Lior Wolf. 2017. Using the output embedding to improve language models. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 157-163, Valencia, Spain. Association for Computational Linguistics.
+Sashank J. Reddi, Satyen Kale, and Sanjiv Kumar. 2018. On the convergence of adam and beyond. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net.
+Terry Regier, Charles Kemp, and Paul Kay. 2015. Word meanings across languages support efficient communication. The handbook of language emergence, 87:237.
+Ruslan Salakhutdinov. 2014. Deep learning. In The 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD '14, New York, NY, USA - August 24 - 27, 2014, page 1973. ACM.
+Gregory Scontras, Michael Henry Tessler, and Michael Franke. 2021. A practical introduction to the rational speech act modeling framework. *ArXiv preprint*, abs/2105.09867.
+Kaius Sinnemäki. 2008. Complexity trade-offs in core argument marking. Language complexity: Typology, contact, change, 67:88.
+Dan I. Slobin and Thomas G. Bever. 1982. Children use canonical sentence schemas: A crosslinguistic study of word order and inflections. Cognition, 12(3):229-265.
+Kenny Smith, Simon Kirby, and Henry Brighton. 2003. Iterated learning: A framework for the emergence of language. Artificial life, 9(4):371-386.
+Kenny Smith and Elizabeth Wonnacott. 2010. Eliminating unpredictable variation through iterated learning. Cognition, 116(3):444-449.
+Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pages 3104-3112.
+
+# A Training details
+
+Following Chaabouni et al. (2019b) we limit the maximum number of segments per trajectory, $i$ , to 5 and at most 3 steps per phrase, resulting in a total of 89k possible trajectories. Subsequently, the number of candidate target utterances during evaluation is set to $k = i! = 120$ . As an exception, for the drop-marker language (Section 5.2) we limit $i$ to 4 instead of 5 due to the computational cost of enumerating all correct utterances for a trajectory in this language during validation (accordingly, $k$ is reduced to 24). The trajectory-utterance pairs are randomly split into training, validation and test sets with a proportion of $80\%$ , $10\%$ and $10\%$ respectively.
+
+We fix the hidden layer size (20) and batch size (16) for all experiments. Similar to Chaabouni et al. (2019b), we use the Amsgrad optimizer (Reddi et al., 2018). For each generation, the maximum number of training epochs is set to 100 and we stop the training if both speaking and listening accuracy on development set have no improvement over 5 epochs. To ensure the reliability of our results, we repeat each experiment with 3 different random seeds and observe trends over 20 generations (unless trends are already very clear after 10, as in Fig. 2).
+
+# B Example utterances at various generations
+
+We let each agent generate six utterances corresponding to the trajectory 'RIGHT UP UP DOWN RIGHT RIGHT'. As some of these utterances are identical, we remove the duplicates and only list unique ones in Tab. 3.
+
+ | Fix+Marker with pressure (l=3) | Mix | Mix with pressure (l=3) |
| Input | M1 right 1 M2 up 2 M3 down 1 M4 right 3 | right 1 up 2 down 1 right 3 | right 1 up 2 down 1 right 3 |
| M1 right 1 M2 up 2 M3 down 1 M4 right 3 | M1 right 1 M2 up 2 M3 down 1 M4 right 3 |
| M1 right 1 M2 up 2 M4 right 3 M3 down 1 | M2 up 2 M4 right 3 M3 down 1 M1 right 1 |
| M3 down 1 M1 right 1 M4 right 3 M2 up 2 | M4 right 3 M2 up 2 M3 down 1 M1 right 1 |
| Iter_0 | M1 right 1 M2 up 2 M3 down 1 M4 right 3 | right 1 up 2 down 1 right 3 | right 1 up 2 down 1 right 3 |
| M1 right 1 M2 up 2 M3 down 1 M4 right 3 | M1 right 1 M2 up 2 M3 down 1 M4 right 3 |
| M3 right 1 M2 up 2 M4 right 3 M3 down 1 | M1 right 1 M2 up 2 M4 right 3 M3 down 1 |
| Iter_1 | M1 right 1 M2 up 2 M3 down 1 M4 right 3 | right 1 up 2 down 1 right 3 | right 1 up 2 down 1 right 3 |
| M1 right 1 M2 up 2 M3 down 1 M4 right 3 | M1 right 1 M2 up 2 M3 down 1 M4 right 3 |
| M2 up 2 M1 right 1 M4 right 3 M3 down 1 | M3 down 1 M2 up 2 M4 right 3 M1 right 1 |
| M3 down 1 M2 up 2 M4 right 3 M1 right 1 | |
| Iter_5 | M1 right 1 M2 up 2 M3 down 1 M4 right 3 M1 right 1 M2 up 2 M3 down 1 M4 right 3 M1 right 1 M2 up 2 M3 down 1 M4 right 3 M5 3 | M3 down 1 M4 right 3 M2 up 2 M1 right 1 M2 up 2 M3 down 1 M4 right 3 M1 right 1 right 1 up 2 down 1 right 3 | right 1 up 2 down 1 right 3 |
| M1 right 1 M2 up 2 M3 down 1 M4 right 3 M1 right 1 M4 right 3 M3 down 1 M4 right 3 M4 right 3 M3 down 1 M1 right 1 M2 up 2 | |
| Iter_10 | M1 right 1 M2 up 2 M3 down 1 M1 right 1 M2 up 2 M1 right 1 | right 1 up 2 down 1 right 3 | right 1 up 2 down 1 right 3 |
| M2 up 2 M3 down 1 M4 right 3 M1 right 1 | right 1 up 2 |
| M1 right 1 M3 down 1 M4 right 3 M2 up 2 | right 1 |
| M1 right 1 M3 down 1 M4 right 3 M2 up 2 | |
| right 1 up 2 down 1 right 3 | |
+
+ | Mix_drop | Mix with learning bottleneck |
| Input | M1 right 1 M2 up 2 M3 down 1 M4 right 3 | right 1 up 2 down 1 right 3 |
| M1 right 1 M2 up 2 down 1 M4 right 3 | M1 right 1 M2 up 2 M3 down 1 M4 right 3 |
| M2 up 2 right 1 M4 right 3 M3 down 1 | M3 down 1 M1 right 1 M2 up 2 M4 right 3 |
| down 1 M1 right 1 up 2 M4 right 3 | M4 right 3 M2 up 2 M3 down 1 M1 right 1 |
| M1 right 1 M4 right 3 M2 up 2 M3 down 1 | |
| Iter_0 | right 3 M2 up 2 M3 down 1 M4 right 3 | right 1 up 2 down 1 right 3 |
| M1 right 1 up 1 M3 down 1 M2 up 2 M4 right 3 | M3 down 1 M1 right 1 M2 up 2 M4 right 3 |
| M1 right 1 M4 right 3 M3 down 1 M2 up 2 | M1 right 1 M2 up 2 M3 down 1 M4 right 3 |
| M1 right 1 M2 up 2 M3 down 1 M4 right 3 | |
| M3 down 1 M1 right 1 M4 right 3 | |
| Iter_1 | M3 down 1 M1 right 1 M2 up 2 M4 right 3 | M3 down 1 M4 right 3 M2 up 2 M1 right 1 |
| M2 up 2 M4 right 3 M1 right 1 M3 down 1 | M4 right 3 M3 down 1 M2 up 2 M1 right 1 |
| M2 up 2 M1 right 1 M3 down 1 M4 right 3 | M4 right 3 M3 down 1 M1 right 1 M2 up 2 |
| M1 right 1 M2 up 2 M3 down 1 M4 right 3 | right 1 up 2 down 1 right 3 |
| M1 right 1 M2 up 2 M3 down 1 M4 right 3 |
| Iter_5 | M3 down 1 right 3 M1 right 1 M2 up 2 | M2 up 2 M4 right 3 M1 right 1 M5 right 3 |
| M2 up 2 M1 right 1 M3 down 1 M4 right 3 | M2 up 2 M3 down 1 M4 right 3 M1 right 1 |
| right 2 M2 up 2 M3 down 1 M4 right 3 | right 1 up 2 down 1 right 3 |
| M1 right 1 M2 up 3 M3 down 1 M4 right 3 | M1 right 1 M3 down 1 M4 right 3 M2 up 2 |
| M1 right 1 M2 up 2 M3 down 1 M4 right 3 | |
| M3 down 1 right 3 M4 right 3 M1 right 1 | |
| Iter_10 | M1 right 1 M3 down 1 M4 right 3 M1 right 1 | M1 right 1 M2 up 2 M3 down 1 M4 right 3 |
| M4 right 3 down 1 M1 right 1 M2 down 1 down 1 | |
| M4 right 3 M2 up 2 M4 right 3 | |
| M1 right 2 M2 up 3 M3 down 1 M4 right 3 | |
| M3 down 1 M1 right 2 M4 right 3 M2 up 1 | |
| M1 right 1 M3 down 2 M4 right 3 M3 down 1 | |
+
+Table 3: Utterances sampled from the agents' speaking network given the trajectory 'RIGHT UP UP DOWN RIGHT RIGHT' in Fix+Marker language learning with pressure (\$4), Mix language learning without and with pressure (\$5.1), Mix_drop language learning (\$5.2) and Mix language with learning bottleneck (\$6). For each experiment and each generation, we show six randomly sampled utterances (duplicates are omitted for clarity).
\ No newline at end of file
diff --git a/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/images.zip b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..eef2a046474f1c451ccc38f91f3ca2bd74308c59
--- /dev/null
+++ b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f0fc8a25a9c29e658fd9aa6301a4dbfe363046250efcbcd6c1a0dc2d13a96fa0
+size 430742
diff --git a/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/layout.json b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..918579b20584432e238270af80d2706513df1aed
--- /dev/null
+++ b/theeffectofefficientmessagingandinputvariabilityonneuralagentiteratedlanguagelearning/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:87424d1377c81e0372730fae99913c023b21efd2719032e93c4fb74e5e54e390
+size 251123
diff --git a/theeffectofroundtriptranslationonfairnessinsentimentanalysis/151b056e-9bb8-41f5-94bd-82a6ad7cc0ed_content_list.json b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/151b056e-9bb8-41f5-94bd-82a6ad7cc0ed_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..7a91b2c3bc5380f96394ec8fb19e67387b9c5f0d
--- /dev/null
+++ b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/151b056e-9bb8-41f5-94bd-82a6ad7cc0ed_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4ed4320d2170afbe78cb4ff11ef5d579f7da0a3b9bd020ba608e57261670c8e0
+size 37048
diff --git a/theeffectofroundtriptranslationonfairnessinsentimentanalysis/151b056e-9bb8-41f5-94bd-82a6ad7cc0ed_model.json b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/151b056e-9bb8-41f5-94bd-82a6ad7cc0ed_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..2a0673f63516b3363e13317056f71fd8f05b0453
--- /dev/null
+++ b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/151b056e-9bb8-41f5-94bd-82a6ad7cc0ed_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:16419ab4ca9c1217587e2069b9e4e6a6441e25ec640e8bfc3890f967e636c082
+size 45934
diff --git a/theeffectofroundtriptranslationonfairnessinsentimentanalysis/151b056e-9bb8-41f5-94bd-82a6ad7cc0ed_origin.pdf b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/151b056e-9bb8-41f5-94bd-82a6ad7cc0ed_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..63b41e043ee74db42ca522f55559de76484d6fae
--- /dev/null
+++ b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/151b056e-9bb8-41f5-94bd-82a6ad7cc0ed_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:74d3e2c9ac5f06a7b8817d54da3a5c7c7f4359fe307ae65aa8a5d23579351240
+size 229309
diff --git a/theeffectofroundtriptranslationonfairnessinsentimentanalysis/full.md b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..9bdfd33b22e8e831a067447ea82d3ed6cc210fc4
--- /dev/null
+++ b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/full.md
@@ -0,0 +1,127 @@
+# The Effect of Round-Trip Translation on Fairness in Sentiment Analysis
+
+Jonathan Gabel Christiansen* and Mathias Lykke Gammelgaard* and Anders Søgaard Dpt. of Computer Science, University of Copenhagen
+
+# Abstract
+
+Sentiment analysis systems have been shown to exhibit sensitivity to protected attributes. Round-trip translation, on the other hand, has been shown to normalize text. We explore the impact of round-trip translation on the demographic parity of sentiment classifiers and show how round-trip translation consistently improves classification fairness at test time (reducing up to $47\%$ of between-group gaps). We also explore the idea of retraining sentiment classifiers on round-trip-translated data.
+
+# 1 Introduction
+
+It is both unethical and potentially illegal for document classification algorithms to perform significantly better for some groups in society than for others (Mehrabi et al., 2019). Many document classification technologies have, however, been shown to be sensitive to protected attributes such as gender and age (Mehrabi et al., 2019; Delobelle et al., 2020; Ferrer et al., 2020; Koh et al., 2021). This also holds for sentiment analysis (Johannsen et al., 2015; Hovy, 2015; Kritchenko and Mohammad, 2018; Bhaskaran and Bhallamudi, 2019; Touileb et al., 2020). At the same time it is known that round-trip machine translation (Huang, 1990; Federmann et al., 2019) can be used to normalize text (Ling et al., 2013; Rabinovich et al., 2017; Prabhumoye et al., 2018). This could potentially remove group specific deviations from normal language. However, Stanovsky et al. (2019) found that machine translation is also prone to potentially introducing gender bias. Combined, this leaves it an open question whether round-trip translation can be used to reduce the sensitivity of document classifiers to protected attributes of the authors.
+
+In this paper, we evaluate the effect of round-trip translation on fairness using a representative
+
+# Text
+
+Sally is a whiz at math.
+
+Sally es una experta en matemáticas.
+
+Sally is a math expert.
+
+Table 1: The normalizing effect of round-trip translation: translating English to Spanish and back.
+
+corpus of Danish Trustpilot reviews, in which reviews are associated with self-reported protected attributes (gender and age) (Hovy et al., 2015). We evaluate this effect across nine different document classification architectures, both in the setting in which round-trip translation happens at test time only, and in the setting in which both training and test data are translated to a foreign language and back.
+
+Contributions We evaluate round-trip translation as a technique for mitigating sensitivity to protected attributes across two attributes and three document classification architectures. We find that round-trip translation at test time consistently reduces the fairness gap (with up to $47\%$ ), but that for our best models (SVMs stacked on BERT representations), the effect disappears when both training and test data are translated into a foreign language and back.
+
+# 2 Round-trip Translation
+
+Round-trip machine translation (Huang, 1990; Federmann et al., 2019) is the process of machine translating a document to another language and then back to the original language. Table 1 shows a toy example of this process. Ling et al. (2013) found that machine translations of human translations of English tweets into Chinese, back into English, had a tendency to normalize the original text. Rabinovich et al. (2017) observed a similar normalization effect in machine translation systems, and based on their observation, Prabhumoye
+
+| Group | Characteristics | # of reviews |
| 1 | Male, Age ≤ 42 | 7628 |
| 2 | Female, Age ≤ 42 | 5020 |
| 3 | Male, 42 < Age ≤ 55 | 7081 |
| 4 | Female, 42 < Age ≤ 55 | 5571 |
| 5 | Male, 55 < Age | 7535 |
| 6 | Female, 55 < Age | 4489 |
+
+Table 2: Test groups
+
+et al. (2018) subsequently proposed to use roundtrip translation for style transfer. In this paper, we investigate whether this observed normalization effect can be used to mitigate fairness problems in document classification. Specifically, we will use Google cloud translation1 to translate Danish product reviews from the Trustpilot corpus (into English and back), to obtain a (machine) normalized version of this corpus, which we make publicly available.2
+
+# 3 Experiments
+
+Fairness metric The fairness literature is rich with definitions of fairness (Mehrabi et al., 2019), most of which are interpretations of the Rawlsian notion of fairness as equal opportunity (Rawls, 1971). In this work, we adopt the following definition of fairness:
+
+Definition 3.1 (Fairness as equal risk). A model $\theta$ is fair for a set of groups $\mathcal{G}$ , if $\mathbb{E}[\ell(\theta(\mathcal{X}_g), \mathcal{Y}_g)] = \mathbb{E}[\ell(\theta(\mathcal{X}_h, \mathcal{Y}_h)]$ for any $g, h \in \mathcal{G}$ .
+
+If the maximal difference in empirical risk between any two groups in $\mathcal{G}$ is $\epsilon$ , we say $\theta$ is $\epsilon$ -fair. Below we use the F1-score for the negative class as our $\ell(\cdot)$ .3 Note how fairness as equal risk is a generalization of approximately equal conditional risk (Donini et al., 2018).
+
+Data The Danish section of the Trustpilot Corpus consists of 149,240 reviews annotated for (self-reported) sentiment, gender and age. The sentiment ratings are provided on a scale from 1 to 5, which we binarize by mapping low ratings to negative class, i.e., $\{1,2,3\} \mapsto 0$ , and high ratings to positive class, i.e., $\{4,5\} \mapsto 1$ . This leads to a highly skewed distribution of 8,257 negative reviews and 140,983 positive ones. This also motivates the use
+
+of F1-score for the negative class as our performance metric.
+
+We randomly split the data set into training and test leaving $75\%$ of the reviews as training data, and $25\%$ of the reviews as our test data. The test set is further split into six demographic groups according to self-reported gender4 and age (binned in three equal groups), as presented in Table 2. We use these six roughly equal-sized groups to evaluate the fairness of our models.
+
+Impact of round-trip translation We use KL-divergence to get a first impression of the extent to which round-trip translation normalizes our data. This is done across the most frequent 1,000 words in the Trustpilot corpus. For each group, we calculate the probability distribution for these words and compute its KL-divergence to the overall distribution. We do this before and after round-trip translating. Table 4 lists the KL-divergencies before and after round-trip translation. As expected, we observe a significant decrease in KL-divergence for all groups after round-trip translating. This indicates that the reviews were indeed normalized during the process of round-trip translation. We also see that the number of unique words dropped by $36\%$ after round-trip translation.
+
+Document classifiers Our document classifiers all rely on vector representations from pretrained language models. We use two different pretrained language models, namely the multilingual LASER model (Artetxe and Schwenk, 2019) and a monolingual BERT (Devlin et al., 2019) trained for Danish. On top of these we train several classifiers, including nearest neighbor, logistic regression, and (Gaussian kernel) support vector machines (SVMs). We set regularization parameters through grid-search and cross-validation over the training data, but also report results for unregularized logistic regression and SVMs. See Table 3 for hyper-parameters and results.
+
+# 4 Results
+
+In Table 3, we evaluate three document classification architectures across three scenarios: (a) a
+
+| Model | Params | Min | Max | Fairness Gap | Reduction? |
| REVISIONS → REVIEWS (baseline condition) |
| BERT-KNN | k=6 | 0.428 | 0.628 | 0.200 | |
| BERT-LR | l2-regularized | 0.628 | 0.748 | 0.120 | |
| BERT-LR | unregularized | 0.633 | 0.735 | 0.102 | Undefined |
| BERT-SVM | C=10, rbf | 0.642 | 0.750 | 0.108 | |
| BERT-SVM | C=1000, rbf | 0.625 | 0.744 | 0.119 | |
| LASER-LR | l2-regularized | 0.009 | 0.045 | 0.036 | |
| LASER-LR | unregularized | 0.519 | 0.693 | 0.174 | |
| LASER-SVM | C=10, rbf | 0.570 | 0.737 | 0.167 | |
| LASER-SVM | C=1000, rbf | 0.573 | 0.737 | 0.164 | |
| REVISIONS → ROUND-TRIP |
| BERT-KNN | k=6 | 0.420 | 0.571 | 0.151 | ↓ |
| BERT-LR | l2-regularized | 0.608 | 0.712 | 0.104 | ↓ |
| BERT-LR | unregularized | 0.608 | 0.706 | 0.098 | ↓ |
| BERT-SVM | C=10, rbf | 0.612 | 0.710 | 0.098 | ↓ |
| BERT-SVM | C=1000, rbf | 0.615 | 0.710 | 0.095 | ↓ |
| LASER-LR | l2-regularized | 0.009 | 0.048 | 0.039 | ↑ |
| LASER-LR | unregularized | 0.529 | 0.682 | 0.153 | ↓ |
| LASER-SVM | C=10, rbf | 0.580 | 0.705 | 0.125 | ↓ |
| LASER-SVM | C=1000, rbf | 0.586 | 0.705 | 0.119 | ↓ |
| ROUND-TRIP → ROUND-TRIP |
| BERT-KNN | k=6 | 0.468 | 0.575 | 0.107 | ↓ |
| BERT-LR | l2-regularized | 0.605 | 0.725 | 0.120 | ⇒ |
| BERT-LR | unregularized | 0.617 | 0.726 | 0.109 | ↑ |
| BERT-SVM | C=10, rbf | 0.592 | 0.742 | 0.150 | ↑ |
| BERT-SVM | C=1000, rbf | 0.600 | 0.731 | 0.131 | ↑ |
| LASER-LR | l2-regularized | 0.610 | 0.730 | 0.120 | ↑ |
| LASER-LR | unregularized | 0.545 | 0.689 | 0.144 | ↓ |
| LASER-SVM | C=10, rbf | 0.589 | 0.713 | 0.124 | ↓ |
| LASER-SVM | C=1000, rbf | 0.588 | 0.715 | 0.127 | ↓ |
+
+Table 3: We use $F_{1}$ score of positive class as our performance metric. We make several observations: (a) Round-trip translation at test time consistently reduces the fairness gap, and with up to $47\%$ . (b) Round-trip translation of training and test data reduces the fairness gap for LASER models, but widens it for BERT models. (c) Generally, LASER models seem less fair than BERT models, and unregularized models seem more fair than regularized ones. The latter observation aligns with previous work indicating that sparseness is at odds with robustness and fairness (Globerson and Roweis, 2006; Søgaard, 2013; Khani and Liang, 2021).
+
+| Group | KLD REVIEWS | KLD ROUND-TRIP |
| 1 | 0.027 | 0.021 |
| 2 | 0.028 | 0.023 |
| 3 | 0.011 | 0.009 |
| 4 | 0.023 | 0.021 |
| 5 | 0.028 | 0.022 |
| 6 | 0.027 | 0.020 |
+
+Table 4: The KL-divergence between the probability distribution of the 1000 most frequent words in each group and the general distribution, before and after round-trip translation. Round-trip translation reduces group-level divergences.
+
+baseline condition in which classifiers are trained and evaluated on Trustpilot reviews; (b) a scenario in which reviews are round-trip-translated at test time for normalization; and (c) a condition in which the classifiers are retrained on round-trip-translated reviews and evaluated on round-trip-translated reviews.
+
+Test time normalization with round trip translation (b) has an overall positive effect on cross-group generalization, reducing the fairness gap with up to $\sim 27\%$ . The third scenario (c) - i.e., the idea of using round-trip translation for normalizing both the training and the test data - yields mixed results, with fairness gap increases up to $\sim 39\%$ (for BERT models) and decreases up to $\sim 47\%$ (for LASER models). Machine translation introduces its own biases, and some representations may be more sensitive to such biases. Note also that the process of round-trip translating the data consistently reduces the overall accuracy of our document classifiers, suggesting a trade-off between fairness and accuracy.
+
+# 5 Discussion
+
+Round-trip translation is a simple technique for test-time input normalization, and we have shown that it can significantly reduce sensitivity to protected attributes at a low performance cost. One advantage of round-trip translation is that it does not require annotation of protected attributes. Such datasets are generally only available for English at this point. High-quality machine translation, in contrast, is available for hundreds of languages. In this paper, we experiment with using round-trip translation to reduce group disparity of sentiment classifiers for Danish.
+
+It is important to note, however, that the overall performance drop that results from round-trip trans
+
+lation, while relatively small, means that the absolute performance on minority group drops. In other words, all users experience worse performance with the more fair sentiment classifiers. This, of course, is unfortunate and potentially introduces an ethical dilemma. In fact, it is only with our LASER models that minority group performance improves and fairness is reduced.
+
+Round-trip translation is orthogonal to other approaches to improving fairness, such as distributionally robust optimization (Sagawa et al., 2020), invariant risk minimization (Arjovsky et al., 2020), and adversarial training (Dayanik and Padó, 2021). Round-trip translation can thus easily be combined with any of these approaches, but note that these approaches require annotation of protected attributes. Round-trip translation does not and can thus be considered an unsupervised approach to reducing group disparities.
+
+The fairness gap was most consistently reduced by test-time round-trip translation, but doing round-trip translation may be more effective for other machine translation systems. In our experiments, Google Translate introduced new biases when relying on BERT representations, but the approach was successful for document classifiers based on LASER representations: Here, we saw both reductions of the fairness gap and improvements for minority groups. For 2/4 classifiers, we even saw improvements for the majority groups.
+
+# 6 Conclusion
+
+Sentiment classifiers perform better on reviews written by some demographic groups rather than others, with groups defined by protected attributes such as gender and age. We present a first experiment with round-trip translation as a means of reducing this fairness gap in sentiment classification. Specifically, we show that translating Danish product reviews into English and back, reduces group disparity across three different classification architectures. While the performance cost may in our case be prohibitive for some architectures, in practice, we believe that round-trip translation can be an important technique for improving the fairness of document classifiers in the future, which is easier to scale to new tasks and languages than approaches that require annotation of protected attributes.
+
+# Ethics Statement
+
+The gender and age information in the Trustpilot Corpus is self-reported, and all reviewers were free to not report this information. All reviewers that supplied gender information, identified as either male or female, but were free to report other genders.
+
+# Acknowledgement
+
+This work was supported by the Innovation Fund Denmark (Grants no. 0175-00011A and 0175-00014B).
+
+# References
+
+Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paz. 2020. Invariant risk minimization.
+Mikel Artetxe and Holger Schwenk. 2019. Massively multilingual sentence embeddings for zero-shot cross-lingual transfer and beyond. Transactions of the Association for Computational Linguistics, 7:597-610.
+Jayadev Bhaskaran and Isha Bhallamudi. 2019. Good secretaries, bad truck drivers? occupational gender stereotypes in sentiment analysis. In Proceedings of the First Workshop on Gender Bias in Natural Language Processing, pages 62-68, Florence, Italy. Association for Computational Linguistics.
+Erenay Dayanik and Sebastian Padó. 2021. Disentangling document topic and author gender in multiple languages: Lessons for adversarial debiasing. In Proceedings of the Eleventh Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, pages 50-61, Online. Association for Computational Linguistics.
+Pieter Delobelle, Paul Temple, Gilles Perrouin, Benoit Frénay, Patrick Heymans, and Bettina Berendt. 2020. Ethical adversaries: Towards mitigating unfairness with adversarial machine learning.
+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.
+Michele Donini, Luca Oneto, Shai Ben-David, John S Shawe-Taylor, and Massimiliano Pontil. 2018. Empirical risk minimization under fairness constraints. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc.
+
+Christian Federmann, Oussama Elachqar, and Chris Quirk. 2019. Multilingual whispers: Generating paraphrases with translation. In Proceedings of the 5th Workshop on Noisy User-generated Text (W-NUT 2019), pages 17-26, Hong Kong, China. Association for Computational Linguistics.
+Xavier Ferrer, Tom van Nuenen, Jose M. Such, Mark Côté, and Natalia Criado. 2020. Bias and discrimination in ai: a cross-disciplinary perspective.
+Amir Globerson and Sam T. Roweis. 2006. Nightmare at test time: robust learning by feature deletion. In ICML, volume 148 of ACM International Conference Proceeding Series, pages 353-360. ACM.
+Dirk Hovy. 2015. Demographic factors improve classification performance. 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 752-762, Beijing, China. Association for Computational Linguistics.
+Dirk Hovy, Anders Johannsen, and Anders Søgaard. 2015. User review sites as a resource for large-scale sociolinguistic studies. In Proceedings of the 24th International Conference on World Wide Web, WWW '15, page 452-461, Republic and Canton of Geneva, CHE. International World Wide Web Conferences Steering Committee.
+Xiuming Huang. 1990. A machine translation system for the target language inexpert. In COLNG 1990 Volume 3: Papers presented to the 13th International Conference on Computational Linguistics.
+Anders Johannsen, Dirk Hovy, and Anders Søgaard. 2015. Cross-lingual syntactic variation over age and gender. In Proceedings of the Nineteenth Conference on Computational Natural Language Learning, pages 103–112, Beijing, China. Association for Computational Linguistics.
+Fereshte Khani and Percy Liang. 2021. Removing spurious features can hurt accuracy and affect groups disproportionately. In *FAccT* '21: 2021 ACM Conference on Fairness, Accountability, and Transparency, Virtual Event / Toronto, Canada, March 3-10, 2021, pages 196-205. ACM.
+Svetlana Kiritchenko and Saif Mohammad. 2018. Examining gender and race bias in two hundred sentiment analysis systems. In Proceedings of the Seventh Joint Conference on Lexical and Computational Semantics, pages 43-53, New Orleans, Louisiana. Association for Computational Linguistics.
+Pang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Irena Gao, Tony Lee, Etienne David, Ian Stavness, Wei Guo, Berton A. Earnshaw, Imran S. Haque, Sara Beery, Jure Leskovec,
+
+Anshul Kundaje, Emma Pierson, Sergey Levine, Chelsea Finn, and Percy Liang. 2021. Wilds: A benchmark of in-the-wild distribution shifts.
+Wang Ling, Chris Dyer, Alan W Black, and Isabel Trancoso. 2013. Paraphrasing 4 microblog normalization. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 73-84, Seattle, Washington, USA. Association for Computational Linguistics.
+Ninareh Mehrabi, Fred Morstatter, Nripsuta Saxena, Kristina Lerman, and Aram Galstyan. 2019. A survey on bias and fairness in machine learning.
+Shrimai Prabhumoye, Yulia Tsvetkov, Ruslan Salakhutdinov, and Alan W Black. 2018. Style transfer through back-translation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 866-876, Melbourne, Australia. Association for Computational Linguistics.
+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, Valencia, Spain. Association for Computational Linguistics.
+John Rawls. 1971. A Theory of Justice, 1 edition. Belknap Press of Harvard University Press, Cambridge, Massachusetts.
+Shiori Sagawa, Pang Wei Koh, Tatsunori B. Hashimoto, and Percy Liang. 2020. Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization.
+Anders Søgaard. 2013. Zipfian corruptions for robust POS tagging. In Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 668-672, Atlanta, Georgia. Association for Computational Linguistics.
+Gabriel Stanovsky, Noah A. Smith, and Luke Zettlemoyer. 2019. Evaluating gender bias in machine translation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1679-1684, Florence, Italy. Association for Computational Linguistics.
+Samia Touileb, Lilja Øvrelid, and Erik Velldal. 2020. Gender and sentiment, critics and authors: a dataset of Norwegian book reviews. In Proceedings of the Second Workshop on Gender Bias in Natural Language Processing, pages 125-138, Barcelona, Spain (Online). Association for Computational Linguistics.
\ No newline at end of file
diff --git a/theeffectofroundtriptranslationonfairnessinsentimentanalysis/images.zip b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..7c072e46d65ced13a6412f5fc55481df08273881
--- /dev/null
+++ b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8b39dd4305dc6da0e4b69cf81140375470ccf2b0696514cc2f61d7c2cf7b62cb
+size 233539
diff --git a/theeffectofroundtriptranslationonfairnessinsentimentanalysis/layout.json b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..5d8bd63b652ac55f085cec78de91d82e0f2a2466
--- /dev/null
+++ b/theeffectofroundtriptranslationonfairnessinsentimentanalysis/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1902a94a9c76148f7ae31e20a8c084dd45385eb330f6e6a4bbe311fa7391ca54
+size 156903
diff --git a/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/446c458b-67ce-44fe-8224-37d8ebc8f66a_content_list.json b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/446c458b-67ce-44fe-8224-37d8ebc8f66a_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..c564e7ce76f9b93d0231432419a90cf0647b2585
--- /dev/null
+++ b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/446c458b-67ce-44fe-8224-37d8ebc8f66a_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bf9b126e8cec9b0783e1ee25bcab4274030cca480bbb23943eea948edc0570fc
+size 93673
diff --git a/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/446c458b-67ce-44fe-8224-37d8ebc8f66a_model.json b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/446c458b-67ce-44fe-8224-37d8ebc8f66a_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..a61d5bf1d59163f2ac64074b1fed96e5fd27e653
--- /dev/null
+++ b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/446c458b-67ce-44fe-8224-37d8ebc8f66a_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d3242f1be3ac4f24efbcaf895d0502172c8b1d1a322485e98d27cef7e085fab4
+size 116172
diff --git a/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/446c458b-67ce-44fe-8224-37d8ebc8f66a_origin.pdf b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/446c458b-67ce-44fe-8224-37d8ebc8f66a_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7087cf69150af32beb986e1168ac9d3276a622f5
--- /dev/null
+++ b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/446c458b-67ce-44fe-8224-37d8ebc8f66a_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9675cee5f350b5c2361a6b3c59a75c480dbbf68f47d0858f7527880d46b51fc6
+size 727284
diff --git a/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/full.md b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..a6c798315bc66e6ebb7996506c1fec312e883b0c
--- /dev/null
+++ b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/full.md
@@ -0,0 +1,410 @@
+# The Future is not One-dimensional: Complex Event Schema Induction by Graph Modeling for Event Prediction
+
+Manling Li $^{1}$ , Sha Li $^{1}$ , Zhenhailong Wang $^{1}$ , Lifu Huang $^{2}$ , Kyunghyun Cho $^{3}$ , Heng Ji $^{1}$ , Jiawei Han $^{1}$ , Clare Voss $^{4}$
+
+$^{1}$ UIUC $^{2}$ Virginia Tech $^{3}$ NYU $^{4}$ US ARL
+
+{manling2,shal2,wangz3,hengji,hanj}@illinois.edu, lifuh@vt.edu,kyunghyun.cho@nyu.edu,clare.r.voss.civ@mail.mil
+
+# Abstract
+
+Event schemas encode knowledge of stereotypical structures of events and their connections. As events unfold, schemas are crucial to act as a scaffolding. Previous work on event schema induction focuses either on atomic events or linear temporal event sequences, ignoring the interplay between events via arguments and argument relations. We introduce a new concept of Temporal Complex Event Schema: a graph-based schema representation that encompasses events, arguments, temporal connections and argument relations. In addition, we propose a Temporal Event Graph Model that predicts event instances following the temporal complex event schema. To build and evaluate such schemas, we release a new schema learning corpus containing 6,399 documents accompanied with event graphs, and we have manually constructed gold-standard schemas. Intrinsic evaluations by schema matching and instance graph perplexity, prove the superior quality of our probabilistic graph schema library compared to linear representations. Extrinsic evaluation on schema-guided future event prediction further demonstrates the predictive power of our event graph model, significantly outperforming human schemas and baselines by more than $23.8\%$ on HITS@1.
+
+# 1 Introduction
+
+The current automated event understanding task has been overly simplified to be local and sequential. Real world events, such as disease outbreaks and terrorist attacks, have multiple actors, complex timelines, intertwined relations and multiple possible outcomes. Understanding such events requires knowledge in the form of a library of event schemas, capturing the progress of time, and performing global inference for event prediction. For
+
+example, regarding the 2019 protest in Hong Kong International Airport, a typical question from analysts would be "How long will the flights being canceled?" This requires an event understanding system to match events to schema representations and reason about what might happen next. The airport protest schema would be triggered by "protest" and "flight cancellation", and evidence of protesters (e.g., the number of protesters, the instruments being used, etc) will suggest a CEO resignation event, or a flight rescheduling event, or continuous flight cancellation events with respective probabilities.
+
+
+Figure 1: The example schema of the complex event type car-bombing. A person learned to make bombs and bought materials as well as a vehicle. Then the bomb was assembled to the vehicle, and then the attacker drove it to attack people. People can be hurt by the vehicle, or by the explosion of the bomb, or by the crash of the vehicle.
+
+Comprehending such a news story requires following a timeline, identifying key events and tracking characters. We refer to such a "story" as a complex event, e.g., the Kabul ambulance bombing event. Its complexity comes from the inclusion of multiple atomic events (and their arguments), relations and temporal order. A complex event schema can be used to define the typical structure of a particular type of complex event, e.g., carbombing. This leads us to the new task that we address in this paper: temporal complex event
+
+schema induction. Figure 1 shows an example schema about car-bombing with multiple temporal dependencies between events. Namely, the occurrence of one event may depend on multiple events. For example, the ASSEMBLE event happens after buying both the bomb materials and the vehicle. Also, there may be multiple events following an event, such as the multiple consequences of the ATTACK event in Figure 1. That is to say, "the future is not one-dimensional". Our automatically induced probabilistic complex event schema can be used to forecast event abstractions into the future and thus provide a comprehensive understanding of evolving situations, events, and trends.
+
+For each type of complex event, we aim to induce a schema library that is probabilistic, temporally organized and semantically coherent. Low level atomic event schemas are abundant, and can be part of multiple, sparsely occurring, higher-level schemas. We propose a Temporal Event Graph Model, an auto-regressive graph generation model, to reach this goal. Given a currently extracted event graph, we generate the next event type node with its potential arguments, such as the ARREST event in Figure 2, and then propagate edge-aware information following temporal orders. After that, we employ a copy mechanism to generate coreferential arguments, such as the DETAINEE argument is the ATTACKER of the previous ATTACK event, and build relation edges for them, e.g., PARTWhole relation between the PLACE arguments. Finally, temporal dependencies are determined with argument connections considered, such as the temporal edge showing that ARREST is after ATTACK.
+
+Our generative model serves as both a schema library and a predictive model. Specifically, we can probe the model to generate event graphs unconditionally to obtain a set of schemas. We can also pass partially instantiated graphs to the model and "grow" the graph either forward or backward in time to predict missing events, arguments or relations, both from the past and in the future. We propose a set of schema matching metrics to evaluate the induced schemas by comparing with human-created schemas and show the power of the probabilistic schema in the task of future event prediction as an extrinsic evaluation, to predict event types that are likely to happen next.
+
+We make the following novel contributions:
+
+- This is the first work to induce probabilistic temporal graph schemas for complex events
+
+| Symbol | Meaning |
| G∈G | Instance graph of a complex event |
| S∈S | Schema graph of a complex event type |
| e∈E | Event node in an instance graph |
| v∈V | Entity node in an instance graph |
| {ei,el} | Temporal ordering edge between events eiand el, indicating eiis before el |
| {ei,a,vj} | Argument edge, indicatingvjplays argument role a in the event ei |
| {vj,r,vk} | Relation edge between entitiesvjand vk,and r is the relation type |
| A(e) | Argument role set of event e, defined by the IE ontology |
| Φε | The type set of events |
| Φγ | The type set of entities |
| φ(·) | A mapping function from a node to its type |
| G<i> | Subgraph of G containing events before eiand their arguments |
+
+Table 1: List of symbols
+
+across documents, which capture temporal dynamics and connections among individual events through their coreferential or related arguments.
+
+- This is the first application of graph generation methods to induce event schemas.
+- This is the first work to use complex event schemas for event type prediction, and also produce multiple hypotheses with probabilities.
+- We have proposed a comprehensive set of metrics for both intrinsic and extrinsic evaluations.
+- We release a new data set of 6,399 documents with gold-standard schemas annotated manually.
+
+# 2 Problem Formulation
+
+From a set of documents describing a complex event, we construct an instance graph $G$ which contains event nodes $E$ and entity nodes (argument nodes) $V$ . There are three types of edges in this graph: (1) event-event edges $\langle e_i, e_l \rangle$ connecting events that have direct temporal relations; (2) event-entity edges $\langle e_i, a, v_j \rangle$ connecting arguments to the event; and (3) entity-entity edges $\langle v_j, r, v_k \rangle$ indicating relations between entities. We can construct instance graphs by applying Information Extraction (IE) techniques on an input text corpus. In these graphs, the relation edges do not have directions but temporal edges between events are directional, going from the event before to the event after.
+
+For each complex event type, given a set of instance graphs $\mathcal{G}$ , the goal of schema induction is to generate a schema library $S$ . In each schema graph $S$ , the nodes are abstracted to the types of events and entities. Figure 1 is an example
+
+Existing Graph
+
+Temporal Ordering
+
+(1) Event Generation
+
+Temporal Ordering
+
+(2) Edge-Aware Graph Neural Network
+
+Temporal Ordering
+
+
+(3) Coreferential Argument Generation
+
+
+(4) Entity Relation Edge Generation
+
+
+(5) Event Temporal Ordering Prediction
+Figure 2: The generation process of Temporal Event Graph Model.
+
+of schema $^2$ for complex event type car-bombing. Schema graphs can be regarded as a summary abstraction of instance graphs, capturing the reoccurring structures.
+
+# 3 Our Approach
+
+# 3.1 Instance Graph Construction
+
+To induce schemas for a complex event type, such as car-bombing, we construct a set of instance graphs, where each instance graph is about one complex event, such as Kabul ambulance bombing.
+
+We first identify a cluster of documents that describes the same complex event. In this paper, we treat all documents linked to a single Wikipedia page as belonging to the same complex event, detailed in §4.1.
+
+We use OneIE, a state-of-the-art Information Extraction system (Lin et al., 2020), to extract entities, relations and events, and then perform cross-document entity (Pan et al., 2015, 2017) and event coreference resolution (Lai et al., 2021) over the document cluster of each complex event. We further conduct event-event temporal relation extraction (Ning et al., 2019; Wen et al., 2021b) to determine the order of event pairs. We run the entire
+
+pipeline following (Wen et al., 2021a) $^{3}$ , and the detailed extraction performance is reported in the paper.
+
+After extraction, we construct one instance graph for each complex event, where coreferential events or entities are merged. We consider the isolated events as irrelevant nodes in schema induction, so they are excluded from the instance graphs during graph construction. Considering schema graphs focus on type-level abstraction, we use type label and node index to represent each node, ignoring the mention level information in these instance graphs.
+
+# 3.2 Temporal Event Graph Model Overview
+
+Given an instance graph $\mathcal{G}$ , we regard the schema as the hidden knowledge to guide the generation of these graphs. To this end, we propose a temporal event graph model that maximizes the probability of each instance graph, parameterized by $\prod_{G\in \mathcal{G}}p(G)$ . At each step, based on the previous graph $G_{< i}$ , we predict one event node $e_i$ with its arguments to generate the next graph $G_{i}$
+
+$$
+p (G) = \prod_ {i = 0} ^ {| \mathcal {E} |} p \left(G _ {i} \mid G _ {< i}\right).
+$$
+
+We factorize the probability of generating new nodes and edges as:
+
+$$
+\begin{array}{l} p (G _ {i} | G _ {< i}) = p \left(e _ {i} | G _ {< i}\right) \prod_ {a _ {j} \in \mathcal {A} (e _ {i})} p (\langle e _ {i}, a _ {j}, v _ {j} \rangle | e _ {i}, a _ {j}) \\ \prod_ {v _ {k} \in G _ {< i}} p (\langle v _ {j}, r, v _ {k} \rangle | v _ {j}, v _ {k}) \prod_ {e _ {l} \in G _ {< i}} p (\langle e _ {i}, e _ {l} \rangle | e _ {i}, e _ {l}). \tag {1} \\ \end{array}
+$$
+
+As shown in Figure 2, an event node $e_i$ is generated first according to the probability $p(e_i | G_{6 ontology, a newly defined fine-grained ontology for Schema Learning, with 24 entity types, 46 relation types, 67 event types, and 85 argument roles.7 Our schema induction method does not rely on any specific ontology, only the IE system is trained on a given ontology to create the instance event graphs.
+
+General Schema Learning Corpus: The Schema Learning Corpus, released by LDC (LDC2020E25), includes 82 types of complex events, such as Disease Outbreak, Presentations and Shop Online.
+
+Each complex event is associated with a set of source documents. This data set also includes ground-truth schemas created by LDC annotators, which were used for our intrinsic evaluation.
+
+| Dataset | Split | #doc | #graph | #event | #arg | #rel |
| General | Train | 451 | 451 | 6,040 | 10,720 | 6,858 |
| Dev | 83 | 83 | 1,044 | 1,762 | 1,112 |
| Test | 83 | 83 | 1,211 | 2,112 | 1,363 |
| IED | Train | 5,247 | 343 | 41,672 | 136,894 | 122,846 |
| Dev | 575 | 42 | 4,661 | 15,404 | 13,320 |
| Test | 577 | 45 | 5,089 | 16,721 | 14,054 |
+
+Table 2: Data statistics. Each instance graph is about one complex event.
+
+IED Schema Learning Corpus: The same type of complex events may have many variants, which depends on the different types of conditions and participants. In order to evaluate our model's capability at capturing uncertainty and multiple hypotheses, we decided to dive deeper into one scenario and chose the improvised explosive device (IED) as our case study. We first collected Wikipedia articles that describe 4 types of complex events, i.e., Car-bombing IED, Drone Strikes IED, Suicide IED and General IED. Then we followed (Li et al., 2021) to exploit the external links to collect the additional news documents with the corresponding complex event type.
+
+The ground-truth schemas for this IED corpus are created manually, through a schema curation tool (Mishra et al., 2021). Only one human schema graph was created for each complex event type, resulting in 4 schemas. In detail, for each complex event type, we presented example instance graphs and the ranked event sequences to annotators to create human (ground truth) schemas. The event sequences are generated by traversing the instance graphs, and then sorted by frequency and the number of arguments. Initially we assigned three annotators (IE experts) to each create a version of the schema and then the final schema was merged through discussion. After that, two annotators (linguists) performed a two-pass revision. Human curation focuses on merging and trimming steps by validating them using the reference instance graphs. Also, temporal dependencies between steps were further refined, and coreferential entities and their relations were added during the curation process. To avoid bias from the event sequences, linguists in the second round revision were not presented with the event sequences. All annotators were trained
+
+and disagreements were resolved through discussion.
+
+# 4.2 Schema Matching Evaluation
+
+We compare the generated schemas with the ground truth schemas based on the overlap between them. The following evaluation metrics were employed:8
+
+Event Match: A good schema must contain the events crucial to the complex event scenario. $F$ -score is used to compute the overlap of event nodes.
+
+Event Sequence Match: A good schema is able to track events through a timeline. So we obtain event sequences following temporal order, and evaluate $F$ -score on the overlapping sequences of lengths $l = 2$ and $l = 3$ .
+
+Event Argument Connection Match: Our complex event graph schema includes entities and their relations and captures how events are connected through arguments, in addition to their temporal order. We categorize these connections into three categories: (1) two events are connected by shared arguments; (2) two events have related arguments, i.e., their arguments are connected through entity relations; (3) there are no direct connections between two events. For every pair of overlapped events, we calculate $F$ -score based on whether these connections are predicted correctly. The human schemas of the General dataset do not contain arguments and the relations between arguments, so we only compute this metric for the IED dataset.
+
+# 4.3 Instance Graph Perplexity Evaluation
+
+To evaluate our temporal event graph model, we compute the instance graph perplexity by predicting the instance graphs in the test set,
+
+$$
+\mathrm {P P} = 2 ^ {- \frac {1}{| \mathcal {G} _ {\text {t e s t}} |} \sum_ {G \in \mathcal {G} _ {\text {t e s t}}} \log_ {2} p (G)}. \tag {1}
+$$
+
+We calculate the full perplexity for the entire graph using Equation (1), and event perplexity using only event nodes, emphasizing the importance of correctly predicting events.
+
+# 4.4 Schema-Guided Event Prediction
+
+To explore schema-guided probabilistic reasoning and prediction, we perform an extrinsic evaluation of event prediction. Different from traditional event prediction tasks, the temporal event graphs contain arguments with relations, and there are
+
+type labels assigned to nodes and edges. We create a graph-based event prediction dataset using our testing graphs. The task aims to predict ending events of each graph, i.e., events that have no future events after it. An event is predicted correctly if its event type matches one of the ending events in the graph. Considering that there can be multiple ending events in one instance graph, we rank event type prediction scores and adopt MRR (Mean Reciprocal Rank) and HITS@1 as evaluation metrics.
+
+# 5 Experiments
+
+# 5.1 Experiment Setting
+
+Baseline 1: Event Language Model (Rudinger et al., 2015; Pichotta and Mooney, 2016) is the state-of-the-art event schema induction method. It learns the probability of temporal event sequences, and the event sequences generated from event language model are considered as schemas.
+
+Baseline 2: Sequential Pattern Mining (Pei et al., 2001) is a classic algorithm for discovering common sequences. We also attach arguments and their relations as extensions to the pattern. Considering that the event language model baseline cannot handle multiple arguments and relations, we add sequential pattern mining for comparison. The frequent patterns mined are considered as schemas.
+
+Reference: Human Schema is added as a baseline in the extrinsic task of event prediction. Since human-created schemas are highly accurate but not probabilistic, we want to evaluate their limits at predicting events in the extrinsic task. We match schemas to instances and fill in the matched type.
+
+Ablation Study: Event Graph Model w/o Argument Generation is included as a variant of our model in which we remove argument generation (§3.5 and §3.6). It learns to generate a graph containing only event nodes with their temporal relations, aiming to verify whether incorporating argument information helps event modeling.
+
+# 5.2 Implementation Details
+
+Training Details. For our event graph model, the representation dimension is 128, and we use a 2-layer GNN. The value of $B$ is 2. The number of mixture components in temporal classifier is 2. The learning rate is 1e-4. To train event language model baseline, instead of using LSTM-based architecture following (Pichotta and Mooney, 2016), we adopt the state-of-the-art auto-regressive language XLNet (Yang et al., 2019). In detail, we
+
+first linearize the graph using topological sort, and then train XLNet $^9$ using the dimension of 128 (the same as our temporal event graph model), and the number of layers is 3. The learning rate is 1e-4. We select the best model on the validation set. Both of our model and event language model baseline are trained on one Tesla V100 GPU with 16GB DRAM. For sequential pattern mining, we perform random walk, starting from every node in instance graphs and ending at sink nodes, to obtain event type sequences, and then apply PrefixSpan (Pei et al., 2001) $^{10}$ to rank sequential patterns.
+
+Evaluation Details. To compose the schema library, we use the first ranked sequence as the schema for these two models. To perform event prediction using baselines, we traverse the input graph to obtain event type sequences, and conduct prediction on all sequences to produce an averaged score. For human schemas, we first linearize them and the input graphs, and find the longest common subsequence between them.
+
+# 5.3 Results and Analysis
+
+Intrinsic Evaluation. In Table 3, the significant gain on event match demonstrates the ability of our graph model to keep salient events. On sequence match, our approach achieves larger performance gain compared to baselines when the path length $l$ is longer. It implies that the proposed model is capable of capturing longer and wider temporal dependencies. In the case of connection match, only sequential pattern mining in the baselines can predict connections between events. When compared against sequential pattern mining, our generation model significantly performs better since it considers the inter-dependency of arguments and encodes them with graph structures.
+
+Extrinsic Evaluation. On the task of schemaguided event prediction, our graph model obtains significant improvement (see Table 4.) The low performance of human schema demonstrates the importance of probabilistically modeling schemas to support downstream tasks. Take Figure 3 as an example. Human schemas produce incorrect event types such as TRAILHEARING, since it matches the sequence ATTACK $\rightarrow$ DIE $\rightarrow$ TRAILHEARING, incapable of capturing the inter-dependencies between sequences. However, our model is able to customize the prediction to the global context of the input
+
+| Dataset | Model | Event Match | Sequence Match l = 2 | l = 3 | Connection Match | Event Perplexity | Full Perplexity |
| General | Event Language Model | 54.76 | 22.87 | 8.61 | - | - | - |
| Sequential Pattern Mining | 49.18 | 20.31 | 7.37 | - | - | - |
| Event Graph Model | 58.15 | 24.79 | 9.18 | - | 24.25 | 137.18 |
| w/o ArgumentGeneration | 56.96 | 22.47 | 8.21 | - | 68.59 | - |
| IED | Event Language Model | 49.15 | 17.77 | 5.32 | - | - | - |
| Sequential Pattern Mining | 47.91 | 18.39 | 4.79 | 5.41 | - | - |
| Event Graph Model | 59.73 | 21.51 | 7.81 | 10.67 | 39.39 | 168.89 |
| w/o ArgumentGeneration | 55.01 | 18.24 | 6.67 | - | 51.98 | - |
+
+Table 3: Intrinsic evaluation results, including schema matching F1 score (%) and instance graph perplexity.
+
+| Dataset | Model | MRR | HITS@1 |
| General | Event Language Model | 0.367 | 0.497 |
| Sequential Pattern Mining | 0.330 | 0.478 |
| Human Schema | 0.173 | 0.205 |
| Event Graph Model | 0.401 | 0.520 |
| w/o ArgumentGeneraion | 0.392 | 0.509 |
| IED | Event Language Model | 0.169 | 0.513 |
| Sequential Pattern Mining | 0.138 | 0.378 |
| Human Schema | 0.072 | 0.222 |
| Event Graph Model | 0.224 | 0.741 |
| w/o ArgumentGeneraion | 0.210 | 0.734 |
+
+Table 4: Schema-guided event prediction performance.
+
+graph, and take into account that there is no ARREST event or justice-related events in the input graph. Also, the human schema fails to predict INJURE and ATTACK, because it relies on the exact match of event sequences of lengths $l \geq 2$ , and cannot handle the variants of sequences. This problem can be solved by our probabilistic schema, via modeling the prediction probability conditioned on the existing graph. For example, even though ATTACK mostly happens before DIE, we learn that ATTACK might repeat after DIE event if there are multiple ATTACK and DETONATE in the existing graph, which means the complex event is about a series of conflict events.
+
+Ablation Study. Removing argument generation ("w/o ArgumentGeneration") generally lowers the performance on all evaluation tasks, since it ignores the coreferential arguments and their relations, but relies solely on the overly simplistic temporal order to connect events. This is especially apparent from the instance graph perplexity in Table 3.
+
+Learning Corpus Size. An average of 113 instance graphs is used for each complex event type
+
+
+Figure 3: An event prediction example (IED scenario).
+
+
+
+in the IED scenario, and 383 instance graphs to learn the schema model in the General scenario. The better performance on the IED dataset in Table 3 shows that the number of instance graphs increases the schema induction performance.
+
+Effect of Information Extraction Errors. Based on the error analysis for schemas induced in Table 1, the effect of extraction errors can be categorized into: (1) temporal ordering errors: $43.3\%$ ; (2) missing events: $34.4\%$ ; (3) missing coreferential events: $8.8\%$ ; (4) incorrect event type: $7.7\%$ ; (5) missing coreferential arguments: $5.5\%$ . However, even on automatically extracted event graphs with extraction errors, our model significantly performs better on event prediction compared to human-constructed schemas, as shown in Table 4. It demonstrates that our schema induction method is robust and effective to support downstream tasks, even when only provided with noisy data with extraction errors.
+
+# 6 Related Work
+
+The definition of a complex event schema separates us from related lines of work, namely schema induction and script learning. Previous work on schema induction aims to characterize
+
+event triggers and participants of individual atomic events (Chambers, 2013; Cheung et al., 2013; Nguyen et al., 2015; Sha et al., 2016; Yuan et al., 2018), ignoring inter-event relations. Work on script learning, on the other hand, originally limited attention to event chains with a single protagonist (Chambers and Jurafsky, 2008, 2009; Rudinger et al., 2015; Jans et al., 2012; Granroth-Wilding and Clark, 2016) and later extended to multiple participants (Pichotta and Mooney, 2014, 2016; Weber et al., 2018). Recent efforts rely on distributed representations encoded from the compositional nature of events (Modi, 2016; Granroth-Wilding and Clark, 2016; Weber et al., 2018, 2020; Zhang et al., 2020), and language modeling (Rudinger et al., 2015; Pichotta and Mooney, 2016; Peng and Roth, 2016). All of these methods still assume that events follow linear order in a single chain. They also overlook the relations between participants which are critical for understanding the complex event. However, we induce a comprehensive event graph schema, capturing both the temporal dependency and the multi-hop argument dependency across events.
+
+Recent work on event graph schema induction (Li et al., 2020) only considers the connections between a pair of two events. Similarly, their event prediction task is designed to automatically generate a missing event (e.g., a word sequence) given a single or a sequence of prerequisite events (Nguyen et al., 2017; Hu et al., 2017; Li et al., 2018b; Kiyomaru et al., 2019; Lv et al., 2019), or predict a pre-condition event given the current events (Kwon et al., 2020). In contrast, we leverage the automatically discovered temporal event schema as guidance to forecast the future events.
+
+Existing script annotations (Chambers and Jurafsky, 2008, 2010; Modi et al., 2016; Wanzare et al., 2016; Mostafazadeh et al., 2016a,b; Kwon et al., 2020) cannot support a comprehensive graph schema induction due to the missing of critical event graph structures, such as argument relations. Furthermore, in real-world applications, complex event schemas are expected to be induced from large-scale historical data, which is not feasible to annotate manually. We propose a data-driven schema induction approach, and choose to use IE systems instead of using manual annotation, to induce schemas that are robust and can tolerate extraction errors.
+
+Our work is also related to recent advances in
+
+modeling and generation of graphs (Li et al., 2018a; Jin et al., 2018; Grover et al., 2019; Simonovsky and Komodakis, 2018; Liu et al., 2019; Fu et al., 2020; Dai et al., 2020; You et al., 2018; Liao et al., 2019; Yoo et al., 2020; Shi et al., 2020). We are the first to perform graph generation on event graphs.
+
+# 7 Conclusions and Future Work
+
+We propose a new task to induce temporal complex event schemas, which are capable of representing multiple temporal dependencies between events and their connected arguments. We induce such schemas by learning an event graph model, a deep auto-regressive model, from the automatically extracted instance graphs. Experiments demonstrate the model's effectiveness on both intrinsic evaluation and the downstream task of schema-guided event prediction. These schemas can guide our understanding and ability to make predictions with respect to what might happen next, along with background knowledge including location-, and participant-specific and temporally ordered event information. In the future, we plan to extend our framework to hierarchical event schema induction, as well as event and argument instance prediction.
+
+# Acknowledgement
+
+This research is based upon work supported by U.S. DARPA KAIROS Program Nos. FA8750-19-2-1004 and Air Force No. FA8650-17-C-7715. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of DARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation therein.
+
+# References
+
+Nathanael Chambers. 2013. Event schema induction with a probabilistic entity-driven model. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1797-1807, Seattle, Washington, USA. Association for Computational Linguistics.
+Nathanael Chambers and Dan Jurafsky. 2008. Unsupervised learning of narrative event chains. In Proceedings of ACL-08: HLT, pages 789-797, Columbus, Ohio. Association for Computational Linguistics.
+
+Nathanael Chambers and Dan Jurafsky. 2009. Unsupervised learning of narrative schemas and their participants. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP, pages 602-610, Suntec, Singapore. Association for Computational Linguistics.
+Nathanael Chambers and Dan Jurafsky. 2010. A database of narrative schemas. In Proceedings of the Seventh International Conference on Language Resources and Evaluation (LREC'10), Valletta, Malta. European Language Resources Association (ELRA).
+Jackie Chi Kit Cheung, Hoifung Poon, and Lucy Vanderwende. 2013. Probabilistic frame induction. In Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 837-846, Atlanta, Georgia. Association for Computational Linguistics.
+Hanjun Dai, Azade Nazi, Yujia Li, Bo Dai, and Dale Schuurmans. 2020. Scalable deep generative modeling for sparse graphs. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 2302-2312. PMLR.
+Dongqi Fu, Dawei Zhou, and Jingrui He. 2020. Local motif clustering on time-evolving graphs. In KDD '20: The 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Virtual Event, CA, USA, August 23-27, 2020, pages 390-400. ACM.
+Mark Granroth-Wilding and Stephen Clark. 2016. What happens next? event prediction using a compositional neural network model. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12-17, 2016, Phoenix, Arizona, USA, pages 2727-2733. AAAI Press.
+Aditya Grover, Aaron Zweig, and Stefano Ermon. 2019. Graphite: Iterative generative modeling of graphs. In Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 2434-2444. PMLR.
+Jiatao Gu, Zhengdong Lu, Hang Li, and Victor O.K. Li. 2016. Incorporating copying mechanism in sequence-to-sequence learning. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1631-1640, Berlin, Germany. Association for Computational Linguistics.
+Linmei Hu, Juanzi Li, Liqiang Nie, Xiaoli Li, and Chao Shao. 2017. What happens next? future subevent prediction using contextual hierarchical LSTM. In Proceedings of the Thirty-First AAAI Conference on
+
+Artificial Intelligence, February 4-9, 2017, San Francisco, California, USA, pages 3450-3456. AAAI Press.
+Bram Jans, Steven Bethard, Ivan Vulic, and Marie Francine Moens. 2012. Skip n-grams and ranking functions for predicting script events. In Proceedings of the 13th Conference of the European Chapter of the Association for Computational Linguistics, pages 336-344, Avignon, France. Association for Computational Linguistics.
+Wengong Jin, Regina Barzilay, and Tommi S. Jaakkola. 2018. Junction tree variational autoencoder for molecular graph generation. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholm, Sweden, July 10-15, 2018, volume 80 of Proceedings of Machine Learning Research, pages 2328-2337. PMLR.
+Thomas N. Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulouse, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net.
+Hirokazu Kiyomaru, Kazumasa Omura, Yugo Murawaki, Daisuke Kawahara, and Sadao Kurohashi. 2019. Diversity-aware event prediction based on a conditional variational autoencoder with reconstruction. In Proceedings of the First Workshop on Common Sense Inference in Natural Language Processing, pages 113-122, Hong Kong, China. Association for Computational Linguistics.
+Heeyoung Kwon, Mahnaz Koupae, Pratyush Singh, Gargi Sawhney, Anmol Shukla, Keerthi Kumar Kallur, Nathanael Chambers, and Niranjan Balasubramanian. 2020. Modeling preconditions in text with a crowd-sourced dataset. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 3818-3828, Online. Association for Computational Linguistics.
+Tuan Lai, Heng Ji, Trung Bui, Quan Hung Tran, Franck Dernoncourt, and Walter Chang. 2021. A context-dependent gated module for incorporating symbolic semantics into event coreference resolution. In Proc. The 2021 Conference of the North American Chapter of the Association for Computational Linguistics - Human Language Technologies (NAACL-HLT2021).
+Manling Li, Qi Zeng, Ying Lin, Kyunghyun Cho, Heng Ji, Jonathan May, Nathanael Chambers, and Clare Voss. 2020. Connecting the dots: Event graph schema induction with path language modeling. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 684-695, Online. Association for Computational Linguistics.
+Sha Li, Heng Ji, and Jiawei Han. 2021. Document-level event argument extraction by conditional generation. In Proceedings of the 2021 Conference of
+
+the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 894-908.
+Yujia Li, Oriol Vinyals, Chris Dyer, Razvan Pascanu, and Peter Battaglia. 2018a. Learning deep generative models of graphs. In Proceedings of the 35th International Conference on Machine Learning, Stockholm, Sweden, PMLR 80.
+Zhongyang Li, Xiao Ding, and Ting Liu. 2018b. Constructing narrative event evolutionary graph for script event prediction. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, July 13-19, 2018, Stockholm, Sweden, pages 4201-4207. ijcai.org.
+Renjie Liao, Yujia Li, Yang Song, Shenlong Wang, William L. Hamilton, David Duvenaud, Raquel Urtasun, and Richard S. Zemel. 2019. Efficient graph generation with graph recurrent attention networks. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 4257-4267.
+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.
+Jenny Liu, Aviral Kumar, Jimmy Ba, Jamie Kiros, and Kevin Swersky. 2019. Graph normalizing flows. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 13556-13566.
+Shangwen Lv, Wanhui Qian, Longtao Huang, Jizhong Han, and Songlin Hu. 2019. Sam-net: Integrating event-level and chain-level attentions to predict what happens next. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pages 6802-6809. AAAI Press.
+Piyush Mishra, Akanksha Malhotra, Susan Windisch Brown, Martha Palmer, and Ghazaleh Kazeminejad. 2021. Schema curation interface: Enhancing user experience in curation tasks. In Proc. The Joint Conference of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (ACL-IJCNLP 2021) Demo Track.
+Ashutosh Modi. 2016. Event embeddings for semantic script modeling. In Proceedings of The 20th
+
+SIGNLL Conference on Computational Natural Language Learning, pages 75-83, Berlin, Germany. Association for Computational Linguistics.
+Ashutosh Modi, Tatjana Anikina, Simon Ostermann, and Manfred Pinkal. 2016. InScript: Narrative texts annotated with script information. In Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC'16), pages 3485-3493, Porto-rož, Slovenia. European Language Resources Association (ELRA).
+Nasrin Mostafazadeh, Nathanael Chambers, Xiaodong He, Devi Parikh, Dhruv Batra, Lucy Vanderwende, Pushmeet Kohli, and James Allen. 2016a. A corpus and cloze evaluation for deeper understanding of commonsense stories. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 839-849, San Diego, California. Association for Computational Linguistics.
+Nasrin Mostafazadeh, Alyson Grealish, Nathanael Chambers, James Allen, and Lucy Vanderwende. 2016b. CaTeRS: Causal and temporal relation scheme for semantic annotation of event structures. In Proceedings of the Fourth Workshop on Events, pages 51-61, San Diego, California. Association for Computational Linguistics.
+Dai Quoc Nguyen, Dat Quoc Nguyen, Cuong Xuan Chu, Stefan Thater, and Manfred Pinkal. 2017. Sequence to sequence learning for event prediction. In Proceedings of the Eighth International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 37-42, Taipei, Taiwan. Asian Federation of Natural Language Processing.
+Kiem-Hieu Nguyen, Xavier Tannier, Olivier Ferret, and Romaric Besançon. 2015. Generative event schema induction with entity disambiguation. 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 188-197, Beijing, China. Association for Computational Linguistics.
+Qiang Ning, Sanjay Subramanian, and Dan Roth. 2019. An improved neural baseline for temporal relation extraction. 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 6203-6209, Hong Kong, China. Association for Computational Linguistics.
+Xiaoman Pan, Taylor Cassidy, Ulf Hermjakob, Heng Ji, and Kevin Knight. 2015. Unsupervised entity linking with abstract meaning representation. In Proc. the 2015 Conference of the North American Chapter of the Association for Computational Linguistics - Human Language Technologies (NAACL-HLT 2015).
+
+Xiaoman Pan, Boliang Zhang, Jonathan May, Joel Nothman, Kevin Knight, and Heng Ji. 2017. Crosslingual name tagging and linking for 282 languages. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1946-1958, Vancouver, Canada. Association for Computational Linguistics.
+Jian Pei, Jiawei Han, Behzad Mortazavi-Asl, Helen Pinto, Qiming Chen, Umeshwar Dayal, and Meichun Hsu. 2001. Prefixspan: Mining sequential patterns by prefix-projected growth. In Proceedings of the 17th International Conference on Data Engineering, pages 215-224.
+Haoruo Peng and Dan Roth. 2016. Two discourse driven language models for semantics. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 290-300, Berlin, Germany. Association for Computational Linguistics.
+Karl Pichotta and Raymond Mooney. 2014. Statistical script learning with multi-argument events. In Proceedings of the 14th Conference of the European Chapter of the Association for Computational Linguistics, pages 220–229, Gothenburg, Sweden. Association for Computational Linguistics.
+Karl Pichotta and Raymond J. Mooney. 2016. Learning statistical scripts with LSTM recurrent neural networks. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12-17, 2016, Phoenix, Arizona, USA, pages 2800-2806. AAAI Press.
+Rachel Rudinger, Pushpendre Rastogi, Francis Ferraro, and Benjamin Van Durme. 2015. Script induction as language modeling. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 1681-1686, Lisbon, Portugal. Association for Computational Linguistics.
+Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne Van Den Berg, Ivan Titov, and Max Welling. 2018. Modeling relational data with graph convolutional networks. In European Semantic Web Conference, pages 593-607. Springer.
+Lei Sha, Sujian Li, Baobao Chang, and Zhifang Sui. 2016. Joint learning templates and slots for event schema induction. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 428-434, San Diego, California. Association for Computational Linguistics.
+Chence Shi, Minkai Xu, Zhaocheng Zhu, Weinan Zhang, Ming Zhang, and Jian Tang. 2020. Graphaf: a flow-based autoregressive model for molecular graph generation. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
+
+Martin Simonovsky and Nikos Komodakis. 2018. Graphvae: Towards generation of small graphs using variational autoencoders. In International Conference on Artificial Neural Networks, pages 412-422. Springer.
+Lilian DA Wanzare, Alessandra Zarcone, Stefan Thater, and Manfred Pinkal. 2016. A crowdsourced database of event sequence descriptions for the acquisition of high-quality script knowledge.
+Noah Weber, Niranjan Balasubramanian, and Nathanael Chambers. 2018. Event representations with tensor-based compositions. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th innovative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial Intelligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 4946-4953. AAAI Press.
+Noah Weber, Rachel Rudinger, and Benjamin Van Durme. 2020. Causal inference of script knowledge. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7583-7596, Online. Association for Computational Linguistics.
+Haoyang Wen, Ying Lin, Tuan Lai, Xiaoman Pan, Sha Li, Xudong Lin, Ben Zhou, Manling Li, Haoyu Wang, Hongming Zhang, et al. 2021a. Resin: A dockerized schema-guided cross-document cross-lingual cross-media information extraction and event tracking system. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Demonstrations, pages 133-143.
+Haoyang Wen, Yanru Qu, Heng Ji, Qiang Ning, Jiawei Han, Avi Sil, Hanghang Tong, and Dan Roth. 2021b. Event time extraction and propagation via graph attention networks. In Proc. The 2021 Conference of the North American Chapter of the Association for Computational Linguistics - Human Language Technologies (NAACL-HLT2021).
+Zhilin Yang, Zihang Dai, Yiming Yang, Jaime G. Carbonell, Ruslan Salakhutdinov, and Quoc V. Le. 2019. Xlnet: Generalized autoregressive pretraining for language understanding. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 5754-5764.
+Sanghyun Yoo, Young-Seok Kim, Kang Hyun Lee, Kuhwan Jeong, Junhwi Choi, Hoshik Lee, and Young Sang Choi. 2020. Graph-aware transformer: Is attention all graphs need? arXiv preprint arXiv:2006.05213.
+Jiaxuan You, Rex Ying, Xiang Ren, William L. Hamilton, and Jure Leskovec. 2018. Graphrn: Generat
+
+ing realistic graphs with deep auto-regressive models. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholm, Sweden, July 10-15, 2018, volume 80 of Proceedings of Machine Learning Research, pages 5694-5703. PMLR.
+Quan Yuan, Xiang Ren, Wenqi He, Chao Zhang, Xinhe Geng, Lifu Huang, Heng Ji, Chin-Yew Lin, and Jiawei Han. 2018. Open-schema event profiling for massive news corpora. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management, CIKM 2018, Torino, Italy, October 22-26, 2018, pages 587-596. ACM.
+Li Zhang, Qing Lyu, and Chris Callison-Burch. 2020. Reasoning about goals, steps, and temporal ordering with WikiHow. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4630-4639, Online. Association for Computational Linguistics.
\ No newline at end of file
diff --git a/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/images.zip b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..92f2d257a123718d7942afd66e60dc3469b8961a
--- /dev/null
+++ b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b171208fc1c040b9280e01c2390a2849a121296240458906b458929b66f54d7f
+size 470763
diff --git a/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/layout.json b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..4318b60b2d63cdc00e1a722c2d04227e260c9aa3
--- /dev/null
+++ b/thefutureisnotonedimensionalcomplexeventschemainductionbygraphmodelingforeventprediction/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:360a8404c190badc5f3fc00aea50a41f94b780a9b0fcc1b8b114c00275becb94
+size 442327
diff --git a/theimpactofpositionalencodingsonmultilingualcompression/2be21bd1-b627-47f4-8546-6eb7643de9f1_content_list.json b/theimpactofpositionalencodingsonmultilingualcompression/2be21bd1-b627-47f4-8546-6eb7643de9f1_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..cdc4d23efdd660c43f5cf778cac1f370d2896429
--- /dev/null
+++ b/theimpactofpositionalencodingsonmultilingualcompression/2be21bd1-b627-47f4-8546-6eb7643de9f1_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:eca0be7d8d9f4cfa44f9ee23c261cdb675abc7316a239eb7a58abdf6f96847d2
+size 85726
diff --git a/theimpactofpositionalencodingsonmultilingualcompression/2be21bd1-b627-47f4-8546-6eb7643de9f1_model.json b/theimpactofpositionalencodingsonmultilingualcompression/2be21bd1-b627-47f4-8546-6eb7643de9f1_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..88c40c40358ec0b13e0aa2595e671b2741f0e424
--- /dev/null
+++ b/theimpactofpositionalencodingsonmultilingualcompression/2be21bd1-b627-47f4-8546-6eb7643de9f1_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:410ff3cf9fbe0f37ceaa42ffbb4b4c016cba8db56ef3eacd3c8455d397235e6f
+size 97668
diff --git a/theimpactofpositionalencodingsonmultilingualcompression/2be21bd1-b627-47f4-8546-6eb7643de9f1_origin.pdf b/theimpactofpositionalencodingsonmultilingualcompression/2be21bd1-b627-47f4-8546-6eb7643de9f1_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..24b6e2347c6c5ba02c0102a37f852c4539409677
--- /dev/null
+++ b/theimpactofpositionalencodingsonmultilingualcompression/2be21bd1-b627-47f4-8546-6eb7643de9f1_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8dca747ccae67c7c232967fa5498158f99f2e80ea9a425ebbbaab09014a5a282
+size 1109530
diff --git a/theimpactofpositionalencodingsonmultilingualcompression/full.md b/theimpactofpositionalencodingsonmultilingualcompression/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..c6cfa950ba88f3ec6fe77aab08da57ee9531204b
--- /dev/null
+++ b/theimpactofpositionalencodingsonmultilingualcompression/full.md
@@ -0,0 +1,279 @@
+# The Impact of Positional Encodings on Multilingual Compression
+
+Vinit Ravishankar
+
+Language Technology Group
+
+University of Oslo
+
+Norway
+
+vinitr@ifi.uio.no
+
+Anders Søgaard
+
+Department of Computer Science
+
+University of Copenhagen
+
+Denmark
+
+soegaard@di.ku.dk
+
+# Abstract
+
+In order to preserve word-order information in a non-autoregressive setting, transformer architectures tend to include positional knowledge, by (for instance) adding positional encodings to token embeddings. Several modifications have been proposed over the sinusoidal positional encodings used in the original transformer architecture; these include, for instance, separating position encodings and token embeddings, or directly modifying attention weights based on the distance between word pairs. We first show that surprisingly, while these modifications tend to improve monolingual language models, none of them result in better multilingual language models. We then answer why that is: Sinusoidal encodings were explicitly designed to facilitate compositionality by allowing linear projections over arbitrary time steps. Higher variances in multilingual training distributions requires higher compression, in which case, compositionality becomes indispensable. Learned absolute positional encodings (e.g., in mBERT) tend to approximate sinusoidal embeddings in multilingual settings, but more complex positional encoding architectures lack the inductive bias to effectively learn compositionality and cross-lingual alignment. In other words, while sinusoidal positional encodings were originally designed for monolingual applications, they are particularly useful in multilingual language models.
+
+# 1 Introduction
+
+Multiple recent papers have attempted to pinpoint precisely what components of multilingual language models enable cross-lingual transfer. Pires et al. (2019) show that although wordpiece overlap tends to improve cross-lingual transfer performance, even languages with different scripts (and no shared subwords) may enable zero-shot transfer. Wu and Dredze (2019) report similar results on a wider range of tasks. Artetxe et al. (2020) show
+
+| Sinusoidal | See §2 | Vaswani et al. (2017) |
| Absolute | ((wi + pi)WQ,1)((wj + pj)WK,1)T | Devlin et al. (2019) |
| TUPE | (xiL WQ,l)(xjL WK,l)T+ (piUQ)(pJUK)T | Ke et al. (2020) |
| TUPE(r) | ... + bj - i | |
| Relative(k) | (xiWQ)(xjWK + ai j)T | Shaw et al. (2018) |
| Relative(k/q) | (xiWQ + ai j)(xjWK + ai j)T | Huang et al. (2020) |
+
+Table 1: We compare six positional encodings and their impact on cross-lingual generalization in multilingual language models
+
+that neither a shared vocabulary nor joint multilingual pre-training are necessary to train successful multilingual models. K et al. (2020) find that model depth is a contributor to transfer performance, but that reducing the number of self-attention heads does not have much of an effect.
+
+Our starting point is Dufter and Schütze (2021), who claim that a) multilingual compression is caused by forced parameter sharing across languages, and that b) positional encodings play a significant role in the creation of a multilingual space, even in the absence of shared subwords and shared special tokens, like delimiters.
+
+Contributions We build on Dufter and Schütze (2021) and demonstrate, through a series of experiments on synthetic and real data, that the choice of positional encoding mechanism has a significant effect on cross-lingual model performance: While many positional encodings have been proposed in monolingual settings as improvements over sinusoidal or absolute positional encodings, originally proposed in Vaswani et al. (2017) and Devlin et al. (2019), including untied positional encodings (TUPE; Ke et al. (2020)) and relative positional encodings (Shaw et al., 2018; Huang et al., 2020), none of these better facilitate cross-lingual compression or sharing. In fact, multilingual language models trained with untied or relative positional encodings exhibit much worse cross-lingual perfor
+
+mance. We show that this is because sinusoidal embeddings facilitate compositionality, which we argue is particularly important for cross-lingual compression. We present a method for quantifying the compositionality of positional encodings, and find additional evidence for this hypothesis in word-position correlations and ablation studies. We are, to the best of our knowledge, the first to show this asymmetry between monolingual and multilingual language model training. Our experiments rely on the protocols in Dufter and Schütze (2021), but in addition to simple experiments with their Bible data, we also replicate all our experiments on Wikipedia data. Rather than relying on deterministic perturbations of data, as in Dufter and Schütze (2021) and Sinha et al. (2021), we make novel use of Galactic Dependencies (Wang and Eisner, 2016) in our experiments. Based on our experiments, we recommend caution when adopting methods developed for monolingual language models when training multilingual models, as well as that future work on positional encoding mechanisms also provides evaluations in multilingual settings.
+
+# 2 Positional encodings
+
+Positional encodings have been a mainstay of non-autoregressive transformer-based models right since Vaswani et al. (2017) first proposed the transformer architecture. The motivation being that given that transformers1 are order-invariant (as opposed recurrent or convolutional networks), there must be some injection of word order into the encoder. Rather than using conventional "embeddings", Vaswani et al. (2017) use fixed sinusoidal position encodings, where each dimension characterises a sinusoidal waveform of a fixed frequency. Specifically, each encoding $p$ is given as:
+
+$$
+p _ {(p o s, 2 i)} = \sin (p o s / 1 0 0 0 0 ^ {2 i / d _ {\mathrm {m o d e l}}})
+$$
+
+$$
+p _ {(p o s, 2 i + 1)} = c o s (p o s / 1 0 0 0 0 ^ {2 i / d _ {\mathrm {m o d e l}}})
+$$
+
+where $pos$ is the position and $i$ is the dimension. They add these encodings to token representations before passing the sum to the first layer of the self-attention mechanism.
+
+Several alternatives to sinusoidal encodings have been proposed since Vaswani et al. (2017). Most multilingual models tend to use BERT-style (Devlin et al., 2019) learnt absolute positional encodings, where a unique vector is learned and assigned
+
+to each position; these vectors are then added to word representations before being passed to the self-attention mechanism.
+
+As an alternative to such position representations, where every position is represented by a unique vector, relative positional encodings have been proposed (Shaw et al., 2018; Huang et al., 2020). Rather than assigning representations to tokens based on their position, relative positional encoding involves assigning representations to position-position pairs; typically, these encodings are calculated separately and added to the attention matrix. We evaluate both the encodings proposed in Shaw et al. (2018) and the encodings proposed in (Huang et al., 2020) in our experiments below.
+
+He et al. (2021) propose eliminating position-position correlations, and using separate parameters for word and position representations; Wang et al. (2019) propose using dependency trees instead of raw sequential positions. Ke et al. (2020) recommend eliminating the addition operation in BERT-style representations; they argue that word-position correlations are effectively nil, and that the addition introduces unnecessary noise. We evaluate two untied positional encodings proposed in Ke et al. (2020) (TUPE). TUPE modifies absolute representations by a) untying word-position correlations; b) using a separate set of parameters for positional attention and c) untying [CLS] tokens from positions.
+
+We refer to recent surveys (Dufter et al., 2021; Wang et al., 2021) for a more detailed treatment of position encoding methods. We provide a summary of our methods in Table 1. $W^{Q,l}$ and $W^{K,l}$ represent the query/key weights for the attention mechanism at some layer $l$ , and $a_{ij}$ or $b_{j-i}$ are learnt vectors corresponding to the offset $j - i$ . Note that the untied position-position term $(p_i U^Q)(p_j U^K)^\top$ is added at every layer.
+
+The above positional encodings have been introduced in the context of monolingual pretrained language models, and there has been only a limited amount of work addressing the effect of positional encodings on multilingual models. Liu et al. (2020a) find that positional information tends to hurt machine translation, as the encoder learns a word-order bias towards the source languages.
+
+Artetxe et al. (2020) find that language-specific positional representations help in an adapter-based training scenario. Ding et al. (2020) attempt to account for structural differences between languages by using bracketing transduction grammar trees to reorder position labels (and find that it helps). Liu et al. (2020b) find that models that are relatively agnostic to word-order tend to perform better in cross-lingual settings; they hypothesise that large multilingual encoders, being trained on languages with drastic differences in word orders, tend to have order-agnostic positional encodings, and thus discourage fine-tuning positional encodings downstream. Contemporaneous with this work, Sinha et al. (2021) show that positional information is important for monolingual models even given unnatural, randomly shuffled word ordering.
+
+Dufter and Schütze (2021) present a set of experiments training smaller language models on bilingual corpora, consisting of the same corpus in English and "fake-English", which is English with a shifted BPE vocabulary. They evaluate retrieval and translation scores at different layers; gold alignments are easy to derive given that the corpora are effectively parallel corpora, and that the vocabularies for both halves are effectively the same. As we build on these experiments, we adopt slightly simplified notation, and denote vocabulary-shifted corpora with square brackets, eg. [EN].
+
+# 3 Experiments
+
+Galactic Dependencies A drawback of the multilingual experiments presented in Dufter and Schütze (2021) is that EN and [EN] effectively have the same structure. While the authors attempt to control for this in additional experiment where word order in [EN] is completely reversed, this does not resemble realistic differences across languages. Using true multilingual corpora is, however, difficult: our retrieval and translation tasks are easy to bootstrap precisely because we have faux-parallel corpora, with effectively pre-aligned vocabulary.
+
+To induce structural diversity in our corpora, therefore, we reorder our corpora using Galactic Dependencies (GD) models (Wang and Eisner, 2016). Briefly, GD models sample ordering statistics based on dependency relations for the dependants of verbs and/or nouns from some superstrate language XX; when applied to sentences
+
+these during fine-tuning helps cross-lingual zero-shot generalization.
+
+in some substrate language (in the context of our experiments, EN), the models reorder dependants of VERB and/or NOUN nodes to match the ordering statistics of the substrate language they were trained on. We opt to reorder both nominal and verbal arguments, and follow the authors in denoting the sampling operation with a $\sim$ , giving us for eg. EN\~XX for an English language corpus, with dependent order statistics adapted from some language XX. Table 2 contains an example sentence and some of its reorderedings.
+
+Note that GD reordering only works for projective sentences, and rather than retain un-reordered non-projective sentences, we exclude them from all our corpora.
+
+| EN | So there were fourteen generations from Abraham to David. |
| EN~AR | . there were So generations fourteen from Abraham to David |
| EN~DE | there were So from Abraham to David fourteen generations. |
| EN~EU | there were So David to Abraham from generations fourteen. |
| EN~FI | Abraham from David to fourteen generations there were So . |
| EN~FR | fourteen generations from Abraham to David were there So . |
| EN~HI | there So David to Abraham from fourteen generations were . |
| EN~SV | there were So generations from Abraham to David fourteen . |
+
+Table 2: An example sentence from the easy-to-read Bible with its GD reorderings.
+
+This approach, while simple and useful, does have several limitations. Predominantly, because our reordering is fundamentally syntactic/structural, our fake languages still maintain both the morphology of the source language (English in our case), and the same vocabulary distribution. Thus, although scrambling ought to affect context and neighbourhoods, an English token and its corresponding fake token have exactly the same unigram distribution.
+
+Training Our model of choice is an underparameterised BERT, as in Dufter and Schütze (2021). We train multiple such underparameterised BERT models, each with a different encoding mechanism from Section 2, on two bilingual corpora:
+
+EN + [EN] - a bilingual corpus comprised of English, and a fake vocab-shifted English.
+
+EN + [EN~XX] - a bilingual corpus comprised of English, and a fake English that has had its constituents reordered to match the distribution of some language XX.
+
+We reorder our English starting point according to seven different faux-languages (just "languages" for brevity): Arabic, German, Basque, Finnish,
+
+
+Figure 1: Main results: While untied and relative positional encodings are superior to sinusoidal and absolute positional encodings in the monolingual setting, they are clearly worse in the multilingual setting, especially for structurally different languages. The multilingual (ML) scores are computed as in Dufter and Schütze (2021). Note also that results are averages across seven different word orders (see §3).
+
+French, Hindi and Swedish. Note that given that our starting point was English, there was no way for us to control for morphological differences; as such, languages with freer word order (like Basque) are likelier to make our English corpora ambiguous.
+
+We use two corpora in this work: the first is the Bible splits from Dufter and Schütze (2021), with the English easy-to-read Bible as the training split, and the KJV Bible as validation. The second corpus uses the English Wikipedia as the training split, and Common Crawl as validation. We present corpus statistics in Table 3. For each corpus, we learn and apply a BPE vocabulary of size 2048.
+
+ | Train | Validation |
| Bible | 30602 | 9080 |
| Wikipedia | 50000 | 20000 |
+
+Table 3: Corpus sizes in sentences (two languages per corpus)
+
+Following Dufter and Schütze (2021), our BERT models all have a single head and 12 layers. We reduce the dimensionality of the encoder layers to 64, and the feed-forward layers to 256. Each model is trained for 100 epochs with three different random seeds (0, 42 and 100), giving us a total of 7 languages x 6 encoding methods x 3 seeds x 2 cor
+
+pora = 252 models. We implement our code3 in the transformers library (Wolf et al., 2020). For learned absolute and the two relative encoding models, we use the default implementations, that scale attention operations by a scaling factor of $\frac{1}{\sqrt{d}}$ . For our untied models, we adjust our scaling factor to $\frac{1}{\sqrt{2d}}$ as in the original paper (Ke et al., 2020). For sinusoidal representations, while Vaswani et al. (2017) multiply token embeddings by $\sqrt{d}$ to avoid drowning them out with the $[-1,1]$ sinusoidal encoding range, we find that our default embedding size is too small for this to have an effect, and instead scale up token embeddings by $2\sqrt{d}$ before adding positional encodings.
+
+For all parameterised encoding models except TUPE (relative), we use a maximum of $k = 512$ positions; the concrete transformers implementation of the relative methods means that this gives us 1023 total offsets. For TUPE (relative), we use a maximum of $k = 128$ positions, divided into 32 bins with logarithmically increasing bin sizes; this is taken from the original implementation in Ke et al. (2020).
+
+# 4 Evaluation
+
+We adopt Dufter and Schütze's (2021) evaluation pipeline, evaluating each of our models at layers 0 and 8; we also describe a multilingual score, which is defined as the average accuracy for the retrieval and translation tasks, at layers 0 and 8. We also measure perplexity, both on the monolingual first half of the corpus, and on both halves combined. Note that true perplexities for masked language models are intractable (Wang and Cho, 2019; Salazar et al., 2020). We use a trivial approximation and calculate perplexity based on the prediction loss for each masked token; note that while these suffice for comparison purposes, they are not true perplexities and should not be taken as such outside the context of these experiments.
+
+We present our results (averaged out over faux-languages) in Figure 1, with full results in Appendix C. As expected, the more recent positional encodings are superior to sinusoidal or absolute positional encodings in the monolingual setting; but somewhat surprisingly, sinusoidal and absolute positional encodings are clearly outperforming the more recent approaches in the multilingual setting. We also note that the gap in multilingual performance only grows larger when a different word order is imposed on the target language; see the bottom row of Figure 1. Interestingly, switching to structurally different L2s can sometimes reduce the language modelling perplexity of the L1: this could be due to regularisation induced by structural differences.
+
+Typological differences We discuss "typology" with a caveat: our experiments with GD only alter word order, which means that all our altered-structure experiments still have English morphology. As such, it is impossible to talk about non-English languages; only about non-English word-order tendencies, when induced in English. Having said that, when we measure performance variation across languages (Figure 2), our results are more or less what one would expect: performance is decent for relatively rigid word-order languages, and poorer for languages that have complex morphology.
+
+Interestingly, SVO languages consistently tend to perform better than our three non-SVO languages (Basque, Hindi and Arabic); this could be due to VSO/SOV languages requiring morphology to disambiguate between adjacent nominals (Lev-
+
+
+
+
+
+
+Figure 2: (Full) perplexity and ML score across languages.
+
+
+
+shina, 2019). Another justification could also be that these are languages with a very different "default" word order to English; this would further motivate Ding et al.'s (2020) use of cross-lingually reordered position markers.
+
+Real-world results While we conduct most of our analyses on our toy models, we also ran a series of experiments to verify that our results would hold with larger models. As such, we pre-trained full size BERT models (base, not large) for two epochs, on a corpus consisting of 8.5M, 9.3M and 800k sentences in English, German and Hindi respectively. We then fine-tuned these models for three epochs on (English) MultiNLI (Williams et al., 2018), and evaluated on held-out XNLI test sets for our three languages (Conneau et al., 2018); the process took approximately 4 days per model, on a single V100 GPU. We trained two models (seeds 0 and 42) per method, for three different positional encoding methods: a) absolute positional encodings, as these are used in the original BERT, b) sinusoidal encodings, as these were the original transformer encodings, and c) TUPE (absolute), as the most recent innovation. Our real-world results appear to validate our toy experiments: performance on English, the language the model was fine-tuned on, is highest with TUPE, while cross-lingual transfer suffers, both on German and to a lesser extent on Hindi.
+
+| Embedding | Wiki/CC | ML score | Bible |
| Perplexity | Retrieval | Translation | Perplexity | Retrieval | Translation |
| Full | L1 | 0 | 8 | 0 | 8 | Full | L1 | 0 | 8 | 0 | 8 |
| Sinusoidal | 66.73 | 63.96 | 37.43 | 97.29 | 77.03 | 64.07 | 68.95 | 215.77 | 186.53 | 4.82 | 54.09 | 47.09 | 27.62 |
| Absolute | 66.35 | 63.44 | 52.35 | 96.53 | 76.05 | 53.62 | 68.59 | 229.28 | 201.88 | 9.62 | 52.51 | 47.6 | 19.36 |
| TUPE (absolute) | 61.4 | 58.77 | 9.61 | 84.72 | 65.89 | 36.57 | 48.07 | 239.48 | 210.16 | 1.65 | 28.86 | 28.85 | 8.12 |
| TUPE (relative) | 59.81 | 56.96 | 16.25 | 88.5 | 71.7 | 40.54 | 53.89 | 221.04 | 194.58 | 2.54 | 41.34 | 40.39 | 13.92 |
| Relative (key) | 55.98 | 52.5 | 20.2 | 87.36 | 73.09 | 31.38 | 53.09 | 193.49 | 166.75 | 2.18 | 28.46 | 30.43 | 10.25 |
| Relative (key/query) | 55.28 | 51.83 | 21.24 | 88.04 | 73.58 | 34.42 | 54.64 | 191.23 | 164.41 | 2.4 | 31.6 | 34.26 | 13.03 |
+
+Table 4: Detailed results, averaged across our faux-languages. Best results per metric in bold.
+
+
+Figure 3: Real-world results on XNLI. Models were pretrained on a large text corpus and finetuned on English MultiNLI.
+
+# 5 Analyses
+
+In an attempt to explain the significantly improved cross-lingual performance of absolute positional encodings, we tried to examine precisely what sort of encoding was being learnt. Part of the original motivation behind sinusoidal encodings was that they would allow for compositionality; for any fixed offset $k$ , there exists a linear transformation from $p_{pos}$ to $p_{pos+k}$ , making it easier to learn to attend to relative offsets; the proof of this is in Appendix A.5
+
+We examined our absolute positional encodings to see whether or not they were being induced to learn some specific function. Figure 4 plots 4 dimensions of absolute and TUPE(a) positional encoding, for the EN + [EN~FI] model; each line
+
+
+Figure 4: Dimensions 0, 4, 8 and 16 of learnt absolute and TUPE positional encodings over 32 positions for EN~FI, seed 0.
+
+represents a specific dimension of the encoding vectors generated for positions 0 to 31. Interestingly, it appears that absolute representations converge to waveforms that represent sinusoids somewhat, while neither of the untied experiments do so (cf. Appendix B).
+
+We hypothesize that absolute representations converge to waveforms because of increased pressure for compositionality, being trained on structurally different languages. To test this, we quantify the extent to which the absolute, relative and untied encodings are compositional in the sense that there
+
+
+Figure 5: Procrustes loss for absolute encodings and TUPE (seed 0); differences are statistically significant with $p < 0.001$ (Wilcoxon). The sinusoidal loss is $\approx 0$ .
+
+is a linear transformation from $p_{pos}$ to $p_{pos + k}$ for different $k$ .
+
+To this end, we use Procrustes analysis (Stegmann and Gomez, 2002) to learn a linear transformation for each $k$ , based on the representations of $p_{pos}$ and $p_{pos+k}$ . Specifically, we apply orthogonal Procrustes analyses (Schönemann, 1966), which avoid scaling and translation.
+
+First, we minimise $\arg \min_{\mathrm{T}}||p_{pos} - \mathrm{Tp}_{pos + k}||^2$ Next, we apply T to a different randomly selected $pos^{\prime}$ , i.e. we calculate $\mathcal{L} = ||p_{pos^{\prime}} - \mathrm{Tp}_{pos^{\prime} + k}||^{2}$ The higher the final loss $\mathcal{L}$ , the less our encodings facilitate compositionality. In order to make learning T simpler, rather than selecting representations for single positions pos and $pos^{\prime}$ , we select chunks of arbitrary size $C$ , and stack their positions into a matrix. Note that for sinusoidal representations, the loss is close to zero regardless of span.
+
+The losses are plotted over a range of offsets for both absolute representations and for TUPE(a), in Figure 5; we include a control model trained on a monolingual corpus. Losses are averaged over 125 runs per offset, with random values of $pos$ , $pos'$ and $C$ . While both forms of representation appear to be similar (and relatively non-sinusoidal) when trained on the monolingual corpus, introducing bilingualism leads to a clear difference between the two: absolute positional representations tend to be a lot closer to sinusoidal representations than untied ones do. Note, also, that this gap is clear-
+
+est for the (simpler) EN + [EN] experiment – this is unsurprising, as EN + [EN] is still perceived as bilingual due to the shifted vocabulary. The structural similarity between the two, however, makes it easier to build compositional representations by relying on offsets, as the model only needs to learn to represent one language, structurally speaking. We observe a similar gap when comparing pretrained BERT models: bert-base-multilingual-cased exhibits more sinusoidal representations over a range of offsets, when compared to bert-base-cased, although the gap is narrower than with our toy models.
+
+
+Figure 6: Word-position correlations for our Finnishreordered model with random seed 0; words on the y- and positions on the x-axis.
+
+Correlations in multilingual settings A key motivation for eliminating word-position correlations, presented in (Ke et al., 2020), is the fact that these correlations are effectively zero, leading to no additional information for the model. Figure 6 captures word-position correlations from three of our trained models (with an additional model trained on a purely monolingual corpus); note that while these correlations are very close to zero for monolingual corpora, there is a visible "banding" phenomenon in the multilingual corpora, that only grows stronger when a different grammar is sampled. A similar banding phenomenon is visible when we compare multilingual and monolingual pre-trained BERT models (Appendix B), albeit with reduced magnitude. We hypothesize
+
+
+Figure 7: Ablation experiments, averaged over languages (for perplexity and ML score). Procrustes losses calculated as in §5, for the EN~FI model (seed 0).
+
+that the pressure for compositionality induces these correlations.
+
+Ablation studies Finally, we ran a series of ablation experiments on absolute positional encodings to support the above analysis. Three of the experiments involved removing position-position correlations, position-word correlations, word-position correlations, and a fourth involved using separate parameters for word and position attention. Results are presented in Figure 7; we also include the median Procrustes loss. We note that the removal of both position-word correlations and word-position correlations has an effect on both perplexity and ML score. Interestingly, removing word-position correlations $((p_iW^Q)(w_jW^K)^\top)$ does not have the same effect as the inverse does: perplexity is lower than with position-word correlations removed, but so is the ML score, indicating a difference between the role played by position as a key, and as a query.
+
+On relative representations Given our previous assumptions about offsets aiding compositionality, why, then, do our relative representations - that explicitly calculate offsets - perform poorly in multilingual settings? We speculate that the reason relative encodings appear to hurt multilingual compression is that offset-specific bias terms sparsify the learning signal for (and thereby hinder the alignment of) disjoint vocabularies. In compensating
+
+for this, relative positional encodings sacrifice their compositionality. Relative representations aid compositionality by directly providing a bias term derived from the distance between a word pair. As shown above, absolute representations learn similar biases; however, being actively forced to learn such biases could encourage models to jointly learn alignment and compositionality.
+
+Further, offset representations are also effectively "hard", i.e. derived from the hard distance between the two tokens. The interaction between $w_{i}$ and $w_{j}$ is not wholly mediated by the distance $i - j$ , however, this correlation is forced by the product term $(x_{i}W^{Q})(a_{ij})^{\top}$ . The term $(x_{i}W^{Q})(p_{j}W^{K})^{\top}$ on the other hand, could effectively attend to multiple offsets. $p_{j}W^{K}$ is fixed for position $j$ ; given the sinusoidal nature of $p$ , the product term could induce a "soft" positional representation with subspaces attending to different offsets; the relevant offset mix could then be indexed into by $x_{i}W^{Q}$ .
+
+# 6 Discussion
+
+The main contribution of our work is practical, namely showing that findings about positional encodings in the context of monolingual language models do not apply straightforwardly to multilingual language models. In answering why sinusoidal embeddings are superior to more recent alternatives in the multilingual setting, we also found the compositionality of positional encodings to be predictive of multilingual compression in such models. While relative positional encodings seem designed for compositionality, they prevent efficient alignment of multilingual vocabularies.
+
+Sinha et al. (2021) show that word order matters little for monolingual language model pretraining, and that pretrained language models seem to rely mostly on higher-order word co-occurrence statistics. Our work shows that this finding does not generalize to pretraining multilingual language models. In the multilingual setting, word order clearly matters, as also shown in previous work (Ke et al., 2020; Dufter and Schütze, 2021), and compositional positional encodings seem to facilitate effective multilingual compression. This aligns with the observation that syntactic reordering à la Ding et al. (2020) is in some cases an effective way to encourage compositional cross-lingual representations.
+
+In general, our results illustrate how methods developed for monolingual language models should not be blindly adopted when training multilingual models, which potentially require different architectures. Conversely, we would encourage future work on new positional encoding mechanisms for non-autoregressive models to also evaluate these mechanisms in multilingual settings.
+
+# 7 Conclusion
+
+Through a series of synthetic and real experiments with training multilingual language models, we showed that a) sinusoidal positional encodings perform better in multilingual settings than more recent alternatives (that have been shown to perform better in monolingual settings); b) this is likely because of an increased pressure for compositionality. We devised a method for quantifying the compositionality of positional encodings, and strengthened our results by also considering word-position correlations and ablation studies.
+
+# Acknowledgements
+
+We would like to thank Lilja Øvrelid, Erik Velldal, Mostafa Abdou and Artur Kulmizev for their feedback and comments. We would also like to acknowledge the supercomputing services provided by the CSC IT Center for Science in Finland.
+
+# References
+
+Mikel Artetxe, Sebastian Ruder, and Dani Yogatama. 2020. On the Cross-lingual Transferability of Monolingual Representations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4623–4637, Online. Association for Computational Linguistics.
+Rahma Chaabouni, Eugene Kharitonov, Diane Bouchacourt, Emmanuel Dupoux, and Marco Baroni. 2020. Compositionality and generalization in emergent languages. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4427-4442, Online. Association for Computational Linguistics.
+Alexis Conneau, Guillaume Lample, Rudy Rinott, Adina Williams, Samuel R. Bowman, Holger Schwenk, and Veselin Stoyanov. 2018. XNLI: Evaluating Cross-lingual Sentence Representations. arXiv:1809.05053 [cs].
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv:1810.04805 [cs].
+
+Liang Ding, Longyue Wang, and Dacheng Tao. 2020. Self-Attention with Cross-Lingual Position Representation. arXiv:2004.13310 [cs].
+Philipp Dufter, Martin Schmitt, and Hinrich Schütze. 2021. Position Information in Transformers: An Overview. arXiv:2102.11090 [cs].
+Philipp Dufter and Hinrich Schütze. 2021. Identifying Necessary Elements for BERT's Multilinguality. arXiv:2005.00396 [cs].
+Pengcheng He, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. 2021. DeBERTa: Decoding-enhanced BERT with Disentangled Attention. arXiv:2006.03654 [cs].
+Zhiheng Huang, Davis Liang, Peng Xu, and Bing Xiang. 2020. Improve Transformer Models with Better Relative Position Embeddings. arXiv:2009.13658 [cs].
+Karthikeyan K, Zihan Wang, Stephen Mayhew, and Dan Roth. 2020. Cross-Linguual Ability of Multilingual BERT: An Empirical Study. arXiv:1912.07840 [cs].
+Guolin Ke, Di He, and Tie-Yan Liu. 2020. Rethinking Positional Encoding in Language Pre-training. In International Conference on Learning Representations.
+Natalia Levshina. 2019. Token-based typology and word order entropy: A study based on Universal Dependencies. Linguistic Typology, 23(3):533-572.
+Danni Liu, Jan Niehues, James Cross, Francisco Guzmán, and Xian Li. 2020a. Improving Zero-Shot Translation by Disentangling Positional Information. arXiv:2012.15127 [cs].
+Zihan Liu, Genta Indra Winata, Samuel Cahyawijaya, Andrea Madotto, Zhaojiang Lin, and Pascale Fung. 2020b. On the Importance of Word Order Information in Cross-lingual Sequence Labeling. arXiv:2001.11164 [cs].
+Telmo Pires, Eva Schlinger, and Dan Garrette. 2019. How Multilingual is Multilingual BERT? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4996-5001, Florence, Italy. Association for Computational Linguistics.
+Julian Salazar, Davis Liang, Toan Q. Nguyen, and Katrin Kirchhoff. 2020. Masked language model scoring. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.
+Peter H Schonemann. 1966. A generalized solution of the orthogonal procrustes problem. Psychometrika, 31(1):1-10.
+Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. 2018. Self-Attention with Relative Position Representations. arXiv:1803.02155 [cs].
+
+Koustuv Sinha, Robin Jia, Dieuwke Hupkes, Joelle Pineau, Adina Williams, and Douwe Kiela. 2021. Masked Language Modeling and the Distributional Hypothesis: Order Word Matters Pre-training for Little. arXiv:2104.06644 [cs].
+Mikkel B. Stegmann and David Delgado Gomez. 2002. A brief introduction to statistical shape analysis. Informatics and Mathematical Modelling, Technical University of Denmark, DTU.
+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:1706.03762 [cs]. ArXiv: 1706.03762.
+Alex Wang and Kyunghyun Cho. 2019. Bert has a mouth, and it must speak: Bert as a markov random field language model.
+Benyou Wang, Lifeng Shang, Christina Lioma, Xin Jiang, Hao Yang, Qun Liu, and Jakob Grue Simonsen. 2021. ON POSITION EMBEDDINGS IN BERT. page 21.
+Dingquan Wang and Jason Eisner. 2016. The Galactic Dependencies Treebanks: Getting More Data by Synthesizing New Languages. Transactions of the Association for Computational Linguistics, 4:491-505.
+Xing Wang, Zhaopeng Tu, Longyue Wang, and Shuming Shi. 2019. Self-Attention with Structural Position Representations. arXiv:1909.00383 [cs].
+Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference. 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 1112-1122, New Orleans, Louisiana. Association for Computational Linguistics.
+Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi 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 M. 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.
+Shijie Wu and Mark Dredze. 2019. Beto, Bentz, Becas: The Surprising Cross-Lingual Effectiveness of BERT. 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
+
+833-844, Hong Kong, China. Association for Computational Linguistics.
+
+# A Proof of linear transformability
+
+Let
+
+$$
+\left[ \begin{array}{c} \sin (\omega t) \\ \cos (\omega t) \end{array} \right]
+$$
+
+represent a sine/cosine pair, characterised by position $t$ . Let
+
+$$
+\mathrm {R} _ {k} = \left[ \begin{array}{c c} \cos (\omega k) & \sin (\omega k) \\ - \sin (\omega k) & \cos (\omega k) \end{array} \right]
+$$
+
+be a rotation matrix for angle $\omega k$ . We then have:
+
+$$
+\begin{array}{l} R \left[ \begin{array}{c} \sin (\omega t) \\ \cos (\omega t) \end{array} \right] = \left[ \begin{array}{c c} \cos (\omega k) & \sin (\omega k) \\ - \sin (\omega k) & \cos (\omega k) \end{array} \right] \cdot \left[ \begin{array}{c} \sin (\omega t) \\ \cos (\omega t) \end{array} \right] \\ = \left[ \begin{array}{c} \sin (\omega k) \cos (\omega t) + \cos (\omega k) \sin (\omega t) \\ \cos (\omega k) \cos (\omega t) - \sin (\omega k) \sin (\omega t) \end{array} \right] \\ = \left[ \begin{array}{c} \sin (\omega (t + k)) \\ \cos (\omega (t + k)) \end{array} \right] \\ \end{array}
+$$
+
+implying that for a fixed frequency $\omega$ , there exists a rotation matrix $\mathbf{R}_k$ that can induce a rotational offset of $k$ .
+
+# B Additional plots
+
+
+Figure 8: Four neurons over 32 for TUPE (relative); the same neurons for 32 offsets centred on 512 for the other relative models.
+
+
+
+
+
+
+Figure 9: Word-position correlations for pretrained BERT models
+
+C Full results
+
+| Wiki/CC | Embedding | Perplexity | Retrieval | Translation | ML score |
| Full | L1 | 0 | 8 | 0 | 8 |
| Arabic | Sinusoidal | 67.52 (1.72) | 64.16 (2.14) | 47.90 (25.39) | 98.09 (0.90) | 71.75 (7.39) | 62.52 (0.09) | 70.36 (5.73) |
| Absolute | 68.54 (2.01) | 65.02 (2.83) | 44.84 (8.00) | 95.14 (0.98) | 70.79 (3.62) | 46.74 (10.01) | 63.67 (3.37) |
| TUPE (a) | 62.09 (0.57) | 59.01 (0.45) | 7.88 (1.63) | 75.17 (7.47) | 58.06 (4.65) | 32.13 (3.28) | 40.15 (4.45) |
| TUPE (r) | 61.22 (0.50) | 57.81 (1.05) | 15.12 (4.39) | 83.44 (13.58) | 64.94 (9.55) | 29.03 (10.33) | 46.22 (10.09) |
| Relative (k) | 58.08 (0.98) | 53.92 (0.89) | 12.61 (5.00) | 74.14 (15.52) | 63.27 (13.04) | 9.37 (3.85) | 38.56 (9.24) |
| Relative (k/q) | 55.96 (1.46) | 51.98 (1.02) | 20.95 (8.34) | 89.53 (8.39) | 73.01 (5.47) | 35.83 (20.20) | 55.23 (12.46) |
| German | Sinusoidal | 67.34 (1.52) | 64.74 (1.21) | 47.12 (25.19) | 98.94 (0.22) | 71.53 (14.37) | 61.06 (10.25) | 70.95 (3.74) |
| Absolute | 65.28 (1.69) | 62.67 (2.08) | 63.68 (2.44) | 98.87 (0.06) | 80.21 (0.60) | 36.34 (24.86) | 67.01 (8.44) |
| TUPE (a) | 61.29 (0.70) | 58.70 (0.60) | 12.11 (1.29) | 92.87 (2.50) | 71.39 (3.10) | 48.28 (3.36) | 55.15 (2.09) |
| TUPE (r) | 59.42 (0.77) | 56.90 (1.29) | 18.27 (3.33) | 97.40 (1.13) | 77.86 (2.10) | 43.72 (13.84) | 60.74 (5.49) |
| Relative (k) | 56.00 (0.22) | 52.29 (1.23) | 23.00 (5.06) | 95.70 (3.57) | 79.66 (1.94) | 26.08 (17.72) | 55.67 (8.05) |
| Relative (k/q) | 55.45 (0.73) | 51.77 (1.49) | 22.67 (7.54) | 90.80 (10.64) | 76.50 (7.72) | 39.51 (18.52) | 56.83 (11.69) |
| Basque | Sinusoidal | 68.44 (0.88) | 64.15 (1.30) | 48.65 (24.10) | 97.01 (0.70) | 70.63 (7.73) | 61.65 (2.26) | 70.16 (5.46) |
| Absolute | 69.46 (3.29) | 65.36 (2.70) | 45.42 (5.55) | 91.64 (3.68) | 69.19 (3.87) | 36.91 (6.75) | 58.51 (3.31) |
| TUPE (a) | 63.11 (0.36) | 59.23 (1.35) | 6.38 (2.17) | 71.92 (12.96) | 57.18 (7.90) | 28.21 (16.17) | 39.13 (10.48) |
| TUPE (r) | 60.82 (0.86) | 56.61 (1.77) | 10.85 (2.47) | 77.57 (12.22) | 64.37 (6.83) | 33.41 (12.54) | 43.95 (8.01) |
| Relative (k) | 60.03 (0.57) | 54.70 (0.53) | 9.49 (4.37) | 61.06 (20.25) | 56.12 (14.21) | 21.28 (15.21) | 36.27 (12.29) |
| Relative (k/q) | 57.66 (0.96) | 52.51 (1.41) | 11.74 (6.91) | 63.13 (32.58) | 55.84 (22.94) | 33.70 (18.55) | 41.27 (20.79) |
| Finnish | Sinusoidal | 67.28 (1.54) | 64.20 (1.88) | 51.99 (23.78) | 98.90 (0.25) | 76.33 (5.69) | 69.72 (1.44) | 74.51 (5.15) |
| Absolute | 67.14 (2.20) | 64.04 (2.76) | 51.91 (11.81) | 97.90 (1.13) | 77.54 (0.67) | 63.53 (7.04) | 72.83 (1.87) |
| TUPE (a) | 61.53 (1.21) | 58.06 (0.95) | 11.45 (1.36) | 91.69 (4.67) | 71.60 (3.69) | 34.34 (16.61) | 50.91 (6.36) |
| TUPE (r) | 61.07 (1.22) | 57.54 (1.07) | 15.90 (2.15) | 94.00 (3.82) | 75.84 (4.08) | 47.95 (20.72) | 58.29 (7.04) |
| Relative (k) | 57.05 (1.14) | 53.13 (0.43) | 22.31 (3.20) | 96.01 (0.70) | 78.96 (0.68) | 20.75 (7.37) | 53.76 (0.78) |
| Relative (k/q) | 55.37 (0.66) | 51.29 (0.27) | 22.97 (0.86) | 91.87 (5.67) | 79.77 (0.97) | 22.81 (25.52) | 54.63 (9.17) |
| French | Sinusoidal | 63.92 (0.41) | 61.82 (0.87) | 54.10 (22.52) | 99.36 (0.13) | 77.65 (4.95) | 70.28 (1.22) | 75.76 (4.25) |
| Absolute | 64.76 (1.10) | 62.68 (1.37) | 59.12 (13.35) | 99.14 (0.37) | 79.57 (0.63) | 68.90 (2.75) | 76.28 (1.93) |
| TUPE (a) | 59.94 (0.79) | 58.60 (0.71) | 8.67 (2.15) | 90.25 (7.76) | 67.86 (7.47) | 36.15 (7.99) | 50.87 (6.57) |
| TUPE (r) | 58.28 (0.78) | 56.14 (1.37) | 19.36 (3.62) | 96.64 (2.93) | 78.50 (1.72) | 51.63 (18.73) | 63.50 (7.99) |
| Relative (k) | 55.18 (0.25) | 52.96 (0.44) | 18.84 (2.14) | 91.12 (8.32) | 73.30 (7.86) | 37.50 (17.77) | 56.07 (8.40) |
| Relative (k/q) | 54.35 (0.23) | 52.10 (1.02) | 19.01 (5.15) | 90.09 (9.29) | 72.22 (7.48) | 26.51 (22.43) | 51.88 (10.57) |
| Hindi | Sinusoidal | 67.46 (0.27) | 65.01 (0.32) | 37.94 (20.74) | 88.30 (4.64) | 63.26 (13.46) | 47.88 (6.96) | 60.76 (4.85) |
| Absolute | 63.75 (1.05) | 61.38 (0.97) | 47.98 (0.66) | 95.58 (2.19) | 76.18 (1.95) | 56.57 (12.48) | 67.28 (4.54) |
| TUPE (a) | 61.70 (1.10) | 59.57 (0.48) | 6.34 (1.56) | 74.79 (20.15) | 58.50 (12.29) | 28.73 (6.46) | 40.11 (9.49) |
| TUPE (r) | 59.57 (1.24) | 57.64 (1.75) | 12.67 (6.57) | 72.64 (24.01) | 61.35 (17.78) | 23.49 (10.80) | 39.66 (14.67) |
| Relative (k) | 55.50 (0.60) | 52.81 (0.87) | 19.72 (4.83) | 90.11 (9.87) | 74.06 (4.06) | 26.71 (13.65) | 52.39 (9.33) |
| Relative (k/q) | 54.51 (0.21) | 52.04 (0.74) | 23.45 (6.88) | 93.27 (6.35) | 75.60 (3.41) | 32.95 (21.46) | 56.72 (10.94) |
| Swedish | Sinusoidal | 64.62 (0.86) | 62.32 (0.73) | 57.11 (21.45) | 99.32 (0.24) | 79.89 (2.06) | 71.82 (7.63) | 77.39 (5.05) |
| Absolute | 65.54 (1.86) | 62.95 (2.48) | 53.52 (4.43) | 97.45 (0.79) | 78.85 (1.69) | 66.33 (3.09) | 74.58 (2.28) |
| TUPE (a) | 60.16 (0.99) | 58.23 (1.49) | 14.47 (3.45) | 96.36 (2.49) | 76.62 (3.05) | 48.12 (19.76) | 60.16 (7.98) |
| TUPE (r) | 58.29 (0.17) | 56.12 (0.72) | 21.57 (3.06) | 97.80 (1.40) | 79.05 (3.18) | 54.56 (2.06) | 64.86 (1.83) |
| Relative (k) | 54.94 (0.61) | 52.28 (0.68) | 28.17 (3.30) | 98.52 (0.68) | 82.81 (1.08) | 56.60 (9.17) | 68.09 (5.04) |
| Relative (k/q) | 53.66 (0.22) | 51.16 (1.11) | 27.87 (4.86) | 97.63 (2.04) | 82.11 (2.22) | 49.65 (17.66) | 65.89 (8.57) |
| Bible | Embedding | Perplexity | Retrieval | Translation | ML score |
| Full | L1 | 0 | 8 | 0 | 8 |
| Arabic | Sinusoidal | 228.44 (5.29) | 193.76 (3.88) | 2.30 (0.35) | 32.79 (4.29) | 24.54 (5.24) | 13.20 (3.62) | 18.21 (3.09) |
| Absolute | 236.83 (8.40) | 206.44 (10.04) | 4.18 (0.20) | 22.72 (5.92) | 24.18 (3.04) | 5.75 (1.87) | 14.21 (2.67) |
| TUPE (a) | 251.32 (5.55) | 209.54 (9.00) | 0.72 (0.36) | 10.18 (6.12) | 9.91 (5.73) | 3.44 (2.47) | 6.07 (3.67) |
| TUPE (r) | 228.09 (18.36) | 193.67 (7.37) | 1.30 (0.22) | 21.49 (6.68) | 23.25 (3.57) | 4.19 (1.11) | 12.56 (2.28) |
| Relative (k) | 206.77 (4.36) | 177.43 (3.93) | 0.84 (0.08) | 8.79 (1.82) | 11.85 (1.24) | 3.24 (0.64) | 6.18 (0.73) |
| Relative (k/q) | 195.47 (5.84) | 166.20 (2.53) | 1.44 (0.60) | 15.87 (8.02) | 19.30 (7.44) | 4.82 (2.64) | 10.36 (4.52) |
| German | Sinusoidal | 214.19 (8.29) | 185.11 (3.92) | 6.80 (1.86) | 76.04 (3.25) | 64.60 (2.83) | 37.76 (5.90) | 46.30 (2.53) |
| Absolute | 230.05 (7.75) | 205.46 (12.23) | 9.81 (2.28) | 63.69 (12.37) | 51.91 (5.98) | 17.89 (5.89) | 35.83 (6.55) |
| TUPE (a) | 230.92 (6.27) | 203.84 (2.26) | 1.75 (0.39) | 33.91 (2.86) | 36.33 (6.21) | 9.59 (2.96) | 20.40 (2.65) |
| TUPE (r) | 211.44 (6.19) | 196.39 (7.09) | 2.52 (0.56) | 48.23 (20.03) | 46.61 (14.36) | 14.43 (6.78) | 27.95 (9.95) |
| Relative (k) | 189.45 (4.10) | 165.36 (2.59) | 1.50 (0.48) | 16.44 (7.67) | 19.43 (8.06) | 5.12 (2.08) | 10.62 (4.56) |
| Relative (k/q) | 191.06 (0.27) | 168.70 (6.74) | 2.33 (0.67) | 33.21 (15.24) | 36.76 (13.08) | 11.69 (6.65) | 21.00 (8.84) |
| Basque | Sinusoidal | 236.91 (9.77) | 197.71 (11.45) | 1.47 (0.37) | 15.82 (2.59) | 13.57 (3.44) | 6.47 (2.72) | 9.33 (2.27) |
| Absolute | 248.87 (18.53) | 212.26 (14.12) | 4.90 (0.82) | 24.07 (4.75) | 17.72 (2.05) | 6.00 (2.44) | 13.17 (1.15) |
| TUPE (a) | 265.28 (11.20) | 220.59 (17.75) | 0.42 (0.18) | 2.98 (1.30) | 4.57 (1.17) | 1.21 (0.57) | 2.29 (0.79) |
| TUPE (r) | 239.52 (8.88) | 196.16 (12.43) | 1.04 (0.21) | 11.23 (1.54) | 14.64 (4.25) | 3.29 (0.98) | 7.55 (1.36) |
| Relative (k) | 214.59 (5.79) | 170.40 (2.68) | 0.52 (0.14) | 3.24 (1.20) | 6.23 (1.05) | 1.60 (0.67) | 2.90 (0.62) |
| Relative (k/q) | 206.33 (6.43) | 166.16 (2.67) | 0.49 (0.18) | 3.15 (1.43) | 5.96 (2.18) | 1.37 (0.86) | 2.74 (1.09) |
| Finnish | Sinusoidal | 215.28 (2.80) | 181.92 (5.08) | 4.34 (0.29) | 64.24 (9.50) | 56.92 (5.55) | 28.02 (8.05) | 38.38 (5.73) |
| Absolute | 230.22 (12.83) | 194.61 (4.17) | 14.40 (3.69) | 68.82 (5.06) | 63.92 (5.37) | 26.18 (8.15) | 43.33 (5.03) |
| TUPE (a) | 251.91 (4.75) | 215.41 (10.58) | 1.94 (0.56) | 35.29 (11.75) | 36.96 (8.56) | 10.58 (6.28) | 21.19 (6.73) |
| TUPE (r) | 240.35 (7.43) | 206.09 (14.62) | 3.00 (0.40) | 52.44 (7.90) | 53.54 (5.29) | 9.22 (5.12) | 29.55 (3.15) |
| Relative (k) | 202.40 (8.09) | 170.90 (9.54) | 1.77 (0.90) | 23.66 (13.30) | 30.67 (14.17) | 11.30 (5.45) | 16.85 (8.23) |
| Relative (k/q) | 197.92 (5.13) | 161.33 (8.55) | 2.38 (0.70) | 29.05 (3.31) | 40.63 (10.06) | 12.74 (5.02) | 21.20 (4.70) |
| French | Sinusoidal | 202.44 (4.97) | 179.19 (6.13) | 7.36 (1.66) | 82.96 (1.61) | 74.46 (1.00) | 44.95 (4.13) | 52.43 (0.76) |
| Absolute | 217.10 (11.25) | 199.77 (10.51) | 13.60 (1.64) | 75.18 (7.83) | 74.33 (5.80) | 35.35 (9.98) | 49.62 (6.21) |
| TUPE (a) | 220.48 (9.85) | 203.21 (12.12) | 2.49 (0.35) | 52.95 (15.51) | 46.47 (10.33) | 15.98 (5.82) | 29.47 (7.80) |
| TUPE (r) | 204.57 (8.86) | 188.30 (14.18) | 4.07 (0.72) | 71.33 (10.07) | 65.27 (6.85) | 29.41 (8.71) | 42.52 (6.50) |
| Relative (k) | 181.31 (2.67) | 161.53 (3.44) | 2.36 (1.09) | 36.83 (20.95) | 33.84 (15.39) | 12.17 (9.58) | 21.30 (10.92) |
| Relative (k/q) | 179.43 (9.50) | 159.12 (8.66) | 4.01 (0.93) | 57.36 (10.80) | 56.62 (9.44) | 24.81 (10.53) | 35.70 (6.91) |
| Hindi | Sinusoidal | 207.71 (3.54) | 187.60 (4.39) | 2.08 (0.53) | 22.03 (8.05) | 17.30 (5.85) | 7.54 (2.13) | 12.24 (4.13) |
| Absolute | 221.81 (6.29) | 197.47 (9.65) | 4.62 (1.64) | 29.81 (13.95) | 23.44 (9.49) | 6.00 (1.86) | 15.97 (6.55) |
| TUPE (a) | 235.64 (11.94) | 216.64 (15.13) | 0.70 (0.06) | 5.63 (1.00) | 9.15 (2.07) | 2.31 (0.57) | 4.45 (0.69) |
| TUPE (r) | 210.78 (8.59) | 189.10 (9.12) | 0.83 (0.37) | 12.64 (5.58) | 13.41 (6.40) | 3.26 (1.76) | 7.54 (3.52) |
| Relative (k) | 190.88 (4.72) | 172.32 (7.12) | 1.24 (0.43) | 15.41 (6.60) | 14.80 (6.91) | 4.71 (2.33) | 9.04 (4.06) |
| Relative (k/q) | 190.68 (6.60) | 168.92 (4.95) | 1.06 (0.32) | 11.42 (5.32) | 13.01 (4.36) | 3.59 (0.56) | 7.27 (2.62) |
| Swedish | Sinusoidal | 205.42 (4.67) | 180.45 (2.27) | 9.41 (0.30) | 84.72 (2.59) | 78.21 (0.52) | 55.40 (6.57) | 56.94 (2.23) |
| Absolute | 220.06 (10.32) | 197.17 (5.13) | 15.82 (0.56) | 83.29 (0.69) | 77.68 (1.00) | 38.35 (4.80) | 53.79 (1.34) |
| TUPE (a) | 220.78 (8.49) | 201.86 (6.14) | 3.56 (0.64) | 61.11 (12.33) | 58.59 (11.18) | 13.75 (3.21) | 34.25 (6.03) |
| TUPE (r) | 212.54 (3.02) | 192.31 (9.32) | 5.00 (1.46) | 72.05 (11.82) | 66.01 (9.39) | 33.61 (10.73) | 44.17 (7.93) |
| Relative (k) | 184.79 (6.02) | 165.70 (6.85) | 5.56 (1.40) | 72.94 (3.63) | 69.32 (5.43) | 14.18 (5.07) | 40.50 (2.83) |
| Relative (k/q) | 177.74 (6.85) | 160.42 (5.99) | 5.08 (0.24) | 71.11 (5.47) | 67.52 (3.27) | 32.22 (12.51) | 43.99 (1.05) |
+
+Table 5: Full results (mean/std. over three seeds)
\ No newline at end of file
diff --git a/theimpactofpositionalencodingsonmultilingualcompression/images.zip b/theimpactofpositionalencodingsonmultilingualcompression/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..5d0b75eb1fc2d429a8cd69cb30b78079b51f4b23
--- /dev/null
+++ b/theimpactofpositionalencodingsonmultilingualcompression/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:631b4831f2cc5a70a712f8205592b9732c3b2e63b27981ccc752ab7ec0ab5d09
+size 1278551
diff --git a/theimpactofpositionalencodingsonmultilingualcompression/layout.json b/theimpactofpositionalencodingsonmultilingualcompression/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..ee9e95ba8f9458125a7a5e0397f4d06eb6abff64
--- /dev/null
+++ b/theimpactofpositionalencodingsonmultilingualcompression/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ed439eede1ebefa839098a1ac16a79afd5056ee7074409af6bd843c2a1979262
+size 331946
diff --git a/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/ebbe8694-cc5f-4afa-b7f4-316a36ce25e2_content_list.json b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/ebbe8694-cc5f-4afa-b7f4-316a36ce25e2_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..50e95f27a8745fa10b94e0eaeffa6a593da8ce77
--- /dev/null
+++ b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/ebbe8694-cc5f-4afa-b7f4-316a36ce25e2_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b74559c28784d9548280bdbd755d9fbe20da8310a84de193c57fa0ae66d14a92
+size 146594
diff --git a/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/ebbe8694-cc5f-4afa-b7f4-316a36ce25e2_model.json b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/ebbe8694-cc5f-4afa-b7f4-316a36ce25e2_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..c8f7565ab81a7d9ad030b4fe1ebc12b57fdb6720
--- /dev/null
+++ b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/ebbe8694-cc5f-4afa-b7f4-316a36ce25e2_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c69cec682ede0983a7e4513ccd1dbcd55ec458ed1a8964ed0d6ba36dd53875ae
+size 183039
diff --git a/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/ebbe8694-cc5f-4afa-b7f4-316a36ce25e2_origin.pdf b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/ebbe8694-cc5f-4afa-b7f4-316a36ce25e2_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..190ce728394f446e18b8a27f35243bd8347ea2a3
--- /dev/null
+++ b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/ebbe8694-cc5f-4afa-b7f4-316a36ce25e2_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3d31ee140f1c6b817ffd1eb074ee6190cbffdd885373813cf77151b6635ec251
+size 1038901
diff --git a/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/full.md b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..57d9f0f28f94ef98c33d8b7d62f023246012141b
--- /dev/null
+++ b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/full.md
@@ -0,0 +1,514 @@
+# The Perils of Using Mechanical Turk to Evaluate Open-Ended Text Generation
+
+Marzena Karpinska Nader Akoury Mohit Iyyer
+
+University of Massachusetts Amherst
+
+{mkarpinska, nsa, miyyer}@cs.umass.edu
+
+# Abstract
+
+Recent text generation research has increasingly focused on open-ended domains such as story and poetry generation. Because models built for such tasks are difficult to evaluate automatically, most researchers in the space justify their modeling choices by collecting crowdsourced human judgments of text quality (e.g., Likert scores of coherence or grammaticality) from Amazon Mechanical Turk (AMT). In this paper, we first conduct a survey of 45 open-ended text generation papers and find that the vast majority of them fail to report crucial details about their AMT tasks, hindering reproducibility. We then run a series of story evaluation experiments with both AMT workers and English teachers and discover that even with strict qualification filters, AMT workers (unlike teachers) fail to distinguish between model-generated text and human-generated references. We show that AMT worker judgments improve when they are shown model-generated output alongside human-generated references, which enables the workers to better calibrate their ratings. Finally, interviews with the English teachers provide deeper insights into the challenges of the evaluation process, particularly when rating model-generated text.
+
+# 1 Introduction
+
+Recent advances in neural language modeling have spurred research into open-ended text generation tasks such as story generation (Peng et al., 2018a), style transfer (Krishna et al., 2020), and pun generation (He et al., 2019). Since the space of possible outputs for these tasks is huge compared to more constrained problems such as machine translation, automatic metrics such as BLEU (Papineni et al., 2002) and ROUGE (Lin, 2004) that measure similarity to reference texts are mostly uninformative (Akoury et al., 2020).1 Human evaluation of
+
+model-generated text, which is critical for open-ended tasks given the unreliability of automatic metrics (Peng et al., 2017; Reiter, 2018; See et al., 2019), is frequently conducted on Amazon's popular Mechanical Turk platform (AMT) to minimize cost and time. Most existing AMT studies ask crowdworkers to provide Likert scale ratings of various properties of generated text, such as fluency and likability.
+
+In this paper, we study the reliability and reproducibility of AMT evaluations of open-ended text generation. We first conduct a survey of papers on open-ended text generation between 2018-2020 and find many critical details often go unreported (e.g., worker qualifications, payment, task descriptions, annotator agreement), a finding in line with prior reproducibility studies outside open-ended text generation (Card et al., 2020; Howcroft et al., 2020; van der Lee et al., 2021).
+
+Next, we perform a series of story generation evaluations with both AMT workers and expert raters (English teachers), applying a variant of the most common task configuration that appeared in our survey (5 point Likert scale ratings of 200 examples with three annotators per example) to the paragraph-length WritingPrompts dataset of Fan et al. (2018). Unlike prior work in this area, we ask raters to evaluate both stories generated by a fine-tuned GPT-2 language model (Radford et al., 2019) and human-written reference stories on the same scale, as we expect the latter to consistently score higher on all evaluations. Our experiments expose and quantify several troubling trends:
+
+1. AMT ratings do not reliably distinguish model-generated text from human-generated text unless workers are asked to rate both side-by-side, which allows them to better calibrate their ratings.
+2. Running an identical task (same AMT parameters and input data) on different days of the
+
+
+(a) While teachers unanimously marked this story as irrelevant to the prompt, an AMT worker spent $\sim 19$ sec reading it before rating it a 5 out of 5 on relevance.
+(b) Well written story was rated as 1 out of 5 for grammar by a worker on AMT.
+(c) Gaps in world knowledge affected ratings of English teachers. A teacher unfamiliar with the show "The Office" rated the story lower for coherence.
+
+# HUMAN REFERENCE
+
+"You're getting old."
+
+It was a gray and miserable afternoon but Jill didn't really seem to notice. Her cappuccino caught raindrops.
+
+"I know, I know," dismissed Max. His latte had a lid. The two sipped their coffee in silence. Only one of them noticed the barista added way too much caramel.
+
+`I...” began Jill. She fidgeted with her mug. `I'm scared of losing you." (...)
+
+
+Figure 1: Three examples of prompt-story pairs along with ratings from AMT workers and expert teachers that demonstrate major issues with human evaluation of open-ended text generation.
+
+# HUMAN REFERENCE
+
+EXT. DUNDER MIFFLIN WAREHOUSE ENTRANCE
+
+MICHAEL has his back to the wall that leads to the OPEN WAREHOUSE GARAGE DOOR. He's trying to stand like he's being very stealthy, palms against the wall.
+
+MICHAEL: I Just finished Season 1 of `Undercover Boss" on DVD... well it was only the first disc of the first season. (...)
+
+week exhibits high variance and can lead to dubious conclusions (e.g., that reference texts are lower quality than GPT-2 generated text).
+
+3. Many AMT workers do not carefully read the text that they are evaluating. Even after enabling multiple qualifications to exclude low-quality workers, $42\%$ of workers on average take fewer than 40 seconds to complete each task. Filtering out these workers can make a significant impact to the overall ratings, but also notably reduces the number of datapoints.
+4. Even expert raters struggle to read and judge model-generated text. The time they spend per example increases significantly compared to that for references, and agreement also drops.
+
+For future human evaluations of open-ended text generation tasks, we urge researchers to obtain expert raters whenever possible. If AMT is the only feasible option, we recommend that available reference outputs also be evaluated alongside model-generated ones to improve rating calibration, and also that heavy filtering of the worker population (possibly through qualification tasks, or post-hoc removal) is performed prior to reporting results.
+
+# 2 A survey of papers that evaluate open-ended text generation with AMT
+
+We begin with a survey of 45 papers that use AMT to evaluate the output of open-ended English-language text generation models, which includes
+
+generated stories, metaphors, paraphrases, puns, sarcasm, and sentences with transferred style or attributes $^{2}$ . Each paper was published between 2018 and 2020 at ACL, NAACL, or EMNLP, and we exclude papers that use AMT to evaluate more well-established generation tasks like machine translation, or summarization. Unlike previous surveys of evaluating generated text (Celikyilmaz et al., 2020; van der Lee et al., 2021), we focus specifically on AMT evaluations of open-ended text generation. In this section, we provide an overview of the different types of evaluation task setups present in our survey; later, we experiment with several variants of the most common setup.
+
+Evaluation criteria: As in the survey of Howcroft et al. (2020), we observe a variety of different evaluation criteria and definitions of these criteria across the 45 papers. The most common criteria include fluency and/or grammaticality (19), overall "quality" (12), and relevance (10) to a corresponding prompt. Furthermore, stories in particular tend to also be evaluated on some notion of coherence (9) and likability (4).
+
+Rating scales: More than half of the papers (24) employ a 5-point Likert scale to evaluate the above criteria; of these, 19 provided labels for just the end points of the scale (e.g., "lowest" vs. "highest"), while 5 labeled all points on the scale. The next most common evaluation type is ranking two or more system outputs (23). Less common are other Likert scales (3, 4, or 6-point), pass/fail tasks, and output-prompt matching tasks.
+
+Number of raters and rated items: An alarming number of papers (14) do not even report the number of raters and/or items (6) used for evaluation. Of the remaining, most papers (16) obtain ratings from 3 separate AMT workers per item. The most common number of items per evaluation is 100 (14). The number of raters per item in other studies ranges from 2 to 11, while the number of items ranges from 12 to 1,000.
+
+Workers qualifications and compensation: The vast majority of papers do not report AMT worker qualifications (32) or worker compensation (35), which adds to the reproducibility woes. Among papers that report qualifications, the most common were $\mathrm{HIT}^4$ approval rate $\geq 90\% - 99\%$ , and number of approved HITs between 500 to 5,000. Only 11 papers mentioned restricting workers to those from English-speaking countries or applying some kind of language test, despite all evaluations being done on English text.
+
+Length of the Rated Text: As open-ended text generation encompasses an array of different tasks, the length of the rated text differed greatly, ranging from single sentences (28), sometimes presented in a longer context, to short paragraphs (7), and longer paragraphs (14). The latter setting is most commonly used for story generation tasks.
+
+# 3 Evaluating story generation with AMT
+
+Our survey reveals that the most popular Mechanical Turk task design for open-ended text generation asks AMT workers to rate various properties of generated text on a 5-point Likert scale. In this section, we conduct a series of AMT evaluations for the open-ended problem of story generation by varying different parameters within this standard task design. Importantly, we evaluate both model-generated stories as well as human-generated refer
+
+ence stories, which provides a pseudo upper bound for the ratings. Our experiments reveal that worker qualifications (e.g., HIT approval rate and number of accepted HITs) do not notably impact judgments or spam rate on reference stories, with the exception of country of origin. Furthermore, we uncover an issue with rating calibration: when both reference and model-generated stories are included for the same prompt, average reference scores are significantly higher than those for model-generated text; however, when workers only see one type of text per HIT, they give similar average scores to both types.
+
+# 3.1 Experimental Setup
+
+We first describe the parameters of our experiments before later analyzing the results.
+
+Dataset: We use the WritingPrompts dataset collected by Fan et al. (2018), which is a collection of 303,358 English language stories written by Reddit users on the r/WritingPrompts subreddit.5 This dataset, which consists of short prompts paired with user-written stories (e.g., "There are 10 legendary dentists who review every toothpaste. You are the 10th... being hunted by the other 9..."), has been used in multiple previous works on paragraph-length story generation (Fan et al., 2019; See et al., 2019; Mao et al., 2019). We randomly select 200 prompts from the test set for all of our experiments. Since the human-written stories in the dataset are already tokenized, we first de-tokenized the stories, cleaned up artifacts from lemmatization, and manually truncated each story so that it ends with a full sentence and is no longer than 150 words in order to make the length comparable with the machine-generated story.6 We use the resulting stories for all experiments with reference text.
+
+Model-generated stories: We follow a similar modeling approach to prior story generation work (Mao et al., 2019; Guan et al., 2020) by fine-tuning a pretrained GPT-2 medium-sized model (Radford et al., 2019) on the training set of the WritingPrompts dataset, using the Hugging-Face Transformers library (Wolf et al., 2020). We use a batch size of approximately $50k$ tokens, a learning rate of $5e - 5$ with a linear learning rate schedule, and train for 3 epochs, stopping training
+
+after validation perplexity converges to $\sim 19$ . Each training example consists of a concatenation of a prompt, separator token (new line character), and reference story. At test-time, we feed the same 200 prompts selected above to our model for fair comparison to the human-written stories, and we generate three stories per prompt using nucleus sampling (Holtzman et al., 2019) with $p = 0.9$ . We manually truncate each sample so that it ends with a full sentence and is no longer than 150 words. $^7$ These stories are used in all experiments evaluating machine-generated stories.
+
+AMT task parameters: We conduct all experiments using the default interface in Mechanical Turk (see Figure A1 and Figure A2). Workers were asked to rate human-written and/or machine-generated stories on four attributes, with the following definitions provided to them:
+
+1. Grammar: "How grammatically correct is the text of the story fragment?"
+2. Coherence: "How well do the sentences in the story fragment fit together?"
+3. Likability: "How enjoyable do you find the story fragment?"
+4. Relevance: "How relevant is the story fragment to the prompt?"
+
+Their ratings fall on a 5-point Likert scale with the corresponding endpoints labelled as "lowest" (1 point) and "highest" (5 points). Since our survey did not find many previous papers that reported using detailed descriptions for each point on the scale, we chose to use minimal labels to mimic the most popular setup (see Section 2 for details).
+
+Each of our AMT experiments shows workers the same 200 prompts paired with human and/or machine-generated stories, and we solicit three worker judgments per HIT. Workers were paid $0.20 per HIT for tasks that showed one story, and$ 0.35 per HIT for those that showed two stories; in total, our AMT experiments cost roughly $1.5K. Importantly, each experiment used a completely different set of workers (i.e., each worker could only participate in one experiment, although they can complete multiple HITs within that experiment), which is an intentional choice to prevent workers from judging the same story multiple times. Finally, to eliminate potential variations stemming
+
+from evaluation on different days (weekdays vs. weekends) and time of day, we launch all experiments on weekdays between 11:00-11:30AM PST.
+
+# 3.2 AMT Evaluations of Reference Text
+
+Our first set of experiments concerns only human-written reference stories; we move to machine-generated text in the next subsection. One of our assumptions with human-written stories, supported by the expert teacher assessment in Section 4, is that they should receive relatively high scores for all four properties (except perhaps likability which is highly subjective). We thus use reference texts to evaluate various AMT parameters such as qualifications or day of task launch, observing how modifications to these parameters affect the average scores of reference text.
+
+Impact of worker qualifications: We run four experiments evaluating the previously-described set of 200 prompts with reference story fragments, varying the worker qualifications as follows: (1) no qualifications, (2) including only workers with HIT approval rate $>90\%$ , (3) including only workers with approval rate $>90\%$ and at least 1000 approved HITs, (4) including only workers with approval rate $>90\%$ and at least 1000 approved HITs who are located in English-speaking countries.
+
+The results in the top portion of Table 1 suggest that applying all of the qualifications (i.e., workers from English-speaking countries, approval rate $>90\%$ , approved HITs $\geq 1000$ ) has a positive effect on the quality of workers, as this setting yielded the highest scores out of the four experiments for coherence and relevance while ratings for grammar were also considerably high. Ratings for likability were lower than in the experiments with less strict qualifications, but likability is a very subjective measure which consistently shows a very low agreement (Krippendorff's $\alpha$ of -0.04 to 0.11). When all AMT worker qualifications are enabled, the worker ratings more closely align to those made by English teachers, although there are still substantial deviations (Section 4). Additionally, with all qualifications enabled, workers show higher agreement for grammar, coherence, relevance and even likability, although the agreement between raters remains low.
+
+High variance across different days: Concerned by the low overall agreement, we decided
+
+| Experiment description | Grammar | Coherence | Relevance | Likability |
| MeanSTD | IAA% | MeanSTD | IAA% | MeanSTD | IAA% | MeanSTD | IAA% |
| Impact of Qualifications |
| No qualifications | 4.050.90 | 0.0814.5 | 3.920.98 | 0.024.5 | 3.661.22 | 0.1311 | 3.641.16 | 0.027 |
| + > 90% HIT approval | 4.160.86 | 0.0718 | 4.070.93 | 0.0610.5 | 3.671.14 | 0.079 | 3.681.15 | 0.0810 |
| + at least 1000 HITs | 3.910.85 | 0.0512 | 3.850.98 | 0.0811.5 | 3.601.15 | 0.188 | 3.631.13 | 0.0712.5 |
| + English-speaking countries | 4.000.92 | 0.2115.5 | 4.110.96 | 0.1416.5 | 3.711.26 | 0.2710 | 3.371.18 | 0.117.5 |
| Variance Across Days |
| Day 1 (all qual.) | 4.000.92 | 0.2115.5 | 4.110.96 | 0.1416.5 | 3.711.26 | 0.2710 | 3.371.18 | 0.117.5 |
| Day 2 (all qual.) | 3.860.92 | -0.0310.5 | 3.920.98 | -0.036.5 | 3.711.08 | 0.0211 | 3.730.97 | -0.048.5 |
| Day 3 (all qual.) | 3.980.96 | 0.1811 | 4.050.94 | 0.1310.5 | 3.461.29 | 0.268 | 3.421.16 | 0.074.5 |
| Impact of Country of Origin |
| - English-speaking countries | 3.821.04 | 0.0311 | 3.451.19 | -0.019 | 3.251.27 | 0.036.5 | 3.321.26 | -0.093 |
| Impact of Filtering by the Median Work Time |
| Day 2 (Median ≥ 40s) | 4.040.94 | | 4.330.92 | | 3.741.34 | | 3.671.06 | |
+
+Table 1: AMT experiments on human-written reference stories. Inter-annotator agreement (IAA) between the three raters is measured with Krippendorff's $\alpha$ as well as the percentage of stories for which all three raters exactly agreed on a rating (the latter is subscripted). Last section omits IAA due to the large number of missing datapoints. Statistical significance for the relations between groups is provided in Appendix D.
+
+
+Figure 2: This example from Day 2 shows that many AMT workers complete multiple HITs in less time and with lower agreement in comparison to our experts.
+
+to run another set of experiments that repeats the same experiment (all qualifications enabled) across three different days. Due to our constraint that each worker can only participate in one experiment, each of these experiments has a different subset of qualified workers. As shown in the second portion of Table 1, although the first and third days yielded similar mean ratings/agreement in terms of grammar $(\mathrm{M} = 4.00$ , IAA $= 0.21$ vs $\mathrm{M} = 3.98$ , IAA $= 0.18)$ and coherence $(\mathrm{M} = 4.11$ , IAA $= 0.14$ vs $\mathrm{M} = 4.05$ , IAA $= 0.13)$ , the second day received lower ratings across the board and had overall poor IAA (see Table 1). Furthermore, ratings for relevance in the third day $(\mathrm{M} = 3.46)$ were significantly lower than in the first two days $(\mathrm{M} = 3.71)$ , which indicates that simply using all AMT qualifications is not enough to achieve consistent results.
+
+Many AMT workers do not spend enough time reading the stories: The low overall agreement
+
+also motivated us to examine the average time each worker spent per HIT. While AMT reports WorkTimeInSeconds in the results file made available to task requesters, we observe similar to Akoury et al. (2020) that these times are artificially inflated due to workers who accept multiple HITs at the same time and work on them sequentially (e.g., in different tabs). Such workers are also frequently among the most prolific in terms of HITs completed per experiment (see Figure 2), since there is no maximum number of HITs per worker.[9] We correct for this by measuring the time between consecutively submitted HITs by the same worker, which can be derived by analyzing start and end times of each HIT. This "actual time" differs considerably from the AMT reported WorkTimeInSeconds: for instance, a worker that AMT reports had a mean work-time of 360 seconds had an actual mean working time[10] of 22s and a median of 13s. To put these numbers in perspective, this is about one-fourth of the time that the fastest English teacher achieved (see Section 4).
+
+As it is impossible to carefully read a paragraph-length story and assess all four properties in as little as 13 seconds, we measure the impact on average
+
+ratings when filtering out workers who spend too little time per HIT (last row of Table 1). Specifically, we remove judgments from workers whose median time is below 40s (which is a low bar), and find that on average about $42\%$ of our ratings are filtered out (ranging from $20\% -72\%$ across all experiments). Of our surveyed papers, only Akoury et al. (2020) report actual work time, demonstrating that this is a major issue in modern AMT evaluations of text quality that most researchers have overlooked.
+
+Impact of worker country of origin: While all of the surveyed papers evaluate only English text, only 11 of them reported using some kind of filtering to ensure that workers have sufficient knowledge of English. The default AMT setting does not filter workers by country of origin, which potentially increases the variance of results depending on the English proficiency of workers who accept HITs. To measure this, we re-run our experiment with all qualifications, except we restrict the task to only workers from countries that do not primarily speak English (i.e., we exclude workers from the US, Canada, UK, Australia, New Zealand, Ireland, and Singapore). The third portion of Table 1 shows that workers from non-English speaking countries rated coherence, relevance, and grammar $^{12}$ significantly lower than identically-qualified workers from English-speaking countries (Day 1-3). Thus, researchers rating English text should restrict their tasks to English-speaking countries, although Kennedy et al. (2020) find that many workers use Virtual Private Networks (VPNs) to take part in tasks restricted to those in the US.
+
+# 3.3 Evaluating Machine-Generated Text
+
+We now turn to AMT evaluation of machine-generated stories produced by the GPT-2 model described in subsection 3.1. Based on our previous experiments with reference texts, we select the "all qualifications" setting (i.e., workers from English-speaking countries, approval rate $>90\%$ , approved HITs $\geq 1000$ ) for all GPT-2 AMT tasks. We study
+
+11We also ran experiments with even stricter qualification filters (i.e., acceptance rate $\geq 99\%$ and at least 10,000 approved tasks), but this made no notable difference to the percentage of data being filtered out $(35\%)$ . This is most likely due to the fact that most requesters are reluctant to reject HITs regardless of quality, which results in an estimated $95\%$ of workers having an approval rate of $98\%$ or above (Matherly, 2019; Wessling et al., 2017).
+12There was no significant difference between grammar ratings collected from raters from non-English speaking countries and ratings collected on Day 2.
+
+two different conditions: (1) HITs contain a prompt and a GPT-2 generated text, and (2) HITs contain a prompt and both a human-written reference story as well as a GPT-2 generated story. In the latter case, we ask AMT workers to rate both texts on each of the four properties. Overall, we observe that workers cannot effectively distinguish between reference and model-generated stories when they are evaluated separately (in terms of average ratings), but that this distinction emerges clearly when they are presented with both types of stories in the same HIT.
+
+When presented only GPT-2 generated text, AMT worker ratings rate them similarly to reference texts, despite obviously worse quality: In our first experiment, we follow the protocol from our experiments with human-written reference stories, showing AMT workers a prompt and a model-generated story and asking them to rate it on the same attributes (grammar, coherence, relevance, and likability). The results of this evaluation are presented in the upper row of Table 2 along with the three sets of ratings of reference stories obtained with the same "all qualifications" setting from before (Days 1-3 in Table 1).
+
+Surprisingly, GPT-2 output is not consistently rated significantly lower than human-written text. For instance, workers in Day 2 rated human-written stories similarly to the GPT-2 generated stories in terms of grammar (M=3.86 vs. M=3.94) and coherence (M=3.92 vs. M=3.82), while workers in Day 3 rated human-written stories as similarly relevant to the prompt as GPT-2 output (M=3.46 vs. M=3.44). Depending on which reference day we compare the GPT-2 output to, GPT-2 is rated similarly to human-written stories in terms of all four properties, which indicates that this evaluation is uninformative; nevertheless, the majority of surveyed papers use exactly this task design to obtain ratings for model-generated output.
+
+Asking workers to rate both human-written and model-generated stories side-by-side improves ratings: We hypothesize that the previous result is due to scale calibration differences between the two settings: when repeatedly confronted with incoherent model-generated text, a worker may be more generous with their ratings compared to if they only see coherent human-written text. Thus, we explore whether their ratings can be better calibrated by asking them to rate both types of
+
+| Raters | Type of text | Grammar | Coherence | Relevance | Likability |
| MeanSTD | IAA% | MeanSTD | IAA% | MeanSTD | IAA% | MeanSTD | IAA% |
| AMT workers fail to effectively distinguish between human written and GPT-2 generated stories |
| AMT | Ref. (Day 1) | 4.000.92 | 0.2115.5 | 4.110.96 | 0.1416.5 | 3.711.26 | 0.2710 | 3.371.18 | 0.117.5 |
| AMT | Ref. (Day 2) | 3.860.92 | -0.0310.5 | 3.920.98 | -0.036.5 | 3.711.08 | 0.0211 | 3.730.97 | -0.048.5 |
| AMT | Ref. (Day 3) | 3.980.96 | 0.1811 | 4.050.94 | 0.1310.5 | 3.461.29 | 0.268 | 3.421.16 | 0.074.5 |
| AMT | GPT-2 | 3.940.93 | 0.1117.5 | 3.821.12 | 0.057.5 | 3.441.41 | 0.107 | 3.421.25 | 0.024.5 |
| AMT workers score GPT-2 lower when also presented with reference text |
| AMT | Reference | 3.830.99 | 0.1312.5 | 3.831.1 | 0.078 | 3.491.26 | 0.208 | 3.481.08 | 0.036.5 |
| AMT | GPT-2 | 3.820.90 | 0.1012 | 3.391.1 | 0.049.5 | 2.701.26 | 0.066.5 | 2.991.14 | -0.044 |
| Teachers rate GPT-2 generated stories lower than AMT workers |
| Teachers | Reference | 4.500.83 | 0.1935.5 | 4.380.91 | 0.1425 | 3.821.38 | 0.2516 | 3.691.30 | -0.015 |
| Teachers | GPT-2 | 4.560.62 | 0.0024.5 | 3.731.19 | 0.1713 | 2.541.49 | 0.5425.5 | 2.961.46 | -0.073 |
+
+Table 2: Comparison of AMT workers and expert teachers on both human and machine-generated text. Inter-annotator agreement (IAA) between the three raters is measured with Krippendorff's $\alpha$ as well as the percentage of stories for which all three raters exactly agreed on a rating (the latter is subscripted). Statistical significance for the relations between groups is provided in Appendix C and Appendix D.
+
+stories side-by-side, using the same qualification settings as for the other experiments. The results of this experiment are presented in the middle row of Table 2. Workers score GPT-2 generated stories significantly lower than reference stories on coherence (M=3.39 vs. M=3.83), relevance (M=2.70 vs. M=3.49), and likability (M=2.99 vs. M=3.48), which is in line with our expectations. Their ratings for grammar (M=3.82 vs. M=3.83) are similar for both types of text, which we also observe with expert teacher ratings in Section 4 and is expected since GPT-2's output is generally grammatical.
+
+# 4 Evaluation by expert teachers
+
+The experiments in the previous section demonstrate the unreliability of AMT ratings for open-ended text generation, even when qualifications are used to restrict the task to ostensibly reliable workers. In this section, we compare the ratings produced by AMT workers to those of expert raters, specifically a set of three English teachers, and discover significant deviations between the two groups. Though they rated both types of stories separately, their ratings clearly distinguish between human-written references and machine-generated stories. We also conducted post-task interviews with the teachers and organized a mediation session to discuss stories with high disagreement, observing that they reach consensus after discussion in about $80\%$ of cases.
+
+Recruiting English teachers: We choose English teachers as experts for our story generation task because they regularly evaluate student-written
+
+papers and are experienced at detecting both low-level grammatical mistakes as well as discourse-level issues with logical coherence. The three teachers were recruited from the authors' personal networks, and each of them either has a degree in teaching English as a Second Language or a CELTA certificate.[13] They were paid $125 each for participating in our experiments, which required them to rate the same 200 human-written stories and 200 GPT-2 generated stories on the same four properties as that of the AMT workers, given an identical task interface.[14]
+
+Unlike AMT workers, teachers rate reference stories higher than GPT-2 generated ones: We asked teachers to first rate the 200 reference stories, and then a week later to rate the GPT-2 generated stories. Just like the AMT workers, they were not told that the text in the second task was machine-generated. Importantly, we used the same set of teachers for both tasks, so they already had significant experience with the task when rating the machine-generated text (as opposed to using new AMT workers for each experiment).
+
+The results of this evaluation are presented in the last row of Table 2. Unsurprisingly, teachers rated human-written stories significantly higher than GPT-2 generated stories in terms of coherence (M=4.38 vs. M=3.73), relevance (M=3.82 vs. M=2.54), and likability (M=3.69 vs. M=2.96) (all
+
+$p$ 's $< 0.001$ . On the other hand, they rated human-written stories and GPT-2 generated stories as similar in terms of grammar (M=4.50 vs. M=4.56). Moreover, teachers' ratings of human-written stories are considerably higher than AMT ratings for all attributes except likability (M=3.69) which depending on the day was rated lower (MDay1=3.37) or higher (MDay2=3.73) by the AMT workers. Similarly, teachers' ratings of GPT-2 stories are lower than the ratings we obtained from AMT workers for coherence (M=3.73 vs. M=4.11), relevance (M=2.54 vs. M=3.71), and likability (M=2.96 vs. M=3.37).
+
+Teachers need to see many examples to properly calibrate their ratings: In post-task interviews, all teachers reported that it took them 10-20 stories on average to calibrate their ratings. Since most AMT workers complete only one to two HITs, they do not have similar time to get acquainted with the task; this may suggest that having a pre-task training phase can improve worker calibration.
+
+Coherence is difficult to rate for machine-generated text: The teachers unanimously report that while coherence is easy to rate for reference stories (since most of them are largely coherent), it is the most difficult property to rate for GPT-2 generated stories. Since they did not know that they were rating machine-generated text, they spent time trying to make sense of the author's possible intent in producing many of the strange artifacts and hallucinations common to output of neural language models (Holtzman et al., 2019). In contrast, relevance turned out to be the easiest property of machine-generated text for teachers to rate, which is expected as many of GPT-2's stories deviate very quickly from the prompt (see Figure 1).
+
+GPT-2 generated stories are much harder for teachers to rate overall: All teachers reported struggling more when rating GPT-2 stories, a fact reflected in their average rating time per story increasing significantly from 69.8 seconds to 87.3 seconds $(p < 0.05)$ . In contrast, the average rating time of AMT workers decreased from 135.3 seconds for human-written text (Day 1) to 91.5 seconds for GPT-2 text $(p < 0.05)^{15}$ . Teachers also reported having to recalibrate their scale when rating
+
+the GPT-2 generated stories, as the stories were significantly worse than the human-written text. Consequently, they suggested that it would be easier to calibrate their scale had the GPT-2 output been presented beside the human-written text, which supports the results from our joint rating task with AMT workers. Finally, the teachers suggested that creating a standardized rubric would greatly facilitate the rating process. This step is even more important as machine-generated text faces different issues than human-written text.
+
+**Resolving teacher disagreement:** One advantage of using human expert raters is that we can easily have them discuss examples on which they disagree. We arranged a mediation meeting between two of the three teachers to discuss 60 stories on which they showed the highest disagreement (3 attributes $\times$ 10 stories $\times$ 2 types, we excluded likability due to its subjective nature). In this meeting, they were first asked to rate the stories again, without being provided their previous rating. In about $20\%$ of cases, one of the teachers disagreed with their own previous rating due to honest lapses of judgment. Another common reason for disagreement was missing world knowledge (see Figure 1, right). One more reason for disagreement, a confusion about how to rate slang in terms of grammaticality. While the text was not correct in the view of the official grammar, it was appropriate for the prompt, so one teacher rated it high while the other rated it low. Overall, after discussing examples that they still disagreed on after re-rating, teachers were able to come to a consensus on $80\%$ of the stories; the remaining disagreements persisted due to individual differences in strictness. See Appendix C for details on the mediation meeting.
+
+Replicating the study on Upwork: We recognize that replicating our study is difficult without access to a network of English teachers. As such, we performed the same experiment using three certified teachers recruited on a freelance platform, Upwork.[16] The teachers were paid $175 for evaluating the same 200 human-written and 200 GPT-2 generated stories using the exact same setup as in subsection 3.1. It took approximately one week to collect the data (including break between rating human-written and GPT-2 generated stories). The results obtained via Upwork were comparable with the results obtained from the English teachers de
+
+scribed in this section, i.e. the Upwork teachers rated human-written stories higher for coherence, relevance, and likability than the GPT-2 generated stories (all $p$ 's $< 0.001$ ). Interestingly, their IAA was higher than the English teachers recruited from the authors' personal networks. The details of this experiment are provided in the Appendix B.
+
+# 5 Related Work
+
+Our work is related to previous studies of human evaluation of text quality as well as collecting judgments using Amazon Mechanical Turk.
+
+Human evaluation of text quality: Most previous studies on human evaluation concentrate on constrained generation domains, such as machine translation (Guzmán et al., 2015; Graham et al., 2017; Toral et al., 2018; Castilho, 2021) or summarization (Gillick and Liu, 2010; Iskender et al., 2020). Other studies evaluate very short, often one sentence long, outputs (Grundkiewicz et al., 2015; Mori et al., 2019; Khashabi et al., 2021).
+
+Even professional translators struggle when evaluating longer machine translated texts (Castilho, 2021). Creative texts, such as stories, are less constrained than translated texts, but researchers continue to employ crowd workers to evaluate creative texts, often without evaluating reference texts (see Section 2). Previous studies have asked workers to choose from (Mori et al., 2019) or distinguish between human-written and machine-generated texts (Garbacea et al., 2019; Ippolito et al., 2020; Clark et al., 2021).
+
+Data collection using AMT: Many previous works raise concerns about the reliability of data collected on AMT (Necka et al., 2016; Matherly, 2019; Ahler et al., 2020). Reluctance of requesters to reject HITs leads to positive bias in workers' qualifications (Matherly, 2019). Furthermore, a large number of responses are provided by small number of productive workers (Fort et al., 2011; Robinson et al., 2019). Researchers also report an increasing number of workers use VPNs to mask their location (Bauer et al., 2020) and contribute lower-quality data (Moss and Litman; Ahler et al., 2020). Hence, simple quality control measures, such as approval rate or the country of residence as suggested in (Berinsky et al., 2012), may not be sufficient to effectively filter workers who are spamming a task.
+
+# 6 Recommendations & Conclusion
+
+Our experiments show that evaluating open-ended generated text is an incredibly challenging task even for expert raters. While AMT is a convenient and affordable solution, we observe that high variance between workers, poor calibration, and cognitively-demanding tasks can lead researchers to draw misleading scientific conclusions (e.g., that human-written text is "worse" than GPT-2's). Simple fixes such as adding strict worker qualifications do not address the root of the problem. As such, we recommend future AMT evaluations implement additional quality control mechanisms (some of which require custom task setups on external servers) such as (1) filtering workers by observed time spent per HIT rather than WorkTimeInSeconds, (2) specifying a maximum number of items per worker, (3) employing a pre-task language proficiency test, and (4) providing training HITs to allow workers to calibrate their ratings. Furthermore, we show that researchers can improve rating calibration by presenting machine-generated text alongside human reference text. That said, expert raters such as linguists or language teachers should be used whenever possible as they have already been trained to evaluate written text, and it is not much more expensive (it cost us $144 to rate 200 stories with AMT vs. $187.50 with English teachers vs. $262.5 with Upwork.
+
+# 7 Ethical Considerations
+
+As with all research that makes use of human subjects, we must carefully reflect on our methodology to minimize the risk of harm to those we ask to evaluate open-ended texts. Specifically, texts from social media sites like Reddit may contain racist, sexist, and other forms of vulgar content. Additionally, neural language models like GPT-2, which have been trained on open domain text crawled from the web, have been shown to generate similarly offensive content. As such, we advocate adequately warning any humans who take part in open-ended text evaluation of the potential for such harms (as we did in our research).
+
+Additionally, crowd workers are frequently underpaid for their labor, which harms both the quality of the research, and more importantly, the ability of these crowd workers to earn an adequate living. As such, we report our hourly wage for both crowd workers and experts. We ensure that crowd workers earn at least $14 per hour by assuming 50-55
+
+seconds per HIT (though on average our crowd workers were paid substantially higher due to the low average time to completion on each HIT). Our experts averaged around $20 per hour (not counting mediation).
+
+# Acknowledgments
+
+We thank the reviewers for their insightful comments. We would also like to thank the UMass NLP group for the great advice on the draft of this paper. We are grateful to the English teachers recruited from Upwork and from the authors' personal network, as well as workers on AMT, for their help in the story evaluation. MK is supported by the Chan Zuckerberg Initiative under the project Scientific Knowledge Base Construction. NA and MI are supported by award IIS-1955567 from the National Science Foundation (NSF).
+
+# References
+
+Douglas J. Ahler, Carolyn E. Roush, and Gaurav Sood. 2020. Replication data for: "the micro-task market for lemons: Data quality on Amazon's Mechanical Turk".
+Nader Akoury, Shufan Wang, Josh Whiting, Stephen Hood, Nanyun Peng, and Mohit Iyyer. 2020. STORIUM: A Dataset and Evaluation Platform for Machine-in-the-Loop Story Generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6470–6484, Online. Association for Computational Linguistics.
+Milad Alshomary, Shahbaz Syed, Martin Potthast, and Henning Wachsmuth. 2020. Target inference in argument conclusion generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4334-4345, Online. Association for Computational Linguistics.
+Brian Bauer, Kristy L. Larsen, Nicole Caulfield, Domynic Elder, Sara Jordan, and Daniel Capron. 2020. Review of best practice recommendations for ensuring high quality data with amazon's mechanical turk.
+Adam J. Berinsky, Gregory A. Huber, and Gabriel S. Lenz. 2012. Evaluating online labor markets for experimental research: Amazon.com's mechanical turk. Political Analysis, 20(3):351-368.
+Antoine Bosselut, Asli Celikyilmaz, Xiaodong He, Jianfeng Gao, Po-Sen Huang, and Yejin Choi. 2018. Discourse-aware neural rewards for coherent text generation. 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 173-184, New Orleans, Louisiana. Association for Computational Linguistics.
+Faeze Brahman and Snigdha Chaturvedi. 2020. Modeling protagonist emotions for emotion-aware storytelling. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5277-5294, Online. Association for Computational Linguistics.
+D. Card, Peter Henderson, Urvashi Khandelwal, Robin Jia, Kyle Mahowald, and Dan Jurafsky. 2020. With little power comes great responsibility. In EMNLP.
+Sheila Castilho. 2021. Towards document-level human MT evaluation: On the issues of annotator agreement, effort and misevaluation. In Proceedings of the Workshop on Human Evaluation of NLP Systems (HumEval), pages 34-45, Online. Association for Computational Linguistics.
+Tuhin Chakrabarty, Debanjan Ghosh, Smaranda Muresan, and Nanyun Peng. 2020a. R^3: Reverse, retrieve, and rank for sarcasm generation with commonsense knowledge. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7976-7986, Online. Association for Computational Linguistics.
+Tuhin Chakrabarty, Smaranda Muresan, and Nanyun Peng. 2020b. Generating similes effortlessly like a pro: A style transfer approach for simile generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6455-6469, Online. Association for Computational Linguistics.
+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 and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 7282-7296, Online. Association for Computational Linguistics.
+Elizabeth Clark, Yangfeng Ji, and Noah A. Smith. 2018. Neural text generation in stories using entity representations as context. 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 2250-2260, New Orleans, Louisiana. Association for Computational Linguistics.
+Jacob Cohen. 1988. Statistical power analysis for the behavioral sciences. Routledge.
+Chris Donahue, Mina Lee, and Percy Liang. 2020. Enabling language models to fill in the blanks. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2492-2501, Online. Association for Computational Linguistics.
+
+Angela Fan, Mike Lewis, and Yann Dauphin. 2018. Hierarchical neural story generation. In Association for Computational Linguistics.
+Angela Fan, Mike Lewis, and Yann Dauphin. 2019. Strategies for structuring story generation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2650-2660, Florence, Italy. Association for Computational Linguistics.
+Zhiyuan Fang, Tejas Gokhale, Pratyay Banerjee, Chitta Baral, and Yezhou Yang. 2020. Video2Commonsense: Generating commonsense descriptions to enrich video captioning. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 840-860, Online. Association for Computational Linguistics.
+Karen Fort, Gilles Adda, and K. Bretonnel Cohen. 2011. Amazon mechanical turk: Gold mine or coal mine? Computational Linguistics, 37(2):413-420.
+Cristina Garbacea, Samuel Carton, Shiyan Yan, and Qiaozhu Mei. 2019. Judge the judges: A large-scale evaluation study of neural language models for online review generation. 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 3968-3981, Hong Kong, China. Association for Computational Linguistics.
+Dan Gillick and Yang Liu. 2010. Non-expert evaluation of summarization systems is risky. In Proceedings of the NAACL HLT 2010 Workshop on Creating Speech and Language Data with Amazon's Mechanical Turk, pages 148-151, Los Angeles. Association for Computational Linguistics.
+Seraphina Goldfarb-Tarrant, Tuhin Chakrabarty, Ralph Weischedel, and Nanyun Peng. 2020. Content planning for neural story generation with aristotelian rescoring. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4319-4338, Online. Association for Computational Linguistics.
+Philip John Gorinski and Mirella Lapata. 2018. What's this movie about? a joint neural network architecture for movie content analysis. 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 1770-1781, New Orleans, Louisiana. Association for Computational Linguistics.
+Tanya Goyal and Greg Durrett. 2020. Neural syntactic preordering for controlled paraphrase generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 238-252, Online. Association for Computational Linguistics.
+
+Yvette Graham, Timothy Baldwin, Alistair Moffat, and Justin Zobel. 2017. Can machine translation systems be evaluated by the crowd alone. *Natural Language Engineering*, 23(1):3-30.
+Roman Grundkiewicz, Marcin Junczys-Dowmunt, and Edward Gillian. 2015. Human evaluation of grammatical error correction systems. In EMNLP.
+Jian Guan, Fei Huang, Zhihao Zhao, Xiaoyan Zhu, and Minlie Huang. 2020. A knowledge-enhanced pretraining model for commonsense story generation. Transactions of the Association for Computational Linguistics, 8:93-108.
+Francisco Guzmán, Ahmed Abdelali, Irina Temnikova, Hassan Sajjad, and Stephan Vogel. 2015. How do humans evaluate machine translation. In Proceedings of the Tenth Workshop on Statistical Machine Translation. Association for Computational Linguistics.
+He He, Nanyun Peng, and Percy Liang. 2019. Pun generation with surprise. 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 1734-1744, Minneapolis, Minnesota. Association for Computational Linguistics.
+Allison Hegel, Sudha Rao, Asli Celikyilmaz, and Bill Dolan. 2020. Substance over Style: Document-Level Targeted Content Transfer. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6485-6504, Online. Association for Computational Linguistics.
+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.
+Ari Holtzman, Jan Buys, Maxwell Forbes, Antoine Bosselut, David Golub, and Yejin Choi. 2018. Learning to write with cooperative discriminators. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1638-1649, Melbourne, Australia. Association for Computational Linguistics.
+David M. Howcroft, Anya Belz, Miruna-Adriana Clinciu, Dimitra Gkatzia, Sadid A. Hasan, Saad Mahamood, Simon Mille, Emiel van Miltenburg, Sashank Santhanam, and Verena Rieser. 2020. Twenty years of confusion in human evaluation: NLG needs evaluation sheets and standardised definitions. In Proceedings of the 13th International Conference on Natural Language Generation, pages 169–182, Dublin, Ireland. Association for Computational Linguistics.
+Ting-Yao Hsu, Chieh-Yang Huang, Yen-Chia Hsu, and Ting-Hao Huang. 2019. Visual story post-editing. In Proceedings of the 57th Annual Meeting of the
+
+Association for Computational Linguistics, pages 6581-6586, Florence, Italy. Association for Computational Linguistics.
+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, Online. Association for Computational Linguistics.
+Daphne Ippolito, David Grangier, Chris Callison-Burch, and Douglas Eck. 2019. Unsupervised hierarchical story infilling. In Proceedings of the First Workshop on Narrative Understanding, pages 37-43, Minneapolis, Minnesota. Association for Computational Linguistics.
+Neslihan Iskender, Tim Polzehl, and Sebastian Möller. 2020. Best practices for crowd-based evaluation of German summarization: Comparing crowd, expert and automatic evaluation. In Proceedings of the First Workshop on Evaluation and Comparison of NLP Systems, pages 164-175, Online. Association for Computational Linguistics.
+Chao Jiang, Mounica Maddela, Wuwei Lan, Yang Zhong, and Wei Xu. 2020. Neural CRF model for sentence alignment in text simplification. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7943-7960, Online. Association for Computational Linguistics.
+Ryan Kennedy, Scott Clifford, Tyler Burleigh, Philip D. Waggoner, Ryan Jewell, and Nicholas J. G. Winter. 2020. The shape of and solutions to the mturk quality crisis. Political Science Research and Methods, 8(4):614-629.
+Daniel Khashabi, Gabriel Stanovsky, Jonathan Bragg, Nicholas Lourie, Jungo Kasai, Yejin Choi, Noah A. Smith, and Daniel S. Weld. 2021. Genie: A leaderboard for human-in-the-loop evaluation of text generation.
+Kalpesh Krishna, John Wieting, and Mohit Iyyer. 2020. Reformulating unsupervised style transfer as paraphrase generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 737-762, Online. Association for Computational Linguistics.
+Reno Kriz, João Sedoc, Marianna Apidianaki, Carolina Zheng, Gaurav Kumar, Eleni Miltsakaki, and Chris Callison-Burch. 2019. Complexity-weighted loss and diverse reranking for sentence simplification. 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 3137-3147, Minneapolis, Minnesota. Association for Computational Linguistics.
+
+Juncen Li, Robin Jia, He He, and Percy Liang. 2018. Delete, retrieve, generate: a simple approach to sentiment and style transfer. 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 1865-1874, New Orleans, Louisiana. Association for Computational Linguistics.
+Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In ACL.
+Kevin Lin, Ming-Yu Liu, Ming-Ting Sun, and Jan Kautz. 2020. Learning to generate multiple style transfer outputs for an input sentence. In Proceedings of the Fourth Workshop on Neural Generation and Translation, pages 10-23, Online. Association for Computational Linguistics.
+Hui Liu, Qingyu Yin, and William Yang Wang. 2019. Towards explainable NLP: A generative explanation framework for text classification. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5570-5581, Florence, Italy. Association for Computational Linguistics.
+Jonathan Mallinson, Rico Sennrich, and Mirella Lapata. 2020. Zero-shot crosslingual sentence simplification. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5109-5126, Online. Association for Computational Linguistics.
+Huanru Henry Mao, Bodhisattwa Prasad Majumder, Julian McAuley, and Garrison Cottrell. 2019. Improving neural story generation by targeted common sense grounding. 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 5988-5993, Hong Kong, China. Association for Computational Linguistics.
+Pedro Henrique Martins, Zita Marinho, and Andre F. T. Martins. 2020. Sparse text generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4252-4273, Online. Association for Computational Linguistics.
+Ted Matherly. 2019. A panel for lemons? positivity bias, reputation systems and data quality on MTurk. European Journal of Marketing, 53(2):195-223.
+Remi Mir, Bjarke Felbo, Nick Obradovich, and Iyad Rahwan. 2019. Evaluating style transfer for text. 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 495-504, Minneapolis, Minnesota. Association for Computational Linguistics.
+Yatri Modi and Natalie Parde. 2019. The steep road to happily ever after: an analysis of current visual
+
+storytelling models. In Proceedings of the Second Workshop on Shortcomings in Vision and Language, pages 47-57, Minneapolis, Minnesota. Association for Computational Linguistics.
+Yusuke Mori, Hiroaki Yamane, Yusuke Mukuta, and Tatsuya Harada. 2019. Toward a better story end: Collecting human evaluation with reasons. In Proceedings of the 12th International Conference on Natural Language Generation, pages 383-390, Tokyo, Japan. Association for Computational Linguistics.
+Aaron Moss and Leib Litman. After the bot scare: Understanding what's been happening with data collection on mturk and how to stop it. Accessed on 15.04.2021.
+Elizabeth A. Necka, Stephanie Cacioppo, Greg J. Norman, and John T. Cacioppo. 2016. Measuring the prevalence of problematic respondent behaviors among MTurk, campus, and community participants. PLOS ONE, 11(6):e0157732.
+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.
+Baolin Peng, Xiujun Li, Lihong Li, Jianfeng Gao, Asli Celikyilmaz, Sungjin Lee, and Kam-Fai Wong. 2017. Composite task-completion dialogue policy learning via hierarchical deep reinforcement learning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics.
+Nanyun Peng, Marjan Ghazvininejad, Jonathan May, and Kevin Knight. 2018a. Towards controllable story generation. In Proceedings of the First Workshop on Storytelling. Association for Computational Linguistics.
+Nanyun Peng, Marjan Ghazvininejad, Jonathan May, and Kevin Knight. 2018b. Towards controllable story generation. In Proceedings of the First Workshop on Storytelling, pages 43-49, New Orleans, Louisiana. Association for Computational Linguistics.
+Pouya Pezeshkpour, Liyan Chen, and Sameer Singh. 2018. Embedding multimodal relational data for knowledge base completion. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3208-3218, Brussels, Belgium. Association for Computational Linguistics.
+Lianhui Qin, Antoine Bosselut, Ari Holtzman, Chandra Bhagavatula, Elizabeth Clark, and Yejin Choi. 2019. Counterfactual story reasoning and generation. 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 5043-5053, Hong Kong, China. Association for Computational Linguistics.
+Lianhui Qin, Vered Shwartz, Peter West, Chandra Bhagavatula, Jena D. Hwang, Ronan Le Bras, Antoine Bosselut, and Yejin Choi. 2020. Back to the future: Unsupervised backprop-based decoding for counterfactual and abductive commonsense reasoning. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 794-805, Online. Association for Computational Linguistics.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners.
+Sudha Rao and Joel Tetreault. 2018. Dear sir or madam, may I introduce the GYAFC dataset: Corpus, benchmarks and metrics for formality style transfer. 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 129-140, New Orleans, Louisiana. Association for Computational Linguistics.
+Hannah Rashkin, Asli Celikyilmaz, Yejin Choi, and Jianfeng Gao. 2020. PlotMachines: Outline-conditioned generation with dynamic plot state tracking. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4274-4295, Online. Association for Computational Linguistics.
+Ehud Reiter. 2018. A structured review of the validity of BLEU. Computational Linguistics, 44(3):393-401.
+Jonathan Robinson, Cheskie Rosenzweig, Aaron J. Moss, and Leib Litman. 2019. Tapped out or barely tapped? recommendations for how to harness the vast and largely unused potential of the mechanical turk participant pool. PLOS ONE, 14(12):e0226394.
+Abigail See, Aneesh Pappu, Rohun Saxena, Akhila Yerukola, and Christopher D Manning. 2019. Do massively pretrained language models make better storytellers? In Conference on Computational Natural Language Learning.
+Dinghan Shen, Asli Celikyilmaz, Yizhe Zhang, Liquin Chen, Xin Wang, Jianfeng Gao, and Lawrence Carin. 2019. Towards generating long and coherent text with multi-level latent variable models. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2079-2089, Florence, Italy. Association for Computational Linguistics.
+Akhilesh Sudhakar, Bhargav Upadhyay, and Arjun Maheswaran. 2019. "transforming" delete, retrieve,
+
+generate approach for controlled text style transfer. 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 3269-3279, Hong Kong, China. Association for Computational Linguistics.
+Antonio Toral, Sheila Castilho, Ke Hu, and Andy Way. 2018. Attaining the unattainable? reassessing claims of human parity in neural machine translation.
+Lifu Tu, Xiaoan Ding, Dong Yu, and Kevin Gimpel. 2019. Generating diverse story continuations with controllable semantics. In Proceedings of the 3rd Workshop on Neural Generation and Translation, pages 44-58, Hong Kong. Association for Computational Linguistics.
+Chris van der Lee, Albert Gatt, Emiel van Miltenburg, and Emiel Krahmer. 2021. Human evaluation of automatically generated text: Current trends and best practice guidelines. Computer Speech & Language, 67:101151.
+K. Wessling, J. Huber, and O. Netzer. 2017. Mturk character misrepresentation: Assessment and solutions. Journal of Consumer Research, 44:211-230.
+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.
+Peng Xu, Mostofa Patwary, Mohammad Shoeybi, Raul Puri, Pascale Fung, Anima Anandkumar, and Bryan Catanzaro. 2020. MEGATRON-CNTRL: Controllable story generation with external knowledge using large-scale language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2831-2845, Online. Association for Computational Linguistics.
+Wei Yang, Yuqing Xie, Aileen Lin, Xingyu Li, Luchen Tan, Kun Xiong, Ming Li, and Jimmy Lin. 2019. End-to-end open-domain question answering with BERTserini. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations), pages 72-77, Minneapolis, Minnesota. Association for Computational Linguistics.
+Zhiwei Yu, Jiwei Tan, and Xiaojun Wan. 2018. A neural approach to pun generation. In Proceedings of the 56th Annual Meeting of the Association for
+
+Computational Linguistics (Volume 1: Long Papers), pages 1650-1660, Melbourne, Australia. Association for Computational Linguistics.
+Zhiwei Yu and Xiaojun Wan. 2019. How to avoid sentences spelling boring? towards a neural approach to unsupervised metaphor generation. 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 861-871, Minneapolis, Minnesota. Association for Computational Linguistics.
+Zhiwei Yu, Hongyu Zang, and Xiaojun Wan. 2020. Routing enforced generative model for recipe generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 3797-3806, Online. Association for Computational Linguistics.
+Hongyu Zang, Zhiwei Yu, and Xiaojun Wan. 2019. Automated chess commentator powered by neural chess engine. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5952-5961, Florence, Italy. Association for Computational Linguistics.
+Rui Zhang and Joel Tetreault. 2019. This email could save your life: Introducing the task of email subject line generation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 446-456, Florence, Italy. Association for Computational Linguistics.
+A. Celikyilmaz, Elizabeth Clark, and Jianfeng Gao. 2020. Evaluation of text generation: A survey. ArXiv, abs/2006.14799.
+
+# Qualifications
+
+| Approval Rate | 90% (4) | 95% (3) | 97% (1) | 99% (1) |
| Accepted HITs | 500 (1) | 1000 (5) | 5000 (1) | |
| English | Resident (6) | Native Speaker (4) | Self-reported (1) | |
| Other | Complete all ratings (1) | Passed quality check (1) | |
| Payment | $0.05 - $2 per HIT (8) | $12 - $20 per hour (2) |
| Number of Items | < 100 items (9) | 100 items (14) | > 100 items (20) | not reported (5) |
| Number of Raters | < 3 raters (3) | 3 raters (16) | 5 raters (13) | > 5 raters (3) |
| Likert Scale | 3-point (4) | 4-point (3) | 5-point (24) | 6-point (1) |
| Ranking Task | two texts (19) | more texts (4) | | |
| Text Length | sentence (28) | paragraph (21) | | |
+
+Table A1: Results of the survey from Section 2. Numbers in brackets refer to the number of papers/experiments which employed the given measure.
+
+# B Collecting Ratings on Upwork
+
+# A Questions Used for the Survey
+
+The paper survey described in Section 2 included the following questions:
+
+- type of the task
+- length of rated text
+- rated attributes
+rating scale
+- labels used for ratings
+- definitions of each attribute
+- instructions provided to raters
+- qualifications and quality control measures employed
+number of rated items
+number of rated systems
+number of raters per item
+- inclusion of ground truth
+- monetary compensation
+
+We also hired three teachers using the freelancing platform Upwork1. The teachers were paid $175 to evaluate the same 200 human-written stories and 200 GPT-2 generated stories. They were asked to perform the ratings on the AMT platform in order to use the same interface as workers on AMT. Similarly to the teachers recruited from the authors' personal network, the teachers recruited on Upwork were asked to rate the 200 human-written stories first and then, after a few days break, provide the ratings for the GPT-2 generated stories. Furthermore, Upwork teachers also held TEFL,2 TESOL,3 or CELTA13 certificates. Table A3 shows mean ratings and agreement for the data collected on Upwork. Similarly to the results described in Section 4 and summarized in Table A5, the average scores for coherence, relevance, and likability are higher for the human-written stories than for the GPT-2 generated stories (see Table A4).
+
+| Authors | Year | Title | Venue |
| Akoury et al. | 2020 | STORIUM: A Dataset and Evaluation Platform for Machine-in-the-Loop Story Generation | EMNLP |
| Alshomary et al. | 2020 | Target Inference in Argument Conclusion Generation | ACL |
| Bosselut et al. | 2018 | Discourse-Aware Neural Rewards for Coherent Text Generation | EMNLP |
| Brahman and Chaturvedi | 2020 | Modeling Protagonist Emotions for Emotion-Aware Storytelling | EMNLP |
| Chakrabarty et al. | 2020b | Generating similes effortlessly like a Pro: A Style Transfer Approach for Simile Generation | EMNLP |
| Chakrabarty et al. | 2020a | R3: Reverse, Retrieve, and Rank for Sarcasm Generation with Commonsense Knowledge | ACL |
| Clark et al. | 2018 | Neural Text Generation in Stories Using Entity Representations as Context | NAACL |
| Donahue et al. | 2020 | Enabling Language Models to Fill in the Blanks | ACL |
| Fan et al. | 2018 | Hierarchical Neural Story Generation | ACL |
| Fang et al. | 2020 | Video2Commonsense: Generating Commonsense Descriptions to Enrich Video Captioning | EMNLP |
| Goldfarb-Tarrant et al. | 2020 | Content Planning for Neural Story Generation with Aristotelian Rescoring | EMNLP |
| Gorinski and Lapata | 2018 | What's this Movie about? A Joint Neural Network Architecture for Movie Content Analysis | NAACL |
| Goyal and Durrett | 2020 | Neural Syntactic Preordering for Controlled Paraphrase Generation | ACL |
| He et al. | 2019 | Pun Generation with Surprise | NAACL |
| Hegel et al. | 2020 | Substance over Style: Document-Level Targeted Content Transfer | EMNLP |
| Holtzman et al. | 2018 | Learning to Write with Cooperative Discriminators | ACL |
| Hsu et al. | 2019 | Visual Story Post-Editing | ACL |
| Ippolito et al. | 2019 | Unsupervised Hierarchical Story Infilling | NAACL |
| Jiang et al. | 2020 | Neural CRF Model for Sentence Alignment in Text Simplification | ACL |
| Krishna et al. | 2020 | Reformulating Unsupervised Style Transfer as Paraphrase Generation | EMNLP |
| Kriz et al. | 2019 | Complexity-Weighted Loss and Diverse Reranking for Sentence Simplification | NAACL |
| Li et al. | 2018 | Delete, Retrieve, Generate: A Simple Approach to Sentiment and Style Transfer | NAACL |
| Lin et al. | 2020 | Learning to Generate Multiple Style Transfer Outputs for an Input Sentence | ACL |
| Liu et al. | 2019 | Towards Explainable NLP: A Generative Explanation Framework for Text Classification | ACL |
| Mallinson et al. | 2020 | Zero-Shot Crosslingual Sentence Simplification | EMNLP |
| Martins et al. | 2020 | Sparse Text Generation | EMNLP |
| Mir et al. | 2019 | Evaluating Style Transfer for Text | NAACL |
| Peng et al. | 2018b | Towards Controllable Story Generation | NAACL |
| Pezeshkpour et al. | 2018 | Embedding Multimodal Relational Data for Knowledge Base Completion | EMNLP |
| Qin et al. | 2020 | Embedding Multimodal Relational Data for Knowledge Base Completion | EMNLP |
| Qin et al. | 2019 | Counterfactual Story Reasoning and Generation | EMNLP |
| Rao and Tetreault | 2018 | Dear Sir or Madam, May I Introduce the GYAFC Dataset: Corpus, Benchmarks and Metrics for Formality Style Transfer | NAACL |
| Rashkin et al. | 2020 | PLOT MACHINES: Outline-Conditioned Generation with Dynamic Plot State Tracking | EMNLP |
| Shen et al. | 2019 | Towards Generating Long and Coherent Text with Multi-Level Latent Variable Models | ACL |
| Sudhakar et al. | 2019 | “Transforming” Delete, Retrieve, Generate Approach for Controlled Text Style Transfer | EMNLP |
| Tu et al. | 2019 | Generating Diverse Story Continuations with Controllable Semantics | EMNLP |
| Tu et al. | 2019 | Can Humor Prediction Datasets be used for Humor Generation? Humorous Headline Generation via Style Transfer | ACL |
| Xu et al. | 2020 | MEGATRON - CNTRL : Controllable Story Generation with External Knowledge Using Large-Scale Language Models | EMNLP |
| Yang et al. | 2019 | An End-to-End Generative Architecture for Paraphrase Generation | EMNLP |
| Modi and Parde | 2019 | The Steep Road to Happily Ever After: An Analysis of Current Visual Storytelling Models | NAACL |
| Yu and Wan | 2019 | How to Avoid Sentences Spelling Boring? Towards a Neural Approach to Unsupervised Metaphor Generation | NAACL |
| Yu et al. | 2018 | A Neural Approach to Pun Generation | ACL |
| Yu et al. | 2020 | Routing Enforced Generative Model for Recipe Generation | EMNLP |
| Zhang and Tetreault | 2019 | This Email Could Save Your Life: Introducing the Task of Email Subject Line Generation | ACL |
| Zang et al. | 2019 | Automated Chess Commentator Powered by Neural Chess Engine | ACL |
+
+Table A2: List of Surveyed Papers.
+
+| Experiment description | Grammar | Coherence | Relevance | Likability |
| MeanSTD | IAA% | MeanSTD | IAA% | MeanSTD | IAA% | MeanSTD | IAA% |
| Reference | 4.280.78 | 0.2926 | 4.550.66 | 0.1130.5 | 4.250.88 | 0.4926.4 | 4.021.16 | 0.0114.5 |
| GPT-2 | 4.250.82 | 0.1219 | 3.990.98 | 0.0612.5 | 3.021.53 | 0.255 | 3.681.15 | 0.0510.5 |
+
+Table A3: Ratings of human-written reference stories and GPT-2 generated stories collected on Upwork. Inter-annotator agreement (IAA) between the three raters is measured with Krippendorff's $\alpha$ well as the percentage of stories for which all three raters exactly agreed on a rating (the latter is subscripted)
+
+ | mean (human) | mean (GPT-2) | difference | 95% CI lower | 95% CI upper | t | df | p-val |
| grammar | 4.28 | 4.25 | 0.03 | -0.06 | 0.12 | 0.72 | 1194.9 | 0.47 |
| coherence | 4.55 | 3.99 | 0.56 | 0.46 | 0.65 | 11.46 | 1044.3 | <0.001 |
| relevance | 4.02 | 3.02 | 1.00 | 0.85 | 1.15 | 12.82 | 1103.8 | <0.001 |
| likability | 4.23 | 3.83 | 0.40 | 0.30 | 0.53 | 7.24 | 1143.4 | <0.001 |
+
+Table A4: Welch's $t$ -test for ratings collected on Upwork (human-written stories vs GPT-2 generated stories). Human-written stories were rated higher on coherence, relevance, and likability than GPT-2 generated stories. These results are similar to the one obtained from English teachers described in Section 4.
+
+# C Details on Post-rating Interviews
+
+Two mediation meetings were organized with two of the three teachers (due to availability) over Zoom 4. The teachers were asked to reevaluate 60 stories on which they showed disagreement (3 attributes $\times$ 10 stories $\times$ 2 types; likability was excluded due to its subjective nature). Each meeting took approximately 2h (including a short break) and was led by one of the authors. The teachers were shown one story at a time and were asked to reevaluate it on the given attribute. In about $20\%$ of the cases, the teachers agreed with each other, suggesting that the previous disagreement was due to honest lapses of judgment. As for the cases where disagreement occurred, each was asked to provide a justification for their ratings. Often hearing the other party's argument enabled them to see the text from a different perspective and understand the ratings of the other person. This process often resulted in them adjusting their own ratings. Common reasons for disagreement which could be resolved during the mediation meeting included: world knowledge, difference in understanding of the prompt and its relation to the text (e.g., prompt enforcing specific style), difference in the way they treated author's comments which were sometimes present at the beginning of the story, and rationalizing connections between the sentences.
+
+After each batch, consisting of ratings of both human-written stories and GPT-2 generated stories, each of the three teachers took part in a short one-on-one interview ( $\sim 10\mathrm{min}$ each). They were asked the following questions:
+
+1. How long did it take you to calibrate your ratings?
+2. Explain in more detail how you rated coherence/grammar/likability/relevance? What was the process. Did you have to reread the text?
+3. How did you calibrate the ratings for coherence/grammar/likability/relevance? What constituted a 5? What about a 1?
+4. How often did you take breaks?
+5. Which attribute was the easiest to calibrate? Which was the most difficult?
+6. Any other comments or suggestions?
+
+Additionally, after the second batch of GPT-2 stories, the teachers were also asked: (1) which batch was better written, (2) which batch included more computer generated stories and to what extent, (3) whether they had to recalibrate their ratings, and (4) whether they would prefer to see both batches at the same time.
+
+# D Statistical Analysis
+
+ | mean (human) | mean (GPT-2) | difference | 95% CI lower | 95% CI upper | t | df | p-val |
| grammar | 4.50 | 4.55 | 0.05 | -0.14 | 0.03 | -1.27 | 1111.7 | 0.21 |
| coherence | 4.38 | 3.73 | 0.65 | 0.53 | 0.77 | 10.63 | 1119.6 | <0.001 |
| relevance | 3.82 | 2.54 | 1.28 | 1.12 | 1.44 | 15.45 | 1190.7 | <0.001 |
| likability | 3.69 | 2.96 | 0.73 | 0.57 | 0.89 | 9.16 | 1182 | <0.001 |
+
+Table A5: Welch's $t$ -test for ratings collected in the experiment described in Section 4 (teachers' ratings). Human-written stories were rated higher for coherence, relevance, and likability than GPT-2 generated stories.
+
+# Please Rate the Story Fragment
+
+The goal of this task is to rate story fragments on four criteria.
+
+NOTE: Please take the time to fully read and understand the story fragment. We will reject submissions from workers that are clearly spamming the task.
+
+# Story Fragment
+
+The night before came as a shock for Oren, he was always a conscientious child. It was a necessary skill of a new master, an inherent capability to make the world a better place. But no, today, the day he brought his sister to his cooking school was the first time Oren had been shocked out of a small calm. He looked over at his sister in the small room, who was idly flipping through the magazine he had brought with him, and then back to the breakfast. It took all his willpower to stay calm, he could tell from the way the noodles he was looking at were slathered in gherkin and he felt the freshness of the rice. He shook his head in disbelief, his stomach began to churn and he was too exhausted to react, he was just preparing to go to bed.
+
+1. How grammatically correct is the text of the story fragment? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+2. How well do the sentences in the story fragment fit together? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+3. How enjoyable do you find the story fragment? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+4. Now read the PROMPT based on which the story fragment was written.
+
+PROMPT: After brushing your teeth in the morning you go downstairs to fry an egg, but when you try the frying pan buzzes at you and text appears reading, "level 18 cooking required to use object".
+
+How relevant is the story fragment to the prompt? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+Figure A1: AMT interface for evaluation of one story.
+
+ | Df | Sum Sq | Mean Sq | F value | Pr(>F) | ηp2 |
| Group | 3 | 13.63 | 4.54 | 4.90 | 0.002 | 0.01 |
| Residuals | 2396 | 2223.51 | 0.93 | | | |
+
+Table A6: One-way ANOVA investigating the effect of group (Day 1, Day 2, Day 3, and workers from non-English-speaking countries) on the ratings of grammar of the reference texts. Partial eta squared $(\eta_p^2)$ is provided for the effect size $(\eta_p^2 = 0.01$ indicates small effect size; $\eta_p^2 = 0.06$ indicates medium effect size; $\eta_p^2 = 0.14$ indicates large effect size (Cohen, 1988)).
+
+ | Day 1 | Day 2 | Day 3 |
| Day 2 | 0.08 | | |
| Day 3 | 1.00 | 0.20 | |
| NNS | 0.01 | 1.00 | 0.03 |
+
+Table A7: Pairwise post-hoc test with Bonferroni adjustment for the ratings of grammar between Day 1, Day 2, Day 3, and non-English speaking countries (NNS). The numbers provided in the table are $p$ -values for the given pairwise comparison. Grammar ratings provided by the workers from non-English speaking countries are significantly different from ratings provided by the workers from English-speaking countries on Day 1 and Day 35
+
+ | Df | Sum Sq | Mean Sq | F value | Pr(>F) | ηp2 |
| Group | 3 | 161.28 | 53.76 | 51.35 | <0.001 | 0.06 |
| Residuals | 2396 | 2508.21 | 1.05 | | | |
+
+Table A8: One-way ANOVA investigating the effect of group (Day 1, Day 2, Day 3, and workers from non-English-speaking countries) on the ratings of coherence of the reference texts. Partial eta squared $(\eta_p^2)$ is provided for the effect size $(\eta_p^2 = 0.01$ indicates small effect size; $\eta_p^2 = 0.06$ indicates medium effect size; $\eta_p^2 = 0.14$ indicates large effect size (Cohen, 1988)).
+
+# Please Rate the Story Fragment 1
+
+The goal of this task is to rate story fragments on four criteria.
+
+NOTE: Please take the time to fully read and understand the story fragment. We will reject submissions from workers that are clearly spamming the task.
+
+# Story Fragment 1
+
+"Man, Clark? You've never been the greatest detective, but do I even need to tell you this? The Invaders might be all talk and no walk, but the Jackal Boy has the sense of an eagle to stick to his arse." Clark was about to say something, but he didn't want to risk it. He didn't like it when people were talking about him in such a nice light. He wasn't about to go walking into someone's bar. He certainly wasn't about to try to convince himself that the local kids were going crazy. * "Psh, psh, this doesn't feel right. I don't want to stick my nose where you don't want to smell it, Gordon. You shouldn't say that about yourself. All of you." * He stared at Gordon, dumbfounded. This wasn't Gordon's first rodeo, this was something new.
+
+1. How grammatically correct is the text of the story fragment 1 ? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 01 02 03 04 05 (highest)
+
+2. How well do the sentences in the story fragment 1 fit together? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+3. How enjoyable do you find the story fragment 1? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+4. Now read the PROMPT based on which the story fragment 1 was written.
+
+h How relevant is the story fragment 1 to the prompt? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+# Please Rate the Story Fragment 2
+
+The goal of this task is to rate story fragments on four criteria.
+
+NOTE: Please take the time to fully read and understand the story fragment. We will reject submissions from workers that are clearly spamming the task.
+
+# Story Fragment 2
+
+He burst through the door like he owned the place. Silly, really, even I only "sorta" own her. I glanced across the console, and Clara caught my eye "Oi," called Clara. I scowled at him (scowling has actually become rather easy lately) as he turned around. He was still wearing those stupid round spectacles. It was early in his career, then. He scanned the room quickly, processing his surroundings. He didn't seem surprised by the interior dimensions, at least. He loosened his tie, dropping the coat he'd been wearing. "What is this? Some sort of trap?" He looked tense, ready to strike. "Oh, that's lovely, isn't it." I said with a sarcastic chuckle, smirking at Clara. "You burst in here and then 'you're' the one who's angry. How d'you think we feel, hmm? Whatever he'd been expecting, it wasn't that.
+
+1. How grammatically correct is the text of the story fragment 2 ? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+2. How well do the sentences in the story fragment 2 fit together? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+3. How enjoyable do you find the story fragment 2 ? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+4. Now read the PROMPT based on which the story fragment 2 was written.
+
+PROMPT: With the earth currently under attack by aliens, Clark Kent searches for a place to change into his super suit. He decides to use the blue police public call box standing curiously in the middle of the street.
+
+How relevant is the story fragment 2 to the prompt? (on a scale of 1-5, with 1 being the lowest)
+
+(lowest) 1 2 3 4 5 (highest)
+
+Submit
+
+Figure A2: AMT interface for evaluation of both types of stories (GPT-2 and human reference).
+
+ | Day 1 | Day 2 | Day 3 |
| Day 2 | 1.00 | | |
| Day 3 | <0.001 | <0.001 | |
| NNS | <0.001 | <0.001 | 0.02 |
+
+Table A9: Pairwise post hoc test with Bonferroni adjustment for the ratings of coherence between Day 1, Day 2, Day 3, and non-English speaking countries (NNS). The numbers provided in the table are $p$ -values for the given pairwise comparison. Ratings of coherence provided by raters from non-English speaking countries are significantly different from ratings of workers from English-speaking countries. Furthermore, there are some difference between Day 1, Day 2, and Day 2.
+
+ | Df | Sum Sq | Mean Sq | F value | Pr(>F) | ηp2 |
| Group | 3 | 89.99 | 30.00 | 19.92 | <0.001 | 0.02 |
| Residuals | 2396 | 3607.85 | 1.51 | | | |
+
+Table A10: One-way ANOVA investigating the effect of group (Day 1, Day 2, Day 3, and workers from non-English-speaking countries) on the ratings of relevance of the reference texts. Partial eta squared $(\eta_p^2)$ is provided for the effect size $(\eta_p^2 = 0.01$ indicates small effect size; $\eta_p^2 = 0.06$ indicates medium effect size; $\eta_p^2 = 0.14$ indicates large effect size (Cohen, 1988)).
+
+ | Day 1 | Day 2 | Day 3 |
| Day 2 | 0.01 | | |
| Day 3 | 1.00 | 0.14 | |
| NNS | <0.001 | <0.001 | <0.001 |
+
+Table A11: Pairwise post hoc test with Bonferroni adjustment for the ratings of relevance between Day 1, Day 2, Day 3, and non-English speaking countries (NNS). The numbers provided in the table are $p$ -values for the given pairwise comparison. Ratings obtained from workers from non-English speaking countries differ significantly from ratings obtained from workers from English-speaking countries on Day 1, Day 2, and Day 3. Furthermore, there is a significant difference between ratings collected on Day 1 and Day 2.
+
+ | Df | Sum Sq | Mean Sq | F value | Pr(>F) | ηp2 |
| Group | 3 | 62.70 | 20.90 | 15.89 | <0.001 | 0.02 |
| Residuals | 2396 | 3151.22 | 1.32 | | | |
+
+Table A12: One-way ANOVA investigating the effect of group (Day 1, Day 2, Day 3, and workers from non-English-speaking countries) on the ratings of likability of the reference texts. Partial eta squared $(\eta_p^2)$ is provided for the effect size $(\eta_p^2 = 0.01$ indicates small effect size; $\eta_p^2 = 0.06$ indicates medium effect size; $\eta_p^2 = 0.14$ indicates large effect size (Cohen, 1988)).
+
+ | Day 1 | Day 2 | Day 3 |
| Day 2 | <0.001 | | |
| Day 3 | 1.00 | <0.001 | |
| NNS | 1.00 | <0.001 | 0.75 |
+
+Table A13: Pairwise post hoc test with Bonferroni adjustment for the ratings of likability between Day 1, Day 2, Day 3, and non-English speaking countries (NNS). The numbers provided in the table are $p$ -values for the given pairwise comparison. Ratings provided by workers from non-English speaking countries differ significantly from ratings obtained from workers from English-speaking countries on Day 2. Furthermore, there are significant differences between ratings obtained on Day 1 and Day 2, as well as between ratings obtained on Day 2 and Day 3.
+
+ | mean (human) | mean (GPT-2) | difference | 95% CI lower | 95% CI upper | t | df | p-val |
| grammar | 4.00 | 3.94 | 0.06 | -0.05 | 0.16 | 1.06 | 1197.9 | 0.29 |
| coherence | 4.11 | 3.82 | 0.29 | 0.18 | 0.42 | 4.97 | 1169.1 | <0.001 |
| relevance | 3.71 | 3.44 | 0.27 | 0.12 | 0.43 | 3.54 | 1184.7 | <0.001 |
| likability | 3.37 | 3.42 | 0.05 | -0.18 | 0.09 | -0.64 | 1194.5 | 0.52 |
+
+Table A14: Welch's $t$ -test on ratings collected on AMT for human-written stories (Day 1) and GPT-2 generated stories. Human-written stories are being rated higher for coherence and more relevance than GPT-2 generated stories ( $p < 0.05$ ).
+
+ | mean (human) | mean (GPT-2) | difference | 95% CI lower | 95% CI upper | t | df | p-val |
| grammar | 3.86 | 3.94 | 0.08 | -0.19 | 0.03 | -1.50 | 1197.9 | 0.14 |
| coherence | 3.92 | 3.82 | 0.10 | -0.02 | 0.23 | 1.72 | 1176.5 | 0.09 |
| relevance | 3.71 | 3.44 | 0.27 | 0.13 | 0.41 | 3.69 | 1123.5 | <0.001 |
| likability | 3.73 | 3.42 | 0.31 | 0.19 | 0.44 | 4.89 | 1128.9 | <0.001 |
+
+Table A15: Welch's $t$ -test on ratings collected on AMT for human-written stories (Day 2) and GPT-2 generated stories. Human-written stories were rated higher for relevance and likability than GPT-2 generated stories $(p < 0.05)$ .
+
+ | mean (human) | mean (GPT-2) | difference | 95% CI lower | 95% CI upper | t | df | p-val |
| grammar | 3.98 | 3.94 | 0.04 | -0.07 | 0.15 | 0.70 | 1196.4 | 0.48 |
| coherence | 4.05 | 3.82 | 0.23 | 0.12 | 0.36 | 3.98 | 1163.5 | <0.001 |
| relevance | 3.46 | 3.44 | 0.02 | -0.13 | 0.17 | 0.27 | 1188.9 | 0.80 |
| likability | 3.42 | 3.42 | 0.00 | -0.14 | 0.14 | 0.00 | 1192.5 | 1 |
+
+Table A16: Welch's $t$ -test for ratings collected on AMT for human-written stories (Day 3) and GPT-2 generated stories. Human-written stories were rated higher for coherence than GPT-2 generated stories ( $p < 0.05$ ).
+
+ | mean (human) | mean (GPT-2) | difference | 95% CI lower | 95% CI upper | t | df | p-val |
| grammar | 3.82 | 3.94 | 0.12 | -0.23 | -0.01 | -2.11 | 1183.1 | 0.04 |
| coherence | 3.45 | 3.82 | 0.37 | -0.49 | -0.23 | -5.42 | 1194.2 | <0.001 |
| relevance | 3.25 | 3.44 | 0.19 | -0.35 | -0.04 | -2.50 | 1185 | 0.01 |
| likability | 3.32 | 3.42 | 0.10 | -0.24 | 0.04 | -1.41 | 1197.9 | 0.16 |
+
+Table A17: Welch's $t$ -test for ratings collected on AMT for human-written stories (non-English speaking countries) and GPT-2 generated stories. GPT-2 generated stories were rated higher for grammar, coherence, and relevance than human-written stories $(p < 0.05)$
+
+ | mean (human) | mean (GPT-2) | difference | 95% CI lower | 95% CI upper | t | df | p-val |
| grammar | 3.83 | 3.82 | 0.01 | -0.09 | 0.12 | 0.28 | 1188.1 | 0.78 |
| coherence | 3.83 | 3.39 | 0.44 | 0.32 | 0.57 | 6.92 | 1198 | <0.001 |
| relevance | 3.49 | 2.70 | 0.79 | 0.65 | 0.93 | 10.85 | 1198 | <0.001 |
| likability | 3.48 | 2.99 | 0.49 | 0.37 | 0.62 | 7.72 | 1195.2 | <0.001 |
+
+Table A18: Welch's $t$ -test for ratings collected on AMT for human-written stories and GPT-2 generated stories (both stories shown in one HIT). GPT-2 generated stories were rated lower for coherence, relevance, and likability than human-written stories ( $p < 0.05$ ) which is in line with the ratings provided by English teachers.
\ No newline at end of file
diff --git a/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/images.zip b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..ad611f0de0c7c98e1e439109017e3cbaec421368
--- /dev/null
+++ b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:705b83f5ec6451a70e1d991a66ea8bf744d262471536cd43ada5aee50efa85c7
+size 969339
diff --git a/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/layout.json b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..ba400cfbd0c9123a5443df244b086f1b18dbc205
--- /dev/null
+++ b/theperilsofusingmechanicalturktoevaluateopenendedtextgeneration/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:924ac2e3a457cd7452a064cbef7b85bbfbeb5ae7e8829a4f86aa63401484172c
+size 634965
diff --git a/thepowerofscaleforparameterefficientprompttuning/830d8fa3-567d-45d1-8596-fa3dd080d5a3_content_list.json b/thepowerofscaleforparameterefficientprompttuning/830d8fa3-567d-45d1-8596-fa3dd080d5a3_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..61d188eafd4e63413da4b532c2819de89f21211b
--- /dev/null
+++ b/thepowerofscaleforparameterefficientprompttuning/830d8fa3-567d-45d1-8596-fa3dd080d5a3_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fb436353f67203f573f82cfb4dc82b491bf87628d487f47e35196e5daff5072f
+size 104848
diff --git a/thepowerofscaleforparameterefficientprompttuning/830d8fa3-567d-45d1-8596-fa3dd080d5a3_model.json b/thepowerofscaleforparameterefficientprompttuning/830d8fa3-567d-45d1-8596-fa3dd080d5a3_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..b849f40cbf81a0c2ade2b0a4fdcc0b7a6b572a64
--- /dev/null
+++ b/thepowerofscaleforparameterefficientprompttuning/830d8fa3-567d-45d1-8596-fa3dd080d5a3_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:584aee887bb93426564e472d3800dc871e08f831d55d635206cecd9c97fc6e33
+size 127307
diff --git a/thepowerofscaleforparameterefficientprompttuning/830d8fa3-567d-45d1-8596-fa3dd080d5a3_origin.pdf b/thepowerofscaleforparameterefficientprompttuning/830d8fa3-567d-45d1-8596-fa3dd080d5a3_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..9ff8971dbfc2b1ca1768870792ad8905c5800255
--- /dev/null
+++ b/thepowerofscaleforparameterefficientprompttuning/830d8fa3-567d-45d1-8596-fa3dd080d5a3_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:34d699504c545babbc5781f1d950a3e6e993aec6f5e0eaaf8d12d2625b316332
+size 533268
diff --git a/thepowerofscaleforparameterefficientprompttuning/full.md b/thepowerofscaleforparameterefficientprompttuning/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..6a9a177fd94a5ad0b8e716a4a88d4dbc53ab681c
--- /dev/null
+++ b/thepowerofscaleforparameterefficientprompttuning/full.md
@@ -0,0 +1,364 @@
+# The Power of Scale for Parameter-Efficient Prompt Tuning
+
+Brian Lester* Rami Al-Rfou Noah Constant
+
+Google Research
+
+{brianlester, rmyeid, nconstant}@google.com
+
+# Abstract
+
+In this work, we explore "prompt tuning," a simple yet effective mechanism for learning "soft prompts" to condition frozen language models to perform specific downstream tasks. Unlike the discrete text prompts used by GPT-3, soft prompts are learned through backpropagation and can be tuned to incorporate signals from any number of labeled examples. Our end-to-end learned approach outperforms GPT-3's few-shot learning by a large margin. More remarkably, through ablations on model size using T5, we show that prompt tuning becomes more competitive with scale: as models exceed billions of parameters, our method "closes the gap" and matches the strong performance of model tuning (where all model weights are tuned). This finding is especially relevant because large models are costly to share and serve and the ability to reuse one frozen model for multiple downstream tasks can ease this burden. Our method can be seen as a simplification of the recently proposed "prefix tuning" of Li and Liang (2021) and we provide a comparison to this and other similar approaches. Finally, we show that conditioning a frozen model with soft prompts confers benefits in robustness to domain transfer and enables efficient "prompt ensembling." We release code and model checkpoints to reproduce our experiments.
+
+# 1 Introduction
+
+With the wide success of pre-trained large language models, a range of techniques has arisen to adapt these general-purpose models to downstream tasks. ELMo (Peters et al., 2018) proposed freezing the pre-trained model and learning a task-specific weighting of its per-layer representations. However, since GPT (Radford et al., 2018) and BERT
+
+
+Figure 1: Standard model tuning of T5 achieves strong performance, but requires storing separate copies of the model for each end task. Our prompt tuning of T5 matches the quality of model tuning as size increases, while enabling the reuse of a single frozen model for all tasks. Our approach significantly outperforms few-shot prompt design using GPT-3. We show mean and standard deviation across 3 runs for tuning methods.
+
+(Devlin et al., 2019), the dominant adaptation technique has been model tuning (or "fine-tuning"), where all model parameters are tuned during adaptation, as proposed by Howard and Ruder (2018).
+
+More recently, Brown et al. (2020) showed that prompt design (or "priming") is surprisingly effective at modulating a frozen GPT-3 model's behavior through text prompts. Prompts are typically composed of a task description and/or several canonical examples. This return to "freezing" pre-trained models is appealing, especially as model size continues to increase. Rather than requiring a separate copy of the model for each downstream task, a single generalist model can simultaneously serve many different tasks.
+
+Unfortunately, prompt-based adaptation has several key drawbacks. Task description is error-prone and requires human involvement, and the effectiveness of a prompt is limited by how much condition-
+
+
+Figure 2: Model tuning requires making a task-specific copy of the entire pre-trained model for each downstream task and inference must be performed in separate batches. Prompt tuning only requires storing a small task-specific prompt for each task, and enables mixed-task inference using the original pretrained model. With a T5 "XXL" model, each copy of the tuned model requires 11 billion parameters. By contrast, our tuned prompts would only require 20,480 parameters per task—a reduction of over five orders of magnitude—assuming a prompt length of 5 tokens.
+
+ing text can fit into the model's input. As a result, downstream task quality still lags far behind that of tuned models. For instance, GPT-3 175B few-shot performance on SuperGLUE is 17.5 points below fine-tuned T5-XXL (Raffel et al., 2020) (71.8 vs. 89.3) despite using 16 times more parameters.
+
+Several efforts to automate prompt design have been recently proposed. Shin et al. (2020) propose a search algorithm over the discrete space of words, guided by the downstream application training data. While this technique outperforms manual prompt design, there is still a gap relative to model tuning.
+
+Li and Liang (2021) propose "prefix tuning" and show strong results on generative tasks. This method freezes the model parameters and backpropagates the error during tuning to prefix activations pretended to each layer in the encoder stack, including the input layer. Hambardzumyan et al. (2021) simplify this recipe by restricting the trainable parameters to the input and output subnetworks of a masked language model, and show reasonable results on classifications tasks.
+
+In this paper, we propose prompt tuning as a further simplification for adapting language models. We freeze the entire pre-trained model and only allow an additional $k$ tunable tokens per downstream task to be prepended to the input text. This "soft prompt" is trained end-to-end and can condense the signal from a full labeled dataset, allowing our method to outperform few-shot prompts and close the quality gap with model tuning (Figure 1). At
+
+the same time, since a single pre-trained model is recycled for all downstream tasks, we retain the efficient serving benefits of frozen models (Figure 2).
+
+While we developed our method concurrently with Li and Liang (2021) and Hambardzumyan et al. (2021), we are the first to show that prompt tuning alone (with no intermediate-layer prefixes or task-specific output layers) is sufficient to be competitive with model tuning. Through detailed experiments in sections 2-3, we demonstrate that language model capacity is a key ingredient for these approaches to succeed. As Figure 1 shows, prompt tuning becomes more competitive with scale.
+
+We compare with similar approaches in Section 4. Explicitly separating task-specific parameters from the "generalist" parameters needed for general language-understanding has a range of additional benefits. We show in Section 5 that by capturing the task definition in the prompt while keeping the generalist parameters fixed, we are able to achieve better resilience to domain shifts. In Section 6, we show that "prompt ensembling", learning multiple prompts for the same task, can boost quality and is more efficient than classic model ensembling. Finally, in Section 7, we investigate the interpretability of our learned soft prompts. In sum, our key contributions are:
+
+1. Proposing prompt tuning and showing its competitiveness with model tuning in the regime of large language models.
+2. Ablating many design choices, and showing quality and robustness improve with scale.
+3. Showing prompt tuning outperforms model tuning on domain shift problems.
+4. Proposing "prompt ensembling" and showing its effectiveness.
+
+# 2 Prompt Tuning
+
+Following the "text-to-text" approach of T5 (Raffel et al., 2020), we cast all tasks as text generation. Instead of modeling classification as the probability of an output class given some input, $\operatorname{Pr}(y|X)$ where $X$ is a series of tokens and $y$ is a single class label, we now model it as conditional generation, where $Y$ is a sequence of tokens that represent a class label. T5 models classification as $\operatorname{Pr}_{\theta}(Y|X)$ , parameterized by the weights, $\theta$ , of the transformers (Vaswani et al., 2017) that make up its encoder and decoder.
+
+Prompting is the approach of adding extra information for the model to condition on during its
+
+generation of $Y$ . Normally, prompting is done by prepending a series of tokens, $P$ , to the input $X$ , such that the model maximizes the likelihood of the correct $Y$ , $\operatorname{Pr}_{\theta}(Y|[P;X])$ , while keeping the model parameters, $\theta$ , fixed. In GPT-3, the representations of the prompt tokens, $P = \{p_1,p_2,\dots ,p_n\}$ , are part of the model's embedding table, parameterized by the frozen $\theta$ . Finding an optimal prompt thus requires the selection of prompt tokens, through either manual search or non-differentiable search methods (Jiang et al., 2020; Shin et al., 2020). Prompt tuning removes the restriction that the prompt $P$ be parameterized by $\theta$ ; instead the prompt has its own dedicated parameters, $\theta_P$ , that can be updated. While prompt design involves selecting prompt tokens from a fixed vocabulary of frozen embeddings, prompt tuning can be thought of as using a fixed prompt of special tokens, where only the embeddings of these prompt tokens can be updated. Our new conditional generation is now $\operatorname{Pr}_{\theta ;\theta_P}(Y|[P;X])$ and can be trained by maximizing the likelihood of $Y$ via backpropagation, while only applying gradient updates to $\theta_P$ .
+
+Given a series of $n$ tokens, $\{x_{1}, x_{2}, \ldots, x_{n}\}$ , the first thing T5 does is embed the tokens, forming a matrix $X_{e} \in \mathbb{R}^{n \times e}$ where $e$ is the dimension of the embedding space. Our soft-prompts are represented as a parameter $P_{e} \in \mathbb{R}^{p \times e}$ , where $p$ is the length of the prompt. Our prompt is then concatenated to the embedded input forming a single matrix $[P_{e}; X_{e}] \in \mathbb{R}^{(p + n) \times e}$ which then flows through the encoder-decoder as normal. Our models are trained to maximize the probability of $Y$ , but only the prompt parameters $P_{e}$ are updated.
+
+# 2.1 Design Decisions
+
+There are many possible ways to initialize the prompt representations. The simplest is to train from scratch, using random initialization. A more sophisticated option is to initialize each prompt token to an embedding drawn from the model's vocabulary. Conceptually, our soft-prompt modulates the frozen network's behavior in the same way as text preceding the input, so it follows that a word-like representation might serve as a good initialization spot. For classification tasks, a third option is to initialize the prompt with embeddings that enumerate the output classes, similar to the "verbalizers" of Schick and Schütze (2021). Since we want the model to produce these tokens in the
+
+output, initializing the prompt with the embeddings of the valid target tokens should prime the model to restrict its output to the legal output classes.
+
+Another design consideration is the length of the prompt. The parameter cost of our method is $EP$ , where $E$ is the token embedding dimension and $P$ is the prompt length. The shorter the prompt, the fewer new parameters must be tuned, so we aim to find a minimal length that still performs well.
+
+# 2.2 Unlearning Span Corruption
+
+Unlike autoregressive language models like GPT-3, the T5 models we experiment with use an encoder-decoder architecture and pre-train on a span corruption objective. Specifically, T5 is tasked with "reconstructing" masked spans in the input text, which are marked with unique sentinel tokens. The target output text consists of all the masked content, separated by sentinels, plus a final sentinel. For instance, from the text "Thank you for inviting me to your party last week" we might construct a pre-training example where the input is "Thank you $\langle \mathrm{X}\rangle$ me to your party $\langle \mathrm{Y}\rangle$ week" and the target output is " $\langle \mathrm{X}\rangle$ for inviting $\langle \mathrm{Y}\rangle$ last $\langle \mathrm{Z}\rangle$ ".
+
+While Raffel et al. (2020) find this architecture and pre-training objective more effective than traditional language modeling, we hypothesize that this setup is not a good fit for producing a frozen model that can be readily controlled through prompt tuning. In particular, a T5 model pre-trained exclusively on span corruption, such as T5 1.1, has never seen truly natural input text (free of sentinel tokens), nor has it ever been asked to predict truly natural targets. In fact, due to the details of T5's span corruption preprocessing, every pre-training target will begin with a sentinel. While this "unnatural" tendency to output sentinels is easy to overcome through fine-tuning, we suspect that it would be much harder to override through a prompt alone, as the decoder priors cannot be adjusted.
+
+Given these concerns, we experiment with T5 models in three settings. (1) "Span Corruption": We use pre-trained T5 off-the-shelf as our frozen model, and test its ability to output the expected text for downstream tasks. (2) "Span Corruption + Sentinel": We use the same model, butptides all downstream targets with a sentinel, so as to more closely resemble the targets seen in pretraining. (3) "LM Adaptation": We continue T5's self-supervised training for a small number of additional steps, but using the "LM" objective dis
+
+cussed by Raffel et al. (2020); given a natural text prefix as input, the model must produce the natural text continuation as output. Crucially, this adaptation happens only once, producing a single frozen model that we can reuse for prompt tuning across any number of downstream tasks.
+
+Through LM adaptation, we hope to "quickly" transform T5 into a model more similar to GPT-3, which always outputs realistic text, and is known to respond well to prompts as a "few-shot learner". It is not obvious how successful this late-stage transformation will be compared to pre-training from scratch, and it has not been investigated previously to our knowledge. As such, we experiment with various lengths of adaptation up to 100K steps.
+
+# 3 Results
+
+Our frozen models are built on top of pre-trained T5 checkpoints of all sizes (Small, Base, Large, XL, XXL). We leverage the public T5 1.1 checkpoints, which include improvements over the original T5.2
+
+Our "default" configuration, plotted with a green $\times$ ( $= -$ ) throughout, uses an LM-adapted version of T5 trained for an additional 100K steps, initializes using class labels (see Section 3.2), and uses a prompt length of 100 tokens. While this is longer than the default 10-token prefix used by Li and Liang (2021), our method still uses fewer task-specific parameters, as we only tune the input layer, as opposed to overwriting activations in all network layers. See Figure 4 for a detailed comparison. We will also see shortly that even much shorter prompts are viable as model size increases.
+
+We measure performance on the SuperGLUE benchmark (Wang et al., 2019a), a collection of eight challenging English language understanding tasks. We report metrics on the development set associated with each dataset.
+
+Each of our prompts train on a single SuperGLUE task; there was no multi-task setup or mixing of training data across tasks. We translate each SuperGLUE dataset into a text-to-text format following Raffel et al. (2020), except that we omit the
+
+task names prepended to inputs indicating which SuperGLUE task an example belongs to.
+
+We train our prompts for 30,000 steps using T5's standard cross-entropy loss, with a constant learning rate of 0.3 and a batch size of 32. Checkpoints are selected via early stopping on the development set, where the stopping metric is the default metric for the dataset, or the average of metrics for datasets evaluated with multiple metrics. All experiments were run in JAX (Bradbury et al., 2018) using the Adafactor optimizer (Shazeer and Stern, 2018) with weight decay $1e - 5$ , $\beta_{2}$ decay 0.8, and parameter scaling off. The models were implemented in Flax (Heek et al., 2020). More details are available in Appendix A.
+
+# 3.1 Closing the Gap
+
+To compare our method with standard model tuning, we tune the public T5 1.1 checkpoints on SuperGLUE using the default hyperparameters specified in the T5 library (learning rate 0.001, and Adafactor optimizer with pre-training parameter states restored). We consider two baselines. (1) "Model Tuning": For an apples-to-apples comparison, we tune on each task separately, as in our prompt tuning setup. (2) "Model Tuning (Multi-task)": We use T5's multi-task tuning setup to achieve a more competitive baseline. In this case, a single model is tuned on all tasks jointly, with a text prefix indicating the task name.
+
+In Figure 1 (p. 1), we see that prompt tuning becomes more competitive with model tuning as scale increases. At the XXL size (11 billion parameters), prompt tuning matches even the stronger multi-task model tuning baseline, despite having over 20,000 times fewer task-specific parameters.
+
+To compare with prompt design, we include GPT-3 few-shot performance on the SuperGLUE dev split, as reported by Brown et al. (2020). Figure 1 shows that prompt tuning beats GPT-3
+
+
+(a) Prompt length
+
+
+(b) Prompt initialization
+
+
+(c) Pre-training method
+
+
+(d) LM adaptation steps
+Figure 3: Ablations of various hyperparameters on prompt tuning performance (mean and stddev across 3 runs). In our "default" $(\rightarrow -)$ configuration, quality improves stably with model size. Across all ablations, the largest (XXL) model is the most robust to hyperparameter choice. (a) Prompt length: Increasing to $20+$ tokens generally confers a large boost, but XXL performs well even with single-token prompts. (b) Prompt initialization: Random uniform initialization lags behind more "advanced" initializations using sampled vocabulary or class label embeddings, but the difference vanishes at XXL size. (c) Pre-training objective: LM adaptation outperforms span corruption, even when a sentinel is added to downstream task targets, but XXL works well with any method. (d) LM adaptation: Longer adaptation generally gives larger gains, but XXL is robust to even short adaptation.
+
+prompt design by a large margin, with prompt-tuned T5-Small matching GPT-3 XL (over 16 times larger), and prompt-tuned T5-Large beating GPT-3 175B (over 220 times larger).
+
+# 3.2 Ablation Study
+
+Prompt Length We train prompts for each model size while varying the prompt length in $\{1, 5, 20, 100, 150\}$ and fixing other settings to our default configuration. Figure 3(a) shows that for most model sizes, increasing prompt length beyond a single token is critical to achieve good performance. Notably, the XXL model still gives strong results with a single-token prompt, suggesting that the larger the model, the less conditioning signal is needed to achieve a target behavior. Across all models, increasing beyond 20 tokens only yields marginal gains.7
+
+Prompt Initialization We ablate the effect of prompt initialization by training models at all sizes while fixing other hyperparameters to their default values. For random initialization, we sample uniformly from the range $[-0.5, 0.5]$ . When initializing from sampled vocabulary, we restrict to the 5,000 most "common" tokens in T5's Sentence-Piece vocabulary (Kudo and Richardson, 2018), which is ordered by likelihood in the pre-training corpus. For "class label" initialization, we take the embeddings for the string representations of each class in the downstream task and use them to initialize one of the tokens in the prompt. When a class label is multi-token, we average the token embeddings. At longer prompt lengths, we often run out of class labels before we have initialized all
+
+of the prompt tokens. In this case we fall back to our sampled vocab strategy to fill in the prompt.
+
+Figure 3(b) shows our ablation of initialization strategy across model sizes, where we find that the class based initialization performs best. At smaller model sizes, there are large gaps between the different initializations, but once the model is scaled to XXL size, those differences disappear.
+
+With "class label" initialization, we observe that the class labels typically persist in the learned prompts, such that the nearest token embeddings (in cosine distance) match the tokens used for initialization. Beyond this, we did not find our learned prompts to be interpretable, similar to those of Shin et al. (2020). See Section 7 for details.
+
+Pre-training Objective In Figures 3(c) and 3(d), we see pre-training objective has a clear effect on prompt tuning quality. As hypothesized in Section 2.2, T5's default "span corruption" objective is not well-suited for training frozen models to be later conditioned by prompts. Intuitively, models pre-trained to read and write sentinel tokens are hard to apply directly to tasks of reading and writing text without sentinels. As seen in Figure 3(c), even the "workaround" of adding a sentinel to the downstream targets has little benefit. While LM adaptation adds value across all model sizes, we note our largest XXL model is the most forgiving and gives strong results even with span corruption.
+
+Given the benefit of LM adaptation, we also explore how long of an adaptation is helpful. Figure 3(d) shows that longer adaptation provides additional gains, up to $100\mathrm{K}$ steps. This suggests that the "transition" from span corruption to a language modeling objective is not a trivial change, and making an effective switch takes an investment of training resources (10% of the steps of the original T5 pre-training). At the same time, as in our other ablations, we observe that the XXL model is robust to even non-ideal configurations. At this size, the gains from adaptation are quite modest.
+
+In the non-optimal "span corruption" setting, we observe instability across model sizes, with the Small model outperforming the larger Base, Large, and XL models. On inspection, we find that for many tasks, these mid-sized models never learn to output a legal class label and thus score $0\%$ . The two most common error modes are copying subspans from the input and predicting an empty string. Furthermore, this poor performance is not due to random variance in prompt tuning, as we observe
+
+
+Figure 4: Parameter usage of various adaptation techniques, fixing architecture to T5 1.1 and prompt-prefix length to 1-100 tokens (bands show mean and stddev). Model Tuning: All parameters are task-specific. Prefix Tuning: Activations are tuned in the prefix of each layer, requiring $0.1 - 1\%$ task-specific parameters for inference, but more are used for training. WARP: Task parameters are reduced to under $0.1\%$ by only tuning input and output layers. Prompt Tuning: Only prompt embeddings are tuned, reaching under $0.01\%$ for most model sizes. Prompt Design: Only a sequence of prompt IDs (500-2000 tokens) is required.
+
+low variance across 3 runs for each size. These results indicate that using models pre-trained with the "span corruption" objective can be unreliable, with only 2 out of 5 models working well, whereas the LM adapted versions work reliably across all model sizes.
+
+# 4 Comparison to Similar Approaches
+
+In this section, we review recent work on learning continuous prompts, and draw comparisons with our method. One important axis of comparison is the number of task-specific parameters each method requires, as shown in Figure 4. Among methods with learnable parameters, prompt tuning is the most parameter efficient, requiring less than $0.01\%$ task-specific parameters for models over a billion parameters.[9]
+
+Li and Liang (2021) propose "prefix tuning": learning a sequence of prefixes that are prepended at every transformer layer. This is akin to learning transformer activations that are fixed across exam-
+
+plies at every network layer. In contrast, prompt tuning uses a single prompt representation that is prepended to the embedded input. Beyond requiring fewer parameters, our approach allows the transformer to update the intermediate-layer task representations, as contextualized by an input example. Their work builds on GPT-2 (Radford et al., 2019) and BART (Lewis et al., 2020), while ours focuses on T5 and examines changes in performance and robustness to design choices as model size increases. When using BART, prefix tuning includes prefixes on both the encoder and decoder network, while prompt tuning only requires prompts on the encoder. Li and Liang (2021) also rely on a reparameterization of the prefix to stabilize learning, which adds a large number of parameters during training, whereas our configuration does not require this reparameterization and is robust across SuperGLUE tasks and model sizes.
+
+Hambardzumyan et al. (2021) propose "WARP", where prompt parameters are added to the input layer. This method works with masked language models, relying on a [MASK] token and a learnable output layer to project the mask to class logits. This formulation restricts the model to producing a single output, limiting it to classification. Prompt tuning does not require any changes to the input or a task-specific head. The performance of prompt tuning is also considerably closer to the strong performance of model tuning.
+
+Liu et al. (2021) propose "P-tuning" where learnable continuous prompts are interleaved throughout the embedded input, using patterns based on human design. Our approach removes this complication by simply prepending the prompt to the input. To achieve strong SuperGLUE results, P-tuning has to be used in conjunction with model tuning, that is, models jointly update both the prompt and the main model parameters, whereas our approach keeps the original language model frozen.[10]
+
+Qin and Eisner (2021) use "soft words" to learn prompts to extract knowledge from pre-trained LMs. Prompts are positioned in relation to the input based on hand-designed prompt prototypes, and a learned $\Delta_i^\ell$ parameter is included for each layer, so parameter cost scales with model depth.
+
+Logeswaran et al. (2020) use a learnable prepended token to adapt transformer models to var
+
+| Dataset | Domain | Model | Prompt | Δ |
| SQuAD | Wiki | 94.9 ±0.2 | 94.8 ±0.1 | -0.1 |
| TextbookQA | Book | 54.3 ±3.7 | 66.8 ±2.9 | +12.5 |
| BioASQ | Bio | 77.9 ±0.4 | 79.1 ±0.3 | +1.2 |
| RACE | Exam | 59.8 ±0.6 | 60.7 ±0.5 | +0.9 |
| RE | Wiki | 88.4 ±0.1 | 88.8 ±0.2 | +0.4 |
| DuoRC | Movie | 68.9 ±0.7 | 67.7 ±1.1 | -1.2 |
| DROP | Wiki | 68.9 ±1.7 | 67.1 ±1.9 | -1.8 |
+
+Table 1: F1 mean and stddev for models trained on SQuAD and evaluated on out-of-domain datasets from the MRQA 2019 shared task. Prompt tuning tends to give stronger zero-shot performance than model tuning, especially on datasets with large domain shifts like TextbookQA.
+
+ious tasks, but focus on small synthetic datasets designed to accommodate a compositional task representation, as opposed to larger real-world datasets. Their base models are small transformers trained from scratch jointly with the task representations, whereas we keep the base model frozen and investigate scaling laws using larger transformers.
+
+More generally, work on task prompts is closely aligned with work on "adapters" (Rebuffi et al., 2017; Houlsby et al., 2019), small bottleneck layers inserted between frozen pre-trained network layers. Adapters offer another means of reducing task-specific parameters, with Houlsby et al. (2019) achieving GLUE performance close to full model tuning when freezing BERT-Large and only adding $2 - 4\%$ additional parameters. Pfeiffer et al. (2020) use multiple adapters in a multilingual context to explicitly separate language understanding from task specification, similar to our approach. A core difference between adapters and prompt tuning is how the approaches change model behavior. Adapters modify the actual function that acts on the input representation, parameterized by the neural network, by allowing the rewriting of activations at any given layer. Prompt tuning modifies behavior by leaving the function fixed and adding new input representations that can affect how subsequent input is processed.
+
+# 5 Resilience to Domain Shift
+
+By freezing the core language model parameters, prompt tuning prevents the model from modifying its general understanding of language. Instead, prompt representations indirectly modulate the representation of the input. This reduces the model's ability to overfit to a dataset by memorizing specific lexical cues and spurious correlations. This restriction suggests that prompt tuning may improve
+
+| Train | Eval | Tuning | Accuracy | F1 |
| QQP | MRPC | Model | 73.1 ±0.9 | 81.2 ±2.1 |
| Prompt | 76.3 ±0.1 | 84.3 ±0.3 |
| MRPC | QQP | Model | 74.9 ±1.3 | 70.9 ±1.2 |
| Prompt | 75.4 ±0.8 | 69.7 ±0.3 |
+
+robustness to domain shifts, where the distribution of inputs differs between training and evaluation.
+
+We investigate zero-shot domain transfer on two tasks: question answering (QA) and paraphrase detection. For question answering, we use the MRQA 2019 shared task on generalization (Fisch et al., 2019). This task collects extractive QA datasets in a unified format and tests how models trained on "in-domain" datasets perform when evaluated on "out-of-domain" datasets. For our experiments, we train on SQuAD (Rajpurkar et al., 2016) and evaluate on each of the out-of-domain datasets.[11]
+
+Table 1 shows that prompt tuning outperforms model tuning on the majority of out-of-domain datasets, with a remarkable 12.5 point F1 gap between the two approaches on TextbookQA. We observe larger gains from prompt tuning in cases of larger domain shifts (e.g. to Biomedical in BioASQ or to Textbooks in TextbookQA). Of the datasets where model tuning is better, we see that DROP shares a domain (Wikipedia) with SQuAD and is thus one of the smallest domain transfers.
+
+As a second test of robustness to domain shift, we explore transfer between two paraphrase detection tasks from GLUE (Wang et al., 2019b). The first task is QQP (Iyer et al., 2017), which asks if two questions from the community Q&A site Quora are "duplicates". The second task is MRPC (Dolan and Brockett, 2005), which asks if two sentences drawn from news articles are paraphrases. We test transfer in both directions (QQP $\Leftrightarrow$ MRPC). As before, we train on the "in-domain" task, select checkpoints using in-domain validation, and evaluate zero-shot on the "out-of-domain" task.
+
+Table 2 shows that training a lightweight prompt on the QQP data and evaluating on MRPC gives much better performance than tuning the entire model (+3.2 accuracy and +3.1 F1). The results are much closer in the other direction, with prompt
+
+Table 2: Mean and stddev of zero-shot domain transfer between two paraphrase detection tasks.
+
+| Dataset | Metric | Average | Best | Ensemble |
| BoolQ | acc. | 91.1 | 91.3 | 91.7 |
| CB | acc./F1 | 99.3 / 99.0 | 100.00 / 100.00 | 100.0 / 100.0 |
| COPA | acc. | 98.8 | 100.0 | 100.0 |
| MultiRC | EM/F1a | 65.7 / 88.7 | 66.3 / 89.0 | 67.1 / 89.4 |
| ReCoRD | EM/F1 | 92.7 / 93.4 | 92.9 / 93.5 | 93.2 / 93.9 |
| RTE | acc. | 92.6 | 93.5 | 93.5 |
| WiC | acc. | 76.2 | 76.6 | 77.4 |
| WSC | acc. | 95.8 | 96.2 | 96.2 |
| SuperGLUE (dev) | 90.5 | 91.0 | 91.3 |
+
+Table 3: Performance of a five-prompt ensemble built from a single frozen T5-XXL model exceeds both the average and the best among the five prompts.
+
+tuning showing a small improvement in accuracy and a small drop in F1. These results support the view that model tuning may be over-parameterized and more prone to overfit the training task, to the detriment of similar tasks in different domains.
+
+# 6 Prompt Ensembling
+
+Ensembles of neural models trained from different initializations on the same data are widely observed to improve task performance (Hansen and Salamon, 1990) and are useful for estimating model uncertainty (Lakshminarayanan et al., 2017). However, as model size increases, ensembling can become impractical. Beyond the space required to store $N$ models (e.g. 42 GiB for each copy of T5-XXL), there is a substantial inference cost to running $N$ distinct models, whether in parallel or in series.
+
+Prompt tuning provides a more efficient way to ensemble multiple adaptations of a pre-trained language model. By training $N$ prompts on the same task, we create $N$ separate "models" for a task, while still sharing the core language modeling parameters throughout. Beyond drastically reducing storage costs, the prompt ensemble makes inference more efficient. To process one example, rather than computing forward passes of $N$ different models, we can execute a single forward pass with a batch size of $N$ , replicating the example across the batch and varying the prompt. These savings mirror those seen for multi-tasking in Figure 2.
+
+To demonstrate the viability of prompt ensembling, we train five prompts for each SuperGLUE task, using a single frozen T5-XXL model with our default hyperparameters. We use simple majority voting to compute predictions from the ensemble. Table 3 shows that across all tasks, the ensemble beats the single-prompt average and beats, or matches, the best individual prompt.
+
+# 7 Interpretability
+
+An ideally interpretable prompt would consist of natural language that clearly describes the task at hand, explicitly asks the model for some result or action, and makes it easy to understand why the prompt elicited such behavior from the model.
+
+As prompt tuning works in the continuous embedding space rather than the discrete token space, interpreting prompts becomes more difficult. To test the interpretability of our learned soft prompts, we compute the nearest neighbors to each prompt token from the frozen model's vocabulary. We use cosine distance between the vocabulary embedding vector and the prompt token representation as the similarity metric.
+
+We observe that for a given learned prompt token, the top-5 nearest neighbors form tight semantic clusters. For example, we see lexically similar clusters such as { Technology / technology / Technologies / technological / technologies }, as well as more diverse but still strongly related clusters such as { entirely / completely / totally / altogether / 100% }. The nature of these clusters suggests that the prompts are in fact learning "word-like" representations. We found that random vectors drawn from the embedding space do not show this sort of semantic clustering.
+
+When initializing the prompts using the "class-label" strategy, we often find that the class labels persist through training. Specifically, if a prompt token is initialized to a given label, that label is often among the learned token's nearest neighbors after tuning. When initializing with the "Random Uniform" or "Sampled VOCab" methods, the class labels can also be found in the nearest neighbors of the prompts; however they tend to appear as neighbors to multiple prompt tokens. This suggests that the model is learning to store the expected output classes in the prompts as reference, and initializing the prompt to outputs classes makes this easier and more centralized.
+
+When examining longer prompts (e.g. size 100), we often find several prompt tokens with the same nearest neighbors. This suggests there is either excess capacity in the prompt, or that the lack of sequential structure in the prompt representation makes it difficult for the model to localize information to a specific position.
+
+While the learned prompts taken as sequences show little interpretability, we do observe a high frequency of words like science, technology and
+
+engineering as the nearest neighbors for prompts trained on the BoolQ dataset and approximately $20\%$ of the questions are in the "Nature/Science" category. While more investigation is needed, this suggests that one role of the prompt may be to prime the model to interpret inputs in a specific domain or context (e.g. "scientific").
+
+# 8 Conclusion
+
+In this paper, we showed that prompt tuning is a competitive technique for adapting frozen pretrained language models to downstream tasks. On the popular SuperGLUE benchmark, its task performance rivals that of traditional model tuning, with the gap vanishing as model size increases. On zero-shot domain transfer, we found that prompt tuning leads to improved generalization. This plausibly indicates that freezing general-purpose language understanding parameters and restricting downstream learning to a lightweight parameter footprint can help to avoid overfitting to a specific domain.
+
+Beyond task quality metrics, we discussed the appeal of moving to frozen pre-trained models in terms of storage and serving costs. This move enables both efficient multi-task serving, as well as efficient high-performing prompt ensembling. Looking forward, we believe that factoring out task-defining parameters as distinct from general language-modeling parameters is an exciting step that opens up many avenues for new research.
+
+# Acknowledgements
+
+We thank Lucas Dixon, Waleed Ammar, Slav Petrov and Sebastian Ruder for comments on an earlier draft, and the following people for helpful discussion: Colin Raffel, Adam Roberts, and Noam Shazeer. We thank Linting Xue for help with the LM adaptation training.
+
+# References
+
+Roy Bar-Haim, Ido Dagan, Bill Dolan, Lisa Ferro, Danilo Giampiccolo, Bernardo Magnini, and Idan Szpektor. 2006. The second PASCAL recognising textual entailment challenge. In Proceedings of the second PASCAL challenges workshop on recognising textual entailment, volume 6, pages 6-4. Venice.
+Luisa Bentivogli, Peter Clark, Ido Dagan, and Danilo Giampiccolo. 2009. The fifth PASCAL recognizing textual entailment challenge. In TAC.
+James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal
+
+Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. 2018. JAX: composable transformations of Python+NumPy programs.
+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.
+Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. 2019. *BoolQ: Exploring the surprising difficulty of natural yes/no questions.* 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 2924–2936, Minneapolis, Minnesota. Association for Computational Linguistics.
+Ido Dagan, Oren Glickman, and Bernardo Magnini. 2005. The PASCAL recognising textual entailment challenge. In *Machine Learning Challenges Workshop*, pages 177–190. Springer.
+Marie-Catherine De Marneff, Mandy Simons, and Judith Tonhauser. 2019. The Commitment Bank: Investigating projection in naturally occurring discourse. Proceedings of Sinn und Bedeutung 23.
+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.
+William B Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005).
+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.
+
+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 2nd Machine Reading for Reading Comprehension (MRQA) Workshop at EMNLP.
+Danilo Giampiccolo, Bernardo Magnini, Ido Dagan, and Bill Dolan. 2007. The third PASCAL recognizing textual entailment challenge. In Proceedings of the ACL-PASCAL workshop on textual entailment and paraphrasing, pages 1-9. Association for Computational Linguistics.
+Karen Hambardzumyan, Hrant Khachatrian, and Jonathan May. 2021. WARP: Word-level Adversarial ReProgramming. 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 4921-4933, Online. Association for Computational Linguistics.
+L. K. Hansen and P. Salamon. 1990. Neural network ensembles. IEEE Transactions on Pattern Analysis and Machine Intelligence, 12(10):993-1001.
+Jonathan Heek, Anselm Levskaya, Avital Oliver, Marvin Ritter, Bertrand Rondepierre, Andreas Steiner, and Marc van Zee. 2020. Flax: A neural network library and ecosystem for JAX.
+Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019. Parameter-efficient transfer learning for NLP. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 2790-2799. PMLR.
+Jeremy Howard and Sebastian Ruder. 2018. Universal language model fine-tuning for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 328-339, Melbourne, Australia. Association for Computational Linguistics.
+Shankar Iyer, Nikhil Dandekar, and Kornel Csernai. 2017. First Quora dataset release: Question pairs.
+Zhengbao Jiang, Frank F. Xu, Jun Araki, and Graham Neubig. 2020. How can we know what language models know? Transactions of the Association for Computational Linguistics, 8:423-438.
+A. Kembhavi, M. Seo, D. Schwenk, J. Choi, A. Farhadi, and H. 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.
+Daniel Khashabi, Snigdha Chaturvedi, Michael Roth, Shyam Upadhyay, and Dan Roth. 2018. Looking beyond the surface: A challenge set for reading comprehension over multiple sentences. In Proceedings
+
+of North American Chapter of the Association for Computational Linguistics (NAACL).
+Vid Kocijan, Ana-Maria Cretu, Oana-Maria Camburu, Yordan Yordanov, and Thomas Lukasiewicz. 2019. A surprisingly robust trick for the Winograd schema challenge. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4837-4842, Florence, Italy. Association for Computational Linguistics.
+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.
+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.
+Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. 2017. Simple and scalable predictive uncertainty estimation using deep ensembles. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc.
+Hector Levesque, Ernest Davis, and Leora Morgenstern. 2012. The Winograd schema challenge. In Thirteenth International Conference on the Principles of Knowledge Representation and Reasoning.
+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.
+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, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880, Online. Association for Computational Linguistics.
+Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. 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 4582-4597, Online. Association for Computational Linguistics.
+
+Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. 2021. GPT understands, too. CoRR, abs/2103.10385.
+Lajanugen Logeswaran, Ann Lee, Myle Ott, Honglak Lee, Marc'Aurelio Ranzato, and Arthur Szlam. 2020. Few-shot sequence learning with transformers. CoRR, abs/2012.09543.
+Vinod Nair and Geoffrey E. Hinton. 2010. Rectified linear units improve restricted Boltzmann machines. In Proceedings of the 27th International Conference on International Conference on Machine Learning, ICML'10, page 807-814, Madison, WI, USA. Omnipress.
+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.
+Jonas Pfeiffer, Ivan Vulic, Iryna Gurevych, and Sebastian Ruder. 2020. MAD-X: An Adapter-Based Framework for Multi-Task Cross-Linguual Transfer. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7654–7673, Online. Association for Computational Linguistics.
+Mohammad Taher Pilehvar and Jose Camacho-Collados. 2018. WiC: 10,000 example pairs for evaluating context-sensitive representations. CoRR, abs/1808.09121.
+Guanghui Qin and Jason Eisner. 2021. Learning how to ask: Querying LMs with mixtures of soft prompts. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5203-5212, Online. Association for Computational Linguistics.
+Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. 2018. Improving language understanding by generative pre-training.
+Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI Blog.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
+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.
+Sylvestre-Alvise Rebuffi, Hakan Bilen, and Andrea Vedaldi. 2017. Learning multiple visual domains with residual adapters. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc.
+Melissa Roemmele, Cosmin Adrian Bejan, and Andrew S Gordon. 2011. Choice of plausible alternatives: An evaluation of commonsense causal reasoning. In 2011 AAAI Spring Symposium Series.
+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.
+Timo Schick and Hinrich Schütze. 2021. Exploiting cloze-questions for few-shot text classification and natural language inference. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 255–269, Online. Association for Computational Linguistics.
+Noam Shazeer. 2020. GLU variants improve transformer. CoRR, abs/2002.05202.
+Noam Shazeer and Mitchell Stern. 2018. Adafactor: Adaptive learning rates with sublinear memory cost. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 4596-4604. PMLR.
+Taylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace, and Sameer Singh. 2020. AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4222-4235, Online. Association for Computational Linguistics.
+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, volume 30, pages 5998-6008.
+Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2019a. SuperGLUE: A stickier benchmark for general-purpose language understanding systems. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc.
+
+Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. 2019b. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In the Proceedings of ICLR.
+Michael L. Waskom. 2021. seaborn: statistical data visualization. Journal of Open Source Software, 6(60):3021.
+Sheng Zhang, Xiaodong Liu, Jingjing Liu, Jianfeng Gao, Kevin Duh, and Benjamin Van Durme. 2018. ReCoRD: Bridging the gap between human and machine commonsense reading comprehension. CoRR, abs/1810.12885.
+
+# A Reproducibility
+
+# A.1 Experimental Settings
+
+We evaluate each GLUE and SuperGLUE dataset using the metric specified in the benchmark. We reuse the evaluation code from the publicly available T5 open-source release to compute metrics. $^{12}$ For the SQuAD and MRQA datasets, we evaluate using F1, one of the metrics used by the SQuAD benchmark, where partial answer spans are considered. Again, we use the T5 open-source release for metric calculation. $^{13}$ All of our models use T5 1.1 as the base frozen model, additional details and pretrained checkpoints can be found on GitHub. $^{14,15}$
+
+All prompts for T5 Small and Base models were trained on 4 TPU v2 chips, while prompts for larger models were trained on 16 TPU v3 chips.
+
+Parameter counts for each prompt can be found in Table 4. Average runtimes until convergence can be found in Table 5.
+
+# A.2 Hyperparameter Search
+
+This work used 77 hyperparameter search trials (40 for prompt tuning and 37 for single-task model tuning), and 3 training runs (with validation evaluation) for each baseline configuration and ablation setting, for a total of 195 runs for our main result and ablations. There were an additional 18 runs for the domain shift experiments and 24 extra runs to create the ensemble. Hyperparameter bounds can be found in Table 6. Hyperparameter tuning was done via manual tuning and settings were selected based on the SuperGLUE score. All experiments in this work, outside of the hyperparameter being ablated, use our default configuration of 100K steps of LM Adapation, a prompt length of 100, and "class-label" initialization.
+
+All graphs of our experimental results plot the mean and standard deviation over 3 runs as computed by Seaborn (Waskom, 2021). Some settings have such low variance that the standard deviation
+
+is hidden behind the line itself, such as "Model Tuning (Multi-task)" in Figure 1 and the Base, Large, and XL prompts trained on the "Span Corruption" pretraining objective in Figure 3(b). Figure 4 also shows mean and standard deviation for the number of parameters each method uses as the prompt length varies from 1-100. The "Prefix Tuning (Train)" curves appear to have no standard deviation because the parameter count is so strongly dominated by the cost of the reparameterization parameters that the standard deviation bands are occluded. For our experiments on domain transfer, we report mean and standard deviation over 3 runs.
+
+# A.3 Datasets
+
+All datasets used are in English. For the GLUE $^{16,17}$ and SuperGLUE $^{18}$ datasets, we used the training, validation, and test splits that ship with TensorFlow Datasets. We used version 1.0.0 for GLUE and 1.0.2 for SuperGLUE datasets. For SQuAD $^{19}$ we used v1.1:3.0.0 from Tensorflow Datasets and follow the provided training, validation, and test splits. For the out-of-domain datasets we used the development splits distributed as part of the MRQA shared task. $^{20}$ Dataset sizes can be found in Table 7. The label distributions for each dataset can be found in Table 8 (BoolQ), Table 9 (CB), Table 10 (COPA), Table 11 (MultiRC), Table 14 (RTE), Table 12 (WiC), Table 13 (WSC), Table 15 (MRPC) and Table 16 (QQP).
+
+The question answering datasets are extractive datasets with a variety of answers, so there isn't a label distribution to report. Similarly, the ReCoRD dataset is a multiple choice dataset where the model must predict the masked out entity from a list of possible entities. Due to this formulation there isn't a meaningful label distribution.
+
+We followed the open-source T5 preprocessing procedure[21] for each dataset, except that we omit the dataset prefix denoting which SuperGLUE dataset an example belongs to. For the SQuAD and
+
+| T5 Size | Prompt Length | Trainable Parameters | Total Parameters | Percent Trainable |
| Small | 1 | 512 | 76,961,664 | 0.00067% |
| 5 | 2,560 | 76,963,712 | 0.00333% |
| 20 | 10,420 | 76,971,572 | 0.01330% |
| 50 | 25,600 | 76,986,752 | 0.03325% |
| 100 | 51,200 | 77,012,352 | 0.06648% |
| 150 | 76,800 | 77,037,952 | 0.09969% |
| Base | 1 | 768 | 247,578,624 | 0.00031% |
| 5 | 3,840 | 247,581,696 | 0.00155% |
| 20 | 15,360 | 247,593,216 | 0.00620% |
| 50 | 38,400 | 247,616,256 | 0.01551% |
| 100 | 76,800 | 247,654,656 | 0.03101% |
| 150 | 115,200 | 247,693,056 | 0.04651% |
| Large | 1 | 1,024 | 783,151,104 | 0.00013% |
| 5 | 5,120 | 783,155,200 | 0.00065% |
| 20 | 20,480 | 783,170,560 | 0.00262% |
| 50 | 51,200 | 783,201,280 | 0.00654% |
| 100 | 102,400 | 783,252,480 | 0.01907% |
| 150 | 153,600 | 783,303,680 | 0.01961% |
| XL | 1 | 2,048 | 2,849,759,232 | 0.00007% |
| 5 | 10,240 | 2,849,767,424 | 0.00036% |
| 20 | 40,960 | 2,849,798,144 | 0.00143% |
| 50 | 102,400 | 2,849,859,584 | 0.00359% |
| 100 | 204,800 | 2,849,961,984 | 0.00718% |
| 150 | 307,200 | 2,850,064,384 | 0.01078% |
| XXL | 1 | 4,096 | 11,135,336,448 | 0.00004% |
| 5 | 20,480 | 11,135,352,832 | 0.00018% |
| 20 | 81,920 | 11,135,414,272 | 0.00074% |
| 50 | 204,800 | 11,137,380,352 | 0.00184% |
| 100 | 409,600 | 11,135,741,952 | 0.00368% |
| 150 | 614,400 | 11,135,946,752 | 0.00552% |
+
+MRQA datasets we used the T5 SQuAD preprocessing code $^{22}$ . By following the T5 preprocessing and text-to-text format, we recast the WSC dataset as a text generation task. Instead of predicting whether a supplied referent is correct for a highlighted span, our model predicts the correct referent directly. As such, we can only learn from training examples where the referent is correct, so WSC training data where the supplied referent is incorrect are omitted.
+
+No new data was collected for this work.
+
+Table 4: Number of parameters used for various prompt lengths and T5 model sizes. Trainable parameters is the number of parameters in the prompt itself, while total parameters includes the prompt plus the original T5 parameters. The T5 parameters are frozen and shared across all tasks, and include the SentencePiece lookup table parameters. The final column is the percentage of total parameters that are trainable.
+
+| Prompt Length | T5 Size | Time |
| 1 | Large | 3:17 ±02:10 |
| XL | 3:37 ±02:11 |
| XXL | 21:23 ±01:54 |
| 20 | XL | 49:08 ±18:53 |
| XXL | 53:03 ±16:25 |
| 50 | Small | 09:05 ±05:07 |
| Base | 55:01 ±27:48 |
| Large | 1:14:16 ±13:12 |
| XL | 2:30:10 ±25:40 |
| XXL | 3:13:13 ±23:08 |
| 100 | Small | 16:25 ±01:15 |
| Base | 29:57 ±00:18 |
| Large | 1:23:36 ±10:21 |
| XL | 3:35:00 ±54:42 |
| XXL | 3:51:15 ±45:53 |
+
+Table 5: Mean and standard deviation of the runtime until convergence for the BoolQ dataset and various prompt lengths and model sizes. Convergence is defined as reaching a performance within $1\%$ of the mean value for that model configuration. A few configurations have been omitted because their runtimes were artificially extended due to preemption.
+
+| Hyperparameter | Search Space |
| Learning Rate | 0.001–0.5 |
| Parameter Scaling | {True, False} |
| Batch Size | {32, 64, 126, 256, 512} |
| Number of Steps | {10,000, 20,000, 30,000} |
| Warmup Steps | {off, 2,000, 3,000} |
| Decay Factor | {off, 0.1, 0.5} |
| Steps per Decay | {off, 4,000, 6,000, 8,000} |
+
+Table 6: Search space for each hyperparameter considered. Parameter Scaling refers to the Adafactor setting where an update is scaled by the norm of the parameter it will be applied to. Warmup Steps is the number of steps before a linearly increasing learning rate reaches the Learning Rate value, starting from zero. Decay Factor is the reduction in Learning Rate size that occurs every "Steps per Decay" steps.
+
+| Dataset | Training | Validation | Testing |
| BoolQ | 9,427 | 3,270 | 3,245 |
| CB | 250 | 56 | 250 |
| COPA | 400 | 100 | 500 |
| MultiRC | 27,243 | 4,848 | 9,693 |
| ReCoRD | 100,730 | 10,000 | 10,000 |
| RTE | 2,490 | 277 | 3,000 |
| WiC | 5,428 | 638 | 1,400 |
| WSC | 259* | 104 | 146 |
| MRPC | 3,668 | 408 | 1,725 |
| QQP | 363,849 | 40,430 | 390,965 |
| SQuAD | 87,599 | 10,570 | - |
| TextbookQA | - | 1,504 | - |
| RACE | - | 1,503 | - |
| BioASQ | - | 1,501 | - |
| RE | - | 674 | - |
| DuoRC | - | 2,948 | - |
| DROP | - | 1,503 | - |
+
+Table 7: Sizes for training, validation, and testing splits of each dataset used. *Following T5, our casting of WSC as a text generation problems means we can only train on examples where the supplied referent is correct. This means our training dataset is smaller than the normal WSC training dataset, which has 554 examples.
+
+| Split | False | True |
| Training | 37.7 | 62.3 |
| Validation | 37.8 | 62.2 |
+
+Table 8: Label distribution for the BoolQ dataset.
+
+| Split | contradiction | entailment | neutral |
| Training | 47.6 | 46.0 | 6.4 |
| Validation | 50.0 | 41.1 | 8.9 |
+
+Table 9: Label distribution for the CB dataset.
+
+| Split | choice1 | choice2 |
| Training | 48.8 | 51.2 |
| Validation | 55.0 | 45.0 |
+
+Table 10: Label distribution for the COPA dataset.
+
+| Split | False | True |
| Training | 55.9 | 44.1 |
| Validation | 57.2 | 42.8 |
+
+Table 11: Label distribution for the MultiRC dataset.
+
+| Split | False | True |
| Training | 50.0 | 50.0 |
| Validation | 50.0 | 50.0 |
+
+Table 12: Label distribution for the WiC dataset.
+
+| Split | False | True |
| Training | 0.0 | 100.0 |
| Validation | 63.5 | 36.5 |
+
+Table 13: Label distribution for the WSC dataset. Following T5, we cast the WSC dataset to a free-form text generation task where the model generates the referent to the highlighted span instead predicting if the supplied entity is the correct referent of the highlighted span. Thus, we only use training data where the supplied referent is correct making our training label distribution focused entirely on True.
+
+| Split | entailment | not_ entailment |
| Training | 51.2 | 49.8 |
| Validation | 52.7 | 47.3 |
+
+Table 14: Label distribution for the RTE dataset.
+
+| Split | equivalent | not_equivalent |
| Training | 67.4 | 32.6 |
| Validation | 68.4 | 31.6 |
+
+Table 15: Label distribution for the MRPC dataset.
+
+| Split | duplicate | not Duplicate |
| Training | 36.9 | 63.1 |
| Validation | 36.8 | 63.2 |
+
+Table 16: Label distribution for the QQP dataset.
\ No newline at end of file
diff --git a/thepowerofscaleforparameterefficientprompttuning/images.zip b/thepowerofscaleforparameterefficientprompttuning/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..80dc1308413680ba2d3763adcf80430f78a71529
--- /dev/null
+++ b/thepowerofscaleforparameterefficientprompttuning/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:009e318568cffbe31b06593bd2092118232dba780bc9cac401031d1bb86cd1fe
+size 530995
diff --git a/thepowerofscaleforparameterefficientprompttuning/layout.json b/thepowerofscaleforparameterefficientprompttuning/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..414b24ad45d0604d91c1b8989dd95c58d33adb35
--- /dev/null
+++ b/thepowerofscaleforparameterefficientprompttuning/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e5a45004ad185528bba9a3803295d113ab1627ebea2f5d303b2b5d7366887864
+size 456994
diff --git a/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/41b3de8c-32e8-4d18-a9bd-c379a5975e19_content_list.json b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/41b3de8c-32e8-4d18-a9bd-c379a5975e19_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..a7a25e29d85b80195f95e8a0cbcdeb33116b8036
--- /dev/null
+++ b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/41b3de8c-32e8-4d18-a9bd-c379a5975e19_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1e9e999eee175690fab2a2a2a3ada120a9d170846adecaf73464b2236b5385c0
+size 151383
diff --git a/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/41b3de8c-32e8-4d18-a9bd-c379a5975e19_model.json b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/41b3de8c-32e8-4d18-a9bd-c379a5975e19_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..ba41e3786999a6cc4dd34e9e483c059695dc8ee6
--- /dev/null
+++ b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/41b3de8c-32e8-4d18-a9bd-c379a5975e19_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6f79c320f399159405f466b8f2c5920e8517d67ed1a6b9cc22c3246048f8fb0d
+size 174602
diff --git a/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/41b3de8c-32e8-4d18-a9bd-c379a5975e19_origin.pdf b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/41b3de8c-32e8-4d18-a9bd-c379a5975e19_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..9af426a95d9b6ecee83c210814483d7150e4eb15
--- /dev/null
+++ b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/41b3de8c-32e8-4d18-a9bd-c379a5975e19_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1e2388d2dcab3587da93fb9f12e47ce1cc8ef4e2b873e2d0dda7fcdab49ea297
+size 1136435
diff --git a/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/full.md b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..9a1507ca420a5a01e9ddd9b90df77c88619d3de6
--- /dev/null
+++ b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/full.md
@@ -0,0 +1,572 @@
+# The Stem Cell Hypothesis: Dilemma behind Multi-Task Learning with Transformer Encoders
+
+Han He
+
+Department of Computer Science
+
+Emory University
+
+Atlanta, GA 30322 USA
+
+han.he@emory.edu
+
+Jinho D. Choi
+
+Department of Computer Science
+
+Emory University
+
+Atlanta, GA 30322 USA
+
+jinho.choi@emory.edu
+
+# Abstract
+
+Multi-task learning with transformer encoders (MTL) has emerged as a powerful technique to improve performance on closely-related tasks for both accuracy and efficiency while a question still remains whether or not it would perform as well on tasks that are distinct in nature. We first present MTL results on five NLP tasks, POS, NER, DEP, CON, and SRL, and depict its deficiency over single-task learning. We then conduct an extensive pruning analysis to show that a certain set of attention heads get claimed by most tasks during MTL, who interfere with one another to fine-tune those heads for their own objectives. Based on this finding, we propose the Stem Cell Hypothesis to reveal the existence of attention heads naturally talented for many tasks that cannot be jointly trained to create adequate embeddings for all of those tasks. Finally, we design novel parameter-free probes to justify our hypothesis and demonstrate how attention heads are transformed across the five tasks during MTL through label analysis.
+
+# 1 Introduction
+
+Transformer encoders (TEs) have established recent state-of-the-art results on many core NLP tasks (He and Choi, 2019; Yu et al., 2020; Zhang et al., 2020). However, their architectures can be viewed "over-parameterized" as downstream tasks may not need all those parameters, prone to cause an overhead in computation. One promising approach to mitigate this overhead is multi-task learning (MTL) where a TE is shared across multiple tasks; thus, it needs to be run only once to generate final embeddings for all tasks (Clark et al., 2019b).
+
+Despite the success in MTL on closely-related tasks such as language understanding (Wang et al., 2018) or relation extraction (Chen et al., 2020; Lin et al., 2020), MTL on core NLP tasks (e.g., tagging, parsing, labeling) whose decoders are very distinct has not been well-studied. This work employs the state-of-the-art decoders on five core tasks for MTL
+
+and thoroughly analyzes interactions among those tasks to explore a possibility of reducing the computation overhead from TEs. Surprisingly, our experiments depict that models jointly trained by MTL give lower accuracy than ones trained individually, that is against findings from previous work. In fact, models jointly trained with all five tasks perform the worst among any other combination (Section 3).
+
+These experimental results urge us to figure out why MTL on core tasks with a shared TE leads to worse performance than its single-task counterparts. Our exploration begins by detecting essential heads for each task by forcing the TE to use as few attention heads as possible while maintaining accuracy similar to a fully-utilized encoder. Our experiments reveal that all five tasks rely on almost the same set of attention heads. Hence, they compete for those heads during MTL, causing to blur out features extracted by individual tasks. Thus, we propose the Stem Cell Hypothesis, likening these talented attention heads to stem cells, which cannot be fine-tuned for multiple tasks that are very distinct (Section 4).
+
+To validate this hypothesis, many parameter-free probes are designed to observe how every attention head is updated while trained individually or jointly. Intriguingly, we find that heads not fine-tuned for any task can still give remarkably high performance to predict certain linguistic structures, confirming the existence of stem cells inherently more talented; it is consistent with previous work stating that TEs carry on a good amount of syntactic and semantic knowledge (Tenney et al., 2019; Liu et al., 2019a; Jawahar et al., 2019; Hewitt and Manning, 2019). After single-task learning, probing results typically improve along with the task performance, illustrating that the stem cells are developed into more task-specific experts. On the contrary, MTL often drops both probing and task performance, supporting our hypothesis that attention heads lose expertise when exposed to multiple teaching signals that may conflict to one another (Section 5).
+
+The Stem Cell Hypothesis is proposed to shed light on a possible direction to MTL research using TEs, comprising an unbearable amount of parameters, by wisely assigning attention heads to downstream tasks. Although most analysis in this study is based on BERT, we also provide extensive experimental results and visualization of other recent TEs including RoBERTa (Liu et al., 2019c), ELECTRA (Clark et al., 2020) and DeBERTa (He et al., 2020) in §A.4 to further demonstrate the generality of our hypothesis. To the best of knowledge, this is the first time that a comprehensive analysis of attention heads is made for MTL on those core tasks by introducing novel parameter-free probing methods. $^{1}$
+
+# 2 Related Work
+
+A small portion of our work overlaps with multitask learning. MTL with pre-trained transformers specifically in NLP (Wang et al., 2018; Clark et al., 2019b; Liu et al., 2019b; Kondratyuk and Straka, 2019; Chen et al., 2020; Lin et al., 2020) has been widely studied. Most work focuses on neural architecture design to encourage beneficial message passing across tasks. Our MTL framework adopts conventional architecture and applies tricks of batch sampling (Wang et al., 2019) and loss balancing.
+
+Most of our work falls into the analysis of BERT, especially from a linguistic view. Since BERT was introduced, studies on explaining why BERT works have never stopped. The most related studies are those trying to study the linguistic structures learnt by BERT. Among them, Tenney et al. (2019) and Liu et al. (2019a) showed part-of-speech, syntactic chunks and roles can be discovered from BERT embeddings. Using a supervised probe, Hewitt and Manning (2019) successfully discover full dependency parse trees. The encoded dependency structure is also supported by Jawahar et al. (2019) using probes on embeddings. Apart from these parameterized probes, parameter-free approaches (Clark et al., 2019a; Wu et al., 2020) also agree with the existence of rich linguistic knowledge in BERT, which is closely related to our probing methods.
+
+What remains unclear is the impact of fine-turning on TEs. Using supervised probes, Peters et al. (2019) claim that fine-tuning adapts BERT embeddings to downstream tasks, which is later challenged by Hewitt and Liang (2019) since su
+
+pervised probe itself can encode knowledge. Then, Zhao and Bethard (2020) propose a methodology to test such encoding of a linguistic phenomenon by comparing the probing performance before and after fine-tuning. Our probing methods align with these unsupervised probes while focus more on explaining the impact of multi-task learning.
+
+# 3 Multi-Task Learning
+
+Our goal of MTL is to build a joint model sharing the same encoder but using a distinct decoder for each task that outperforms its single-task counterparts while being faster and more memory efficient. Our model adapts hard parameter sharing (Caruana, 1993) such that all decoders take the same hidden states generated by the shared encoder as input and make task-specific predictions in parallel.
+
+# 3.1 Shared Encoder
+
+For main experiments, BERT (Devlin et al., 2019) is used as the shared encoder although our approach can be adapted to any transformer encoders (§A.4). Every token gets split into subtokens by BERT; eventually, the average of the last layer's hidden states generated for those subtokens is used as the final embedding of that token. Additionally, word dropout is applied for generalization by replacing random subtokens with [MASK] during training.
+
+# 3.2 Task-Specific Decoders
+
+Five tasks are experimented, part-of-speech tagging (POS), named entity recognition (NER), dependency parsing (DEP), constituency parsing (CON), and semantic role labeling (SRL). For each task, a state-of-the-art decoder is adopted (except for POS) to provide a modern benchmark for MTL on these tasks, and simplified to build an efficient model.
+
+POS A linear layer is used as a POS decoder that takes the final embedding of each token from BERT and generates the output vector where each dimension gives the score of a particular POS tag.
+
+NER The biaffine decoder (Yu et al., 2020) is used for NER. For simplification, document context, fastText and character-level embeddings as well as variational BiLSTM encoding from the original approach are removed.
+
+DEP The biaffine decoder (Dozat and Manning, 2017) is used for DEP as well. For simplification, part-of-speech tags, character-level embeddings and the variational BiLSTM are removed in our
+
+ | POS | NER | DEP | CON | SRL | MTL-5 |
| POS | 98.32 ± 0.02 | 98.28 ± 0.01 | 98.28 ± 0.02 | 98.30 ± 0.02 | 98.27 ± 0.02 | 98.25 ± 0.01 |
| NER | 89.34 ± 0.24 | 89.04 ± 0.14 | 89.43 ± 0.14 | 88.38 ± 0.06 | 89.18 ± 0.25 | 88.94 ± 0.10 |
| DEP | 94.04 ± 0.02 | 94.06 ± 0.07 | 94.24 ± 0.03 | 94.12 ± 0.04 | 94.12 ± 0.03 | 93.84 ± 0.08 |
| CON | 94.23 ± 0.03 | 94.38 ± 0.04 | 94.33 ± 0.02 | 94.43 ± 0.03 | 94.25 ± 0.05 | 94.10 ± 0.05 |
| SRL | 82.92 ± 0.10 | 82.39 ± 0.07 | 82.05 ± 0.03 | 83.17 ± 0.02 | 82.93 ± 0.08 | 82.30 ± 0.13 |
+
+Table 1: Performance of single-task learning (main diagonal highlighted in gray), multi-task learning on all 5 tasks (MTL-5), and multi-task learning on every pair of the tasks (non-diagonal cells; e.g., DEP'th row in NER'th column is the DEP result of the joint model between DEP and NER). See also Table 12 for similar results of other TEs.
+
+approach. Also, the final embedding of [CLS] from BERT is used to represent the root node.
+
+CON The two-stage CRF decoder is used for CON (Zhang et al., 2020). The unlabeled bracket scorer is optimized using a tree-structure CRF objective on unlabeled constituents. The encoding layer from the original approach is substituted by BERT. Also, [CLS] and [SEP] in BERT are used to represent [BOS] and [EOS], respectively.
+
+SRL The end-to-end span ranking decoder (He et al., 2018) is used for SRL. The attention-based span representations are replaced by the averaged embeddings as suggested by Xia et al. (2019). For simplification, a linear layer is used as the ranker instead of the biaffine one since they have shown similar performance in our preliminary experiments.
+
+# 3.3 Data and Loss Balancing
+
+During multi-task training, batches from different tasks are shuffled together and randomly sampled to optimize the shared encoder and the corresponding decoder. Following Wang et al. (2019), a task is sampled based on a probability proportional to its dataset size raised to the power of 0.8. To balance the losses of all tasks, a running average of every task is monitored and its loss is updated as follow:
+
+$$
+\mathcal {L} _ {t} ^ {\prime} = \frac {\sum_ {\forall i} \bar {\mathcal {L}} _ {i}}{\bar {\mathcal {L}} _ {t}} \cdot \mathcal {L} _ {t}
+$$
+
+$\mathcal{L}_t$ is the current loss of the task $t$ , $\bar{\mathcal{L}}_t$ is the running average of the most recent 5 losses of $t$ , and $\mathcal{L}_t^\prime$ is the updated loss of $t$ . This balancing method normalizes the loss of each task to the same magnitude and has shown to prevent MTL from being biased to specific tasks in our preliminary experiments.
+
+# 3.4 MTL Experiments
+
+Our models are experimented on the OntoNotes 5 (Weischedel et al., 2013) using the data split suggested by Pradhan et al. (2013). Table 1 illustrates performance of all models using the following evaluation metrics - POS: accuracy, NER: span-level
+
+labeled F1, DEP: labeled attachment score, CON: constituent-level labeled F1, SRL: micro-averaged F1 of (predicate, argument, label). Every model is trained 3 times and their average score and standard deviation on the test set are reported. For DEP, the gold trees from CON are converted into the Stanford dependencies v3.3.0 (de Marneffe and Manning, 2008). Detailed descriptions about the experimental settings are provided in Appendix A.2.
+
+Single-task learning models are first trained then compared to the MTL model trained on all 5 tasks (MTL-5). Interestingly, MTL-5 is outperformed by its single-task counterparts for all tasks. Due to the high complexity of MTL-5, it is hard to tell which combinations of tasks introduce negative transfer. Thus, we conduct MTL on every pair of the tasks to observe if there is any task combination that yields a positive result (non-diagonal cells in Table 1).
+
+Among the 10 pairwise task combinations, none of them derives a win-win situation. NER results are generally improved with MTL although results on the other tasks are degraded, implying that NER takes advantage of the other tasks by hurting their performance. SRL is also benefited from CON although it is not the case for the other way around. Results of other recent TEs reveal similar patterns as shown in Appendix A.4.
+
+# 4 Pruning Analysis
+
+To answer why MTL leads to suboptimal results in Section 3, pruning strategies are applied to BERT such that only attention heads absolutely necessary to get the best performance are kept for every task. This allows us to see if there exists a common set of heads that multiple tasks want to claim and train for only their objectives, which can cause conflicts for those heads to be shared across all tasks.
+
+# 4.1 Pruning based on $L_0$ -Regularization
+
+BERT is essentially a stack of multi-head attention layers and there is a wide consensus that different layers learn distinct knowledge (Lin et al., 2019;
+
+ | Performance | % of Attention Heads Kept | PS/S |
| STL | STL-SP | STL-DP | MTL-DP | STL-SP | STL-DP | MTL-DP | STL | STL-DP |
| POS | 98.32±0.02 | 98.22±0.03 | 98.35±0.02 | 98.28±0.01 | 53.24±4.07 | 40.51±1.61 | 50.70±1.20 | 405 | 1,245 |
| NER | 89.04±0.14 | 88.87±0.10 | 89.05±0.08 | 88.78±0.13 | 57.87±2.63 | 49.77±7.13 | 50.70±1.20 | 661 | 700 |
| DEP | 94.24±0.03 | 94.08±0.10 | 94.22±0.06 | 93.92±0.06 | 63.66±5.02 | 50.00±2.08 | 50.70±1.20 | 241 | 601 |
| CON | 94.43±0.03 | 94.16±0.08 | 94.24±0.03 | 94.16±0.05 | 45.37±0.40 | 44.91±0.40 | 50.70±1.20 | 191 | 397 |
| SRL | 82.93±0.08 | 83.01±0.05 | 83.11±0.16 | 82.77±0.10 | 82.41±5.99 | 53.24±4.07 | 50.70±1.20 | 299 | 326 |
+
+Table 2: Results of single-task learning (STL), STL with static pruning (STL-SP), STL with dynamic pruning (STL-DP), and multi-task learning on the 5 tasks with dynamic pruning (MTL-DP). PS/S: processed samples per second for speed comparison. The STL Performance column is equivalent to the main diagonal in Table 1. See also Table 13 for pruning results of other recent TEs.
+
+Hewitt and Manning, 2019; Jawahar et al., 2019; Liu et al., 2019a; Tenney et al., 2019). Inspired by this, we analyze if each head learns features unique to process different tasks. First, $L_{0}$ -regularization is applied (Louizos et al., 2018) to encourage BERT to use as few heads as possible during training. In particular, a binary variable $z_{j}$ is assigned to the $j$ 'th head and multiplied to the output of that head (see Vaswani et al. (2017) for $\mathbf{Q}, \mathbf{K}, \mathbf{V}, d_{k}$ ):
+
+$\mathbf{Attention}^{(j)}(\mathbf{Q}, \mathbf{K}, \mathbf{V}) = z_{j} \cdot \operatorname{softmax}\left(\frac{\mathbf{Q}\mathbf{K}^{\top}}{\sqrt{d_{k}}}\right)\mathbf{V}$
+
+Unfortunately, these binary variables $\mathbf{z} = \{z_{j} : \forall_{j=[1,\ell]}\}$ ( $\ell$ : total # of heads) are discrete and non-differentiable so cannot be directly learnt using gradient based optimization. To allow for efficient continuous optimization, each $\mathbf{z}_{j}$ is then relaxed as a random variable drawn independently from a continuous random distribution. Specifically, the relaxed $\mathbf{z}$ is re-parameterized by its inverse of the cumulative density function (CDF) as $G_{\alpha}(\mathbf{u})$ . It is sampled as follows, where $\alpha$ is a learnable parameter of the inverse CDF, $U$ is the uniform distribution over the interval $[0,1]$ and $\mathbf{u} = \{u_{j} : \forall_{j=[1,\ell]}\}$ denotes the iid samples from it:
+
+$$
+\mathbf {u} \sim U (0, 1) \quad \Rightarrow \quad \mathbf {z} = G _ {\boldsymbol {\alpha}} (\mathbf {u})
+$$
+
+Then, the Hard Concrete Distribution (Louizos et al., 2018) is chosen for $\mathbf{z}$ , which gives the following form of $G_{\alpha}(\mathbf{u})$ that is differentiable, where $(l,r)$ defines the interval that $g_{\alpha}(\mathbf{u})$ can be stretched into $(l < 0, r > 1)$ :
+
+$$
+g _ {\boldsymbol {\alpha}} (\mathbf {u}) = \operatorname {s i g m o i d} \left(\log \mathbf {u} - \log (\mathbf {1} - \mathbf {u}) + \boldsymbol {\alpha}\right)
+$$
+
+$$
+G _ {\boldsymbol {\alpha}} (\mathbf {u}) = \min (\mathbf {1}, \max (\mathbf {0}, g _ {\boldsymbol {\alpha}} (\mathbf {u}) \times (r - l) + l))
+$$
+
+By sampling $\mathbf{u}$ and applying the Monte Carlo approximation, the learnable $L_{0}$ -objective is obtained in a closed form, which gets jointly optimized with
+
+a task specific loss or the balanced MTL loss:
+
+$$
+\mathbb {E} _ {\mathbf {u} \sim U (0, 1)} [ \mathbf {z} ] = \operatorname {s i g m o i d} \left(\alpha - \log \frac {- l}{r}\right) \tag {1}
+$$
+
+$$
+\mathbb {E} _ {\mathbf {u} \sim U (0, 1)} [ L _ {0} ] = \sum_ {j = 1} \mathbb {E} [ z _ {j} ]
+$$
+
+# 4.2 Pruning Strategies
+
+Two types of pruning strategies, static and dynamic, are applied for the attention head analysis:
+
+Static Pruning We refer to the conventional two-stage train-then-prune as static pruning (SP) since it fine-tunes the encoder first then freezes the decoder for pruning (Voita et al., 2019).
+
+Dynamic Pruning Since SP requires twice the efforts to obtain a pruned model, we propose a new method that simultaneously fine-tunes and prunes. This strategy is referred to as dynamic pruning (DP) since the decoder dynamically adapts to the encoder that is being pruned during training, as opposed to SP which instead freezes the decoder. DP is found to be more effective in our experiments.
+
+All pruning models are trained for 3 runs with different random seeds and the best checkpoints by scores on development sets are kept. Once trained, $\mathbb{E}_{\mathbf{u}\sim U(0,1)}[\mathbf{z}]\in (0,1)$ is used as a measure of how much each head is being utilized.
+
+# 4.3 Pruning Experiments
+
+Table 2 shows single-task learning (STL) results using SP and DP on the 5 tasks. Our DP strategy consistently performs better than the SP strategy as it shows higher accuracy on all tasks and prunes significantly greater numbers of heads except for CON. Compared to the STL models without any pruning, the STL-DP models perform well or slightly better for POS/NER/SRL due to the $L_0$ -regularization, yet use ≈50% fewer numbers of heads.
+
+
+
+
+
+
+
+
+
+
+
+
+(f) 3-run utilization of the MTL-DP model, where each run is encoded in a RGB channel. Darker indicates higher utilization.
+Figure 1: Head utilization of the STL-DP models (a - e, g) and the MTL-DP model (f). The detailed quantification of correlations is shown in Table 3. See also Figure 9,11 and 13 for similar visualization of other recent TEs.
+
+
+DEP
+(g) Average head utilization rates among the 5 tasks in 3 runs. Darker cells indicate higher utilization rates.
+
+Comparing the STL-DP models across different tasks, SRL requires more heads than DEP and CON, which require more than POS. This aligns with the intuition behind their difficulty levels as semantic $>$ syntactic $>$ lexical relations. On the other hand, NER requires more heads than CON because of the world knowledge it needs to capture from the data; thus, this knowledge is more scattered.
+
+Finally, DP is applied to MTL-5 (MTL-DP), which shows slightly higher accuracy than MTL-5 in Table 1 except for NER by pruning $50\%$ of the heads. This might imply that all tasks want to claim a similar set of heads even though about a half of the heads are underutilized during MTL training.
+
+# 4.4 Pruning Visualization
+
+To visualize the utilization of heads across runs, the utilization rate $z_{j,t}^{(r)}$ of the $j$ 'th head in the $r$ 'th run for the task $t$ is encoded to the RGB channels:
+
+$$
+\mathrm {R} / \mathrm {G} / \mathrm {B} _ {j, t} = 2 5 5 \times \left(1 - z _ {j, t} ^ {(1 / 2 / 3)}\right)
+$$
+
+For instance, RGB of $(0,0,0)$ is black indicating that the head is $100\%$ utilized in all 3 runs. Based
+
+on this scheme, the head utilizations of all STL-DP models as well as the MTL-DP model are plotted in Figures $1\mathrm{a}\sim 1\mathrm{f}$ . To depict the overlaps of utilized heads across tasks, $z$ 's are averaged over all STLDP models for all runs then plotted as a grayscale heatmap (Figure 1g) using the following scheme:
+
+$$
+H _ {j} = \frac {1}{1 5} \sum_ {r = 1} ^ {3} \sum_ {t = 1} ^ {5} z _ {j, t} ^ {(r)}
+$$
+
+Consistent head utilization by runs As shown in Figures $1\mathrm{a}\sim 1\mathrm{e}$ and the main diagonal in Table 3, the head utilization per task seems quite similar across different runs, especially for syntactic/semantic tasks such as DEP/CON/SRL. The head utilization of POS seems to be random because it is a simple task so that high performance can be achieved by a small set of the re-utilized heads. This consistency across different runs is an essential prerequisite for the following analyses.
+
+Consistent head utilization across tasks Figures $1\mathrm{a}\sim 1\mathrm{e}$ show that all of these tasks are mostly utilizing heads from layers 5 to 8 (looking like $\mathbf{M}$ ).
+
+ | POS | NER | DEP | CON | SRL | MTL-5 |
| POS | 75.51 | 74.77 | 76.45 | 83.54 | 73.32 | 78.34 |
| NER | 74.77 | 73.28 | 73.57 | 75.23 | 74.44 | 66.99 |
| DEP | 76.45 | 73.57 | 89.89 | 89.27 | 91.20 | 84.39 |
| CON | 83.54 | 75.23 | 89.27 | 83.99 | 83.90 | 80.71 |
| SRL | 73.32 | 74.44 | 91.20 | 83.90 | 81.01 | 80.07 |
| MTL-5 | 78.34 | 66.99 | 84.39 | 80.71 | 80.07 | 85.88 |
+
+Table 3: Adjusted R-squared of 3-run head utilization rates using the third run as the dependent variable (main diagonal highlighted in gray) and Pearson Correlation Coefficient of averaged head utilization rates between each pair of models (non-diagonal cells).
+
+In contrast to Jawahar et al. (2019) and Tenney et al. (2019), our findings suggest that the middle layers also provide rich surface and semantic features, which are aligned with Liu et al. (2019a) showing that both POS and chunking tasks perform the best when heads from the middle layers are utilized.
+
+Consistent head utilization by STL and MTL Figures 1f and $1\mathrm{g}$ illustrate almost the identical utilization patterns, implying that the MTL-DP model re-uses a very similar set of heads used by the STL-DP models. According to Vaswani et al. (2017), the representation capacity of every head is limited by the design of multi-head attention. Since (1) a similar set of heads are used across multiple tasks and (2) the limited representation capacity of individual heads confines them to only specific tasks, forcing them for MTL leads to worse results. Given this analogy, we propose the following hypothesis:
+
+There exists a subset of attention heads in a transformer called "stem cells" that are commonly used by many tasks, which cannot be jointly trained for multiple tasks that are very different in nature. We refer to this claim as the Stem Cell Hypothesis and seek to test it through the probing analysis.
+
+# 5 Probing Analysis
+
+This paper hypothesizes the existence of stem cells, which cannot be trained to create adequate embeddings to be shared by multiple tasks that are not so similar. This section provides empirical evidence to this hypothesis by probing what roles each attention head plays once fine-tuned for end tasks.
+
+# 5.1 Probing Methods
+
+Previous studies on probing transformer encoders have focused on layer-level analysis limited to supervised probing (Hewitt and Manning, 2019; Tenney et al., 2019; Lin et al., 2019; Jawahar et al.,
+
+2019; Zhao and Bethard, 2020). This section introduces probes on the head-level instead to analyze the impact of fine-tuning on every individual head. Since developing supervised probes on hundreds of heads requires extensive resource, parameter-free probing methods are used in this study.
+
+Attention Probes Attention between two words often matches a certain linguistic relation that gives a good indicator to knowledge encoded in the head. Our decoders for DEP and SRL learn relationships between head/dependent words and predicate/argument words respectively, which can be directly benefited from these attentions. Thus, the attention matrix from each head is used as the probe of that head. Following Clark et al. (2019a), an undirected edge is created between each word and its most attending word. First, the substring-subtoken attention matrix is converted into a word-word matrix by averaging the attention probabilities of each multi-subtoken word. The arg max of each row $r$ in the attention matrix is then calculated, denoted as $\mathbf{g}_r$ , and evaluated on the basis of each task.
+
+For DEP, directions of the gold arcs are removed and compared against the predicted arcs as follows $(h|d)$ : the index of a headdependent word, $(h,d)$ .. an undirected arc from the gold tree, $n$ #of arcs):
+
+$$
+\frac {1}{n} \sum_ {\forall (h, d)} \mathbb {1} (\mathbf {g} _ {h} = d \parallel \mathbf {g} _ {d} = h)
+$$
+
+For SRL, we design a new probing method to evaluate how each word in the argument span is attended to the head word in its predicate ( $p$ : the index of a predicate head word, $T^p$ : word indices in the span of $p$ 's argument, $m$ : # of predicate-argument pairs):
+
+$$
+\frac {1}{m} \sum_ {\forall p, \forall T ^ {p}} \mathbb {1} \left(\mathbf {g} _ {p} \in T ^ {p} \| \exists t \in T ^ {p}: \mathbf {g} _ {t} = p\right)
+$$
+
+Only head words in the predicates are used for this analysis, which affects verb-particle constructions (e.g., only throw is used for throw away). Moreover, not all words in an argument span are necessarily important to add meaning to its predicate. We will explore these aspects in the future.
+
+Attended-Value Probes POS/NER/CON can be viewed as tasks to find and label spans in a sentence, where the span is a word for POS, a sequence of consecutive words for NER and CON, where a span can be overlapped with another span for CON. For
+
+these tasks, we again present a new probing method, depicted in Algorithm 1, that predicts the label of each span based on its representation:
+
+Algorithm 1: Attended-Value Probing
+```latex
+Function PseudoCluster $(\mathbf{H},\mathcal{S})$ .. $\mathbf{C}\gets \mathbf{0}\in \mathbb{R}^{m\times d},\mathbf{n}\gets \mathbf{0}\in \mathbb{R}^{m\times 1}$ foreach $(b,e,\ell)\in S$ do $\begin{array}{r}\mathbf{C}_{\ell}\leftarrow \mathbf{C}_{\ell} + \mathrm{mean}(\mathbf{H}_{b},\dots ,\mathbf{H}_{e})\\ \mathbf{n}_{\ell}\leftarrow \mathbf{n}_{\ell} + 1\\ \mathbf{return}\mathbf{C} / \mathbf{n} \end{array}$
+```
+
+Function AVProbe $(\mathbf{C},\mathbf{H})$ ..
+```lua
+return arg max(cossim(C,H))
+```
+
+The attended-value matrix $\mathbf{H} \in \mathbb{R}^{n \times d}$ is created by multiplying the attention matrix $\mathbf{A} \in \mathbb{R}^{n \times n}$ to the value matrix $\mathbf{V} \in \mathbb{R}^{n \times d}$ (Section 4.1) such that $\mathbf{H} = \mathbf{A}\mathbf{V}$ ( $n$ : sentence length, $d$ : embedding size, abbreviated $d_k$ ). $\mathcal{S}$ is the set of gold spans, $m$ is the total number of labels, $(b, e, \ell)$ denotes the indices of the beginning word, the ending word, and the label respectively, and $\text{cossim}$ is a cosine similarity function with broadcasting enabled.
+
+With Algorithm 1, the centroid of each label is obtained through PseudoCluster then used to predict labels of all spans. Note that for CON, only constituents on the height-3 (right above the POS-level) are used for this analysis. We experimented with constituents on higher levels, which did not show good correlation with model performance as the spans got longer and noisy. We plan to design another probing method for deeper analysis in CON.
+
+# 5.2 Probing Experiments
+
+Probing experiments are conducted on all attention heads in the pre-trained BERT (Devlin et al., 2019) and fine-tuned models trained by single-task learning (STL; diagonal in Table 1), pairwise multi-task learning (MTL; other cells in Table 1), and 5-task multitask learning (MTL-5; last column in Table 1) using the two probing methods, attention probes and attended-value probes (Section 5.1). For each model, the head with the highest probing accuracy among 144 heads (12 heads per layer, 12 layers) is selected per label. Since every model is developed 3 times using different random seeds for better generalization (Section 3.4), 3 heads are selected per label, which are averaged to get the final probing score for that label. The full probing results with respect to all labels are described in Appendix A.3.
+
+Two important observations are found from these experiments. (1) Even without fine-tuning, certain heads perform remarkably well on particular labels, confirming the existence of stem cells (Sec. 5.2.1). (2) Most heads show higher performance once finetuned; nonetheless, MTL does not always enhance them for all tasks. In fact, MTL models show improvement on only a few labels (Sec. 5.2.2), while MTL-5 models show no benefit for most labels.
+
+# 5.2.1 Pluripotent Stem Cells
+
+The probing results of pre-trained attention heads from BERT (before fine-tuning) are visualized to verify the existence and pluripotency of stem cells. These results show very high accuracies for many labels, confirming the existence of stem cells. As they reside in the same pre-trained model, their pluripotency is therefore implied. Specifically, the number of probing tasks is 203 (POS:49, NER:19, SRL:67, DEP:45, CON:23 as shown in Appendix A.3.3) which is larger than the number of heads (144) in BERT-base by itself. Not all of them provide task specific knowledge as shown in our pruning experiments (Section 4), so the number of utilized heads is even smaller. As a result, some heads must play multiple roles in different tasks.
+
+Dependency Parsing For DEP, probing results from the best performing heads with respect to their layers for all labels are plotted in Figure 2, some of which are even comparable to supervised results.
+
+
+Figure 2: DEP layer analysis of pre-trained heads.
+
+The best performing head of BERT finds the ROOT of a sentence with a $96.25\%$ accuracy without any supervision, demonstrating its ability to convey the concept. Furthermore, the identification of ROOT
+
+happens mostly at the early stage of inference, i.e. in layers 2 and 3. This finding may conflict with the idea of syntactic features getting learned in middle layers (Jawahar et al., 2019). It takes the argument from Tenney et al. (2019) a step further suggesting that syntax can be encoded in early layers of TEs.
+
+Semantic Role Labeling As shown in Figure 3, probing shows promising results on many semantic roles. Specifically, numbered arguments (ARG0-4) are recognized in layers 5 to 7, while modifiers are identified in layers 8 to 10 with $>80\%$ accuracies, including ARGM-MOD (modals), ARGM-DIR (directional), ARGM-EXT (extent), ARGM-LVB (light-verb), and ARGM-COM (comitative). Unlike DEP that most labels are learned within the first 7 layers, SRL requires $7+$ layers to be learned such that no role reaches the peak before layer 5. This implies that semantic roles take more efforts to be learned than syntactic dependencies.
+
+
+Figure 3: SRL layer analysis of pre-trained heads.
+
+# 5.2.2 Stem Cells Specialization
+
+Though stem cells are pluripotent, they develop into specialized ones in STL and lose specialities in MTL according to the following comparisons of best performing heads across BERT, STL and MTL models.
+
+Part-of-Speech Tagging Figure 4 compares the heads in the STL model against the other models; the $y$ -axis shows the probing results from the model in the $x$ -axis subtracted by the results of the STL model. Labels (sorted by frequency) with negative scores for BERT imply that STL performs better on those labels than BERT (without getting finetuned), whereas negative labels with the other models (e.g., NER, DEP) imply that the joint models
+
+perform worse than the STL model on those labels.
+
+
+Figure 4: POS probing results comparison.
+
+For POS, MTL degrades performance for most labels compared to STL. Even without getting finetuned, the pre-trained BERT model performs very well on punctuation labels, which is expected. The performance on $\mathsf{WP}\mathbb{S}$ (possessive wh-pronoun) is significantly improved with NER, DEP, and SRL as a possessive wh-pronoun (e.g., whose) often follows a name or is used in a relative clause that plays an important role in DEP and SRL.
+
+Named Entity Recognition For NER, BERT detects PERCENT, MONEY, LAW, LANGUAGE, NORP (national|religious|political groups) and PRODUCT with over $90\%$ probing accuracy, probably due to the rich set of those entities present in pre-training data. Although most joint models degrade probing results for nearly every entity type, POS and DEP improve upon more entity types than the other tasks (Figure 5), which is consistent with the results illustrated in Table 1.
+
+
+Figure 5: NER probing results comparison.
+
+Constituency Parsing As shown in Figure 6, POS improves the most number of constituent types but also causes the largest drop among the MTL models for the most frequent type, NP (noun phrase). This contributes to related constituent types such as RB (adverb) in ADVP (RB phrase), WRB (wh-adverb) in WHADVP (WRB phrase), and UH (interjection) in INTJ (UH phrase). Its dramatic decrease on the NP performance might be due to the internal lexical complexity in NP.
+
+
+Figure 6: CON probing results comparison.
+
+Regarding NER, its boost on ADVP can be due to temporal entities (TIME, DATE) nested within ADVP such as (ADVP (NP one year) ago), where one year ago is a DATE entity. As for PP (preposition phrase), it usually follows the induction rule of $\mathrm{PP} \rightarrow \mathrm{IN} / \mathrm{TO} + \mathrm{NP}$ , where the NP is often an named entity (e.g., (PP (TO to) (NP Mary))). Regarding DEP, it mainly improves wh-phrases like WHNP and WHADVP, which correspond to nsubj and advmod dependency relations, respectively. Regarding SRL, it slightly improves NML (nominal modifiers) and FRAG (fragment), which may be ascribed to the strength of the span-based SRL not requiring constituency structures for decoding.
+
+Note that in these probing analyses, we selected the best performing heads from each model independently as their locations are not regular anymore. Without the pruning objective (Equation 1), the locations of the best performing heads are non-regular possibly due to the knowledge transfer between stem cells and non-stem cells. Thus, knowledge transferring from stem cells to non-stem cells becomes much easier when the models are free to use as many heads as they want. In fact, when finetuned without the pruning objective, many stem cell attention heads transfer their knowledge to non-stem cell heads to get specialized. It is a phe
+
+nomenon frequently observed in many previous works (Tenney et al., 2019; Liu et al., 2019a; Jawahar et al., 2019) and this work (Section 5.2.2) that certain layers achieve best performance of certain tasks. Given that the stem cells of BERT are mostly in middle layers (Section 4.4), we believe that the best performing layers or heads in lower or higher layers are the results of transfer learning on stem cells. In reality, a stem cell also moves from its original area (e.g., bone marrow) to another area (e.g., bone surface) to get specialized.
+
+# 6 Conclusion
+
+This study analyzes interference on the 5 core tasks by highlighting naturally talented attention heads, whose importance turns out to be invariant for many downstream tasks. The Stem Cell Hypothesis states that these talented heads are like stem cells that can develop into experts but not all-rounders. Our hypothesis is validated by several novel parameter-free probes, revealing the interfered representations of stem cells. We will adapt this work to more tasks and languages for broader generality in the future.
+
+# References
+
+Richard A. Caruana. 1993. Multitask Learning: A Knowledge-Based Source of Inductive Bias. In Proceedings of the 10th International Conference on Machine Learning, ICML'93, pages 41-48.
+Daoyuan Chen, Yaliang Li, Kai Lei, and Ying Shen. 2020. Relabel the Noise: Joint Extraction of Entities and Relations via Cooperative Multiagents. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5940-5950, Online. Association for Computational Linguistics.
+Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D. Manning. 2019a. What Does BERT Look at? An Analysis of BERT's Attention. In Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 276-286, Florence, Italy. Association for Computational Linguistics.
+Kevin Clark, Minh-Thang Luong, Urvashi Khandelwal, Christopher D. Manning, and Quoc V. Le. 2019b. BAM! Born-Again Multi-Task Networks for Natural Language Understanding. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5931-5937, Florence, Italy. Association for Computational Linguistics.
+Kevin Clark, Minh-Thang Luong, Quoc V. Le, and Christopher D. Manning. 2020. ELECTRA: Pretraining text encoders as discriminators rather than generators. In ICLR.
+
+Marie-Catherine de Marneffe and Christopher D. Manning. 2008. The StanfordTyped Dependencies Representation. In *Coling* 2008: Proceedings of the workshop on *Cross-Framework and Cross-Domain Parser Evaluation*, pages 1–8, Manchester, UK. Coling 2008 Organizing Committee.
+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.
+Timothy Dozat and Christopher D. Manning. 2017. Deep Biaffine Attention for Neural Dependency Parsing. In Proceedings of the 5th International Conference on Learning Representations, ICLR'17.
+Han He and Jinho D. Choi. 2019. Establishing Strong Baselines for the New Decade: Sequence Tagging, Syntactic and Semantic Parsing with BERT. In Proceedings of the 33rd International Florida Artificial Intelligence Research Society Conference, FLAIRS'19.
+Luheng He, Kenton Lee, Omer Levy, and Luke Zettlemoyer. 2018. Jointly Predicting Predicates and Arguments in Neural Semantic Role Labeling. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 364-369, Melbourne, Australia. Association for Computational Linguistics.
+Pengcheng He, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. 2020. Deberta: Decoding-enhanced bert with disentangled attention.
+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.
+John Hewitt and Christopher D. Manning. 2019. A Structural Probe for Finding Syntax in Word Representations. 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 4129-4138, Minneapolis, Minnesota. Association for Computational Linguistics.
+Ganesh Jawahar, Benoit Sagot, and Djamé Seddah. 2019. What Does BERT Learn about the Structure of Language? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3651-3657, Florence, Italy. Association for Computational Linguistics.
+
+Dan Kondratyuk and Milan Straka. 2019. 75 Languages, 1 Model: Parsing Universal Dependencies Universally. 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 2779-2795, Hong Kong, China. Association for Computational Linguistics.
+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.
+Yongjie Lin, Yi Chern Tan, and Robert Frank. 2019. Open Sesame: Getting inside BERT's Linguistic Knowledge. In Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 241-253, Florence, Italy. Association for Computational Linguistics.
+Nelson F. Liu, Matt Gardner, Yonatan Belinkov, Matthew E. Peters, and Noah A. Smith. 2019a. Linguistic Knowledge and Transferability of Contextual Representations. 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 1073-1094, Minneapolis, Minnesota. Association for Computational Linguistics.
+Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. 2019b. Multi-Task Deep Neural Networks for Natural Language Understanding. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4487-4496, Florence, Italy. Association for Computational Linguistics.
+Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019c. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
+Christos Louizos, Max Welling, and Diederik P. Kingma. 2018. Learning Sparse Neural Networks through $L_{0}$ Regularization. In International Conference on Learning Representations.
+Matthew E. Peters, Sebastian Ruder, and Noah A. Smith. 2019. To Tune or Not to Tune? Adapting Pretrained Representations to Diverse Tasks. In Proceedings of the 4th Workshop on Representation Learning for NLP (RepL4NLP-2019), pages 7-14, Florence, Italy. Association for Computational Linguistics.
+Sameer Pradhan, Alessandro Moschitti, Nianwen Xue, Hwee Tou Ng, Anders Björkelund, Olga Uryupina, Yuchen Zhang, and Zhi Zhong. 2013. Towards Robust Linguistic Analysis using OntoNotes. In Proceedings of the Seventeenth Conference on Computational Natural Language Learning, pages 143-152,
+
+Sofia, Bulgaria. Association for Computational Linguistics.
+Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019. BERT Rediscover the Classical NLP Pipeline. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4593-4601, Florence, Italy. Association for Computational Linguistics.
+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, volume 30. Curran Associates, Inc.
+Elena Voita, David Talbot, Fedor Moiseev, Rico Sennrich, and Ivan Titov. 2019. Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Pruned. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5797-5808, Florence, Italy. Association for Computational Linguistics.
+Alex Wang, Jan Hula, Patrick Xia, Raghavendra Pappagari, R. Thomas McCoy, Roma Patel, Najoung Kim, Ian Tenney, Yinghui Huang, Katherin Yu, Shuning Jin, Berlin Chen, Benjamin Van Durme, Edouard Grave, Ellie Pavlick, and Samuel R. Bowman. 2019. Can You Tell Me How to Get Past Sesame Street? Sentence-Level Pretraining Beyond Language Modeling. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4465-4476, Florence, Italy. Association for Computational Linguistics.
+Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018. GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353–355, Brussels, Belgium. Association for Computational Linguistics.
+Ralph Weischedel, Martha Palmer, Mitchell Marcus, Eduard Hovy, Sameer Pradhan, Lance Ramshaw, Nianwen Xue, Ann Taylor, Jeff Kaufman, Michelle Franchini, et al. 2013. Ontonotes release 5.0 ldc2013t19. Linguistic Data Consortium, Philadelphia, PA.
+Zhiyong Wu, Yun Chen, Ben Kao, and Qun Liu. 2020. Perturbed Masking: Parameter-free Probing for Analyzing and Interpreting BERT. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4166-4176, Online. Association for Computational Linguistics.
+Qingrong Xia, Zhenghua Li, and Min Zhang. 2019. A Syntax-aware Multi-task Learning Framework for Chinese Semantic Role Labeling. 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 5382-5392, Hong Kong, China. Association for Computational Linguistics.
+Juntao Yu, Bernd Bohnet, and Massimo Poesio. 2020. Named Entity Recognition as Dependency Parsing. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6470-6476, Online. Association for Computational Linguistics.
+Yu Zhang, Houquan Zhou, and Zhenghua Li. 2020. Fast and Accurate Neural CRF Constituency Parsing. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, pages 4046-4053. International Joint Conferences on Artificial Intelligence Organization. Main track.
+Yiyun Zhao and Steven Bethard. 2020. How does BERT's attention change when you fine-tune? An analysis methodology and a case study in negation scope. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4729-4747, Online. Association for Computational Linguistics.
+
+# A Appendix
+
+# A.1 Corpus Statistics
+
+Table 4 and 5 describes statistics of the POS, NER, DEP, CON, SRL datasets used in our experiments.
+
+ | Sentences | Tokens |
| TRN | 75,187 | 1,299,312 |
| DEV | 9,603 | 163,104 |
| TST | 9,479 | 169,579 |
+
+Table 4: POS, DEP, CON, SRL statistics of OntoNotes 5. TRN/DEV/TST: training/development/evaluation set.
+
+ | Sentences | Tokens |
| TRN | 59,924 | 1,088,503 |
| DEV | 8,528 | 147,724 |
| TST | 8,262 | 152,728 |
+
+# A.2 Hyper-Parameter Configuration
+
+The hyper-parameters used in our models are described in Table 6.
+
+Table 5: NER statistics of OntoNotes 5. TRN/DEV/TST: training/development/evaluation set.
+
+| BERT Encoder |
| name | bert-base-cased |
| layers tag | 12 |
| hidden size | 768 |
| subword dropout | 0.2 |
| Adam Optimizer |
| encoder lr | 5e-5 |
| decoder lr | 1e-3 |
| ε | 1e-8 |
| epochs | 30 |
| warm up | 10 |
| NER Decoder |
| MLP size | 150 |
| dropout | 0.5 |
| DEP Decoder |
| arc MLP size | 500 |
| rel MLP size | 100 |
| dropout | 0.33 |
| CON Decoder |
| span MLP size | 500 |
| label MLP size | 100 |
| dropout | 0.33 |
| SRL Decoder |
| argument ratio | 0.8 |
| predicate ratio | 0.4 |
| span width size | 20 |
| max Span width | 30 |
| label MLP size | 100 |
| dropout | 0.2 |
+
+Table 6: Hyper-parameters settings.
+
+# A.3 Extra BERT Probing Results
+
+# A.3.1 Dependency Parsing
+
+
+Figure 7: DEP probing results comparison.
+
+Compared to STL, a similar trending with POS and NER can be observed that MTL improves only certain relations as shown in Figure 7. Among the 4 tasks, POS improves the least tags in terms of both overall accuracy and probing accuracy. It improves dobj (direct object) and expl (expletive) possibly due to that its decoder needs to assign a verb tag to the ROOT verb and EX (existential there) to "there", enhancing the representations of these two. Regarding NER, it mainly improves modifiers that modify nouns which comprises named entities. In the case of CON, modifiers and complement arguments are improved, most of which usually reside in NP (Noun Phrase) or VP (Verb Phrase) phrases, placing upper bounds on the distance of dependencies. As regards SRL, it improves subjects and clausal relations.
+
+# A.3.2 Semantic Role Labeling
+
+
+Figure 8: SRL probing results comparison.
+
+In comparison to STL illustrated in Figure 8, POS and CON mainly improves ARG0-3 (agent, patient, instrument, benefactive, attribute and starting point) and some modifiers including ARGM-TMP (temporal), ARGM-CAU (cause), ARGM-PRD (secondary predication), ARGM-EXT (extent), ARGM-PNC (purpose) and ARGM-REC (reciprocals). Both POS and CON reveal syntactic functions which appear to coordinate attentions on semantic roles in a similar way. Regarding NER and DEP, they improve arguments that include referent or pronouns (R-ARG1, R-ARG0) and modifiers (ARGM-NEG which is negation, ARGM-CAU, ARGM-PRD, ARGM-EXT), possibly due to the biaffine decoders they employ analogously enhance the heads.
+
+# A.3.3 Detailed Probing Results
+
+With STL as the baseline, probing results for each task are recorded in Table 7 to 11 respectively. In each table, the first column shows the labels sorted by their frequencies in the test set, the second column shows the mean probing results over 3 runs for STL which is the baseline, other columns show the probing results for BERT and MTL models with their differences against the STL baseline (in parentheses, green indicates improvements and red indicates decreases). BERT probing scores are usually much lower than STL, which is expected as it is not fine-tuned on the task data. MTL probing scores are also generally lower than STL, implying interference with other joint tasks.
+
+ | STL | BERT | NER | DEP | CON | SRL | MTL-5 |
| NN | 91.44 | 44.11(-47.33) | 78.22(-13.22) | 75.61(-15.83) | 75.88(-15.56) | 76.80(-14.64) | 54.75(-36.69) |
| IN | 89.79 | 53.45(-36.34) | 88.46(-1.33) | 82.43(-7.36) | 71.27(-18.52) | 65.22(-24.57) | 53.86(-35.93) |
| DT | 93.93 | 65.15(-28.78) | 73.36(-20.57) | 74.13(-19.80) | 81.62(-12.31) | 75.69(-18.24) | 64.11(-29.82) |
| NNP | 90.21 | 67.16(-23.05) | 81.29(-8.92) | 71.09(-19.12) | 73.17(-17.04) | 80.42(-9.79) | 62.11(-28.10) |
| JJ | 83.59 | 37.96(-45.63) | 71.73(-11.86) | 71.10(-12.49) | 70.09(-13.50) | 77.91(-5.68) | 63.35(-20.24) |
| . | 95.02 | 91.03(-3.99) | 95.36(+0.34) | 95.82(+0.80) | 95.91(+0.89) | 95.99(+0.97) | 94.61(-0.41) |
| NNS | 91.75 | 66.19(-25.56) | 80.43(-11.32) | 76.77(-14.98) | 77.16(-14.59) | 84.17(-7.58) | 63.66(-28.09) |
| PRP | 93.76 | 65.69(-28.07) | 91.17(-2.59) | 82.31(-11.45) | 84.87(-8.89) | 87.68(-6.08) | 74.13(-19.63) |
| RB | 83.33 | 28.92(-54.41) | 75.44(-7.89) | 67.30(-16.03) | 63.78(-19.55) | 67.86(-15.47) | 54.27(-29.06) |
| , | 95.23 | 86.94(-8.29) | 89.07(-6.16) | 78.15(-17.08) | 70.08(-25.15) | 93.50(-1.73) | 69.87(-25.36) |
| VB | 90.17 | 69.52(-20.65) | 84.21(-5.96) | 73.87(-16.30) | 76.77(-13.40) | 80.49(-9.68) | 68.76(-21.41) |
| VBD | 90.97 | 56.33(-34.64) | 85.68(-5.29) | 70.51(-20.46) | 71.36(-19.61) | 70.25(-20.72) | 60.42(-30.55) |
| CC | 91.40 | 68.26(-23.14) | 90.09(-1.31) | 71.91(-19.49) | 68.02(-23.38) | 83.39(-8.01) | 67.49(-23.91) |
| VBZ | 92.44 | 74.91(-17.53) | 90.40(-2.04) | 78.07(-14.37) | 80.85(-11.59) | 77.62(-14.82) | 66.56(-25.88) |
| VBP | 90.02 | 56.63(-33.39) | 84.35(-5.67) | 72.21(-17.81) | 73.85(-16.17) | 71.60(-18.42) | 60.45(-29.57) |
| VBN | 88.81 | 53.78(-35.03) | 74.71(-14.10) | 67.99(-20.82) | 70.24(-18.57) | 76.35(-12.46) | 55.83(-32.98) |
| CD | 93.10 | 61.67(-31.43) | 74.84(-18.26) | 88.25(-4.85) | 89.97(-3.13) | 89.95(-3.15) | 66.87(-26.23) |
| VBG | 92.63 | 65.44(-27.19) | 85.51(-7.12) | 78.36(-14.27) | 82.53(-10.10) | 82.19(-10.44) | 66.12(-26.51) |
| TO | 92.38 | 85.24(-7.14) | 87.95(-4.43) | 83.07(-9.31) | 79.26(-13.12) | 78.24(-14.14) | 74.63(-17.75) |
| MD | 92.70 | 65.72(-26.98) | 91.93(-0.77) | 90.69(-2.01) | 90.29(-2.41) | 89.55(-3.15) | 89.29(-3.41) |
| PRPS | 92.33 | 76.90(-15.43) | 89.37(-2.96) | 88.84(-3.49) | 86.96(-5.37) | 86.48(-5.85) | 80.86(-11.47) |
| UH | 93.66 | 75.95(-17.71) | 87.03(-6.63) | 76.42(-17.24) | 83.97(-9.69) | 85.52(-8.14) | 73.79(-19.87) |
| HYPH | 91.98 | 90.15(-1.83) | 92.01(+0.03) | 89.90(-2.08) | 88.20(-3.78) | 92.47(+0.49) | 91.23(-0.75) |
| POS | 98.85 | 93.01(-5.84) | 90.80(-8.05) | 98.21(-0.64) | 97.86(-0.99) | 98.37(-0.48) | 92.02(-6.83) |
| , | 89.05 | 76.84(-12.21) | 74.25(-14.80) | 77.14(-11.91) | 71.12(-17.93) | 85.48(-3.57) | 70.51(-18.54) |
| " | 89.54 | 76.98(-12.56) | 79.12(-10.42) | 81.55(-7.99) | 68.74(-20.80) | 87.44(-2.10) | 69.67(-19.87) |
| WDT | 87.26 | 68.74(-18.52) | 85.27(-1.99) | 82.54(-4.72) | 83.23(-4.03) | 80.71(-6.55) | 80.34(-6.92) |
| WP | 90.19 | 76.18(-14.01) | 86.99(-3.20) | 81.88(-8.31) | 83.79(-6.40) | 77.35(-12.84) | 75.89(-14.30) |
| WRB | 89.15 | 72.35(-16.80) | 87.38(-1.77) | 86.68(-2.47) | 83.99(-5.16) | 79.75(-9.40) | 78.44(-10.71) |
| RP | 82.13 | 74.33(-7.80) | 72.20(-9.93) | 79.06(-3.07) | 82.93(+0.80) | 76.13(-6.00) | 71.68(-10.45) |
| : | 84.58 | 66.48(-18.10) | 76.22(-8.36) | 85.89(+1.31) | 80.03(-4.55) | 85.33(+0.75) | 84.02(-0.56) |
| JJR | 87.18 | 56.62(-30.56) | 71.87(-15.31) | 73.65(-13.53) | 72.29(-14.89) | 72.22(-14.96) | 58.62(-28.56) |
| NNPS | 84.39 | 72.11(-12.28) | 75.45(-8.94) | 71.02(-13.37) | 79.74(-4.65) | 79.81(-4.58) | 79.96(-4.43) |
| EX | 95.33 | 89.25(-6.08) | 92.18(-3.15) | 90.55(-4.78) | 90.56(-4.77) | 90.77(-4.56) | 88.49(-6.84) |
| JJS | 83.41 | 58.95(-24.46) | 77.58(-5.83) | 80.64(-2.77) | 76.57(-6.84) | 79.33(-4.08) | 69.87(-13.54) |
| RBR | 87.29 | 67.71(-19.58) | 66.07(-21.22) | 66.07(-21.22) | 69.96(-17.33) | 65.17(-22.12) | 58.00(-29.29) |
| -LRB- | 91.54 | 83.76(-7.78) | 89.68(-1.86) | 89.51(-2.03) | 88.83(-2.71) | 88.66(-2.88) | 85.96(-5.58) |
| -RRB- | 92.18 | 83.67(-8.51) | 88.78(-3.40) | 88.78(-3.40) | 87.07(-5.11) | 89.97(-2.21) | 86.22(-5.96) |
| $ | 97.30 | 95.38(-1.92) | 95.38(-1.92) | 94.99(-2.31) | 94.80(-2.50) | 96.92(-0.38) | 94.99(-2.31) |
| PDT | 87.15 | 84.94(-2.21) | 83.54(-3.61) | 82.73(-4.42) | 81.12(-6.03) | 84.74(-2.41) | 82.53(-4.62) |
| RBS | 86.31 | 72.32(-13.99) | 72.62(-13.69) | 77.68(-8.63) | 71.73(-14.58) | 77.98(-8.33) | 74.41(-11.90) |
| FW | 72.51 | 64.95(-7.56) | 65.98(-6.53) | 69.07(-3.44) | 76.97(+4.46) | 68.04(-4.47) | 70.79(-1.72) |
| NFP | 90.56 | 86.67(-3.89) | 88.89(-1.67) | 93.33(+2.77) | 90.00(-0.56) | 92.22(+1.66) | 86.67(-3.89) |
| WP$ | 92.99 | 89.47(-3.52) | 95.62(+2.63) | 94.74(+1.75) | 92.11(-0.88) | 94.74(+1.75) | 92.98(-0.01) |
| XX | 83.34 | 81.25(-2.09) | 82.29(-1.05) | 86.46(+3.12) | 83.33(-0.01) | 82.29(-1.05) | 81.25(-2.09) |
| SYM | 91.11 | 86.67(-4.44) | 88.89(-2.22) | 94.45(+3.34) | 88.89(-2.22) | 93.33(+2.22) | 91.11(-0.00) |
| ADD | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| LS | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| AFX | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
+
+Table 7: Probing results for POS. STL: the baseline, BERT:pre-trained BERT before fine-tuning.
+
+ | STL | BERT | POS | DEP | CON | SRL | MTL-5 |
| GPE | 91.40 | 76.43(-14.97) | 82.02(-9.38) | 74.70(-16.70) | 79.97(-11.43) | 84.97(-6.43) | 79.73(-11.67) |
| PERSON | 85.90 | 85.51(-0.39) | 85.38(-0.52) | 86.67(+0.77) | 83.65(-2.25) | 83.96(-1.94) | 83.60(-2.30) |
| ORG | 73.81 | 67.80(-6.01) | 74.95(+1.14) | 69.01(-4.80) | 68.04(-5.77) | 72.09(-1.72) | 69.99(-3.82) |
| DATE | 87.39 | 63.17(-24.22) | 62.51(-24.88) | 78.49(-8.90) | 73.53(-13.86) | 82.25(-5.14) | 83.37(-4.02) |
| CARDINAL | 76.33 | 66.63(-9.70) | 66.41(-9.92) | 64.81(-11.52) | 79.22(+2.89) | 73.05(-3.28) | 67.06(-9.27) |
| NORP | 93.34 | 82.28(-11.06) | 89.57(-3.77) | 88.47(-4.87) | 82.72(-10.62) | 89.58(-3.76) | 90.37(-2.97) |
| PERCENT | 99.81 | 99.71(-0.10) | 98.95(-0.86) | 99.71(-0.10) | 99.43(-0.38) | 99.90(+0.09) | 99.71(-0.10) |
| MONEY | 98.30 | 97.77(-0.53) | 96.60(-1.70) | 97.98(-0.32) | 96.60(-1.70) | 97.13(-1.17) | 96.07(-2.23) |
| TIME | 79.25 | 77.36(-1.89) | 78.14(-1.11) | 72.48(-6.77) | 78.77(-0.48) | 77.51(-1.74) | 77.05(-2.20) |
| ORDINAL | 90.94 | 89.74(-1.20) | 90.26(-0.68) | 92.65(+1.71) | 90.43(-0.51) | 88.03(-2.91) | 84.61(-6.33) |
| LOC | 74.86 | 69.83(-5.03) | 76.35(+1.49) | 72.81(-2.05) | 82.87(+8.01) | 74.68(-0.18) | 76.91(+2.05) |
| WORK_OF_ART | 78.11 | 76.51(-1.60) | 74.50(-3.61) | 76.31(-1.80) | 74.50(-3.61) | 79.52(+1.41) | 67.87(-10.24) |
| FAC | 82.96 | 77.78(-5.18) | 86.42(+3.46) | 81.73(-1.23) | 74.07(-8.89) | 85.43(+2.47) | 86.67(+3.71) |
| QUANTITY | 95.55 | 83.81(-11.74) | 95.56(+0.01) | 92.70(-2.85) | 87.62(-7.93) | 94.92(-0.63) | 89.84(-5.71) |
| PRODUCT | 85.09 | 81.58(-3.51) | 86.84(+1.75) | 88.60(+3.51) | 76.75(-8.34) | 84.65(-0.44) | 78.95(-6.14) |
| EVENT | 77.25 | 68.25(-9.00) | 74.60(-2.65) | 71.43(-5.82) | 66.14(-11.11) | 71.43(-5.82) | 70.37(-6.88) |
| LAW | 91.67 | 92.50(+0.83) | 87.50(-4.17) | 90.83(-0.84) | 86.67(-5.00) | 90.00(-1.67) | 87.50(-4.17) |
| LANGUAGE | 98.48 | 95.45(-3.03) | 100.00(+1.52) | 98.48(-0.00) | 98.48(-0.00) | 98.48(-0.00) | 98.48(-0.00) |
+
+Table 8: Probing results for NER. STL: the baseline, BERT:pre-trained BERT before fine-tuning.
+
+ | STL | BERT | POS | NER | CON | SRL | MTL-5 |
| prep | 72.80 | 72.62(-0.18) | 69.98(-2.82) | 70.90(-1.90) | 73.11(+0.31) | 76.60(+3.80) | 78.02(+5.22) |
| pobj | 95.64 | 96.35(+0.71) | 95.01(-0.63) | 91.70(-3.94) | 94.67(-0.97) | 93.45(-2.19) | 88.59(-7.05) |
| nsubj | 76.92 | 76.36(-0.56) | 66.45(-10.47) | 73.78(-3.14) | 73.75(-3.17) | 85.61(+8.69) | 70.69(-6.23) |
| det | 94.07 | 93.70(-0.37) | 93.22(-0.85) | 93.87(-0.20) | 95.68(+1.61) | 95.72(+1.65) | 91.66(-2.41) |
| root | 96.28 | 96.25(-0.03) | 95.83(-0.45) | 96.49(+0.21) | 95.10(-1.18) | 97.77(+1.49) | 95.18(-1.10) |
| nn | 89.08 | 89.47(+0.39) | 84.77(-4.31) | 86.99(-2.09) | 92.59(+3.51) | 89.99(+0.91) | 89.98(+0.90) |
| amod | 92.76 | 93.33(+0.57) | 91.38(-1.38) | 91.63(-1.13) | 95.36(+2.60) | 92.70(-0.06) | 93.50(+0.74) |
| dobj | 93.76 | 94.55(+0.79) | 94.88(+1.12) | 93.60(-0.16) | 93.46(-0.30) | 92.95(-0.81) | 89.07(-4.69) |
| advmod | 70.58 | 69.12(-1.46) | 66.11(-4.47) | 71.85(+1.27) | 69.23(-1.35) | 68.96(-1.62) | 67.92(-2.66) |
| aux | 84.70 | 84.53(-0.17) | 84.03(-0.67) | 85.78(+1.08) | 84.22(-0.48) | 86.06(+1.36) | 84.02(-0.68) |
| cc | 59.17 | 57.86(-1.31) | 58.10(-1.07) | 58.73(-0.44) | 57.11(-2.06) | 54.40(-4.77) | 64.18(+5.01) |
| conj | 66.66 | 64.82(-1.84) | 43.20(-23.46) | 50.76(-15.90) | 65.78(-0.88) | 48.50(-18.16) | 43.52(-23.14) |
| dep | 41.44 | 42.77(+1.33) | 32.82(-8.62) | 41.88(+0.44) | 41.22(-0.22) | 42.01(+0.57) | 38.78(-2.66) |
| poss | 78.20 | 77.96(-0.24) | 79.99(+1.79) | 81.39(+3.19) | 77.72(-0.48) | 72.42(-5.78) | 79.02(+0.82) |
| ccomp | 71.24 | 71.47(+0.23) | 50.24(-21.00) | 69.80(-1.44) | 65.29(-5.95) | 66.38(-4.86) | 61.40(-9.84) |
| cop | 88.80 | 87.09(-1.71) | 87.47(-1.33) | 89.91(+1.11) | 88.74(-0.06) | 88.04(-0.76) | 85.88(-2.92) |
| mark | 89.78 | 90.88(+1.10) | 89.44(-0.34) | 91.01(+1.23) | 90.29(+0.51) | 87.65(-2.13) | 89.75(-0.03) |
| xcomp | 68.11 | 70.53(+2.42) | 65.81(-2.30) | 72.80(+4.69) | 73.20(+5.09) | 73.33(+5.22) | 71.54(+3.43) |
| num | 84.94 | 87.61(+2.67) | 83.58(-1.36) | 87.48(+2.54) | 91.50(+6.56) | 88.02(+3.08) | 90.49(+5.55) |
| rcmod | 51.72 | 52.62(+0.90) | 41.62(-10.10) | 41.96(-9.76) | 52.22(+0.50) | 59.36(+7.64) | 51.52(-0.20) |
| advcl | 52.26 | 54.93(+2.67) | 41.78(-10.48) | 53.70(+1.44) | 49.97(-2.29) | 42.06(-10.20) | 48.50(-3.76) |
| neg | 82.06 | 83.40(+1.34) | 81.66(-0.40) | 82.67(+0.61) | 84.82(+2.76) | 81.09(-0.97) | 78.43(-3.63) |
| auxpass | 97.37 | 97.51(+0.14) | 97.18(-0.19) | 97.26(-0.11) | 95.74(-1.63) | 95.66(-1.71) | 96.24(-1.13) |
| nsubjpass | 79.34 | 83.76(+4.42) | 73.26(-6.08) | 79.43(+0.09) | 73.45(-5.89) | 77.24(-2.10) | 74.59(-4.75) |
| possessive | 99.23 | 99.23(-0.00) | 99.23(-0.00) | 99.20(-0.03) | 99.26(+0.03) | 99.20(-0.03) | 99.33(+0.10) |
| pcomp | 87.55 | 90.06(+2.51) | 83.03(-4.52) | 86.95(-0.60) | 85.11(-2.44) | 84.57(-2.98) | 80.15(-7.40) |
| discourse | 74.04 | 73.80(-0.24) | 50.24(-23.80) | 62.18(-11.86) | 56.72(-17.32) | 73.14(-0.90) | 52.05(-21.99) |
| partmod | 60.08 | 59.47(-0.61) | 59.52(-0.56) | 60.49(+0.41) | 63.14(+3.06) | 64.85(+4.77) | 62.58(+2.50) |
| appos | 54.16 | 47.88(-6.28) | 41.85(-12.31) | 47.30(-6.86) | 54.65(+0.49) | 50.12(-4.04) | 43.55(-10.61) |
| prt | 96.44 | 95.99(-0.45) | 96.39(-0.05) | 96.69(+0.25) | 96.83(+0.39) | 95.30(-1.14) | 96.09(-0.35) |
| number | 80.75 | 78.43(-2.32) | 77.71(-3.04) | 82.86(+2.11) | 81.12(+0.37) | 81.41(+0.66) | 82.57(+1.82) |
| quantmod | 75.49 | 73.06(-2.43) | 72.65(-2.84) | 78.32(+2.83) | 80.18(+4.69) | 73.06(-2.43) | 75.41(-0.08) |
| parataxis | 46.48 | 43.92(-2.56) | 30.69(-15.79) | 45.24(-1.24) | 43.30(-3.18) | 47.79(+1.31) | 33.69(-12.79) |
| infmod | 71.38 | 71.20(-0.18) | 68.35(-3.03) | 70.13(-1.25) | 70.49(-0.89) | 73.24(+1.86) | 68.18(-3.20) |
| tmod | 84.89 | 87.64(+2.75) | 69.23(-15.66) | 78.02(-6.87) | 76.01(-8.88) | 80.31(-4.58) | 62.64(-22.25) |
| expl | 85.73 | 86.27(+0.54) | 86.93(+1.20) | 86.82(+1.09) | 84.75(-0.98) | 84.75(-0.98) | 84.10(-1.63) |
| mwe | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| npadvmod | 86.24 | 87.16(+0.92) | 88.07(+1.83) | 82.42(-3.82) | 84.25(-1.99) | 83.03(-3.21) | 81.19(-5.05) |
| iobj | 93.30 | 94.02(+0.72) | 91.12(-2.18) | 89.67(-3.63) | 91.85(-1.45) | 93.66(+0.36) | 88.95(-4.35) |
| predet | 91.72 | 91.30(-0.42) | 91.93(+0.21) | 93.17(+1.45) | 92.34(+0.62) | 87.78(-3.94) | 90.47(-1.25) |
| acomp | 89.60 | 89.17(-0.43) | 88.33(-1.27) | 89.60(-0.00) | 89.81(+0.21) | 87.05(-2.55) | 89.17(-0.43) |
| csubj | 56.90 | 57.76(+0.86) | 57.19(+0.29) | 59.48(+2.58) | 53.45(-3.45) | 51.72(-5.18) | 55.17(-1.73) |
| preconj | 76.81 | 78.26(+1.45) | 65.22(-11.59) | 72.46(-4.35) | 82.61(+5.80) | 83.33(+6.52) | 75.36(-1.45) |
| csubjpass | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 77.78(-22.22) | 66.67(-33.33) |
+
+Table 9: Probing results for DEP. STL: the baseline, BERT:pre-trained BERT before fine-tuning.
+
+ | STL | BERT | POS | NER | DEP | SRL | MTL-5 |
| NP | 85.72 | 55.97(-29.75) | 65.53(-20.19) | 72.55(-13.17) | 67.25(-18.47) | 71.80(-13.92) | 57.58(-28.14) |
| ADVP | 68.61 | 68.61(-0.00) | 70.25(+1.64) | 77.86(+9.25) | 70.47(+1.86) | 61.15(-7.46) | 66.59(-2.02) |
| ADJP | 67.83 | 53.25(-14.58) | 69.33(+1.50) | 65.40(-2.43) | 57.69(-10.14) | 64.42(-3.41) | 63.43(-4.40) |
| VP | 79.29 | 62.83(-16.46) | 66.39(-12.90) | 70.30(-8.99) | 78.07(-1.22) | 54.85(-24.44) | 69.70(-9.59) |
| NML | 82.92 | 74.89(-8.03) | 81.51(-1.41) | 82.17(-0.75) | 81.66(-1.26) | 84.24(+1.32) | 76.02(-6.90) |
| WHNP | 77.87 | 62.26(-15.61) | 75.12(-2.75) | 73.27(-4.60) | 78.82(+0.95) | 70.63(-7.24) | 71.14(-6.73) |
| INTJ | 76.61 | 72.67(-3.94) | 84.84(+8.23) | 78.11(+1.50) | 68.79(-7.82) | 73.13(-3.48) | 74.11(-2.50) |
| QP | 94.55 | 90.45(-4.10) | 93.49(-1.06) | 93.73(-0.82) | 91.70(-2.85) | 91.65(-2.90) | 88.28(-6.27) |
| WHADVP | 78.99 | 69.43(-9.56) | 80.16(+1.17) | 75.84(-3.15) | 84.04(+5.05) | 72.63(-6.36) | 76.95(-2.04) |
| PRT | 80.85 | 79.46(-1.39) | 80.90(+0.05) | 81.20(+0.35) | 83.63(+2.78) | 73.71(-7.14) | 76.34(-4.51) |
| PP | 73.52 | 69.86(-3.66) | 79.00(+5.48) | 78.31(+4.79) | 72.83(-0.69) | 69.86(-3.66) | 71.00(-2.52) |
| CONJP | 90.87 | 91.78(+0.91) | 90.41(-0.46) | 85.84(-5.03) | 88.58(-2.29) | 88.13(-2.74) | 87.67(-3.20) |
| X | 59.35 | 60.98(+1.63) | 52.85(-6.50) | 53.66(-5.69) | 57.73(-1.62) | 55.29(-4.06) | 56.91(-2.44) |
| WHADJP | 95.37 | 91.67(-3.70) | 93.52(-1.85) | 96.29(+0.92) | 94.44(-0.93) | 94.44(-0.93) | 91.67(-3.70) |
| META | 98.61 | 95.83(-2.78) | 97.22(-1.39) | 95.83(-2.78) | 97.22(-1.39) | 97.22(-1.39) | 98.61(-0.00) |
| UCP | 100.00 | 100.00(-0.00) | 98.25(-1.75) | 100.00(-0.00) | 98.25(-1.75) | 100.00(-0.00) | 100.00(-0.00) |
| S | 96.29 | 94.44(-1.85) | 96.29(-0.00) | 94.44(-1.85) | 96.29(-0.00) | 98.15(+1.86) | 94.44(-1.85) |
| LST | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| FRAG | 83.33 | 100.00(+16.67) | 100.00(+16.67) | 94.44(+11.11) | 94.44(+11.11) | 88.89(+5.56) | 100.00(+16.67) |
| SBAR | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| SQ | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| WHPP | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| TOP | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
+
+Table 10: Probing results for CON. STL: the baseline, BERT:pre-trained BERT before fine-tuning.
+
+ | STL | BERT | POS | NER | DEP | CON | MTL-5 |
| ARG1 | 77.75 | 71.88(-5.87) | 78.78(+1.03) | 77.86(+0.11) | 77.08(-0.67) | 79.58(+1.83) | 74.58(-3.17) |
| ARG0 | 73.24 | 74.46(+1.22) | 75.95(+2.71) | 71.61(-1.63) | 71.17(-2.07) | 74.16(+0.92) | 70.13(-3.11) |
| ARG2 | 89.69 | 80.43(-9.26) | 89.81(+0.12) | 89.65(-0.04) | 90.15(+0.46) | 89.86(+0.17) | 87.36(-2.33) |
| ARGM-TMP | 73.24 | 60.55(-12.69) | 74.48(+1.24) | 70.57(-2.67) | 76.58(+3.34) | 75.59(+2.35) | 68.55(-4.69) |
| ARGM-DIS | 70.40 | 50.18(-20.22) | 69.56(-0.84) | 75.67(+5.27) | 69.58(-0.82) | 77.51(+7.11) | 60.41(-9.99) |
| ARGM-ADV | 59.01 | 40.28(-18.73) | 61.31(+2.30) | 64.83(+5.82) | 56.48(-2.53) | 63.88(+4.87) | 54.36(-4.65) |
| ARGM-MOD | 82.53 | 80.46(-2.07) | 81.77(-0.76) | 84.41(+1.88) | 82.29(-0.24) | 81.59(-0.94) | 78.54(-3.99) |
| ARGM-LOC | 79.45 | 58.99(-20.46) | 78.24(-1.21) | 80.68(+1.23) | 72.88(-6.57) | 79.35(-0.10) | 74.22(-5.23) |
| ARGM-MNR | 80.67 | 69.91(-10.76) | 79.33(-1.34) | 80.52(-0.15) | 80.20(-0.47) | 80.89(+0.22) | 77.23(-3.44) |
| ARGM-NEG | 86.47 | 79.39(-7.08) | 85.51(-0.96) | 90.54(+4.07) | 90.81(+4.34) | 84.75(-1.72) | 88.40(+1.93) |
| R-ARG1 | 69.92 | 67.43(-2.49) | 64.77(-5.15) | 71.28(+1.36) | 74.75(+4.83) | 72.09(+2.17) | 75.41(+5.49) |
| R-ARG0 | 81.20 | 75.64(-5.56) | 76.89(-4.31) | 81.71(+0.51) | 83.36(+2.16) | 80.30(-0.90) | 78.36(-2.84) |
| C-ARG1 | 51.72 | 47.46(-4.26) | 51.25(-0.47) | 46.86(-4.86) | 45.51(-6.21) | 45.84(-5.88) | 46.11(-5.61) |
| ARGM-PRP | 80.48 | 69.05(-11.43) | 78.81(-1.67) | 82.06(+1.58) | 77.38(-3.10) | 83.49(+3.01) | 80.16(-0.32) |
| ARGM-DIR | 93.89 | 89.29(-4.60) | 93.73(-0.16) | 95.16(+1.27) | 92.86(-1.03) | 94.92(+1.03) | 94.76(+0.87) |
| ARG3 | 91.00 | 82.89(-8.11) | 91.98(+0.98) | 90.91(-0.09) | 87.34(-3.66) | 90.91(-0.09) | 89.04(-1.96) |
| ARG4 | 94.78 | 93.96(-0.82) | 95.51(+0.73) | 95.05(+0.27) | 94.32(-0.46) | 94.32(-0.46) | 93.96(-0.82) |
| ARGM-CAU | 62.34 | 55.37(-6.97) | 63.37(+1.03) | 66.76(+4.42) | 68.74(+6.40) | 67.98(+5.64) | 65.73(+3.39) |
| ARGM-PRD | 57.72 | 52.14(-5.58) | 61.87(+4.15) | 59.66(+1.94) | 61.35(+3.63) | 59.40(+1.68) | 57.85(+0.13) |
| ARGM-ADJ | 85.07 | 76.00(-9.07) | 82.53(-2.54) | 82.80(-2.27) | 82.67(-2.40) | 84.40(-0.67) | 82.93(-2.14) |
| ARGM-EXT | 87.37 | 86.93(-0.44) | 90.85(+3.48) | 87.80(+0.43) | 89.32(+1.95) | 88.89(+1.52) | 83.44(-3.93) |
| ARGM-PNC | 82.89 | 69.74(-13.15) | 84.21(+1.32) | 84.21(+1.32) | 82.89(-0.00) | 83.77(+0.88) | 79.82(-3.07) |
| ARGM-GOL | 86.76 | 76.71(-10.05) | 89.95(+3.19) | 88.58(+1.82) | 78.54(-8.22) | 85.84(-0.92) | 84.93(-1.83) |
| ARGM-LVB | 98.59 | 97.18(-1.41) | 98.12(-0.47) | 98.12(-0.47) | 98.12(-0.47) | 97.18(-1.41) | 97.18(-1.41) |
| R-ARGM-LOC | 82.05 | 84.62(+2.57) | 78.97(-3.08) | 86.16(+4.11) | 74.36(-7.69) | 73.85(-8.20) | 79.49(-2.56) |
| R-ARGM-TMP | 74.08 | 71.43(-2.65) | 69.84(-4.24) | 82.01(+7.93) | 80.42(+6.34) | 75.66(+1.58) | 77.25(+3.17) |
| R-ARG2 | 73.12 | 70.97(-2.15) | 77.96(+4.84) | 77.42(+4.30) | 74.19(+1.07) | 69.89(-3.23) | 74.73(+1.61) |
| C-ARG2 | 44.90 | 36.73(-8.17) | 45.58(+0.68) | 43.54(-1.36) | 43.54(-1.36) | 44.22(-0.68) | 45.58(+0.68) |
| C-ARG0 | 59.80 | 47.06(-12.74) | 61.76(+1.96) | 56.86(-2.94) | 51.96(-7.84) | 53.92(-5.88) | 54.90(-4.90) |
| ARGM-REC | 84.31 | 70.59(-13.72) | 85.29(+0.98) | 78.43(-5.88) | 80.39(-3.92) | 85.29(+0.98) | 80.39(-3.92) |
| ARGM-COM | 88.89 | 81.48(-7.41) | 90.12(+1.23) | 92.59(+3.70) | 87.66(-1.23) | 87.66(-1.23) | 87.66(-1.23) |
| C-ARGM-ADV | 54.55 | 54.55(-0.00) | 48.48(-6.07) | 54.55(-0.00) | 54.55(-0.00) | 51.52(-3.03) | 57.58(+3.03) |
| R-ARGM-MNR | 72.73 | 63.64(-9.09) | 63.64(-9.09) | 81.82(+9.09) | 69.70(-3.03) | 78.79(+6.06) | 66.67(-6.06) |
| ARG5 | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| C-ARGM-TMP | 71.43 | 42.86(-28.57) | 61.90(-9.53) | 71.43(-0.00) | 57.14(-14.29) | 61.90(-9.53) | 66.67(-4.76) |
| R-ARGM-CAU | 91.67 | 75.00(-16.67) | 83.33(-8.34) | 100.00(+8.33) | 100.00(+8.33) | 91.67(-0.00) | 91.67(-0.00) |
| C-ARGM-CAU | 66.67 | 66.67(-0.00) | 66.67(-0.00) | 77.78(+11.11) | 66.67(-0.00) | 66.67(-0.00) | 77.78(+11.11) |
| C-ARG3 | 100.00 | 100.00(-0.00) | 88.89(-11.11) | 88.89(-11.11) | 88.89(-11.11) | 88.89(-11.11) | 100.00(-0.00) |
| R-ARG4 | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| C-ARGM-EXT | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| R-ARGM-ADV | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| C-ARGM-LOC | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| C-ARGM-MNR | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| C-ARGM-MOD | 100.00 | 50.00(-50.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| R-ARGM-PRP | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| ARGM-PRX | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| ARGA | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| R-ARGM-DIR | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| R-ARGM-PRD | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
| C-ARGM-PRD | 100.00 | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) | 100.00(-0.00) |
+
+Table 11: Probing results for SRL. STL: the baseline, BERT:pre-trained BERT before fine-tuning.
+
+# A.4 Results for Other Transformers
+
+We also applied our pruning and probing methods on 3 recent transformer encoders, RoBERTa (Liu et al., 2019c), ELECTRA (Clark et al., 2020) and DeBERTa (He et al., 2020), to further demonstrate the generality of our hypothesis. For all of them, we use the base size version which has 12 layers with 144 attention heads in total. Although we did not tune hyper-parameters specifically for any of them and re-used the same hyper-parameters of BERT, their results turned out to be as interesting as BERT results.
+
+Their STL and MTL results are shown in Table 12. Unsurprisingly, MTL-5 is outperformed by its single-task counterparts for all tasks and for all transformer encoders, raising the dilemma behind transformer-based MTL.
+
+Their pruning results are shown in Table 13. Although the results could be better tuned for each transformer encoder, our DP strategy is still able to prune roughly $50\%$ heads while keeping comparable performance.
+
+Their visualization of head utilization is illustrated in Figure 9, 11 and 13. Similar patterns among each transformer encoder can be observed, supporting our claim that the MTL-DP model reuses a very similar set of heads used by the STL-DP models.
+
+Their probing results are illustrated in Figure 10, 12 and 14, which also align with our findings. Specifically, the DEP probing results on transformer encoders are already very high even without fine-tuning on actual dependency treebanks (Figure 10f, 12f and 14f), demonstrating the pluripotency of stem cells. Other figures show similar patterns that stem cell heads get specialized during STL but lose specialities in MTL, supporting our Stem Cell Hypothesis.
+
+ | POS | NER | DEP | CON | SRL | MTL-5 |
| POS | 98.33 ± 0.01 | 98.30 ± 0.01 | 98.34 ± 0.00 | 98.33 ± 0.02 | 98.31 ± 0.02 | 98.29 ± 0.02 |
| NER | 89.44 ± 0.04 | 88.93 ± 0.16 | 89.84 ± 0.14 | 89.65 ± 0.02 | 89.37 ± 0.19 | 89.66 ± 0.17 |
| DEP | 94.48 ± 0.05 | 94.46 ± 0.04 | 94.56 ± 0.05 | 94.55 ± 0.02 | 94.44 ± 0.02 | 94.38 ± 0.03 |
| CON | 94.82 ± 0.01 | 94.76 ± 0.04 | 94.88 ± 0.03 | 94.89 ± 0.05 | 94.88 ± 0.01 | 94.75 ± 0.01 |
| SRL | 84.04 ± 0.05 | 83.31 ± 0.11 | 84.13 ± 0.08 | 84.14 ± 0.02 | 83.52 ± 0.07 | 83.56 ± 0.10 |
+
+(a) RoBERTa (Liu et al., 2019c) performance.
+
+ | POS | NER | DEP | CON | SRL | MTL-5 |
| POS | 97.94 ± 0.04 | 97.97 ± 0.02 | 97.94 ± 0.01 | 97.95 ± 0.01 | 97.96 ± 0.05 | 97.93 ± 0.01 |
| NER | 88.62 ± 0.03 | 88.22 ± 0.05 | 88.46 ± 0.20 | 88.82 ± 0.14 | 88.25 ± 0.11 | 88.38 ± 0.04 |
| DEP | 94.52 ± 0.08 | 94.47 ± 0.08 | 94.61 ± 0.01 | 94.65 ± 0.03 | 94.53 ± 0.07 | 94.39 ± 0.04 |
| CON | 95.01 ± 0.01 | 95.04 ± 0.02 | 95.10 ± 0.06 | 95.14 ± 0.03 | 95.08 ± 0.07 | 94.91 ± 0.04 |
| SRL | 84.35 ± 0.07 | 83.44 ± 0.05 | 84.55 ± 0.06 | 84.61 ± 0.11 | 83.81 ± 0.11 | 84.09 ± 0.06 |
+
+(b) ELECTRA (Clark et al., 2020) performance.
+
+ | POS | NER | DEP | CON | SRL | MTL-5 |
| POS | 98.33 ± 0.02 | 98.26 ± 0.02 | 98.32 ± 0.01 | 98.32 ± 0.01 | 98.31 ± 0.02 | 98.30 ± 0.02 |
| NER | 89.29 ± 0.18 | 89.02 ± 0.21 | 89.67 ± 0.09 | 89.65 ± 0.25 | 89.29 ± 0.36 | 89.28 ± 0.18 |
| DEP | 94.50 ± 0.04 | 94.54 ± 0.02 | 94.64 ± 0.03 | 94.61 ± 0.07 | 94.56 ± 0.04 | 94.42 ± 0.03 |
| CON | 94.91 ± 0.04 | 94.94 ± 0.02 | 94.96 ± 0.01 | 95.06 ± 0.01 | 94.98 ± 0.03 | 94.82 ± 0.03 |
| SRL | 84.26 ± 0.05 | 83.42 ± 0.15 | 84.34 ± 0.04 | 84.36 ± 0.09 | 83.62 ± 0.06 | 83.37 ± 0.01 |
+
+(c) DeBERTa (He et al., 2020) performance.
+Table 12: Performance of single-task learning (main diagonal highlighted in gray), multi-task learning on all 5 tasks (MTL-5), and multi-task learning on every pair of the tasks (non-diagonal cells; e.g., DEP'th row in NER'th column is the DEP result of the joint model between DEP and NER).
+
+ | Performance | % of Attention Heads Kept |
| STL | STL-DP | MTL | MTL-DP | STL-DP | MTL-DP |
| POS | 98.33 ± 0.01 | 98.35 ± 0.02 | 98.29 ± 0.02 | 98.38 ± 0.01 | 41.90 ± 0.40 | 53.47 ± 1.39 |
| NER | 88.93 ± 0.16 | 89.08 ± 0.16 | 89.66 ± 0.17 | 89.52 ± 0.05 | 58.33 ± 3.48 | 53.47 ± 1.39 |
| DEP | 94.56 ± 0.05 | 94.29 ± 0.01 | 94.38 ± 0.03 | 94.48 ± 0.03 | 64.58 ± 1.21 | 53.47 ± 1.39 |
| CON | 94.89 ± 0.05 | 94.59 ± 0.05 | 94.75 ± 0.01 | 94.78 ± 0.06 | 55.33 ± 2.00 | 53.47 ± 1.39 |
| SRL | 83.52 ± 0.07 | 83.53 ± 0.06 | 83.56 ± 0.10 | 83.57 ± 0.14 | 45.14 ± 0.70 | 53.47 ± 1.39 |
+
+(a) RoBERTa (Liu et al., 2019c) pruning results.
+
+ | Performance | % of Attention Heads Kept |
| STL | STL-DP | MTL | MTL-DP | STL-DP | MTL-DP |
| POS | 97.94 ± 0.04 | 98.01 ± 0.01 | 97.93 ± 0.01 | 98.03 ± 0.02 | 35.88 ± 2.12 | 44.67 ± 2.44 |
| NER | 88.22 ± 0.05 | 88.04 ± 0.24 | 88.38 ± 0.04 | 88.11 ± 0.22 | 58.33 ± 2.78 | 44.67 ± 2.44 |
| DEP | 94.61 ± 0.01 | 94.36 ± 0.04 | 94.39 ± 0.04 | 94.40 ± 0.01 | 58.80 ± 1.06 | 44.67 ± 2.44 |
| CON | 95.14 ± 0.03 | 94.82 ± 0.02 | 94.91 ± 0.04 | 94.86 ± 0.07 | 52.78 ± 2.50 | 44.67 ± 2.44 |
| SRL | 83.81 ± 0.11 | 83.71 ± 0.10 | 84.09 ± 0.06 | 84.07 ± 0.06 | 41.20 ± 0.40 | 44.67 ± 2.44 |
+
+(b) ELECTRA (Clark et al., 2020) pruning results.
+
+ | Performance | % of Attention Heads Kept |
| STL | STL-DP | MTL | MTL-DP | STL-DP | MTL-DP |
| POS | 98.33 ± 0.02 | 98.37 ± 0.01 | 98.30 ± 0.02 | 98.39 ± 0.01 | 50.93 ± 3.13 | 66.67 ± 1.84 |
| NER | 89.02 ± 0.21 | 88.72 ± 0.18 | 89.28 ± 0.18 | 89.08 ± 0.07 | 66.67 ± 3.67 | 66.67 ± 1.84 |
| DEP | 94.64 ± 0.03 | 94.42 ± 0.02 | 94.42 ± 0.03 | 94.60 ± 0.01 | 54.63 ± 2.00 | 66.67 ± 1.84 |
| CON | 95.06 ± 0.01 | 94.93 ± 0.03 | 94.82 ± 0.03 | 94.94 ± 0.13 | 61.11 ± 1.20 | 66.67 ± 1.84 |
| SRL | 83.62 ± 0.06 | 83.78 ± 0.13 | 83.37 ± 0.01 | 83.37 ± 0.00 | 55.09 ± 0.40 | 66.67 ± 1.84 |
+
+(c) DeBERTa (He et al., 2020) pruning results.
+
+Table 13: Results of single-task learning (STL), STL with static pruning (STL-SP) and multi-task learning on the 5 tasks with/without dynamic pruning (MTL/MTL-DP). The STL Performance column is equivalent to the main diagonal in Table 12.
+
+
+
+
+
+
+
+
+
+
+
+
+(a) POS
+(b) NER
+(c) DEP
+(f) 3-run utilization of the MTL-DP model, where each run is encoded in a RGB channel. Darker indicates higher utilization.
+
+
+(d) CON
+(g) Average head utilization rates among the 5 tasks in 3 runs. Darker cells indicate higher utilization rates.
+
+
+Figure 9: Head utilization of the RoBERTa (Liu et al., 2019c) STL-DP models (a - e, g) and the MTL-DP model (f).
+
+
+
+
+
+
+(a) POS
+(d) CON
+Figure 10: The RoBERTa (Liu et al., 2019c) probing results comparison (a - e) and layer analysis of pre-trained heads (g).
+
+
+(b) NER
+(e) SRL
+
+
+(c) DEP
+(f) DEP layer analysis.
+
+
+
+
+
+
+
+
+
+
+
+
+(a) POS
+(b) NER
+(c) DEP
+(f) 3-run utilization of the MTL-DP model, where each run is encoded in a RGB channel. Darker indicates higher utilization.
+
+
+(d) CON
+(g) Average head utilization rates among the 5 tasks in 3 runs. Darker cells indicate higher utilization rates.
+
+
+Figure 11: Head utilization of the ELECTRA (Clark et al., 2020) STL-DP models (a - e, g) and the MTL-DP model (f).
+
+
+
+
+
+
+(a) POS
+(d) CON
+Figure 12: The ELECTRA (Clark et al., 2020) probing results comparison (a - e) and layer analysis of pre-trained heads (g).
+
+
+(b) NER
+(e) SRL
+
+
+(c) DEP
+(f) DEP layer analysis.
+
+
+
+
+
+
+
+
+
+
+
+
+(a) POS
+(b) NER
+(c) DEP
+(f) 3-run utilization of the MTL-DP model, where each run is encoded in a RGB channel. Darker indicates higher utilization.
+
+
+(d) CON
+(g) Average head utilization rates among the 5 tasks in 3 runs. Darker cells indicate higher utilization rates.
+
+
+Figure 13: Head utilization of the DeBERTa (He et al., 2020) STL-DP models (a - e, g) and the MTL-DP model (f).
+
+
+
+
+
+
+(a) POS
+(d) CON
+Figure 14: The DeBERTa (He et al., 2020) probing results comparison (a - e) and layer analysis of pre-trained heads (g).
+
+
+(b) NER
+(e) SRL
+
+
+(c) DEP
+(f) DEP layer analysis.
\ No newline at end of file
diff --git a/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/images.zip b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..908fdadbd0b629a1bf948eaad1c0bf9b1de94f64
--- /dev/null
+++ b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e55ee10744e1def397abd875eba116d4c4204bd2afc98337e7f4b007b674a5e4
+size 3336613
diff --git a/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/layout.json b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..23d6fab32fc41e7a8561a16c15caa45402b067d8
--- /dev/null
+++ b/thestemcellhypothesisdilemmabehindmultitasklearningwithtransformerencoders/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4a6d78dac5689ccb9651ba6bbd8660a7a7e70fe6c87ec6ffed3b56c5f4a85512
+size 636160
diff --git a/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/4f117e0e-28f9-4dc7-8403-b2c50926cc86_content_list.json b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/4f117e0e-28f9-4dc7-8403-b2c50926cc86_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..5556c5715adcaac2b67b1e39f1bc7b76b2ff709d
--- /dev/null
+++ b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/4f117e0e-28f9-4dc7-8403-b2c50926cc86_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cd5d64479d1ee891057920ee54f5cd0ef69ee0a8d3d9bea8d6e7b2fd70cdb10d
+size 90267
diff --git a/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/4f117e0e-28f9-4dc7-8403-b2c50926cc86_model.json b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/4f117e0e-28f9-4dc7-8403-b2c50926cc86_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..0c35bacd44feea83fedf5e7991e9943cbdd17709
--- /dev/null
+++ b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/4f117e0e-28f9-4dc7-8403-b2c50926cc86_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ca14d7ffb7a6d7f1ff2b97206efd65f0d955e1560c1c4290e64da2b3c928d9ab
+size 107788
diff --git a/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/4f117e0e-28f9-4dc7-8403-b2c50926cc86_origin.pdf b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/4f117e0e-28f9-4dc7-8403-b2c50926cc86_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..456920876afb902ab0ac306003c61f3a4ffceae6
--- /dev/null
+++ b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/4f117e0e-28f9-4dc7-8403-b2c50926cc86_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f8e132d98fdeec77cd28c096231a099920469a10e791f9ac4b0995f9bc74c17c
+size 1315068
diff --git a/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/full.md b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..4c6599d458db67b8da43bb17f8bcf14596c7224c
--- /dev/null
+++ b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/full.md
@@ -0,0 +1,314 @@
+# The World of an Octopus: How Reporting Bias Influences a Language Model's Perception of Color
+
+Cory Paik, Stephane Aroca-Ouellette,\* Alessandro Roncone and Katharina Kann
+
+University of Colorado Boulder
+
+firstname.lastname@colorado.edu
+
+# Abstract
+
+Recent work has raised concerns about the inherent limitations of text-only pretraining. In this paper, we first demonstrate that reporting bias, the tendency of people to not state the obvious, is one of the causes of this limitation, and then investigate to what extent multimodal training can mitigate this issue. To accomplish this, we 1) generate the Color Dataset (CoDa), a dataset of human-perceived color distributions for 521 common objects; 2) use CoDa to analyze and compare the color distribution found in text, the distribution captured by language models, and a human's perception of color; and 3) investigate the performance differences between text-only and multimodal models on CoDa. Our results show that the distribution of colors that a language model recovers correlates more strongly with the inaccurate distribution found in text than with the ground-truth, supporting the claim that reporting bias negatively impacts and inherently limits text-only training. We then demonstrate that multimodal models can leverage their visual training to mitigate these effects, providing a promising avenue for future research.
+
+# 1 Introduction
+
+Given sufficient scale, language models (LMs) $^{1}$ are able to function as knowledge bases, yielding factoids and relational knowledge across a wide range of topics (Petroni et al., 2019; Bouraoui et al., 2020). However, subsequent work (Bender and Koller, 2020; Bisk et al., 2020; Aroca-Ouellette et al., 2021) has raised concerns about the inherent limitations of text-only pretraining. Motivated by these concerns and limitations, we identify and investigate how reporting bias, a concrete and measurable signal, correlates with these limitations and how multimodal training can mitigate these issues.
+
+
+Figure 1: An example prompt from CoDa.
+
+Grice's conversational maxim of quantity (Grice, 1975) asserts that utterances only contain the required amount of information. This leads to explicit reporting of self-evident knowledge being rare, while less common facts, properties, or events are being reported at disproportionately high frequencies. For example, while most people agree that bananas are typically yellow, the bi-gram "green banana" is $332\%$ more frequent in the Google Books Ngram Corpus (Lin et al., 2012) than "yellow banana".2 This reporting bias inevitably propagates from corpora to the models trained on them (Shwartz and Choi, 2020) and affects a variety of concepts. One such concept that we would expect to be harmful in downstream applications, is easy to measure, and is solvable via visual input is color. For these reasons, we investigate the relationship between reporting bias and modern LMs' perception of color.
+
+People's understanding of color is primarily derived from their experience in the world. Every time we interact with an object, we update our understanding of the possible colors that object can take on. Further, we can often apply meaning to
+
+| Dataset | Count (Percentile) |
| 25% | 50% | 75% |
| Open Images V6 | 2.10K | 3.96K | 11.1K |
| Google Ngrams | 1.63M | 4.64M | 25.4M |
| Wikipedia | 2.04K | 10.3K | 38.8K |
| VQA | 4 | 25 | 186 |
+
+Table 1: Object frequencies in each domain/dataset after filtering. We report class label statistics for Open Images and $n$ -gram frequencies for Google Ngrams, Wikipedia, and VQA prompts.
+
+the differences: a green banana is unripe, a yellow banana is ideal, and a brown banana may be past its prime. Text-only LMs do not share this embodied experience. Similar to an octopus3 they cannot see colors, and need to rely solely on the inaccurate reporting of colors in text. Thus, we expect the colors LMs associate with objects to differ drastically from a human's perception.
+
+To test this hypothesis, we construct the Color Dataset (CoDa) – a ground-truth dataset of color distributions for 521 well-known objects via crowdsourcing. We use this dataset to compare the color distributions found in text and those predicted from LMs, finding that a LM's shortcomings in recovering color distributions correlates with the reporting bias for those objects. Next, we hypothesize that models having access to multiple modalities, specifically vision and text, may be able to partially overcome these shortcoming by grounding the language to their limited visual experiences (Bisk et al., 2020). To this end, we develop a unified framework for evaluating the color perception of text-only and multimodal architectures. Our results support the hypothesis that multimodal training can mitigate the effect of reporting bias.
+
+Contributions We make three contributions: 1) We introduce a dataset with human color distributions for 521 well-known objects. 2) We conduct an extensive analysis to identify how reporting bias affects LMs' perception of color. 3) We demonstrate that multimodal training mitigates, but not eliminates, the impact of reporting bias.
+
+# 2 CoDa
+
+# 2.1 Dataset Creation
+
+Object Selection To ensure all our models – and potential future models – are properly exposed to
+
+the objects in our probing dataset, we choose objects which are common in both text and image data. We start with objects from the Open Images dataset (Kuznetsova et al., 2020) and remove all objects which appear less than 25 times in Wikipedia. For example, we remove "dog bed" as the corresponding bi-gram only appears 19 times. This leaves us with an initial set of 687 objects.
+
+We then manually filter out all human-related words, such as "person" as well as hybernyms such as "food", since they are too general to assign specific colors. We also remove transparent objects, such as "windows", and objects that are more than two words long, such as "personal flotation device" and "table tennis racket". This leaves us with our final set of 521 objects. We provide object frequencies from Open Images V6 (Kuznetsova et al., 2020), the Google Books Ngram Corpus (Lin et al., 2012), Wikipedia, and VQA (Goyal et al., 2017) in Table 1.
+
+Color Selection Following Berlin and Kay (1969), we choose the 11 basic color terms of the English language as the colors to be annotated: red, orange, yellow, green, blue, purple, pink, black, white, grey, and brown.
+
+Color Annotation Due to sample bias in image datasets (Torralba and Efros, 2011) and the difficulty of matching pixel values to human perception, generating color distributions by counting color frequencies in images is impractical and challenging to verify.4 Thus, in line with our focus on human perception of color as it relates to language (i.e., color terms), we approximate color distributions via human annotation crowdsourced on Amazon Mechanical Turk (MTurk).5
+
+Workers are shown words representing objects and tasked with rating – on a scale from 1 to 5 – the frequency with which instances of the objects appear in each of the 11 provided colors. We set up these tasks as human intelligence tasks (HITs), and provide the workers with instructions, which include an example for how one could label “grass” and a concrete list of acceptance and rejection criteria. Each HIT includes 25 objects and is compensated with $1. Fig. 2 shows the user interface as
+
+
+Figure 2: Our task UI for data collection on Amazon Mechanical Turk. See Section 2.1 for full details.
+
+presented to an MTurk worker tasked with annotating the object "apples".
+
+Since we choose objects that appear frequently in datasets, we expect people to be familiar with them. However, for the rare cases where an annotator is unsure about an object's color, our interface includes a skip button. The average crowdworker skips 1 object. If an object is not skipped, the average worker completes one annotation in 14 seconds on average. Each object's annotation is normalized to obtain a probability distribution over colors.
+
+A potential side-effect of crowdsourcing annotations is that annotators might choose fewer colors to minimize the time spent on the task. In light of this, we design a labeling interface that balances the time required for labeling a given object as one, many, or all colors. For example, we include a "Select All" button and use wide click-optimized sliders. With these changes, we find that, on average, users tend to select 6.2 colors per object. For more details and analysis regarding annotator biases, we refer the reader to Appendix A.1.
+
+Quality Control For quality control purposes, each HIT includes "spinach" as a control object at a random position within the group of objects to annotate. This control object serves as a way to flag any submissions which do not follow the instructions or are otherwise not suitable for our purposes. We require the rating of "spinach" to be more than $50\%$ green in order to accept the HIT. Rejected HITs are not included in the dataset. This
+
+filters out the small number of workers who provide random or blatantly incorrect annotations.
+
+We compute the ground truth as an average over all submitted annotations for a given object. We iteratively filter annotations on a per-object basis if a rating has a Kendall correlation of less than 0 with the current ground truth. This removes 10 annotations that appear to be cases of annotator misinterpretation. For example, one annotator labels "stop sign" as being equally red, yellow, and green, likely confusing "stop sign" with "traffic light".
+
+| Group | All | Train | Val | Test | Examples |
| Single | 198 | 118 | 39 | 41 | Carrot,Spinach |
| Multi | 208 | 124 | 41 | 43 | Apple, Street light |
| Any | 115 | 69 | 23 | 23 | Shirt, Car |
| Total | 521 | 311 | 103 | 107 | |
+
+Table 2: CoDa splits by object group.
+
+Object Grouping We are investigating the relationship between LMs' knowledge of object colors and reporting bias, the tendency of humans to not state the obvious (Grice, 1975). We hypothesize that reporting bias will be more severe for objects which have a single typical color, as that color will be implicitly assumed by a listener or reader and, accordingly, will be less frequently stated explicitly. In contrast, objects with a distinct set of several possible colors require explicit descriptions to fully capture the visual characteristics of the object. For example, apples are often described as red or green.
+
+To test whether objects with different color distri
+
+butions are impacted by reporting bias differently, we divide the dataset into three categories: single-color objects, multi-color objects, and any-color objects. We categorize objects using $k$ -means clustering with the Jensen-Shannon distance of sorted probabilities. This creates clusters which are color-invariant and based only on the properties of the distributions. We find that this method gives consistent clusters, i.e. the clusters are independent of seeding. We then assign group names semi-manually.7 "Lemon" is an example of a single color object, where $73\%$ of the distribution is yellow. "Wine" is a multi-color object with $90\%$ of the distribution falling on red, white, pink, and purple (the last $10\%$ is yellow). All other objects are any-color objects: they have no clear set of typical colors. Examples of any-color objects are t-shirts, cars, or flowers. More examples are shown in Table 2.
+
+| Model Type | Input |
| Decoder | Most apples are <O>. |
| Encoder | Most apples are <M>. |
| CLIP | A photo of an apple. |
+
+Table 3: Example inputs for different evaluated architectures.
+
+# 2.2 Templates
+
+Text-only corpora and visually-grounded datasets rarely occupy the same domain. To accommodate both, we form a set of templates for each domain. The first is tailored to text-only models, and consists of both plural templates such as "Most bananas are [MASK]." and singular templates such as "This banana is [MASK]".
+
+Our second template group is tailored to visually-grounded datasets. We use most of the templates provided by Radford et al. (2021), which the authors used for finetuning on ImageNet, but exclude templates that inherently point to an unnatural object state, such as "a photo of a dirty banana". Examples for templates are provided in Table 3.
+
+We recognize that any hand-crafted templates are by nature imperfect. As such, we use all configurations for all models and present the best results per-object for each model to give models ample opportunity to succeed.
+
+# 2.3 Data Splits
+
+Some of our experiments (cf. Section 4.2) require a small training set. Thus, CoDa contains training, development and test splits, with 311, 104, and 106 objects respectively. There is no object overlap between the different sets.
+
+# 3 Reporting Bias
+
+# 3.1 Background
+
+As previously stated, Grice's conversational maxim of quantity manifests as reporting bias – i.e., people not usually stating obvious facts or properties –, and impacts nearly all datasets that contain text.
+
+Reporting bias has been studied in the context of both NLP and image captioning. Gordon and Van Durme (2013) perform a quantitative analysis using n-gram frequencies from text, finding this phenomenon particularly relevant to internet text corpora. Shwartz and Choi (2020) extend these experiments to pretrained models such as Bert (Devlin et al., 2019) and RoBERTa (Liu et al., 2019). Similar to our work, they analyze color attribution of the form "The banana is tasty." However, their ground truth is extracted from Wikipedia bi-grams and, thus, suffers from reporting bias itself. In contrast, we circumvent this problem by collecting the ground truth in CoDa directly from humans.
+
+# 3.2 Reporting Bias in Text
+
+Our hypothesis is that pretrained LMs inherit reporting bias with respect to colors from their training data. Thus, prior to our main experiments, we investigate if, in fact, reporting bias exists in large general text corpora. We analyze the Google Books Ngram Corpus (Lin et al., 2012) and Wikipedia. Specifically, we look at all bi-grams and tri-grams containing a color followed by an object in our dataset.
+
+Let us denote the count of the $n$ -gram $x_{1}\ldots x_{n}$ as $\phi (x_1,\dots ,x_n)$ . We then define the relative frequency with which each object $o$ appears with a color $c$ as:
+
+$$
+\operatorname {F r e q} (o) = \frac {1 0 0}{\phi (o)} \sum_ {c \in C} \phi (c, o) \tag {1}
+$$
+
+We further define the probability of an object being of color $c^*$ as:
+
+$$
+P \left(c ^ {*} \mid o\right) = \frac {\phi \left(c ^ {*} , o\right)}{\sum_ {c \in C} \phi (c , o)} \tag {2}
+$$
+
+| Dataset | Group | Freq | Spearman ρ↑ | Kendall's τ ↑ | Acc@1 ↑ | DJS ↓ |
| Google Ngrams | Single | 5.60 | 41.7 ± 27.8 | 35.3 ± 24.5 | 43.9 | 0.27 ± 0.16 |
| Multi | 9.69 | 47.1 ± 26.6 | 38.1 ± 22.2 | 30.3 | 0.23 ± 0.12 |
| Any | 20.26 | 43.5 ± 30.7 | 34.3 ± 25.0 | 33.9 | 0.15 ± 0.10 |
| Wikipedia | Single | 1.51 | 26.5 ± 30.2 | 22.2 ± 26.3 | 25.3 | 0.37 ± 0.17 |
| Multi | 1.85 | 29.4 ± 31.9 | 23.9 ± 27.0 | 23.6 | 0.31 ± 0.16 |
| Any | 3.00 | 30.9 ± 31.5 | 23.8 ± 25.6 | 19.1 | 0.23 ± 0.15 |
| VQA | Single | 0.73 | 27.4 ± 37.8 | 25.4 ± 35.3 | 16.7 | 0.38 ± 0.23 |
| Multi | 2.17 | 35.7 ± 34.3 | 31.7 ± 30.9 | 21.2 | 0.35 ± 0.20 |
| Any | 2.64 | 33.7 ± 33.6 | 28.1 ± 28.7 | 27.8 | 0.29 ± 0.17 |
+
+Table 4: Correlation metrics between the $n$ -gram frequencies reported in different datasets and the ground truth distributions collected from human annotators. Single, Multi, and Any indicate sets of objects that are frequently a single color, between two to four colors, or could be any color, respectively. We aggregate by object and report the mean ± standard deviation for each metric across the objects of that group.
+
+| Model | Sizes | Multimodal |
| GPT-2 | B, M, L, XL | |
| RoBERTa | B, L | |
| ALBERT V1 | B, L, XL, XXL | |
| ALBERT V2 | B, L, XL, XXL | |
| CLIP | ViT-B/32, RN50, RN50x4, RN101 | ✓ |
+
+Table 5: Summary of evaluated models.
+
+The results of these experiments are reported in Table 4. The frequency column supports our hypothesis that objects with one typical color are less frequently described as being of any color than those with multiple typical colors or where any color is possible. In all metrics excluding Acc@1, the text-retrieved color distributions are more strongly correlated with the ground truth for multi and any colored objects than for single-colored objects. $^{8}$
+
+# 4 Experimental Setup
+
+# 4.1 Zero-shot Probes
+
+We first probe LMs in a zero-shot fashion using a set of templates (see Section 2.2). Each template has a [MASK] where the color should appear. For models trained using a causal language modeling objective, we run the models over each template eleven times, each time with a different color replacing the [MASK] token. Following Warstadt et al. (2020), we select the sentence with the highest probability. For models trained using a masked language modeling objective, we filter the output vocabulary to only include the eleven color choices and normalize to obtain a probability distribution.
+
+# 4.2 Representation Probes
+
+Many current multimodal architectures are optimized for multimodal evaluation and have complex shared embedding spaces, which makes it challenging to compare to text-only models. However, recent developments such as CLIP (Radford et al., 2021) and ALIGN (Jia et al., 2021) show promising results in connecting images and text via contrastive pretraining on large unlabeled corpora, while still maintaining separate text and image models. We focus on probing multimodal models which follow these architecture decisions. Since they have not been trained on a language modeling objective, zero-shot probing is not viable on these models. To overcome this and enable comparison to text-only models, we freeze the base model and use part of our dataset to train a MLP to extract color distributions from the frozen representations.
+
+Given pretrained representations, we would like the performance of a model to consist of 2 parts: final quality (in our case distribution correlations), and the amount of effort to get that quality from the representations. This is possible by formulating the task as efficiently learning a model from representations to color distributions. Following Whitney et al. (2021); Voita and Titov (2020), we conduct our experiments for representation probing in a loss-data framework using minimum description length (MDL), surplus description length (SDL), and $\varepsilon$ sample complexity ( $\varepsilon SC$ ). We split the training set into 10 subsets spaced logarithmically from 1 to 311 objects, and report averages over 5 seeds.
+
+# 4.3 Models
+
+We probe object-color probabilities in 14 pretrained text-only models and 4 pretrained multimodal mod
+
+| Model | Group | Spearman ρ↑ | Kendall's τ↑ | Acc@1↑ | DJS↓ | Δρ↑ | Δτ↑ |
| GPT-2 | Single | 40.3 ± 26.6 | 33.6 ± 22.1 | 40.4 | 0.39 ± 0.07 | -0.55 | -1.01 |
| Multi | 44.8 ± 20.9 | 36.5 ± 16.8 | 29.8 | 0.26 ± 0.06 | -1.49 | -1.05 |
| Any | 48.1 ± 25.1 | 38.2 ± 20.2 | 40.0 | 0.09 ± 0.04 | 5.29 | 4.46 |
| RoBERTa | Single | 47.8 ± 24.7 | 40.1 ± 20.8 | 42.9 | 0.28 ± 0.11 | 7.17 | 5.69 |
| Multi | 50.2 ± 23.8 | 41.0 ± 19.5 | 33.2 | 0.19 ± 0.08 | 4.57 | 4.01 |
| Any | 52.5 ± 23.5 | 42.0 ± 19.5 | 36.5 | 0.10 ± 0.06 | 9.97 | 8.26 |
| ALBERT | Single | 43.7 ± 24.4 | 36.4 ± 20.6 | 34.3 | 0.30 ± 0.11 | 2.69 | 1.55 |
| Multi | 44.6 ± 19.1 | 36.1 ± 15.5 | 26.9 | 0.22 ± 0.07 | -1.53 | -1.27 |
| Any | 48.2 ± 21.4 | 38.2 ± 17.2 | 35.7 | 0.11 ± 0.05 | 5.07 | 4.22 |
+
+Table 6: LM results when probed in a zero-shot setting. Single, Multi, and Any indicate sets of objects that are frequently of a single color, between two to four colors, or could be any color, respectively. All correlation coefficients $(\rho, \tau)$ are multiplied by 100. For each object, we take the prediction from the template with the highest $\tau$ correlation. We then aggregate by object and report the mean $\pm$ standard deviation over objects of that group. We report the results from the best model from each architecture; for results on a per-model basis, see Table 9 in the appendix.
+
+els; cf. Table 5 for the full set.
+
+We use Huggingface's (Wolf et al., 2019) pretrained models for all text-only models. We additionally probe four versions of CLIP, using the official implementation by Radford et al. (2021).
+
+# 4.4 Metrics
+
+In order to obtain as comprehensive a picture as possible, we report a variety of metrics when applicable, including: top-1 accuracy, Spearman rank order correlation $\rho$ , Kendall rank correlation $\tau$ , and Jensen-Shannon divergence $D_{JS}$ for each model and each set of objects. Each of these metrics highlight slightly different aspects of performance on the task.
+
+Top-1 accuracy (Acc@1) is the frequency with which models can correctly identify the most frequent color of an object. This is useful for comparing models, but not directly interpretable across object groups as it inherently favors objects that can take on few colors. Spearman's $\rho$ is sensitive to outliers, so it highlights the extreme mistakes, while Kendall's $\tau$ is more robust to such changes. Jensen-Shannon divergence measures the similarity between 2 distributions.
+
+Spearman's $\rho$ and Kendall's $\tau$ are within the range of $[-1, 1]$ , with -1 being negatively correlated and 1 being perfectly correlated. We additionally define $\Delta \rho$ and $\Delta \tau$ correlation difference measures defined on the interval [-100, 100], to compare model predictions to $n$ -gram frequency predictions. This measures the difference in correlation between $n$ -gram frequency predictions and a
+
+model's probability distribution, where -100 indicates degraded correlation, 0 equals perfect correlation, and 100 indicates improved correlation with the ground truth as compared to the relative n-gram frequencies. In the context of reporting bias, $\Delta \rho$ and $\Delta \tau$ can be interpreted as measures of bias amplification or mitigation for negative and positive values, respectively.
+
+We additionally define an average of the two correlation metrics as "Avg. Correlation". When using this metric, we first compute $\frac{\rho + \tau}{2}$ for a specific object and perform all other aggregations in the same way as for the other metrics.
+
+
+Figure 3: Correlation between n-gram frequency and LM performance for single, multi, and any color objects. X and Y axes are Kendall's $\tau$ correlation between n-gram frequency and ground truth and LM predictions with ground truth respectively. Each point corresponds to a single object in our dataset. LM correlation is averaged over the top models for each architecture. The dotted line $y = x$ corresponds to to perfect correlation.
+
+# 5 Results
+
+# 5.1 Zero-Shot Probes
+
+The results of LMs when probed in a zero-shot setting, provided in Table 6, clearly demonstrate that LMs perform worse on single-color objects and perform better on objects that can take on a range of colors. Furthermore, correlations are relatively low for all objects and models. This demonstrates that colors are generally challenging for state-of-the-art pretrained LMs.
+
+# 5.2 Reporting Bias and Model Accuracy
+
+Figure 3 compares the correlation between $n$ -gram frequency and zero-shot LM performance. The identity line represents a theoretical perfect correlation between how well $n$ -gram frequency correlates with our ground truth and LM predictions.[11] Any points above the identity line represent cases where LMs seem to mitigate reporting bias – their predictions are closer to ground truth, and points below the line represent cases where LMs amplify reporting bias – their predictions are further from ground truth. When averaged across all models (see Appendix C for the full list of results) zero-shot LMs amplify the reporting bias of single-color objects by $5.23\%$ on average, and $6.26\%$ for multi-color objects. For any-color objects, we find a slight mitigation of $0.21\%$ on average.
+
+Table 7 aggregates and combines results from Tables 4 and 6 and elucidates two main points on the effect of reporting bias on a LM's perception of color. First, the color distributions of LMs correlate more strongly with reporting bias-affected text than with a human's perception of color. Second, single-colored objects are the most affected by reporting bias, and the objects LMs struggle the most on. These results indicate that, in line with our hypothesis, LMs are negatively impacted by reporting bias. Further, because reporting bias is innate to human communication and due to the enormous amount of text required for modern LMs, it is infeasible to eliminate reporting bias from all training data. This entails - in support of the arguments in Bender and Koller (2020) and Bisk et al. (2020) - that language understanding abilities are naturally limited by text-only training.
+
+# 5.3 Representation Probes
+
+Fig. 4 shows the average correlation and Jensen-Shannon divergence for unseen objects as a func
+
+| Group | Freq. | Avg. Correlation ↑ |
| Humans | Ngrams |
| Single | 5.60 | 40.1 ± 22.3 | 63.0 ± 18.1 |
| Multi | 9.69 | 42.2 ± 20.5 | 63.1 ± 17.5 |
| Any | 20.26 | 42.9 ± 22.5 | 63.4 ± 16.2 |
+
+Table 7: LM predictions have higher correlation with n-gram frequencies. Here we compare the average correlation between LM predictions and two sources of "ground truth"; one collected from human annotators and one computed from n-gram frequencies. Single, Multi, and Any indicate sets of objects that are frequently of a single color, between two to four colors, or could be any color, respectively. The "Freq." column indicates the frequency n-grams containing these objects also have one of the eleven colors.
+
+| n | | GPT-2 L | RoBERTa B | CLIP ViT-B/32 |
| 13 | DJS | 0.178 | 0.185 | 0.168 |
| MDL | 2.80 | 2.95 | 2.79 |
| SDL, ε=0.1 | >1.50 | >1.65 | >1.49 |
| εSC, ε=0.1 | >13 | >13 | >13 |
| Avg Corr. | 40.7 | 42.7 | 45.5 |
| 311 | DJS | 0.137 | 0.123 | 0.065 |
| MDL | 45.07 | 42.08 | 27.22 |
| SDL, ε=0.1 | >13.97 | >10.98 | 2.43 |
| εSC, ε=0.1 | >311 | >311 | 165 |
| Avg Corr. | 54.0 | 54.9 | 63.9 |
+
+Table 8: Estimated measures of representation quality for the best model of each architecture.
+
+tion of the number of training objects. Note that with 14 objects, all models surpass zero-shot performance in terms of Jensen-Shannon divergence. With enough training objects, we observe similar ranking patterns observed in the zero-shot setting for text-only models. However, the advantage of this approach is that we can additionally include multimodal architectures.
+
+The results from these experiments demonstrate that multimodal models outperform text-only models at recovering color distributions. They manage to do so even though the performance of multimodal models is often lower on classic NLP tasks (Tan and Bansal, 2020) and many multimodal datasets are even more prone to reporting bias in text (Misra et al., 2016; van Miltenburg, 2016; Burns et al., 2018). This further support the arguments in Bisk et al. (2020) that understanding concepts requires experiencing them in their natural form.
+
+
+Figure 4: Representation probing results for unseen objects with varying amounts of data, averaged over 5 seeds. The main lines are the best model from those of the same type (e.g., RoBERTaBASE and RoBERTaLARGE), and the translucent lines are the per-model averages. Dotted lines represent best zero-shot performance for each model. The "Random" group consists of a randomly initialized RoBERTa and CLIP. The black dotted lines correspond to $\epsilon$ and $n$ in Table 8. Left: Average of Spearman's $\rho$ and Kendall's $\tau$ . Right: Jensen-Shannon divergence.
+
+
+
+# 6 Limitations
+
+While our work identifies issues with text-only training and motivates the use of multimodal signals during pretraining, in this section we outline some limitations of our approach.
+
+First, a number of recent papers have highlighted potential limitations of probing LMs in certain ways (Zhang and Bowman, 2018; Whitney et al., 2021). While we acknowledge that probing does not provide a full picture of the capabilities of LMs, our hypothesis was supported by a range of different results from different approaches. In future work, we hope to leverage research (Bouraoui et al., 2020; Jiang et al., 2020) that demonstrates effective methods for automatically producing templates optimized for specific models. In the current state, we cannot and do not state exactly what LMs do and do not capture, rather we use our results to uphold and strengthen our original hypothesis that reporting bias hinders performance and that multimodal signals can help mitigate this problem.
+
+Second, the bi-gram/tri-gram approach we use to quantify reporting bias only approximates the full set of object-color instances. To be more exact, a dependency parser would have to be run on every dataset.
+
+Finally, although our results motivate the use of multimodal signals during pretraining, there are still challenges to overcome. As discussed by Tan and Bansal (2020), the performance of multimodal models on classic NLP tasks often does not reflect
+
+the inherent advantages of these architectures, and many multimodal dataset are even more prone to reporting bias in text (Misra et al., 2016; van Miltenburg, 2016; Burns et al., 2018). Further, while a visual signal is able to better impart a sense of color, it is not enough to endow models with the meaning behind those colors. Humans easily learn that a green banana is not yet ripe, and that a brown banana is past its prime. For models to obtain this level of knowledge and reasoning they will likely require training signals from more modalities, and potentially fully embodied experiences.
+
+# 7 Related Work
+
+Color-Object Relationships Preexisting word associations datasets often include object-color relationships as either having multiple equally likely pairings (Gladkova et al., 2016; Kucera and Francis, 1967), or as probabilistic cue-target pairs (Nelson et al., 2004). Others such as Devereux et al. (2013) take a norm completion approach, wherein participants are tasked with generating attributes given some concept. One can then extract the object-color relationships by counting the number of participants who reported a given color.
+
+However, the resulting "distribution" is an aggregate count over individuals, and does not necessarily reflect the distribution from the eyes of a single observer. Thus, previous research into LMs as knowledge bases has not been able to fully explore the extent to which they know color (A. Rodriguez
+
+and Merlo, 2020; Shwartz and Choi, 2020).
+
+Previous work has shown the importance of color in visual perception and object recognition (Rosenthal et al., 2018; Gegenfurtner and Rieger, 2000). More recently Teichmann et al. (2020) use time resolved neural imaging data to demonstrate how the typicality of object-color relationships influences object representations in visual processing.
+
+Probing LMs A wide range of papers have probed LMs in a zero-shot fashion by looking at how they fill in a [MASK] token in handcrafted (Weir et al., 2020; Petroni et al., 2019; Jiang et al., 2020; Ettinger, 2020; Lin et al., 2020) or automatically generated (Bouraoui et al., 2020; Jiang et al., 2020) template sentences. Others, such as Warstadt et al. (2020) compare perplexities between minimal pairs of sentences. A different approach is to analyze the representation quality of LMs for linguistic tasks by training a simple MLP on pretrained model representations (Da and Kasai, 2019; Lin et al., 2019). However, Zhang and Bowman (2018) demonstrate that the procedure of training an additional classifier may distort the results. An alternative approach introduced by Voita and Titov (2020) is information-theoretic probing with MDL. This method builds on standard probing classifiers by not only measuring the final performance, but additionally measuring the amount of effort required to achieve that performance.
+
+Probing Multimodal LMs Often multimodal LMs are used in the domain of visual question answering, where, given an image, the model is asked a question about concepts in the image (Goyal et al., 2017; Hudson and Manning, 2019). While it is often possible to simply use the text-only portion of these models for other tasks, this often leads to poor performance on solely language-based tasks (Tan and Bansal, 2020).
+
+# 8 Conclusion
+
+In this paper we investigate how reporting bias negatively effects a LM's perception of color. We do so by first creating CoDa, a dataset of 521 human-perceived color distributions for common objects. We then utilize this dataset to demonstrate that text-only models are inherently limited because of reporting bias. Subsequently, we show that multimodal training mitigates these issues. Overall, our results support the claims in Bender and Koller (2020) and Bisk et al. (2020) that text-only train
+
+ing is insufficient for language understanding and motivate further research on how to best employ multimodal training signals.
+
+# Acknowledgments
+
+We would like to thank the members of CU Boulder's NALA Group for their feedback on this work. We would also like to thank the reviewers for taking the time to provide insightful questions and feedback.
+
+# References
+
+Maria A. Rodriguez and Paola Merlo. 2020. Word associations and the distance properties of context-aware word embeddings. In Proceedings of the 24th Conference on Computational Natural Language Learning, pages 376-385, Online. Association for Computational Linguistics.
+Stéphane Aroca-Ouellette, Cory Paik, Alessandro Roncone, and Katharina Kann. 2021. PROST: Physical reasoning about objects through space and time. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 4597-4608, Online. Association for Computational Linguistics.
+Emily M. Bender and Alexander Koller. 2020. Climbing towards NLU: On meaning, form, and understanding in the age of data. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5185-5198, Online. Association for Computational Linguistics.
+Brent Berlin and Paul Kay. 1969. *Basic Color Terms: Their Universality and Evolution*. University of California Press.
+Yonatan Bisk, Ari Holtzman, Jesse Thomason, Jacob Andreas, Yoshua Bengio, Joyce Chai, Mirella Lapata, Angeliki Lazaridou, Jonathan May, Aleksandr Nisnevich, Nicolas Pinto, and Joseph Turian. 2020. Experience grounds language. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8718-8735, Online. Association for Computational Linguistics.
+Zied Bouraoui, José Camacho-Collados, and Steven Schockaert. 2020. Inducing relational knowledge from BERT. 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 7456-7463. AAAI Press.
+Kaylee Burns, Lisa Anne Hendricks, Trevor Darrell, and Anna Rohrbach. 2018. Women also snowboard: Overcoming bias in captioning models. ArXiv preprint, abs/1803.09797.
+
+Jeff Da and Jungo Kasai. 2019. Cracking the contextual commonsense code: Understanding commonsense reasoning aptitude of deep contextual representations. In Proceedings of the First Workshop on Commonsense Inference in Natural Language Processing, pages 1-12, Hong Kong, China. Association for Computational Linguistics.
+Barry Devereux, Lorraine Tyler, Jeroen Geertzen, and Billi Randall. 2013. The centre for speech, language and the brain (cslb) concept property norms. Behavior research methods, 46.
+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.
+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.
+Karl R Gegenfurtner and Jochem Rieger. 2000. Sensory and cognitive contributions of color to the recognition of natural scenes. *Current Biology*, 10(13):805-808.
+Anna Gladkova, Aleksandr Drozd, and Satoshi Matsuoka. 2016. Analogy-based detection of morphological and semantic relations with word embeddings: what works and what doesn't. In Proceedings of the NAACL Student Research Workshop, pages 8-15, San Diego, California. Association for Computational Linguistics.
+Jonathan Gordon and Benjamin Van Durme. 2013. Reporting bias and knowledge acquisition. In Proceedings of the 2013 workshop on Automated knowledge base construction, pages 25-30.
+Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. 2017. Making the V in VQA matter: Elevating the role of image understanding in visual question answering. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 6325-6334. IEEE Computer Society.
+Herbert P Grice. 1975. Logic and conversation. In Speech acts, pages 41-58. Brill.
+Drew A. Hudson and Christopher D. Manning. 2019. GQA: A new dataset for real-world visual reasoning and compositional question answering. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 6700-6709. Computer Vision Foundation / IEEE.
+
+Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V. Le, Yunhsuan Sung, Zhen Li, and Tom Duerig. 2021. Scaling up visual and vision-language representation learning with noisy text supervision.
+Zhengbao Jiang, Frank F. Xu, Jun Araki, and Graham Neubig. 2020. How can we know what language models know? Transactions of the Association for Computational Linguistics, 8:423-438.
+Paul Kay, Brent Berlin, Luisa Maffi, William R Merrifield, and Richard Cook. 2009. The world color survey. CSLI Publications Stanford, CA.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+H. Kucera and W. N. Francis. 1967. Computational analysis of present-day American English. Brown University Press, Providence, RI.
+Alina Kuznetsova, Hassan Rom, Neil Alldrin, Jasper Uijlings, Ivan Krasin, Jordi Pont-Tuset, Shahab Kamali, Stefan Popov, Matteo Malloci, Alexander Kolesnikov, and et al. 2020. The open images dataset v4. International Journal of Computer Vision, 128(7):1956-1981.
+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 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
+Bill Yuchen Lin, Seyeon Lee, Rahul Khanna, and Xi-ang Ren. 2020. Birds have four legs?! NumerSense: Probing Numerical Commonsense Knowledge of Pre-Trained Language Models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6862-6868, Online. Association for Computational Linguistics.
+Yongjie Lin, Yi Chern Tan, and Robert Frank. 2019. Open sesame: Getting inside BERT's linguistic knowledge. In Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 241-253, Florence, Italy. Association for Computational Linguistics.
+Yuri Lin, Jean-Baptiste Michel, Erez Aiden Lieberman, Jon Orwant, Will Brockman, and Slav Petrov. 2012. Syntactic annotations for the Google Books NGram corpus. In Proceedings of the ACL 2012 System Demonstrations, pages 169-174, Jeju Island, Korea. Association for Computational Linguistics.
+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, abs/1907.11692.
+Ishan Misra, C. Lawrence Zitnick, Margaret Mitchell, and Ross B. Girshick. 2016. Seeing through the human reporting bias: Visual classifiers from noisy human-centric labels. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 2930-2939. IEEE Computer Society.
+Douglas L Nelson, Cathy L McEvoy, and Thomas A Schreiber. 2004. The university of south florida free association, rhyme, and word fragment norms. Behavior Research Methods, Instruments, & Computers, 36(3):402-407.
+Fabio Petroni, Tim Rocttäschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander Miller. 2019. Language models as knowledge bases? 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 2463-2473, Hong Kong, China. Association for Computational Linguistics.
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. 2021. Learning transferable visual models from natural language supervision.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
+Isabelle Rosenthal, Sivalogeswaran Ratnasingam, Theodros Haile, Serena Eastman, Josh Fuller-Deets, and Bevil R. Conway. 2018. Color statistics of objects, and color tuning of object cortex in macaque monkey. Journal of Vision, 18(11):1-1.
+Vered Shwartz and Yejin Choi. 2020. Do neural language models overcome reporting bias? In Proceedings of the 28th International Conference on Computational Linguistics, pages 6863-6870, Barcelona, Spain (Online). International Committee on Computational Linguistics.
+Hao Tan and Mohit Bansal. 2020. Vokenization: Improving language understanding with contextualized, visual-grounded supervision. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2066-2080, Online. Association for Computational Linguistics.
+Lina Teichmann, Genevieve L. Quek, Amanda K. Robinson, Tijl Grootswagers, Thomas A. Carlson, and Anina N. Rich. 2020. The influence of object-color knowledge on emerging object representations in the brain. Journal of Neuroscience, 40(35):6779-6789.
+
+Antonio Torralba and Alexei A. Efros. 2011. Unbiased look at dataset bias. In The 24th IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2011, Colorado Springs, CO, USA, 20-25 June 2011, pages 1521-1528. IEEE Computer Society.
+Emiel van Miltenburg. 2016. Stereotyping and bias in the flickr30k dataset. ArXiv preprint, abs/1605.06083.
+Elena Voita and Ivan Titov. 2020. Information-theoretic probing with minimum description length. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 183-196, Online. Association for Computational Linguistics.
+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.
+Nathaniel Weir, Adam Poliak, and Benjamin Van Durme. 2020. Probing neural language models for human tacit assumptions. CogSci.
+William F. Whitney, Min Jae Song, David Brandfon-brener, Jaan Altosaar, and Kyunghyun Cho. 2021. Evaluating representations by the complexity of learning low-loss predictors.
+Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtopicz, 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 M. Rush. 2019. Huggingface's transformers: State-of-the-art natural language processing. ArXiv preprint, abs/1910.03771.
+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.
+
+# A Dataset Construction
+
+# A.1 Analysis of Annotator Biases
+
+A potential side-effect of crowdsourcing annotations is that annotators might be biased toward choosing fewer colors faster, as this would equate to higher monetary incentives. We observe a small correlation (Kendall's Tau=0.154, p=0.026) between the total time and number of colors selected. However, this is to be expected as selecting the colors takes time.
+
+All models we evaluate were predominately trained on English text. To accommodate this domain and minimize dataset variance, we recruit only annotators from the United States. This may induce cultural or geographic biases: e.g., the color diversity of carrots is much smaller in the United States than in some Asian countries. Other geographic biases are more fine-grained; for example, the color of fire hydrants in the U.S. depends on where you live and the water source.
+
+Additionally, our choice of colors is not as universal as, for example, the 6 color terms defined by The World Color Survey (Kay et al., 2009). The latter may be more suitable for multilingual studies, though we leave such investigations for future work.
+
+# B Experimental Details
+
+For all experiments, we implement the CoDa dataset using the Hugginface Datasets Library. We use Huggingface's (Wolf et al., 2019) pretrained models for evaluating all text-only models, and the official CLIP implementation by Radford et al. (2021) for all CLIP models. $^{12}$ We run all experiments on a single machine with one Nvidia Titan RTX GPU.
+
+# B.1 Representation Probing
+
+Our representation probing implementation is derived from the efficient JAX version provided by Whitney et al. (2021).13
+
+We split the training set into 10 subsets spaced logarithmically from 1 to 311 objects, and report averages over 5 seeds. Note that for each seed, any additional points along the curve represent additional objects to the previous subset, however, different seeds have different object sets and thus a different number of samples per subset. For our dataset, we found the difference in samples to be far less impactful on performance than the number of objects.
+
+All probes are 2-layer MLPs with ReLU activation functions and are trained using the Adam Optimizer (Kingma and Ba, 2015) with a learning rate of $10^{-4}$ . All probes are trained for 4000 steps. More details on how to reproduce the experiments are provided in our GitHub repository. $^{14}$
+
+# C Zero Shot Results
+
+The zero-shot results for all evaluated LMs are provided in Table 9.
+
+| Model | Group | Spearman ρ↑ | Kendall's τ↑ | Acc@1↑ | DJS↓ | Δρ↑ | Δτ↑ |
| GPT-2 | B | Single | 34.9 ± 25.7 | 28.8 ± 21.2 | 26.8 | 0.39 ± 0.07 | -6.86 | -6.60 |
| Multi | 40.7 ± 22.9 | 32.9 ± 18.5 | 23.6 | 0.25 ± 0.06 | -6.77 | -5.46 |
| Any | 45.7 ± 25.0 | 36.9 ± 20.9 | 33.9 | 0.09 ± 0.04 | 2.17 | 2.64 |
| M | Single | 34.2 ± 26.4 | 28.5 ± 21.8 | 35.9 | 0.39 ± 0.07 | -6.94 | -6.30 |
| Multi | 36.0 ± 26.0 | 29.5 ± 20.8 | 25.5 | 0.25 ± 0.06 | -10.87 | -8.51 |
| Any | 43.2 ± 26.5 | 34.8 ± 21.2 | 35.7 | 0.09 ± 0.04 | 0.09 | 0.74 |
| L | Single | 39.9 ± 24.4 | 32.8 ± 19.7 | 33.8 | 0.39 ± 0.07 | -1.10 | -1.91 |
| Multi | 44.8 ± 20.9 | 36.5 ± 16.8 | 29.8 | 0.26 ± 0.06 | -1.49 | -1.05 |
| Any | 47.3 ± 26.9 | 37.9 ± 21.8 | 38.3 | 0.09 ± 0.04 | 4.35 | 3.95 |
| XL | Single | 40.3 ± 26.6 | 33.6 ± 22.1 | 40.4 | 0.39 ± 0.07 | -0.55 | -1.01 |
| Multi | 41.7 ± 24.3 | 34.1 ± 19.4 | 28.8 | 0.25 ± 0.06 | -4.66 | -3.42 |
| Any | 48.1 ± 25.1 | 38.2 ± 20.2 | 40.0 | 0.09 ± 0.04 | 5.29 | 4.46 |
| RoBERTa | B | Single | 41.5 ± 23.9 | 34.4 ± 19.6 | 32.3 | 0.32 ± 0.13 | 0.58 | -0.21 |
| Multi | 47.0 ± 21.9 | 37.7 ± 18.0 | 23.1 | 0.21 ± 0.09 | 0.44 | -0.03 |
| Any | 51.9 ± 22.7 | 41.3 ± 18.9 | 29.6 | 0.11 ± 0.07 | 8.64 | 7.27 |
| L | Single | 47.8 ± 24.7 | 40.1 ± 20.8 | 42.9 | 0.28 ± 0.11 | 7.17 | 5.69 |
| Multi | 50.2 ± 23.8 | 41.0 ± 19.5 | 33.2 | 0.19 ± 0.08 | 4.57 | 4.01 |
| Any | 52.5 ± 23.5 | 42.0 ± 19.5 | 36.5 | 0.10 ± 0.06 | 9.97 | 8.26 |
| ALBERT V1 | B | Single | 27.8 ± 25.0 | 23.2 ± 20.3 | 16.2 | 0.38 ± 0.10 | -14.08 | -12.30 |
| Multi | 31.4 ± 24.2 | 25.1 ± 18.8 | 13.0 | 0.27 ± 0.09 | -15.27 | -12.60 |
| Any | 42.8 ± 26.4 | 33.7 ± 21.4 | 18.3 | 0.14 ± 0.06 | -0.70 | -0.63 |
| L | Single | 29.4 ± 27.0 | 24.3 ± 21.9 | 31.8 | 0.35 ± 0.13 | -11.67 | -10.62 |
| Multi | 32.7 ± 22.6 | 26.7 ± 18.0 | 23.1 | 0.25 ± 0.09 | -13.50 | -10.78 |
| Any | 41.2 ± 25.7 | 33.6 ± 20.5 | 38.3 | 0.13 ± 0.06 | -2.37 | -0.58 |
| XL | Single | 36.4 ± 24.5 | 29.7 ± 20.0 | 26.3 | 0.35 ± 0.11 | -4.73 | -4.99 |
| Multi | 44.6 ± 19.1 | 36.1 ± 15.5 | 26.9 | 0.22 ± 0.07 | -1.53 | -1.27 |
| Any | 48.2 ± 21.4 | 38.2 ± 17.2 | 35.7 | 0.11 ± 0.05 | 5.07 | 4.22 |
| XXL | Single | 39.9 ± 25.6 | 33.1 ± 21.1 | 31.3 | 0.31 ± 0.12 | -1.38 | -1.80 |
| Multi | 41.3 ± 26.1 | 33.2 ± 21.0 | 23.6 | 0.21 ± 0.08 | -5.23 | -4.48 |
| Any | 41.9 ± 24.3 | 32.8 ± 18.4 | 38.3 | 0.11 ± 0.05 | -0.87 | -1.03 |
| ALBERT V2 | B | Single | 22.3 ± 29.7 | 18.9 ± 24.2 | 20.7 | 0.36 ± 0.11 | -19.54 | -16.46 |
| Multi | 22.2 ± 26.8 | 18.0 ± 21.3 | 18.3 | 0.26 ± 0.07 | -23.57 | -19.11 |
| Any | 25.8 ± 26.9 | 20.8 ± 20.6 | 26.1 | 0.12 ± 0.05 | -18.38 | -13.98 |
| L | Single | 39.2 ± 27.1 | 32.5 ± 22.4 | 30.3 | 0.32 ± 0.11 | -2.14 | -2.50 |
| Multi | 41.9 ± 24.9 | 33.9 ± 20.4 | 25.0 | 0.21 ± 0.07 | -3.73 | -3.10 |
| Any | 40.0 ± 22.9 | 32.4 ± 18.1 | 33.0 | 0.10 ± 0.05 | -3.70 | -2.05 |
| XL | Single | 25.2 ± 26.6 | 20.5 ± 21.5 | 26.3 | 0.35 ± 0.12 | -16.14 | -14.53 |
| Multi | 25.4 ± 23.4 | 20.7 ± 18.4 | 23.6 | 0.25 ± 0.08 | -20.51 | -16.59 |
| Any | 29.6 ± 27.1 | 23.1 ± 20.8 | 26.1 | 0.12 ± 0.05 | -12.48 | -10.04 |
| XXL | Single | 43.7 ± 24.4 | 36.4 ± 20.6 | 34.3 | 0.30 ± 0.11 | 2.69 | 1.55 |
| Multi | 45.2 ± 23.7 | 36.1 ± 19.5 | 25.5 | 0.20 ± 0.07 | -1.08 | -1.40 |
| Any | 43.7 ± 24.9 | 34.5 ± 19.6 | 39.1 | 0.10 ± 0.05 | 0.95 | 0.70 |
| Average | Single | 35.9 ± 25.8 | 29.8 ± 21.2 | 30.7 | 0.35 ± 0.10 | -5.33 | -5.14 |
| Multi | 38.9 ± 23.6 | 31.5 ± 19.0 | 24.5 | 0.24 ± 0.07 | -7.37 | -5.99 |
| Any | 43.0 ± 25.0 | 34.3 ± 19.9 | 33.5 | 0.11 ± 0.05 | -0.14 | 0.28 |
+
+Table 9: LM results when probed in a zero-shot setting. Single, Multi, and Any indicate sets of objects that are frequently a single color, between two to four colors, or could be any color, respectively. All correlation coefficients $(\rho, \tau)$ are multiplied by 100. Means and standard deviations are calculated over objects of the respective group.
\ No newline at end of file
diff --git a/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/images.zip b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..943d812b7961dcb6912f890be9c761c7f26ffa88
--- /dev/null
+++ b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:92b527a7db9091e19369fd4d17f4d22dfce9968522fb225f03df20f89457d227
+size 687840
diff --git a/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/layout.json b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..f54120f8cb207e07c4dc5045d9c02c2385699ad8
--- /dev/null
+++ b/theworldofanoctopushowreportingbiasinfluencesalanguagemodelsperceptionofcolor/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0afa3f7becf42d72a5b2a4551d1f38bc340c2240e4b51600911923c366d4f1c7
+size 369091
diff --git a/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/de9e05a5-16d9-4b40-94c7-2b560bb1f4de_content_list.json b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/de9e05a5-16d9-4b40-94c7-2b560bb1f4de_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..e7599d68b26a0b751922db5cf9522d52b51f1cf3
--- /dev/null
+++ b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/de9e05a5-16d9-4b40-94c7-2b560bb1f4de_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:55352f327702df54e6a58aa9330f1a5ba799bade344eb75592a9d717b5356f54
+size 121823
diff --git a/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/de9e05a5-16d9-4b40-94c7-2b560bb1f4de_model.json b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/de9e05a5-16d9-4b40-94c7-2b560bb1f4de_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..1bc78525a10106823b2ae8650a6ca46dc7f46a56
--- /dev/null
+++ b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/de9e05a5-16d9-4b40-94c7-2b560bb1f4de_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8b1401afec4b02bddd992653f4cbffd0b9dbfd7f3c58a96c6c1614d09c15f278
+size 148305
diff --git a/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/de9e05a5-16d9-4b40-94c7-2b560bb1f4de_origin.pdf b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/de9e05a5-16d9-4b40-94c7-2b560bb1f4de_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..85a691ddb2630ab877d2d57998ca6dcfd4c35f38
--- /dev/null
+++ b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/de9e05a5-16d9-4b40-94c7-2b560bb1f4de_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ba7b692e194ddeda11d20cfb4b08dd22654170c071ef8b34dd2015386ff952f1
+size 3552771
diff --git a/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/full.md b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..52bc61403b19bd2916eae98f96edea8c7fd6a6db
--- /dev/null
+++ b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/full.md
@@ -0,0 +1,567 @@
+# Think about it! Improving defeasible reasoning by first modeling the question scenario
+
+Aman Madaan, Niket Tandon†, Dheeraj Rajagopal, Peter Clark†, Yiming Yang, Eduard Hovy
+
+Language Technologies Institute, Carnegie Mellon University, Pittsburgh, PA, USA
+
+† Allen Institute for Artificial Intelligence, Seattle, WA, USA
+
+{dheeraj,amadaan,yiming,hovy}@cs.cmu.edu
+
+{nikett, peterc} $@$ allenai.org
+
+# Abstract
+
+Defeasible reasoning is the mode of reasoning where conclusions can be overturned by taking into account new evidence. Existing cognitive science literature on defeasible reasoning suggests that a person forms a mental model of the problem scenario before answering questions. Our research goal asks whether neural models can similarly benefit from envisioning the question scenario before answering a defeasible query. Our approach is, given a question, to have a model first create a graph of relevant influences, and then leverage that graph as an additional input when answering the question. Our system, CURIOUS, achieves a new state-of-the-art on three different defeasible reasoning datasets. This result is significant as it illustrates that performance can be improved by guiding a system to "think about" a question and explicitly model the scenario, rather than answering reflexively. $^{1}$
+
+# 1 Introduction
+
+Defeasible inference is a mode of reasoning where additional information can modify conclusions (Koons, 2017). Here we consider the specific formulation and challenge in Rudinger et al. (2020): Given that some premise $\mathbf{P}$ plausibly implies a hypothesis $\mathbf{H}$ , does new information that the situation is $\mathbf{S}$ weaken or strengthen the conclusion $\mathbf{H}$ ? For example, consider the premise "The drinking glass fell" with a possible implication "The glass broke". New information that "The glass fell on a pillow" here weakens the implication.
+
+We borrow ideas from the cognitive science literature that supports defeasible reasoning for humans with an inference graph (Pollock, 2009, 1987). Inference graphs formulation in (Madaan and Yang, 2021), which we use in this paper, draws connections between the $\mathbf{P}$ , $\mathbf{H}$ , and $\mathbf{S}$ through mediating
+
+
+Figure 1: CURIOUS improves defeasible reasoning by modeling the question scenario with an inference graph $G$ adapted from cognitive science literature. The graph is encoded judiciously using our graph encoder $h(.)$ , resulting in end task performance improvement.
+
+events. This can be seen as a mental model of the question scenario before answering the question (Johnson-Laird, 1983). This paper asks the natural question: can modeling the question scenario with inference graphs help machines in defeasible reasoning?
+
+Our approach is as follows. First, given a question, generate an inference graph describing important influences between question elements. Then, use that graph as an additional input when answering the defeasible reasoning query. Our proposed system, CURIOUS, comprises a graph generation module and a graph encoding module to use the generated graph for the query (Figure 2).
+
+To generate inference graphs, we build upon past work that uses a sequence to sequence approach (Madaan et al., 2021). However, our analysis re
+
+
+Figure 2: An overview of CURIOUS
+
+vealed that the graphs can often be erroneous, and CURIOUS also includes an error correction module to generate higher quality inference graphs. This was important because we found that better graphs are more helpful in the downstream QA task.
+
+The generated inference graph is then used for the QA task on three existing defeasible inference datasets from diverse domains, viz., $\delta$ -SNLI (natural language inference) (Bowman et al., 2015), $\delta$ -SOCIAL (reasoning about social norms) (Forbes et al., 2020), and $\delta$ -ATOMIC (commonsense reasoning) (Sap et al., 2019). We show that the way the graph is encoded for input is important. If we simply augment the question with the generated graphs, there are some gains on all datasets. However, the accuracy improves substantially across all datasets with a more judicious encoding of the graph-augmented question that accounts for interactions between the graph nodes. To achieve this, we use the mixture of experts approach (Jacobs et al., 1991) to include a mixture of experts layers during encoding, enabling the ability to attend to specific nodes while capturing their interactions selectively.
+
+In summary, our contribution is in drawing on the idea of an inference graph from cognitive science to show benefits in a defeasible inference QA task. Using an error correction module in the graph generation process, and a judicious encoding of the graph augmented question, CURIOUS achieves a new state-of-the-art over three defeasible datasets. This result is significant also because our work illustrates that guiding a system to "think about" a question before answering can improve performance.
+
+# 2 Task
+
+We use the defeasible inference task and datasets defined in (Rudinger et al., 2020), namely given an input $\mathbf{x} = (\mathbf{P},\mathbf{H},\mathbf{S})$ , predict the output $\mathbf{y} \in \{\text{strengthens}, \text{weakens}\}$ , where $\mathbf{P}$ , $\mathbf{H}$ , and $\mathbf{S}$ are
+
+sentences describing a premise, hypothesis, and scenario respectively, and $y$ denotes whether $S$ strengthens/weakens the plausible conclusion that $\mathbf{H}$ follows from $\mathbf{P}$ , as described in Section 1.
+
+# 3 Approach
+
+Inspired by past results (Madaan et al., 2021) that humans found inference graphs useful for defeasible inference, we investigate whether neural models can benefit from envisioning the question scenario using an inference graph before answering a defeasible inference query.
+
+Inference graphs As inference graphs are central to our work, we give a brief description of their structure next. Inference graphs were introduced in philosophy by Pollock (2009) to aid defeasible reasoning for humans, and in NLP by Tandon et al. (2019) for a counterfactual reasoning task. We interpret the inference graphs as having four kinds of nodes (Pollock, 2009; Madaan et al., 2021):
+
+i. Contextualizers $(\mathbf{C} - ,\mathbf{C} + )$ : these nodes set the context around a situation and connect to the P.
+ii. Situations (S, S-): these nodes are new situations that emerge which might overturn an inference.
+iii. Hypothesis $(\mathbf{H} - ,\mathbf{H} + )$ : Hypothesis nodes describe the outcome/conclusion of the situation.
+iv. Mediators $(\mathbf{M} - ,\mathbf{M} + )$ : Mediators are nodes that help bridge the knowledge gap between a situation and a hypothesis node by explaining their connection explicitly. These node can either act as a weaker or strengthenser.
+
+Each node in an influence graph is labeled with an event (a sentence or a phrase). The signs - and + capture the nature of the influence event node. Concrete examples are present in Figures 1, 4, and in Appendix §D.
+
+# 3.1 Overview of CURIOUS
+
+Our system, CURIOUS, comprises three components, (i) a graph generator $\mathrm{GEN}_{\mathrm{init}}$ , (ii) a graph corrector $\mathrm{GEN}_{\mathrm{corr}}$ , (iii) a graph encoder (Figure 1). $\mathrm{GEN}_{\mathrm{init}}$ generates an inference graph from the input $\mathbf{x}$ . We borrow the sequence to sequence approach of $\mathrm{GEN}_{\mathrm{init}}$ from Madaan et al. (2021) without any architectural changes. However, we found that the resulting graphs can often be erroneous (which hurts task performance), so CURIOUS includes an error correction module $\mathrm{GEN}_{\mathrm{corr}}$ to generate higher
+
+
+Figure 3: An overview of our method to perform graph-augmented defeasible reasoning using a hierarchical mixture of experts. First, MOE-V selectively pools the node representations to generate a representation $\mathbf{h}_{\mathbf{G}}$ of the inference graph. Then, MOE-GX pools the query representation $\mathbf{h}_{\mathbf{x}}$ and the graph representation generated by MOE-V to pass to the upstream classifier.
+
+quality inference graphs that are then judiciously encoded using the graph encoder. This encoded representation is then passed through a classifier to generate an end task label. The overall architecture is shown in Figure 2.
+
+# 3.2 Graph generator
+
+
+Figure 4: The graphs generated by $\mathrm{GEN}_{\mathrm{init}}$ . The input graph has repetitions for nodes $\{C-, C+\}$ and $\{S, S-\}$ . The corrected graph generated by $\mathrm{GEN}_{\mathrm{corr}}$ replaces the repetitions with meaningful labels.
+
+As the initial graph generator, we use the method described in Madaan et al. (2021) $(\mathrm{GEN}_{\mathrm{init}})$ to generate inference graphs for defeasible reasoning. Their approach involves first training a graph-generation module, and then performing zero-shot inference on a defeasible query to obtain an inference graph. They obtain training
+
+data for the graph-generation module from WIQA dataset (Tandon et al., 2019). WIQA is a dataset of 2107 $(\mathbf{T}_i, \mathbf{G}_i)$ tuples, where $\mathbf{T}_i$ is the passage text that describes a process (e.g., waves hitting a beach), and $\mathbf{G}_i$ is the corresponding influence graph. The graph generator GENinit is trained as a seq2seq model, by setting input = [Premise] $\mathbf{T}_i$ | [Situation] $\mathbf{S}_i$ | [Hypothesis] $\mathbf{H}_i$ , and output = $\mathbf{G}_i$ . Note that $\mathbf{S}_i$ and $\mathbf{H}_i$ are nodes in the influence graph $\mathbf{G}_i$ , allowing grounded generation. [Premise], [Situation], [Hypothesis] are special tokens used to demarcate the input.
+
+# 3.3 Graph corrector
+
+We found that $70\%$ of the randomly sampled 100 graphs produced by $\mathrm{GEN}_{\mathrm{init}}$ (undesirably) had repeated nodes (an example of repeated nodes is in Figure 4). Repeated nodes introduce noise because they violate the semantic structure of a graph, e.g., in Figure 4, nodes C+ and C- are repeated, although they are expected to have opposite semantics. Higher graph quality yields better end task performance when using inference graphs (as we will show in §4.3.1)
+
+To repair such problems, we train a graph corrector, $\mathrm{GEN}_{\mathrm{corr}}$ , that takes as input $\mathbf{G}'$ , and as output it gives a graph $\mathbf{G}^*$ , with repetitions fixed. To train the model, we require $(\mathbf{G}', \mathbf{G}^*)$ examples, which we generate using a data augmentation technique described in the Appendix §A. Because the nodes in the graph are from an open vocabulary, we then train a T5 sequence-to-sequence model (Raffel et al., 2020) with input = $\mathbf{G}'$ and output =
+
+$\mathbf{G}^*$
+
+In summary, given a defeasible query PHS, we generate a potentially incorrect initial graph $\mathbf{G}'$ using $\mathrm{GEN}_{\mathrm{init}}$ . We then feed $\mathbf{G}'$ to $\mathrm{GEN}_{\mathrm{corr}}$ to obtain an improved graph $\mathbf{G}$ .
+
+# 3.4 Graph Encoder
+
+For each defeasible query $(\mathbf{P},\mathbf{H},\mathbf{S})$ , we add the inference graph $\mathbf{G}$ from CURIOUS (the corrected graph from §3.3), to provide additional context for the query, as we now describe.
+
+We concatenate the components $(\mathbf{P},\mathbf{H},\mathbf{S})$ of the defeasible query into a single sequence of tokens $\mathbf{x} = (\mathbf{P}\| \mathbf{H}\| \mathbf{S})$ , where $\| \cdot \|$ denotes concatenation. Thus, each sample of our graph-augmented binary-classification task takes the form $((\mathbf{x},\mathbf{G}),\mathbf{y})$ , where $\mathbf{y} \in \{\text{strengthener, weakener}\}$ . Following (Madaan et al., 2021), we do not use edge labels and treat all the graphs as undirected graphs.
+
+Overview: We first use a language model $\mathcal{L}$ to obtain a dense representation $\mathbf{h}_{\mathbf{x}}$ for the defeasible query $\mathbf{x}$ , and a dense representation $\mathbf{h}_{\mathbf{v}}$ for each node $\mathbf{v} \in \mathbf{G}$ . The node representations $\mathbf{h}_{\mathbf{v}}$ are then pooled using a hierarchical mixture of experts (MoE) to obtain a graph representation $\mathbf{h}_{\mathbf{G}}$ . The query representation $\mathbf{h}_{\mathbf{x}}$ and the graph representation $\mathbf{h}_{\mathbf{G}}$ are combined to solve the defeasible task. We now provide details on obtaining $\mathbf{h}_{\mathbf{x}}, \mathbf{h}_{\mathbf{v}}, \mathbf{h}_{\mathbf{G}}$ .
+
+# 3.4.1 Encoding the query and nodes
+
+Let $\mathcal{L}$ be a pre-trained language model (in our case RoBERTa (Liu et al., 2019)). We use $\mathbf{h}_{\mathbf{S}} = \mathcal{L}(\mathbf{S}) \in \mathbb{R}^{d}$ to denote the dense representation of sequence of tokens $\mathbf{S}$ returned by the language model $\mathcal{L}$ . Specifically, we use the pooled representation of the beginning-of-sequence token $$ as the sequence representation.
+
+We encode the defeasible query $\mathbf{x}$ and the nodes of the graph using $\mathcal{L}$ . Query representation is computed as $\mathbf{h}_{\mathbf{x}} = \mathcal{L}(\mathbf{x})$ , and we similarly obtain a matrix of node representations $\mathbf{h}_{\mathbf{V}}$ by encoding each node $\mathbf{v}$ in $\mathbf{G}$ with $\mathcal{L}$ as follows:
+
+$$
+\mathbf {h} _ {\mathbf {V}} = \left[ \mathbf {h} _ {v _ {1}}; \mathbf {h} _ {v _ {2}}; \dots ; \mathbf {h} _ {| \mathbf {V} |} \right] \tag {1}
+$$
+
+where $\mathbf{h}_{v_i} \in \mathbb{R}^d$ refers to the dense representation for the $i^{th}$ node of $\mathbf{G}$ derived from $\mathcal{L}$ (i.e., $\mathbf{h}_{v_i} = \mathcal{L}(v_i)$ ), and $\mathbf{h}_{\mathbf{V}} \in \mathbb{R}^{|\mathbf{V}| \times d}$ to refer to the matrix of node representations.
+
+# 3.4.2 Graph representations using MoE
+
+Recently, mixture-of-experts (Jacobs et al., 1991; Shazeer et al., 2017; Fedus et al., 2021) has emerged as a promising method of combining multiple feature types. Mixture-of-experts (MoE) is especially useful when the input consists of multiple facets, where each facet has a specific semantic meaning. Previously, Gu et al. (2018); Chen et al. (2019) have used the ability of MoE to pool disparate features on low-resource and cross-lingual language tasks. Since each node in the inference graphs used by us plays a specific role in defeasible reasoning (contextualizer, situation node, or mediator), we take inspiration from these works to design a hierarchical MoE model (Jordan and Xu, 1995) to pool node representations $\mathbf{h}_{\mathbf{V}}$ into a graph representation $\mathbf{h}_{\mathbf{G}}$ .
+
+An MoE consists of $n$ expert networks $\mathbf{E}_1, \mathbf{E}_2, \ldots, \mathbf{E}_n$ and a gating network $\mathbf{M}$ . Given an input $\mathbf{x} \in \mathbb{R}^d$ , each expert network $\mathbf{E}_i: \mathbb{R}^d \to \mathbb{R}^k$ learns a transform over the input. The gating network $\mathbf{M}: \mathbb{R}^d \to \Delta^d$ gives the weights $\mathbf{p} = \{p_1, p_2, \ldots, p_n\}$ to combine the expert outputs for input $\mathbf{x}$ . Finally, the output $\mathbf{y}$ is returned as a convex combination of the expert outputs:
+
+$$
+\begin{array}{l} \mathbf {p} = \mathbf {M} (\mathbf {x}) \\ \mathbf {y} = \sum_ {i = 1} ^ {n} p _ {i} \mathbf {E} _ {\mathbf {i}} (\mathbf {x}) \tag {2} \\ \end{array}
+$$
+
+The output $\mathbf{y}$ can either be the logits for an end task (Shazeer et al., 2017; Fedus et al., 2021) or pooled features that are passed to a downstream learner (Chen et al., 2019; Gu et al., 2018). The gating network $\mathbf{M}$ and the expert networks $\mathbf{E}_1, \mathbf{E}_2, \ldots, \mathbf{E}_n$ are trained end-to-end. During learning, the gradients to $\mathbf{M}$ train it to generate a distribution over the experts that favors the best expert for a given input. Appendix §B presents a further discussion on our MoE formulation and an analysis of the gradients.
+
+Hierarchical MoE for defeasible reasoning Different parts of the inference graphs might help answer a query to a different degree. Further, for certain queries, graphs might not be helpful (and could even be distracting), and the model could rely primarily on the input query alone. This motivates a two-level architecture that can: (i) select a subset of the nodes in the graph and ii) selectively reason across the query and the graph to varying degrees.
+
+Given these requirements, a hierarchical MoE (Jordan and Jacobs, 1994) model presents
+
+itself as a natural choice to model this task. The first MoE (MOE-V) creates a graph representation by taking a convex combination of the node representations. The second MoE (MOE-GX) then takes a convex-combination of the graph representation returned by MOE-V and query representation and passes it to an MLP for the downstream task.
+
+- MOE-V consists of five node-experts and gating network to selectively pool node representations $\mathbf{h}_{\mathbf{v}}$ to graph representation $\mathbf{h}_{\mathbf{G}}$ :
+
+$$
+\mathbf {p} = \mathbf {M} (\mathbf {h} _ {\mathbf {V}})
+$$
+
+$$
+\mathbf {h} _ {\mathbf {G}} = \sum_ {v \in \mathbf {V}} p _ {v} E _ {v} (v) \tag {3}
+$$
+
+- MOE-GX contains two experts (graph expert $E_{\mathbf{G}}$ and question expert $E_{\mathbf{Q}}$ ) and a gating network to combine the graph representation $\mathbf{h}_{\mathbf{G}}$ returned by MOE-GX and the query representation $\mathbf{h}_{\mathbf{x}}$ :
+
+$$
+\mathbf {p} = \mathbf {M} ([ \mathbf {h} _ {\mathbf {G}}; \mathbf {h} _ {\mathbf {Q}} ])
+$$
+
+$$
+\mathbf {h} _ {\mathbf {y}} = E _ {\mathbf {G}} \left(\mathbf {h} _ {\mathbf {G}}\right) + E _ {\mathbf {Q}} \left(\mathbf {h} _ {\mathbf {Q}}\right) \tag {4}
+$$
+
+$\mathbf{h}_{\mathbf{y}}$ is then passed to a 1-layer MLP to perform classification. The gates and the experts in our MoE model are single-layer MLPs, with equal input and output dimensions for the experts.
+
+# 4 Experiments
+
+In this section, we empirically investigate if CURIOUS can improve defeasible inference by first modeling the question scenario using inference graphs. We also study the reasons for any improvements.
+
+# 4.1 Experimental setup
+
+| Dataset | Split | # Samples | Total |
| δ-ATOMIC | train | 35,001 | |
| test | 4137 | 42,977 |
| dev | 3839 | |
| δ-SOCIAL | train | 88,675 | |
| test | 1836 | 92,295 |
| dev | 1784 | |
| δ-SNLI | train | 77,015 | |
| test | 9438 | 95,795 |
| dev | 9342 | |
+
+Datasets Our end task performance is measured on the three existing datasets for defeasible inference provided by Rudinger et al. (2020): $^3$ $\delta$ -ATOMIC, $\delta$ -SNLI, $\delta$ -SOCIAL (Table 1). These datasets exhibit substantial diversity because of their domains: $\delta$ -SNLI (natural language inference), $\delta$ -SOCIAL (reasoning about social norms), and $\delta$ -ATOMIC (commonsense reasoning). Thus, it would require a general model to perform well across these diverse datasets.
+
+Baselines and setup The previous state-of-the-art (SOTA) is the RoBERTa (Liu et al., 2019) model presented in Rudinger et al. (2020), and we report the published numbers for this baseline. For an additional baseline, we directly use the initial inference graph $\mathbf{G}'$ generated by $\mathrm{GEN}_{\mathrm{init}}$ , and provide it to the model simply as a string (i.e., sequence of tokens; a simple, often-used approach). This baseline is called E2E-STR. We use the same hyperparameters as Rudinger et al. (2020), and add a detailed description of the hyperparameters in Appendix §C. For all the QA experiments, we report the accuracy on the test set using the checkpoint with the highest accuracy on the development set. We use the McNemar's test (McNemar, 1947; Dror et al., 2018) and use $p < 0.05$ as a threshold for statistical significance. All the p-values are reported in Appendix §G.
+
+# 4.2 Results
+
+Table 2 compares QA accuracy on these datasets without and with modeling the question scenario. The results suggest that we get consistent gains across all datasets, with $\delta$ -SNLI gaining about 4 points. CURIOUS achieves a new state-of-the-art across three datasets, as well as now producing justifications for its answers with inference graphs.
+
+Table 1: Number of samples in each dataset by split.
+
+ | δ-ATOMIC | δ-SNLI | δ-SOCIAL |
| Prev-SOTA | 78.3 | 81.6 | 86.2 |
| E2E-STR | 78.8 | 82.2 | 86.7 |
| CURIOUS | 80.2* | 85.6* | 88.6* |
+
+Table 2: CURIOUS is better across all the datasets. This demonstrates that understanding the question scenario through generating an inference graph helps. * indicates statistical significance.
+
+# 4.3 Understanding CURIOUS gains
+
+In this section, we study the contribution of the main components of the CURIOUS pipeline.
+
+# 4.3.1 Impact of graph corrector
+
+We ablate the graph corrector module $\mathrm{GEN}_{\mathrm{corr}}$ in CURIOUS by directly supplying the output from $\mathrm{GEN}_{\mathrm{init}}$ to the graph encoder. Table 3 shows that this ablation consistently hurts across all the datasets. $\mathrm{GEN}_{\mathrm{corr}}$ provides 2 points gain across datasets. This indicates that better graphs lead to better task performance, assuming that $\mathrm{GEN}_{\mathrm{corr}}$ actually reduces the noise. Next, we investigate if $\mathrm{GEN}_{\mathrm{corr}}$ can produce more informative graphs.
+
+ | δ-ATOMIC | δ-SNLI | δ-SOCIAL |
| G' | 78.5 | 83.8 | 88.2 |
| 80.2* | 85.6* | 88.6 |
+
+Do graphs corrected by $\mathrm{GEN}_{\mathrm{corr}}$ show fewer repetitions? We evaluate the repetitions in the graphs produced by $\mathrm{GEN}_{\mathrm{init}}$ and $\mathrm{GEN}_{\mathrm{corr}}$ using two metrics: (i) repetitions per graph: average number of repeated nodes in a graph. (ii) $\%$ with repetitions: $\%$ of graphs with at least one repeated node.
+
+Table 3: Performance w.r.t. the graph used. $\mathbf{G}^{\prime}$ is the initial graph from $\mathrm{GEN}_{\mathrm{init}}$ , $G$ is the corrected graph from $\mathrm{GEN}_{\mathrm{corr}}$ . Better graphs lead to better task performance. * indicates statistical significance.
+
+ | Repetitions | GENinit | GENcorr |
| δ-ATOMIC | per graph | 2.05 | 1.26 |
| % graphs | 72 | 48 |
| δ-SNLI | per graph | 2.09 | 1.18 |
| % graphs | 73 | 46 |
| δ-SOCIAL | per graph | 2.2 | 1.32 |
| % graphs | 75 | 49 |
| OVERALL | per graph | | Δ -40% |
| % graphs | | Δ -25.7% |
+
+Table 4: $\mathrm{GEN}_{\mathrm{corr}}$ reduces the inconsistencies in graphs. The number of repetitions per graph and percentage of graphs with some repetition, both improve.
+
+Table 4 shows $\mathrm{GEN}_{\mathrm{corr}}$ does reduce repetitions by approximately $40\%$ (2.11 to 1.25) per graph across all datasets, and also reduces the fraction of graphs with at least one repetition by $25.7\%$ across.
+
+# 4.3.2 Impact of graph encoder
+
+We experiment with two alternative approaches to graph encoding to compare our MoE approach by
+
+using the graphs generated by $\mathrm{GEN}_{\mathrm{corr}}$
+
+1. Graph convolutional networks: We follow the approach of Lv et al. (2020) who use GCN (Kipf and Welling, 2017) to learn rich node representations from graphs. Broadly, node representations are initialized by $\mathcal{L}$ and then refined using a GCN. Finally, multi-headed attention (Vaswani et al., 2017) between question representation $\mathbf{h}_{\mathbf{x}}$ and the node representations is used to yield $\mathbf{h}_{\mathbf{G}}$ . We add a detailed description of this method in Appendix §H.
+2. String based representation: Another popular approach (Sakaguchi et al., 2021) is to concatenate the string representation of the nodes, and then using $\mathcal{L}$ to obtain the graph representation $\mathbf{h}_{\mathbf{G}} = \mathcal{L}(v_1 \| v_2 \|..)$ where $\|\cdot\|$ denotes string concatenation.
+
+Table 5 shows that MoE graph encoder improves end task performance significantly compared to the baseline. In the following analysis, we study the reasons for these gains in-depth.
+
+We hypothesize that GCN is less resistant to noise than MoE in our setting, thus causing a lower performance. The graphs augmented with each query are not human-curated and are instead generated by a language model in a zero-shot inference setting. Thus, the GCN style message passing might amplify the noise in graph representations. On the other hand, MOE-V first selects the most useful nodes to answer the query to form the graph representation $\mathbf{h}_{\mathbf{G}}$ . Further, MOE-GX can also decide to completely discard the graph representations, as it does in many cases where the true answer for the defeasible query is weakens.
+
+To further establish the possibility of message passing hampering the downstream task performance, we experiment with a GCN-MoE hybrid, wherein we first refine the node representations using a 2-layer GCN as used by (Lv et al., 2020), and then pool the node representations using an MoE. We found the results to be about the same as ones we obtained with GCN (3rd-row Table 5), indicating that bad node representations are indeed the root cause for the bad performance of GCN. This is also supported by Shi et al. (2019) who found that noise propagation directly deteriorates network embedding and GCN is sensitive to noise.
+
+Interestingly, graphs help the end-task even when encoded using a relatively simple STR based encoding scheme, further establishing their utility.
+
+ | δ-ATOMIC | δ-SNLI | δ-SOCIAL |
| STR | 79.5 | 83.1 | 87.2 |
| GCN | 78.9 | 82.4 | 88.1 |
| GCN + MoE | 78.7 | 84.3 | 87.8 |
| MoE | 80.2 | 85.6 | 88.6 |
+
+Table 5: Contribution of MoE-based graph encoding compared with alternative graph encoding methods. The gains of MoE over GCN are statistically significant for all the datasets, and the gains over STR are significant for $\delta$ -SNLI and $\delta$ -SOCIAL.
+
+# 4.3.3 Detailed MoE analysis
+
+We now analyze the two MoEs used in CURIOUS: (i) the MoE over the nodes (MOE-V), and (ii) the MoE over $\mathbf{G}$ and input $x$ (MOE-GX).
+
+
+Figure 5: MOE-GX gate values for the classes strengthens and weakens, averaged over the three datasets.
+
+# MOE-GX performs better for $y =$ strengthens:
+
+Figure 5 shows that the graph makes a stronger contribution than the input, when the label is strengthens. In instances where the label is weakens, the gate of MOE-GX gives a higher weight to the question. This trend was present across all the datasets. We conjecture that this happens because language models are tuned to generate events that happen rather than events that do not. In the case of a weaker, the nodes must be of the type event1 leads to less of event2, whereas language models are naturally trained for event1 leads to event2. Understanding this in-depth requires further investigation in the future.
+
+MOE-V relies more on specific nodes: We study the distribution over the types of nodes and their contribution to MOE-V. Recall from Figure 3 that C- and C+ nodes are contextualizers that provide
+
+more background context to the question, and S-node is typically an inverse situation (i.e., inverse S), while M- and $\mathbf{M}+$ are the mediator nodes leading to the hypothesis. Figure 6 shows that the situation node S- was the most important, followed by the contextualizer and the mediator. Notably, our analysis shows that mediators are less important for machines than they were for humans in the experiments conducted by (Madaan et al., 2021). This is probably because humans and machines use different pieces of information. As our error analysis shows in §5, the mediators can be redundant given the query x. Humans might have used the redundancy to reinforce their beliefs, whereas machines leverage the unique signals present in S- and the contextualizers.
+
+
+Figure 6: MOE-V gate values for the three datasets.
+
+MOE-V, MOE-GX have a peaky distribution: A peaky distribution over the gate values implies that the network is judiciously selecting the right expert for a given input. We compute the average entropy of MOE-V and MOE-GX and found the entropy values to be 0.52 (max 1.61) for MOE-V, and 0.08 (max 0.69) for MOE-GX. The distribution of the gate values of MOE-V is relatively flat, indicating that specialization of the node experts might have some room for improvement (additional discussion in Appendix §B). Analogous to scene graphs-based explanations in visual QA (Ghosh et al., 2019), peaky distributions over nodes can be considered as an explanation through supporting nodes.
+
+MOE-V learns the node semantics: The network learned the semantic grouping of the nodes (contextualizers, situation, mediators), which became evident when plotting the correlation between the gate weights. As Figure 7 shows, there is a strong negative correlation between the situation nodes and the context nodes, indicating that only
+
+one of them is activated at a time.
+
+
+Figure 7: Correlation between probability assigned to each semantic type of the node by MOE-V
+
+# 5 Error analysis
+
+
+Table 6: Confusion matrix: can CURIOUS fix previously failing or successful examples?
+
+Table 6 shows that CURIOUS is able to correct several previously wrong examples. When CURIOUS corrected previously failing cases, the MOE-V relied more on mediators, as the average mediator probabilities go up from 0.09 to 0.13 averaged over the datasets. CURIOUS still fails, and more concerning are the cases when previously successful examples now fail. To study this, we annotate 50 random dev samples over the three datasets (26/24 examples for weakens/strengthens label). For each sample, a human-annotated if the graph had errors. We observe the following error categories:
+
+- All nodes off-topic (4%): The graph nodes were not on topic. This (rarely) happens when CURIOUS cannot distinguish the sense of a word in the input question. For instance, S = there is a water fountain in the center - CURIOUS generated based on an incorrect word sense of natural water spring.
+
+- Repeated nodes (20%): These may be exact or near-exact matches. Node pairs with similar effects tend to be repeated in some samples. E.g., the S- node is often repeated with contextualizer C- perhaps because these nodes indirectly affect graph nodes in a similar way.
+- Mediators are uninformative (34%): The mediating nodes are not correct or informative. One source of these errors is when the H and S are nearly connected by a single hop, e.g., H = personX pees, and S = personX drank a lot of water previously.
+- Good graphs are ineffective (42%): These graphs contained the information required to answer the question, but the gating MOE mostly ignored this graph. This could be attributed in part to the observation in the histogram in Figure 5, that samples with weakens label disproportionately ignore the graph.
+
+In accordance with the findings of Rudinger et al. (2020), the maximum percentage of errors was in $\delta$ -ATOMIC, in part due to low question quality.
+
+# 6 Explainability
+
+In this section, we analyze the explainability of CURIOUS model. Jacovi and Goldberg (2020) note that an explanation should aim towards two complementary goals: i) Plausibility: provide an interpretation of system outputs that is convincing for humans, and ii) Faithfulness: capture the actual reasoning process of a model. We discuss how our approach takes a step towards addressing these goals.
+
+Plausibility In a prior work, Madaan et al. (2021) show that human annotators selectively picked and chose parts of the graph that explained a model decision and enabled them in improving on the task of defeasible reasoning. We show in §4.3.3, the MoE gate values gives insights into the part of the graph (contextualizer, mediator, situation node) that the model leveraged to answer a query. Our model thus produces a reasoning chain that is similar to the explanation that humans understand, providing a step towards building inherently plausible models, while also achieving better performance (as humans did after doing the task with explanation).
+
+Measuring faithfulness w.r.t. graphs Since faithfulness is a widely debated term, we restrict its definition to measure faithfulness w.r.t to the
+
+reasoning graph. This can be measured by the correlation between the model performance and graph correctness. A high correlation implies that the model uses both the graph and query to generate an answer and thus is faithful to the stated reasoning mechanism (i.e., graphs used to answer a question). Our analysis reveals this to be the case: in cases where the model answers incorrectly, $42\%$ of the graphs were entirely correct (§5). In contrast, when the model answers correctly, $82\%$ of the graphs are correct. In summary, we hope that CURIOUS serves as a step towards building reasoning models that are both plausible and faithful.
+
+# 7 Related work
+
+Mental Models Cognitive science has long promoted mental models - coherent, constructed representations of the world - as central to understanding, communication, and problem-solving (Johnson-Laird, 1983; Gentner and Stevens, 1983; Hilton, 1996). Our work draws on these ideas, using inference graphs to represent the machine's "mental model" of the problem at hand. Building the inference graph can be viewed as first asking clarification questions about the context before answering. This is similar to self-talk (Shwartz et al., 2020) but directed towards eliciting chains of influence.
+
+Injecting Commonsense Knowledge Many prior systems use commonsense knowledge to aid question-answering, e.g., using sentences retrieved from a corpus (Yang et al., 2019; Guu et al., 2020), or with knowledge generated from a separate source (Shwartz et al., 2020; Bosselut et al., 2019); and injected either as extra sentences fed directly to the model (Clark et al., 2020), via the loss function (Tandon et al., 2018), or via attention (Ma et al., 2019). Unlike prior work, we use conditional language generation techniques to create graphs that are relevant to answering a question.
+
+Encoding Graph Representations Several existing methods use graphs as an additional input for commonsense reasoning (Sun et al., 2018; Lin et al., 2019; Lv et al., 2020; Feng et al., 2020; Bosselut et al., 2021; Ma et al., 2021; Kapanipathi et al., 2020). These methods first retrieve a graph relevant to a question using information retrieval techniques and then encode the graph using graph representation techniques like GCN (Kipf and Welling, 2017) and graph attention (Velickovic et al., 2018). Different from these works, we
+
+use a graph generated from the query for answering the commonsense question. The graphs consumed by these works contain entities grounded in knowledge graphs like ConceptNet (Speer et al., 2017), whereas we perform reasoning over event inference graphs where each node describes an event. Our best model uses a mixture-of-experts (MoE) (Jacobs et al., 1991) model to pool multifaceted input. Prior work has shown the effectiveness of using MoE for graph classification (Zhou and Luo, 2019; Hu et al., 2021), cross-lingual language learning (Chen et al., 2019; Gu et al., 2018), and model ensemble learning (Fedus et al., 2021; Shazeer et al., 2017). To the best of our knowledge, we are the first to use MoE for learning and pooling graph representations for QA task.
+
+# 8 Summary and Conclusion
+
+Cognitive science suggests that people form "mental models" of a situation to answer questions about it. Drawing on those ideas, we have presented a simple instantiation in which the situational model is an inference graph. Different from GCN-based models popular in graph learning, we use mixture-of-experts to pool graph representations. Our experiments show that MoE-based pooling can be a strong (both in terms of performance and explainability) alternative to GCN for graph-based learning for reasoning tasks. Our method establishes a new state-of-the-art on three defeasible reasoning datasets. Overall, our method shows that performance can be improved by guiding a system to "think about" a question and explicitly model the scenario, rather than answering reflexively.
+
+# Acknowledgments
+
+We thank the anonymous reviewers for their feedback. Special thanks to reviewer 2 for their insightful comments on our MoE formulation. This material is partly based on research sponsored in part by the Air Force Research Laboratory under agreement number FA8750-19-2-0200. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the Air Force Research Laboratory or the U.S. Government.
+
+# References
+
+Antoine Bosselut, Ronan Le Bras, and Yejin Choi. 2021. Dynamic neuro-symbolic knowledge graph construction for zero-shot commonsense question answering. In Proceedings of the 35th AAAI Conference on Artificial Intelligence (AAAI).
+Antoine Bosselut, Hannah Rashkin, Maarten Sap, Chaitanya Malaviya, Asli Celikyilmaz, and Yejin Choi. 2019. COMET: Commonsense transformers for automatic knowledge graph construction. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4762-4779, Florence, Italy. Association for Computational Linguistics.
+Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 632-642, Lisbon, Portugal. Association for Computational Linguistics.
+Xilun Chen, Ahmed Hassan Awadallah, Hany Hassan, Wei Wang, and Claire Cardie. 2019. Multi-source cross-lingual model transfer: Learning what to share. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3098-3112, Florence, Italy. Association for Computational Linguistics.
+P. Clark, Oren Etzioni, Daniel Khashabi, Tushar Khot, B. D. Mishra, Kyle Richardson, Ashish Sabharwal, Carissa Schoenick, Oyvind Tafjord, Niket Tandon, Sumithra Bhakthavatsalam, Dirk Groeneveld, Michal Guerquin, and Michael Schmitz. 2020. From 'f' to 'a' on the n.y. regents science exams: An overview of the aristo project. AI Mag., 41:39-53.
+Rotem Dror, Gili Baumer, Segev Shlomov, and Roi Reichart. 2018. The hitchhiker's guide to testing statistical significance in natural language processing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1383-1392, Melbourne, Australia. Association for Computational Linguistics.
+et al. Falcon, WA. 2019. Pytorch lightning. GitHub. Note: https://github.com/PyTorchLightning/pytorchlightning, 3.
+William Fedus, Barret Zoph, and Noam Shazeer. 2021. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. arXiv preprint arXiv:2101.03961.
+Yanlin Feng, Xinyue Chen, Bill Yuchen Lin, Peifeng Wang, Jun Yan, and Xiang Ren. 2020. Scalable multi-hop relational reasoning for knowledge-aware question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1295-1309, Online. Association for Computational Linguistics.
+
+Maxwell Forbes, Jena D. Hwang, Vered Shwartz, Maarten Sap, and Yejin Choi. 2020. Social chemistry 101: Learning to reason about social and moral norms. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 653-670, Online. Association for Computational Linguistics.
+Dedre Gentner and Albert L. Stevens. 1983. *Mental Models*. Lawrence Erlbaum Associates.
+S. Ghosh, Giedrius Burachas, Arijit Ray, and Avi Ziskind. 2019. Generating natural language explanations for visual question answering using scene graphs and visual attention. ArXiv, abs/1902.05715.
+Jiatao Gu, Hany Hassan, Jacob Devlin, and Victor O.K. Li. 2018. Universal neural machine translation for extremely low resource languages. 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 344-354, New Orleans, Louisiana. Association for Computational Linguistics.
+Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Mingwei Chang. 2020. Retrieval augmented language model pre-training. In International Conference on Machine Learning, pages 3929-3938. PMLR.
+D. Hilton. 1996. Mental models and causal explanation: Judgements of probable cause and explanatory relevance. Thinking & Reasoning, 2:273-308.
+Fenyu Hu, Liping Wang, Shu Wu, Liang Wang, and Tieniu Tan. 2021. Graph classification by mixture of diverse experts. arXiv preprint arXiv:2103.15622.
+Robert A Jacobs, Michael I Jordan, Steven J Nowlan, and Geoffrey E Hinton. 1991. Adaptive mixtures of local experts. Neural computation, 3(1):79-87.
+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.
+P. Johnson-Laird. 1983. *Mental Models: Towards a Cognitive Science of Language*. Harvard University Press.
+Michael I Jordan and Robert A Jacobs. 1994. Hierarchical mixtures of experts and the em algorithm. Neural computation, 6(2):181-214.
+Michael I Jordan and Lei Xu. 1995. Convergence results for the em approach to mixtures of experts architectures. Neural networks, 8(9):1409-1431.
+Pavan Kapanipathi, Veronika Thost, Siva Sankalp Patel, Spencer Whitehead, Ibrahim Abdelaziz, Avinash Balakrishnan, Maria Chang, Kshitij P. Fadnis, R. Chulaka Gunasekara, Bassem Makni, Nicholas
+
+Mattei, Kartik Talamadupula, and Achille Fokoue. 2020. Infusing knowledge into the textual entailment task using graph convolutional networks. 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 8074-8081. AAAI Press.
+Thomas N. Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulouse, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net.
+Robert Koons. 2017. Defeasible Reasoning. In Edward N. Zalta, editor, The Stanford Encyclopedia of Philosophy, Winter 2017 edition. Metaphysics Research Lab, Stanford University.
+Bill Yuchen Lin, Xinyue Chen, Jamin Chen, and Xi-ang Ren. 2019. KagNet: Knowledge-aware graph networks for commonsense reasoning. 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 2829–2839, Hong Kong, China. Association for Computational Linguistics.
+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.
+Shangwen Lv, Daya Guo, Jingjing Xu, Duyu Tang, Nan Duan, Ming Gong, Linjun Shou, Daxin Jiang, Guihong Cao, and Songlin Hu. 2020. Graph-based reasoning over heterogeneous external knowledge for commonsense question answering. 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 8449-8456. AAAI Press.
+Kaixin Ma, Jonathan Francis, Quanyang Lu, Eric Nyberg, and Alessandro Oltramari. 2019. Towards generalizable neuro-symbolic systems for commonsense question answering. In Proceedings of the First Workshop on Commonsense Inference in Natural Language Processing, pages 22-32, Hong Kong, China. Association for Computational Linguistics.
+Kaixin Ma, Filip Ilievski, Jonathan Francis, Yonatan Bisk, Eric Nyberg, and Alessandro Oltramari. 2021. Knowledge-driven data construction for zero-shot evaluation in commonsense question answering. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 13507-13515.
+
+Aman Madaan, Dheeraj Rajagopal, Niket Tandon, Yiming Yang, and Eduard Hovy. 2021. Could you give me a hint? generating inference graphs for defeasible reasoning. In *Findings of the Association for Computational Linguistics: ACL-IJCNLP* 2021, pages 5138-5147, Online. Association for Computational Linguistics.
+Aman Madaan and Yiming Yang. 2021. Neural language modeling for contextualized temporal graph generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 864-881, Online. Association for Computational Linguistics.
+Quinn McNemar. 1947. Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika, 12(2):153-157.
+Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. 2017. Automatic differentiation in pytorch. NIPS 2017 Workshop Autodiff Submission.
+J. Pollock. 1987. Defeasible reasoning. Cogn. Sci., 11:481-518.
+J. Pollock. 2009. A recursive semantics for defeasible reasoning. In Argumentation in Artificial Intelligence.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21:1-67.
+Rachel Rudinger, Vered Shwartz, Jena D. Hwang, Chandra Bhagavatula, Maxwell Forbes, Ronan Le Bras, Noah A. Smith, and Yejin Choi. 2020. Thinking like a skeptic: Defeasible inference in natural language. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 4661-4675, Online. Association for Computational Linguistics.
+Keisuke Sakaguchi, Chandra Bhagavatula, Ronan Le Bras, Niket Tandon, Peter Clark, and Yejin Choi. 2021. proscript: Partially ordered scripts generation via pre-trained language models. arxiv.
+Maarten Sap, Ronan Le Bras, Emily Allaway, Chandra Bhagavatula, Nicholas Lourie, Hannah Rashkin, Brendan Roof, Noah A. Smith, and Yejin Choi. 2019. ATOMIC: an atlas of machine commonsense for if-then reasoning. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pages 3027-3035. AAAI Press.
+
+Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc V. Le, Geoffrey E. Hinton, and Jeff Dean. 2017. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net.
+M. Shi, Yufei Tang, Xingquan Zhu, and J. Liu. 2019. Feature-attention graph convolutional networks for noise resilient learning. ArXiv, abs/1912.11755.
+Vered Shwartz, Peter West, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. 2020. Unsupervised commonsense question answering with self-talk. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4615-4629, Online. Association for Computational Linguistics.
+Robyn Speer, Joshua Chin, and Catherine Havasi. 2017. Conceptnet 5.5: An open multilingual graph of general knowledge. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, February 4-9, 2017, San Francisco, California, USA, pages 4444-4451. AAAI Press.
+Haitian Sun, Bhuwan Dhingra, Manzil Zaheer, Kathryn Mazaitis, Ruslan Salakhutdinov, and William Cohen. 2018. Open domain question answering using early fusion of knowledge bases and text. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4231-4242, Brussels, Belgium. Association for Computational Linguistics.
+Niket Tandon, Bhavana Dalvi, Joel Grus, Wen-tau Yih, Antoine Bosselut, and Peter Clark. 2018. Reasoning about actions and state changes by injecting commonsense knowledge. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 57-66, Brussels, Belgium. Association for Computational Linguistics.
+Niket Tandon, Bhavana Dalvi, Keisuke Sakaguchi, Peter Clark, and Antoine Bosselut. 2019. WIQA: A dataset for "what if..." reasoning over procedural text. 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 6076-6085, Hong Kong, China. Association for Computational Linguistics.
+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.
+Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio.
+
+2018. Graph attention networks. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net.
+Thomas Wolf, L Debut, V Sanh, J Chaumond, C Delangue, A Moi, P Cistac, T Rault, R Louf, M Funtowicz, et al. 2019. Huggingface's transformers: State-of-the-art natural language processing. ArXiv, abs/1910.03771.
+Wei Yang, Yuqing Xie, Aileen Lin, Xingyu Li, Luchen Tan, Kun Xiong, Ming Li, and Jimmy Lin. 2019. End-to-end open-domain question answering with BERTserini. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations), pages 72-77, Minneapolis, Minnesota. Association for Computational Linguistics.
+Yiming Yang and Xin Liu. 1999. A re-examination of text categorization methods. In Proceedings of the 22nd annual international ACM SIGIR conference on Research and development in information retrieval, pages 42-49.
+Xuanyu Zhou and Yuanhang Luo. 2019. Explore mixture of experts in graph neural networks. Stanford CS224W.
+
+# A Training graph corrector
+
+As mentioned in Section §3.2, the graph generator $\mathrm{GEN}_{\mathrm{init}}$ is trained as a seq2seq model from WIQA with input $=$ [Premise] $\mathbf{T}_i$ | [Situation] $\mathbf{S}_i$ | [Hypothesis] $\mathbf{H}_i$ , and output $=\mathbf{G}_i$ . Graphs in WIQA additionally capture the influence that the situation has on the hypothesis. Denoting this influence label by $y_i$ can be either helps or hurts
+
+From our experiments, we observe that appending $y_{i}$ to the training data (from input = [Premise] $\mathbf{T}_i \mid [\mathrm{Situation}] \mathbf{S}_i \mid [\mathrm{Hypothesis}] \mathbf{H}_i$ to input = [Premise] $\mathbf{T}_i \mid [\mathrm{Situation}] \mathbf{S}_i \mid [\mathrm{Hypothesis}] \mathbf{H}_i \mid y_i$ ) reduces repetitions by 13%.
+
+We refer to this data generator as $\mathrm{GEN}_{\mathrm{init}}^{*}$ , and the graphs produced by it as $\mathbf{G}^*$ . However, we do not have access to $y$ during test time, and thus $\mathrm{GEN}_{\mathrm{init}}^{*}$ cannot be used directly to produce $\mathbf{G}^*$ for defeasible queries. We circumvent this by using $\mathrm{GEN}_{\mathrm{init}}^{*}$ to train a graph-to-graph generation model, that takes as input $\mathbf{G}'$ and generates $\mathbf{G}^*$ as output $(\mathbf{G}' \to \mathbf{G}^*)$ . We call this system $\mathrm{GEN}_{\mathrm{corr}}$ . We give an overview of the process in Figure 8. In Figure 9, we give examples of an initial graph produced by $\mathrm{GEN}_{\mathrm{init}}$ , the corresponding graph produced by $\mathrm{GEN}_{\mathrm{init}}^{*}$ , and the graph produced by $\mathrm{GEN}_{\mathrm{corr}}$ .
+
+$$
+\begin{array}{c c} x \longrightarrow \boxed {G E N _ {\text {i n i t}}} & \longrightarrow G ^ {\prime} \xrightarrow {\text {i n p u t}} \\ & \boxed {G E N _ {\text {c o r r}}: G ^ {\prime} \to \text {i n p u t}} \\ x + T \longrightarrow \boxed {G E N _ {\text {i n i t}} ^ {*}} & \longrightarrow G ^ {*} \xrightarrow {\text {o u t p u t}} \end{array} G _ {\text {f i n a l}}
+$$
+
+Figure 8: Training data generation to train $\mathrm{GEN}_{\mathrm{corr}}$
+
+# B MoE gradient analysis
+
+We restate Equation 2 for quick reference:
+
+$$
+\mathbf {p} = \mathbf {M} (\mathbf {x})
+$$
+
+$$
+\mathbf {o} = \sum_ {i = 1} ^ {n} p _ {i} \mathbf {E} _ {\mathbf {i}} (\mathbf {x})
+$$
+
+where we have changed the notation slightly to use $\mathbf{o}$ as the MoE output instead of $\mathbf{y}$ . We also refer to $\mathbf{E_i}(x)$ as $\mathbf{E_i}$ . Further, $o_{j} = \sum_{i = 1}^{n}p_{i}E_{ij}$ . We present the analysis for a generic multi-class classification setting with $k$ classes, with training done using a cross-entropy loss $\mathcal{L}$ (Figure 10) Let $\hat{y}_c$ be the normalized probability of the correct class $c$ calculated using softmax:
+
+$$
+\begin{array}{l} \hat {y} _ {c} = \frac {\exp (o _ {c})}{\sum_ {j = 1} ^ {k} \exp (o _ {j})} \\ = \frac {\exp \left(\sum_ {i = 1} ^ {n} p _ {i} E _ {i c}\right)}{\sum_ {j = 1} ^ {k} \exp \left(\sum_ {i = 1} ^ {n} p _ {i} E _ {i j}\right)} \\ \end{array}
+$$
+
+Let $\mathcal{L}$ be the cross-entropy loss:
+
+$$
+\begin{array}{l} \mathcal {L} = - \log \hat {y} _ {c} = - o _ {c} + \log \sum_ {j = 1} ^ {k} \exp (o _ {j}) \\ = - \sum_ {i = 1} ^ {n} p _ {i} E _ {i c} + \log \sum_ {j = 1} ^ {k} \exp (\sum_ {i = 1} ^ {n} p _ {i} E _ {i j}) \\ \end{array}
+$$
+
+Evaluating $\frac{\partial\mathcal{L}}{\partial p_m}$ The derivatives w.r.t. the $m^{th}$ expert gate probability $p_m$ is given by:
+
+$$
+\begin{array}{l} \frac {\partial \mathcal {L}}{\partial p _ {m}} = - E _ {m c} + \frac {\sum_ {j = 1} ^ {k} E _ {m j} \exp (\sum_ {i = 1} ^ {n} p _ {i} E _ {i j})}{\sum_ {j = 1} ^ {k} \exp (\sum_ {i = 1} ^ {n} p _ {i} E _ {i j})} \\ = - E _ {m c} + \sum_ {j = 1} ^ {k} \hat {y} _ {j} E _ {m j} \\ = - E _ {m c} \left(1 - \hat {y} _ {c}\right) + \sum_ {j = 1, j \neq c} ^ {k} \hat {y} _ {j} E _ {m j} \tag {5} \\ \end{array}
+$$
+
+Evaluating $\frac{\partial\mathcal{L}}{\partial E_{mc}}$ the derivatives w.r.t. the logits $E_{mc}$ (logit for the correct class by $m^{th}$ expert) is given by:
+
+$$
+\begin{array}{l} \frac {\partial \mathcal {L}}{\partial E _ {m c}} = - p _ {m} + \frac {\exp (o _ {c}) p _ {m}}{\sum_ {j = 1} ^ {k} \exp o _ {j}} \\ = - p _ {m} \left(1 - \hat {y} _ {c}\right) \tag {6} \\ \end{array}
+$$
+
+Equations 5 and 6 have natural interpretations: the gradient on both the mixture probability $p_m$ and the logits $E_{mc}$ will be 0 (note that for Equation 5, $\mathbf{y}^c = 1 \Rightarrow \mathbf{y}^j = 0$ for $j \neq c$ ) when the network makes perfect predictions $(\hat{y}_c = 1)$ . Further, As noted by Jacobs et al. (1991) (Section 1), this might cause the network to specialize slower. This happens as the gradient will be small for experts that are helping in making the correct prediction. They suggest a different loss function that promotes faster specialization by redefining the error function in terms of a mixture distribution, with the mixture weights supplied by the $p_i$ terms. Analyzing the effect of loss function for applications where the MoE is used to pool representations remains an interesting future work.
+
+
+M
+
+
+$\mathcal{M}^*$
+
+
+G
+
+
+Figure 9: The graphs generated by $\mathrm{GEN}_{\mathrm{init}}$ (left), $\mathrm{GEN}_{\mathrm{init}}^{*}$ (middle), and $\mathrm{GEN}_{\mathrm{corr}}$ (right). The input graph has repetitions for nodes $\{C-, S-\}$ , $\{C+, H+\}$ , and $\{M-, M+\}$ . The corrected graph replaces the repetitions with meaningful labels.
+Figure 10: MoE gradient analysis setup: we consider a simple setting where the weighted output of the experts (using the expert weights $p$ ) is directly fed to a softmax and is used for generating class probabilities $\hat{y}$ .
+
+# C Hyperparameters
+
+Training details All of our experiments were done on a single Nvidia GeForceRTX 2080 Ti. We base our implementation on PyTorch (Paszke et al., 2017) and also use PyTorch Lightning (Falcon, 2019) and Huggingface (Wolf et al., 2019). The gates and the experts in our MoE model were a single layer MLP. For the experts, we set the input size set to be the same as output size. Table 7 shows the parameters shared by all the methods, and 8 shows the hyperparameters applicable to GCN encoder.
+
+# D Schema of an influence graph
+
+| Hyperparameter | Value |
| Pre-trained model | RoBERTa-base |
| Learning rate | 2e-5 |
| Gradient accumulation batches | 2 |
| Num epochs | 30 |
| Optimizer | AdamW |
| Dropout | 0.1 |
| Learning rate scheduling | linear |
| Warmup | 3 epochs |
| Batch size | 16 |
| Weight decay | 0.01 |
| Gradient clipping | 1.0 |
+
+Table 7: General hyperparameters used by all the models.
+
+Figure 11 shows the skeleton of an influence graph.
+
+| Hyperparameter | Value |
| # Layers | 2 |
| Layer dropout | 0.1 |
| Number of attention heads | 1 |
| Attention dimension | 256 |
+
+
+Figure 11: Schema of an inference graph.
+
+# E Runtime Analysis
+
+Finally, we discuss the cost-performance tradeoffs for various encoding mechanisms (Table 9). As Table 9 shows, both GCN and MoE take about $7\%$ more number of parameters than the STR encoding scheme and have about $2x$ the runtime. Further, as we use one expert per node, the number of parameters scales linearly with the number of nodes. While this is not prohibitive in our setting (each graph has a small number of nodes), our analysis shows that the behavior of the nodes that have similar semantics is correlated, indicating that the experts for those nodes can share parameters. Alternatively, MoE with more than two layers (Jordan and Xu, 1995) can also help in scaling the number of parameters only logarithmically with the number of nodes.
+
+Table 8: Hyperparameters specific to GCN.
+
+| Method | STR | GCN | MoE |
| #Params | 124M | 131M | 133M |
| Runtime | 0.17 | 0.47 | 0.40 |
+
+# F Error Analysis Examples
+
+We show three examples with different types of errors. These examples are taken from Dev set,
+
+and these are for the cases where CURIOUS introduced a wrong answer, while baseline answered this correctly without the graph.
+
+- Figure 12 shows a failure case when a good graph is unused. Example from $\delta$ -ATOMIC device set.
+- Figure 13 shows a failure case when an off topic graph is produced due to confusion in the sense of water fountain. Example from $\delta$ -SNLI dev set.
+- Figure 14 shows a failure case when the mediator is wrong. Example from $\delta$ -SOCIAL dev set.
+
+# G Significance Tests
+
+We perform two statistical tests for verifying our results: i) The micro-sign test (s-test) (Yang and Liu, 1999), and ii) McNernar's test (Dror et al., 2018).
+
+Table 9: Number of parameters in the different encoding methods. Runtime reports the number of seconds to process one training example.
+
+| Dataset | s-test | McNemar's test |
| δ-ATOMIC | 5.07e-05 | 1.1e-04 |
| δ-SNLI | 2.65e-05 | 6.5e-05 |
| δ-SOCIAL | 1.4e-04 | 3.2e-04 |
+
+Table 10: p-values for the three datasets and two different statistical tests while comparing the results with and without graphs (Table 2). As the p-values show, the results in Table 2 are highly significant
+
+| Dataset | s-test | McNemar's test |
| δ-ATOMIC | 0.001 | 0.003676 |
| δ-SNLI | 0.01 | 0.026556 |
| δ-SOCIAL | 0.06 | 0.146536 |
+
+Table 11: p-values for the three datasets and two different statistical tests while comparing the results with noisy vs. cleaned graphs (Table 3).
+
+ | δ-ATOMIC | δ-SNLI | δ-SOCIAL |
| STR | 0.13 | 1.8e-06 | 8.7e-06 |
| GCN | 0.006 | 1.31e-05 | 0.03 |
+
+Table 12: p-values for the s-test for Table 5.
+
+Input (x): Given that "personX has food poisoning", will it strengthen or weaken the hypothesis "personX gets diarrhea" given the update "personX is left untreated"
+
+Problem: Good graph that is ineffective
+
+# Inference Graph (G):
+
+
+Figure 12: Example of a failure case: A good graph is unused. Example from $\delta$ -ATOMIC dev set.
+
+Input (x): Given that "a bunch of people are walking in a crowded area", will it strengthen or weaken the hypothesis "people walking in a crowded area" given the update "there is a water fountain in the center"
+
+Problem: Graph nodes off topic
+
+# Inference Graph (G):
+
+
+Figure 13: Example of a failure case: The generated graph is off topic (wrong sense of water fountain is used). Example from $\delta$ -SNLI dev set.
+
+Input (x): Given that "", will it strengthen or weaken the hypothesis "you aren't expected to give up your seat for just anyone" given the update "you are injured"
+
+Problem: Mediator nodes are unhelpful
+
+# Inference Graph (G):
+
+
+Figure 14: Example of a failure case: The mediator nodes (second last level in the graph) are unhelpful. Example from $\delta$ -SOCIAL dev set.
+
+ | δ-ATOMIC | δ-SNLI | δ-SOCIAL |
| STR | 0.28 | 4e-06 | 2e-05 |
| GCN | 0.015127 | 3.2e-05 | 0.06 |
+
+Table 13: p-values for the McNemar's for Table 5.
+
+# H Description of GCN encoder
+
+We now describe our adaptation of the method by Lv et al. (2020) to pool $\mathbf{h}_{\mathbf{V}}$ into $\mathbf{h}_{\mathbf{G}}$ using GCN. Figure 15 captures the overall design.
+
+Refining node representations The representation for each node $v\in \mathbf{V}$ is first initialized using:
+
+$$
+\mathbf {h} _ {\mathbf {v}} ^ {0} = \mathbf {W} ^ {0} \mathbf {h} _ {\mathbf {v}}
+$$
+
+Where $\mathbf{h}_{\mathbf{v}} \in \mathbb{R}^{d}$ is the node representation returned by the $\mathcal{L}$ , and $\mathbf{W}^0 \in \mathbb{R}^{d \times k}$ . This initial representation is then refined by running L-layers of a GCN (Kipf and Welling, 2017), where each layer $l + 1$ is updated by using representations from the $l^{th}$ layer as follows:
+
+$$
+\begin{array}{l} \mathbf {h} _ {v} ^ {(l + 1)} = \sigma \left(\frac {1}{| \mathbf {A} (v) |} \sum_ {w \in \mathbf {A} (v)} \mathbf {W} ^ {l} \mathbf {h} _ {w} ^ {l} + \mathbf {W} ^ {l} \mathbf {h} _ {v} ^ {l}\right) \\ \mathbf {H} ^ {L} = \left[ \mathbf {h} _ {0} ^ {L}; \mathbf {h} _ {1} ^ {L}; \dots ; \mathbf {h} _ {| \mathbf {V} | - 1} ^ {L} \right] \tag {7} \\ \end{array}
+$$
+
+Where $\sigma$ is a non-linear activation function, $\mathbf{W}^l\in \mathbb{R}^{k\times k}$ is the GCN weight matrix for the $l^{th}$ layer, $\mathbf{A}(v)$ is the list of neighbors of a vertex $v$ , and $\mathbf{H}^L\in \mathbb{R}^{|\mathbf{V}| \times k}$ is a matrix of the $L^{th}$ layer representations the $|\mathbf{V}|$ nodes such that $\mathbf{H}_i^L = \mathbf{h}_i^L$ .
+
+Learning graph representation We use multiheaded attention (Vaswani et al., 2017) to combine the query representation $\mathbf{h}_{\mathbf{Q}}$ and the nodes representations $\mathbf{H}^{L}$ to learn a graph representation $\mathbf{h}_{\mathbf{G}}$ . The multiheaded attention operation is defined as follows:
+
+$$
+\mathbf {a} _ {i} = \operatorname {s o f t m a x} \left(\frac {\left(\mathbf {W} _ {\mathbf {i}} ^ {\mathbf {q}} \mathbf {h} _ {\mathbf {Q}}\right) \left(\mathbf {W} _ {\mathbf {i}} ^ {\mathbf {k}} \mathbf {H} ^ {L}\right) ^ {T}}{\sqrt {d}}\right)
+$$
+
+$$
+\begin{array}{l} \mathbf {h e a d} _ {i} = \mathbf {a} _ {i} (\mathbf {W} _ {\mathbf {i}} ^ {\mathbf {v}} \mathbf {H} ^ {L}) \\ \mathbf {h} _ {\mathbf {G}} = C o n c a t (h e a d _ {1}, \dots , h e a d _ {h}) \mathbf {W} ^ {O} \\ = \operatorname {M u l t i H e a d} \left(\mathbf {h} _ {Q}, \mathbf {H} ^ {L}\right) \tag {9} \\ \end{array}
+$$
+
+Where $h$ is the number of attention heads, $\mathbf{W}_i^q,\mathbf{W}_i^k,\mathbf{W}_i^v\in \mathbb{R}^{k\times d}$ and $\mathbf{W}^O\in \mathbb{R}^{hd\times d}$ .
+
+Finally, the graph representation generated by the MultiHead attention $\mathbf{h}_{\mathbf{G}} \in \mathbb{R}^{n}$ is concatenated with with the question representation $\mathbf{h}_{\mathbf{Q}}$ to get the prediction:
+
+$$
+\hat {y} = \operatorname {s o f t m a x} ([ \mathbf {h _ {G}}, \mathbf {h _ {Q}} ] \mathbf {W} _ {o u t})
+$$
+
+where $\mathbf{W}_{out} \in \mathbb{R}^{d \times 2}$ is a single linear layer MLP.
+
+# I All results
+
+Our experiments span two types of graphs $(\mathbf{G}^{\prime}, G)$ , three datasets ( $\delta$ -SNLI, $\delta$ -SOCIAL, $\delta$ -ATOMIC), and three graph encoding schemes (STR, GCN, MoE). Table 14 above shows the results on all 18 combinations of $\{\text{graph types}\} \times \{\text{datasets}\} \times \{\text{graph encoding schemes}\}$
+
+| Dataset | Encoder | Graph Type | Accuracy |
| δ-ATOMIC | STR | n/a | |
| STR | G' | 78.78 |
| GCN | G' | 79.48 |
| GCN | G' | 78.25 |
| MoE | G' | 78.85 |
| MoE | G' | 78.83 |
| δ-SNLI | STR | n/a | |
| STR | G' | 82.16 |
| GCN | G' | 83.11 |
| GCN | G' | 82.63 |
| MoE | G' | 83.09 |
| MoE | G' | 83.83 |
| δ-SOCIAL | STR | n/a | 87.6 |
| STR | G' | 86.75 |
| STR | G' | 87.24 |
| GCN | G' | 87.92 |
| GCN | G' | 88.12 |
| MoE | G' | 88.45 |
| MoE | G' | 88.62 |
+
+Table 14: Results for different combinations of graph encoder, graph type.
+
+# J Graph-augmented defeasible reasoning algorithm
+
+In Algorithm 1, we outline our graph-augmented defeasible learning process.
+
+
+Figure 15: Overview of the GCN encoder.
+
+Algorithm 1: Graph-augmented defeasible reasoning using MoE.
+
+Given: A language model $\mathcal{L}$ , defeasible query with graph $(\mathbf{x},\mathbf{G})$ .
+
+Result: Result for the query.
+
+// Encode query
+
+$\mathbf{h}_{\mathbf{Q}} \gets \mathcal{L}(\mathbf{x})$
+
+// encode nodes of $\mathbf{G}$
+
+$\mathbf{h}_{\mathbf{V}} \gets \mathcal{L}(\mathbf{v} \in \mathbf{G})$
+
+// MOE1: Combine nodes
+
+$\mathbf{h}_{\mathbf{G}} \gets$ Equation 3;
+
+// MOE2: Combine $Q, G$
+
+$\mathbf{h}_{\mathbf{y}} \gets$ Equation 4;
+
+return softmax(MLP(hy))
\ No newline at end of file
diff --git a/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/images.zip b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..287cc82fb3007bb3bb57c5a6e27cdf92174f89fa
--- /dev/null
+++ b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5b576c7cd04fad6d9d2f8f0613b61e1b2f92d9ffc533e77bfe4069e55ca0eb41
+size 864336
diff --git a/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/layout.json b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..918d1dfadede6fab0b8eb5d5f3ad14404c4c9ba4
--- /dev/null
+++ b/thinkaboutitimprovingdefeasiblereasoningbyfirstmodelingthequestionscenario/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a6fbb3fe3d4666f0979d7fbe106a048c62df716a417ce6526e6df194b59a8958
+size 729820
diff --git a/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/73feef60-25ad-457a-a5d5-974a62c53907_content_list.json b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/73feef60-25ad-457a-a5d5-974a62c53907_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..5526ecd5f9da52bd2a9c7c60d79c25738b81faa3
--- /dev/null
+++ b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/73feef60-25ad-457a-a5d5-974a62c53907_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:228221c001db53060c1e376ebdecb700c0e753d9f0881ad7d74a894060546e6e
+size 86558
diff --git a/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/73feef60-25ad-457a-a5d5-974a62c53907_model.json b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/73feef60-25ad-457a-a5d5-974a62c53907_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..b199baa05b889349bb23a3ce2a9008b7bd387ea5
--- /dev/null
+++ b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/73feef60-25ad-457a-a5d5-974a62c53907_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:13804b356c01d8aac23fdef74cbb91400a744c731c7ad35a12e6f019ec83fb50
+size 101845
diff --git a/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/73feef60-25ad-457a-a5d5-974a62c53907_origin.pdf b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/73feef60-25ad-457a-a5d5-974a62c53907_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..e39f2dd55f49088047efe60b8595c81a01c4ef89
--- /dev/null
+++ b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/73feef60-25ad-457a-a5d5-974a62c53907_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:084add15fc4a1597f2c8cf9da5e47b2655d23121e0e6eaeb504dcfe1d10bb68c
+size 504081
diff --git a/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/full.md b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..135b9e0bf7e3c10070f8c17d4336984971a03735
--- /dev/null
+++ b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/full.md
@@ -0,0 +1,369 @@
+# Thinking Clearly, Talking Fast: Concept-Guided Non-Autoregressive Generation for Open-Domain Dialogue Systems
+
+Yicheng Zou, Zhihua Liu, Xingwu Hu, Qi Zhang
+
+Shanghai Key Laboratory of Intelligent Information Processing, Fudan University
+
+School of Computer Science, Fudan University
+
+Shanghai, China
+
+{yczou18, liuzh20, xwhu20, qz}@fudan.edu.cn
+
+# Abstract
+
+Human dialogue contains evolving concepts, and speakers naturally associate multiple concepts to compose a response. However, current dialogue models with the seq2seq framework lack the ability to effectively manage concept transitions and can hardly introduce multiple concepts to responses in a sequential decoding manner. To facilitate a controllable and coherent dialogue, in this work, we devise a concept-guided non-autoregressive model (CG-nAR) for open-domain dialogue generation. The proposed model comprises a multi-concept planning module that learns to identify multiple associated concepts from a concept graph and a customized Insertion Transformer that performs concept-guided non-autoregressive generation to complete a response. The experimental results on two public datasets show that CG-nAR can produce diverse and coherent responses, outperforming state-of-the-art baselines in both automatic and human evaluations with substantially faster inference speed.
+
+# 1 Introduction
+
+Creating a "human-like" dialogue system is one of the important goals of artificial intelligence. Recently, due to the rapid advancements in natural language generation (NLG) techniques, data-driven approaches have attracted lots of research interest and have achieved impressive progress in producing fluent dialogue responses (Shang et al., 2015; Vinyals and Le, 2015; Serban et al., 2016; Li et al., 2016). However, such seq2seq models tend to degenerate generic or off-topic responses (Tang et al., 2019; Welleck et al., 2020). An effective way to address this issue is to leverage external knowledge (Zhou et al., 2018a,b) or topic information (Xing et al., 2017), which are integrated as additional semantic representations to improve dialogue informativeness.
+
+Although promising results have been obtained by equipping dialogue models with external knowl-
+
+
+Figure 1: An exemplar dialogue with concept transitions, where each utterance is composed of multiple associated concepts to convey diverse information.
+
+edge, the development of dialogue discourse still has its own challenge: human dialogue generally evolves around a number of concepts that might frequently shift in a dialogue flow (Zhang et al., 2020). The lack of concept management strategies might lead to incoherent dialogue due to the loosely connected concepts. To address this problem, recent studies have combined concept planning with response generation to form a more coherent and controllable dialogue (Wu et al., 2019; Xu et al., 2020a,b; Wu et al., 2020; Zhang et al., 2020).
+
+Most of these approaches incorporate concepts into responses in an implicit manner, which cannot guarantee the appearance of a concept in a response. Compared with dialogue concepts, a large proportion of chit-chat words are common and usually have a high word frequency and are relatively over-optimized in language models (Gong et al., 2018; Khassanov et al., 2019). Consequently, conventional seq2seq generators are more "familiar" with these generic words than those requiring concept management, which prevents introducing certain concepts to the response with sequential decoding (either greedily or with beam search) (Mou et al., 2016). Moreover, speakers naturally associate multiple concepts to proactively convey diverse information, e.g., action, entity, and emotion (see Figure 1). Unfortunately, most existing methods
+
+can only retrieve one concept for each utterance (Tang et al., 2019; Qin et al., 2020). Another line of approaches attempt to explicitly integrate concepts into responses and generate the remaining words in both directions (Mou et al., 2016; Xu et al., 2020a), but they also fail to deal with multiple concepts.
+
+In this paper, we devise a concept-guided non-autoregressive model (CG-nAR) to facilitate dialogue coherence by explicitly introducing multiple concepts into dialogue responses. Specifically, following Xu et al. (2020a), a concept graph is constructed based on the dialogue data, where the vertices represent concepts, and edges represent concept transitions between utterances. Based on the concept graph, we introduce a novel multi-concept planning module that learns to manage concept transitions in a dialogue flow. It recurrently reads historical concepts and dialogue context to attentively select multiple concepts in the proper order, which reflects the transition and arrangement of target concepts. Then, we customize an Insertion Transformer (Stern et al., 2019) by initializing the selected concepts as a partial response for subsequent non-autoregressive generation. The remaining words of a response are generated in parallel, aiming to foster a fast and controllable decoding process.
+
+We conducted experiments on Persona-Chat (Zhang et al., 2018) and Weibo (Shang et al., 2015). The results of automatic and human evaluations show that CG-nAR achieves better performance in terms of response diversity and dialogue coherence. We also show that the inference time of our model is much faster than conventional seq2seq models. All our codes and datasets are publicly available. $^{1}$
+
+Our contributions to the field are three-fold: 1) We design a concept-guided non-autoregressive strategy that can successfully integrate multiple concepts into responses for a controllable decoding process. 2) The proposed multi-concept planning module effectively manages multi-concept transitions and remedies the problem of dialogue incoherence. 3) Comprehensive studies on two datasets show the effectiveness of our method in terms of response quality and decoding efficiency.
+
+# 2 Related Work
+
+# 2.1 Open-Domain Dialogue Generation
+
+Neural seq2seq models (Sutskever et al., 2014) have achieved remarkable success in dialogue
+
+systems (Shang et al., 2015; Vinyals and Le, 2015; Serban et al., 2016; Xing et al., 2017), but they prefer to produce generic and off-topic responses (Tang et al., 2019; Welleck et al., 2020). Dozens of works have attempted to incorporate external knowledge into dialogue systems to improve informativeness and diversity (Zhou et al., 2018a; Zhang et al., 2018; Dinan et al., 2019; Ren et al., 2020). Beyond the progress on response quality, a couple of works focus on goal planning or concept transition for a controllable and coherent dialogue (Yao et al., 2018; Moon et al., 2019; Wu et al., 2019; Xu et al., 2020a,b; Wu et al., 2020; Zhang et al., 2020). Most of these works mainly explore how to effectively leverage external knowledge graphs and extract concepts from them. Nevertheless, they generally introduce concepts into the response implicitly with gated controlling or copy mechanism, which cannot ensure the success of concept integration because seq2seq models prefer generic words. Some works (Mou et al., 2016; Xu et al., 2020a) try to produce concept words first and generate the remaining words to both directions to complete a response, but they cannot handle the situation of multiple concepts. By contrast, we focus on how to effectively integrate multiple extracted concepts into dialogue responses. The proposed CG-nAR applies the non-autoregressive mechanism, which can explicitly introduce multiple concepts simultaneously to responses to enhance coherence and diversity.
+
+# 2.2 Non-Autoregressive Generation
+
+Compared with traditional sequential generators that conditions each output word on previously generated outputs, non-autoregressive (non-AR) generation avoids this property to speed up decoding efficiency and has recently attracted much attention (Gu et al., 2018, 2019; Ma et al., 2019; Stern et al., 2019). Another relevant line of research is refinement-based generation (Lee et al., 2018; Kasai et al., 2020; Hua and Wang, 2020; Tan et al., 2021), which gradually improves generation quality by iterative refinement on the draft instead of one-pass generation. For dialogue systems, there has been prior works that attempt to improve the traditional autoregressive generation. Mou et al. (2016) explores the way of generating words to both directions, but it is still in an autoregressive manner. Song et al. (2020) introduces a three-stage refinement strategy for improving persona
+
+
+(a) Multi-Concept Planning
+
+
+(b) Concept-Guided Non-AR Generation
+Figure 2: The overall framework of CG-nAR. (a) The multi-concept planning module conditions on the previous concept flow and the dialogue context to attentively select multiple associated concepts from the concept graph. (b) The selected concepts are used to initialize a partial response for subsequent non-autoregressive generation.
+
+consistency of dialogue generation, but it requires a specialized consistency matching model for inference. Han et al. (2020) applies the non-AR mechanism to dialogue generation, aiming to alleviate the non-globally-optimal issue to produce a more diverse response. In this work, we further use dialogue concepts to guide response generation. We customize an Insertion Transformer (Stern et al., 2019) and arrange dialogue concepts as a partial input sequence, which is different from the original setting where texts are generated from scratch. By this means, multiple concepts can be naturally introduced to the response as a guidance to foster a more controllable non-AR generation.
+
+# 3 Methodology
+
+The overall framework of CG-nAR is shown in Figure 2. Based on a concept graph that represents candidate concept transitions, a multi-concept planning module is designed to select and arrange appropriate target concepts from the contextually related subgraphs, which is conditioned on the previous concept flow and the dialogue context. Then, we input the selected concepts as a partial response into an Insertion Transformer (Stern et al., 2019) to parallelly generate the remaining words.
+
+# 3.1 Concept Graph Construction
+
+Inspired by Xu et al. (2020a), we build a concept graph with two steps: vertex construction $^2$ and
+
+edge construction. Given a dialogue corpus $S$ , we exploit a rule-based keyword extraction method to identify salient keywords from utterances in $S$ (Tang et al., 2019). All extracted keywords are collected as dialogue concepts that represent vertices in the concept graph. For edge construction, we use pointwise mutual information (PMI) (Church and Hanks, 1989) to construct a concept pairwise matrix that characterizes the association between concepts in the observed dialogue data (Mou et al., 2016; Tang et al., 2019), where each concept pair consists of two concepts that are extracted from the context and the response, respectively. For each head vertex $v^h$ , we select concepts with top PMI scores as tail vertices $v^t$ and build edges by connecting $v^h$ with all $v^t$ s. In this way, we filter out low-frequency edges to narrow the search space for downstream concept planning.
+
+# 3.2 Multi-Concept Planning Module
+
+Given the dialogue context $D$ , the historical concept flow $F$ , and a concept graph $\mathcal{G}$ , the goal of multi-concept planning is to predict a sequence of target concepts $C$ , namely $P(C|D,F,\mathcal{G})$ . All target concepts are extracted from $\mathcal{G}$ and arranged in a sequence $C = \{c_1,c_2,\dots ,c_t\}$ , which reflects the order of target concepts in the final response.
+
+Hierarchical Dialogue Encoder. To facilitate the understanding of dialogue context $D$ , we employ Transformer blocks (Vaswani et al., 2017) to hierarchically encode dialogue context, aiming to capture the global semantic dependency between utterances. Formally, given the dialogue context $D = \{u_{1}, u_{2}, \dots, u_{N}\}$ with $N$ utterances, where
+
+$u_{i} = \{w_{i1},w_{i2},\dots,w_{in}\}$ is the word sequence of $i$ -th utterance, we transform $u_{i}$ into a sequence of hidden vectors with a Transformer encoder:
+
+$$
+\left[ \hat {\mathbf {h}} _ {i} ^ {c l s}, \hat {\mathbf {h}} _ {i 1}, \dots , \hat {\mathbf {h}} _ {i n} \right] = \mathrm {T F} _ {\theta_ {w}} \left(\left[ \mathbf {e} _ {i} ^ {c l s}, \mathbf {e} _ {i 1} ^ {w}, \dots , \mathbf {e} _ {i n} ^ {w} \right]\right). \tag {1}
+$$
+
+Here, $\mathbf{e}_{ij}^{w}$ is the embedding of the $j$ -th word in $u_{i}$ . $\hat{\mathbf{h}}_i^{cls}$ and $\mathbf{e}_i^{cls}$ represent a special token [CLS] that is used to aggregate sequence representations, which is inspired by Devlin et al. (2019). Then, we collect utterance representations derived from [CLS] and input them into another Transformer encoder to hierarchically fuse context information:
+
+$$
+\left[ \mathbf {h} _ {1} ^ {c l s}, \mathbf {h} _ {2} ^ {c l s}, \dots , \mathbf {h} _ {N} ^ {c l s} \right] = \mathrm {T F} _ {\theta_ {u}} \left(\left[ \hat {\mathbf {h}} _ {1} ^ {c l s}, \hat {\mathbf {h}} _ {2} ^ {c l s}, \dots , \hat {\mathbf {h}} _ {N} ^ {c l s} \right]\right). \tag {2}
+$$
+
+$\mathbf{h}_i^{cls}$ is a context-aware utterance representation that can be used to guide concept selection in the following steps.
+
+Concept Flow Encoder. Formally, a concept flow $F = \{f_{1}, f_{2}, \dots, f_{N}\}$ represents the observed concepts in the dialogue context, where $f_{i}$ means a concept set corresponding to the $i$ -th utterance that collects all the concept words in $u_{i}$ , namely $f_{i} = \{c_{i1}, c_{i2}, \dots, c_{im}\}$ . Here, $c_{ij}$ is the $j$ -th concept word in $u_{i}$ . For an empty set $f_{i} = \emptyset$ , a special NULL token is served as the concept word.
+
+To capture information of history concept transitions, we exploit a vanilla GRU unit (Cho et al., 2014) to recursively read concept words in the flow:
+
+$$
+\mathbf {s} _ {i} = \operatorname {G R U} \left(\mathbf {s} _ {i - 1}, \mathbf {f} _ {i}\right), \quad i \in [ 1, N ]. \tag {3}
+$$
+
+Here $\mathbf{f}_i$ denotes the representation of concept set $f_{i}$ which is calculated as a weighted sum of concept word embeddings $\mathbf{e}_{ij}^{c}$ :
+
+$$
+\mathbf {f} _ {i} = \sum_ {j = 1} ^ {m} \alpha_ {i j} ^ {f} \mathbf {e} _ {i j} ^ {c},
+$$
+
+$$
+\alpha_ {i j} ^ {f} = \frac {\exp \left(\beta_ {i j} ^ {f}\right)}{\sum_ {k = 1} ^ {m} \exp \left(\beta_ {i k} ^ {f}\right)}, \tag {4}
+$$
+
+$$
+\boldsymbol {\beta} _ {i j} ^ {f} = \mathbf {s} _ {i - 1} ^ {\top} \mathbf {W} _ {f} \mathbf {e} _ {i j} ^ {c},
+$$
+
+where $\mathbf{W}_f$ is trainable parameters. The output state $\mathbf{s}_{i-1}$ at the $i-1$ step is used as a query to compute $\beta_{ij}^f$ scores, which can measure the preference of transitions to associated concepts. Empirically, $\mathbf{s}_0$ is a zero vector to initialize the recurrent process, and the final output $\mathbf{s}_N$ can serve as a memory to enable history-aware concept planning.
+
+Multi-Concept Extractor. Recall that our goal is to produce a concept sequence $C$ , which is a
+
+subsequence of the target response. Inspired by pointer network (Vinyals et al., 2015), we design a multi-concept extractor to achieve this goal, which can attentively read the dialogue context and the concept flow to sequentially extract target concepts from the contextually related subgraphs in $\mathcal{G}$ .
+
+To implement concept extraction in a sequential decoding manner, we use a Transformer decoder and compute its decoding states as follows:
+
+$$
+\mathbf {H} ^ {c l s} = [ \mathbf {h} _ {1} ^ {c l s}, \mathbf {h} _ {2} ^ {c l s}, \dots , \mathbf {h} _ {N} ^ {c l s} ],
+$$
+
+$$
+\mathbf {m} _ {t} = \mathrm {T F} _ {\theta_ {d}} ([ \mathbf {e} _ {1: t - 1} ^ {c}, \mathbf {H} ^ {c l s}). \qquad (5)
+$$
+
+The utterance representations $\mathbf{H}^{cls}$ are memories for decoder-encoder attention. $[\mathbf{e}_{1:t - 1}^c ]$ denotes the embeddings of previously decoded concepts. $\mathbf{m}_t$ is the output state at step $t$ conditioned on the dialogue context and partially decoded outputs.
+
+Given the decoder state $\mathbf{m}_t$ and the concept flow memory $\mathbf{s}_N$ , the following step is to select target concepts from $\mathcal{G}$ . We first retrieve a group of subgraphs that corresponds to the concept set $f_N$ of the last utterance $u_N$ to prepare for the next round of concept transition. Here, each subgraph $g_j$ consists of a hit concept $c_{Nj} \in f_N$ and its concept neighbours. Formally, $g_j = \{(c_j^{head}, c_{jk}^{tail})\}_{k=1}^{N_{g_j}}$ , where $c_j^{head}$ and $c_{jk}^{tail}$ represent head concept vertex and tail concept vertex, respectively. $N_{g_j}$ means the number of vertex pairs in $g_j$ . Then, we employ a dynamic graph attention mechanism to calculate subgraph vectors $\mathbf{g}_j$ at each decoding step $t$ to fuse information of all concept neighbours:
+
+$$
+\mathbf {g} _ {j} = \sum_ {k = 1} ^ {N _ {g _ {j}}} \alpha_ {j k} ^ {g} [ \mathbf {e} _ {j} ^ {h e a d}; \mathbf {e} _ {j k} ^ {t a i l} ],
+$$
+
+$$
+\alpha_ {j k} ^ {g} = \frac {\exp \left(\beta_ {j k} ^ {g}\right)}{\sum_ {l = 1} ^ {N _ {g _ {j}}} \exp \left(\beta_ {j l} ^ {g}\right)}, \tag {6}
+$$
+
+$$
+\beta_ {j k} ^ {g} = (\mathbf {W} _ {q} ^ {g} [ \mathbf {m} _ {t}; \mathbf {s} _ {N}; \mathbf {e} _ {j} ^ {h e a d} ]) ^ {\top} \cdot (\mathbf {W} _ {k} ^ {g} \mathbf {e} _ {j k} ^ {t a i l}).
+$$
+
+$\mathbf{W}_q^g, \mathbf{W}_k^g$ are trainable parameters. $\mathbf{e}_j^{head}, \mathbf{e}_{jk}^{tail}$ are embeddings of head and tail concepts in $g_j$ . Here, $\alpha_{jk}^g$ is the probability of choosing $c_{jk}^{tail}$ from all concept neighbours in $g_j$ at step $t$ conditioned on the dialogue context and the concept flow. We then compute the probability of choosing $g_j$ at step $t$ as a top-level concept selection, denoted as $\alpha_j^t$ :
+
+$$
+\alpha_ {j} ^ {t} = \frac {\exp \left(\beta_ {j} ^ {t}\right)}{\sum_ {l = 1} ^ {m} \exp \left(\beta_ {l} ^ {t}\right)},
+$$
+
+$$
+\beta_ {j} ^ {t} = \left(\mathbf {W} _ {q} ^ {t} [ \mathbf {m} _ {t}; \mathbf {s} _ {N} ]\right) ^ {\top} \cdot \left(\mathbf {W} _ {k} ^ {t} \mathbf {g} _ {j}\right), \tag {7}
+$$
+
+where $\mathbf{W}_q^t$ and $\mathbf{W}_k^t$ are trainable parameters. Finally, the selection probability of target concepts at step $t$ can be derived as:
+
+$$
+P (c _ {t} | c _ {1: t - 1}, D, F, \mathcal {G}) = \alpha_ {j} ^ {t} \alpha_ {j k} ^ {g}. \tag {8}
+$$
+
+The multi-concept extractor has two stop conditions: 1) We add a special token $c^{stop}$ to the concept neighbour set of $g_{j}^{3}$ . The extractor treats $c^{stop}$ as a legal candidate target, and the selection of $c^{stop}$ results in a stop action. 2) the number of target concepts exceeds $N_{max}$ . Furthermore, for all the concepts extracted at step $k(k < t)$ , we set their probabilities to 0 to avoid duplicate extraction.
+
+# 3.3 Concept-Guided Insertion Transformer
+
+After obtaining the target concept sequence $C$ , the next step is to generate a response that covers $C$ . General autoregressive approaches cannot ensure the success of introducing certain contents because they prefer to generate generic words (Mou et al., 2016). Given a substantially big language model, the problem might be alleviated but still cannot be completely solved. To address the issue, we use an Insertion Transformer (Stern et al., 2019) to generate a response based on $C$ , which ensures the appearance of target concepts. On the other hand, the explicit planned concepts can be regarded as a prompt or a signal to guide the generation process. Generation is accomplished by repeatedly making insertions into a sequence initialized by $C$ until a termination condition is met. At each decoding step $t$ , the Insertion Transformer produces a joint distribution over the choice of words $w_{t}$ and all available insertion locations $l_{t} \in [0, |\hat{y}_{t-1}|]$ in the previously decoded response $\hat{y}_{t-1}$ :
+
+$$
+\hat {y} _ {0} = C,
+$$
+
+$$
+\hat {\mathbf {E}} _ {t} = \left[ \mathbf {e} _ {k} ^ {w} \mid w _ {k} \in \hat {y} _ {t} \right], \tag {9}
+$$
+
+$$
+p (w _ {t}, l _ {t} | D, \hat {y} _ {t - 1}) = \mathrm {I n s T F} (\mathbf {H} ^ {c l s}, \hat {\mathbf {E}} _ {t - 1}),
+$$
+
+where $\hat{\mathbf{E}}_t$ is the word embedding list of $\hat{y}_t$ . Notably, $\hat{y}_t$ has multiple available insertion locations, and we can perform parallel decoding by applying insertions at multiple locations simultaneously. For more details of Insertion Transformer, please refer to Stern et al. (2019) due to the space limitation.
+
+ | Persona | Weibo |
| # training pairs | 101,935 | 1,818,862 |
| # validating pairs | 5,602 | 9,187 |
| # testing pairs | 5,317 | 9,186 |
| # concept vertices in G | 2,409 | 4,000 |
| # transition edges in G | 50,744 | 74,362 |
| # concepts in each utterance | 2.56 | 1.61 |
+
+Table 1: Statistics of the dialogue datasets and the constructed concept graphs.
+
+# 3.4 Training and Loss Functions
+
+Given the list of ground truth concepts $C$ in the target response $y$ , the concept extractor is trained as a usual sequence generation model to minimize the negative log likelihood (NLL) loss as follows:
+
+$$
+\mathcal {L} _ {C} = \frac {1}{| C |} \sum_ {t = 1} ^ {| C |} - \log p \left(c _ {t} \mid c _ {1: t - 1}, D, F, \mathcal {G}\right). \tag {10}
+$$
+
+To train the Insertion Transformer, we first sample a subsequence $\hat{y}$ containing all the target concepts from the target response $y$ . Then, for each of the $k + 1$ locations $l = 0, 1, \dots, k$ in $\hat{y}$ , let $(w_{i_l}, w_{i_l + 1}, \dots, w_{j_l})$ be the span of words from the target response yet to be produced at location $l$ . The loss function is finally defined as follows:
+
+$$
+\mathcal {L} _ {R} = \frac {1}{k + 1} \sum_ {l = 0} ^ {k} \sum_ {i = i _ {l}} ^ {j _ {l}} - \log p \left(w _ {i}, l \mid D, \hat {y}\right) \cdot w _ {l} (i). \tag {11}
+$$
+
+Here $w_{l}(i)$ is a softmax weighting policy (Stern et al., 2019) that performs a weighted sum of the negative log-likelihoods of the words in the span. It encourages the generator to produce the central words of the span for a faster decoding process.
+
+# 4 Experimental Settings
+
+# 4.1 Datasets
+
+Experiments are conducted on two public open-domain dialogue datasets Persona-Chat (Zhang et al., 2018) and Weibo (Shang et al., 2015). For Persona-Chat, the associated persona information is discarded so that the model can focus on the development of dialogues. Following previous works (Tang et al., 2019; Xu et al., 2020a), we employ a rule-based method to automatically extract concept words of each utterance, which combines tfidf and POS features for scoring word salience. After dataset cleaning, we re-split the Persona-Chat dataset into train/valid/test sets as done in Tang et al. (2019), while the Weibo dataset is split in
+
+| Model | Persona-Chat | Weibo |
| BLEU | RG-1 | RG-L | Dist-1 | Dist-2 | BLEU | RG-1 | RG-L | Dist-1 | Dist-2 |
| Without Concept Planning |
| Seq2seq+Att | .0325 | .1698 | .1691 | .0127 | .0402 | .0106 | .0790 | .1004 | .0160 | .0520 |
| Transformer | .0285 | .1565 | .1553 | .0181 | .0738 | .0287 | .1175 | .1480 | .0186 | .0898 |
| HRED | .0332 | .1781 | .1785 | .0136 | .0410 | .0151 | .0830 | .1029 | .0145 | .0730 |
| ReCoSa | .0306 | .1576 | .1606 | .0192 | .0820 | .0232 | .0858 | .1069 | .0171 | .0841 |
| With Concept Planning |
| Seq2BF | .0197 | .1234 | .1201 | .0595 | .3058 | .0157 | .1506 | .1434 | .0447 | .1952 |
| CCM | .0389 | .1902 | .1922 | .0463 | .1537 | .0249 | .1883 | .1845 | .0257 | .1750 |
| ConceptFlow | .0401 | .2216 | .2154 | .0487 | .1939 | .0282 | .2133 | .2071 | .0348 | .1948 |
| CG-nAR (ours) | .0477 | .2611 | .2502 | .0626 | .2516 | .0304 | .2576 | .2417 | .0401 | .2809 |
+
+Table 2: Results of automatic evaluation for CG-nAR and baseline methods, which are categorized into two groups: with / without concept planning. The best results are highlighted in bold.
+
+random. After constructing the graph of PersonaChat, we randomly sample 100 concept vertices and 200 edges and ask three human annotators to evaluate their appropriateness. About $93\%$ vertices and $72\%$ edges are accepted by the annotators. For the graph of Weibo, we use the graph released by Xu et al. (2020a). Statistics of the two dialogue datasets along with the constructed graphs is shown in Table 1.
+
+# 4.2 Comparison Methods
+
+We compare CG-nAR with two groups of baselines: general seq2seq models and concept-guided systems. General seq2seq models produce responses conditioned on the dialogue messages without concept planning, including: Seq2seq+Att (Sutskever et al., 2014), a standard RNN model with attention mechanism; Transformer (Vaswani et al., 2017), a seq2seq model with a multi-head attention mechanism; HRED (Serban et al., 2016), a hierarchical encoder-decoder framework to model context utterances; ReCoSa (Zhang et al., 2019), a state-of-the-art model using the self-attention mechanism to measure the relevance of response and context. Concept-guided dialogue systems leverage concept information to control response generation, including: Seq2BF (Mou et al., 2016), a non-left-to-right generation model that explicitly incorporates a keyword into the response; CCM (Zhou et al., 2018a), a model that uses the graph attention mechanism to choose graph entities4, and introduces them into response implicitly by a copy mechanism; ConceptFlow (Zhang et al., 2020), a state-of-the-art model that grounds each dialogue in the concept graph and traverses to distant concepts,
+
+which also generates concept words implicitly in an autoregressive manner; CG-nAR (our model), a model that explicitly introduces multiple concepts into responses with non-autoregressive generation.
+
+# 4.3 Implementation Details
+
+We used VGAE (Kipf and Welling, 2016) to initialize the representation of concept vertices in the concept graph, and used Word2Vec (Mikolov et al., 2013) to initialize word embeddings. The embedding size of vertices and words was set to 128 and 300, respectively. We employed Adam (Kingma and Ba, 2015) with learning rate 1e-3 to train the concept extractor and the Insertion Transformer. All Transformer blocks have 3 layers, 768 hidden units, 8 heads, and the hidden size for all feed-forward layers is 2,048. The hidden size of GRU cells is 768. At inference time, the multi-concept extractor produces concepts greedily, and the maximum number of allowed concepts $N_{max}$ was set to 5. For the Insertion Transformer, we used the configuration that achieved the best results reported in Stern et al. (2019). The whole model was trained for 100,000 steps with 8,000 warm-up steps on a 3090 GPU. Checkpoints were saved and evaluated on the validation set every 2,000 steps. Checkpoints with the top performance were finally evaluated on the test set to report final results.
+
+# 5 Results and Analysis
+
+# 5.1 Automatic Evaluation
+
+We adopt widely used BLEU (Papineni et al., 2002) and ROUGE (Lin, 2004) to measure the relevance between the generation and the ground-truth. We report averaged BLEU scores with 4-grams at most and ROUGE-1/L (RG-1/L) F-scores. To measure the diversity of generated responses, we report
+
+| Model | App. | Inf. |
| Persona-Chat |
| CG-nAR vs. ReCoSa | 72.5%† | 59.3%† |
| CG-nAR vs. Seq2BF | 63.0%† | 53.1% |
| CG-nAR vs. CCM | 60.5%† | 55.0% |
| CG-nAR vs. ConceptFlow | 58.2%† | 54.4% |
| Weibo |
| CG-nAR vs. ReCoSa | 78.2%† | 61.9%† |
| CG-nAR vs. Seq2BF | 65.5%† | 52.9% |
| CG-nAR vs. CCM | 61.4%† | 54.0% |
| CG-nAR vs. ConceptFlow | 61.1%† | 54.7% |
+
+the ratio of distinct uni/bi-grams (Dist-1/2) in all generated responses (Li et al., 2016).
+
+Table 2 shows the results of automatic evaluation for CG-nAR and baseline methods. All methods can be categorized into two groups: traditional seq2seq based generators and concept grounded methods. CG-nAR outperforms all other baselines significantly on BLEU and ROUGE scores (using Wilcoxon signed-rank test, $p < 0.05$ ), which manifests that the responses generated by CG-nAR match better with the ground-truth responses. This means CG-nAR can maintain the dialogue flow on-topic by the multi-concept planning mechanism. In terms of Dist-1/2 that measures the response diversity, all methods with concept planning can produce more diverse responses than those without, which indicates the problem of generic responses is alleviated by integrating concept information. Compared to the baselines with concept planning, CG-nAR has a better performance on response diversity. It verifies the effectiveness of our multi-concept planning module and the concept-guided non-autoregressive strategy, which can produce and combine multiple context-related concepts to compose diverse responses and keep concept words in the output response in an explicit manner.
+
+# 5.2 Manual Evaluation
+
+Considering automatic metrics may not suitably reflect the content to be evaluated, we further performed manual evaluation following previous works (Zhou et al., 2018a; Wu et al., 2020). Specifically, we randomly sampled 200 testing pairs from each test set and employed three annotators with professional background knowledge to evaluate the responses. Given a dialogue message,
+
+Table 3: Results of manual evaluation with appropriateness (App.) and informativeness (Inf.). The score is the percentage of times CG-nAR is chosen as the better in pairwise comparison with its competitor. Results marked with $\dagger$ are significant (using sign test, $p < 0.05$ ).
+
+| Model | P | R | F1 | Num. |
| Persona-Chat |
| ReCoSa | .0137 | .0077 | .0099 | 1.29 |
| Seq2BF | .0280 | .0189 | .0226 | 1.55 |
| CCM | .2406 | .1853 | .2094 | 1.34 |
| ConceptFlow | .3580 | .4041 | .3797 | 1.50 |
| CG-nAR | .5330 | .5029 | .5175 | 2.17 |
| Weibo |
| ReCoSa | .0643 | .0611 | .0626 | 1.53 |
| Seq2BF | .1685 | .1657 | .1671 | 1.58 |
| CCM | .2514 | .2059 | .2264 | 1.61 |
| ConceptFlow | .3859 | .4177 | .4012 | 1.78 |
| CG-nAR | .5119 | .6455 | .5710 | 2.03 |
+
+Table 4: Results of Concept-P/R/F1 that compare the concepts in output responses with those in ground-truth ones. Num. denotes the average number of concepts predicted in output responses.
+
+annotators were required to conduct pair-wise comparison between the response generated by CGnAR and the one by a baseline (1,600 comparisons with four baselines on two datasets in total). For each comparison, annotators decided which response is better in terms of appropriateness (the model's ability to produce a fluent, coherent, and context-relevant response) and informativeness (if the response provides diverse information). For appropriateness, the percentage of pairs that at least 2 annotators gave the same judge (2/3 agreement) is $95.8\%$ , and the percentage for 3/3 agreement is $62.7\%$ . For informativeness, the at least 2/3 agreement is $89.0\%$ and 3/3 agreement is $56.2\%$ .
+
+We compare CG-nAR against four baselines on Persona-Chat and Weibo (see Table 3). The score represents the percentage of times CG-nAR is chosen as the better in pair-wise comparisons. For appropriateness, CG-nAR significantly outperforms all other baselines on two datasets (using sign test, $p < 0.05$ ). It means that CG-nAR can generate more context-relevant and coherent responses accepted by annotators, which validates the effectiveness of our multi-concept planning module. In terms of informativeness, the percentages that CG-nAR wins ReCoSa are noticeably higher than those against other baselines. It indicates that systems with a concept planning mechanism can produce more informative responses by content introducing.
+
+# 5.3 Analysis of Multi-Concept Planning
+
+To validate if the multi-concept planning module has the ability to extract context-relevant concepts and form a coherent dialogue, we calculate the precision, recall, and F1 score of predicted concepts against golden ones in responses (Concept-
+
+| Model | BLEU | RG-1 | RG-L | Dist-1 | Dist-2 | Concept-P | Concept-R | Concept-F1 |
| CG-nAR | .0477 | .2611 | .2502 | .0626 | .2516 | .5330 | .5029 | .5175 |
| w/o. concept planning | .0217 | .1504 | .1568 | .0350 | .1884 | .2711 | .2507 | .2605 |
| w/o. concept flow encoder | .0344 | .2283 | .2232 | .0583 | .1938 | .5778 | .3696 | .4508 |
| w/o. hierarchical encoder | .0327 | .2130 | .2009 | .0468 | .2650 | .3242 | .4250 | .3678 |
| w. gated controller (AR) | .0405 | .2399 | .2320 | .0423 | .1893 | .3926 | .4177 | .4048 |
+
+Table 5: Ablation study using automatic metrics on the Persona-Chat dataset. The best results are highlighted.
+
+| Model | Param. | total time (sec) | words/sec |
| Transformer | 127.3M | 71.36 | 672.1 |
| ReCoSa | 143.8M | 65.27 | 766.9 |
| CG-nAR | 172.1M | 25.99 | 1131.1 |
+
+Table 6: Inference speed on the Persona-Chat test set.
+Param. denotes the number of parameters.
+
+P/R/F1). We also record the average number of predicted concepts to measure the model's ability to introduce multiple concepts. From Table 4 we can observe that CG-nAR achieves a higher recall and F1 score against all baselines by a large margin, especially for ReCoSa and Seq2BF. It probes that our concept planning module can successfully extract more concepts relevant to the dialogue. This is also reflected in the number of predicted concepts, where CG-nAR produces more concept words than those methods with autoregressive generators, e.g., CCM and ConceptFlow. It indicates that the concept-guided generator can effectively keep the concept information in output responses using a non-autoregressive generation mechanism.
+
+# 5.4 Ablation Study
+
+We perform ablation studies to validate the effectiveness of each part of CG-nAR. Table 5 shows the results. One of the variants is a vanilla Insertion Transformer where the concept planning module is removed. The model performance unsurprisingly degrades by a large margin, because the model might produce generic responses without concept planning. After removing the concept flow encoder, the information of historical concept transitions is missing, which also leads to a performance drop. We further replace the hierarchical dialogue encoder with a vanilla Transformer encoder, the performance drop shown in Table 5 indicates that it is necessary to capture the context dependency information when performing dialogue modeling. To probe the effectiveness of the concept-guided non-autoregressive strategy, we replace the Insertion Transformer with a universal Transformer framework equipped with a gated controller as
+
+done in Zhang et al. (2020), where the generation probabilities are calculated over the word vocabulary and the set of selected concept words. Table 5 shows that with the autoregressive decoding strategy, the performance drop is significant. A possible explanation is that the appearance of some key concepts cannot be guaranteed by such an implicit concept-oriented generator, especially when the generator encounters concepts that are not frequently seen in the training set.
+
+# 5.5 Speed Comparison
+
+Our concept-guided non-autoregressive generation model shows not only the superiority on response quality, but also gives a significant speed-up at test time over the methods equipped with autoregressive generators. The results of speed comparison is shown in Table 6. For a fair comparison, we choose the baselines with a Transformer encoder-decoder framework, since our customized Insertion Transformer uses the same model components. The main advantage of the insertion-based generator at inference time is that we can predict words at different insertion locations simultaneously. From Table 6 we can see that CG-nAR achieves substantially test-time speed-up compared to the two autoregressive generators (up to $2.7\mathrm{x}$ in total time and $1.6\mathrm{x}$ in word generation rate) even when CG-nAR has more parameters5.
+
+# 5.6 Case Study
+
+To compare different models intuitively, we show two dialogue cases of the Persona-Chat dataset with output responses in Table 7. We observe that CG-nAR can successfully output context-associated concepts, e.g., grow vegetable that is related to garden, and singer that is related to country music. Compared to other baselines, CG-nAR produces a response that is more coherent and relevant to the dialogue context, and shows a more
+
+| Context | A: What do you do for work?
+B: No work just the hits that's all I need.
+A: I see, I am a volunteer at my local animal shelter.
+B: Well this good work. I am a veteran and I have a garden. | A: Hi. How are you doing?
+B: I'm good, just finished practicing the guitar. You?
+B: Do you do that for a living?
+A: No, just a hobby because country music is my favorite. |
| Ground Truth | Thank you for your service! Do you grow any vegetables? | Who is your favorite singer? |
| ReCoSa
+Seq2BF
+CCM
+ConceptFlow
+CG-nAR | That's cool. Do you have any pets?
+Cool! I work part time at an animal shelter.
+I'm a teacher. What do you do?
+I enjoy to eat organic foods.
+Do you grow vegetable for a living? | I'm a teacher. I've a dog.
+I like music. I love my job.
+Do you have any hobbies?
+I love music. What are your hobbies?
+That's cool. Who is your favorite singer? |
+
+Table 7: Dialogue cases with output responses from different systems. Words in Blue are the observed concepts in the dialogue flow. Words in Red represent the context-associated concepts in the output response.
+
+natural transition of concepts, which again proves the effectiveness of our concept-guided non-AR strategy for controllable dialogue generation.
+
+# 6 Conclusion
+
+In this work, we propose a novel concept-guided non-autoregressive approach for open-domain dialogue generation. It consists of a multi-concept planning module that selects multiple context-relevant concepts to facilitate a coherent dialogue, and a customized Insertion Transformer that produces a response based on the selected concepts to control the generation process. The experimental results show that our method can not only produce high-quality responses, but can also significantly speed up the inference time.
+
+# Acknowledgements
+
+The authors wish to thank the anonymous reviewers for their helpful comments. This work was partially funded by China National Key R&D Program (No. 2017YFB1002104), National Natural Science Foundation of China (No. 61976056, 62076069), Shanghai Municipal Science and Technology Major Project (No.2021SHZDZX0103).
+
+# References
+
+Chaotao Chen, Jinhua Peng, Fan Wang, Jun Xu, and Hua Wu. 2019. Generating multiple diverse responses with multi-mapping and posterior mapping selection. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, pages 4918-4924. ijcai.org.
+
+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.
+
+Kenneth Ward Church and Patrick Hanks. 1989. Word association norms, mutual information, and lexicography. In 27th Annual Meeting of the Association for Computational Linguistics, pages 76-83, Vancouver, British Columbia, Canada. Association for Computational Linguistics.
+
+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.
+
+Emily Dinan, Stephen Roller, Kurt Shuster, Angela Fan, Michael Auli, and Jason Weston. 2019. Wizard of wikipedia: Knowledge-powered conversational agents. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.
+
+ChengYue Gong, Di He, Xu Tan, Tao Qin, Liwei Wang, and Tie-Yan Liu. 2018. FRAGE: frequency-agnostic word representation. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montreal, Canada, pages 1341-1352.
+
+Jiatao Gu, James Bradbury, Caiming Xiong, Victor O. K. Li, and Richard Socher. 2018. Nonautoregressive neural machine translation. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net.
+
+Jiatao Gu, Qi Liu, and Kyunghyun Cho. 2019. Insertion-based decoding with automatically inferred generation order. Transactions of the Association for Computational Linguistics, 7:661-676.
+Qinghong Han, Yuxian Meng, Fei Wu, and Jiwei Li. 2020. Non-autoregressive neural dialogue generation. arXiv preprint arXiv:2002.04250.
+Xinyu Hua and Lu Wang. 2020. PAIR: Planning and iterative refinement in pre-trained transformers for long text generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 781-793, Online. Association for Computational Linguistics.
+Jungo Kasai, James Cross, Marjan Ghazvininejad, and Jiatao Gu. 2020. Non-autoregressive machine translation with disentangled context transformer. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 5144-5155. PMLR.
+Yerbolat Khassanov, Zhiping Zeng, Van Tung Pham, Haihua Xu, and Eng Siong Chng. 2019. Enriching rare word representations in neural language models by embedding matrix augmentation. arXiv preprint arXiv:1904.03799.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Thomas N Kipf and Max Welling. 2016. Variational graph auto-encoders. NIPS Workshop on Bayesian Deep Learning.
+Jason Lee, Elman Mansimov, and Kyunghyun Cho. 2018. Deterministic non-autoregressive neural sequence modeling by iterative refinement. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1173-1182, Brussels, Belgium. Association for Computational Linguistics.
+Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. 2016. A diversity-promoting objective function for neural conversation models. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 110-119, San Diego, California. Association for Computational Linguistics.
+Chin-Yew Lin. 2004. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out, pages 74-81, Barcelona, Spain. Association for Computational Linguistics.
+
+Xuezhe Ma, Chunting Zhou, Xian Li, Graham Neubig, and Eduard Hovy. 2019. FlowSeq: Nonautoregressive conditional sequence generation with generative flow. 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 4282-4292, Hong Kong, China. Association for Computational Linguistics.
+Tomás Mikolov, Ilya Sutskever, Kai Chen, Gregory S. Corrado, and Jeffrey Dean. 2013. Distributed representations of words and phrases and their compositionality. In Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013. Proceedings of a meeting held December 5-8, 2013, Lake Tahoe, Nevada, United States, pages 3111-3119.
+Seungwhan Moon, Pararth Shah, Anuj Kumar, and Rajen Subba. 2019. OpenDialKG: Explainable conversational reasoning with attention-based walks over knowledge graphs. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 845-854, Florence, Italy. Association for Computational Linguistics.
+Lili Mou, Yiping Song, Rui Yan, Ge Li, Lu Zhang, and Zhi Jin. 2016. Sequence to backward and forward sequences: A content-introducing approach to generative short-text conversation. In Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, pages 3349-3358, Osaka, Japan. The COLING 2016 Organizing Committee.
+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.
+Jinghui Qin, Zheng Ye, Jianheng Tang, and Xiaodan Liang. 2020. Dynamic knowledge routing network for target-guided open-domain conversation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 8657-8664.
+Pengjie Ren, Zhumin Chen, Christof Monz, Jun Ma, and Maarten de Rijke. 2020. Thinking globally, acting locally: Distantly supervised global-to-local knowledge selection for background based conversation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 8697-8704.
+Iulian Vlad Serban, Alessandro Sordoni, Yoshua Bengio, Aaron C. Courville, and Joelle Pineau. 2016. Building end-to-end dialogue systems using generative hierarchical neural network models. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12-17, 2016, Phoenix, Arizona, USA, pages 3776-3784. AAAI Press.
+
+Lifeng Shang, Zhengdong Lu, and Hang Li. 2015. Neural responding machine for short-text conversation. 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 1577-1586, Beijing, China. Association for Computational Linguistics.
+Haoyu Song, Yan Wang, Wei-Nan Zhang, Xiaojiang Liu, and Ting Liu. 2020. Generate, delete and rewrite: A three-stage framework for improving persona consistency of dialogue generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5821-5831, Online. Association for Computational Linguistics.
+Mitchell Stern, William Chan, Jamie Kiros, and Jakob Uszkoreit. 2019. Insertion transformer: Flexible sequence generation via insertion operations. In Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 5976-5985. PMLR.
+Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pages 3104-3112.
+Bowen Tan, Zichao Yang, Maruan Al-Shedivat, Eric Xing, and Zhiting Hu. 2021. Progressive generation of long text with pretrained language models. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4313-4324, Online. Association for Computational Linguistics.
+Jianheng Tang, Tiancheng Zhao, Chenyan Xiong, Xiaodan Liang, Eric Xing, and Zhiting Hu. 2019. Target-guided open-domain conversation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5624-5634, Florence, Italy. Association for Computational Linguistics.
+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.
+Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. 2015. Pointer networks. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 2692-2700.
+
+Oriol Vinyals and Quoc Le. 2015. A neural conversational model. arXiv preprint arXiv:1506.05869.
+Sean Welleck, Ilia Kulikov, Stephen Roller, Emily Dinan, Kyunghyun Cho, and Jason Weston. 2020. Neural text generation with unlikelihood training. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
+Sixing Wu, Ying Li, Dawei Zhang, Yang Zhou, and Zhonghai Wu. 2020. Topicka: Generating commonsense knowledge-aware dialogue responses towards the recommended topic fact. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020, pages 3766-3772. ijcai.org.
+Wenquan Wu, Zhen Guo, Xiangyang Zhou, Hua Wu, Xiyuan Zhang, Rongzhong Lian, and Haifeng Wang. 2019. Proactive human-machine conversation with explicit conversation goal. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3794-3804, Florence, Italy. Association for Computational Linguistics.
+Chen Xing, Wei Wu, Yu Wu, Jie Liu, Yalou Huang, Ming Zhou, and Wei-Ying Ma. 2017. Topic aware neural response generation. In Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, February 4-9, 2017, San Francisco, California, USA, pages 3351-3357. AAAI Press.
+Jun Xu, Haifeng Wang, Zheng-Yu Niu, Hua Wu, Wanxiang Che, and Ting Liu. 2020a. Conversational graph grounded policy learning for open-domain conversation generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1835-1845, Online. Association for Computational Linguistics.
+Jun Xu, Haifeng Wang, Zhengyu Niu, Hua Wu, and Wanxiang Che. 2020b. Knowledge graph grounded goal planning for open-domain conversation generation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 9338-9345.
+Lili Yao, Ruijian Xu, Chao Li, Dongyan Zhao, and Rui Yan. 2018. Chat more if you like: Dynamic cue words planning to flow longer conversations. arXiv preprint arXiv:1811.07631.
+Hainan Zhang, Yanyan Lan, Liang Pang, Jiafeng Guo, and Xueqi Cheng. 2019. ReCoSa: Detecting the relevant contexts with self-attention for multi-turn dialogue generation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3721-3730, Florence, Italy. Association for Computational Linguistics.
+Houyu Zhang, Zhenghao Liu, Chenyan Xiong, and Zhiyuan Liu. 2020. Grounded conversation generation as guided traverses in commonsense knowledge graphs. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics,
+
+pages 2031-2043, Online. Association for Computational Linguistics.
+Saizheng Zhang, Emily Dinan, Jack Urbanek, Arthur Szlam, Douwe Kiela, and Jason Weston. 2018. Personalizing dialogue agents: I have a dog, do you have pets too? In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2204-2213, Melbourne, Australia. Association for Computational Linguistics.
+Hao Zhou, Tom Young, Minlie Huang, Haizhou Zhao, Jingfang Xu, and Xiaoyan Zhu. 2018a. Commonsense knowledge aware conversation generation with graph attention. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, July 13-19, 2018, Stockholm, Sweden, pages 4623-4629. ijcai.org.
+Kangyan Zhou, Shrimai Prabhumoye, and Alan W Black. 2018b. A dataset for document grounded conversations. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 708-713, Brussels, Belgium. Association for Computational Linguistics.
\ No newline at end of file
diff --git a/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/images.zip b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..915da7ca5021e07f51c79390e8ec436480f5541f
--- /dev/null
+++ b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3f70201003fb1dcc2ff256c5d13bd88e33feadaf5e50315fef2fff442df358df
+size 515444
diff --git a/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/layout.json b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..b0e6d30b9c0dd2178c395895c85c4c3717a4bd12
--- /dev/null
+++ b/thinkingclearlytalkingfastconceptguidednonautoregressivegenerationforopendomaindialoguesystems/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0156de30c54368e45d0e9f3217a67427699b61048af6e11804ee763ab8b5739f
+size 406584
diff --git a/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/ef681d26-9e43-4f95-a27b-6d6b59df625a_content_list.json b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/ef681d26-9e43-4f95-a27b-6d6b59df625a_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..926c6b182b26fc147839742464a66df13ce6ea8d
--- /dev/null
+++ b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/ef681d26-9e43-4f95-a27b-6d6b59df625a_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:402e3f14260bc234db34062b25b8344a0944beb0f580af9ad35f40fdbe761a76
+size 88825
diff --git a/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/ef681d26-9e43-4f95-a27b-6d6b59df625a_model.json b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/ef681d26-9e43-4f95-a27b-6d6b59df625a_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..2b8dea0598e7d81fccd091c65036499f158eed92
--- /dev/null
+++ b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/ef681d26-9e43-4f95-a27b-6d6b59df625a_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:40ecc689c1d7574eec2573483e1876b32507fc1b10b00626692e35541c52fe5f
+size 106257
diff --git a/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/ef681d26-9e43-4f95-a27b-6d6b59df625a_origin.pdf b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/ef681d26-9e43-4f95-a27b-6d6b59df625a_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..3b1e94b19d2124e07449ab34f4d4068c8ec9c5f5
--- /dev/null
+++ b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/ef681d26-9e43-4f95-a27b-6d6b59df625a_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:43f3b75c6115983aeac714adb8ca5a35fc5f55642ed02613d94f7f36c074bb2e
+size 606470
diff --git a/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/full.md b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..9d1bf27887d8e3c76192d261255580b9c67d58f9
--- /dev/null
+++ b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/full.md
@@ -0,0 +1,371 @@
+# Time-aware Graph Neural Networks for Entity Alignment between Temporal Knowledge Graphs
+
+Chengjin Xu
+
+University of Bonn / Germany
+
+xuc@iai.uni-bonn.de
+
+Fenglong Su*
+
+National University of
+
+Defense Technology / China
+
+sufenglong18@nudt.edu.cn
+
+Jens Lehmann
+
+University of Bonn
+
+Fraunhofer IAIS / Germany
+
+jens.lehmann
+
+@cs.uni-bonn.de
+
+# Abstract
+
+Entity alignment aims to identify equivalent entity pairs between different knowledge graphs (KGs). Recently, the availability of temporal KGs (TKGs) that contain time information created the need for reasoning over time in such TKGs. Existing embedding-based entity alignment approaches disregard time information that commonly exists in many large-scale KGs, leaving much room for improvement. In this paper, we focus on the task of aligning entity pairs between TKGs and propose a novel Time-aware Entity Alignment approach based on Graph Neural Networks (TEA-GNN). We embed entities, relations and timestamps of different KGs into a vector space and use GNNs to learn entity representations. To incorporate both relation and time information into the GNN structure of our model, we use a time-aware attention mechanism which assigns different weights to different nodes with orthogonal transformation matrices computed from embeddings of the relevant relations and timestamps in a neighborhood. Experimental results on multiple real-world TKG datasets show that our method significantly outperforms the state-of-the-art methods due to the inclusion of time information. Our datasets and source code are available at https://github.com/soledad921/TEA-GNN
+
+# 1 Introduction
+
+Knowledge Graphs (KGs) provide a means for structured knowledge representation through connected nodes via edges. The nodes represent entities and the edges connecting these nodes denote relations. A KG stores facts as triples of the form $(e_s, r, e_o)$ , where $e_s$ is the subject entity, $e_o$ is the object entity, and $r$ is the relation between entities. Many large-scale KGs including YAGO (Suchanek et al., 2007) and DBpedia (Lehmann et al., 2015)
+
+
+Figure 1: Illustration of the limitation of the existing time-agnostic entity align approaches.
+
+have been established and are widely used in NLP applications, e.g., question answering and language modeling (Wang et al., 2017).
+
+Since most KGs are developed independently and many of them are supplementary in contents, one of core challenges of KGs is to align equivalent entity pairs between different KGs. To address this issue, embedding-based approaches are leveraged to model entities and relations across multiple KGs and measure the similarities between entities (Sun et al., 2020). It has been proven that the utility of multi-relation information is helpful for an effective entity alignment approach (Mao et al., 2020a).
+
+In addition to relation information, many KGs including YAGO3 (Mahdisoltani et al., 2013), Wikidata (Erxleben et al., 2014) and ICEWS (Lautenschlager et al., 2015) also contain time information between entities, i.e., some edges between entities have two properties, relation and time as shown in Figure 1. Facts in such temporal KGs (TKGs) can be represented as quadruples shaped like $(e_s,r,e_o,\tau)$ where $\tau$ denotes the timestamp. Noteworthy, timestamps in most TKGs are presented in Arabic numerals and have similar formats. Thus, timestamps representing the same dates across multiple TKGs can be easily aligned by manually uniforming their formats.
+
+However, the existing embedding-based entity alignment approaches disregard time informa
+
+tion in TKGs, leaving much room for improvement. Taking the case in Figure 1 as an example, given two entities, George H. W. Bush and George Walker Bush, existing in two TKGs respectively, time-agnostic embedding-based approaches are likely to ignore time information and wrongly recognize these two entities as the same person in the real world due to the homogeneity of their neighborhood information.
+
+To address this issue, an intuitive solution is to incorporate time information into entity alignment models. Inspired by the recent successful applications of GNN models in entity alignment, in this paper, we propose a novel Time-aware Entity Alignment approach based on Graph Neural Networks (TEA-GNN) for entity alignment between TKGs. Different from some temporal GNN models which discretize temporal graphs into multiple snapshots, we treat timestamps as properties of links between entities. We first map all entities, relations and timestamps in TKGs into an embedding space. To incorporate relation and time information into the GNN structure, we utilize a time-aware attention mechanism which assigns different importance weights to different nodes within a neighborhood according to orthogonal transformation matrices computed with the embeddings of the corresponding relations and timestamps. To further integrate time information into the final entity representations, we concatenate output features of entities with the summation of their neighboring time embeddings to get multi-view entity representations.
+
+Specifically, we create a reverse relation $r^{-1}$ for each relation $r$ to integrate direction information. And a time-aware fact involving a time interval $(e_s, r, e_o, [\tau_b, \tau_e])$ , where $\tau_b$ and $\tau_e$ denote the begin and end time, is separated into two quadruples $(e_s, r, e_o, \tau_b)$ and $(e_o, r^{-1}, e_s, \tau_e)$ , which represent the begin and the end of the relation, respectively. In this way, TEA-GNN can adapt well to datasets where timestamps are represented in various forms: time points, begin or end time, time intervals.
+
+To verify our proposed approach, we evaluate TEA-GNN and its time-agnostic variant as well as several state-of-the-art entity alignment approaches on real-world datasets extracted from ICEWS, YAGO3 and Wikidata. Experimental results show that TEA-GNN significantly outperforms all baseline models with the inclusion of time information. To the best of our knowledge, this work is the first
+
+attempt to perform entity alignment between TKGs using a time-aware embedding-based approach.
+
+# 2 Related Work
+
+# 2.1 Knowledge Graph Embedding
+
+KG embedding (KGE) aims to embed entities and relations into a low-dimensional vector space and measure the plausibility of each triples $(e_s, r, e_o)$ by defining a score function. A typical KGE model is TransE (Bordes et al., 2013) which is based on the assumption of $e_s + r \approx e_o$ . In addition to translational KGE models including TransE and its variants (Wang et al., 2014; Nayyeri et al., 2021, 2020), other KGE models can be classified into semantic matching models (Yang et al., 2015; Xu et al., 2020b) or neural network-based models (Dettmers et al., 2018; Schlichtkrull et al., 2018).
+
+With the development of TKGs, TKG embedding (TKGE) draws increasing attention (Leblay and Chekol, 2018; Xu et al., 2020c,a, 2021; Lacroix et al., 2020). An example of typical TKGE models is TTransE (Leblay and Chekol, 2018) which represents timestamps as latent vectors with entities and relations and incorporates time embeddings into its score function $||e_s + r + \tau - e_o||$ . The success of TKGE models shows that the inclusion of time information is helpful for reasoning over TKGs.
+
+# 2.2 Graph Neural Network
+
+Benefiting from the ability to model non-Euclidean space, GNN has become increasingly popular in many areas, including social networks and KGs (Schlichtkrull et al., 2018). Graph Convolutional Network (GCN) (Kipf and Welling, 2017) is an extension of GNN, which generates node-level embeddings by aggregating information from the nodes' neighborhoods. Furthermore, Graph Attention Network (GAT) (Veličković et al., 2018) employs a self-attention mechanism to calculate the hidden representations of each entity by attending over its neighbors.
+
+With the success of these GNN models in the static setting, we approach further practical scenarios where the graph temporally evolves. Existing approaches (Chen et al., 2018; Manessi et al., 2020; Pareja et al., 2020; Wu et al., 2020) generally discretize a temporal graph into multiple static snapshots in a timeline and utilize a combination of GNNs and recurrent architectures (e.g., LSTM), whereby the former digest graph information and the latter handle dynamism.
+
+# 2.3 Knowledge Graph Alignment
+
+Many KG alignment approaches are proposed to find equivalent entities across multiple KGs by measuring the similarities between entity embeddings. Most embedding-based entity alignment approaches can be classified into two categories, i.e., translational models and GNN-based models.
+
+Typical translational entity align models are based on embeddings learned from TransE and its variants. MTransE (Chen et al., 2017) learns a mapping between two separate KGE spaces. JAPE (Sun et al., 2017) proposes to jointly learn structure embeddings and attribute embeddings in a uniform optimization objective. IPTransE (Zhu et al., 2017) and BootEA (Sun et al., 2018) employ a semi-supervised learning strategy which iteratively label new entity alignment as supervision. The main limitation of translational models is their inability of modeling 1-n, n-1 and n-n relations. Besides, they may lack to exploit the global view of entities since TransE is trained on individual triples.
+
+Many recent studies introduce GNNs into entity alignment task, which is originated with the ability to model global information of graphs. GCN-Align utilizes GCNs to embed entities of each KG into a unified vector space without the prior knowledge of relations. After that, a bunch of GCN-based approaches are proposed to incorporate relation information into GCNs. HGCN (Wu et al., 2019b) jointly learn both entity and relation representations via a GCN-based framework and RDGCN (Wu et al., 2019a) construct a dual relation graph for embedding learning. MuGNN (Cao et al., 2019), MRAEA and RREA (Mao et al., 2020a,b) assign different weight coefficients to entities according to relation types between them, which empowers the models to distinguish the importance between different entities. Our framework TEA-GNN adopts a similar idea with additional time information.
+
+# 3 Problem Formulation
+
+Formally, a TKG is represented as $\mathcal{G} = (\mathcal{E},\mathcal{R},\mathcal{T},\mathcal{Q})$ where $\mathcal{E}$ , $\mathcal{R}$ and $\mathcal{T}$ are the sets of entities, relations and timestamps, respectively. $\mathcal{Q} \subset \mathcal{E} \times \mathcal{R} \times \mathcal{E} \times \mathcal{T}$ is the set of factual quadruples. Let $\mathcal{G}_1 = (\mathcal{E}_1,\mathcal{R}_1,\mathcal{T}_1,\mathcal{Q}_1)$ and $\mathcal{G}_2 = (\mathcal{E}_2,\mathcal{R}_2,\mathcal{T}_2,\mathcal{Q}_2)$ be two TKGs, and $S = \{(e_{i1},e_{i2})|e_{i1} \in \mathcal{E}_1,e_{i2} \in \mathcal{E}_2\}$ be the set of pre-aligned entity pairs between $\mathcal{G}_1$ and $\mathcal{G}_2$ . As mentioned in Section 1, timestamps in different TKGs can be easily aligned by manually uniforming their formats. A uniform time set
+
+$\mathcal{T}^{*} = \mathcal{T}_{1}\cup \mathcal{T}_{2}$ can be constructed for both TKGs. Therefore, two TKGs can be renewed as $\mathcal{G}_1 = (\mathcal{E}_1,\mathcal{R}_1,\mathcal{T}^*,\mathcal{Q}_1)$ and $\mathcal{G}_2 = (\mathcal{E}_2,\mathcal{R}_2,\mathcal{T}^*,\mathcal{Q}_2)$ sharing the same set of timestamps. The task of time-aware entity alignment aims to find new aligned entity pairs between $\mathcal{G}_1$ and $\mathcal{G}_2$ based on the prior knowledge of $S$ and $\mathcal{T}^*$ .
+
+# 4 The Proposed Approach
+
+To exploit both relation and time information for entity alignment, we first create a reverse link for each link so that each pair of reverse links between entities can represent relation directions and handle the begin and end of the relation. An orthogonal transformation-based time-aware attention mechanism is employed in each GCN layer to assign different weights to entities according to relation and time information between them. Finally, entity alignments are predicted by applying a distance function to multi-view representations of entities.
+
+# 4.1 Reverse Link Generation
+
+Time information $\tau$ in a temporal fact $(e_s, r, e_o, \tau)$ can be represented in various forms, e.g., time points, begin or end time and time intervals. A time interval is shaped like $[\tau_b, \tau_e]$ where $\tau_b$ and $\tau_e$ denote the actual begin time and end time of the fact, respectively. A time point can be represented as $[\tau_b, \tau_e]$ where $\tau_b = \tau_e$ . Noteworthy, we represent a begin or end time as $[\tau_b, \tau_0]$ or $[\tau_0, \tau_e]$ where $\tau_0 \in \mathcal{T}^*$ is the first time step in the time set denoting the unknown time information. A fact without known time information can be denoted as $(e_s, r, e_o, [\tau_0, \tau_0])$ to deal with heterogeneous temporal knowledge bases where a significant amount of relations might be non-temporal.
+
+In order to integrate relation direction, we create a reverse relation $r^{-1}$ for each relation $r$ and extend the relation set $\mathcal{R} = \{r_0,r_1,\dots ,r_{|\mathcal{R}| - 1}\} \to$ $\{r_0,r_0^{-1},\dots ,r_{|\mathcal{R}| - 1},r_{|\mathcal{R}| - 1}^{-1}\}$ . And each fact $(e_s,r,e_o,[\tau_b,\tau_e])$ is decomposed into two quadruples $(e_s,r,e_o,\tau_b)$ and $(e_o,r^{-1},e_s,\tau_e)$ to handle the begin and the end of the relation, respectively.
+
+# 4.2 Time-Aware Attention Network
+
+We map all of entities, relations (including reverse relations) and time steps in both TKGs into a same vector space $\mathbb{R}^k$ where $k$ denotes the embedding dimension. Embeddings of the entity $e_i$ , relation $r_j$ , time step $\tau_m$ are denoted as $h_{e_i}, h_{r_j}, h_{\tau_m} \in \mathbb{R}^k$ .
+
+
+Figure 2: Framework of our approach. Dashed arrows represent the created reverse links.
+
+
+
+
+
+Some recent studies (Smith et al., 2017; Pei et al., 2019) show that orthogonal transformation matrix is desirable and robust when transforming one isomorphic embedding to another. Thus, for each relation embedding $h_{r_j}$ and time embedding $h_{\tau_m}$ , we define the corresponding orthogonal transformation matrices $M_{r_j}, M_{\tau_m} \in \mathbb{R}^{k \times k}$ as follows,
+
+$$
+M _ {r _ {j}} = I - 2 h _ {r _ {j}} h _ {r _ {j}} ^ {T}, M _ {\tau_ {m}} = I - 2 h _ {\tau_ {m}} h _ {\tau_ {m}} ^ {T}, \tag {1}
+$$
+
+where embeddings $h_{r_j}$ and $h_{\tau_m}$ are normalized to ensure $h_{r_j}^T h_{r_j} = h_{\tau_m}^T h_{\tau_m} = 1$ . By doing this, we can easily prove that transformation matrices $M_{r_j}$ and $M_{\tau_m}$ are orthogonal. Taking $M_{\tau_m}$ as an example, we can obtain
+
+$$
+\begin{array}{l} M _ {\tau_ {m}} ^ {T} M _ {\tau_ {m}} = \left(I - 2 h _ {\tau_ {m}} h _ {\tau_ {m}} ^ {T}\right) ^ {T} \left(I - 2 h _ {\tau_ {m}} h _ {\tau_ {m}} ^ {T}\right) \\ = I - 4 h _ {\tau_ {m}} h _ {\tau_ {m}} ^ {T} + 4 h _ {\tau_ {m}} h _ {\tau_ {m}} ^ {T} h _ {\tau_ {m}} h _ {\tau_ {m}} ^ {T} = I. (2) \\ \end{array}
+$$
+
+By using such orthogonal transformation matrices, the norms and the relative distances of entities can remain unchanged after transformation, i.e.,
+
+$$
+\left| \left| h _ {e _ {i}} M _ {\tau_ {m}} \right| \right| = \left| \left| h _ {e _ {i}} \right| \right|, \tag {3}
+$$
+
+$$
+h _ {e _ {i}} ^ {T} h _ {e _ {j}} = (h _ {e _ {i}} M _ {\tau_ {m}}) ^ {T} (h _ {e _ {j}} M _ {\tau_ {m}}).
+$$
+
+A time-aware attention mechanism is used to integrate both time and relation information into entity representations by assigning different weights to different neighboring nodes according to the orthogonal transformation matrices of relations and timestamps of the corresponding inward links. In the case of Figure 2, the inward
+
+links in the neighborhood of the entity $e_1$ include $(e_2, r_1, e_1, \tau_{1b})$ and $(e_3, r_2^{-1}, e_1, \tau_{2e})$ in which $e_1$ performs as the object entity. We define the time-specific weighted importance $\alpha_{i,j,m}$ and the relation-specific weighted importance $\beta_{i,j,m}$ of the $m$ th inward link from the neighboring entity $e_j$ to $e_i$ as follows,
+
+$$
+\begin{array}{l} \alpha_ {i, j, m} = \nu_ {\tau} ^ {T} \left[ h _ {e _ {i}} ^ {i n} \right| | M _ {\tau_ {m}} h _ {e _ {j}} ^ {i n} | | h _ {\tau_ {m}} ], \\ \quad \quad \quad \quad \quad \quad \quad \quad T [ 1 i n ] | | 3 - 1 i n | | 1. \end{array} \tag {4}
+$$
+
+$$
+\beta_ {i, j, m} = \nu_ {r} ^ {T} [ h _ {e _ {i}} ^ {i n} | | M _ {r _ {m}} h _ {e _ {j}} ^ {i n} | | h _ {r _ {m}} ],
+$$
+
+where $||$ denotes the concatenation operator, $\nu_{\tau}^{T}, \nu_{r}^{T} \in \mathbb{R}^{3k}$ are shared temporal and relational attention weight vectors. $h_{e_i}^{in}, h_{e_j}^{in} \in \mathbb{R}^k$ are the input features of entities $e_i$ and $e_j$ . The entities' input features in the first network layer are their original embeddings. $h_{\tau_m}$ and $h_{r_m}$ are embeddings of the timestamp and relation in the $m$ th inward link. Following GAT (Veličković et al., 2018), we define the normalized element $\omega_{i,j,m}$ and $\upsilon_{i,j,m}$ representing the temporal and relational connectivity from entity $e_i$ to $e_j$ using softmax functions,
+
+$$
+\omega_ {i, j, m} = \frac {\exp \left(\alpha_ {i , j , m}\right)}{\sum_ {e _ {j} \in \mathcal {N} _ {i} ^ {e}} \sum_ {\tau_ {m} \in \mathcal {L} _ {i j} ^ {\tau}} \exp \left(\alpha_ {i , j , m}\right)}, \tag {5}
+$$
+
+$$
+v _ {i, j, m} = \frac {\exp (\beta_ {i , j , m})}{\sum_ {e _ {j} \in \mathcal {N} _ {i} ^ {e}} \sum_ {r _ {m} \in \mathcal {L} _ {i j} ^ {r}} \exp (\beta_ {i , j , m})},
+$$
+
+where $\mathcal{N}_i^e$ is the set of neighboring entities of $e_i$ and $\mathcal{L}_{ij}^{r}$ and $\mathcal{L}_{ij}^{\tau}$ denote the sets of relations and time steps in the links from $e_j$ to $e_i$ .
+
+The output features $h_{e_i}^{out}$ are obtained with an aggregate which linearly combines the temporal
+
+and relational orthogonal transformations of the input features of neighboring entities and a nonlinear ReLU activation function $\sigma (\cdot)$ , i.e.,
+
+$$
+\begin{array}{l} h _ {e _ {i}} ^ {\text {o u t}} = \sigma \left(\sum_ {e _ {j} \in \mathcal {N} _ {i} ^ {e}} \sum_ {[ \tau_ {m}, r _ {m} ] \in \mathcal {L} _ {i j}} \omega_ {i, j, m} M _ {\tau_ {m}} h _ {e _ {j}} ^ {\text {i n}} \right. \tag {6} \\ \left. + v _ {i, j, m} M _ {r _ {m}} h _ {e _ {j}} ^ {i n}\right). \\ \end{array}
+$$
+
+where $\mathcal{L}_{ij}$ denotes the set of links from $e_j$ to $e_i$ .
+
+# 4.3 Entity Alignment Model
+
+Entity align model aims to embed two KGs into a unified vector space by pushing the seed alignments of entities together. In this work, the entity align model consists of multiple TEA-GNN layers and a distance function which measures the similarities between final representations of entities.
+
+Let the $l$ -th layer's output features of entity $e_i$ as $h_{e_i}^{out(l)}$ . A cross-layer representation is employed to capture multi-hoop neighboring information in previous work (Mao et al., 2020a) by concatenating output features of different layers. In the same way, we define the global output features $\hat{h}_{e_i}^{out}$ of $e_i$ as
+
+$$
+\hat {h} _ {e _ {i}} ^ {o u t} = [ h _ {e _ {i}} ^ {o u t (0)} | | h _ {e _ {i}} ^ {o u t (1)} | | \dots | | h _ {e _ {i}} ^ {o u t (L)} ], \qquad (7)
+$$
+
+where $L$ is the number of layers and $h_{e_i}^{out(0)} = h_{e_i}^{in}$ are the input features.
+
+We further concatenate the average embeddings of connected timestamps with output features of entities to get multi-view embeddings as final entity representations, i.e.,
+
+$$
+h _ {e _ {i}} ^ {m u l} = \left[ \hat {h} _ {e _ {i}} ^ {o u t} \right| \left| \frac {1}{\left| \mathcal {N} _ {e _ {i}} ^ {\tau} \right|} \sum_ {\tau_ {m} \in \mathcal {N} _ {e _ {i}} ^ {\tau}} h _ {\tau_ {m}} \right], \tag {8}
+$$
+
+where $\mathcal{N}_{e_i}^{\tau}$ represents the set of timestamps around entity $e_i$ .
+
+Entity alignments are predicted based on the distances between the final output features of entities from two KGs. For two entities $e_i \in \mathcal{E}_1$ and $e_j \in \mathcal{E}_2$ from different sources, we use L1 distance to measure the distance between them as follows,
+
+$$
+d \left(e _ {i}, e _ {j}\right) = \left| \left| h _ {e _ {i}} ^ {m u l} - h _ {e _ {j}} ^ {m u l} \right| \right| _ {1}, \tag {9}
+$$
+
+A margin rank loss is used as the optimization objective of the entity align model, i.e.,
+
+$$
+\begin{array}{l} \mathcal {L} = \sum_ {(e _ {i}, e _ {j}) \in \mathcal {S}} \sum_ {(e _ {i}, e _ {j} ^ {\prime}) \in \mathcal {S} ^ {\prime}} \sigma (d (e _ {i}, e _ {j}) + \lambda - d (e _ {i}, e _ {j} ^ {\prime})) \\ + \sum_ {\left(e _ {i}, e _ {j}\right) \in \mathcal {S}} \sum_ {\left(e _ {i} ^ {\prime}, e _ {j}\right) \in \mathcal {S} ^ {\prime}} \sigma \left(d \left(e _ {i}, e _ {j}\right) + \lambda - d \left(e _ {i} ^ {\prime}, e _ {j}\right)\right). \tag {10} \\ \end{array}
+$$
+
+where $\lambda$ denotes the margin, $S^{\prime}$ is the set of generated negative entity pairs, $e_i^\prime \in \mathcal{E}_1$ and $e_j^\prime \in \mathcal{E}_2$ are the negative entities of $e_i$ and $e_j$ . Negative entities are sampled randomly and an RMSprop optimizer is used to minimize the loss function.
+
+During testing, we adopt CSLS (Conneau et al., 2018) as the distance metric to measure similarities between entity embeddings.
+
+# 5 Experiments
+
+# 5.1 Datasets
+
+In this work, we build five datasets from ICEWS05-15 (García-Durán et al., 2018), YAGO3 (Mahdisoltani et al., 2013) and Wikidata (Erxleben et al., 2014) to evaluate our approach.
+
+ICEWS05-151 is originally extracted from ICEWS (Lautenschlager et al., 2015) which is a repository that contains political events with specific time annotations, e.g. (Barack Obama, Make a visit, Ukraine, 2014-07-08). It is noteworthy that time annotations in ICEWS are all time points. ICEWS05-15 contains events during 2005 to 2015. We build two datasets DICEWS-1K and DICEWS-200 in the similar way to the construction of DFB datasets (Zhu et al., 2017). We first randomly divide ICEWS05-15 quadruples into two subsets $\mathcal{Q}_1$ and $\mathcal{Q}_2$ of similar size, and make the overlap ratio of the amount of shared quadruples between $\mathcal{Q}_1$ and $\mathcal{Q}_2$ to all quadruples equal to $50\%$ . The only difference between DICEWS-1K and DICEWS-200 is the number of alignment seed $S$ . In DICEWS-1K and DICEWS-200, i.e., 1,000 and 200 of entity pairs between TKGs are pre-known. The time unit of ICEWS datasets is 1 day, which means that each day is an individual time step.
+
+YAGO3 and Wikidata are two common large-scale knowledge bases containing time information of various forms including time points, beginning or end time, and time intervals. Lacroix et al. (2020) extract a subset from Wikidata in which $90\%$ of facts are non-temporal while others have time annotations attached. We select top 50,000 entities according to their frequencies in Wikidata and link them to their equivalent YAGO entities3 according to their QIDs and the mappings of YAGO entities to Wikidata QIDs. We generate two TKGs only involving the selected entities from the original Wikidata dataset and all YAGO facts, and then
+
+| Dataset | |E1| | |E2| | |R1| | |R2| | |T*| | |Q1| | |Q2| | |P| | |S| |
| DICEWS-1K/200 | 9,517 | 9,537 | 247 | 246 | 4,017 | 307,552 | 307,553 | 8,566 | 1,000/200 |
| YAGO-WIKI50K-5K/1K | 49,629 | 49,222 | 11 | 30 | 245 | 221,050 | 317,814 | 49,172 | 5,000/1,000 |
| YAGO-WIKI20K | 19,493 | 19,929 | 32 | 130 | 405 | 83,583 | 142,568 | 19,462 | 400 |
+
+Table 1: Statistics of original datasets (not including reverse relations and reverse links).
+
+| Models | DICEWS-1K | DICEWS-200 | YAGO-WIKI50K-5K | YAGO-WIKI50K-1K |
| MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 |
| MTransE | .150 | .101 | .241 | .104 | .067 | .175 | .322 | .242 | .477 | .033 | .012 | .067 |
| JAPE | .198 | .144 | .298 | .138 | .098 | .210 | .345 | .271 | .488 | .157 | .101 | .262 |
| AlignE | .593 | .508 | .751 | .303 | .222 | .457 | .800 | .756 | .883 | .618 | .565 | .714 |
| GCN-Align | .291 | .204 | .466 | .231 | .165 | .363 | .581 | .512 | .711 | .279 | .217 | .398 |
| MRAEA | .745 | .675 | .870 | .564 | .476 | .733 | .848 | .806 | .913 | .685 | .623 | .801 |
| RREA | .780 | .722 | .883 | .719 | .659 | .824 | .868 | .828 | .938 | .753 | .696 | .859 |
| TU-GNN | .693 | .610 | .848 | .610 | .518 | .788 | .839 | .795 | .916 | .712 | .647 | .834 |
| TEA-GNN | .911 | .887 | .947 | .902 | .876 | .941 | .909 | .879 | .961 | .775 | .723 | .871 |
+
+Table 2: Entity alignment results on ICEWS and YAGO-WIKI50K datasets. The best results are written bold.
+
+attach complementary time information to meta YAGO facts. We build two time-aware datasets YAGO-WIKI50K-5K and YAGO-WIKI50K-1K by removing non-temporal facts in the generated TKGs and using different numbers of alignment seeds $S$ . In addition, we build a hybrid dataset YAGO-WIKI20K containing both temporal and non-temporal facts with 400 pairs of alignment seeds by reducing sizes of entity sets of two TKGs to around 20,000. To generate the shared time set $\mathcal{T}^*$ for a YAGO-WIKI dataset, we drop month and date information and use the first time step $\tau_0$ to represent unobtainable time information.
+
+Statics of all datasets are listed in Table 1. $\mathcal{P}$ denotes the set of reference entity pairs. The set of reference entity pairs other than pre-aligned entity pairs, i.e., $\mathcal{P} - \mathcal{S}$ are used for testing.
+
+# 5.2 Experimental Setup
+
+Following the previous work, we perform entity alignment as a ranking task based on similarities between entity embeddings, and use Mean Reciprocal Rank (MRR) and Hits@N $(\mathrm{N} = 1,10)$ as evaluation metrics. The default configuration of our model is as follows: embedding dimension $k = 100$ learning rate $lr = 0.005$ , number of TEA-GNN layers $L = 2$ , margin $\gamma = 1$ and dropout rate is 0.3. Below we only list the non-default hyperparameters: $\gamma = 3$ for DICEWS-200 and YAGOWIKI20K; $k = 25$ for YAGO-WIKI50K-5K and YAGO-WIKI50K-1K. To verify the effectiveness of integration of time information, we implement a time-unaware variant of TEA-GNN which takes all
+
+time steps $\tau_{i}\in \mathcal{T}^{*}$ as unknown time information $\tau_0$ , denoted as TU-GNN. The non-default hyperparameters of TU-GNN are as follows: $\gamma = 3$ for DICEWS-1K and YAGO-WIKI20K; $\gamma = 5$ for DICEWS-200; $k = 25$ for YAGO-WIKI50K datasets. The reported performance is the average of five independent training runs.
+
+In this work, we compare our proposed models with three strong translational baseline models and three state-of-the-art GNN-based models including MTransE (Chen et al., 2017), JAPE (Sun et al., 2017), AlignE (Sun et al., 2018), GCNAlign (Wang et al., 2018), MRAEA (Mao et al., 2020a) and RREA (Mao et al., 2020b). We choose AlignE instead of BootEA since we do not use iterative learning for other models including our proposed models. Due to the lack of attribute information, we use the SE (Structural Embedding) variants of JAPE and GCN-Align as baseline models. Except that the experiments of MTransE is implemented based on OpenEA framework (Sun et al., 2020), all experiments of baseline models are implemented based on their resource codes. All target models including our proposed models are trained on a GeForce GTX 1080Ti GPU. For a fair comparison, we set the maximum embedding dimension as 100 for all target models. Details of implementation and grid research for hyperparameters can be found in Appendix A.
+
+# 5.3 Results and Analysis
+
+Main Results Table 2 shows the entity alignment results of our proposed models and all baselines on
+
+| Entities to Be Aligned | Predictions | Similar Facts (Links) Involving Aligned Entities Between Μ1 and Μ2 |
| Daniel Scioli(in Ε1 of DICEWS-200) | TEA-GNN:Daniel Scioli | (Daniel Scioli, Accuse, Senate (Argentina), 2015-06-28),(Presidential Candidate (Argentina), Make Statement, Daniel Scioli, 2015-03-07),... (in Μ1 of DICEWS-200) |
| TU-GNN:Agustín Rossi | (Agustín Rossi, Accuse, Senate (Argentina), 2009-08-26),(Presidential Candidate (Argentina), Make Statement, Agustín Rossi, 2015-04-18),... (in Μ2 of DICEWS-200) |
| Leon Benko (Q1389599)(in Ε2 of YAGO-WIKI50K-1K) | TEA-GNN:<Leon_Benko>TU-GNN:<Olivier FONTETTE> | (<Olivier FONTETTE>, <playsFor>, <K.V._Kortrijk>, [2008, -]),... (in Μ1 of YAGO-WIKI50K-1K)(Leon Benko (Q1389599), member of sports team, K.V. Kortrijk (Q618620), [2009, 2010]),... (in Μ2 of YAGO-WIKI50K-1K) |
+
+Table 3: Examples of Different Alignment Predictions between TEA-GNN and TU-GNN.
+
+
+Figure 3: Hits@1 of TEA-GNN, TU-GNN and RREA on entity alignment, w.r.t. number of alignment seeds |Sl.
+
+
+
+ICEWS and YAGO-WIKI50K datasets. It can be shown that TEA-GNN remarkably outperforms all baseline models on four TKG datasets across all metrics. Compared to RREA which achieves the best results among than all baseline models, TEAGNN obtains the improvement of $22.9\%$ , $32.9\%$ , $6.2\%$ and $3.9\%$ regarding Hits@1 on four TKG datasets, respectively.
+
+Qualitative Study To study the effect of the integration of time information on the entity alignment performances of TEA-GNN, we conduct a qualitative study of TEA-GNN and its time-unaware variant TU-GNN. Table 3 lists several examples that TEA-GNN gives different predictions from TU-GNN with consideration of additional time information. In the first case, TU-GNN wrongly aligns two entities from $\mathcal{G}_1$ and $\mathcal{G}_2$ of DICEWS-200, i.e., Daniel Scioli and Agustín Rossi, because these two entities have very similar connected links in $\mathcal{G}_1$ and $\mathcal{G}_2$ regardless of time information. As shown in Table 3, some links respective to these two entities in $\mathcal{G}_1$ and $\mathcal{G}_2$ have the same linked entities and relation types, leading to the result that TU-GNN identifies them as an equivalent entity pair. On the other hand, TEA-GNN can correctly distinguish these two entities since the relevant links have different timestamps. Similarly, TU-GNN rec
+
+ognizes a Wikidata entity Leon Benko (Q1389599) and a YAGO entity as the same person since these two person played for the same football club, while TEA-GNN can learn that they played for different periods and thus are not the same person in real world. These cases demonstrate the effect of time information on the performances of our proposed entity alignment models.
+
+Sensitivity Study In this study, we would like to answer the following research questions: 1. Does the time-aware EA method have a better robustness to the size of pre-aligned entity pairs than time-agnostic ones? 2. In our method, what effect does the inclusion of time information have on entities with different time sensitivities?
+
+Numerically, compared to TU-GNN, TEAGNN improves Hits@1 by $45.4\%$ and $69.1\%$ on DICEWS-1K and DICEWS-200, $10.6\%$ and $11.6\%$ on YAGO-WIKI50K-5K and YAGO-WIKI50K-1K. It can be shown that the improvements on datasets with less alignment seeds are more significant. To further verify this observation, we evaluate the performances of these two models and RREA on ICEWS and YAGO-WIKI50K datasets with different numbers of alignment seeds. As shown in Figure 3, the performance difference between TEA-GNN and two time-unaware models
+
+ | Highly Time-Sensitive | Lowly Time-Sensitive | In Total |
| MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 |
| TEA-GNN | .888 | 853 | .950 | .364 | .319 | .449 | .553 | .512 | .630 |
| TU-GNN | .790 | .737 | .888 | .366 | .315 | .463 | .519 | .468 | .617 |
+
+Table 4: Entity alignment results on different test sets of YAGO-WIKI20K.
+
+
+Figure 4: Training time per 300 epochs on different datasets.
+
+becomes greater with the decreasing of the numbers $|S|$ of alignment seeds from 1000 to 200. In practical applications, alignment seeds are difficult to obtain. Since our method performs well with a small amount of pre-aligned entity pairs, it can more easily be applied in large-scale KGs compared to time-unaware EA methods.
+
+We also conduct a study on the prediction accuracy of aligned entities which have different time sensitivity. As mentioned in Section 5.1, we generate a hybrid dataset YAGO-WIKI20K where $17.5\%$ of YAGO facts and $36.6\%$ of Wikidata facts are non-temporal. We divide all testing entity pairs in this dataset into two categories based on their sensitivity to time information, i.e., highly time-sensitive entity pairs and lowly time-sensitive entity pairs. Time sensitivity $s_i$ of a single entity $e_i$ is defined as the ratio of the number of its time-aware connected links in which $\tau \neq \tau_0$ over the total number of all links $\mathcal{L}_i$ within its neighborhood, i.e.,
+
+$$
+s _ {i} = 1 - \left| \mathcal {L} _ {i} ^ {\tau_ {0}} \right| / \left| \mathcal {L} _ {i} \right|, \tag {11}
+$$
+
+where $\mathcal{L}_i^{\tau_0}$ denotes the set of time-unaware links connecting $e_i$ . Given an entity pair $(e_{i1}, e_{i2})$ between $\mathcal{G}_1$ and $\mathcal{G}_2$ , we call them as a highly time-sensitive entity pair if $s_{i1} \geqslant 0.5$ and $s_{i2} \geqslant 0.5$ . Otherwise, they are lowly time-sensitive.
+
+Among 19,062 testing entity pairs of YAGO-WIKI20K, 6,898 of them are highly time-sensitive and others are lowly time-sensitive according to the above definitions. The entity alignment results of TEA-GNN and TU-GNN on the highly time-sensitive test set and the lowly time-sensitive test
+
+set are reported in Table 4. It can be shown that TEA-GNN and TU-GNN have close performance on entity alignment for lowly time-sensitive entity pairs while TEA-GNN remarkably outperforms TU-GNN on the highly time-sensitive test set. In other words, the effect of incorporation of time information are more significant when testing entity pairs are more time-sensitive.
+
+Complexity Study Given two TKGs to be aligned, i.e., $\mathcal{G}_1 = (\mathcal{E}_1,\mathcal{R}_1,\mathcal{T}^*,\mathcal{Q}_1)$ and $\mathcal{G}_2 = (\mathcal{E}_2,\mathcal{R}_2,\mathcal{T}^*,\mathcal{Q}_2)$ , the total number of trainable parameters $|p|$ of TEA-GNN is equal to,
+
+$$
+\begin{array}{l} | p | = k \times \left(| \mathcal {E} _ {1} | + | \mathcal {E} _ {2} | + 2 | \mathcal {R} _ {1} | + 2 | \mathcal {R} _ {2} |\right. \tag {12} \\ + \left| \mathcal {T} ^ {*} \right|) + 3 k \times L + 3 k \times L, \\ \end{array}
+$$
+
+where $L$ denotes the number of TEA-GNN layers, the last two terms represent numbers of parameters of shared temporal and relational attention weight vectors involved in Equation 4. Compared to parameter-efficient translational entity align models like MTransE, JAPE, in which the numbers of parameters are $k \times (|\mathcal{E}_1| + |\mathcal{E}_2| + |\mathcal{R}_1| + |\mathcal{R}_2|)$ , TEA-GNN uses additional parameters only for reverse relation embeddings, time embeddings and attention weight vectors, which are much fewer than parameters of entity embeddings in most cases.
+
+As shown in Figure 4, the processing of the additional time information does not excessively increase the training time for TEA-GNN, compared to RREA and TU-GNN. Since we set the maximum number of epochs as 6000, the training processes of our proposed models on different datasets can be completed within a couple of hours on a single GeForce GTX 1080Ti GPU.
+
+# 6 Conclusion
+
+The main contributions of this paper are threefold:
+
+- We propose a novel GNN-based approach TEAGNN which can model temporal relational graphs with an orthogonal transformation based time-aware attention mechanism and perform entity alignment tasks between TKGs. To the best of our knowledge, this work is the first attempt to integrate time information into an embedding-based entity alignment approach.
+- Existing temporal GNN models typically discretize a temporal graph into multiple static snapshots and utilize a combination of GNNs and recurrent architectures. Differently, we treat timestamps as attentive properties of links between nodes. This method has been proven to be time-efficient in our case and could potentially be used for non-relational temporal graph representation learning.
+- Multiple new datasets are created in this work for evaluating the performance of entity alignment models on TKGs. Experiments show that TEAGNN remarkably outperforms the state-of-the-art entity alignment models on various well-built TKG datasets.
+
+For future work, we will try to integrate other types of information, e.g., attribute information, into our model and extend our model for other learning tasks of temporal graphs.
+
+# Acknowledgements
+
+We acknowledge the support of the following projects: SPEAKER (BMWi FKZ 01MK20011A), JOSEPH (Fraunhofer Zukunftsstiftung), the EU projects Cleopatra (GA 812997), PLATOON(GA 872592), TAILOR(EU GA 952215), the BMBF projects MLwin(01IS18050) and the BMBF excellence clusters ML2R (BmBF FKZ 01 15 18038 A/B/C), ScaDS.AI (IS18026A-F) and the China Scholarship Council (CSC).
+
+# References
+
+Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. 2013. Translating embeddings for modeling multi-relational data. In Advances in Neural Information Processing Systems, pages 2787-2795.
+Yixin Cao, Zhiyuan Liu, Chengjiang Li, Zhiyuan Liu, Juanzi Li, and Tat-Seng Chua. 2019. Multi-channel graph neural network for entity alignment. In ACL.
+
+Jinyin Chen, Xuanheng Xu, Yangyang Wu, and Haibin Zheng. 2018. Gc-lstm: Graph convolution embedded LSTM for dynamic link prediction. arXiv preprint arXiv:1812.04206.
+Muhao Chen, Yingtao Tian, Mohan Yang, and Carlo Zaniolo. 2017. Multilingual knowledge graph embeddings for cross-lingual knowledge alignment. In *IJCAI*.
+Alexis Conneau, Guillaume Lample, Marc'Aurelio Ranzato, Ludovic Denoyer, and Hervé Jégou. 2018. Word translation without parallel data. In ICLR 2018.
+Tim Dettmers, Pasquale Minervini, Pontus Stenetorp, and Sebastian Riedel. 2018. Convolutional 2d knowledge graph embeddings. In Thirty-Second AAAI Conference on Artificial Intelligence.
+Fredo Erxleben, Michael Gunther, Markus Krötzsch, Julian Mendez, and Denny Vrandecic. 2014. Introducing wikidata to the linked data web. In International Semantic Web Conference, pages 50-65. Springer.
+Alberto García-Durán, Sebastijan Dumančić, and Mathias Niepert. 2018. Learning sequence encoders for temporal knowledge graph completion. In EMNLP.
+Thomas N Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In ICLR.
+Timothée Lacroix, Guillaume Obozinski, and Nicolas Usunier. 2020. Tensor decompositions for temporal knowledge base completion. In ICLR.
+Jennifer Lautenschlager, Steve Shellman, and Michael Ward. 2015. Icews event aggregations.
+Julien Leblay and Melisachew Wudage Chekol. 2018. Deriving validity time in knowledge graph. In *Companion of the The Web Conference* 2018 on The Web Conference 2018, pages 1771-1776. International World Wide Web Conferences Steering Committee.
+Jens Lehmann, Robert Isele, Max Jakob, Anja Jentzsch, Dimitris Kontokostas, Pablo N Mendes, Sebastian Hellmann, Mohamed Morsey, Patrick Van Kleef, Soren Auer, et al. 2015. Dbumedia-a large-scale, multilingual knowledge base extracted from wikipedia. Semantic web, 6(2):167-195.
+Farzaneh Mahdisoltani, Joanna Biega, and Fabian M Suchanek. 2013. Yago3: A knowledge base from multilingual wikipedias. In CIDR.
+Franco Manessi, Alessandro Rozza, and Mario Manzo. 2020. Dynamic graph convolutional networks. Pattern Recognition, 97:107000.
+Xin Mao, Wenting Wang, Huimin Xu, Man Lan, and Yuanbin Wu. 2020a. Mraea: an efficient and robust
+
+entity alignment approach for cross-lingual knowledge graph. In Proceedings of the 13th International Conference on Web Search and Data Mining, pages 420-428.
+Xin Mao, Wenting Wang, Huimin Xu, Yuanbin Wu, and Man Lan. 2020b. Relational reflection entity alignment. In Proceedings of the 29th ACM International Conference on Information & Knowledge Management, pages 1095-1104.
+Mojtaba Nayyeri, Chengjin Xu, Sahar Vahdati, Nadezhda Vassilyeva, Emanuel Sallinger, Hamed Shariat Yazdi, and Jens Lehmann. 2020. Fantastic knowledge graph embeddings and how to find the right space for them. In International Semantic Web Conference, pages 438-455. Springer.
+Mojtaba Nayyeri, Chengjin Xu, Yadollah Yaghoobzadeh, Sahar Vahdati, Mirza Mohtashim Alam, Hamed Shariat Yazdi, and Jens Lehmann. 2021. Loss-aware pattern inference: A correction on the wrongly claimed limitations of embedding models. In PAKDD (3), pages 77-89. Springer.
+Aldo Pareja, Giacomo Domeniconi, Jie Chen, Tengfei Ma, Toyotaro Suzumura, Hiroki Kanezashi, Tim Kaler, Tao Schardl, and Charles Leiserson. 2020. Evolvegcn: Evolving graph convolutional networks for dynamic graphs. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 5363-5370.
+Shichao Pei, Lu Yu, and Xiangliang Zhang. 2019. Improving cross-lingual entity alignment via optimal transport. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pages 3231-3237. International Joint Conferences on Artificial Intelligence Organization.
+Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne Van Den Berg, Ivan Titov, and Max Welling. 2018. Modeling relational data with graph convolutional networks. In European semantic web conference, pages 593-607. Springer.
+Samuel L Smith, David HP Turban, Steven Hamblin, and Nils Y Hammerla. 2017. Offline bilingual word vectors, orthogonal transformations and the inverted softmax. In ICLR.
+Fabian M Suchanek, Gjergji Kasneci, and Gerhard Weikum. 2007. Yago: a core of semantic knowledge. In Proceedings of the 16th international conference on World Wide Web, pages 697-706. ACM.
+Zequn Sun, Wei Hu, and Chengkai Li. 2017. Cross-lingual entity alignment via joint attribute-preserving embedding. In International Semantic Web Conference, pages 628-644. Springer.
+Zequn Sun, Wei Hu, Qingheng Zhang, and Yuzhong Qu. 2018. Bootstrapping entity alignment with knowledge graph embedding. In *IJCAI*, volume 18, pages 4396-4402.
+
+Zequn Sun, Qingheng Zhang, Wei Hu, Chengming Wang, Muhao Chen, Farahnaz Akrami, and Chengkai Li. 2020. A benchmarking study of embedding-based entity alignment for knowledge graphs. Proceedings of the VLDB Endowment, 13(11):2326-2340.
+Petar Velicković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. 2018. Graph attention networks. In ICLR.
+Quan Wang, Zhendong Mao, Bin Wang, and Li Guo. 2017. Knowledge graph embedding: A survey of approaches and applications. IEEE Transactions on Knowledge and Data Engineering, 29(12):2724-2743.
+Zhen Wang, Jianwen Zhang, Jianlin Feng, and Zheng Chen. 2014. Knowledge graph embedding by translating on hyperplanes. In AAAI, pages 1112-1119. CiteSeer.
+Zhichun Wang, Qingsong Lv, Xiaohan Lan, and Yu Zhang. 2018. Cross-lingual knowledge graph alignment via graph convolutional networks. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 349-357.
+Jiapeng Wu, Meng Cao, Jackie Chi Kit Cheung, and William L Hamilton. 2020. Temp: Temporal message passing for temporal knowledge graph completion. In EMNLP.
+Yuting Wu, Xiao Liu, Yansong Feng, Zheng Wang, Rui Yan, and Dongyan Zhao. 2019a. Relation-aware entity alignment for heterogeneous knowledge graphs. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pages 5278-5284.
+Yuting Wu, Xiao Liu, Yansong Feng, Zheng Wang, and Dongyan Zhao. 2019b. Jointly learning entity and relation representations for entity alignment. 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 240-249. Association for Computational Linguistics.
+Chengjin Xu, Yung-Yu Chen, Mojtaba Nayyeri, and Jens Lehmann. 2021. Temporal knowledge graph completion using a linear temporal regularizer and multivector embeddings. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2569-2578.
+Chengjin Xu, Mojtaba Nayyeri, Fouad Alkhoury, Hamed Shariat Yazdi, and Jens Lehmann. 2020a. TeRo: A time-aware knowledge graph embedding via temporal rotation. In Proceedings of the 28th International Conference on Computational Linguistics, pages 1583-1593, Barcelona, Spain (Online). International Committee on Computational Linguistics.
+
+Chengjin Xu, Mojtaba Nayyeri, Yung-Yu Chen, and Jens Lehmann. 2020b. Knowledge graph embeddings in geometric algebras. In Proceedings of the 28th International Conference on Computational Linguistics, pages 530-544, Barcelona, Spain (Online). International Committee on Computational Linguistics.
+Chenjin Xu, Mojtaba Nayyeri, Fouad Alkhoury, Hamed Yazdi, and Jens Lehmann. 2020c. Temporal knowledge graph completion based on time series gaussian embedding. In International Semantic Web Conference, pages 654-671. Springer.
+Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. 2015. Embedding entities and relations for learning and inference in knowledge bases. In ICLR.
+Hao Zhu, Ruobing Xie, Zhiyuan Liu, and Maosong Sun. 2017. Iterative entity alignment via joint knowledge embeddings. In *IJCAI*, volume 17, pages 4258-4264.
+
+# A Implementation Details
+
+As mentioned in Section 5.2, we use the source codes $^{45678}$ respective to baseline models for evaluation, except that we evaluate MTransE based on the implementation of OpenEA framework $^{9}$ .
+
+For all baseline models, we mostly follow their default optimal configurations regarding learning rates $lr$ , batch sizes $b$ , negative sampling rates $\eta$ , dropout rates $dr$ , numbers of GNN layers $L$ and mainly focus on the grid research of embedding dimensions $k$ and margins $\gamma$ (negative weights $\alpha$ for JAPE). We also follow the respective original papers to fix the numbers of multi-head attention mechanisms as 2 for MRAEA and set the balance weight $\beta = 0.9$ for GCN-Align. For all baseline models and our proposed models, we tune $k$ in the range of (25, 50, 75, 100), and $\gamma$ or $\alpha$ in the range of (0, 0.5, 1, 2, 3, 5, 7, 10, 15, 20). Specially, we use the same margin hyperparameters as the original paper for AlignE. To make a fair comparison, we use the same setup for our proposed model as MRAEA and RREA to fix $L = 2$ , $dr = 0.3$ , $b = |\mathcal{E}_1| + |\mathcal{E}_2|$ and $\eta = b//|S| + 1$ where // denotes the round-down after division, and also conduct the same grid research of embedding dimensions $k$ and margins $\gamma$ for TEA-GNN and TU-GNN as what we do for baseline models.
+
+All hyperparameters used for getting the results reported in Table 2 and 4 are listed in Table 5, 6, 7, 8 and 9. In our experiments, for MRAEA, RREA and our proposed models, the usage of the higher-dimensional embeddings would lead to out-of-memory problems since we only use a single mid-range GPU device for training and the learning of large-scale graph neural networks with numerous nodes and high-dimensional embeddings needs excessive memory footprint during the training process. It is predictable that we can possibly further boost the performances of TU-GNN and TEA-GNN on YAGOWIKI50K datasets by increasing their embedding dimensions with more high-performance GPU devices.
+
+The source codes and datasets used in this work are submitted as the supplementary materials for reproducibility and will be released on Github after the anonymity period.
+
+| Models | k | lr | b | η | γ (or α) | dr |
| MTransE | 100 | 0.01 | 20,000 | 10 | 10 | - |
| JAPE | 100 | 0.01 | 10,000 | 1 | 2 | - |
| AlignE | 100 | 0.01 | 20,000 | 10 | 0.01,2,0.7 | - |
| GCN-Align | 100 | 20 | - | 5 | 3 | 0 |
| MRAEA | 100 | 0.001 | 19,054 | 20 | 1 | 0.3 |
| RREA | 100 | 0.005 | 19,054 | 20 | 3 | 0.3 |
| TU-GNN | 100 | 0.005 | 19,054 | 20 | 3 | 0.3 |
| TEA-GNN | 100 | 0.005 | 19,054 | 20 | 1 | 0.3 |
+
+Table 5: Hyperparameters of target models for DICEWS-1K.
+
+| Models | k | lr | b | η | γ (or α) | dr |
| MTransE | 100 | 0.01 | 20,000 | 10 | 7 | - |
| JAPE | 100 | 0.01 | 10,000 | 1 | 3 | - |
| AlignE | 100 | 0.01 | 20,000 | 10 | 0.01,2,0.7 | - |
| GCN-Align | 100 | 20 | - | 5 | 7 | 0 |
| MRAEA | 100 | 0.001 | 19,054 | 96 | 2 | 0.3 |
| RREA | 100 | 0.005 | 19,054 | 96 | 2 | 0.3 |
| TU-GNN | 100 | 0.005 | 19,054 | 96 | 5 | 0.3 |
| TEA-GNN | 100 | 0.005 | 19,054 | 96 | 3 | 0.3 |
+
+Table 6: Hyperparameters of target models for DICEWS-200.
+
+| Models | k | lr | b | η | γ (or α) | dr |
| MTransE | 100 | 0.01 | 20,000 | 10 | 10 | - |
| JAPE | 100 | 0.01 | 10,000 | 1 | 3 | - |
| AlignE | 100 | 0.01 | 20,000 | 10 | 0.01,2,0.7 | - |
| GCN-Align | 100 | 20 | - | 5 | 3 | 0 |
| MRAEA | 75 | 0.001 | 98,851 | 20 | 1 | 0.3 |
| RREA | 50 | 0.005 | 98,851 | 20 | 1 | 0.3 |
| TU-GNN | 25 | 0.005 | 98,851 | 20 | 1 | 0.3 |
| TEA-GNN | 25 | 0.005 | 98,851 | 20 | 1 | 0.3 |
+
+Table 7: Hyperparameters of target models for YAGO-WIKI50K-5K.
+
+| Models | k | lr | b | η | γ (or α) | dr |
| MTransE | 100 | 0.01 | 20,000 | 10 | 1 | - |
| JAPE | 100 | 0.01 | 10,000 | 1 | 2 | - |
| AlignE | 100 | 0.01 | 20,000 | 10 | 0.01,2,0.7 | - |
| GCN-Align | 100 | 20 | - | 5 | 10 | 0 |
| MRAEA | 75 | 0.001 | 98,851 | 99 | 2 | 0.3 |
| RREA | 50 | 0.005 | 98,851 | 99 | 1 | 0.3 |
| TU-GNN | 25 | 0.005 | 98,851 | 99 | 1 | 0.3 |
| TEA-GNN | 25 | 0.005 | 98,851 | 99 | 1 | 0.3 |
+
+Table 8: Hyperparameters of target models for YAGO-WIKI50K-1K.
+
+| Models | k | lr | b | η | γ (or α) | dr |
| TU-GNN | 100 | 0.005 | 39,422 | 99 | 3 | 0.3 |
| TEA-GNN | 100 | 0.005 | 39,422 | 99 | 3 | 0.3 |
+
+Table 9: Hyperparameters of target models for YAGO-WIKI20K.
\ No newline at end of file
diff --git a/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/images.zip b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..ad38fa1101df6097e075fdeb287f90f762597ad2
--- /dev/null
+++ b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ab019fee61226f2bbd9e644ea81afd6a5eef1e87f80a86373c0c2cf0cec7dc41
+size 620136
diff --git a/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/layout.json b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..c6260ae48ebe73ea904b782eff50691b2851dafd
--- /dev/null
+++ b/timeawaregraphneuralnetworkforentityalignmentbetweentemporalknowledgegraphs/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0fc76d3b578e2ae25a38a54e1c7f20e899568766292f9cd2382edab25043ac80
+size 499371
diff --git a/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/221a3ec4-32ce-4a0f-a466-cef70744f642_content_list.json b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/221a3ec4-32ce-4a0f-a466-cef70744f642_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..4f3d39555f1d06175b14601837338d39c0f6429e
--- /dev/null
+++ b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/221a3ec4-32ce-4a0f-a466-cef70744f642_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b65c8960b23615c3e9eb40e82f4dcc79f01edcfe17c9095bdf26ec1fe53251a2
+size 98311
diff --git a/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/221a3ec4-32ce-4a0f-a466-cef70744f642_model.json b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/221a3ec4-32ce-4a0f-a466-cef70744f642_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..db6dc44dce85950cdfe59b85274ac34ab60ac80a
--- /dev/null
+++ b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/221a3ec4-32ce-4a0f-a466-cef70744f642_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f81178aa826e5b0aeda4e690de72311bb92267095fd0ae657f90cc4ec4b7d92a
+size 113041
diff --git a/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/221a3ec4-32ce-4a0f-a466-cef70744f642_origin.pdf b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/221a3ec4-32ce-4a0f-a466-cef70744f642_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..36637a9644eaf9675d2d711e4a924ebe4a75aeea
--- /dev/null
+++ b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/221a3ec4-32ce-4a0f-a466-cef70744f642_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c5c71de9411b4ef35ed767f62ea1f0635a024a9c954f4d9024658105404c79ff
+size 815028
diff --git a/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/full.md b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..da7325aac00b138728020d2cc3218780c694a1ef
--- /dev/null
+++ b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/full.md
@@ -0,0 +1,289 @@
+# Time-dependent Entity Embedding is not All You Need: A Re-evaluation of Temporal Knowledge Graph Completion Models under a Unified Framework
+
+Zhen Han $^{1,2}$ , Gengyuan Zhang $^{1}$ , Yunpu Ma $^{\dagger 1}$ , Volker Tresp $^{\dagger 1,2}$
+
+$^{1}$ Institute of Informatics, LMU Munich $^{2}$ Corporate Technology, Siemens AG
+
+zhen.han@campus.lmu.de, gengyuanmax@gmail.com
+
+cognitive.yunpu@gmail.com, volker.tresp@siemens.com
+
+# Abstract
+
+Various temporal knowledge graph (KG) completion models have been proposed in the recent literature. The models usually contain two parts, a temporal embedding layer and a score function derived from existing static KG modeling approaches. Since the approaches differ along several dimensions, including different score functions and training strategies, the individual contributions of different temporal embedding techniques to model performance are not always clear. In this work, we systematically study six temporal embedding approaches and empirically quantify their performance across a wide range of configurations with about 4000 experiments and 19000 GPU hours. We classify the temporal embeddings into two classes: (1) timestamp embeddings and (2) time-dependent entity embeddings. Despite the common belief that the latter is more expressive, an extensive experimental study shows that timestamp embeddings can achieve on-par or even better performance with significantly fewer parameters. Moreover, we find that when trained appropriately, the relative performance differences between various temporal embeddings often shrink and sometimes even reverse when compared to prior results. For example, TTransE (Leblay and Chekol, 2018), one of the first temporal KG models, can outperform more recent architectures on ICEWS datasets. To foster further research, we provide the first unified open-source framework for temporal KG completion models with full composability, where temporal embeddings, score functions, loss functions, regularizers, and the explicit modeling of reciprocal relations can be combined arbitrarily.
+
+# 1 Introduction
+
+The Knowledge Graph (KG), a graph-structured knowledge base, has gained increasing interest as
+
+a promising way to store factual knowledge. KGs represent facts in the form of triples $(s, r, o)$ , e.g., (Bob, livesIn, New York), in which $s$ (subject) and $o$ (object) denote nodes (entities) and $r$ denotes the edge type (relation) between $s$ and $o$ . Knowledge graphs are commonly static and store facts in their current state. In reality, however, the relations between entities often change over time. For example, if Bob moves to California, the triple of (Bob, livesIn, New York) will be invalid. To this end, temporal knowledge graphs (tKGs) have been introduced to capture temporal aspects of facts in addition to their multi-relational nature. A tKG represents a temporal fact as a quadruple $(s, r, o, t)$ by extending a static triple with time $t$ , describing that this fact is valid at time $t$ . Figure 2 in the appendix depicts an exemplary temporal KG. To address the inherent incompleteness of temporal KGs, Tresp et al. (2015) proposed the first tKG model. Afterwards, a line of work emerged that extends static KG completion models by adding temporal embeddings, e.g., TTransE (Leblay and Chekol, 2018), TA-TransE (García-Durán et al., 2018), DE-SimpleE (Goel et al., 2019), TNTComplEx (Lacroix et al., 2020), ConT (Ma et al., 2018), and many more. The models generally consist of two parts, a temporal embedding layer to capture the evolving features of tKGs and a score function to examine the plausibility of a given quadruple.
+
+Temporal embeddings are crucial in temporal KG completion models for storing the evolving knowledge; without them, the temporal aspect cannot be captured. The PEs can be generally categorized into three classes: (1) timestamp embeddings (TEs): the models learn an embedding for each discrete timestamp in the same vector space as entities and relations (Tresp et al., 2017; Leblay and Chekol, 2018; Dasgupta et al., 2018; Lacroix et al., 2020). (2) time-dependent entity embeddings (TEEs): the models define entity embedding as a function that takes an entity and a timestamp as
+
+input and generates a time-dependent representation for the entity at that time (Goel et al., 2019; Xu et al., 2019; Han et al., 2020a). (3) deep representation learning (DTRs): the models incorporate temporal information into advanced deep learning models, e.g., Recurrent Neural Network and Graph Neural Network, to learn time-aware representations of entities and relations (García-Durán et al., 2018). In many cases, the introduction of new temporal embedding approaches went along with new score functions and new training methods (regularization, the explicit modeling of reciprocal relations, etc.). Ablation studies were provided, but not investigated thoroughly. Besides, some temporal embedding papers introduced new datasets. They commonly tune model architecture and hyperparameters of old temporal embedding approaches on new datasets using grid search on a small grid involving hand-crafted parameter ranges or settings known to work well from prior studies. A grid suitable for one dataset may be suboptimal for another, however. It is often difficult to attribute the incremental improvements in performance reported with each new state-of-the-art (SOTA) model to the proposed temporal embeddings or other components.
+
+In this work, we investigate the significance of previously reported temporal embeddings with several thousands of experiments and 19000 GPU hours. First, we aim to study which temporal embedding approach can generally outperform other temporal embedding approaches regardless of different score functions and different datasets. We choose one representative from bilinear score functions, i.e., Simple (Kazemi and Poole, 2018), and one from translation-based score functions, i.e., TransE (Bordes et al., 2013). Then we benchmark six temporal embedding approaches on two subsets of ICEWS (Boschee et al., 2015) and a subset of GDELT(Leetaru and Schrodt, 2013) with the two representative score functions through an extensive set of experiments. Second, we performed an extensive benchmark study on well-known temporal KG completion models using popular model architectures and training strategies in a unified experimental setup. Following the work (Ruffinelli et al., 2020), we considered many training strategies as well as a large hyperparameter space, and we performed model selection using a quasi-random search followed by Bayesian optimization, which has been shown to be able to find good model configurations with relatively low
+
+effort.
+
+Regarding the first aim, we surprisingly find that the TE proposed by Leblay and Chekol (2018) outperforms other temporal embedding approaches on the ICEWS subsets and achieves on-par results on GDELT. Leblay and Chekol (2018) represent timestamps in the same vector space as entities and relations and learn embeddings for each discrete timestamp. While achieving better results, the TE models only require about half of the model parameters as much of TEEs. However, the common belief is that the TEEs are more expressive and can better capture the evolving knowledge. Recall that models with TEEs learn an embedding function for each entity that takes time as input and provides an entity representation as output. In particular, it has been proven that TEEs are fully expressive for tKG completion in combination with certain score functions (Goel et al., 2019), and thus, they should perform better than TEs, which is in contrast to our findings. We argue that the sparsity of temporal KG data may cause the undesirable empirical performance of TEEs. Every entity has the same dimensionality of time-dependent embeddings, but the majority of entities are only involved in a small number of quadruples. As a result, the TEEs may suffer from the overfitting problem. To verify our assumption, we learn a unique temporal embedding function for all entities instead of learning entity-specific embedding functions. We refer to it as UTEE. Empirical study shows that the UTEE achieves similar or even better results than all other TEEs variants, emphasizing the overfitting problem of TEEs.
+
+Besides, we empirically find that the performance of a fine-tuned baseline can by far exceed the performance observed in all previous studies. For example, T-TransE (Leblay and Chekol, 2018), one of the first temporal KG completion models, achieves superior performance metric in our study that is more than doubled to that reported in recent papers (García-Durán et al., 2018; Goel et al., 2019; Lacroix et al., 2020; Xu et al., 2019). Thus, it is competitive to or even outperforms current SOTA models such as DE-SimplE (Goel et al., 2019) and TComplEx (Lacroix et al., 2020). This suggests that training strategies significantly affect the performance of temporal KG models and are responsible for a substantial fraction of the progress made in recent years. Thus, to fairly compare the effectiveness of different temporal KG models, it is nec
+
+essary to evaluate them on a unified framework. To this end, our study realizes the first fair benchmarking by investigating the interplay between temporal KG interaction models, loss functions, regularization methods, the use of reciprocal relations, and other training techniques in a unified open-source framework1. To ensure the composability of the framework, the temporal embedding layer, score functions, and various training strategies are implemented as independent submodules. Thus, one can easily assess the individual benefit of a novel temporal embedding approach via our framework. Additionally, we perform an extensive experimental study in which well-known temporal KG models are fine-tuned by popular training strategies and a wide range of hyperparameter settings. The reported results can be directly used for comparison in future work.
+
+# 2 Preliminaries and Related Work
+
+# 2.1 Temporal Knowledge Graph Completion
+
+Temporal knowledge graphs (tKGs) are multirelational, directed graphs with labeled times-tamped edges between entities. Let $\mathcal{E}$ , $\mathcal{R}$ , and $\mathcal{T}$ represent a finite set of entities, relations, and times-tamps, respectively. Each fact can be denoted by a quadruple $q = (e_s, r, e_o, t)$ , representing a times-tamped and labeled edge between a subject entity $e_s \in \mathcal{E}$ and an object entity $e_o \in \mathcal{E}$ regarding a relation $r \in \mathcal{R}$ at a timestamp $t \in \mathcal{T}$ . Let $\mathcal{F}$ represents the set of all quadruples that are facts, i.e., real events in the world, the tKG completion (tKGC) is the problem of inferring $\mathcal{F}$ based on a set of observed facts $\mathcal{O}$ , which is a subset of $\mathcal{F}$ . Specifically, the task of tKGC is to predict either a missing subject entity $(?, r, e_o, t)$ given the other three components or a missing object entity $(e_s, r,?, t)$ .
+
+Our study focuses solely on temporal knowledge graph embedding models for the completion task, which do not exploit temporal knowledge graph embedding models for the forecasting task (Trivedi et al., 2017; Han et al., 2020b, 2021).
+
+# 2.2 Temporal KG Embedding Models
+
+A tKG embedding (tKGE) model embeds each entity $e \in \mathcal{E}$ and relation $r \in \mathcal{R}$ in a vector space. To capture temporal aspects, each model either embeds discrete timestamps into a vector space or learns time-dependent representations for each entity. Besides, each model has a score function
+
+that takes the temporal information and the embeddings of the subject, relation, and object as the input and computes a score for each potential quadruple. The higher the quadruple score, the more plausible it is considered to be true by the model. Taking the object prediction as an example, we consider all entities in $\mathcal{E}$ and learn a score function $\phi (e_s,r,e_o,t) = f(\mathbf{e}_s(t),\mathbf{r},\mathbf{e}_o(t))$ , for models with TEEs and $\phi (e_s,r,e_o,t) = f(\mathbf{e}_s,\mathbf{r},\mathbf{e}_o,\mathbf{t})$ for models with TEs. The bold symbols denote the embeddings of the corresponding entities, relation, and time.
+
+# 2.2.1 Temporal Embeddings
+
+tKGE models differ in their temporal embeddings and score functions. Temporal embedding approaches come in three categories: timestamp embeddings (TEs), where the models learn a representation for each discrete timestamp; time-dependent entity embeddings (TEEs), where an entity embedding function takes time and an entity as inputs and provides a hidden representation as output; and deep temporal representations (DTRs), where the models incorporate time information into deep learning frameworks.
+
+The best known TE is the vanilla TE (abbreviated to T by its authors) proposed by Leblay and Chekol (2018) where each timestamp is mapped in the same vector space as entities and relations. Later, Lacroix et al. (2020) introduced a new regularization scheme to smooth the representation of neighboring timestamps. Another well-known TE is HyTE (Dasgupta et al., 2018), which associates each timestamp with a corresponding hyperplane and projects the embeddings of entities and relations onto timestamp-specific hyperplanes to incorporate temporal information in entity embeddings:
+
+$$
+\mathbf {e} _ {i} (t) = \mathbf {e} _ {i} \perp \boldsymbol {\omega} _ {t} = \mathbf {e} _ {i} - (\boldsymbol {\omega} _ {t} ^ {T} \mathbf {e} _ {i}) \boldsymbol {\omega} _ {t}.
+$$
+
+$\mathbf{e}_i$ represents the global embedding of entity $e_i$ , $\perp$ represents the projection operator, and $\omega_{t}$ represents the normal vector of the hyperplane associated with timestamp $t$ .
+
+A well-known variants of TEEs is the diachronic entity embeddings (DE) proposed by Goel et al. (2019) that defines the temporal embeddings of entity $e_i$ at timestamp $t$ as
+
+$$
+\mathbf {e} _ {i} ^ {D E} (t) [ n ] = \left\{ \begin{array}{l} \mathbf {a} _ {e _ {i}} [ n ] \quad \text {i f} 1 \leq n \leq \gamma d, \\ \mathbf {a} _ {e _ {i}} [ n ] \sin (\boldsymbol {\omega} _ {e _ {i}} [ n ] t + \mathbf {b} _ {e _ {i}} [ n ]) \text {e l s e}. \end{array} \right.
+$$
+
+$\mathbf{e}_i^{DE}(t)[n]$ denotes the $n^{th}$ element of the embeddings of entity $e_i$ at time $t$ . $\mathbf{a}_{e_i}, \boldsymbol{\omega}_{e_i}, \mathbf{b}_{e_i}$ are entity-specific vectors with learnable parameters. The first $\gamma d$ elements of the vector in Equation 1 capture static features, and the other $(1 - \gamma)d$ elements capture temporal features. ATiSE (Xu et al., 2019) is another popular TEE that adds time information into entity/relation representations by using additive time series decomposition, where the entity representation is defined as
+
+$$
+\begin{array}{l} \mathbf {e} _ {i} ^ {A T i S E} (t) = \mathbf {e} _ {i} + \alpha_ {e _ {i}} \mathbf {w} _ {e _ {i}} t \tag {2} \\ + \boldsymbol {\beta} _ {e _ {i}} \sin (2 \pi \boldsymbol {\omega} _ {e _ {i}} t) + \mathcal {N} (0, \boldsymbol {\Sigma} _ {e _ {i}}). \\ \end{array}
+$$
+
+The term $\mathbf{e}_i + \alpha_{e_i}\pmb{\omega}_{e_i}t$ is the trend component where the coefficient denotes the evolutionary rates, and the vector $\omega_{e_i}$ represents the corresponding evolutionary direction. $\beta_{e_i}\sin (2\pi \omega_{e_i}t)$ is the corresponding seasonal component, and the Gaussian noise term $\mathcal{N}(0,\Sigma_{e_i})$ denotes the random component. In principle, other temporal embedding approaches can also be converted into a probabilistic approach by adding Gaussian noise. Thus, to fairly compare with other temporal embeddings and simplify our study, we do not take the noise term into account. The representation of relations in ATiSE is also time-dependent and defined similarly to the entity representation.
+
+A representative of DTRs is the TA-approach (García-Durán et al., 2018) that utilizes recurrent neural networks to learn time-aware representations of relations. Specifically, the relation representation is obtained by $\mathbf{r}^{TA}(t) = LSTM(r,t)$ , where the timestamp (date) $t$ is tokenized into digits (year, month, and day). The sequence of temporal tokens and the relation $r$ is used as input to the LSTM. In addition to the five PEs mentioned above, we propose a new TEE where we learn a unique temporal embedding function for all entities to investigate the overfitting problem of DE. We refer to it as UTEE, which is defined as follows:
+
+$$
+\mathbf {e} _ {i} ^ {U T E E} (t) [ n ] = \left\{ \begin{array}{l} \mathbf {a} [ n ] \quad \text {i f 1 \leq n \leq \gamma d}, \\ \mathbf {a} [ n ] \sin (\omega [ n ] t + \mathbf {b} [ n ]) \text {e l s e}. \end{array} \right.
+$$
+
+where the amplitude vector $\mathbf{a}$ , frequency vector $\omega$ , and bias $\mathbf{b}$ are identical for all entities.
+
+# 2.2.2 Score Functions
+
+A large number of score functions have been developed for the KG completion task. A class of these models is the translation-based approaches corresponding to variations of TransE (Bordes et al.,
+
+2013; Wang et al., 2014; Nguyen et al., 2016) that models relations as a translation of subject to object embeddings, i.e., $s^{TransE}(e_s,r,e_o) = -||\mathbf{e}_s + \mathbf{r} - \mathbf{e}_o||_2$ . Another line of work is bilinear score functions (Nickel et al., 2011; Yang et al., 2014; Trouillon et al., 2016; Kazemi and Poole, 2018) that define product-based functions over embeddings, i.e., $s^{RESCAL}(e_s,r,e_o) = \mathbf{e}_s^T\mathbf{R}\mathbf{e}_o$ , where relation matrix $\mathbf{R} \in \mathbb{R}^{d\times d}$ contain weights $r_{i,j}$ that capture the interaction between the $i$ -th latent factor of $\mathbf{e}_s$ and the $j$ -th latent factor of $\mathbf{e}_o$ . Among the bilinear models, SimplE (Kazemi and Poole, 2018) a simple yet fully expressive model that represents each entity $e_i \in \mathcal{E}$ by two vectors $\mathbf{e}_{i,s}$ and $\mathbf{e}_{i,o}$ . Depending on whether $e_i$ participates in a triple as the subject or object entity, either $\mathbf{e}_{i,s}$ or $\mathbf{e}_{i,o}$ is used. To address the independence of the two vectors for each entity, SimplE takes advantage of reciprocal relations and uses $\frac{1}{2} (\langle \mathbf{e}_{i,s},\mathbf{r},\mathbf{e}_{j,o}\rangle +\langle \mathbf{e}_{j,s},\mathbf{r}^{-1},\mathbf{e}_{i,o}\rangle)$ as the score of $(e_i,r,e_j)$ , where $r^{-1}$ is the reciprocal relation of $r$ .
+
+In the rest of the paper, we examine the above six temporal embeddings in terms of the two representative score functions (TransE and SimpleE) on two benchmark tKG datasets. We refer to a specific combination of temporal embedding approach and score function as an interaction model.
+
+# 2.3 Reciprocal Relations
+
+Lacroix et al. (2018) and Dettmers et al. (2018) introduced the use of reciprocal relation for training knowledge graph embeddings. For every quadruple $(e_s, r, e_o, t)$ in the dataset, we add $(e_o, r^{-1}, e_s, t)$ , where $r^{-1}$ denotes the reciprocal relation of $r$ . The idea of reciprocal relations is to use separate scoring functions for object prediction and subject prediction. Reciprocal relations can help translation-based approaches model symmetric patterns and help bilinear approaches model anti-symmetric and inverse patterns (Kazemi and Poole, 2018).
+
+# 2.4 Related Work
+
+Previous benchmarking studies (Kadlec et al., 2017; Akrami et al., 2020; Rossi et al., 2021) only focus on static knowledge graph models. For example, Ruffinelli et al. (2020) and Ali et al. (2020) realize a fair benchmarking by re-implementing static KGE models and performing an extensive empirical study with a massive search space. However, they do not take temporal knowledge graph models into account. To this end, we provide a unified framework that covers relevant tKGE mod
+
+els and investigate the influence of temporal embeddings on model performance as well as other components. To the best of our knowledge, this is the first benchmarking study for tKGE models.
+
+# 3 Experimental Study
+
+In this section, we first introduce the design of our unified framework that enables us to evaluate a large set of different combinations of interaction models, loss functions, regularization methods, the usage of explicitly modeling reciprocal relations and position-aware entity embeddings. Then we split our experimental study into two parts. In the first part, we examine six temporal embedding methods combined with two representative score functions by performing an extensive set of experiments using advanced training strategies and a wide range of hyperparameter settings via the unified framework. In the second part, we re-evaluate various well-known tKG models from prior studies. We provide evidence that several old tKG models can obtain results competitive to or even better than the SOTA when configured carefully. We present the best configuration of each model and report its best performance on each benchmark that future research can directly use for comparison.
+
+# 3.1 Composable Unified Framework
+
+In the proposed framework, a tKGE model is considered as a composition of six modules that can flexibly be combined: a temporal embedding layer, a static embedding layer, a score function, a loss function, a regularization method, and the usage of reciprocal relations. In particular, the framework can automatically optimize the embedding method: the temporal embeddings can be either combined with entity embeddings or relation embeddings or both; there are different ways to combine static embeddings and temporal embeddings, i.e., addition, concatenation and element-wise multiplication. The framework supports six temporal embedding approaches as introduced in Section 2.2.1, seven score functions, i.e., TransE(Bordes et al., 2013), SimpleE(Kazemi and Poole, 2018), DistMult(Yang et al., 2014), three loss functions (MR, CE, and BCE), four regularization methods (L1/L2/L3-norm, and dropout), and two initialization methods (Xavier uniform and Xavier normal). For interaction models with TEs, a smoothness regularization for timestamp embeddings is applied, enforcing neighboring timestamps to have close
+
+representations (Lacroix et al., 2020). Additionally, Kazemi and Poole (2018) distinguished an entity between as a head or as a tail entity and learns two embeddings for each entity, which we term position-aware entity embedding and extend to all interaction models. Position-aware entity embeddings can enhance the model's expressiveness. For example, it can help Distmult (Yang et al., 2014) to model anti-symmetric relations: without it, all relations are enforced to be symmetric since $\langle h,r,t,\tau \rangle$ and $\langle t,r,h,\tau \rangle$ share the same score regardless of properties of $r$ .
+
+# 3.2 Experimental Setup
+
+Datasets Integrated Crisis Early Warning System (ICEWS) (Boschee et al., 2015) dataset has established itself in the research community as representative samples of tKGs and has been widely applied in recent tKG studies. The ICEWS dataset contains information about political events with specific time annotations, e.g. (Barack Obama, visit, India, 2010-11-06). We apply our model on two subsets of the ICEWS dataset: ICEWS14 contains events in 2014, and ICEWS11-14 corresponds to the facts between 2011 to 2014. Besides, we also used a subset of the Global Database of Events, Language, and Tone (GDELT) (Leetaru and Schrodt, 2013) dataset as a benchmark. To make the extensive configuration search feasible, we extracted a subset named GDELT-m10 consisting of factual events in October, 2015. The statistics and further details are provided in Appendix C.
+
+Hyperparameters We used a large hyperparameter search space to ensure that suitable hyperparameters for each model can be covered. We consider seven embedding dimensions \{64, 100, 128, 256, 512, 1024, 2048\}. The learning rate can be randomly selected from $[0, 0.1]$ . We use separate weights for regularization of embeddings of entities, relations, and timestamps. A detailed report of the search space is provided in Appendix B.
+
+Interaction models In the first part, we evaluate six temporal embedding methods combined with two representative score functions. The formulas of these twelve interaction models are listed in Table 1. Additionally, we select DE-SimplE/TransE(Goel et al., 2019), TNTComplEx(Lacroix et al., 2020), ATiSE(Xu et al., 2019), TTransE(Leblay and Chekol, 2018), TA-TransE (García-Durán et al.,
+
+Table 1: Formulas of a given quadruple $(e_i, r, e_j, t)$ . $\mathbf{e}_{i,s}$ denotes the embedding of $e_i$ when the entity is the subject while $\mathbf{e}_{i,o}$ denotes the embedding of $e_i$ when the entity is the object. In comparison, $\mathbf{e}_i$ represents the shared embedding of entity $e_i$ for both subject and object. $\mathbf{t}$ , $\mathbf{r}$ represent the embedding of timestamp $t$ and relation $r$ , respectively. $\perp$ represents the projection operator. $\mathbf{e}_i(t)$ denotes the temporal embedding of $e_i$ at $t$ .
+
+| Temporal Embeddings | TransE | SimplE |
| T | ||ei+r+t-aj|| | 1/2((ei,s,r,t,ej,o)+<ej,s,r-1,t, ei,o>) |
| DE | ||eiDE(t)+r-ajDE(t)|| | 1/2((eiDE(t),r,ejDE(t))+<ejDE(t),r-1,ejDE(t)) |
| UTEE | ||eUTEE(t)+r-ajUTEE(t)|| | 1/2((eUTEE(t),r,ejUTEE(t))+<ejUTEE(t),r-1,eUTEE(t)) |
| HyTE | ||ei⊥ωt+r⊥ωt-aj⊥ωt|| | 1/2((ei,s⊥ωt,r⊥ωt,ej,o⊥ωt)+<ej,s⊥ωt,r⊥ωt, ei,o⊥ωt) |
| ATiSE | ||eiATiSE(t)+rATiSE(t)-ejATiSE(t)|| | 1/2((eiATiSE(t),rATiSE(t),ejATiSE(t))+<ejATiSE(t),r-1,ATiSE(t),ejATiSE(t)) |
| TA | ||ei+rTA(t)-ej|| | 1/2((ei,s,rTA(t),ej,o)+<ej,s,r-1,TA(t), ei,o)) |
+
+2018), and HyTE (Dasgupta et al., 2018) for the second part of our study, which are the most famous tKGE models.
+
+Evaluation All models are evaluated on link prediction task. For each test quadruple $(s, r, o, t)$ , we create a subject prediction query $(?, r, o, t)$ and an object prediction query $(s, r, ?, t)$ . Taking the object prediction as an example, all entities $e_i \in \mathcal{E}$ are ranked according to the score $s(s, r, e_i, t)$ . We filter from the candidate list all the entities but the ground truth that form a valid quadruple with $s, r$ and $t$ , i.e., the quadruple occurs either in the training, validation, or test data. We report filtered Mean Reciprocal Ranks (MRR) and Hits@1, 3, 10 averaged over subject prediction and object prediction. For detailed definitions please see Appendix A.
+
+Computational resources and model selection. We perform large-scale benchmarking with about 4000 experiments and 19000 GPU hours of computation time. All experiments are run on NVIDIA Tesla T4. For each dataset and interaction model, we first randomly generate 40 different configurations from the search space using the Ax framework2. After the random hyperparameter search, we search 60 new configurations based on Bayesian optimization to tune the numerical hyperparameters further. Each trial runs for 100 epochs, and an early stopping strategy with a patience of 30 epochs is employed. We select the best-performing configuration according to filtered MRR on validation data. The best configuration will be further trained until its convergence.
+
+# 3.3 Examining Temporal Embeddings
+
+Performance in prior studies vs. in our study. Table 3 shows the filtered MRR and filtered
+
+Table 2: Selected hyperparameters of best performing configurations of selected tKG models on ICEWS14. A full description of hyperparameters are reported in Table 12 in the appendix.
+
+ | TTransE | T-SimpleE | DE-TransE | DE-SimpleE |
| Emb. size | 512 | 256 | 256 | 128 |
| lr. | 7e-3 | 9e-3 | 2e-3 | 4e-3 |
| loss | CE | CE | CE | BCE |
| Reciprocal | Yes | Yes | Yes | Yes |
| Position-aware ent. emb. | Yes | Yes | Yes | Yes |
+
+Hits@1/3/10 on test data of various temporal embeddings on ICEWS14 and ICEWS11-14 datasets. We found that the relative performance differences between various temporal embeddings often shrink and sometimes even reverse compared to published results. For example, T-TransE was first run on ICEWS14 by (García-Durán et al., 2018), achieving a filtered MRR of $25.5\%$ . This number is relatively low compared to today's standards. In comparison, T-TransE achieves a superior MRR of $55.3\%$ in our study, which has been improved significantly. Studies that report the lower performance number of T-TransE (i.e., $25.5\%$ ) thus do not fairly compare the temporal embedding approaches. Similar remarks hold for DE-TransE and HyTE-TransE. (Goel et al., 2019) proposed DE-TransE and report an MRR of $32.6\%$ on ICEWS14 while it achieves an MRR of $50.8\%$ in our study. Similarly, the achieved MRR of HyTE-TransE on ICEWS14 is $42.9\%$ in our study, which significantly improves the reported results $(29.7\%)$ in previous studies (Goel et al., 2019; Sadeghian et al., 2021). The results suggest that the performance of old temporal embedding approaches can be largely improved by advanced training strategies and hyperparameter-tuning, which may account for a large fraction of the progress made in recent years. Figure 1 shows the distribution of
+
+Table 3: Link prediction results of six temporal embedding approaches with two representative score functions on ICEWS datasets: MRR (%) and Hits@1/3/10 (%) The best results in group are in bold.
+
+| Dataset | ICEWS14 | ICEWS11-14 | |
| Score function | TransE | SimpleE | TransE | SimpleE | |
| Temporal Embeddings | MRR | Hits@1 | Hits@3 | Hits@10 | MRR | Hits@1 | Hits@3 | Hits@10 | MRR | Hits@1 | Hits@3 | Hits@10 | MRR | Hits@1 | Hits@3 | Hits@10 |
| T | 55.3 | 43.7 | 62.7 | 76.5 | 53.9 | 43.9 | 59.4 | 73.0 | 57.8 | 46.0 | 65.5 | 79.5 | 60.2 | 51.3 | 65.2 | 75.5 |
| DE | 50.8 | 38.7 | 59.0 | 72.4 | 53.9 | 42.5 | 61.2 | 74.6 | 54.1 | 42.1 | 60.9 | 77.1 | 54.2 | 42.3 | 61.0 | 67.8 |
| UTEE | 52.6 | 40.5 | 60.3 | 74.7 | 53.7 | 42.5 | 60.8 | 74.8 | 55.2 | 43.0 | 63.3 | 77.5 | 56.1 | 45.2 | 62.9 | 76.4 |
| HyTE | 47.9 | 35.8 | 54.1 | 71.8 | 52.3 | 41.9 | 58.9 | 71.4 | 48.2 | 36.3 | 54.1 | 72.0 | 54.9 | 43.1 | 61.7 | 77.4 |
| ATiSE | 47.1 | 34.7 | 53.8 | 71.2 | 46.6 | 34.7 | 53.4 | 69.7 | 51.0 | 38.8 | 57.7 | 74.5 | 49.3 | 37.5 | 56.1 | 72.2 |
| TA | 22.3 | 14.4 | 25.0 | 37.5 | 37.1 | 25.3 | 42.2 | 61.4 | 26.3 | 18.3 | 28.6 | 43.0 | 33.4 | 24.0 | 37.6 | 51.2 |
+
+Table 4: Link prediction results of six temporal embedding approaches with two representative score functions on the GDELT-m10 dataset: MRR (%) and Hits@1/3/10 (%). The best results in group are in bold.
+
+| Dataset | GDELT-m10 |
| Score function | TransE | Simple |
| Temporal Embeddings | MRR | Hits@1 | Hits@3 | Hits@10 | MRR | Hits@1 | Hits@3 | Hits@10 |
| T | 31.6 | 22.7 | 34.0 | 48.9 | 30.8 | 21.6 | 33.5 | 48.8 |
| DE | 25.9 | 17.1 | 28.1 | 43.0 | 34.4 | 24.9 | 37.5 | 53.0 |
| UTEE | 26.1 | 16.9 | 28.3 | 44.1 | 28.5 | 18.9 | 30.9 | 47.4 |
| HyTE | 30.8 | 21.9 | 33.2 | 48.3 | 27.4 | 17.8 | 29.9 | 46.9 |
| ATISE | 25.3 | 16.7 | 27.3 | 42.1 | 29.6 | 20.6 | 32.2 | 47.3 |
| TA | 11.6 | 1.0 | 16.1 | 29.8 | 19.9 | 12.4 | 21.1 | 34.3 |
+
+filtered MRR for each model on ICEWS14. Each distribution consists of 100 different hyperparameter configurations. We can see that some models show a wide dispersion, and only very few configurations achieve good results. Generally, the impact of the hyperparameter choice is more pronounced on TransE-based models (higher variance) than on SimpleE-based models. The hyperparameters of the best performing models are reported in Table 2 (selected hyperparameters) and Table 12 in the appendix (all parameters). Perhaps unsurprisingly, we find that the optimum choice of hyperparameters is often model- and dataset-dependent. Thus, a grid search on a small search space is not suitable to compare model performance because the result may be considerably affected by the specific grid points being used. Besides, we find that the use of reciprocal relations (RR) and position-aware entity embeddings (PEE) often improve model performance. To investigate their impacts, we conduct ablation studies where we do not use RR (or PEE) and keep other hyperparameters same to the best configuration. We report the reduction of filtered metrics in Table 5, which confirms our findings.
+
+TE vs. TEE Since the timestamp embeddings (TE) are independent of entities, they can only capture global patterns at each timestamp. In comparison, the time-dependent entity embedding approaches (DE, ATiSE) learn entity-specific tempo
+
+
+Figure 1: Distribution of filtered MRR $(\%)$ on ICEWS14 over the hyperparameter configurations explored in our study.
+
+ral functions (e.g., frequency, amplitude, etc.) as shown in Equation 1 and 2. The time-dependent entity embeddings are expected to capture entity-specific temporal features, and thus, being more expressive. However, we see that the simple timestamp embedding approach (T) proposed by (Leblay and Chekol, 2018) achieves overall the best performance. In particular, it outperforms the time-dependent entity embedding approaches (DE, ATiSE), which is in contrast to the common belief. Table 6 provides the number of learnable parameters of each model, showing that the interaction model with timestamp embeddings (T) has significantly fewer model parameters than time-dependent entity embeddings (DE, ATiSE). We argue that the existing time-dependent entity embeddings are overfitting to temporal signals. To this end, we propose the unique time-dependent entity embeddings (UTEE), where we learn a unique (global) entity embedding function for all entities to investigate the overfitting problem of DE. In other words, all entities have the same temporal embedding part. Notably, the model parameter of DE is often more than three times than UTEE. As shown
+
+Table 5: Impact of reciprocal relations and position-aware entity embeddings on ICEWS14. The number in parenthesis shows the performance reduction if the best configuration doesn't use the reciprocal relation or position-aware embeddings.
+
+ | with/without reciprocal relation | with/without position-aware entity embeddings |
| Models | MRR(%) | Hits@1(%) | Hits@3(%) | Hits@10(%) | MRR(%) | Hits@1(%) | Hits@3(%) | Hits@10(%) |
| T-TransE | 51.7 (-3.6) | 39.4(-4.3) | 59.1(-3.6) | 75.0(-1.5) | 31.2(-24.1) | 10.6(-33.1) | 44.8(-17.9) | 68.4(-8.1) |
| HyTE-TransE | 40.1(-7.0) | 28.4(-9.9) | 44.9(-12.2) | 64.3(-7.7) | 27.7(-19.4) | 9.6(-32.3) | 38.2(-20.7) | 62.2(-7.5) |
| HyTE-SimplE | 41.2(-11.1) | 28.9(-13.0) | 47.3(-11.6) | 65.4(-4.3) | 51.2(-1.1) | 40.9(-1.0) | 57.7(-1.2) | 70.2(-1.2) |
+
+in Table 3, the UTEE achieves competitive or even better performance with both translation-based and bilinear score functions on both datasets. Additionally, Table 4 shows the evaluation metrics on the GDELT-m10 dataset. Compared to the ICEWS datasets, the number of entities and relations on GDELT-m10 is much fewer while the amount of timestamped edges is about three times more than the ICEWS14 dataset. Thus, the data sparsity issue is alleviated in the GDELT-m10 dataset. Since TEE approaches need dense data for training, their performance has been improved on the GDELT-m10 dataset, which is better than TEs. The results suggest that even though DE has theoretical full expressiveness and provides more freedom degrees of the temporal movements of each entity representation, their performance would deteriorate significantly on sparse data. We tried to add regularization to entity-specific parameters, e.g., amplitude and frequency, and adjust the portion $\gamma$ of the temporal embeddings. However, there are no significant improvements. Thus, the time-dependent entity embeddings need to be revisited to realize their theoretical expressiveness.
+
+Table 6: Model parameters number: million (M).
+
+| Dataset | ICEWS14 | ICEWS11-14 | GDELT-m10 |
| Score function | TransE | SimpleE | TransE | SimpleE | TransE | SimpleE |
| T | 7.72M | 3.86M | 7.89M | 3.94M | 0.55M | 0.55M |
| UTEE | 7.54M | 3.77M | 28.57M | 7.14M | 0.55M | 0.55M |
| DE | 16.2M | 12.01M | 18.45M | 14.6M | 0.82M | 2.11M |
| HyTE | 3.86M | 3.86M | 1.54M | 3.94M | 0.55M | 0.27M |
| ATiSE | 18.9M | 4.72M | 8.94M | 6.98M | 0.67M | 0.67M |
| TA | 0.78M | 0.78M | 0.5M | 0.5M | 0.22M | 0.22M |
+
+Findings on other temporal embeddings. Besides, we find HyTE is sensitive to the choice of score functions. With the translation-based score function (TransE), HyTE only achieves a relatively low number by today's standards while it obtains a competitive number with the bilinear score function (Simple). This suggests that the score function has a considerable impact on model performance and may account for a large fraction of the progress.
+
+Thus, if a new temporal embedding technique is proposed, it should be evaluated on different score functions to assess its benefits. Additionally, we see that the TA-approach (García-Durán et al., 2018) achieves overall relatively low numbers by today's standards, showing its limited capacity. Moreover, we find that the performance of ATiSE considerably deteriorates in our study compared to the prior study. The difference is that we do not cover the Gaussian noise component in our study. This result suggests that taking temporal uncertainty into account would significantly improve the tKG models. Thus, it is worth extending other deterministic KG models into probabilistic approaches.
+
+# 3.4 Benchmarking tKGE Models
+
+Table 7: Link prediction results of well-known tKG models on ICEWS14. The number outside the parentheses is the performance achieved in our study. The number in the parentheses is the best performance results obtained in prior studies. We list the references indicate where the performance number was reported: TTransE/TA-TransE (García-Durán et al., 2018), HyTE/DE-TransE/DE-SimplE (Goel et al., 2019), TNTComplEx (Lacroix et al., 2020), ATiSE (Xu et al., 2019). For ATiSE and HyTE, we use the same score function (KL divergence and TransE, respectively) as reported in their original papers.
+
+| Models | MRR (%) | Hits@1 (%) | Hits@10 (%) |
| TTransE | 55.3(25.5) | 43.7(7.4) | 76.5(60.1) |
| HyTE | 47.9(29.7) | 35.8(10.8) | 71.8(65.5) |
| DE-TransE | 50.8(32.6) | 38.7(12.4) | 72.4(68.6) |
| DE-SimpleE | 53.9(52.6) | 42.5(41.8) | 74.6(72.5) |
| ATiSE | 55.1(55.0) | 42.5(43.6) | 75.0(75.0) |
| TNTComplEx | 60.6(62) | 51.6(52) | 77.3(76) |
| TA-TransE | 26.3(27.5) | 18.3(9.5) | 43.0(62.5) |
+
+Table 7 depicts the best performance of well-known tKGE models from prior studies (numbers in the parentheses) and that found in our study (numbers outside the parentheses). The configu
+
+ration of the best performing models are reported in Table 13 in the appendix. First, we find that the performance of a single model can vary wildly across studies. For example, DE-TransE, T-TransE, and HyTE have been significantly improved using advanced training strategies and hyperparameter-tuning. Besides, we see that some recent models cannot consistently outperform old models in contrast to the conclusion in prior studies. In particular, T-TransE, which constitutes one of the first tKGE models, achieves results competitive to advanced models, i.e., ATiSE and DE-SimplE, in our study. Even compared to TNTComplEx, which is a very large models with 25.12 million learnable parameters (3 times more than TTransE), the performance difference is not large. We provide explanation for the performance gap between our study and prior study regarding TA-TransE and TNTComplEx in Appendix D.
+
+# 4 Conclusion
+
+We assess well-known temporal embeddings of tKGE models via an extensive experimental study. We found that when trained appropriately, the naive timestamp embedding approach performs similarly or even outperforms the more advanced time-dependent entity embedding (TEE) approaches, which is in contrast to the results in prior studies. We contribute to the community in at least two ways: $i$ we provide a unified framework to enable an insightful assessment for novel temporal embedding approaches; $ii$ reveal the weakness of TEE approaches.
+
+# References
+
+Farahnaz Akrami, Mohammed Samiul Saeef, Qingheng Zhang, Wei Hu, and Chengkai Li. 2020. Realistic re-evaluation of knowledge graph completion methods: An experimental study. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data, pages 1995-2010.
+Mehdi Ali, Max Berrendorf, Charles Tapley Hoyt, Laurent Vermue, Mikhail Galkin, Sahand Sharifzadeh, Asja Fischer, Volker Tresp, and Jens Lehmann. 2020. Bringing light into the dark: A large-scale evaluation of knowledge graph embedding models under a unified framework. arXiv preprint arXiv:2006.13365.
+Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. 2013. Translating embeddings for modeling multi-relational data. In Advances in neural information processing systems, pages 2787-2795.
+
+Elizabeth Boschee, Jennifer Lautenschlager, Sean O'Brien, Steve Shellman, James Starz, and Michael Ward. 2015. Icews coded event data. *Harvard Data-verse*, 12.
+Shib Sankar Dasgupta, Swayambhu Nath Ray, and Partha Talukdar. 2018. Hyte: Hyperplane-based temporally aware knowledge graph embedding. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2001-2011.
+Tim Dettmers, Pasquale Minervini, Pontus Stenetorp, and Sebastian Riedel. 2018. Convolutional 2d knowledge graph embeddings. In Thirty-Second AAAI Conference on Artificial Intelligence.
+Alberto García-Durán, Sebastijan Dumančić, and Mathias Niepert. 2018. Learning sequence encoders for temporal knowledge graph completion. arXiv preprint arXiv:1809.03202.
+Rishab Goel, Seyed Mehran Kazemi, Marcus Brubaker, and Pascal Poupart. 2019. Diachronic embedding for temporal knowledge graph completion. arXiv preprint arXiv:1907.03143.
+Zhen Han, Peng Chen, Yunpu Ma, and Volker Tresp. 2021. Explainable subgraph reasoning for forecasting on temporal knowledge graphs. In International Conference on Learning Representations.
+Zhen Han, Yunpu Ma, Peng Chen, and Volker Tresp. 2020a. Dyernie: Dynamic evolution of riemannian manifold embeddings for temporal knowledge graph completion. arXiv preprint arXiv:2011.03984.
+Zhen Han, Yunpu Ma, Yuyi Wang, Stephan Gunnemann, and Volker Tresp. 2020b. Graph hawkes neural network for forecasting on temporal knowledge graphs. arXiv preprint arXiv:2003.13432.
+Woojeong Jin, Changlin Zhang, Pedro Szekely, and Xiang Ren. 2019. Recurrent event network for reasoning over temporal knowledge graphs. arXiv preprint arXiv:1904.05530.
+Rudolf Kadlec, Ondrej Bajgar, and Jan Kleindienst. 2017. Knowledge base completion: Baselines strike back. arXiv preprint arXiv:1705.10744.
+Seyed Mehran Kazemi and David Poole. 2018. Simple embedding for link prediction in knowledge graphs. In Advances in neural information processing systems, pages 4284-4295.
+Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
+Timothee Lacroix, Guillaume Obozinski, and Nicolas Usunier. 2020. Tensor decompositions for temporal knowledge base completion. *ICLR preprint* https://openreview.net/pdf?id=rke2P1BFwS.
+
+Timothee Lacroix, Nicolas Usunier, and Guillaume Obozinski. 2018. Canonical tensor decomposition for knowledge base completion. arXiv preprint arXiv:1806.07297.
+Julien Leblay and Melisachew Wudage Chekol. 2018. Deriving validity time in knowledge graph. In *Companion Proceedings of the The Web Conference* 2018, pages 1771-1776. International World Wide Web Conferences Steering Committee.
+Kalev Leetaru and Philip A Schrodt. 2013. Gdelt: Global data on events, location, and tone, 1979-2012. In ISA annual convention, volume 2, pages 1-49. CiteSeer.
+Yunpu Ma, Volker Tresp, and Erik A Daxberger. 2018. Embedding models for episodic knowledge graphs. Journal of Web Semantics, page 100490.
+Sameh K Mohamed, Vít Novácek, Pierre-Yves Vandenbussche, and Emir Muñoz. 2019. Loss functions in knowledge graph embedding models. In DL4KG@ESWC, pages 1-10.
+Dat Quoc Nguyen, Kairit Sirts, Lizhen Qu, and Mark Johnson. 2016. Strange: a novel embedding model of entities and relationships in knowledge bases. arXiv preprint arXiv:1606.08140.
+Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. 2011. A three-way model for collective learning on multi-relational data. In Icml, volume 11, pages 809-816.
+Andrea Rossi, Denilson Barbosa, Donatella Firmani, Antonio Matinata, and Paolo Merialdo. 2021. Knowledge graph embedding for link prediction: A comparative analysis. ACM Transactions on Knowledge Discovery from Data (TKDD), 15(2):1-49.
+Daniel Ruffinelli, Samuel Broscheit, and Rainer Gemulla. 2020. You {can} teach an old dog new tricks! on training knowledge graph embeddings. In International Conference on Learning Representations.
+Ali Sadeghian, Mohammadreza Armandpour, Anthony Colas, and Daisy Zhe Wang. 2021. Chronor: Rotation based temporal knowledge graph embedding. arXiv preprint arXiv:2103.10379.
+Volker Tresp, Cristóbal Esteban, Yinchong Yang, Stephan Baier, and Denis Krompaß. 2015. Learning with memory embeddings. arXiv preprint arXiv:1511.07972.
+Volker Tresp, Yunpu Ma, Stephan Baier, and Yinchong Yang. 2017. Embedding learning for declarative memories. In European Semantic Web Conference, pages 202-216. Springer.
+Rakshit Trivedi, Hanjun Dai, Yichen Wang, and Le Song. 2017. Know-evolve: Deep temporal reasoning for dynamic knowledge graphs. In Proceedings of the 34th International Conference on
+
+Machine Learning, volume 70, pages 3462-3471. JMLR.org.
+Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, and Guillaume Bouchard. 2016. Complex embeddings for simple link prediction. International Conference on Machine Learning (ICML).
+Zhen Wang, Jianwen Zhang, Jianlin Feng, and Zheng Chen. 2014. Knowledge graph embedding by translating on hyperplanes. In Twenty-Eighth AAAI conference on artificial intelligence.
+Chengjin Xu, Mojtaba Nayyeri, Fouad Alkhoury, Jens Lehmann, and Hamed Shariat Yazdi. 2019. Temporal knowledge graph embedding model based on additive time series decomposition. arXiv preprint arXiv:1911.07893.
+Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. 2014. Embedding entities and relations for learning and inference in knowledge bases. arXiv preprint arXiv:1412.6575.
+Cunchao Zhu, Muhao Chen, Changjun Fan, Guangquan Cheng, and Yan Zhan. 2020. Learning from history: Modeling temporal knowledge graphs with sequential copy-generation networks. arXiv preprint arXiv:2012.08492.
+
+
+Figure 2: Exemplary temporal KG: nodes represent entities and edges their respective relations.
+
+# Appendix
+
+Table 8: Link prediction results of well-known temporal KG models on ICEWS11-14: MRR $(\%)$ and Hits@1/3/10 $(\%)$ .
+
+| Models | MRR | Hits@1 | Hits@3 | Hits@10 |
| TTransE | 57.8 | 46.0 | 65.5 | 79.5 |
| HyTE | 49.8 | 37.6 | 56.2 | 74.0 |
| DE-TransE | 54.1 | 42.1 | 60.9 | 77.1 |
| DE-SimpleE | 54.2 | 42.3 | 61.0 | 67.8 |
| TNTComplEx | 63.5 | 55.4 | 68.5 | 78.8 |
| ATiSE | 53.3 | 40.3 | 61.4 | 77.9 |
+
+# A Evaluation Metrics
+
+For each test quadruple $(e_s, r, e_o, t)$ , we create a subject prediction query $(?, r, e_o, t)$ and an object prediction query $(e_s, r,?, t)$ . Let $\psi_{e_s}$ and $\psi_{e_o}$ represent the rank for ground truth subject $e_s$ and ground truth object $e_o$ of the subject prediction query and object prediction query, respectively. We evaluate our models using standard metrics across the link prediction literature: mean reciprocal rank (MRR): $\frac{1}{2 \cdot |\mathcal{G}_{test}|} \sum_{q \in \mathcal{G}_{test}} \left( \frac{1}{\psi_{e_s}} + \frac{1}{\psi_{e_o}} \right)$ and Hits@k $(k \in \{1, 3, 10\})$ : the percentage of times that the true entity candidate appears in the top $k$ of ranked candidates.
+
+There are two common filtering settings. The first one is following the ranking technique described in (Bordes et al., 2013), where we remove from the list of corrupted triples all the triples that appear either in the training, validation, or test set. We name it static filtering. Trivedi et al. (2017), Jin et al. (2019), and Zhu et al. (2020) use this filtering setting for reporting their results on temporal KG
+
+
+Figure 3: Distribution of filtered MRR $(\%)$ on ICEWS11-14 over the hyperparameter configurations explored in our study.
+
+forecasting. However, this filtering setting is not appropriate for evaluating the link prediction on temporal KGs. For example, there is a test quadruple (Barack Obama, visit, India, 2015-01-25), and we perform the object prediction (Barack Obama, visit, ?, 2015-01-25). We have observed the quadruple (Barack Obama, visit, Germany, 2013-01-18) in training set. According to the static filtering, (Barack Obama, visit, Germany) will be considered as a genuine triple at the timestamp 2015-01-25 and will be filtered out because the triple (Barack Obama, visit, Germany) appears in the training set in the quadruple (Barack Obama, visit, Germany, 2015-01-18). However, the triple (Barack Obama, visit, Germany) is only temporally valid on 2013-01-18 but not on 2015-01-25. To this end, another filtering scheme was introduced, which is more appropriate for the link forecasting task on temporal KGs. We name it time-aware filtering. In this case, we only filter out the triples that are genuine at the timestamp of the query. In other words, if the triple (Barack Obama, visit, Germany) does not appear at the query time of 2015-01-25, the quadruple (Barack Obama, visit, Germany, 2015-01-25) is considered as corrupted. In this paper, we focus on time-aware filtering.
+
+# B Additional Information of Hyperparameter Search Space
+
+Loss functions Various loss functions are used in training temporal knowledge graphs. Dasgupta et al. (2018); Leblay and Chekol (2018) used margin ranking (MR) loss for training, where each pair consists of a positive quadruple and one of its neg-
+
+ative quadruple. The margin $\eta$ is a hyperparameter. Goel et al. (2019); García-Durán et al. (2018) treat the entity prediction task as a categorical classification problem and utilize the cross entropy (CE) loss to align the model distribution and the data distribution. Han et al. (2020a) proposed to use binary cross entropy (BCE) loss that applies a sigmoid function to the score of each positive or negative quadruples and takes the cross entropy between the resulting probability and that quadruple's label as the loss. It has been shown in (Ruffinelli et al., 2020; Mohamed et al., 2019) that the loss function has a significant impact on the performance of static KGE models. To provide additional evidence on temporal KGE models, we search the best choice of loss functions for each model on each dataset.
+
+Regularization methods L2 regularization is widely used in literature (Leblay and Chekol, 2018). Besides, (Dasgupta et al., 2018) proposed to use L1-norm in the regularization term. And (Lacroix et al., 2020) used L3-norm for CP-decomposition. Additionally, (Lacroix et al., 2020) proposed a smoothness regularization for timestamp embeddings that enforce neighboring timestamps to have close representations. Moreover, (Goel et al., 2019) used dropout in its hidden layers. AiTSE normalized the static embeddings $\mathbf{e}_i$ , the trend component $\mathbf{w}_{e_i}$ to unit norm after each update.
+
+Other hyperparameters For models with diachronic entity embedding as its temporal encoding heads, we extend the static feature ratio as an extra searchable hyperparameter. The negative sample ratio of the negative sampling policy is 500. Namely, for each positive sample (s, p, o, t), we corrupt the subject and object entity via uniformly sampling from $T$ , where $T = \{(s', p, o, t) | s' \in \mathcal{E} \backslash s\} \cup \{(s', p, o, t) | t' \in \mathcal{E} \backslash o\}$ . We set our batch size to be 512. Besides, since Adam (Kingma and Ba, 2014) optimizer performs well for the majority of the models (Ali et al., 2020), we decided to progress only with Adam in order to reduce the computational costs. Additionally, for translational models, we set the margin $\gamma$ to be 100 in the score function.
+
+# C Datasets
+
+Dataset statistics including subset split information are described in Table 11. We follow the data preprocessing method used in the original papers. For
+
+Table 9: The average runtime of each training epoch: seconds (s).
+
+| Dataset | ICEWS14 | ICEWS11-14 | GDELT-m10 |
| Score function | TransE | SimpleE | TransE | SimpleE | TransE | SimpleE |
| T- | 99s | 64s | 80s | 105s | 290s | 321s |
| UTEE- | 128s | 75s | 450s | 262s | 1230s | 638s |
| DE- | 196s | 145s | 375s | 302s | 438s | 518s |
| HyTE- | 208s | 212s | 146s | 105s | 360s | 382s |
| ATiSE- | 317s | 75s | 212s | 175s | 380s | 390s |
| TA- | 730s | 365s | 730s | 365s | 2696s | 3751s |
+
+example, DE-SimplE (Goel et al., 2019) takes the date (day/month/year) as timestamp input while AiTSE (Xu et al., 2019) converts dates into consecutive integers.
+
+# D Reproducibility Studies
+
+We were not able to reproduce the results of TA-TransE on ICEWS14. A reason might be differences in the implementation details of the frameworks used to train and evaluate the models. Since there exists no official implementation for TA-TransE, it is not possible to check the implementation difference. Also, García-Durán et al. (2018) did not report the full setup, which impedes the reproduction of results. For example, the regularization method and initialization method have not been reported, which can have a significant effect on the results.
+
+Lacroix et al. (2020) provides an official implementation of TNTComplEx. However, we were not able to reproduce the same metric number as reported in their paper. Similarly, Sadeghian et al. (2021) also did not successfully reproduce the results of TNTComplEx. The initialization of the embeddings might be a reason.
+
+# E Average Runtime of each Approach
+
+Table 9 shows the average runtime of each training epoch for each interaction model.
+
+Table 10: Hyperparameter search space used in our study.
+
+| Hyperparameter | Search space |
| Embedding | |
| Embedding dimension | {64, 100, 128, 256, 512, 1024, 2048} |
| Embedding initialization | {Xavier Uniform, Xavier Normal} |
| Training | |
| Reciprocal relation | {True, False} |
| Position-aware entity embeddings | {True, False} |
| Loss function | {CE, BCE, MR} |
| Learning rate | (0.0, 0.1] |
| Regularization | |
| Entity regularization type | {None, L1, L2, L3} |
| Entity regularization weight | (0.0, 0.1] |
| Relation regularization type | {None, L1, L2, L3} |
| Relation regularization weight | (0.0, 0.1] |
| Timestamp smoothness regularization weight | (0.0, 0.1] |
| Dropout | [0.0, 0.6] |
+
+| Data set | Ntrain | Nvalid | Ntest | Nent | Nrel | Ntimestamp | Time granularity |
| ICEWS14 | 72826 | 8941 | 8963 | 7128 | 230 | 365 | day |
| ICEWS11-14 | 118766 | 14859 | 14756 | 6738 | 235 | 1461 | day |
| GDELT-m10 | 221132 | 27608 | 27926 | 50 | 20 | 30 | day |
+
+Table 11: Dataset Statistics
+
+Table 12: Best configurations of six temporal embeddings with two score functions on ICEWS14, ICEWS11-14 and GDELT-m10.
+
+ | Emb. dim. | Emb. init. | SE ratio | Recip. rel. | Pos-aware entity | Learning rate | Loss func. | Ent. reg. type | Ent. reg. weight | Rel. reg. type | Rel. reg. weight | Temp. smooth. weight. | Dropout |
| ICEWS14 | T-TransE | 512 | Xavier Uniform | - | True | True | 0.0075324 | CE | - | - | - | - | 1.9513135e-17 | 0.5 |
| UTEE-TransE | 512 | Xavier Uniform | - | True | True | 0.0010000 | CE | None | - | None | - | - | 0.5 |
| DE-TransE | 256 | Xavier Uniform | 0.57 | True | True | 0.0019251 | CE | None | - | None | - | - | 0.4 |
| HyTE-TransE | 128 | Xavier Uniform | - | True | True | 0.0080112 | CE | L2 | 0.0368056 | L2 | 0.0762292 | 0.0381662 | 0.6 |
| ATiSE-TransE | 256 | Xavier Uniform | - | True | True | 0.0029397 | CE | | - | - | - | - | 0.2 |
| T-Simple | 256 | Xavier Uniform | - | True | True | 0.0090146 | CE | None | - | None | - | 0.0000881 | 0.6 |
| UTEE-Simple | 256 | Xavier Uniform | - | True | True | 0.0030251 | BCE | - | - | - | - | - | 0.5 |
| DE-Simple | 128 | Xavier Uniform | 0.42 | True | True | 0.0038826 | BCE | - | - | - | - | - | 0.4 |
| HyTE-Simple | 256 | Xavier Uniform | - | True | True | 0.0089471 | CE | None | - | None | - | 0.0315673 | 0.2 |
| ATiSE-Simple | 64 | Xavier Uniform | - | True | True | 0.0006407 | BCE | L3 | 0.0165849 | L3 | 0.0148400 | - | 0.2 |
| ICEWS11-14 | T-TransE | 512 | Xavier Uniform | - | False | True | 0.0018173 | CE | - | - | - | - | 0.0115133 | 0.4 |
| UTEE-TransE | 2048 | Xavier Normal | - | True | True | 0.0003236 | CE | None | - | L2 | 0.0968473 | - | 0.0 |
| DE-TransE | 256 | Xavier Uniform | 0.46 | True | True | 0.0026801 | CE | - | - | - | - | - | 0.6 |
| HyTE-TransE | 100 | Xavier Uniform | - | True | True | 0.0084563 | CE | L2 | 0.0548569 | L3 | 0.0848771 | 0.0718383 | 0.0 |
| ATiSE-TransE | 128 | Xavier Uniform | - | True | True | 0.0013809 | CE | L3 | 0.0011405 | L2 | 0.0182759 | 0.0115133 | 0.2 |
| T-Simple | 256 | Xavier Uniform | - | True | True | 0.0015910 | CE | - | - | - | - | 0.0049301 | 0.4 |
| UTEE-Simple | 512 | Xavier Normal | - | True | True | 0.0048310 | CE | - | - | - | - | - | 0.6 |
| DE-Simple | 128 | Xavier Normal | 0.07 | True | True | 0.0040708 | CE | None | - | None | - | - | 0.6 |
| HyTE-Simple | 100 | Xavier Normal | - | True | True | 0.0077529 | CE | None | - | None | - | 0.0751268 | 0.5 |
| ATiSE-Simple | 100 | Xavier Uniform | - | True | True | 0.0006454 | CE | L2 | 0.0397851 | L3 | 0.0262544 | - | 0.4 |
| GELT-m10 | T-TransE | 512 | Xavier Normal | - | TRUE | TRUE | 0.0005205 | CE | None | - | L3 | 0.0861472 | 0.0123214 | 0.2 |
| UTEE-TransE | 512 | Xavier Uniform | - | TRUE | TRUE | 0.0018018 | BCE | None | - | None | - | - | 0.4 |
| DE-TransE | 100 | Xavier Normal | 0.10 | TRUE | TRUE | 0.0021739 | CE | None | - | None | - | - | 0.4 |
| HyTE-TransE | 512 | Xavier Normal | - | TRUE | TRUE | 0.0007655 | CE | L3 | 0.0128709 | L2 | 0.0440400 | 0.0755946 | 0.2 |
| ATiSE-TransE | 128 | Xavier Normal | - | TRUE | TRUE | 0.0001836 | CE | L2 | 0.0322397 | L2 | 0.0854999 | - | 0.4 |
| T-Simple | 512 | Xavier Normal | - | TRUE | TRUE | 0.0086667 | CE | L3 | 0.0039186 | L3 | 0.0466820 | 0.0730538 | 0.2 |
| UTEE-Simple | 512 | Xavier Normal | - | TRUE | TRUE | 0.0006767 | CE | L2 | 0.0035275 | None | - | - | 0.4 |
| DE-Simple | 256 | Xavier Normal | 0.66 | TRUE | TRUE | 0.0021578 | BCE | None | - | None | - | - | 0.4 |
| HyTE-Simple | 256 | Xavier Normal | - | TRUE | TRUE | 0.0046384 | CE | L3 | 0.0034211 | L2 | 0.0986175 | 0.0143311 | 0.2 |
| ATiSE-Simple | 128 | Xavier Normal | - | TRUE | TRUE | 0.0059198 | CE | L2 | 0.0002838 | L2 | 0.0819929 | - | 0.4 |
+
+Table 13: Best configurations of well-known temporal knowledge graph models on ICEWS14 and ICEWS11-14.
+
+ | Emb. dim. | Emb. init. | SE ratio | Recip. rel. | Pos-aware entity | Learning rate | Loss func. | Ent. reg. type | Ent. reg. weight | Rel. reg. type | Rel. reg. weight | Temp. smooth. weight. | Dropout |
| ICEWS14 | T-TransE | 512 | Xavier Uniform | - | True | True | 0.0075324 | CE | - | - | - | - | 1.9513135e-17 | 0.5 |
| DE-TransE | 256 | Xavier Uniform | 0.57 | True | True | 0.0019251 | CE | None | - | None | - | - | 0.4 |
| DE-SimpleE | 128 | Xavier Uniform | 0.42 | True | True | 0.0038826 | BCE | - | - | - | - | - | 0.4 |
| TNTComplEx | 1560 | - | - | True | - | 0.1 | CE | n3 | 0.01 | - | - | 0.01 | - |
| ATiSE | 500 | - | - | False | - | 0.00003 | LMR | - | - | - | - | - | - |
| HyTE | 100 | Xavier Uniform | - | True | True | 0.0084563 | CE | L2 | 0.0548569 | L3 | 0.0848771 | 0.0718383 | 0.0 |
| ICEWS11-14 | TTransE | 512 | Xavier Uniform | - | False | True | 0.0018173 | CE | - | - | - | - | 0.0115133 | 0.4 |
| DE-TransE | 256 | Xavier Uniform | 0.46 | True | True | 0.0026801 | CE | - | - | - | - | - | 0.6 |
| DE-SimpleE | 128 | Xavier Normal | 0.07 | True | True | 0.0040708 | CE | None | - | None | - | - | 0.6 |
| TNTComplEx | 1560 | - | - | True | - | 0.0859516 | CE | n3 | 0.001 | - | - | 0.1 | - |
| ATiSE | 500 | - | - | False | - | 0.00003 | LMR | - | - | - | - | - | - |
| HyTE | 100 | Xavier Normal | - | True | True | 0.0077529 | CE | None | - | None | - | 0.0751268 | 0.5 |
| GDELT-m10 | TTransE | 512 | Xavier Normal | - | TRUE | TRUE | 0.0005205 | CE | None | - | L3 | 0.0861472 | 0.0123214 | 0.2 |
| DE-TransE | 100 | Xavier Normal | 0.10 | TRUE | TRUE | 0.0021739 | CE | None | - | None | - | - | 0.4 |
| DE-SimpleE | 256 | Xavier Normal | 0.66 | TRUE | TRUE | 0.0021578 | BCE | None | - | None | - | - | 0.4 |
| TNTComplEx | 1560 | - | - | True | - | 0.1499999 | CE | n3 | 0.001 | - | - | 0.1 | - |
| ATiSE | 512 | - | - | True | - | 0.00003 | LMR | - | - | - | - | - | - |
| HyTE | 512 | Xavier Normal | - | TRUE | TRUE | 0.0007655 | CE | L3 | 0.0128709 | L2 | 0.0440400 | 0.0755946 | 0.2 |
\ No newline at end of file
diff --git a/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/images.zip b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..edde94baa9d43ee899b251fe8393a59e1cea551b
--- /dev/null
+++ b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e2656de840ce0e71efa8d6f38293af80d1d5045dac8b4e5af67d8d86b0c89a79
+size 860164
diff --git a/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/layout.json b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..56f177a3178b2b0efa0bb2ec1f13c19a6d4d66b1
--- /dev/null
+++ b/timedependententityembeddingisnotallyouneedareevaluationoftemporalknowledgegraphcompletionmodelsunderaunifiedframework/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6c345bee21883c77ae5fab2e2d7829d2f10a83bce21681b5f636a3a0f894040d
+size 423275
diff --git a/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/75965db2-8ead-4155-8561-2073764c0c78_content_list.json b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/75965db2-8ead-4155-8561-2073764c0c78_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..1ed63f1390dc24374593ef16774073a78ce4dce8
--- /dev/null
+++ b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/75965db2-8ead-4155-8561-2073764c0c78_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b3cd8114c9b5b3cc10d4ea411db1d96ad19c192de8e22f464a576c18cb05154a
+size 96280
diff --git a/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/75965db2-8ead-4155-8561-2073764c0c78_model.json b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/75965db2-8ead-4155-8561-2073764c0c78_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..aa349e8b612906484a31e33a728a3fc48ba9aed8
--- /dev/null
+++ b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/75965db2-8ead-4155-8561-2073764c0c78_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:447c03a396413165954f31f216f5b9bb58e9c9e726e1be223920aa7f786c6d68
+size 116940
diff --git a/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/75965db2-8ead-4155-8561-2073764c0c78_origin.pdf b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/75965db2-8ead-4155-8561-2073764c0c78_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..f6d8fc18d8539a263ad62afe949ceae9759c4e95
--- /dev/null
+++ b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/75965db2-8ead-4155-8561-2073764c0c78_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d1c6170b72716a8252e652c470284bd41a4b1121bc218094109eb0163391d3b7
+size 1127159
diff --git a/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/full.md b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..191cdf26a78b82aeb08b43118a3a29ec94c1c52b
--- /dev/null
+++ b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/full.md
@@ -0,0 +1,370 @@
+# Timeline Summarization based on Event Graph Compression via Time-Aware Optimal Transport
+
+Manling Li $^{1}$ , Tengfei Ma $^{2}$ , Mo Yu $^{2}$ , Lingfei Wu $^{3}$ , Tian Gao $^{2}$ , Heng Ji $^{1}$ , Kathleen McKeown $^{4}$
+
+1University of Illinois Urbana-Champaign
+
+$^{2}$ IBM Research $^{3}$ JD.COM Silicon Valley Research Center $^{4}$ Columbia University
+
+{manling2,hengji}@illinois.edu,tengfei.ma1@ibm.com, {yum,tgao}@us.ibm.com,lwu@email.wm.edu,kathy@cs.columbia.edu
+
+# Abstract
+
+Timeline Summarization identifies major events from a news collection and describes them following temporal order, with key dates tagged. Previous methods generally generate summaries separately for each date after they determine the key dates of events. These methods overlook the events' intra-structures (arguments) and inter-structures (event-event connections). Following a different route, we propose to represent the news articles as an event-graph, thus the summarization task becomes compressing the whole graph to its salient sub-graph. The key hypothesis is that the events connected through shared arguments and temporal order depict the skeleton of a timeline, containing events that are semantically related, structurally salient, and temporally coherent in the global event graph. A time-aware optimal transport distance is then introduced for learning the compression model in an unsupervised manner. We show that our approach significantly improves the state of the art on three real-world datasets, including two public standard benchmarks and our newly collected $\text{Timeline}_{100}$ dataset.
+
+# 1 Introduction
+
+Timeline summarization (Chieu and Lee, 2004; Yan et al., 2011a,b; Binh Tran et al., 2013; Tran et al., 2013, 2015; Nguyen et al., 2014; Wang et al., 2016; Martschat and Markert, 2018; Steen and Markert, 2019) aims at generating a sequence of major news events with their key dates from a large collection of related news from multiple perspectives (see Figure 1 for an example). The timeline summarization task poses several challenges to existing Natural Language Processing (NLP) techniques: (1) In contrast to multi-document summarization (MDS) dealing with tens of documents (Fabbri et al., 2019),
+
+it summarizes hundreds of long documents, which requires the model to efficiently maintain a joint representation of the entire news collection, so that the summary has its coverage and coherence optimized globally. (2) The summary is expected to select key dates and capture the temporal interdependency across key stories, which, compared to standard MDS, poses additional challenges in reconstructing temporal order. (3) Manual labeling of timeline summaries is costly; thus the labeled data for model training is very limited.
+
+As a result, previous studies (Martschat and Markert, 2018; Steen and Markert, 2019) usually take an unsupervised approach. Specifically, these methods first identify the key dates from the publication time distribution. Then for each key date and its associated news articles, a summary is generated based on the salient sentences measured by the inter-similarity of these articles. In these methods, the document representations are limited to local text features, ignoring the global context of the news collection. The applications of neural models, especially advanced pre-trained language models, such as BERT (Devlin et al., 2019a) and GPT-2 (Budzianowski and Vulić, 2019), are restricted in terms of both representation capacity and memory efficiency when handling the global context within such input document size.
+
+We propose an event graph representation along with compression to deal with the representation difficulties in global graph contextualization, scalability, and time-awareness. Our solution consists of the following key ideas.
+
+(1) Event graph construction for multi-doc encoding: With state-of-the-art Information Extraction (IE) systems (Lin et al., 2020), we construct a single event graph from the input documents, with co-referential entities (e.g., house, mansion in Figure 1) and co-referential events (e.g., die, collapsed) merged across documents. Our comprehensive event
+
+
+Figure 1: Timeline summarization based on event graph compression. The example is a partial timeline about the investigation on Dr Conrad Murray for the death of Michael Jackson, describing that Michael Jackson is found unconscious and Dr Murray traveled with him to hospital and started to be interviewed by police. We use green triangles to denote events, and grey circles stand for entities. Italics represent the raw text mention extracted. Black bold arrows represent the temporal order between events, and grey arrows are event-entity argument edges and entity-entity relation edges. Coreferential events and entities are merged across documents. Faded nodes are events being removed during summarization. In this example, we show the transport of node pairs $\langle i,j\rangle$ and $\langle i,k\rangle$ to the node pair $\langle i',j'\rangle$ in the summary graph.
+
+graph connects events through temporal order (e.g., interview $\xrightarrow{\text{BEFORE}}$ raid), shared arguments (e.g., called to $\xrightarrow{\text{AGENT}}$ paramedics $\xleftarrow{\text{PARTICIPANT}}$ call), and related arguments (e.g., travel $\xrightarrow{\text{DESTINATION}}$ hospital $\xrightarrow{\text{LOCATED_IN}}$ Los Angeles $\xleftarrow{\text{AFFILIATION}}$ police $\xleftarrow{\text{PARTICIPANT}}$ interview). The graph structure enables the model to capture global long-distance inter-dependency between events across documents.
+
+(2) Unsupervised event graph compression with optimal transport (OT): We propose a new formulation of timeline summarization, by selecting event nodes from the input graph to form a smaller summary graph. Under a certain summary size constraint, a summary graph with high coverage has a small information loss, compared to the one with low coverage (Filatova and Hatzivassiloglou, 2004). We constrain the total number of event nodes to be kept in the summary, and optimize the summary graph to be close to the original graph using opti
+
+mal transport. The training objective is to find the optimal transport plan between input and summary graph that has the minimal transport distance. Figure 1 shows an example of transporting node pairs in the input graph to the node pair $\langle die, interview \rangle$ in the summary graph. $\langle die, interview \rangle$ receives relatively large mass during the graph transport since it has small distance with multiple node pairs in the input graph, such as $\langle die, speak \rangle$ . To obtain the minimal distance with only $m$ events to be kept, a global decision is learned to select salient but also diverse events. The summary graphs are generated using a differentiable compression model according to a hyperparameter of compression rate, instead of using annotated timelines. Thus, our objective allows model training in an end-to-end unsupervised way.
+
+(3) Time-aware Gromov-Wasserstein distance: The distance between two graphs should capture
+
+the following criteria: i) Semantic relevance: each node first has its initial local context encoded via a pre-trained BERT model and node type embeddings. For example, STARTPOSITION event is not closely related to the TRANSPORT event in Figure 1 though they have temporal dependencies. ii) Structural centrality: we employ a graph neural network to maintain a global context embedding by encoding the global structure topology, which enables the events of high node centrality to gather comprehensive information from neighbors. For example, although both are MEET events, interviewed (by police) is more structurally salient than speak. It encodes the information not only from its neighbor events such as raid, but also from long-distance neighbors such as travel (to hospital) via the aforementioned argument paths. iii) Temporal coherence: we define time-aware Gromov-Wasserstein distance over the temporal edges, and introduce a temporal regularizer to enlarge the distance between events that have wide time gap, such as the BORN and INJURE events in Figure 1, so that the temporal coherence can be captured. It enables the model to select temporally salient events that have temporal dependencies with multiple events in the news collection. Also, timeline summarization is sensitive to temporal ordering, such that the TRANSPORT (traveling in ambulance) before DIE in Figure 1 is more important to the story than the TRANSPORT (releasing body) after DIE. Hence, we distinguish the before and after events in the distance computation.
+
+(4) New benchmark: Considering the current timeline summarization benchmarks are limited to certain topics, we collect a new dataset $\text{Timeline}_{100}$ with more testing samples and wider topic coverage. Experiments on three datasets show that our approach is significantly better than the baselines.
+
+# 2 Method
+
+# 2.1 Overview
+
+Our approach aims at finding the graph that has minimal distance from the input graph (Filatova and Hatzivassiloglou, 2004), so that when only a limited number of nodes is selected, the summary graph can have menial information loss. Optimal transport is solving this exact problem by finding the best transport plan that has a minimal distance between two graphs. To apply optimal transport to timeline summarization, the key is to design the distance to evaluate the information loss, and thus
+
+we propose time-aware optimal transport distance.
+
+Figure 1 gives an overview of our approach. It first extracts an event graph $G$ from input documents. We then encode the graph and perform graph compression to compress $G$ to its summary graph $S$ . Our time-aware optimal transport is applied to train the graph encoder and compression model, with the goal of keeping events that are semantically related, structurally salient, and temporally coherent.
+
+# 2.2 Event Graph Construction
+
+The event graph is a heterogeneous graph $\mathbf{G}$ , where nodes are events $\{v_i\}$ and entities $\{e_j\}$ , and edges contain event-event temporal ordering edges $\{\langle v_i, v_l \rangle\}$ , event-entity argument edges $\{\langle v_i, a, e_j \rangle\}$ , and entity-entity relation edges $\{\langle e_j, r, e_k \rangle\}$ . We list all the notations in Table 1.
+
+| Symbol | Meaning |
| G | An input event graph from input documents |
| n | The number of event nodes in G |
| S | A summary event graph (a subgraph) |
| m | The number of event nodes in S |
| φ | A mapping function from a node to its type |
| w | A mapping function from a node to its mentions |
| v | An event node in an event graph |
| e | An entity node in an event graph |
| {vi, vl} | A temporal ordering edge (vl happens after vi) |
| {vi, a, ej} | An argument edge (the entity ej plays argument role a in eventvi) |
| {ej, r, ek} | An entity relation edge between ej and ek, and r is the relation type |
+
+Table 1: List of symbols.
+
+We apply OneIE (Lin et al., 2020), a state-of-the-art Information Extraction (IE) system, to extract entities, relations and events; then perform cross-document entity and event coreference resolution (Pan et al., 2015, 2017; Lai et al., 2021) over the document cluster of each timeline topic. We apply (Ning et al., 2019) to extract temporal relations for events in the same paragraph or having shared arguments. For example, clashes happen before wound given the sentence fifty wounded are reported in the clashes. To obtain the date of each event, We extract and normalize time expressions using publication date (Manning et al., 2014), and then apply (Wen et al., 2021) to extract the event temporal attributes from the context. If the tem
+
+poral attributes can not be decided according to the context, we propagate the temporal attributes from neighbor events based on their shared arguments (?) . After that, we use the document publication date to populate the remaining missing dates. For example, in Figure 1, the date 2009-06-25 of the collapse (DIE) event is extracted from context last Thursday, and the date of the unconscious (INJURE) event is propagated along with their shared argument Michael Jackson.
+
+# 2.3 Time-Aware Optimal Transport (OT)
+
+Optimal Transport. We aim to generate the summary graph $S$ that has minimal OT distance with the input graph $G$ , such that
+
+$$
+D (G, S) = \min _ {\boldsymbol {T}} \boldsymbol {T} \odot \boldsymbol {C},
+$$
+
+where $\odot$ represents the Hadamard product. $T\in$ $\mathbb{R}_+^{n\times m}$ denotes the transport plan, learned to optimize a soft node alignment between two graphs. Namely, each node in $G$ can be transferred to multiple nodes in $S$ with different weights. We use $T_{ii'}$ to denote the amount of mass shifted from node $i$ in the input graph $G$ to node $i'$ in the summary graph $S$ , as shown in Figure 1. $C\in \mathbb{R}^{n\times m}$ is the cost matrix of event nodes between two graphs.
+
+Time-Aware OT Distance. Considering that event graphs are heterogeneous graphs, and timeline summarization is sensitive to temporal dependencies between events, we define the Gromov-Wasserstein Distance (Xu et al., 2019) on temporal edges to calculate distance between pairs of nodes within two graphs, i.e., $\langle i,j\rangle$ in $G$ and $\langle i',j'\rangle$ in $S$ :
+
+$$
+D (G, S) = \min _ {\boldsymbol {T}} \sum_ {i, j \in G} \sum_ {i ^ {\prime}, j ^ {\prime} \in S} T _ {i i ^ {\prime}} T _ {j j ^ {\prime}} | C _ {i j} - C _ {i ^ {\prime} j ^ {\prime}} |.
+$$
+
+Figure 1 shows an example of transporting edges $\langle i,j\rangle$ in the input graph to $\langle i',j'\rangle$ in the summary graph. The cost $|C_{ij} - C_{i'j'}|$ evaluates the intra-graph structural similarity between two pairs of nodes $\langle i,j\rangle$ in $G$ and $\langle i',j'\rangle$ in $S$ . To capture the direction of temporal ordering, we parameterize different matrices to distinguish the before and after nodes:
+
+$$
+C _ {i j} = \left\| \boldsymbol {W} _ {\mathrm {b f r}} \boldsymbol {v} _ {i} - \boldsymbol {W} _ {\mathrm {a f t}} \boldsymbol {v} _ {j} \right\| _ {2} - \Omega \left(t _ {i}, t _ {j}\right).
+$$
+
+In this way, although travel in Figure 1 and release are both TRANSPORT events connecting with the DIE event, they are distinguished during distance calculation. Here, $\pmb{v}_i$ and $\pmb{v}_j$ are the node representations and we want them to capture the semantic
+
+relevance, structural salience and temporal coherence. As a result, we design an event graph encoder later in §2.4 from these three aspects.
+
+Temporal Regularizer. The OT distance between events should also capture temporal coherence. For example, in Figure 1, BORN event and INJURE event have large time gap, so that there should be a large distance between them, although they have direct connections in the graph. As a result, we use a regularizer $\Omega(t_i, t_j)$ to penalize events that have a large time difference $t_i - t_j$ :
+
+$$
+\Omega (t _ {i}, t _ {j}) = \frac {\beta}{(t _ {i} - t _ {j}) ^ {2} + 1},
+$$
+
+where $\beta \in (0,1]$ is a hyper-parameter.
+
+# 2.4 Event Graph Encoder
+
+In order to calculate the time-aware optimal transport distance, we encode both the input event graph and the summary graph to obtain the node representations, which capture text semantics, graph structures and preserves the temporal information.
+
+Semantics Encoding. To capture the local text semantics of an entity $e$ or an event $v$ , we apply the pre-trained BERT (Devlin et al., 2019b) to initialize a contextualized embedding $w$ using its text mentions. We use the average representation for nodes having multiple mentions, and concatenate it with the node type embedding $\phi$ , which is initialized by BERT using the type name. The frequency of events has been proven effective and critical to timeline summarization (Martschat and Markert, 2018). As a result, we add the number of its text mentions $|w|$ to capture the event frequency in the news collection:
+
+$$
+\boldsymbol {v} = \left[ \boldsymbol {w} _ {v}; \phi_ {v}; \left| w _ {v} \right| \right], \boldsymbol {e} = \left[ \boldsymbol {w} _ {e}; \phi_ {e}; \left| w _ {e} \right| \right], \tag {1}
+$$
+
+where $[;]$ denotes concatenation operation.
+
+Graph Encoding. After that, we employ an edgewise graph neural network to contextualize all the nodes with their global graph contexts. We first generate edge type representation $\mathbf{a}$ and $\mathbf{r}$ by encoding the edge type name using pre-trained BERT, and temporal edge representation $\mathbf{t}$ is encoded using name "before". The message passed through an argument edge $\langle v_i, r, e_j \rangle$ is:
+
+$$
+\boldsymbol {m} _ {i, j} = \operatorname {R e L U} \left[ \left(\boldsymbol {W} _ {a} \left[ \left(\boldsymbol {v} _ {i} - \boldsymbol {e} _ {j}\right); \boldsymbol {a} \right]\right). \right.
+$$
+
+The messages of relation and temporal edges are similar, by replacing $\mathbf{a}$ with $\mathbf{r}$ and $t$ . We aggregate
+
+the messages using edge-aware attention following (Liao et al., 2019),
+
+$$
+\alpha_ {i, j} = \sigma (\operatorname {M L P} (\boldsymbol {v} _ {i} - \boldsymbol {v} _ {j})),
+$$
+
+where $\sigma$ denotes sigmoid function. We adopt a two-layer MLP with ReLU as activation foment.
+
+The event node representation $\pmb{v}_i$ is then updated using the messages from its local neighbors $N(v_i)$ :
+
+$$
+\boldsymbol {v} _ {i} \leftarrow \mathrm {G R U} \left(\left[ \boldsymbol {v} _ {i}; \sum_ {j \in N (v _ {i})} \alpha_ {i, j} \boldsymbol {m} _ {i, j} \right]\right),
+$$
+
+similar to entity node representations.
+
+Date Distribution Encoding. To encode the date distribution, for each event $v_{i}$ with date $t_{i}$ , we concatenate the above node representation $\mathbf{v}_{i}$ with the number of documents published on $t_{i}$ , the number of events happening on $t_{i}$ , and the number of event text mentions attached to $t_{i}$ in local context. It enables the OT distance to capture the corpus-level date salience.
+
+# 2.5 Differentiable Graph Compression
+
+To get a summary graph with $m$ event nodes $^2$ , we apply an event graph compression matrix $M\in \mathbb{R}^{n\times m}$ following (Ma and Chen, 2021),
+
+$$
+\boldsymbol {A} _ {S} = \boldsymbol {M} ^ {T} \boldsymbol {A} _ {G} \boldsymbol {M},
+$$
+
+where $A_{G}\in \mathbb{R}^{n\times n}$ is the temporal edge adjacency matrix of event nodes in $G$ , with $A_{S}\in \mathbb{R}^{m\times m}$ for $S$ similarly. For timeline summarization task, the parametrization of $M$ has two requirements: (1) $M$ is differentiable to enable end-to-end training; (2) we want to guarantee that the nodes in the summary graph are originally from the input graph (due to our extractive summarization goal), so we follow (Ma and Chen, 2021) to directly select nodes as summary nodes according to their weights $\alpha \in \mathbb{R}^{n\times 1}$ :
+
+$$
+\boldsymbol {\alpha} = \sigma (\widehat {\boldsymbol {A}} \boldsymbol {V} \boldsymbol {W} _ {\alpha})
+$$
+
+Here, $\widehat{\pmb{A}}\in \mathbb{R}^{n\times n}$ is the normalized graph adjacency matrix defined in graph convolutional networks (Kipf and Welling, 2017), $\pmb {V}\in \mathbb{R}^{n\times d}$ is the node feature matrix, and $W_{\alpha}\in \mathbb{R}^{d\times 1}$ is a parameter vector. $\sigma$ is the sigmoid function.
+
+We pick the top $m$ values of $\alpha$ and list them in the sorted order, denoted by $\alpha_{s} \in \mathbb{R}^{m \times 1}$ . Similarly, $\widehat{\pmb{A}}_s \in \mathbb{R}^{n \times m}$ is the column-sorted and picked
+
+version of $\widehat{A}$ . Then the compression matrix $M$ can be finally defined as
+
+$$
+\boldsymbol {M} = \ell_ {1} \text {- r o w - n o r m a l i z e} [ \widehat {\boldsymbol {A}} _ {s} \odot (\mathbf {1} \boldsymbol {\alpha} _ {s} ^ {T}) ],
+$$
+
+where 1 means a column vector of all ones.
+
+# 2.6 Training Objective
+
+The optimal $T$ that solves $D(G, S) = \min_{\pmb{T}} T \odot C$ can be approximated by a differentiable Sinkhorn-Knopp algorithm (Sinkhorn, 1964; Cuturi, 2013) following (Xu et al., 2019; Ma and Chen, 2021),
+
+$$
+\boldsymbol {T} = \operatorname {d i a g} (\boldsymbol {p}) \exp (- \boldsymbol {C} / \gamma) \operatorname {d i a g} (\boldsymbol {q}),
+$$
+
+where $\pmb{p} \in \mathbb{R}_{+}^{n \times 1}$ and $\pmb{q} \in \mathbb{R}_{+}^{m \times 1}$ . The solution $\pmb{T}$ can be computationally obtained by using Sinkhorn's algorithm. Starting with any positive vector $\pmb{q}^{0}$ to perform the following iteration:
+
+for $i = 0,1,2,\ldots$ until convergence,
+
+$$
+\boldsymbol {p} ^ {i + 1} = \mathbf {1} \oslash (K \boldsymbol {q} ^ {i}),
+$$
+
+$$
+\boldsymbol {q} ^ {i + 1} = \mathbf {1} \oslash (\boldsymbol {K} ^ {\top} \boldsymbol {p} ^ {i + 1}),
+$$
+
+where $\oslash$ denotes element-wise division. A computational $T^k$ can be obtained by iterating a finite number $k$ times,
+
+$$
+\boldsymbol {T} ^ {k} := \operatorname {d i a g} \left(\boldsymbol {p} ^ {k}\right) \boldsymbol {K} \operatorname {d i a g} \left(\boldsymbol {q} ^ {k}\right).
+$$
+
+The parameterization of the graph compression step and Sinkhorn-Knopp algorithm are differentiable, so we can optimize our time-aware optimal transport distance between two graphs in an end-to-end manner.
+
+The advantage of our approach is that the training process is unsupervised, since the summary graph is generated automatically under the constraint of the hyperparameter $m$ , i.e., the number of event nodes in the summary graph. The model parameters include those for the graph encoder (capturing semantic relevance, structural centrality and time salience), the transport distance matrix (capturing temporal coherence), the compression model (selecting top ranked nodes in a differentiable manner), and the transport plan (making a global decision to obtain minimum distance). They are optimized jointly to minimize the distance between the generated graph and the input graph.
+
+# 2.7 Extractive Summarization
+
+During summarization, the event summary graph is generated by selecting $m$ events according to
+
+the event weights $\alpha$ , where $m$ is a hyperparameter decided by the expected compression rate. To maintain the diversity of the temporal dimension following (Martschat and Markert, 2018), we set a maximum event constraint to select no more than $k$ events for each date. In detail, if the event number of one date reaches the limitation, the remaining events of that date will be ignored in the ranking list $\alpha$ , and only events happening on other dates can be selected to the summary graph. For each date, $k$ is decided by the date distribution (i.e., the number of events happening on each date), as well as the compression rate hyperparameter.
+
+Finally, for each event $v \in V_S$ in the summary graph, we extract an event summary sentence, i.e., the source sentence with the maximum event coverage. The event summaries are ordered by dates to form the timeline. The event summaries on the same date are merged following the events' temporal orders with topological sort (Manber, 1989).
+
+# 3 Experiment
+
+# 3.1 Experimental Settings
+
+Datasets. The evaluation is conducted on three datasets. $\text{Timeline}_{17}$ (Tran et al., 2013) and $\text{Crisis}$ (Tran et al., 2015) are two widely used timeline summarization datasets. $\text{Timeline}_{17}$ contains 17 topics, and each topic has 1-3 ground-truth timelines, resulting in 19 timelines in total. $\text{Crisis}$ has 5 topics and each topic has 4-7 ground-truth timelines, with 22 timelines annotated in total. We use all 19 and 22 timelines as references, and calculate the average scores following previous work.
+
+To explore the robustness of our event graph compression for different scenarios, we also collect a new larger dataset $\text{Timeline}_{100}$ containing 100 timelines from news websites including VoA $^4$ and Reuters $^5$ . The timelines are written by journalists and are manually curated. The dataset covers various topics related to the economy, military, education, etc. The input documents for each timeline are selected using BM25 (Robertson et al., 1995). For each dataset, we construct input event graphs
+
+following §2.2. We use the ACE event ontology, with 7 entity types, 6 relation types, 33 event types, and 22 argument roles. For the (unsupervised) training of our event graph compression model, we use event graphs constructed from VoA news between 2011 and 2017 (Li et al., 2020a). The statistics are shown in Table 2.
+
+| Dataset | Split | #Doc | #Event | #Entity | #Rel |
| \(Timeline_{17}\) | Input | 4,650 | 74,320 | 115,585 | 136,509 |
| Timeline | 19 | 974 | 1,936 | 1,134 |
| Crisis | Input | 20,463 | 325,695 | 551,228 | 610,410 |
| Timeline | 22 | 736 | 1,184 | 1,309 |
| \(Timeline_{100}\) | Input | 10,379 | 178,581 | 301,132 | 306,975 |
| Timeline | 100 | 3,296 | 8,901 | 23,732 |
| Unlabeled (for OT) | Input | 72,576 | 913,679 | 381,735 | 1,046,066 |
| Timeline | - | - | - | - |
+
+Table 2: Data statistics, including the number of documents, events, entities, and temporal relations.
+
+Evaluation Metrics. We use the conventional metrics for timeline summarization (Martschat and Markert, 2018) to evaluate the key date selection using $\text{Date } F_{1}$ and the content generation using ROUGE scores, including (1) $\text{concat } F_{1}$ to compute ROUGE by concatenating the summaries of all selected dates; (2) $\text{agree } F_{1}$ to compute ROUGE only between the summaries which have the same dates; (3) $\text{align } F_{1}$ to first align summaries in the output with those in the reference based on similarity and the distance between their dates, then compute the ROUGE score between aligned summaries. Distant alignments are punished.
+
+Baselines. We compare with: (1) (Chieu and Lee, 2004), a typical extractive model based on sentence similarity; and (2) (Martschat and Markert, 2018), the state-of-the-art extractive timeline summarization model based on submodular functions. (3) PacSum (Zheng and Lapata, 2019), the state-of-the-art unsupervised graph-based ranking summarization baseline, which utilizes BERT to encode sentences for sentence centrality ranking in a sentence graph. We use the publication date of the selected sentence as key dates. (4) SummPip (Zhao et al., 2020), the state-of-the-art unsupervised multi-document summarization baseline, which constructs a sentence graph and performs spectral clustering. After that, a summary is generated for each sentence cluster
+
+| Dataset | Model | Concat F1 | Agree F1 | Align F1 | Date F1 |
| R-1 | R-2 | R-1 | R-2 | R-1 | R-2 |
| Timeline17 | Chieu and Lee (2004) | 0.223 | 0.049 | 0.024 | 0.008 | 0.046 | 0.012 | 0.195 |
| Martschat and Markert (2018) | 0.364 | 0.087 | 0.092 | 0.021 | 0.103 | 0.024 | 0.543 |
| Zheng and Lapata (2019) | 0.231 | 0.054 | 0.029 | 0.012 | 0.035 | 0.013 | 0.173 |
| Zhao et al. (2020) | 0.242 | 0.057 | 0.028 | 0.009 | 0.030 | 0.007 | 0.158 |
| Optimal Transport | 0.370 | 0.089 | 0.092 | 0.020 | 0.103 | 0.024 | 0.550 |
| w/o temporal regularizer | 0.369 | 0.087 | 0.091 | 0.018 | 0.101 | 0.025 | 0.545 |
| Crisis | Chieu and Lee (2004) | 0.348 | 0.065 | 0.026 | 0.006 | 0.047 | 0.010 | 0.146 |
| Martschat and Markert (2018) | 0.333 | 0.071 | 0.056 | 0.012 | 0.076 | 0.015 | 0.288 |
| Zheng and Lapata (2019) | 0.144 | 0.017 | 0.004 | 0.001 | 0.008 | 0.001 | 0.077 |
| Zhao et al. (2020) | 0.124 | 0.016 | 0.004 | 0.001 | 0.007 | 0.001 | 0.069 |
| Optimal Transport | 0.348 | 0.074 | 0.058 | 0.012 | 0.079 | 0.015 | 0.291 |
| w/o temporal regularizer | 0.348 | 0.073 | 0.056 | 0.011 | 0.076 | 0.014 | 0.290 |
| Timeline100 | Chieu and Lee (2004) | 0.127 | 0.028 | 0.011 | 0.003 | 0.017 | 0.004 | 0.138 |
| Martschat and Markert (2018) | 0.257 | 0.060 | 0.016 | 0.005 | 0.021 | 0.007 | 0.290 |
| Zheng and Lapata (2019) | 0.219 | 0.045 | 0.011 | 0.002 | 0.016 | 0.005 | 0.151 |
| Zhao et al. (2020) | 0.196 | 0.034 | 0.011 | 0.002 | 0.017 | 0.004 | 0.158 |
| Optimal Transport | 0.278 | 0.067 | 0.017 | 0.005 | 0.023 | 0.008 | 0.295 |
| w/o temporal regularizer | 0.279 | 0.067 | 0.015 | 0.004 | 0.021 | 0.007 | 0.292 |
+
+Table 3: Performance on timeline summarization. R-1 and R-2 represents ROUGE-1 and ROUGE-2, respectively.
+
+by multi-sentence compression, and we use the most frequent publication date of the sentences in the cluster as key dates. (5) "w/o temporal regularizer", an ablation study by removing the temporal regularizer in the OT distance.
+
+Training Details. The dimension of contextual embedding, type embedding, and edge embedding are 768. $\beta$ is 0.5. $\gamma$ is 1. The ratio of event nodes kept after compression $m$ is determined based on the ratio of input graph size and summary graph size of the dataset. We use 0.05 for $Timeline_{17}$ dataset, 0.005 for Crisis dataset, and 0.05 for $Timeline_{100}$ dataset $^{9}$ . Due to the large size of input graphs, we first compress the subgraph extracted from each publication date following the hard cutoff of (Martschat and Markert, 2018), and then compress the graph of the entire corpus. The graph compression model is trained on one Tesla V100 GPU with 16GB DRAM.
+
+# 3.2 Quantitative Performance
+
+As shown in Table 3, our method outperforms baselines on all three datasets. Event graph connects events through entities and temporal relations, which enables capturing the correspondence between events, and excludes unrelated events. Gen
+
+eral multi-document summarization and text graph based summarization cannot capture the temporal dimension, so the performance is especially low on date $\mathrm{F_1}$ , agree $\mathrm{F_1}$ and align $\mathrm{F_1}$ . All Concat $\mathrm{F_1}$ scores are significantly different from baselines with $p$ value less than 0.05.
+
+Removing the temporal regularizer results in a consistent performance drop on date F1, showing that our time-aware OT helps select events that are temporally coherent.
+
+We achieve larger gains compared to baselines on Crisis dataset, which has larger input graph size and compression rate according to Table 2. It proves the effectiveness of our event graph on encoding a large number of documents and perform effective summarization. Compared to $\mathrm{Timeline}_{17}$ , the performance gain on $\mathrm{Timeline}_{100}$ is larger, which cover more scenarios. It demonstrates the robustness of our event graph compression method.
+
+# 3.3 Qualitative Analysis
+
+Figure 1 shows an example of generated timeline comparing with the reference timeline and the best performing baseline (Martschat and Markert, 2018). The number of dates selected by the baseline is larger compared to our approach, which demonstrates that our approach can better detect salience of dates. We think this is because we take advantage of event graphs to capture the events that are temporally salient. For example, our approach avoids the dates that do not have associated salient
+
+events, such as 2009-06-26. Also, our temporal attributes are more comprehensive and accurate due to the attribute propagation through shared arguments. For example, the dates of unconscious and travel in Figure 1 are propagated from the die event via the shared argument Michael Jackson.
+
+Compared to the baselines, our approach keeps more events in the summary (highlighted in green in Figure 1), while the baseline may produce a summary without events included, e.g., the summary of 2009-06-29.
+
+Compared to the reference timeline, our model is shown to successfully detect the salient events in the graph compression process. Although the release event has connections to multiple events, it is not semantically relevant to other events, and thus it will not receive a large mass during the transportation. The speak event is not strongly connected to other nodes, and it is semantically close to interview, which will not be selected in the global decision of the optimal transport plan. Similarly, the born event is omitted due to its large time gap with other events, and the hire event is excluded since it is not semantically related to other events. More examples are included in the Appendix.
+
+# 3.4 Human Evaluation
+
+We follow previous work (Steen and Markert, 2019) to do a scoring-based evaluation. We instruct the human annotators to read 15 randomly sampled reference timelines, and rate summaries generated by our system and baselines on a 1-5 point scale (1 is the worst and 5 is the best). We provide reference timelines as the gold standard to annotators, instead of providing the input news collection. It is because that each timeline contains hundreds of long documents as input, making it hard to judge coverage and control scoring standards of multiple annotators. As the evaluation is scoring-based, we only ask one annotator to score all timelines of each topic to guarantee the same scoring standard. The order of annotating timelines is random, and the annotators have no knowledge about the order of the systems. Each timeline annotation takes around thirty minutes.
+
+The timelines are evaluated in the following dimensions: (1) general score: the general quality of the timeline; (2) coverage score: the events that are covered by the timeline; (3) coherence score: the coherence of the story; (4) temporal preserving score: the selection of key dates. Table 4 shows
+
+that our approach gets better results on all four measures, proving that our model is reasonable to find semantically relevant, structurally salient and temporally coherent events.
+
+
+The performance on Concat ROUGE_1 using different compression rates $(m =$ compression_rate \* input_event_num)
+Figure 2: Analysis about compression rates.
+
+
+aee
+
+# 3.5 Discussions
+
+Generation Length. Previous work on timeline summarization (Chieu and Lee, 2004; Martschat and Markert, 2018) relies on the reference timeline to decide the compression parameters, such as the overall length or the number of days. In our model, the number of nodes to be kept is decided by the hyperparameter $m$ . Following previous work, we choose $m$ based on the reference compression rate, i.e., the ratio of the event nodes in reference summary to the input event nodes, as detailed in §3.1. Figure 2 shows the relevance between the performance and compression rate.
+
+Compression Rate. The summarization performance is affected by the compression rate of the reference summary. Figure 2 shows that our model achieves larger gains compared to baselines on the timeline with higher reference compression rates, demonstrating that our model is able to effectively select salient events for a large input corpus.
+
+Timeline Topics. Figure 2 shows that the compression rates do not have correlations with timeline topics, and our performance gains compared to baselines are not closely related to timeline topics, proving the robustness of our method.
+
+Input Graph Size. When generating timelines for the same complex event BP Oil Spill, as shown in Table 5, the performance gain is generally increasing with respect to the input graph size. It proves the effectiveness of our model on selecting salient information from large graphs.
+
+| Model | General | Coverage | Coherence | Temporal Preserving |
| Chieu and Lee (2004) | 2.4 | 1.4 | 2.5 | 1.4 |
| Martschat and Markert (2018) | 3.2 | 2.7 | 3.4 | 2.6 |
| Optimal Transport | 3.9 | 2.9 | 3.7 | 2.8 |
+
+Table 4: Human evaluation on a scale of 1-5 (1 is the worst and 5 is the best).
+
+| Topic: BP Oil Spill | Graph Size | Concat ROUGE_1 |
| Ours | Baseline | Δ |
| bpoil_washingtonpost | 2582 | 0.232 | 0.223 | +0.009 |
| bpoil_guardian | 2744 | 0.566 | 0.536 | +0.029 |
| bpoil_bbc | 2972 | 0.464 | 0.459 | +0.004 |
| bpoil_foxnews | 3032 | 0.341 | 0.328 | +0.014 |
| bpoil_reuters | 3488 | 0.326 | 0.279 | +0.047 |
+
+Table 5: Analysis on the size of input event graph.
+
+# 4 Related Work
+
+Multi-Document Summarization. Graph-based MDS methods (Barzilay et al., 1999; Erkan and Radev, 2004; Haghighi and Vanderwende, 2009; Ganesan et al., 2010; Banerjee et al., 2015; Yasunaga et al., 2017; Fabbri et al., 2019; Liu and Lapata, 2019; Wang et al., 2020; Huang et al., 2020) are closely related to timeline summarization but cannot be directly applied, due to the lack of temporal dimensions.
+
+Timeline Summarization. Due to the lack of training data, timeline summarization focuses on extractive methods with heuristics (Chieu and Lee, 2004; Yan et al., 2011a,b; Binh Tran et al., 2013; Tran et al., 2013, 2015; Nguyen et al., 2014; Wang et al., 2016; Martschat and Markert, 2018), with a few abstractive methods (Steen and Markert, 2019; Chen et al., 2019; Ansah et al., 2019) that require a few gold summaries to work. They both fail to capture the rich event structures and ignore the temporal orders between events. We are the first to use optimal transport on summarization task to select semantic relevant, structurally salient and temporally coherent events.
+
+Graph Representation of Documents. In general NLP research, people have built various text graphs by augmenting original text sequences with different hidden structural information, such as entity-centric graphs for efficient joint-encoding of large corpora (Wu et al., 2021; De Cao et al., 2019; Ding et al., 2019; Asai et al., 2020; Min et al., 2019; Das et al., 2019). Event graphs from a single document have been built for event schema induction (Li et al., 2018, 2020b), event coreference resolution (Phung et al., 2021; Zeng et al., 2021),
+
+etc. However, they ignore relations between event arguments, or only use hierarchical or temporal relations to connect events. Also, cross-document entity coreference and event coreference resolution are critical for large corpora understanding, while previous work focuses on a single document. Our approach is unique in building event-centric graphs across documents, with rich argument and temporal information.
+
+# 5 Conclusions and Future Work
+
+We propose a novel event graph compression framework for timeline summarization and achieve state-of-the-art on multiple real-world datasets. Our usage of event graphs allows for efficient joint encoding of a large number of documents; and our proposed time-aware optimal transport allows unsupervised training of the entire framework. Future work includes extending our approach to abstractive summarization, and adding subevent relation to hierarchically generate the timeline.
+
+# Acknowledgement
+
+This research is based upon work in part supported by U.S. DARPA KAIROS Program No. FA8750-19-2-1004, FA8750-19-C-0206, the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA), via contract No. FA8650-17-C-9116. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of DARPA, ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation therein.
+
+# References
+
+Jeffery Ansah, Lin Liu, Wei Kang, Selasi Kwashie, Jixue Li, and Jiuyong Li. 2019. A graph is worth a thousand words: Telling event stories using timeline summarization graphs. In *The World Wide Web*
+
+Conference, WWW 2019, San Francisco, CA, USA, May 13-17, 2019, pages 2565-2571. ACM.
+Akari Asai, Kazuma Hashimoto, Hannaneh Hajishirzi, Richard Socher, and Caiming Xiong. 2020. Learning to retrieve reasoning paths over wikipedia graph for question answering. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
+Siddhartha Banerjee, Prasenjit Mitra, and Kazunari Sugiyama. 2015. Multi-document abstractive summarization using ILP based multi-sentence compression. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2015, Buenos Aires, Argentina, July 25-31, 2015, pages 1208-1214. AAAI Press.
+Regina Barzilay, Kathleen R. McKeown, and Michael Elhadad. 1999. Information fusion in the context of multi-document summarization. In Proceedings of the 37th Annual Meeting of the Association for Computational Linguistics, pages 550-557, College Park, Maryland, USA. Association for Computational Linguistics.
+Giang Binh Tran, Mohammad Alrifai, and Dat Quoc Nguyen. 2013. Predicting relevant news events for timeline summaries. In Proceedings of the 22nd International Conference on World Wide Web, pages 91-92.
+Paweł Budzianowski and Ivan Vulić. 2019. Hello, it's GPT-2 - how can I help you? towards the use of pretrained language models for task-oriented dialogue systems. In Proceedings of the 3rd Workshop on Neural Generation and Translation, pages 15-22, Hong Kong. Association for Computational Linguistics.
+Xiuying Chen, Zhangming Chan, Shen Gao, Meng-Hsuan Yu, Dongyan Zhao, and Rui Yan. 2019. Learning towards abstractive timeline summarization. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJ-CAI 2019, Macao, China, August 10-16, 2019, pages 4939-4945. ijcai.org.
+Hai Leong Chieu and Yoong Keok Lee. 2004. Query based event extraction along a timeline. In Proceedings of the 27th annual international ACM SIGIR conference on Research and development in information retrieval, pages 425-432.
+Marco Cuturi. 2013. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013. Proceedings of a meeting held December 5-8, 2013, Lake Tahoe, Nevada, United States, pages 2292-2300.
+Rajarshi Das, Ameya Godbole, Dilip Kavarthapu, Zhiyu Gong, Abhishek Singhal, Mo Yu, Xiaoxiao
+
+Guo, Tian Gao, Hamed Zamani, Manzil Zaheer, and Andrew McCallum. 2019. Multi-step entity-centric information retrieval for multi-hop question answering. In Proceedings of the 2nd Workshop on Machine Reading for Question Answering, pages 113-118, Hong Kong, China. Association for Computational Linguistics.
+Nicola De Cao, Wilker Aziz, and Ivan Titov. 2019. Question answering by reasoning across documents with graph convolutional networks. 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 2306-2317, Minneapolis, Minnesota. Association for Computational Linguistics.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019a. 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.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019b. 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.
+Ming Ding, Chang Zhou, Qibin Chen, Hongxia Yang, and Jie Tang. 2019. Cognitive graph for multi-hop reading comprehension at scale. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2694-2703, Florence, Italy. Association for Computational Linguistics.
+Günes Erkan and Dragomir R Radev. 2004. Lexrank: Graph-based lexical centrality as salience in text summarization. Journal of artificial intelligence research, 22:457-479.
+Alexander Fabbri, Irene Li, Tianwei She, Suyi Li, and Dragomir Radev. 2019. Multi-news: A large-scale multi-document summarization dataset and abstractive hierarchical model. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1074-1084, Florence, Italy. Association for Computational Linguistics.
+Elena Filatova and Vasileios Hatzivassiloglou. 2004. Event-based extractive summarization. In Text Summarization Branches Out, pages 104-111, Barcelona, Spain. Association for Computational Linguistics.
+
+Kavita Ganesan, ChengXiang Zhai, and Jiawei Han. 2010. Opinosis: A graph based approach to abstractive summarization of highly redundant opinions. In Proceedings of the 23rd International Conference on Computational Linguistics (Coling 2010), pages 340-348, Beijing, China. Coling 2010 Organizing Committee.
+Aria Haghighi and Lucy Vanderwende. 2009. Exploring content models for multi-document summarization. In Proceedings of Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 362-370, Boulder, Colorado. Association for Computational Linguistics.
+Luyang Huang, Lingfei Wu, and Lu Wang. 2020. Knowledge graph-augmented abstractive summarization with semantic-driven cloze reward. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5094-5107, Online. Association for Computational Linguistics.
+Thomas N. Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulouse, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net.
+Tuan Lai, Heng Ji, Trung Bui, Quan Hung Tran, Franck Dernoncourt, and Walter Chang. 2021. A context-dependent gated module for incorporating symbolic semantics into event coreference resolution. arXiv preprint arXiv:2104.01697.
+Manling Li, Alireza Zareian, Qi Zeng, Spencer Whitehead, Di Lu, Heng Ji, and Shih-Fu Chang. 2020a. Cross-media structured common space for multimedia event extraction. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2557-2568, Online. Association for Computational Linguistics.
+Manling Li, Qi Zeng, Ying Lin, Kyunghyun Cho, Heng Ji, Jonathan May, Nathanael Chambers, and Clare Voss. 2020b. Connecting the dots: Event graph schema induction with path language modeling. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 684-695, Online. Association for Computational Linguistics.
+Zhongyang Li, Xiao Ding, and Ting Liu. 2018. Constructing narrative event evolutionary graph for script event prediction. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, July 13-19, 2018, Stockholm, Sweden, pages 4201-4207. ijcai.org.
+Renjie Liao, Yujia Li, Yang Song, Shenlong Wang, William L. Hamilton, David Duvenaud, Raquel Urtasun, and Richard S. Zemel. 2019. Efficient graph generation with graph recurrent attention networks.
+
+In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver; BC, Canada, pages 4257-4267.
+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.
+Yang Liu and Mirella Lapata. 2019. Hierarchical transformers for multi-document summarization. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5070-5081, Florence, Italy. Association for Computational Linguistics.
+Tengfei Ma and Jie Chen. 2021. Unsupervised learning of graph hierarchical abstractions with differentiable coarsening and optimal transport. Proceedings of the Thirty-Fifth AAAI Conference on Artificial Intelligence.
+Udi Manber. 1989. Introduction to algorithms: a creative approach. Addison-Wesley Longman Publishing Co., Inc.
+Christopher Manning, Mihai Surdeanu, John Bauer, Jenny Finkel, Steven Bethard, and David McClosky. 2014. The Stanford CoreNLP natural language processing toolkit. In Proceedings of 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 55-60, Baltimore, Maryland. Association for Computational Linguistics.
+Sebastian Martschat and Katja Markert. 2018. A temporally sensitive submodularity framework for timeline summarization. In Proceedings of the 22nd Conference on Computational Natural Language Learning, pages 230-240, Brussels, Belgium. Association for Computational Linguistics.
+Sewon Min, Danqi Chen, Luke Zettlemoyer, and Hannaneh Hajishirzi. 2019. Knowledge guided text retrieval and reading for open domain question answering. arXiv preprint arXiv:1911.03868.
+Kiem-Hieu Nguyen, Xavier Tannier, and Veronique Moriceau. 2014. Ranking multidocument event descriptions for building thematic timelines. In Proceedings of COLING 2014, the 25th International Conference on Computational Linguistics: Technical Papers, pages 1208-1217, Dublin, Ireland. Dublin City University and Association for Computational Linguistics.
+Qiang Ning, Sanjay Subramanian, and Dan Roth. 2019. An improved neural baseline for temporal relation extraction. 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 6203-6209, Hong Kong, China. Association for Computational Linguistics.
+Xiaoman Pan, Taylor Cassidy, Ulf Hermjakob, Heng Ji, and Kevin Knight. 2015. Unsupervised entity linking with Abstract Meaning Representation. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1130-1139, Denver, Colorado. Association for Computational Linguistics.
+Xiaoman Pan, Boliang Zhang, Jonathan May, Joel Nothman, Kevin Knight, and Heng Ji. 2017. Crosslingual name tagging and linking for 282 languages. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1946-1958, Vancouver, Canada. Association for Computational Linguistics.
+Duy Phung, Tuan Ngo Nguyen, and Thien Huu Nguyen. 2021. Hierarchical graph convolutional networks for jointly resolving cross-document coreference of entity and event mentions. In Proceedings of the Fifteenth Workshop on Graph-Based Methods for Natural Language Processing (TextGraphs-15), pages 32-41.
+Stephen E Robertson, Steve Walker, Susan Jones, Micheline M Hancock-Beaulieu, Mike Gatford, et al. 1995. Okapi at trec-3. Nist Special Publication Sp, 109:109.
+Richard Sinkhorn. 1964. A relationship between arbitrary positive matrices and doubly stochastic matrices. The annals of mathematical statistics, 35(2):876-879.
+Julius Steen and Katja Markert. 2019. Abstractive timeline summarization. In Proceedings of the 2nd Workshop on New Frontiers in Summarization, pages 21-31, Hong Kong, China. Association for Computational Linguistics.
+Giang Tran, Mohammad Alrifai, and Eelco Herder. 2015. Timeline summarization from relevant headlines. In European Conference on Information Retrieval, pages 245-256. Springer.
+Giang Binh Tran, Tuan A Tran, Nam-Khanh Tran, Mohammad Alrifai, and Nattiya Kanhabua. 2013. Leveraging learning to rank in an optimization framework for timeline summarization. In SIGIR 2013 Workshop on Time-aware Information Access (TAIA).
+Danqing Wang, Pengfei Liu, Yining Zheng, Xipeng Qiu, and Xuanjing Huang. 2020. Heterogeneous graph neural networks for extractive document summarization. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6209-6219, Online. Association for Computational Linguistics.
+
+William Yang Wang, Yashar Mehdad, Dragomir R. Radev, and Amanda Stent. 2016. A low-rank approximation approach to learning joint embeddings of news stories and images for timeline summarization. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 58-68, San Diego, California. Association for Computational Linguistics.
+Haoyang Wen, Yanru Qu, Heng Ji, Qiang Ning, Jiawei Han, Avirup Sil, Hanghang Tong, and Dan Roth. 2021. Event time extraction and propagation via graph attention networks. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 62-73.
+Lingfei Wu, Yu Chen, Kai Shen, Xiaojie Guo, Hanning Gao, Shucheng Li, Jian Pei, and Bo Long. 2021. Graph neural networks for natural language processing: A survey. arXiv preprint arXiv:2106.06090.
+Hongteng Xu, Dixin Luo, and Lawrence Carin. 2019. Scalable gromov-wasserstein learning for graph partitioning and matching. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 3046-3056.
+Rui Yan, Liang Kong, Congrui Huang, Xiaojun Wan, Xiaoming Li, and Yan Zhang. 2011a. Timeline generation through evolutionary trans-temporal summarization. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pages 433-443, Edinburgh, Scotland, UK. Association for Computational Linguistics.
+Rui Yan, Xiaojun Wan, Jahna Otterbacher, Liang Kong, Xiaoming Li, and Yan Zhang. 2011b. Evolutionary timeline summarization: a balanced optimization framework via iterative substitution. In Proceedings of the 34th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2011, Beijing, China, July 25-29, 2011, pages 745-754. ACM.
+Michihiro Yasunaga, Rui Zhang, Kshitijh Meelu, Ayush Parek, Krishnan Srinivasan, and Dragomir Radev. 2017. Graph-based neural multi-document summarization. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), pages 452-462, Vancouver, Canada. Association for Computational Linguistics.
+Qi Zeng, Manling Li, Tuan Lai, Heng Ji, Mohit Bansal, and Hanghang Tong. 2021. Gene: Global event network embedding. In Proceedings of the Fifteenth Workshop on Graph-Based Methods for Natural Language Processing (TextGraphs-15), pages 42-53.
+Jinming Zhao, Ming Liu, Longxiang Gao, Yuan Jin, Lan Du, He Zhao, He Zhang, and Gholamreza
+
+Haffari. 2020. Summpip: Unsupervised multi-document summarization with sentence graph compression. In Proceedings of the 43rd International ACM SIGIR conference on research and development in Information Retrieval, SIGIR 2020, Virtual Event, China, July 25-30, 2020, pages 1949-1952. ACM.
+Hao Zheng and Mirella Lapata. 2019. Sentence centrality revisited for unsupervised summarization. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6236-6247, Florence, Italy. Association for Computational Linguistics.
+
+# A Example Output
+
+| Method | Example Output |
| Reference | 2011-02-18Libyan state television shows images of men chanting pro-Gadhafi slogans , waving flags and singing around the Libyan leader ’s limousine as it creeps through Tripoli . In Benghazi, human rights groups and protesters claim they ’re under attack by pro-government security forces. Among the tens of thousands of protesters who take to the streets , at least 20 people are killed and 200 are wounded , according to medical sources . 2011-02-19Protests continue to turn violent , however the death and injury toll is unclear .In Benghazi, witnesses report bloody clashes with soldiers firing tear gas and bullets . Witnesses say protests have erupted in cities across the country . Human Rights Watch reports that 84 people have been killed in Libyan demonstrations since February 15 . 2011-02-20Violence surges in Benghazi where a witness says protesters have taken control of the city and much of Tripoli . Gadhafi ’s son Saif al-Islam Gadhafi appears on state television to warn demonstrators that the country could fall into civil war if their protests do not subside . 2011-02-21The Libyan newspaper Quryna reports that the country ’s justice minister has resigned to protest what he calls a “ bloody situation and use of excessive force ” by security forces against protesters. |
| Chieu and Lee (2004) | 2011-02-21By the CNN Wire Staff Libya protests spread to Tripoli State Department has ordered the evacuation of all non-essential personnel The Obama administration is stressing the need to avoid violence against protesters Gadhafi ’s son has warned of a possible civil war if protesters do not back down Washington ( CNN ) - The United States on Monday condemned the violence in Libya and called for a halt to the ” unacceptable bloodshed ” in response to civil unrest , Secretary of State Hillary Clinton said in a statement . |
| Martschat and Markert (2018) | 2011-02-15Protests began February 15 in the eastern city of Benghazi , Libya ’s second largest . Witness says square in Gadhazi is full of protesters , but there is little sign of police or military Tanks surrounded demonstrators in Benghazi , a protestor says 50 reportedly killed since Tuesday , 20 of them Friday U.S. president condemns the government crackdowns in Libya , Bahrain and Yemen ( CNN ) - At least 20 people were killed and 200 more were injured Friday in the northern Mediterranean city of Gadhazi , Libya ’s second-largest , said a medical source in Gadhazi who was not identified for security reasons . 2011-02-21Among other things , Washington was taking a close look at a speech early Monday by Saif al-Islam Gadhafi - the Libyan leader ’s son - which included warnings of a civil war if demonstrations in the North African country do n’ t stop . The United States on Monday condemned the violence in Libya and called for a halt to the ” unacceptable bloodshed ” in response to civil unrest , Secretary of State Hillary Clinton said in a statement . |
| Ours | 2011-02-16Source : Several people arrested after police confronted protesters in Gadhazi , Libya . 2011-02-18An Iranian opposition member warns that street protests could lead to civil war “ Nastaran ” warns that protests are strengthening Iran ’ s Revolutionary Guard and pro - government militia. 2011-02-19A Libyan woman supportive of the protesters , who was not identified to protect her safety , told CNN that army soldiers on Saturday initially claimed solidarity with the demonstrators , only to reverse their tack and open fire on the crowd . Three of those injured are in critical condition , the sources said . While Human Rights Watch , citing interviews with hospital staff and witnesses , reported 84 deaths since Tuesday , the total number is unknown and could n ’ t be independently confirmed by CNN . 2011-02-20Protests continue to turn violent , however the death and injury toll is unclear . |
+
+Table 6: Example Output. The event triggers are highlighted in red. The date selection and event node coverage of our method are much higher compared to baselines.
\ No newline at end of file
diff --git a/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/images.zip b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..4fad191650d3785d9cd7dca40def7d8baf948131
--- /dev/null
+++ b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4340d863a6e5355a9b838c027ecaa27d40f756cd8f43e9035839732ad9b517eb
+size 1040841
diff --git a/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/layout.json b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..7a0d9c33cb9b11518bc8d72363677a2b2102b010
--- /dev/null
+++ b/timelinesummarizationbasedoneventgraphcompressionviatimeawareoptimaltransport/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:40a369a8304252cfacda004732455f17b92f0730605919f64e964739e911224f
+size 477518
diff --git a/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/ab58ba7f-2d9e-4d06-a29b-27effc445e06_content_list.json b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/ab58ba7f-2d9e-4d06-a29b-27effc445e06_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..bb17d64c3927234639bf0499d5d60007e1753cbf
--- /dev/null
+++ b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/ab58ba7f-2d9e-4d06-a29b-27effc445e06_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bbdbd0380d91819b57768200d5def341531c24fc99f90cb35b7bb574e041a407
+size 96723
diff --git a/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/ab58ba7f-2d9e-4d06-a29b-27effc445e06_model.json b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/ab58ba7f-2d9e-4d06-a29b-27effc445e06_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..8bdbf2d74625499471d497a3a1d031dfc67d80c7
--- /dev/null
+++ b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/ab58ba7f-2d9e-4d06-a29b-27effc445e06_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8cfbcfef66ddfaf0a3a269bdb268885a0136087828e5257265da88bb87e92d9c
+size 116776
diff --git a/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/ab58ba7f-2d9e-4d06-a29b-27effc445e06_origin.pdf b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/ab58ba7f-2d9e-4d06-a29b-27effc445e06_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..f56fab6d5a1545a16d3fd8b8f69f2e0fb7ed9939
--- /dev/null
+++ b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/ab58ba7f-2d9e-4d06-a29b-27effc445e06_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0b051bb904a457f655f899f59673fedabbe7e9a4e73dc6572c3db72da67a31d5
+size 1113587
diff --git a/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/full.md b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..bfa52e8027e0633a120244ab5b88e17a0314ffda
--- /dev/null
+++ b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/full.md
@@ -0,0 +1,435 @@
+# TimeTraveler: Reinforcement Learning for Temporal Knowledge Graph Forecasting
+
+Haohai Sun $^{1*}$ Jialun Zhong $^{1*}$ Yunpu Ma $^{2*}$ Zhen Han $^{2,3*}$ Kun He $^{1\dagger}$
+
+1 School of Computer Science and Technology, Huazhong University of Science and Technology
+
+$^{2}$ Institute of Informatics, LMU Munich $^{3}$ Corporate Technology, Siemens AG
+
+{haohais, zhongjl}@hust.edu.cn
+
+cognitive.yunpu@gmail.com, zhen.han@campus.lmu.de
+
+brooklet60@hust.edu.cn
+
+# Abstract
+
+Temporal knowledge graph (TKG) reasoning is a crucial task that has gained increasing research interest in recent years. Most existing methods focus on reasoning at past timestamps to complete the missing facts, and there are only a few works of reasoning on known TKGs to forecast future facts. Compared with the completion task, the forecasting task is more difficult and faces two main challenges: (1) how to effectively model the time information to handle future timestamps? (2) how to make inductive inference to handle previously unseen entities that emerge over time? To address these challenges, we propose the first reinforcement learning method for forecasting. Specifically, the agent travels on historical knowledge graph snapshots to search for the answer. Our method defines a relative time encoding function to capture the timespan information, and we design a novel time-shaped reward based on Dirichlet distribution to guide the model learning. Furthermore, we propose a novel representation method for unseen entities to improve the inductive inference ability of the model. We evaluate our method for this link prediction task at future timestamps. Extensive experiments on four benchmark datasets demonstrate substantial performance improvement meanwhile with higher explainability, less calculation, and fewer parameters when compared with existing state-of-the-art methods.
+
+# 1 Introduction
+
+Storing a wealth of human knowledge and facts, Knowledge Graphs (KGs) are widely used for many downstream Artificial Intelligence (AI) applications, such as recommendation systems (Guo et al., 2020), dialogue generation (Moon et al., 2019), and question answering (Zhang et al., 2018). KGs store facts in the form of triples
+
+$(e_{s},r,e_{o})$ , i.e. (subject entity, predicate/relation, object entity), such as (LeBron_James, plays_for, Cleveland_Cavaliers). Each triple corresponds to a labeled edge of a multi-relational directed graph. However, facts constantly change over time. To reflect the timeliness of facts, Temporal Knowledge Graphs (TKGs) additionally associate each triple with a timestamp $(e_s,r,e_o,t)$ , e.g., (LeBron_James, plays_for, Cleveland_Cavaliers, 2014-2018). Usually, we represent a TKG as a sequence of static KG snapshots.
+
+TKG reasoning is a process of inferring new facts from known facts, which can be divided into two types, interpolation and extrapolation. Most existing methods (Jiang et al., 2016a; Dasgupta et al., 2018; Goel et al., 2020; Wu et al., 2020) focus on interpolated TKG reasoning to complete the missing facts at past timestamps. In contrast, extrapolated TKG reasoning focuses on forecasting future facts (events). In this work, we focus on extrapolated TKG reasoning by designing a model for the link prediction at future timestamps. E.g., "which team LeBron James will play for in 2022?" can be seen as a query of link prediction at a future timestamp: (LeBron_James, plays_for, ?, 2022).
+
+Compared with the interpolation task, there are two challenges for extrapolation. (1) Unseen timestamps: the timestamps of facts to be forecast do not exist in the training set. (2) Unseen entities: new entities may emerge over time, and the facts to be predicted may contain previously unseen entities. Hence, the interpolation methods can not treat the extrapolation task.
+
+The recent extrapolation method RE-NET (Jin et al., 2020) uses Recurrent Neural Network (RNN) to capture temporally adjacent facts information to predict future facts. CyGNet (Zhu et al., 2021) focuses on the repeated pattern to count the frequency of similar facts in history. However, these methods only use the random vectors to represent the previously unseen entities and view the link prediction
+
+task as a multi-class classification task, causing it unable to handle the second challenge. Moreover, they cannot explicitly indicate the impact of historical facts on predicted facts.
+
+Inspired by path-based methods (Das et al., 2018; Lin et al., 2018) for static KGs, we propose a new temporal-path-based reinforcement learning (RL) model for extrapolated TKG reasoning. We call our agent the "TTime Traveler" (TITer), which travels on the historical KG snapshots to find answers for future queries. TITer starts from the query subject node, sequentially transfers to a new node based on temporal facts related to the current node, and is expected to stop at the answer node. To handle the unseen-timestamp challenge, TITer uses a relative time encoding function to capture the time information when making a decision. We further design a novel time-shaped reward based on Dirichlet distribution to guide the model to capture the time information. To tackle the unseen entities, we introduce a temporal-path-based framework and propose a new representation mechanism for unseen entities, termed the Inductive Mean (IM) representation, so as to improve the inductive reasoning ability of the model.
+
+Our main contributions are as follows:
+
+- This is the first temporal-path-based reinforcement learning model for extrapolated TKG reasoning, which is explainable and can handle unseen timestamps and unseen entities.
+- We propose a new method to model the time information. We utilize a relative time encoding function for the agent to capture the time information and use a time-shaped reward to guide the model learning.
+- We propose a novel representation mechanism for unseen entities, which leverages query and trained entity embeddings to represent untrained (unseen) entities. This can stably improve the performance for inductive inference without increasing the computational cost.
+- Extensive experiments indicate that our model substantially outperforms existing methods with less calculation and fewer parameters.
+
+# 2 Related Work
+
+# 2.1 Static Knowledge Graph Reasoning
+
+Embedding-based methods represent entities and relations as low-dimensional embeddings in different representation spaces, such as Euclidean space (Nickel et al., 2011; Bordes et al., 2013),
+
+complex vector space (Trouillon et al., 2016; Sun et al., 2019), and manifold space (Chami et al., 2020). These methods predict missing facts by scoring candidate facts based on entity and relation embeddings. Other works use deep learning models to encode the embeddings, such as Convolution Neural Network (CNN) (Dettmers et al., 2018; Vashishth et al., 2020) to obtain deeper semantics, or Graph Neural Network (GNN) (Schlichtkrull et al., 2018; Nathani et al., 2019; Zhang et al., 2020) to encode multi-hop structural information.
+
+Besides, path-based methods are also widely used in KG reasoning. Lin et al. (2015) and Guo et al. (2019) use RNN to compose the implications of paths. Reinforcement learning methods (Xiong et al., 2017; Das et al., 2018; Lin et al., 2018) view the task as a Markov decision process (MDP) to find paths between entity pairs, which are more explanatory than embedding-based methods.
+
+# 2.2 Temporal Knowledge Graph Reasoning
+
+A considerable amount of works extend static KG models to the temporal domain. These models redesign embedding modules and score functions related to time (Jiang et al., 2016b; Dasgupta et al., 2018; Goel et al., 2020; Lacroix et al., 2020; Han et al., 2020a). Some works leverage message-passing networks to capture graph snapshot neighborhood information (Wu et al., 2020; Jung et al., 2020). These works are designed for interpolation.
+
+For extrapolation, Know-Evolve (Trivedi et al., 2017) and GHNN (Han et al., 2020b) use temporal point process to model facts evolved in the continuous time domain. Additionally, TANGO (Ding et al., 2021) explores the neural ordinary differential equation to build a continuous-time model. RE-NET (Jin et al., 2020) considers the multihop structural information of snapshot graphs and uses RNN to model entity interactions at different times. CyGNet (Zhu et al., 2021) finds that many facts often show a repeated pattern and make reference to known facts in history. These approaches lack to explain their predictions and cannot handle the previously unseen entities. Explanatory model xERTE (Han et al., 2021) uses a subgraph sampling technique to build an inference graph. Although the representation method that refers to GraphSAGE (Hamilton et al., 2017) makes it possible to deal with unseen nodes, the continuous expansion of inference graphs also severely restricts the inference speed.
+
+# 3 Methodology
+
+Analogizing to the previous work on KGs (Das et al., 2018), we frame the RL formulation as "walk-based query-answering" on a temporal graph: the agent starts from the source node (subject entity of the query) and sequentially selects outgoing edges to traverse to new nodes until reaching a target. In this section, we first define our task, and then describe the reinforcement learning framework and how we incorporate the time information into the on-policy reinforcement learning model. The optimization strategy and the inductive mean representation method for previously unseen entities are provided in the end. Figure 2 is the overview of our model.
+
+# 3.1 Task Definition
+
+Here we formally define the task of extrapolation in a TKG. Let $\mathcal{E},\mathcal{R},\mathcal{T}$ , and $\mathcal{F}$ denote the sets of entities, relations, timestamps, and facts, respectively. A fact in a TKG can be represented in the form of a quadruple $(e_s,r,e_o,t)$ , where $r\in \mathcal{R}$ is a directed labeled edge between a subject entity $e_{s}\in \mathcal{E}$ and an object entity $e_o\in \mathcal{E}$ at time $t\in \mathcal{T}$ . We can represent a TKG by the graph snapshots over time. A TKG can be described as $\mathcal{G}_{(1,T)} = \{\mathcal{G}_1,\mathcal{G}_2,\dots,\mathcal{G}_T\}$ , where $\mathcal{G}_t = \{\mathcal{E}_t,\mathcal{R},\mathcal{F}_t\}$ is a multi-relational directed TKG snapshot, and $\mathcal{E}_t$ and $\mathcal{F}_t$ denote entities and facts that exist at time $t$ . In order to distinguish the graph nodes at different times, we let a node be a two-tuple with entity and timestamp: $e_i^t = (e_i,t)$ . Thus, a fact (or event) $(e_s,r,e_o,t)$ can also be seen as an edge from source node $e_s^t$ to destination node $e_o^t$ with type $r$ .
+
+Extrapolated TKG reasoning is the task of predicting the evolution of KGs over time, and we perform link prediction at future times. It is also forecasting of events occurring in the near future. Given a query $(e_q,r_q,?,t_q)$ or $(?,r_q,e_q,t_q)$ , we have a set of known facts $\{(e_{s_i},r_i,e_{o_i},t_i)|t_i < t_q\}$ . These known facts constitute the known TKG, and our goal is to predict the missing object or subject entity in the query.
+
+# 3.2 Reinforcement Learning Framework
+
+Because there is no edge among the typical TKG snapshots, the agent cannot transfer from one snapshot to another. Hence, we sequentially add three types of edges. (i) Reversed Edges. For each quadruple $(e_s,r,e_o,t)$ , we add $(e_o,r^{-1},e_s,t)$ to
+
+
+Figure 1: Illustration of the TKG with temporal edges. To ensure the figure be clear enough, we omit the self-loop edges and reversed edges. The dotted lines are temporal edges.
+
+the TKG, where $r^{-1}$ indicates the reciprocal relation of $r$ . Thus, we can predict the subject entity by converting $(?,r,e_q,t)$ to $(e_q,r^{-1},?,t)$ without loss of generality. (ii) Self-loop Edges. Self-loop edges can allow the agent to stay in a place and work as a stop action when the agent search unrolled for a fixed number of steps. (iii) Temporal Edges. The agent can walk from node $e_s^{t_j}$ to node $e_o^{t_i}$ through edge $r$ , if $(e_s,r,e_o,t_i)$ exits and $t_i < t_j \leq t_q$ . Temporal edges indicate the impact of the past fact on the entity and help the agent find the answer in historical facts. Figure 1 shows the graph with temporal edges.
+
+Our method can be formulated as a Markov Decision Process (MDP), and the components of which are elaborated as follows.
+
+States. Let $S$ denote the state space, and a state is represented by a quintuple $s_l = (e_l, t_l, e_q, t_q, r_q) \in S$ , where $(e_l, t_l)$ is the node visited at step $l$ and $(e_q, t_q, r_q)$ is the elements in the query. $(e_q, t_q, r_q)$ can be viewed as the global information while $(e_l, t_l)$ is the local information. The agent starts from the source node of the query, so the initial state is $s_0 = (e_q, t_q, e_q, t_q, r_q)$ .
+
+Actions. Let $\mathcal{A}$ denote the action space, and $\mathcal{A}_l$ denote the set of optional actions at step $l$ , $\mathcal{A}_l \subset \mathcal{A}$ consists of outgoing edges of node $e_l^{t_l}$ . Concretely, $\mathcal{A}_l$ should be $\{(r', e', t') | (e_l, r', e', t') \in \mathcal{F}, t' \leq t_l, t' < t_q\}$ , but an entity usually has many related historical facts, leading to a large number of optional actions. Thus, the final set of optional actions $\mathcal{A}_l$ is sampled from the set of above outgoing edges.
+
+Transition. The environment state is transferred to a new node through the edge selected by the agent. The transition function $\delta : S \times \mathcal{A} \to S$ defined by $\delta(s_{l}, \mathcal{A}_{l}) = s_{l+1} = (e_{l+1}, t_{l+1}, e_{q}, t_{q}, r_{q})$ , where $\mathcal{A}_{l}$ is the sampled outgoing edges of $e_{l}^{t_{l}}$ .
+
+
+Figure 2: Overview of TITer. Given a query $(e_q, r_q, ?(e_{gt}), t_q)$ , TITer starts from node $e_q^{t_q}$ . At each step, TITer samples an outgoing edge and traverses to a new node according to $\pi_\theta$ (policy network). We use the last step of the search as an example. $e_l^{t_l}$ is the current node. Illustration of policy network provides the process for scoring one of the candidate actions $(r_1, e_1, t_1)$ . TITer samples an action based on the transition probability calculated from all candidate scores. When the search is completed, the time-shaped reward function will give the agent a reward based on the estimated Dirichlet distribution $Dir(\alpha_{r_q})$ .
+
+Rewards with shaping. The agent receives a terminal reward of 1 if it arrives at a correct target entity at the end of the search and 0 otherwise. If $s_{L} = (e_{L}, t_{L}, e_{q}, t_{q}, r_{q})$ is the final state and $(e_{q}, r_{q}, e_{gt}, t_{q})$ is the ground truth fact, the reward formulation is:
+
+$$
+R \left(s _ {L}\right) = \mathbb {I} \left\{e _ {L} = = e _ {g t} \right\}. \tag {1}
+$$
+
+Usually, the quadruples with the same entity are concentrated in specific periods, which causes temporal variability and temporal sparsity (Wu et al., 2020). Due to such property, the answer entity of the query has a distribution over time, and we can introduce this prior knowledge into the reward function to guide the agent learning. The time-shaped reward can let the agent know which snapshot is more likely to find the answer. Based on the training set, we estimate a Dirichlet distribution for each relation. Then, we shape the original reward with Dirichlet distributions:
+
+$$
+\widetilde {R} (s _ {L}) = (1 + p _ {\Delta t _ {L}}) R (s _ {L}),
+$$
+
+$$
+\Delta t _ {L} = t _ {q} - t _ {L}, \tag {2}
+$$
+
+$$
+(p _ {1}, \dots , p _ {K}) \sim D i r i c h l e t (\alpha_ {r _ {q}}),
+$$
+
+where $\alpha_{r_q} \in \mathbb{R}^K$ is a vector of parameters of the Dirichlet distribution for a relation $r_q$ . We can estimate $\alpha_{r_q}$ from the training set. For each quadruple with relation $r_q$ in the training set, we count the number of times the object entity appears in each of the most recent $K$ historical snapshots. Then, we obtain a multinomial sample $x_i$ and $D = \{x_1, \ldots, x_N\}$ . To maximize the likelihood:
+
+$$
+p \left(D \mid \alpha_ {r _ {q}}\right) = \prod_ {i} p \left(x _ {i} \mid \alpha_ {r _ {q}}\right), \tag {3}
+$$
+
+we can estimate $\alpha_{r_q}$ . The maximum can be computed via the fixed-point iteration, and more calculu
+
+lation formulas are provided in Appendix A.5. Because Dirichlet distribution has a conjugate prior, we can update it easily when we have more observed facts to train the model.
+
+# 3.3 Policy Network
+
+We design a policy network $\pi_{\theta}(a_l|s_l) = P(a_l|s_l;\theta)$ to model the agent in a continuous space, where $a_{l}\in \mathcal{A}_{l}$ , and $\theta$ are the model parameters. The policy network consists of the following three modules.
+
+Dynamic embedding. We assign each relation $r \in \mathcal{R}$ a dense vector embedding $\mathbf{r} \in \mathbb{R}^{d_r}$ . As the characteristic of entities may change over time, we adopt a relative time representation method for entities. We use a dynamic embedding to represent each node $e_i^t = (e_i, t)$ in $\mathcal{G}_t$ , and use $\mathbf{e} \in \mathbb{R}^{d_e}$ to represent the latent invariant features of entities. We then define a relative time encoding function $\Phi(\Delta t) \in \mathbb{R}^{d_t}$ to represent the time information. $\Delta t = t_q - t$ and $\Phi(\Delta t)$ is formulated as follows:
+
+$$
+\boldsymbol {\Phi} (\Delta t) = \sigma (\mathbf {w} \Delta t + \mathbf {b}), \tag {4}
+$$
+
+where $\mathbf{w},\mathbf{b}\in \mathbb{R}^{d_t}$ are vectors with learnable parameters and $\sigma$ is an activation function. $d_r,d_e$ and $d_{t}$ represent the dimensions of the embedding. Then, we can get the representation of a node $e_i^t$ .. $\mathbf{e}_i^t = [\mathbf{e}_i;\Phi (\Delta t)]$
+
+Path encoding. The search history $h_l = ((e_q, t_q), r_1, (e_1, t_1), \dots, r_l, (e_l, t_l))$ is the sequence of actions taken. The agent encodes the history $h_l$ with a LSTM:
+
+$$
+\mathbf {h} _ {l} = \operatorname {L S T M} \left(\mathbf {h} _ {l - 1}, \left[ \mathbf {r} _ {l - 1}; \mathbf {e} _ {l - 1} ^ {t _ {l - 1}} \right]\right), \tag {5}
+$$
+
+$$
+\mathbf {h} _ {0} = \operatorname {L S T M} (\mathbf {0}, [ \mathbf {r} _ {0}; \mathbf {e} _ {q} ^ {t _ {q}} ]).
+$$
+
+Here, $\mathbf{r}_0$ is a start relation, and we keep the LSTM state unchanged when the last action is self-loop.
+
+Action scoring. We score each optional action and calculate the probability of state transition. Let $a_{n} = (e_{n},t_{n},r_{n})\in \mathcal{A}_{l}$ represent an optional action at step $l$ . Future events are usually uncertain, and there is usually no strong causal logic chain for some queries, so the correlation between the entity and query is sometimes more important. Thus, we use a weighted action scoring mechanism to help the agent pay more attention to attributes of the destination nodes or types of edges. Two MultiLayer Perceptrons (MLPs) are used to encode the state information and output expected destination node $\widetilde{e}$ and outgoing edge $\widetilde{r}$ representations. Then, the agent obtains the destination node score and outgoing edge score of the candidate action by calculating the similarity. With the weighted sum of the two scores, the agent obtains the final candidate action score $\phi (a_n,s_l)$ :
+
+$$
+\phi (a _ {n}, s _ {l}) = \beta_ {n} \left< \widetilde {\mathbf {e}}, \mathbf {e} _ {n} ^ {t _ {n}} \right> + (1 - \beta_ {n}) \left< \widetilde {\mathbf {r}}, \mathbf {r} _ {n} \right > , (6)
+$$
+
+$$
+\widetilde {\mathbf {e}} = \mathbf {W} _ {e} \operatorname {R e L U} \left(\mathbf {W} _ {1} \left[ \mathbf {h} _ {l}; \mathbf {e} _ {q} ^ {t _ {q}}; \mathbf {r} _ {q} \right]\right), \tag {7}
+$$
+
+$$
+\widetilde {\mathbf {r}} = \mathbf {W} _ {r} \mathrm {R e L U} (\mathbf {W} _ {1} [ \mathbf {h} _ {l}; \mathbf {e} _ {q} ^ {t _ {q}}; \mathbf {r} _ {q} ]),
+$$
+
+$$
+\beta_ {n} = \operatorname {s i g m o i d} \left(\mathbf {W} _ {\beta} \left[ \mathbf {h} _ {l}; \mathbf {e} _ {q} ^ {t _ {q}}; \mathbf {r} _ {q}; \mathbf {e} _ {n} ^ {t _ {n}}; \mathbf {r} _ {n} \right]\right), \tag {8}
+$$
+
+where $\mathbf{W}_1, \mathbf{W}_e, \mathbf{W}_r$ and $\mathbf{W}_{\beta}$ are learnable matrices. After scoring all candidate actions in $\mathcal{A}_l$ , $\pi_{\theta}(a_l|s_l)$ can be obtained through softmax.
+
+To summarize, the parameters of the LSTM, MLP and $\Phi$ , the embedding matrices of relation and entity form the parameters in $\theta$ .
+
+# 3.4 Optimization and Training
+
+We fix the search path length to $L$ , and an $L$ -length trajectory will be generated from the policy network $\pi_{\theta}$ : $\{a_1, a_2, \dots, a_L\}$ . The policy network is trained by maximizing the expected reward over all training samples $\mathcal{F}_{train}$ :
+
+$$
+J (\theta) = \mathbb {E} _ {\left(e _ {s}, r, e _ {o}, t\right) \sim \mathcal {F} _ {\text {t r a i n}}} \left[ \mathbb {E} _ {a _ {1}, \dots , a _ {L} \sim \pi_ {\theta}} \right. \tag {9}
+$$
+
+$$
+[ \widetilde {R} (s _ {L} | e _ {s}, r, t) ] ].
+$$
+
+Then, we use the policy gradient method to optimize the policy. The REINFORCE algorithm (Williams, 1992) will iterate through all quadruple in $\mathcal{F}_{train}$ and update $\theta$ with the following stochastic gradient:
+
+$$
+\nabla_ {\theta} J (\theta) \approx \nabla_ {\theta} \sum_ {m \in [ 1, L ]} \widetilde {R} \left(s _ {L} \mid e _ {s}, r, t\right) \log \pi_ {\theta} \left(a _ {l} \mid s _ {l}\right) \tag {10}
+$$
+
+
+Figure 3: Illustration of the IM mechanism. For an unseen entity $e_{q}$ , " $t_{q} - 3 : r_{1}, r_{3}$ " indicates $e_{q}$ has co-occurrence relations $r_{1}, r_{3}$ at $t_{q} - 3$ , and updates its representation based on $E_{r_{1}}, E_{r_{3}}$ , and finally gets the IM representation at $t_{q} - 1$ . Then to answer a query $(e_{q}, r_{2},?, t_{q})$ , we do a prediction shift based on $E_{r_{2}}$ .
+
+# 3.5 Inductive Mean Representation
+
+As new entities always emerge over time, we propose a new entity representation method for previously unseen entities. Previous works (Bhowmik and de Melo, 2020; Han et al., 2021) can represent unseen entities through neighbor information aggregation. However, newly emerging entities usually have very few links, which means that only limited information is available. E.g., for a query (Evan_Mobley, plays_for,?, 2022), entity "Evan_Mobley" does not exist in previous times, but we could infer this entity is a player through relation "plays_for", and assign "Evan_Mobley" a more reasonable initial embedding that facilitates the inference. Here we provide another approach to represent unseen entities by leveraging the query information and embeddings of the trained entities, named Inductive Mean (IM), as illustrated in Figure 3.
+
+Let $\mathcal{G}_{(t_j,t_q - 1)}$ represent the snapshots of the TKG in the test set. The query entity $e_q$ first appears in $\mathcal{G}_{t_j}$ and gets a randomly initialized representation vector. We regard $r$ as the co-occurrence relation of $e_q$ , if there exists a quadruple which contains $(e_q,r)$ . Note that entity $e_q$ may have different co-occurrence relations over time. We denote $R_{t}(e_{q})$ as the co-occurrence relation set of entity $e_q$ at time $t$ . Let $E_{r}$ represent the set that comprises all the trained entities having the co-occurrence relation $r$ . Then, we can obtain the inductive mean representation of the entities with the same co-occurrence relation $r$ :
+
+$$
+\overline {{\mathbf {e} ^ {r}}} = \frac {\sum_ {e \in E _ {r}} \mathbf {e}}{| E _ {r} |}. \tag {11}
+$$
+
+Entities with the same co-occurrence relation $r$ have similar characteristics, so IM can utilize $\overline{\mathbf{e}^r}$ to gradually update the representation of $e_q$ based on the time flow. $0 \leq \mu \leq 1$ is a hyperparameter:
+
+$$
+\mathbf {e} _ {q, t} = \mu \mathbf {e} _ {q, t - 1} + (1 - \mu) \frac {\sum_ {r \in R _ {t} \left(e _ {q}\right)} \overline {{\mathbf {e} ^ {r}}}}{\left| R _ {t} \left(e _ {q}\right) \right|}. \tag {12}
+$$
+
+For relation $r_q$ , we do a prediction shift based on $\overline{\mathbf{e}^{r_q}}$ to make the entity representation more suitable for the current query. To answer a query $(e_q, r_q,?, t_q)$ , we use the combination of $e_q$ 's representation at time $t_q - 1$ and the inductive mean representation $\overline{\mathbf{e}^{r_q}}$ :
+
+$$
+\mathbf {e} _ {q, t _ {q}, r _ {q}} = \mu \mathbf {e} _ {q, t _ {q} - 1} + (1 - \mu) \overline {{\mathbf {e} ^ {r _ {q}}}}. \tag {13}
+$$
+
+# 4 Experiments
+
+# 4.1 Experimental Setup
+
+Datasets. We use four public TKG datasets for evaluation: ICEWS14, ICEWS18 (Boschee et al., 2015), WIKI (Leblay and Chekol, 2018a), and YAGO (Mahdisoltani et al., 2015). Integrated Crisis Early Warning System (ICEWS) is an event dataset. ICEWS14 and ICEWS18 are two subsets of events in ICEWS that occurred in 2014 and 2018 with a time granularity of days. WIKI and YAGO are two knowledge base that contains facts with time information, and we use the subsets with a time granularity of years. We adopt the same dataset split strategy as in (Jin et al., 2020) and split the dataset into train/valid/test by timestamps such that:
+
+time_of_train $<$ time_of_valid $<$ time_of_test. Appendix A.2 summarizes more statistics on the datasets.
+
+Evaluation metrics. We evaluate our model on TKG forecasting, a link prediction task at the future timestamps. Mean Reciprocal Rank (MRR) and Hits@1/3/10 are performance metrics. For each quadruple $(e_s,r,e_o,t)$ in the test set, we evaluate two queries, $(e_s,r,\ref{eq:t})$ and $(\ref{eq:t},r,e_o,t)$ . We use the time-aware filtering scheme (Han et al., 2020b) that only filters out quadruples with query time $t$ . The time-aware scheme is more reasonable than the filtering scheme used in (Jin et al., 2020; Zhu et al., 2021). Appendix A.1 provides detailed definitions.
+
+Baseline. As lots of previous works have verified that the static methods underperform compared with the temporal methods on this task, we
+
+do not compare TITer with them. We compare our model with existing interpolated TKG reasoning methods, including TTransE (Leblay and Chekol, 2018b), TA-DistMult (García-Durán et al., 2018), DE-SimplE (Goel et al., 2020), and TNT-ComplEx (Lacroix et al., 2020), and state-of-the-art extrapolated TKG reasoning approaches, including RE-NET (Jin et al., 2020), CyGNet (Zhu et al., 2021), TANGO (Ding et al., 2021), and xERTE (Han et al., 2021). An overview of these methods is in Section 2.
+
+# 4.2 Implementation Details
+
+Our model is implemented in PyTorch1. We set the entity embedding dimension to 80, the relation embedding dimension to 100, and the relative time encoding dimension to 20. We choose the latest $N$ outgoing edges as candidate actions for TITer at each step. $N$ is 50 for ICEWS14 and ICEWS18, 60 for WIKI, and 30 for YAGO. The reasoning path length is 3. The discount factor $\gamma$ of REINFORCE is 0.95. We use Adam optimizer to optimize the parameters, and the learning rate is 0.001. The batch size is set to 512 during training. We use beam search for inference, and the beam size is 100. For the IM, $\mu$ is 0.1. The activation function of $\Phi$ is cosine. For full details, please refer to Appendix A.3.
+
+# 4.3 Results and Discussion
+
+Performance on the TKG datasets. Our method can search multiple candidate answers via beam search. Table 1 reports the TKG forecasting performance of TITer and the baselines on four TKG datasets. TITer outperforms all baselines on all datasets when evaluated by MRR and Hits@1 metrics, and in most cases (except ICEWS18), TITer exhibits the best performance when evaluated by the other two metrics. TTransE, TA-DistMult, DE-SimplE, and TNTComplEx cannot deal with unseen timestamps in the test set, so they perform worse than others. The performance of TITer is much higher than RE-NET, CyGNet, and TANGO on WIKI and YAGO. Two reasons cause this phenomenon: (1) the characteristic of WIKI and YAGO that nodes usually have a small number of neighbors gives the neighbor search algorithm an advantage. (2) for WIKI and YAGO, a large number of quadruples contain unseen entities in the test set(See Table 2), but these
+
+Table 1: Comparison on future link prediction. The results of MRR and Hits@1/3/10 are multiplied by 100. The best results are in bold. We average the metrics over five runs.
+
+| Method | ICEWS14 | ICEWS18 | WIKI | YAGO |
| MRR | H@1 | H@3 | H@10 | MRR | H@1 | H@3 | H@10 | MRR | H@1 | H@3 | H@10 | MRR | H@1 | H@3 | H@10 |
| TTransE | 13.43 | 3.11 | 17.32 | 34.55 | 8.31 | 1.92 | 8.56 | 21.89 | 29.27 | 21.67 | 34.43 | 42.39 | 31.19 | 18.12 | 40.91 | 51.21 |
| TA-DistMult | 26.47 | 17.09 | 30.22 | 45.41 | 16.75 | 8.61 | 18.41 | 33.59 | 44.53 | 39.92 | 48.73 | 51.71 | 54.92 | 48.15 | 59.61 | 66.71 |
| DE-SimplE | 32.67 | 24.43 | 35.69 | 49.11 | 19.30 | 11.53 | 21.86 | 34.80 | 45.43 | 42.6 | 47.71 | 49.55 | 54.91 | 51.64 | 57.30 | 60.17 |
| TNTComplEx | 32.12 | 23.35 | 36.03 | 49.13 | 27.54 | 19.52 | 30.80 | 42.86 | 45.03 | 40.04 | 49.31 | 52.03 | 57.98 | 52.92 | 61.33 | 66.69 |
| CyGNet | 32.73 | 23.69 | 36.31 | 50.67 | 24.93 | 15.90 | 28.28 | 42.61 | 33.89 | 29.06 | 36.10 | 41.86 | 52.07 | 45.36 | 56.12 | 63.77 |
| RE-NET | 38.28 | 28.68 | 41.34 | 54.52 | 28.81 | 19.05 | 32.44 | 47.51 | 49.66 | 46.88 | 51.19 | 53.48 | 58.02 | 53.06 | 61.08 | 66.29 |
| xERTE | 40.79 | 32.70 | 45.67 | 57.30 | 29.31 | 21.03 | 33.51 | 46.48 | 71.14 | 68.05 | 76.11 | 79.01 | 84.19 | 80.09 | 88.02 | 89.78 |
| TANGO-Tucker | - | - | - | - | 28.68 | 19.35 | 32.17 | 47.04 | 50.43 | 48.52 | 51.47 | 53.58 | 57.83 | 53.05 | 60.78 | 65.85 |
| TANGO-DistMult | - | - | - | - | 26.75 | 17.92 | 30.08 | 44.09 | 51.15 | 49.66 | 52.16 | 53.35 | 62.70 | 59.18 | 60.31 | 67.90 |
| TITer | 41.73 | 32.74 | 46.46 | 58.44 | 29.98 | 22.05 | 33.46 | 44.83 | 75.50 | 72.96 | 77.49 | 79.02 | 87.47 | 84.89 | 89.96 | 90.27 |
+
+Table 2: The percentage of quaduples containing unseen entities of used test datasets.
+
+| Datasets | ICEWS14 | ICEWS18 | WIKI | YAGO |
| Proportion | 6.52 | 3.93 | 42.91 | 8.03 |
+
+Table 3: Comparison on the number of parameters and calculation. (M means million.)
+
+| Method | # Params | # MACs |
| RE-NET | 5.459M | 4.370M |
| CyGNet | 8.568M | 8.554M |
| xERTE(3 steps) | 2.927M | 225.895M |
| TITer(3 steps) | 1.455M | 0.225M |
+
+
+Figure 4: Inductive inference results on a subset of ICEWS14 that contain unseen entities. The dotted line corresponds to the score of a 3-steps random search. T. w/o IM: TITer without IM mechanism.
+
+
+
+methods cannot handle these queries.
+
+Inductive inference. When a query contains an unseen entity, models should infer the answer inductively. For all such queries that contain unseen entities in the ICEWS14 test set, we present experimental results in Figure 4 and Table 6. The performance of RE-NET and CyGNet decays significantly when compared with their result on the whole ICEWS14 test set (see Table 1). Due to the lack of training for unseen entities' embedding and the classification layer for all entities, RE-Net and CyGNet could not reach the performance of a 3-hop neighborhood random search baseline, as illustrated by the dotted line in Figure 4. In contrast, xERTE can tackle such queries by dynamically updating the new entities' representation based on temporal message aggregation, and TITer can tackle such queries by the temporal-path-based RL framework. We also observe that TITer outperforms xERTE, no matter TITer adopts the IM mechanism or not. The IM mechanism could further boost the performance, demonstrating its
+
+effectiveness in representing unseen entities.
+
+Case study. Table 4 visualizes specific reasoning paths of several examples in the test set of ICEWS18. We notice that TITer tends to select a recent fact (outgoing edge) to search for the answer. Although the first two queries have the same subject entity and relation, TITer can reach the ground truths according to different timestamps. As shown in Eq. (6), $\beta$ increases when TITer emphasizes neighbor nodes more than edges. After training, the representations of entities accumulate much semantic information, which helps TITer select the answer directly with less extra information for queries 3 and 4. In comparison, TITer needs more historical information when unseen entities appear. Query 5 is an example of multi-hop reasoning. It indicates that TITer can tackle combinational logic problems.
+
+Efficiency analysis. Table 3 reflects the complexity of RE-NET, CyGNet, xERTE, and TITer. Due to the enormous linear classification layers, RE
+
+Table 4: Path visualization on ICEWS18. $\dagger$ indicates unseen entities not appeared in the training set. $\ddagger$ indicates entities along a path with the same country. $\beta$ is defined in Eq. (6). For a test quadruple, we use the object prediction as an example.
+
+| ID | Test quadruple | Path | β |
| 1 | (Military (Comoros)†, Use conventional military force, Citizen (Comoros), 2018/10/17) | Military‡fight with small arms and light weapons→Citizen‡t=2018/10/16 | 0.46 |
| 2 | (Military (Comoros)†, Use conventional military force, Armed Rebel (Comoros)†, 2018/10/26) | Military‡Investigate-1t=2018/10/19→Armed Rebel‡ | 0.54 |
| 3 | (Nigeria, Consult, Muhammadu Buhari, 2018/10/04) | NigeriaMake an appeal or request-1t=2018/10/01→Muhammadu Buhari | 0.96 |
| 4 | (Police (India), Physically assault, Citizen (India), 2018/10/08) | Police‡Investigatet=2018/10/06→Citizen‡ | 0.96 |
| 5 | (Governor (Cote d'Ivoire)†, Make an appeal or re-quest, Citizen (Cote d'Ivoire), 2018/10/14) | Governor‡Praise or endorset=2018/10/12→Party Member‡Make an appeal or requestt=2018/9/29→Citizen‡ | - |
+
+Table 5: Ablation study on ICEWS18. w/o: without, ws: weighted action scoring mechanism, rs: reward shaping.
+
+| Method | MRR | H@1 | H@3 | H@10 |
| TITer w/o ws and rs | 29.13 | 20.73 | 32.74 | 45.04 |
| TITer w/o ws | 29.25 | 20.84 | 32.83 | 45.06 |
| TITer w/o rs | 29.17 | 21.00 | 32.72 | 44.51 |
| TITer | 29.98 | 22.05 | 33.46 | 44.83 |
+
+Table 6: Results improvement with IM mechanism on subsets of ICEWS14 and WIKI that contain unseen entities.
+
+| Datasets | MRR | H@1 | H@3 | H@10 |
| ICEWS14 | +0.41 | +0.46 | +0.81 | +0.01 |
| WIKI | +1.52 | +1.15 | +2.15 | +1.90 |
+
+NET and CyGNet have much more parameters than other methods. To achieve the best results, xERTE adopts the graph expansion mechanism and the temporal relational graph attention layer to perform a local representation aggregation for each step, leading to a vast amount of calculation. Compared with xERTE, the number of parameters of TITer has reduced by at least a half, and the number of Multi-Adds operations (MACs) has greatly reduced to 0.225M, which is much less than the counterpart, indicating the high efficiency of the proposed model.
+
+In summary, compared to the previous state-of-the-art models, TITer has saved at least $50.3\%$ parameters and $94.9\%$ MACs. Meanwhile, TITer still exhibits better performance.
+
+# 4.4 Ablation Study
+
+In this subsection, we study the effect of different components of TITer by ablation studies. The results are shown in Table 5 and Figure 5.
+
+Relative time encoding. The relative time representation is a crucial component in our method. Figure 5 shows the notable change from temporal to static on ICEWS18 and WIKI. We remove the relative time encoding module to get the static model. For Hits@1, the temporal model improves $13.19\%$ on ICEWS18 and $18.51\%$ on WIKI, compared with the static model. It indicates that our relative time encoding function can help TITer choose the correct answer more precisely.
+
+Weighted action scoring mechanism. We observe that setting $\beta$ to a constant 0.5 can lead to a drop of $5.49\%$ on Hits@1, indicating that TITer can better choose the source of evidence when making the inference. After training, TITer learns the latent relationship among entities. As expounded in Table 4, TITer prefers to pay more attention to the node for inferring when there exists more information to make a decision, and TITer chooses to focus on edges (relations in history) to assist the inferring for complex queries or unseen entities.
+
+Reward shaping. We observe that TITer outperforms the variant without reward shaping, which means an improvement of $5\%$ on Hits@1. By using Dirichlet prior distribution to direct the decision process, TITer acquires knowledge about the probability distribution of the target's appearance over the whole time span.
+
+
+Figure 5: Ablation of time information.
+
+# 5 Conclusion
+
+In this work, we propose a temporal-path-based reinforcement learning model named TimeTraveler (TITer) for temporal knowledge graph forecasting. TITer travels on the TKG historical snapshots and searches for the temporal evidence chain to find the answer. TITer uses a relative time encoding function and time-shaped reward to model the time information, and the IM mechanism to update the unseen entities' representation in the process of testing. Extensive experimental results reveal that our model outperforms state-of-the-art baselines with less calculation and fewer parameters. Furthermore, the inference process of TITer is explainable, and TITer has good inductive reasoning ability.
+
+# Acknowledgements
+
+This work is supported by National Natural Science Foundation (62076105).
+
+# References
+
+Rajarshi Bhowmik and Gerard de Melo. 2020. Explainable link prediction for emerging entities in knowledge graphs. In International Semantic Web Conference, pages 39-55.
+Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. 2013. Translating embeddings for modeling multi-relational data. In Neural Information Processing Systems, pages 2787-2795.
+Elizabeth Boschee, Jennifer Lautenschlager, Sean O'Brien, Steve Shellman, James Starz, and Michael Ward. 2015. ICEWS Coded Event Data.
+Ines Chami, Adva Wolf, Da-Cheng Juan, Frederic Sala, Sujith Ravi, and Christopher Ré. 2020. Low-dimensional hyperbolic knowledge graph embeddings. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6901-6914.
+
+Rajarshi Das, Shehzaad Dhuliawala, Manzil Zaheer, Luke Vilnis, Ishan Durugkar, Akshay Krishnamurthy, Alex Smola, and Andrew McCallum. 2018. Go for a walk and arrive at the answer: Reasoning over paths in knowledge bases using reinforcement learning. In International Conference on Learning Representations.
+Shib Sankar Dasgupta, Swayambhu Nath Ray, and Partha Talukdar. 2018. HyTE: Hyperplane-based temporally aware knowledge graph embedding. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2001-2011.
+Tim Dettmers, Pasquale Minervini, Pontus Stenetorp, and Sebastian Riedel. 2018. Convolutional 2D knowledge graph embeddings. In Thirty-Second AAAI Conference on Artificial Intelligence, pages 1811-1818.
+Zifeng Ding, Zhen Han, Yunpu Ma, and Volker Tresp. 2021. Temporal knowledge graph forecasting with neural ode. arXiv preprint arXiv:2101.05151.
+Alberto García-Durán, Sebastijan Dumancic, and Mathias Niepert. 2018. Learning sequence encoders for temporal knowledge graph completion. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4816-4821.
+Rishab Goel, Seyed Mehran Kazemi, Marcus Brubaker, and Pascal Poupart. 2020. Diachronic embedding for temporal knowledge graph completion. In Thirty-Fourth AAAI Conference on Artificial Intelligence, pages 3988-3995.
+Lingbing Guo, Zequn Sun, and Wei Hu. 2019. Learning to exploit long-term relational dependencies in knowledge graphs. In Proceedings of the 36th International Conference on Machine Learning, pages 2505-2514.
+Qingyu Guo, Fuzhen Zhuang, Chuan Qin, Hengshu Zhu, Xing Xie, Hui Xiong, and Qing He. 2020. A survey on knowledge graph-based recommender systems. IEEE Transactions on Knowledge and Data Engineering.
+William L. Hamilton, Zhitao Ying, and Jure Leskovec. 2017. Inductive representation learning on large graphs. In Neural Information Processing Systems, pages 1025-1035.
+Zhen Han, Peng Chen, Yunpu Ma, and Volker Tresp. 2020a. DyERNIE: Dynamic evolution of riemanian manifold embeddings for temporal knowledge graph completion. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, pages 7301-7316.
+Zhen Han, Peng Chen, Yunpu Ma, and Volker Tresp. 2021. Explainable subgraph reasoning for forecasting on temporal knowledge graphs. In International Conference on Learning Representations.
+
+Zhen Han, Yunpu Ma, Yuyi Wang, Stephan Gunnemann, and Volker Tresp. 2020b. Graph hawkes neural network for forecasting on temporal knowledge graphs. In Conference on Automated Knowledge Base Construction.
+Tingsong Jiang, Tianyu Liu, Tao Ge, Lei Sha, Baobao Chang, Sujian Li, and Zhifang Sui. 2016a. Towards time-aware knowledge graph completion. In COLING 2016, 26th International Conference on Computational Linguistics, pages 1715-1724.
+Tingsong Jiang, Tianyu Liu, Tao Ge, Lei Sha, Baobao Chang, Sujian Li, and Zhifang Sui. 2016b. Towards time-aware knowledge graph completion. In COLING 2016, 26th International Conference on Computational Linguistics, pages 1715-1724.
+Woojeong Jin, Meng Qu, Xisen Jin, and Xiang Ren. 2020. Recurrent event network: Autoregressive structure inference over temporal knowledge graphs. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, pages 6669-6683.
+Jaehun Jung, Jinhong Jung, and U Kang. 2020. TGAP: Learning to walk across time for temporal knowledge graph completion. arXiv preprint arXiv:2012.10595.
+Timothée Lacroix, Guillaume Obozinski, and Nicolas Usunier. 2020. Tensor decompositions for temporal knowledge base completion. In International Conference on Learning Representations.
+Julien Leblay and Melisachew Wudage Chekol. 2018a. Deriving validity time in knowledge graph. In *Companion Proceedings of the The Web Conference*, pages 1771-1776.
+Julien Leblay and Melisachew Wudage Chekol. 2018b. Deriving validity time in knowledge graph. In *Companion Proceedings of the The Web Conference* 2018, pages 1771-1776.
+Xi Victoria Lin, Richard Socher, and Caiming Xiong. 2018. Multi-hop knowledge graph reasoning with reward shaping. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3243-3253.
+Yankai Lin, Zhiyuan Liu, Huanbo Luan, Maosong Sun, Siwei Rao, and Song Liu. 2015. Modeling relation paths for representation learning of knowledge bases. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 705-714.
+Farzaneh Mahdisoltani, Joanna Biega, and Fabian M. Suchanek. 2015. YAGO3: A knowledge base from multilingual wikipedias. In Seventh Biennial Conference on Innovative Data Systems Research.
+Seungwhan Moon, Pararth Shah, Anuj Kumar, and Rajen Subba. 2019. OpenDialKG: Explainable conversational reasoning with attention-based walks over
+
+knowledge graphs. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 845-854.
+Deepak Nathani, Jatin Chauhan, Charu Sharma, and Manohar Kaul. 2019. Learning attention-based embeddings for relation prediction in knowledge graphs. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4710-4723.
+Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. 2011. A three-way model for collective learning on multi-relational data. In Proceedings of the 28th International Conference on Machine Learning, pages 809-816.
+Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne Van Den Berg, Ivan Titov, and Max Welling. 2018. Modeling relational data with graph convolutional networks. In European Semantic Web Conference, pages 593-607.
+Zhiqing Sun, Zhi-Hong Deng, Jian-Yun Nie, and Jian Tang. 2019. Rotate: Knowledge graph embedding by relational rotation in complex space. In International Conference on Learning Representations.
+Rakshit Trivedi, Hanjun Dai, Yichen Wang, and Le Song. 2017. Know-Evolve: Deep temporal reasoning for dynamic knowledge graphs. In Proceedings of the 34th International Conference on Machine Learning, pages 3462-3471.
+Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, and Guillaume Bouchard. 2016. Complex embeddings for simple link prediction. In Proceedings of the 33nd International Conference on Machine Learning, pages 2071-2080.
+Shikhar Vashishth, Soumya Sanyal, Vikram Nitin, Nilesh Agrawal, and Partha Talukdar. 2020. InteractE: Improving convolution-based knowledge graph embeddings by increasing feature interactions. In Thirty-Fourth AAAI Conference on Artificial Intelligence, pages 3009-3016.
+Ronald J Williams. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229-256.
+Jiapeng Wu, Meng Cao, Jackie Chi Kit Cheung, and William L. Hamilton. 2020. TeMP: Temporal message passing for temporal knowledge graph completion. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, pages 5730-5746.
+Wenhan Xiong, Thien Hoang, and William Yang Wang. 2017. DeepPath: A reinforcement learning method for knowledge graph reasoning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 564-573.
+
+Yuyu Zhang, Hanjun Dai, Zornitsa Kozareva, Alexander Smola, and Le Song. 2018. Variational reasoning for question answering with knowledge graph. In Thirty-Second AAAI Conference on Artificial Intelligence, pages 6069-6076.
+Zhao Zhang, Fuzhen Zhuang, Hengshu Zhu, Zhiping Shi, Hui Xiong, and Qing He. 2020. Relational graph neural network with hierarchical attention for knowledge graph completion. In Thirty-Fourth AAAI Conference on Artificial Intelligence, pages 9612-9619.
+Cunchao Zhu, Muhao Chen, Changjun Fan, Guangquan Cheng, and Yan Zhang. 2021. Learning from history: Modeling temporal knowledge graphs with sequential copy-generation networks. In Thirty-Fifth AAAI Conference on Artificial Intelligence, pages 4732-4740.
+
+# A Appendix
+
+# A.1 Definitions for Evaluation Metrics
+
+We use two popular metrics, Mean Reciprocal Rank (MRR) and Hits@ $k$ (we let $k \in \{1, 3, 10\}$ ), to evaluate the models' performance. For each quadruple $q = (e_s, r, e_o, t)$ in the test fact set $\mathcal{F}_{test}$ , we evaluate two queries: $q_o = (e_s, r,?, t)$ and $q_s = (?, r, e_o, t)$ . For each query, our model ranks the entities searched by beam search according to the transition probability. If the ground truth entity does not appear in the final searched entity set, we set the rank as the number of entities in the dataset. xERTE ranks the entities in the final inference graph, and others rank the total entities in the dataset.
+
+MRR is defined as:
+
+$$
+\begin{array}{l} M R R = \frac {1}{2 * \left| \mathcal {F} _ {t e s t} \right|} \sum_ {q \in \mathcal {F} _ {t e s t}} \left(\frac {1}{\operatorname {r a n k} \left(e _ {o} \mid q _ {o}\right)} \right. \tag {14} \\ + \frac {1}{\operatorname {r a n k} \left(e _ {s} \mid q _ {s}\right)}). \\ \end{array}
+$$
+
+Hits@ $k$ is the percentage of times that the ground truth entity appears in the top $k$ of the ranked candidates, defined as:
+
+$$
+\begin{array}{l} \mathrm {H i t s} @ k = \frac {1}{2 * | \mathcal {F} _ {t e s t} |} \sum_ {q \in \mathcal {F} _ {t e s t}} (\mathbb {I} \{r a n k (e _ {o} | q _ {o} \} \leq k \\ + \mathbb {I} \left\{\operatorname {r a n k} \left(e _ {s} \mid q _ {s} \right\} \leq k\right). \tag {15} \\ \end{array}
+$$
+
+There are two filtering settings, static filtering and time-aware filtering. RE-NET (Jin et al., 2020) and CyGNet (Zhu et al., 2021) directly use static filtering setting to remove the entities from the candidate list according to the triples in the dataset. However, this filtering setting is not appropriate for temporal KGs. The facts of temporal KGs always change over time. For example, we evaluate the test quadruple $(A,\mathrm{visit},B,2018 / 04 / 03)$ . There are two other facts $(A,\mathrm{visit},C,2018 / 04 / 03)$ and $(A,\mathrm{visit},D,2018 / 03 / 28)$ . Static filtering setting will remove both $C$ and $D$ from the candidates even though the triple $(A,\mathrm{visit},D)$ is not invalid in 2018/04/03. A more appropriate setting is only to remove $C$ from the candidates. Therefore, we use the time-aware filtering setting that eliminates the entities according to the quadruple.
+
+# A.2 Dataset Statistics
+
+Dataset statistics are provided in Table 8. $N_{train}$ , $N_{valid}$ and $N_{test}$ are the numbers of quadruples
+
+Table 7: Number of unseen entities in the test set.
+
+| Dataset | Nunseenent | Nounseenoq | Nounseensq | Nounseensoq |
| ICEWS14 | 496 | 438 | 497 | 73 |
| ICEWS18 | 1140 | 975 | 1050 | 77 |
| WIKI | 2968 | 11086 | 22967 | 6974 |
| YAGO | 540 | 1102 | 873 | 366 |
+
+in training set, valid set, and test set, respectively. $N_{ent}$ and $N_{rel}$ are the numbers of total entities and total relations. ICEWS14 and ICEWS18 are event-based knowledge graphs, and we use the same version as (Han et al., 2021). WIKI and YAGO datasets contain temporal facts with time span $(e_s,r,e_o,[t_s,t_e])$ , and each fact is converted to $\{(e_s,r,e_o,t_s),(e_s,r,e_o,t_s + 1_t),\dots,(e_s,r,e_o,t_e)\}$ where $1_{t}$ is a unit time. Here, $1_{t} == 1$ year. We use the same version of WIKI and YAGO as (Jin et al., 2020).
+
+Since we split each dataset by timestamps, some entities in the test set do not exist in the training set. Table 7 describes the number of unseen entities and the number of quadruples containing these entities in the test set. $N_{ent}^{unseen}$ is the number of new entities in the test set. $N_{oq}^{unseen}$ is the number of quadruples that object entities are unseen. $N_{sq}^{unseen}$ is the number of quadruples that subject entities are unseen. $N_{soq}^{unseen}$ is the number of quadruples that both subject entities and object entities are unseen.
+
+# A.3 Detailed Implementation
+
+Hyperparameters search. We use a grid search to choose the hyperparameters. The search space of $\mu$ is [0.1, 0.3, 0.5, 0.7, 0.9]. The search space of the outgoing edges number $N$ is [30, 50, 80, 100, 200]. The search space of the path length is [2, 3, 4]. We also try using different activation functions for the $\Phi$ , such as relu, sigmoid, tanh.
+
+Details of TITer. For the policy network, we set the entity embedding dimension to 80, and the function $\Phi$ output dimension to 20. The node representation is the concatenation of the entity embedding and $\Phi$ output, and its dimension is set to 100. We also set the relation embedding size to 100. The hidden state dimension of LSTM and the middle layer dimensions of the two two-layer MLPs are 100. We choose the latest $N$ outgoing edges for the agent as the current state's candidate actions. $N$ is 50 for ICEWS14 and ICEWS18, 60 for WIKI, and
+
+Table 8: Statistics on datasets.
+
+| Dataset | Ntrain | Nvalid | Ntest | Nent | Nrel | Time granularity |
| ICEWS14 | 63685 | 13823 | 13222 | 7128 | 230 | 24 hours |
| ICEWS18 | 373018 | 45995 | 49545 | 23033 | 256 | 24 hours |
| WIKI | 539286 | 67538 | 63110 | 12554 | 24 | 1 year |
| YAGO | 161540 | 19523 | 20026 | 10623 | 10 | 1 year |
+
+30 for YAGO. The reasoning path length is set to 3. All the parameters are initialized with Xavier initialization.
+
+Details of Training. Same as MINERVA, we use an additive control variate baseline to reduce the variance and add an entropy regularization term to the cost function scaled by a constant to encourage diversity in the paths sampled by the policy. The scaling constant is initialized to 0.01, and it will decay exponentially with the number of training epochs. The attenuation coefficient is 0.9. The discount factor $\gamma$ of REINFORCE is 0.95. We use Adam optimizer to optimize the parameters, and the learning rate is 0.001. The weight decay of the optimizer is 0.000001. We clip gradients greater than 10 to avoid the gradient explosion. The batch size is set to 512.
+
+Details of Testing. We use beam search to obtain a list of predicted entities with the corresponding scores. The beam size is set to 100. Multiple paths obtained through beam search may lead to the same target entity, and we keep the highest path score among them as the final entity score. For the IM module, we set the time decay factor $\mu$ to 0.1.
+
+Details of other Methods. We use the released code to implement DE-SimplE $^4$ , TNTComplEx $^5$ , CyGNet $^6$ , RE-NET $^7$ , and xERTE $^8$ . We use the default parameters in the code. Partial results in Table 1 are from (Han et al., 2021; Ding et al., 2021). The authors of CyGNet only made object predictions when evaluating their model. We find that the subject prediction is more difficult than the object prediction for these four datasets. We use the code of CyGNet to train two models to predict object and subject, respectively. TANGO (Ding et al., 2021) does not release the code, so we use the results reported in their paper.
+
+# A.4 Model Robustness
+
+We run TITer on all datasets five times by using five different random seeds with fixed hyperparameters. Table 9 reports the mean and standard deviation of TITer on these datasets. It shows that TITer demonstrates a small standard deviation, which indicates its robustness.
+
+# A.5 Estimating a Dirichlet Distribution
+
+The Dirichlet density is:
+
+$$
+p (\mathbf {p}) \sim D i r \left(\alpha_ {1}, \dots , \alpha_ {k}\right) = \frac {\Gamma \left(\sum_ {k} \alpha_ {k}\right)}{\prod_ {k} \Gamma \left(\alpha_ {k}\right)} \prod_ {k} p _ {k} ^ {\alpha_ {k} - 1}, \tag {16}
+$$
+
+where $p_k > 0$ , $\sum_{k} p_k = 1$ and $\alpha_k > 0$ . To estimate a Dirichlet distribution of order $k$ with parameters $\alpha = \{\alpha_1, \alpha_2, \dots, \alpha_k\}$ , we observe a set of samples $D = \{x_1, \dots, x_N\}$ where $x$ is a multinomial sample with length $n$ with probability $\mathbf{p}$ . $n_k$ represents the count of corresponding category.
+
+$$
+\begin{array}{l} p (\mathbf {x} | \alpha) = \int_ {\mathbf {p}} p (\mathbf {x} | \mathbf {p}) p (\mathbf {p} | \alpha) (17) \\ = \frac {\Gamma \left(\sum_ {k} \alpha_ {k}\right)}{\Gamma \left(n + \sum_ {k} \alpha_ {k}\right)} \prod_ {k} \frac {\Gamma \left(n _ {k} + \alpha_ {k}\right)}{\Gamma \left(\alpha_ {k}\right)}, (17) \\ \end{array}
+$$
+
+$$
+\begin{array}{l} p (D | \alpha) = \prod_ {i} p (x _ {i} | \alpha) \\ = \prod_ {i} \left(\frac {\Gamma \left(\sum_ {k} \alpha_ {k}\right)}{\Gamma \left(n _ {i} + \sum_ {k} \alpha_ {k}\right)} \prod_ {k} \frac {\Gamma \left(n _ {i k} + \alpha_ {k}\right)}{\Gamma \left(\alpha_ {k}\right)}\right). \tag {18} \\ \end{array}
+$$
+
+The gradient of the log-likelihood is:
+
+$$
+\begin{array}{l} \frac {d \log (p (D | \alpha)}{d \alpha_ {k}} = \sum_ {i} \Psi (\sum_ {k} \alpha_ {k}) - \Psi (n _ {i} + \sum_ {k} \alpha_ {k}) \\ + \Psi \left(n _ {i k} + \alpha_ {k}\right) - \Psi \left(\alpha_ {k}\right), \tag {19} \\ \end{array}
+$$
+
+where $\Psi$ is the digamma function. The maximum can be computed via the fixed-point iteration:
+
+$$
+\alpha_ {k} ^ {\text {n e w}} = \alpha_ {k} \frac {\sum_ {i} \Psi \left(n _ {i k} + \alpha_ {k}\right) - \Psi \left(\alpha_ {k}\right)}{\sum_ {i} \Psi \left(n _ {i} + \sum_ {k} \alpha_ {k}\right) - \Psi \left(\sum_ {k} \alpha_ {k}\right)}. \tag {20}
+$$
+
+$^{4}$ https://github.com/BorealisAI/de-simple
+$^{5}$ https://github.com/facebookresearch/tkbc
+$^{6}$ https://github.com/CunchaoZ/CyGNet
+$^{7}$ https://github.com/INK-USC/RE-Net
+8https://github.com/TemporalKGTeam/xERTE
+
+Table 9: Mean and standard deviation of TITer across five runs on four datasets.
+
+| Datasets | MRR | H@1 | H@3 | H@10 |
| ICEWS14 | 41.75±0.21 | 32.75±0.12 | 46.46±0.09 | 58.44±0.05 |
| ICEWS18 | 29.98±0.15 | 22.05±0.07 | 33.46±0.06 | 44.83±0.03 |
| WIKI | 75.50±0.22 | 72.96±0.18 | 77.46±0.09 | 79.02±0.04 |
| YAGO | 87.47±0.08 | 84.89±0.07 | 89.96±0.03 | 90.27±0.04 |
+
+We can also maximize the leave-one-out likelihood. The digamma function $\Psi$ can also be inverted efficiently by using a Newton-Raphson method.
\ No newline at end of file
diff --git a/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/images.zip b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..d93947aa5e19a26011c888ed703e0b4e401b1b38
--- /dev/null
+++ b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d8684a32646ea4db37b38397a7ceb32769a1e7050612d3512025b917ad1076db
+size 575892
diff --git a/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/layout.json b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..dd5c15045631dddee843a5347d71a643b2ed1f3a
--- /dev/null
+++ b/timetravelerreinforcementlearningfortemporalknowledgegraphforecasting/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ef8aa3ff892049b62066c3a8a9b20874a1e1db2b2b69c7293fe4dd50246a0ee3
+size 562456
diff --git a/tobecloserlearningtolinkupaspectswithopinions/5fbc5096-3231-4024-a3da-a1dbfadf5f86_content_list.json b/tobecloserlearningtolinkupaspectswithopinions/5fbc5096-3231-4024-a3da-a1dbfadf5f86_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..81223e7e3930107f149f0debf9afc58fc6f7be2c
--- /dev/null
+++ b/tobecloserlearningtolinkupaspectswithopinions/5fbc5096-3231-4024-a3da-a1dbfadf5f86_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3aa6813d14bea6194a69b643f4c532f52d6075980e445b6075071b90c0f9efc4
+size 84851
diff --git a/tobecloserlearningtolinkupaspectswithopinions/5fbc5096-3231-4024-a3da-a1dbfadf5f86_model.json b/tobecloserlearningtolinkupaspectswithopinions/5fbc5096-3231-4024-a3da-a1dbfadf5f86_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..659a6663fab519d2d86e74312680e562d064d9be
--- /dev/null
+++ b/tobecloserlearningtolinkupaspectswithopinions/5fbc5096-3231-4024-a3da-a1dbfadf5f86_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:20b97e8271cdbd6b0349aeac5be04fe303310eeaff2d0a56c36d2baa49a9a706
+size 104344
diff --git a/tobecloserlearningtolinkupaspectswithopinions/5fbc5096-3231-4024-a3da-a1dbfadf5f86_origin.pdf b/tobecloserlearningtolinkupaspectswithopinions/5fbc5096-3231-4024-a3da-a1dbfadf5f86_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..8d6c1c866f9a98de086941ef30f419c0564fb121
--- /dev/null
+++ b/tobecloserlearningtolinkupaspectswithopinions/5fbc5096-3231-4024-a3da-a1dbfadf5f86_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:60f37f96653cbbdf2e0b9ace0a1ff69ecf2be4567978824a952f3de92810f786
+size 477122
diff --git a/tobecloserlearningtolinkupaspectswithopinions/full.md b/tobecloserlearningtolinkupaspectswithopinions/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..705033495ab5d0ed8a6172b90ab646961c7096be
--- /dev/null
+++ b/tobecloserlearningtolinkupaspectswithopinions/full.md
@@ -0,0 +1,351 @@
+# To be Closer: Learning to Link up Aspects with Opinions
+
+Yuxiang Zhou $^{1*}$ , Lejian Liao $^{1}$ , Yang Gao $^{1\dagger}$ , Zhanming Jie $^{2,3}$ and Wei Lu $^{2}$
+
+$^{1}$ School of Computer Science and Technology, Beijing Institute of Technology
+
+$^{2}$ StatNLP Research Group, Singapore University of Technology and Design
+
+3ByteDance AI Lab
+
+yxzhou@bit.edu.cn, liaolj@bit.edu.cn, gyang@bit.edu.cn
+allan@bytedance.com, luwei@sutd.edu.sg
+
+# Abstract
+
+Dependency parse trees are helpful for discovering the opinion words in aspect-based sentiment analysis (ABSA) (Huang and Carley, 2019). However, the trees obtained from off-the-shelf dependency parsers are static, and could be sub-optimal in ABSA. This is because the syntactic trees are not designed for capturing the interactions between opinion words and aspect words. In this work, we aim to shorten the distance between aspects and corresponding opinion words by learning an aspect-centric tree structure. The aspect and opinion words are expected to be closer along such tree structure compared to the standard dependency parse tree. The learning process allows the tree structure to adaptively correlate the aspect and opinion words, enabling us to better identify the polarity in the ABSA task. We conduct experiments on five aspect-based sentiment datasets, and the proposed model significantly outperforms recent strong baselines. Furthermore, our thorough analysis demonstrates the average distance between aspect and opinion words are shortened by at least $19\%$ on the standard SemEval Restaurant14 (Pontiki et al., 2014) dataset1.
+
+# 1 Introduction
+
+Aspect-based sentiment analysis (ABSA) (Pang et al., 2008; Liu, 2012) aims at determining the sentiment polarity expressed towards a particular target in a sentence. For example, in the sentence "The battery life of this laptop is very long, but the price is too high", the sentiment expressed towards the aspect term "battery life" is positive, whereas the sentiment towards the aspect term "price" is negative. Early research efforts (Wang et al., 2016; Chen et al., 2017; Liu and Zhang, 2017; Li and Lu, 2019; Xu et al., 2020a)
+
+$\mathrm{Dist}(\mathrm{Loving}, \mathrm{harry}) = 4$ $\mathrm{Dist}(\mathrm{Loving}, \mathrm{potter}) = 3$
+
+
+(a) Dependency parse tree from spaCy.
+
+$\mathrm{Dist}(\mathrm{Loving}, \mathrm{harry}) = 1$ , $\mathrm{Dist}(\mathrm{Loving}, \mathrm{potter}) = 2$
+
+
+(b) Learned aspect-centric Tree (Ours)
+Figure 1: An example with different tree representations in the Twitter dataset. "Dist" returns the number of hops between two words in the tree. Words marked in red and blue are aspect and opinion, respectively.
+
+focus on using an attention mechanism (Bahdanau et al., 2015) to model interactions between aspect and context words. However, such attention-based models may suffer from overly focusing on the frequent words that express sentiment polarity while ignoring low-frequency ones (Tang et al., 2019; Sun and Lu, 2020). Recent efforts show that the syntactic structures of sentences can facilitate the identification of sentiment features related to aspect words (Zhang et al., 2019; Sun et al., 2019b; Huang and Carley, 2019). Nonetheless, these methods unfortunately suffer from two shortcomings. First, the trees obtained from off-the-shelf dependency parsers are static, and thus cannot adaptively model the complex relationship between multiple aspects and opinion words. Second, an inaccurate parse tree could lead to error propagation downstream in the pipeline. Several research groups have explored the above issues with a more refined parse tree. For example, Chen et al. (2020) constructed task-specific structures by developing a gate mechanism to dynamically combine the parse tree information and a stochastic graph sampled from the HardKuma distribution (Bastings et al., 2019). On the other hand, Wang et al. (2020) greedily reshaped the dependency parse tree by using manual rules to
+
+obtain the aspect-related syntactic structures.
+
+Despite being able to effectively alleviate the tree representation problem, existing methods still depend on external parse trees, leading to one potential problem. The dependency parse trees are not designed for the purpose of ABSA but to express syntactic relations. Specifically, the aspect term is usually a noun or a noun phrase, while the root of the dependency tree is often a verb or an adverb. According to statistics, for almost $90\%$ of the sentences, the roots of their dependency trees are not aspect words. Such a root inconsistency issue may prevent the model from effectively capturing the relationships between opinion words and aspect words. For example, Figure 1(a) shows the dependency tree obtained by the toolkit $\mathrm{spaCy}^3$ . The root is the gerund verb "Loving" while the aspect term is the noun phrase "harry potter". The distance between the aspect words "harry" and "potter" and the critical opinion word "Loving" under a dependency tree are four hops and three hops, respectively. However, their relative distances in the sequential order are two and three, respectively. Intuitively, closer distance enables us to identify the polarity in the ABSA task better. Figure 1(b) shows an aspect-centric tree where the tree is rooted by the aspect words. The distances between aspect and opinion words are one hop and two hops, which is closer than the distance in the standard dependency parse tree.
+
+In this paper, we propose a model that learns Aspect-Centric Latent Trees (we name it as the ACLT model) which are specifically tailored for the ABSA task. We assume that inducing tree structures whose roots are within aspect term enables the model to correlate the aspect and opinion words better. We built our model based on the structure attention mechanism (Kim et al., 2017; Liu and Lapata, 2018) and a variant of the Matrix-Tree Theorem (MTT) (Tutte, 1984; Koo et al., 2007). Additionally, we proposed to impose a soft constraint to encourage the aspect words to serve as the root of the tree structure induced by MTT. As a result, the search space of inferring the root is reduced during the training process.
+
+Our contributions are summarized as follows:
+
+- We propose to use Aspect-Centric Latent Trees (ACLT) which are specifically tailored for the ABSA task to link up aspects with
+
+opinion words in an end-to-end fashion.
+
+- Our ACLT model is able to learn an aspect-centric latent tree with a root refinement strategy to better correlate the aspect and opinion words than the standard parse tree.
+- Experiments show that our model outperforms the existing approaches, and also yields new state-of-the-art results on four ABSA benchmark datasets. Quantitative and qualitative experiments further justify the effectiveness of the learned aspect-centric trees. The analysis demonstrates that our ACLT is capable of shortening the average distances between aspect and opinion words by at least $19\%$ on the standard SemEval Restaurant14 dataset. To the best of our knowledge, we are the first to link up aspects with opinions through the specifically designed latent tree that imposes root constraints.
+
+# 2 Model
+
+In this section, we present the proposed Aspect-Centric Latent Tree (ACLT) model (Figure 2) for the ABSA task. We first obtain the contextualized representations from the sentence encoder. Next, we use a tree inducer to produce the distribution over all the possible latent trees. The underlying tree inducer is a latent-variable model which treats tree structures as the latent variable. Once we have the distribution over the latent trees, we adopt the root refinement procedure to obtain aspect-centric latent trees. Then, we can encode the probabilistic latent trees with a graph or tree encoder. Finally, we use the structured representation from the tree encoder for sentiment classification.
+
+# 2.1 Sentence Encoder
+
+Given a sentence $\mathbf{s} = [w_1, \dots, w_n]$ and the corresponding aspect term $\mathbf{a} = [w_i, \dots, w_j]$ ( $1 \leq i \leq j \leq n$ ), we adopt the pre-trained language model BERT (Devlin et al., 2019) to obtain the contextualized representation for each word. We concatenate the words in the sentence and explicitly present the aspect term in the input representation: $\mathbf{x} = ([CLS] w_1, \dots, w_n[SEP] w_i, \dots, w_j[SEP])$ . The contextualized representation $H$ can be obtained via BERT(x), where $H = [h_1, \dots, h_n]$ , $h_i \in H$ represents the contextualized representation of the $i$ -th token.
+
+
+Figure 2: ACLT architecture.
+
+# 2.2 Aspect-Centric Tree Inducer
+
+While prior efforts (Wang et al., 2020; Chen et al., 2020) on learning latent (or explicit) trees for the ABSA task exist, one of the major contributions of our work is that we link up aspects and opinion words by addressing the root inconsistency issue. Inspired by recent work (Liu and Lapata, 2018; Nan et al., 2020), we use a variant of Kirchhoff's Matrix-Tree Theorem (Tutte, 1984; Koo et al., 2007) to induce the latent dependency structure.
+
+Given the contextualized representation $\pmb{h} \in \mathbb{R}^d$ of each node (token) in the sentence, where $d$ is the dimension of the node representations. We first calculate pair-wise unnormalized edge scores $e_{ij}$ between the $i$ -th and the $j$ -th node with the node representation $\pmb{h}_i$ and $\pmb{h}_j$ by way of a two feed-forward neural network (FNN) and a bilinear function:
+
+$$
+\boldsymbol {e} _ {i j} = \big (\tanh (\boldsymbol {W} _ {p} \boldsymbol {h} _ {i}) \big) ^ {T} \boldsymbol {W} _ {b} (\tanh (\boldsymbol {W} _ {c} \boldsymbol {h} _ {j})), (1)
+$$
+
+where $\mathbf{W}_p \in \mathbb{R}^{d \times d}$ and $\mathbf{W}_c \in \mathbb{R}^{d \times d}$ are weights for two feedforward neural networks, tanh is applied as the activation function. $\mathbf{W}_b \in \mathbb{R}^{d \times d}$ is the weight for the bilinear transformation. $e_{ij} \in \mathbb{R}^{d \times d}$ can be viewed as a weighted adjacency matrix for a graph $G$ with $n$ nodes where each node corresponds to a word in the sentence.
+
+Next, we calculate the root score $\boldsymbol{r}_i$ , representing the unnormalized probability of the $i$ -th node to be selected as the root of the structure:
+
+$$
+\boldsymbol {r} _ {i} = \boldsymbol {W} _ {r} \boldsymbol {h} _ {i}, \tag {2}
+$$
+
+where $W_{r}\in \mathbb{R}^{1\times d}$ is the weight for the linear transformation. Following Koo et al. (2007), we
+
+calculate the marginal probability of the dependency edge of the latent structure:
+
+$$
+\boldsymbol {A} _ {i j} = \left\{ \begin{array}{l l} 0 & \text {i f} i = j \\ \exp \left(\boldsymbol {e} _ {i j}\right) & \text {o t h e r w i s e} \end{array} \right. \tag {3}
+$$
+
+$$
+\boldsymbol {L} _ {i j} = \left\{ \begin{array}{l l} \sum_ {i ^ {\prime} = 1} ^ {n} \boldsymbol {A} _ {i ^ {\prime} j} & \text {i f} i = j \\ - \boldsymbol {A} _ {i j} & \text {o t h e r w i s e} \end{array} \right. \tag {4}
+$$
+
+$$
+\bar {\boldsymbol {L}} _ {i j} = \left\{ \begin{array}{l l} \boldsymbol {L} _ {i j} + \exp (\boldsymbol {r} _ {i}) & \text {i f} i = j \\ \boldsymbol {L} _ {i j} & \text {o t h e r w i s e ,} \end{array} \right. \tag {5}
+$$
+
+where we first assign non-negative weights $A \in \mathbb{R}^{n \times n}$ to the edges, $A_{ij}$ is the weight of the edge between the $i$ -th and the $j$ -th node. Then, we build the Laplacian matrix $L \in \mathbb{R}^{n \times n}$ for graph $G$ and its variant $\bar{L}$ which takes the root node into consideration for further computation (Koo et al., 2007). We use $P_{ij}$ to denote the marginal probability of the dependency edge between the $i$ -th and the $j$ -th node, and $P_i^r$ is defined as the marginal probability of the $i$ -th word headed by the root of the tree. Then, $P_{ij}$ and $P_i^r$ can be derived:
+
+$$
+\boldsymbol {P} _ {i j} = \left(1 - \delta_ {1, j}\right) \boldsymbol {A} _ {i j} \left[ \bar {\boldsymbol {L}} ^ {- 1} \right] _ {j j} \tag {6}
+$$
+
+$$
+- \left(1 - \delta_ {i, 1}\right) \boldsymbol {A} _ {i j} \left[ \bar {\boldsymbol {L}} ^ {- 1} \right] _ {j i}
+$$
+
+$$
+\boldsymbol {P} _ {i} ^ {r} = \exp (\boldsymbol {r} _ {i}) [ \bar {\boldsymbol {L}} ^ {- 1} ] _ {i 1}, \tag {7}
+$$
+
+where $\delta$ is the Kronecker delta. Here, $P\in \mathbb{R}^{n\times n}$ can be interpreted as a weighted adjacency matrix of the word-level graph. We refer the interested reader to Koo et al. (2007) for more details.
+
+Root Refinement Despite the successful application of tree information induced by MTT in previous works (Liu and Lapata, 2018; Guo et al., 2020; Nan et al., 2020), unfortunately, the MTT would still produce arbitrary trees which inappropriate for the specific task if there is no structure supervision. Under the assumption that inducing tree structures whose roots are within aspect term enables the model to better correlate the aspect and opinion words than the standard parse tree, we proposed to impose a soft constraint to encourage the aspect words $w \in \mathbf{a}$ to serve as the root of tree structure induced by MTT.
+
+Specifically, we introduce a cross-entropy loss for this assumption:
+
+$$
+\begin{array}{l} \mathcal {L} _ {a} = - \sum_ {i = 1} ^ {L} \left(t _ {i} \log \left(\boldsymbol {P} _ {i} ^ {r}\right) \right. \tag {8} \\ + \left(1 - t _ {i}\right) \log \left(1 - \boldsymbol {P} _ {i} ^ {r}\right)), \\ \end{array}
+$$
+
+where $t_i \in \{0,1\}$ indicates whether the $i$ -th token is the aspect word, $P_i^r$ is the probability of the $i$ -th token being the root from Equation 7. The nice property of this loss is that minimizing the loss is essentially adjusting the aspect words to be the root in the latent trees. On the other hand, this supervision reduces the search space of inferring root for MTT in the training process.
+
+Intuitively, the tree inducer module produces a random structure at early iterations during training since information propagates mostly between neighboring nodes. As the roots are adjusted to the aspect words and the structure gets more refined when the loss becomes smaller, the tree inducer is more likely to generate an aspect-centric latent structure. Our experiment in Section 3.4 shows that the root refinement loss (Equation 8) is able to successfully guide the inducing of latent trees, in which the aspect word is consistent with its root.
+
+# 2.3 Tree Encoder
+
+Given contextualized representation $\mathbf{h}$ and the corresponding aspect-centric graph $\mathbf{P}$ , we follow Kim et al. (2017) and Liu and Lapata (2018) to encode the tree information by structure attention mechanism:
+
+$$
+\begin{array}{l} \boldsymbol {s} _ {i} ^ {p} = \sum_ {k = 1} ^ {n} \boldsymbol {P} _ {k i} \boldsymbol {h} _ {k} + \boldsymbol {P} _ {i} ^ {r} \boldsymbol {h} _ {a} \\ \boldsymbol {s} _ {i} ^ {c} = \sum_ {k = 1} ^ {n} \boldsymbol {P} _ {i k} \boldsymbol {h} _ {i} \tag {9} \\ \pmb {s} _ {i} = \tanh \left(\pmb {W} _ {s} \left[ \pmb {s} _ {i} ^ {p}, \pmb {s} _ {i} ^ {c}, \pmb {h} _ {i} \right]\right), \\ \end{array}
+$$
+
+where $s_i^p \in \mathbb{R}^d$ is the context representation gathered from possible parents of $h_i$ , $s_i^c \in \mathbb{R}^d$ is the context representation gathered from possible children, and $h_a$ is the representation for the root node. We concatenate $s_i^p$ , $s_i^c$ with $h_i$ and transform with weights $W_s \in \mathbb{R}^{d \times 3d}$ to obtain the structured representation of the $i$ -th word $s_i$ .
+
+# 2.4 Classifier
+
+Following Xu et al. (2019) and Sun et al. (2019a), we leverage $s_0$ , which is the structured aspect-aware representation of each sentence, to compute the probability over the different sentiment polarities as:
+
+$$
+y _ {p} = \operatorname {s o f t m a x} \left(\boldsymbol {W} _ {p} \boldsymbol {s} _ {0} + \boldsymbol {b} _ {p}\right), \tag {10}
+$$
+
+where $W_{p}$ and $b_{p}$ are model parameters for the classifier, and $y_{p}$ is the predicted sentiment probability distribution.
+
+| Dataset | Train | Dev | Test |
| #Pos. | #Neu. | #Neg. | #Pos. | #Neu. | #Neg. | #Pos. | #Neu. | #Neg. |
| Lap14 | 895 | 418 | 783 | 99 | 46 | 87 | 341 | 169 | 128 |
| Rest14 | 1,948 | 573 | 726 | 216 | 64 | 81 | 728 | 196 | 196 |
| Rest15 | 821 | 32 | 230 | 91 | 4 | 26 | 326 | 34 | 182 |
| Rest16 | 1,116 | 62 | 395 | 124 | 7 | 44 | 469 | 30 | 117 |
| Twitter | 1,405 | 2,814 | 1,404 | 156 | 313 | 156 | 173 | 346 | 173 |
+
+Table 1: Statistics of datasets.
+
+The objective of the classifier is to minimize the cross-entropy loss for an instance $(\mathbf{x},y)$ :
+
+$$
+\mathcal {L} _ {s} = - \log P (y | \mathbf {x}) \tag {11}
+$$
+
+where $y \in \{\text{positive, negative, neutral}\}$ . Our final objective function is a multi-task learning objective, defined as weighted sum of the loss on root refinement and classification:
+
+$$
+\mathcal {L} = \alpha \mathcal {L} _ {a} + (1 - \alpha) \mathcal {L} _ {s}, \tag {12}
+$$
+
+where $\alpha \in (0,1)$ is a coefficient that balances the contribution of each component in the training process. The hyper-parameter $\alpha$ is selected based on the performance on the validation set.
+
+# 3 Experiments
+
+# 3.1 Experimental Setup
+
+We evaluate our proposed ACLT model on five benchmark datasets: the Laptop (Lap14) and Restaurant (Rest14) review datasets from SemEval 2014 Task4 (Pontiki et al., 2014), the Restaurant15 (Rest15) review dataset from SemEval 2015 Task12 (Pontiki et al., 2015), the Restaurant16 (Rest16) review dataset from SemEval 2016 Task5 (Pontiki et al., 2016), and Twitter posts from (Dong et al., 2014). Following the previous works (Tang et al., 2016; Chen et al., 2017; Wang and Lu, 2018), we remove a few examples that have conflicting labels. We randomly split $10\%$ of data from the training dataset as the development dataset, and the model is only trained with the remaining data. Detailed statistics of the datasets can be found in Table 1. All hyper-parameters are tuned based on the development set4. We employed the uncased version of the BERT-base (Devlin et al., 2019) model in PyTorch (Wolf et al., 2020)5. Following previous conventions, we repeat each experiment three times and average the results, reporting accuracy (Acc.) and macro-f1 $(F_{1})$ .
+
+# 3.2 Baselines
+
+The state-of-the-art baselines selected for comparison fall into three main categories: Syntax information free models, dependency parse tree based models, and latent tree based models. Syntax information free models include:
+
+- TNet-AS Li et al. (2018) implements a context-preserving mechanism to get the aspect-specific representations.
+- BERT-PT Xu et al. (2019) explores a novel post-training approach on BERT to enhance the performance of BERT which has been finetuned for ABSA and RRC.
+- BERT-PAIR Sun et al. (2019a) constructs auxiliary sentences from the aspect and converts the ABSA task to a sentence-pair classification task.
+- BERT-SRC (Devlin et al., 2019) is the vanilla BERT model which directly uses the last layer's [CLS] representation of the model as a classification feature.
+
+The dependency parse tree based models are:
+
+- ASGCN Zhang et al. (2019) uses GCNs to capture the long-range dependencies between words.
+- CDT Sun et al. (2019b) uses GCNs to integrate dependency parse tree information.
+- BiGCN Zhang and Qian (2020) uses syntactic graph and lexical graph to capture the global word co-occurrence information.
+ASGCN+BERT is a baseline that uses BERT instead of BiLSTM as the context encoder of ASGCN (Zhang et al., 2019).
+- R-GAT+BERT (Wang et al., 2020) is a dependency tree based model that greedily reshapes the dependency parse tree using manually defined rules.
+
+A latent tree based model:
+
+- KumaGCN+BERT Chen et al. (2020) constructs syntactic information by developing a gate mechanism to combine HardKuma structure and dependency parse tree.
+
+We reproduce the results for baselines whenever the authors provide the source code. For ASGCN+BERT and KumaGCN+BERT models where the code is not made available as of this writing, we implement them by ourselves using the optimal hyper-parameter setting reported in their paper. Since we randomly split $10\%$ of data from the training dataset as the development dataset, and the
+
+model is only trained with the remaining data, the results of R-GAT+BERT (Wang et al., 2020) and KumaGCN+BERT (Chen et al., 2020) are lower than which reported in the original paper. In our experiments, we report the average result and the mean absolute deviations over three runs with the random initialization. We stop training when iterations reached the maximum of 30 epochs.
+
+# 3.3 Main Results
+
+As shown in Table 2, dependency tree based models and latent tree based models generally achieve better results than syntax information free models, suggesting that syntactic information indeed benefits the ABSA task and enables it to achieve promising results.
+
+Our model consistently outperforms the models which do not use any syntactic information. For example, ACLT improves upon the BERT-SRC model by 3.56 points in terms of $F_{1}$ on the Lap14 dataset, which suggests that our proposed model is able to induce an effective latent tree for ABSA in an end-to-end fashion. In particular, with the exception of R-GAT+BERT on the Rest14 dataset in terms of $F_{1}$ , our model surpassed all compared models by a significant margin. For example, our model achieves 72.08 and 78.64 $F_{1}$ on the Rest15 and Rest16 datasets, which significantly outperform the current state-of-the-art model KumaGCN+BERT, under the same setting. The statistics empirically show that compared to the models that use syntactic information, ACLT can induce a more informative latent task-specific structure to establish effective connections between aspect words and context. Our ACLT model also shows its superiority over all baselines in terms of accuracy.
+
+# Does ACLT shorten the distances between aspect and opinion words?
+
+To gain further insight on the relationship between aspect and opinion words in the text, we inspect the distance just between aspect words and selected opinion words. Specifically, we first selected the top five most frequent positive and negative opinion words, respectively, in the Rest14 dataset. We define the distance between the aspect and opinion words to be the number of interaction hops between them. Thus we can calculate the distance between these opinion words and aspect words in a parse tree6 and an aspect-centric tree, respectively.
+
+| Models | Tree | Lap14 | Rest14 | Rest15 | Rest16 | Twitter |
| Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 | Acc | F1 |
| TNet-AS‡ | None | 76.54 | 71.75 | 80.69 | 71.27 | - | - | - | - | 74.97 | 73.60 |
| BERT-PT‡ | None | 78.07 | 75.08 | 84.95 | 76.96 | - | - | - | - | - | - |
| BERT-PAIR‡ | None | 78.99 | 75.03 | 84.46 | 76.98 | - | - | - | - | - | - |
| BERT-SRC | None | 77.59±0.18 | 72.27±0.02 | 85.27±0.28 | 77.61±0.38 | 81.73±0.45 | 66.22±0.43 | 90.91±0.07 | 76.29±0.76 | 73.12±0.29 | 72.29±0.25 |
| ASGCN‡ | Dependency | 75.55 | 71.05 | 80.77 | 72.02 | 79.89 | 61.89 | 88.99 | 67.48 | 72.15 | 70.40 |
| CDT‡ | Dependency | 77.19 | 72.99 | 82.30 | 74.02 | - | - | 85.58 | 69.93 | 74.66 | 73.66 |
| BiGCN‡ | Dependency | 74.59 | 71.84 | 81.97 | 73.48 | 81.16 | 64.79 | 88.96 | 70.84 | 74.16 | 73.35 |
| ASGCN+BERT | Dependency | 77.90±0.10 | 73.01±0.14 | 83.78±0.22 | 75.02±0.51 | 80.69±0.45 | 62.02±0.39 | 89.99±0.58 | 74.46±0.16 | 72.78±0.71 | 71.76±0.64 |
| R-GAT+BERT* | Dependency | 78.53±0.31 | 74.63±0.35 | 85.63±0.24 | 78.82±0.54 | 81.61±0.78 | 65.30±0.22 | 90.96±0.18 | 75.26±0.39 | 73.80±0.61 | 72.63±0.46 |
| KumaGCN+BERT† | Latent | 79.57±0.28 | 75.61±0.28 | 84.91±0.30 | 77.22±0.37 | 82.10±0.62 | 65.56±0.61 | 90.80±0.47 | 74.93±0.97 | 74.33±0.32 | 73.42±0.31 |
| ACLT | Latent | 79.68±0.38 | 75.83±0.03 | 85.71±0.06 | 78.44±0.09 | 84.44±0.08† | 72.08±0.08† | 92.15±0.14† | 78.64±0.19† | 75.48±0.16† | 74.51±0.32† |
+
+Table 2: Main Results (\%). The results of model with the symbol $\ddagger$ are retrieved from the original paper, and those with the * symbol are computed based on their open implementations. $\ddagger$ denotes the model using both the dependency parse tree and the latent tree. The best results on each dataset are in bold. The second-best ones are underlined. The $\dagger$ marker refers to $p$ -value $< 0.05$ in comparison with the second-best results.
+
+| Tree | positive opinion words |
| great | good | excellent | fresh | delicious |
| Parser | 4.38 | 4.50 | 5.11 | 8.02 | 6.91 |
| MTT | 3.84 | 4.47 | 5.05 | 6.61 | 4.43 |
| ACLT | 2.81 | 3.40 | 4.08 | 4.84 | 3.57 |
| Negative opinion words |
| Tree | rude | small | bad | awful | worst |
| Parser | 6.67 | 11.27 | 9.44 | 4.00 | 3.88 |
| MTT | 5.87 | 10.18 | 8.56 | 4.00 | 3.75 |
| ACLT | 3.27 | 6.45 | 3.89 | 2.89 | 3.13 |
+
+Table 3: The average distances (lower is better) between the top five opinion words and aspect words.
+
+Table 3 presents various statistics for the average distance of aspect and opinion words in the trees produced by spaCy dependency parser (Parser), the Matrix Tree Theory without specific root refinements (MTT), and our model (ACLT). As can be seen, in our aspect-centric latent tree, the average distance between opinion words and aspect words is shorter than those in dependency parse tree and MTT. We also observe that without the root refinement, the average distance between opinion words and aspect words in MTT is roughly equivalent to the parse tree. These results confirm our hypothesis that inducing tree structures whose roots are within aspect term enables the model to better correlate the aspect and opinion words than the standard parse tree.
+
+# 3.4 Model Analysis
+
+# Effect of different tree representations
+
+Our proposed aspect-centric latent tree, the latent Matrix tree, and the standard dependency parse tree all represent the structure of a sentence. Nevertheless, the differences between them and how they directly affect the aspect-based results need to be further investigated. In this section,
+
+we first use BERT-base as a contextual encoder, then use GCN to encode dependency parse tree information (Parser+GCN), latent Matrix tree information (MTT+GCN), latent Kuma structure (Kuma+GCN $^7$ ) and our aspect-centric tree information (ACLT+GCN). Table 4 summarizes the results.
+
+We observe that models incorporated with syntactic information generally outperform the vanilla BERT-SRC, indicating that syntactic information benefits the ABSA task. Such a phenomenon can also be observed in other fundamental NLP tasks (Jie and Lu, 2019; Xu et al., 2021). Moreover, we also found that both our ACLT and ACLT+GCN model consistently outperform models equipped with other dependency trees by a significant margin. These results demonstrate that the aspect-centric tree induced by our model is indeed capable of effectively building relationships between aspect and context words for the ABSA task. Under the same setting, ACLT+GCN outperforms Parser+GCN, MTT+GCN, and Kuma+GCN on all the datasets. In particular, our ACLT+GCN obtains 1.8, 2.6, and 7 points improvement over Parser+GCN, MTT+GCN, and Kuma+GCN on Rest15 in terms of $F_{1}$ . Moreover, ACLT+GCN outperforms ACLT on the Rest14 and the Twitter datasets, indicating using a GCN as a tree encoder can boost the model performance to a certain extent.
+
+We also have similar observations for our ACLT model under the setting of accuracy. These experimental results demonstrate that our proposed aspect-centric latent tree is a more effective structure for ABSA, compared to the parse tree. Interestingly, we observe that BERT cannot achieve
+
+| Models | Lap14 | Rest14 | Rest15 | Rest16 | Twitter |
| Acc. | F1 | Acc. | F1 | Acc. | F1 | Acc. | F1 | Acc. | F1 |
| BERT-SRC | 77.6 | 72.3 | 85.3 | 77.6 | 81.7 | 66.2 | 90.9 | 76.3 | 73.1 | 72.3 |
| Parser+GCN | 78.0 | 73.6 | 85.3 | 77.6 | 83.0 | 68.4 | 91.0 | 74.9 | 74.0 | 73.3 |
| MTT+GCN | 78.9 | 74.7 | 84.7 | 76.3 | 81.9 | 67.6 | 91.2 | 74.8 | 75.3 | 74.3 |
| Kuma+GCN | 78.1 | 73.5 | 85.3 | 77.9 | 80.3 | 63.2 | 90.4 | 75.2 | 74.6 | 73.7 |
| ACLT+GCN | 78.6 | 74.3 | 86.3 | 79.4 | 83.1 | 70.2 | 91.8 | 76.7 | 75.6 | 74.7 |
| ACLT | 79.7 | 75.8 | 85.7 | 78.4 | 84.4 | 72.1 | 92.2 | 78.6 | 75.5 | 74.5 |
+
+
+Figure 3: The number of sentences where the aspect words are roots under three different types of trees.
+
+a promising result on all datasets when introduced with the parse tree structure. For example, Parser+GCN drops 1.4 points in $F_{1}$ on the Rest16 dataset in comparison with vanilla BERT-SRC. This suggests that a dependency parse tree structure may not be able to capture the complicated interactions between aspect and opinion words effectively.
+
+# Did root refinement work?
+
+We quantify the effectiveness of root refinement that adjusts the aspect words to be the root. We experiment with three different structures, including the dependency parse tree obtained by spaCy (Parser), the tree directly induced by MTT without specific root refinements (MTT), and the aspect-centric tree induced by our model (ACLT). Figure 3 shows the number of sentences where the aspect word is consistent with its root under three different tree structures in each dataset. Compared to the other two tree structures, we observe that the roots of our learned trees are consistent with the aspect words in most sentences. For example, in the Rest16 test dataset, there are 421 sentences in
+
+Table 4: The performance of BERT with our aspect-centric latent tree vs. BERT with other tree structures.
+
+| Models | Rest14 | Twitter |
| Acc. | F1 | Acc. | F1 |
| BERT-SRC | 85.27 | 77.61 | 73.12 | 72.29 |
| ACLT (Entire Tree) | 85.71 | 78.44 | 75.48 | 74.51 |
| Pruned Tree (k=1) | 85.27 | 77.37 | 74.56 | 73.75 |
| Pruned Tree (k=2) | 84.91 | 77.05 | 73.84 | 72.72 |
| R-GAT+BERT (Entire Tree) | 85.63 | 78.82 | 73.80 | 72.63 |
| Pruned Tree (k=1) | 85.71 | 79.14 | 74.71 | 73.85 |
| Pruned Tree (k=2) | 84.73 | 78.67 | 73.99 | 73.16 |
| KumaGCN+BERT (Entire Tree) | 84.91 | 77.22 | 74.33 | 73.42 |
| Pruned Tree (k=1) | 84.91 | 76.73 | 75.14 | 73.90 |
| Pruned Tree (k=2) | 85.09 | 77.35 | 75.43 | 74.42 |
+
+Table 5: The results of ACLT, R-GAT+BERT and KumaGCN+BERT with different tree pruning. $k = 1$ : only keep the first-order edges to the aspect. $k = 2$ : keep both the first-order and second-order edges.
+
+which the aspect words are consistent with the root words using the ACLT model. These results demonstrate that the problem of inconsistency between root and aspect has come close to being solved with our ACLT model.
+
+# Effect of tree pruning
+
+To further investigate the effect of different tree structures on model performance, we examine ACLT, R-GAT+BERT, and KumaGCN+BERT with different tree pruning. More specifically, for R-GAT+BERT using the standard prase tree, we discard the dependency relation beyond first-order $(k = 1)$ and second-order $(k = 2)$ to aspects, respectively. Following Guo et al. (2020), we mask the information of the adjacency matrix $P$ (Equation 6) that is beyond first-order $(k = 1)$ and second-order $(k = 2)$ with respect to the aspect for KumaGCN+BERT and our ACLT model. As shown in Table 5, on the Twitter dataset, our ACLT yields the best performance with the entire tree, outperforming the first-order pruned tree and second-order pruned tree by 0.76 and 1.79 points in terms of $F_{1}$ , respectively. This indicates it is necessary to induce
+
+| Models | Lap14 | Rest14 | Rest15 | Rest16 | Twitter |
| Acc. | F1 | Acc. | F1 | Acc. | F1 | Acc. | F1 | Acc. | F1 |
| Full Model | 79.7 | 75.8 | 85.7 | 78.4 | 84.4 | 72.1 | 92.2 | 78.6 | 75.5 | 74.5 |
| w/o | Root Refinement | 77.8 | 73.2 | 84.5 | 76.4 | 81.5 | 66.9 | 89.8 | 73.8 | 73.4 | 72.6 |
| w/o | Latent Tree | 77.8 | 73.4 | 84.7 | 76.7 | 83.9 | 69.1 | 91.5 | 77.6 | 74.0 | 73.3 |
| w | Fixed Root | 79.2 | 75.0 | 84.6 | 76.3 | 83.2 | 68.9 | 91.1 | 75.0 | 75.0 | 74.1 |
+
+Table 6: Ablation study of ACLT on various datasets. w/o and w indicate without and with, respectively. Fixed Root means the tree's root is fixed on the first word of aspect term (Wang et al., 2020).
+
+an entire aspect-centric latent tree rather than its pruned subtree in our model. Interestingly, we observe that R-GAT+BERT and KumaGCN+BERT achieve the best results in cases of Pruned Tree $(k = 1)$ and Pruned Tree $(k = 2)$ , respectively. It is likely because that both R-GAT+BERT and KumaGCN+BERT rely on the parse tree. Nevertheless, only a small part of the standard parse tree is related to the ABSA task. Introducing the entire tree may prevent the model from effectively capturing the relationships between opinion words and aspect words.
+
+# Ablation Study
+
+We conducted experiments to examine the effectiveness of the major components of our ACLT model, and Table 6 shows the ablation results on the five datasets we used. We observe that both latent tree and root refinement component contribute to the main model. Specifically, with removal of the root refinement module, performance of ACLT drops considerably, leading to a 5.2 and 4.8 decrease, in terms of $F_{1}$ , on the Rest15 dataset and the Rest16 dataset, respectively. This result illustrates that refining root to aspect words plays a crucial role in learning a task-specific latent structure for ABSA. The performance drop on fixed root indicates that computing each aspect word's probability to become the root is essential for achieving good performance.
+
+# 3.5 Case Study
+
+To gain further insight on our induced aspect-centric tree, we use Chu-Liu-Edmonds' algorithm (Edmonds, 1967) to extract the aspect-centric trees, where each tree is expressed by a weighted adjacency matrix as shown in Equation (7). We selected two examples from the Twitter and Rest16 datasets, whose sentiments can be correctly predicted by our ACLT model. Overall we observe that aspect-centric trees differ from the standard dependency trees in the types of dependencies they
+
+
+Figure 4: Two examples from the Twitter and Rest16 dataset to illustrate the difference between a dependency parse tree (a) and an aspect-centric tree (b). Red words indicate the aspect words of the sentence.
+
+create which tend to be of shorter length.
+
+Specifically, as shown in Figure 4 top (a), the root of the dependency parse tree is the word "looks" which is inconsistent with the aspect word "google" or "wave", and the key opinion word "interesting" requires three-hop and two-hop interactions to establish a connection with each of the two aspect words respectively. However, as shown in Figure 4 top (b), our aspect-centric tree is rooted in the aspect word "wave". In addition, we observe that the opinion words and aspect words can be connected by two-hop and one-hop interactions through our aspect-centric tree, which is more effective than the number of interaction hops needed in the dependency parse tree.
+
+We also have similar observations for the second case. Illustrated in Figure 4 bottom (a), the distance between the aspect words "lunch" and "menu" and the critical opinion word "awesome" is four-hops and three-hops, respectively, in the parse tree. In contrast, Figure 4 bottom (b) shows that in the aspect-centric tree extracted by our model, the distances between aspect and opinion words are one-hop and two-hops, which is closer than the distance in the standard dependency parse tree.
+
+# 4 Related Work
+
+Aspect-based sentiment analysis. Early efforts on aspect-based sentiment focused on predicting polarity by employing attention mechanism (Bahdanau et al., 2015) to model interactions between aspect and context words (Wang et al., 2016; Chen et al., 2017; Liu and Zhang, 2017; Li et al., 2018; Wang et al., 2018). More recently, neural pretrained language models, for instance, BERT (Devlin et al., 2019) enabled ABSA to achieve promising results. For example, Sun et al. (2019a) manually constructed auxiliary sentences using the aspect word to convert ABSA into a sentence-pair classification task. Huang and Carley (2019) propagated opinion features from syntax neighborhood words to the aspect words, in a BERT-based model. Another line of work in ABSA focused on leveraging the explicit dependency parse trees to model the relationships between context and aspect words. Zhang et al. (2019) and Sun et al. (2019b) used GCNs to integrate dependency tree information to capture structural and contextual information simultaneously for aspect-based sentiment analysis. Wang et al. (2020) greedily reshaped the dependency parse trees by using manual rules to obtain the task-specific syntactic structures.
+
+Latent variable induction. Latent variable models (Maillard et al., 2017; Kim et al., 2017; Niculae et al., 2018; Mensch and Blondel, 2018; Liu and Lapata, 2018; Zou and Lu, 2019) have gained much popularity in building Natural Language Processing (NLP) pipelines and discovering task-specific linguistic structures (Kim et al., 2018; Martins et al., 2019). The crucial obstacle of designing structured latent variable models is that they typically involve computing an "argmax" (i.e., searching the highest-scoring discrete structure, such as a parse tree) in the middle of a computation graph. End-to-end approaches directly replace the "argmax" approach by introducing a continuous relaxation for which the exact gradient can be computed and back-propagated normally. For example, Nan et al. (2020) and Guo et al. (2020) used marginal inference to construct latent structures to improve information aggregation in the relation extraction task. More in line with our work, Chen et al. (2020) constructed task-specific structures by developing a gate mechanism to dynamically combine the parse tree information and HardKuma structure. Our work differs from this prior work in
+
+three main aspects. First, we construct the aspect-specific tree for inference without relying on an external parser. Second, we facilitate the interactions between target and opinion by introducing an explicit supervision to adaptively adjust the aspect to be the root in an end-to-end fashion. Third, we compute each aspect word's probability to become the root which enables our model to reduce the search space of inferring root for MTT in the training process.
+
+# 5 Conclusion and Future Work
+
+In this paper, we propose to use Aspect-Centric Latent Trees (ACLT) which are specifically tailored for the ABSA task to link up aspects with opinion words in an end-to-end fashion. Experiments on five benchmark datasets show the effectiveness of our model. The qualitative and quantitative analysis illustrate that our model is able to improve the probability of aspect words becoming the root of the sentence by imposing root constraints. Moreover, thorough analysis demonstrates our model shortens the average distances between aspect and opinions by at least $19\%$ on the SemEval Restaurant14 dataset. To the best of our knowledge, we are the first to link up aspects with opinions through the specifically designed latent tree that imposes root constraints. One possible future direction is to apply the proposed approach to other sentiment analysis tasks, such as aspect triplet extraction (Xu et al., 2020b).
+
+# Acknowledgements
+
+We thank Xiaochi Wei, Qian Liu and Ankit Garg and the anonymous reviewers for their comments. This work was supported by the National Key R&D Program of China under Grant No. 2020AAA0106600, supported by the National Natural Science Foundation of China (Grant No. U19B2020), sponsored by CCF-Tencent Open Research Fund (CCF-Tencent IAGR20200103) and the funding from China Scholarship Council No. 201906030188. This research is also supported by Ministry of Education, Singapore, under its Academic Research Fund (AcRF) Tier 2 Programme (MOE AcRF Tier 2 Award No: MOE2017-T2-1-156). Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not reflect the views of the Ministry of Education, Singapore.
+
+# References
+
+Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In Proceedings of ICLR.
+Jasmijn Bastings, Wilker Aziz, and Ivan Titov. 2019. Interpretable neural predictions with differentiable binary variables. In Proceedings of ACL.
+Chenhua Chen, Zhiyang Teng, and Yue Zhang. 2020. Inducing target-specific latent structures for aspect sentiment classification. In Proceedings of EMNLP.
+Peng Chen, Zhongqian Sun, Lidong Bing, and Wei Yang. 2017. Recurrent attention network on memory for aspect sentiment analysis. In Proceedings of EMNLP.
+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.
+Li Dong, Furu Wei, Chuanqi Tan, Duyu Tang, Ming Zhou, and Ke Xu. 2014. Adaptive recursive neural network for target-dependent Twitter sentiment classification. In Proceedings of ACL.
+Jack Edmonds. 1967. Optimum branchings. Journal of Research of the national Bureau of Standards B.
+Zhijiang Guo, Guoshun Nan, Wei Lu, and Shay B. Cohen. 2020. Learning latent forests for medical relation extraction. In Proceedings of IJCAI.
+Binxuan Huang and Kathleen Carley. 2019. Syntax-aware aspect level sentiment classification with graph attention networks. In Proceedings of EMNLP.
+Zhanming Jie and Wei Lu. 2019. Dependency-guided LSTM-crf for named entity recognition. In Proceedings of EMNLP.
+Yoon Kim, Carl Denton, Luong Hoang, and Alexander M. Rush. 2017. Structured attention networks. In Proceedings of ICLR.
+Yoon Kim, Sam Wiseman, and Alexander M Rush. 2018. A tutorial on deep latent variable models of natural language. In Proceedings of ACL.
+Terry Koo, Amir Globerson, Xavier Carreras, and Michael Collins. 2007. Structured prediction models via the matrix-tree theorem. In Proceedings of EMNLP.
+Hao Li and Wei Lu. 2019. Learning explicit and implicit structures for targeted sentiment analysis. In Proceedings of EMNLP.
+Xin Li, Lidong Bing, Wai Lam, and Bei Shi. 2018. Transformation networks for target-oriented sentiment classification. In Proceedings of ACL.
+
+Bing Liu. 2012. Sentiment analysis and opinion mining. Synthesis lectures on human language technologies.
+Jiangming Liu and Yue Zhang. 2017. Attention modeling for targeted sentiment. In Proceedings of EACL.
+Yang Liu and Mirella Lapata. 2018. Learning structured text representations. Transactions of the Association for Computational Linguistics, pages 63-75.
+Jean Maillard, Stephen Clark, and Dani Yogatama. 2017. Jointly learning sentence embeddings and syntax with unsupervised tree-lstms. arXiv preprint arXiv:1705.09189.
+Andre F. T. Martins, Tsvetomila Mihaylova, Nikita Nangia, and Vlad Niculae. 2019. Latent structure models for natural language processing. In Proceedings of ACL.
+Arthur Mensch and Mathieu Blondel. 2018. Differentiable dynamic programming for structured prediction and attention. In Proceedings of ICML.
+Guoshun Nan, Zhijiang Guo, Ivan Sekulic, and Wei Lu. 2020. Reasoning with latent structure refinement for document-level relation extraction. In Proceedings of ACL.
+Vlad Niculae, André F. T. Martins, and Claire Cardie. 2018. Towards dynamic computation graphs via sparse latent structure. In Proceedings of EMNLP.
+Bo Pang, Lillian Lee, et al. 2008. Opinion mining and sentiment analysis. Foundations and Trends® in Information Retrieval.
+Maria Pontiki, Dimitris Galanis, Haris Papageorgiou, S. Manandhar, and Ion Androutsopoulos. 2015. Semeval-2015 task 12: Aspect based sentiment analysis. In Proceedings of Workshop on SemEval.
+Maria Pontiki, Dimitris Galanis, Haris Papageorgiou, S. Manandhar, and Ion Androutsopoulos. 2016. Semeval-2016 task 5: Aspect based sentiment analysis. In Proceedings of Workshop on SemEval.
+Maria Pontiki, Dimitris Galanis, John Pavlopoulos, Haris Papageorgiou, Ion Androutsopoulos, and S. Manandhar. 2014. Semeval-2014 task 4: Aspect based sentiment analysis. In Proceedings of Workshop on SemEval.
+Chi Sun, Luyao Huang, and Xipeng Qiu. 2019a. Utilizing BERT for aspect-based sentiment analysis via constructing auxiliary sentence. In Proceedings of NAACL.
+Kai Sun, Richong Zhang, Samuel Mensah, Yongyi Mao, and Xudong Liu. 2019b. Aspect-level sentiment analysis via convolution over dependency tree. In Proceedings of EMNLP.
+Xiaobing Sun and Wei Lu. 2020. Understanding attention for text classification. In Proceedings of ACL, pages 3418-3428, Online. Association for Computational Linguistics.
+
+Duyu Tang, Bing Qin, and Ting Liu. 2016. Aspect level sentiment classification with deep memory network. In Proceedings of EMNLP.
+Jialong Tang, Ziyao Lu, Jinsong Su, Yubin Ge, Linfeng Song, Le Sun, and Jiebo Luo. 2019. Progressive self-supervised attention learning for aspect-level sentiment analysis. In Proceedings of ACL.
+William Thomas Tutte. 1984. Graph theory. Clarendon Press.
+Bailin Wang and Wei Lu. 2018. Learning latent opinions for aspect-level sentiment classification. In Proceedings of AAAI.
+Kai Wang, Weizhou Shen, Yunyi Yang, Xiaojun Quan, and Rui Wang. 2020. Relational graph attention network for aspect-based sentiment analysis. In Proceedings of ACL.
+Shuai Wang, Sahisnu Mazumder, Bing Liu, Mianwei Zhou, and Yi Chang. 2018. Target-sensitive memory networks for aspect sentiment classification. In Proceedings of ACL.
+Yequan Wang, Minlie Huang, Xiaoyan Zhu, and Li Zhao. 2016. Attention-based LSTM for aspect-level sentiment classification. In Proceedings of EMNLP.
+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 M. Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of EMNLP.
+Hu Xu, Bing Liu, Lei Shu, and Philip Yu. 2019. BERT post-training for review reading comprehension and aspect-based sentiment analysis. In Proceedings of NAACL.
+Lu Xu, Lidong Bing, Wei Lu, and Fei Huang. 2020a. Aspect sentiment classification with aspect-specific opinion spans. In Proceedings of EMNLP.
+Lu Xu, Zhanming Jie, Wei Lu, and Lidong Bing. 2021. Better feature integration for named entity recognition. In Proceedings of NAACL.
+Lu Xu, Hao Li, Wei Lu, and Lidong Bing. 2020b. Position-aware tagging for aspect sentiment triplet extraction. In Proceedings of EMNLP.
+Chen Zhang, Qiuchi Li, and Dawei Song. 2019. Aspect-based sentiment classification with aspect-specific graph convolutional networks. In Proceedings of EMNLP.
+Mi Zhang and Tieyun Qian. 2020. Convolution over hierarchical syntactic and lexical graphs for aspect level sentiment analysis. In Proceedings of EMNLP.
+
+Yanyan Zou and Wei Lu. 2019. Quantity tagger: A latent-variable sequence labeling approach to solving addition-subtraction word problems. In Proceedings of ACL.
+
+# A Statistics of root inconsistency
+
+We count the number of sentences where the aspect word is inconsistent with the roots of its three different structures for all five datasets. Table 7 shows the details.
+
+| Tree | Lap14 | Rest14 | Rest15 | Rest16 | Twitter |
| Parser | 591 (93%) | 1,077 (96%) | 484 (89%) | 551 (89%) | 631 (91%) |
| MTT | 542 (85%) | 1,018 (91%) | 463 (85%) | 533 (87%) | 514 (74%) |
| ACLT | 213 (33%) | 882 (79%) | 202 (37%) | 195 (32%) | 353 (51%) |
| Total | 638 | 1,120 | 542 | 616 | 692 |
+
+# B Hyper-parameters of ACLT
+
+All hyper-parameters are tuned based on the development set. The important hyper-parameters are listed in Table 8. We employed the uncased version of the BERT model in PyTorch. Following previous conventions, we repeat each experiment three times and average the results, reporting accuracy (Acc.) and macro-f1 $(F_{1})$ .
+
+Table 7: Statistics of sentences where the aspect word is inconsistent with the roots of its three different structures.
+
+| Batch size | 64 |
| Learning rate | 5.00E-05 |
| Optimizer | Adam |
| Max Sequence Length | 96 |
| Hidden Size | 798 |
| Hidden Layer | 12 |
| Dropout probability | 0.1 |
+
+Table 8: Hyper-parameters of ACLT.
\ No newline at end of file
diff --git a/tobecloserlearningtolinkupaspectswithopinions/images.zip b/tobecloserlearningtolinkupaspectswithopinions/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..6973c300f9af4f6686294f65b323b4dc13d68fa2
--- /dev/null
+++ b/tobecloserlearningtolinkupaspectswithopinions/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:289f12845cddfa33fb92ecc3cba4324bf3fcb943efe8607a1feb0026b952bc2f
+size 494166
diff --git a/tobecloserlearningtolinkupaspectswithopinions/layout.json b/tobecloserlearningtolinkupaspectswithopinions/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..fdd2dac65cfb55736c7047f15edf81d6e615ccc4
--- /dev/null
+++ b/tobecloserlearningtolinkupaspectswithopinions/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:573e91e6c0eeeedd3f3c6430bc5bec2d6fcfaee36e3e9e622bc8c81f04b3f025
+size 417629
diff --git a/topictransferabletablequestionanswering/2b3ea7b6-d47c-49d5-9569-22e599bde46c_content_list.json b/topictransferabletablequestionanswering/2b3ea7b6-d47c-49d5-9569-22e599bde46c_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..9e648a628e58aa2336fa72a11ce43ab215257b1d
--- /dev/null
+++ b/topictransferabletablequestionanswering/2b3ea7b6-d47c-49d5-9569-22e599bde46c_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f8becd8ffefc13d0115f47f005dadd86136fb68ae38e72025444c643e0892627
+size 94278
diff --git a/topictransferabletablequestionanswering/2b3ea7b6-d47c-49d5-9569-22e599bde46c_model.json b/topictransferabletablequestionanswering/2b3ea7b6-d47c-49d5-9569-22e599bde46c_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..cebbb0f5145a337cd90964e62fbdb440ca571433
--- /dev/null
+++ b/topictransferabletablequestionanswering/2b3ea7b6-d47c-49d5-9569-22e599bde46c_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:18374ab03bd5a1ad2028a2da8dfd3f28f82e2fb5c39452c9fdb2522803925217
+size 113059
diff --git a/topictransferabletablequestionanswering/2b3ea7b6-d47c-49d5-9569-22e599bde46c_origin.pdf b/topictransferabletablequestionanswering/2b3ea7b6-d47c-49d5-9569-22e599bde46c_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..07fd62d035a8648c9584707f29222c28ac0d95e9
--- /dev/null
+++ b/topictransferabletablequestionanswering/2b3ea7b6-d47c-49d5-9569-22e599bde46c_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:93beb1ce66efefc99ab6cf9eca935d63f2c45ddd29ab7f04aa9509da133375b8
+size 825209
diff --git a/topictransferabletablequestionanswering/full.md b/topictransferabletablequestionanswering/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..56a84a07265d54d149d375c26f785fd50e41c760
--- /dev/null
+++ b/topictransferabletablequestionanswering/full.md
@@ -0,0 +1,381 @@
+# Topic Transferable Table Question Answering
+
+Saneem A. Chemmengath $^{1*}$ Vishwajeet Kumar $^{1*}$ Samarth Bharadwaj $^{1}$
+
+Jaydeep Sen1 Mustafa Canim1, Soumen Chakrabarti2
+
+Alfio Gliozzo $^{1}$ Karthik Sankaranarayanan $^{1}$ ,
+
+$^{1}$ IBM Research $^{2}$ Indian Institute of Technology, Bombay
+
+saneem.cg@in.ibm.com, vishk024@in.ibm.com, samarth.b@in.ibm.com,
+
+jaydesen@in.ibm.com, mustafa@us.ibm.com, soumen.chakrabarti@gmail.com
+
+gliozzo@us.ibm.com, kartsank@in.ibm.com
+
+# Abstract
+
+Weakly-supervised table question-answering (TableQA) models have achieved state-of-art performance by using pre-trained BERT transformer to jointly encoding a question and a table to produce structured query for the question. However, in practical settings TableQA systems are deployed over table corpora having topic and word distributions quite distinct from BERT's pretraining corpus. In this work we simulate the practical topic shift scenario by designing novel challenge benchmarks WikiSQL-TS and WikiTQ-TS1, consisting of train-dev-test splits in five distinct topic groups, based on the popular WikiSQL and WikiTableQuestions datasets. We empirically show that, despite pre-training on large open-domain text, performance of models degrades significantly when they are evaluated on unseen topics. In response, we propose T3QA (Topic Transferable Table Question Answering) a pragmatic adaptation framework for TableQA comprising of: (1) topic-specific vocabulary injection into BERT, (2) a novel text-to-text transformer generator (such as T5, GPT2) based natural language question generation pipeline focused on generating topic specific training data, and (3) a logical form re-ranker. We show that T3QA provides a reasonably good baseline for our topic shift benchmarks. We believe our topic split benchmarks will lead to robust TableQA solutions that are better suited for practical deployment.
+
+# 1 Introduction
+
+Documents, particularly in enterprise settings, often contain valuable tabular information (e.g., financial, sales/marketing, HR). Natural language question answering systems over a table (or TableQA) have an additional complexity of understanding the tabular structure including row/column head
+
+| Party | Candidate | Votes |
| Conservatives | Andrew Turner | 32,717 |
| Liberal Democrats | Anthony Rowlands | 19,739 |
| Labour | Mark Chiverton | 11,484 |
| UK Independence | Michael Tarrant | 2,352 |
| Independent | Edward Corby | 551 |
+
+Question: Who ran in the election for labour party?
+
+Answer : Mark Chiverton
+
+Figure 1: Topic-sensitive representations are important to infer that, in the context of the topic politics, the query span "ran in the election" should be linked to the "Candidate" column in the table.
+
+ers compared to the more widely-studied passage-based reading comprehension (RC) problem. Further, TableQA may involve complex questions with multi-cell or aggregate answers.
+
+Most of the TableQA systems use semantic parsing approaches that utilizes language encoders to produce an intermediate logical form from the natural language question which is executed that over the tabular data to get the answer. While some systems (Zhong et al., 2017) were fully supervised, needing pairs of questions and logical forms as training data, more recent systems (Pasupat and Liang, 2015; Krishnamurthy et al., 2017; Dasigi et al., 2019) rely only on the answer as weak supervision and search for a correct logical form. The current best TableQA systems (Herzig et al., 2020; Yin et al., 2020a) capitalize on advances in language modeling, such as BERT, and extend it to encode table representations as well. They are shown to produce excellent results on popular benchmarks such as WikiSQL (Zhong et al., 2017) and WikiTableQuestions(WikiTQ) (Pasupat and Liang, 2015).
+
+With increasing prevalence of text analytics as a centrally-trained service that serves diverse customers, practical QA systems will encounter tables and questions from topics which they may not have necessarily seen during training. It is critical that
+
+
+Figure 2: Overview of the proposed T3QA framework for weakly-supervised TableQA.
+
+the language understanding and parsing capabilities of these QA models arising from their training regime are sufficiently robust to answer questions over tables from such unseen topics.
+
+As we show later in this paper, the existing approaches degrade significantly when exposed to questions from topics not seen during training (i.e., topic-shift). To examine this phenomenon, we first instrument and dissect the performance of these recent systems under topic shift. In particular, we experiment with TaBERT (Yin et al., 2020b), which is a weakly supervised TableQA model which encodes the table and question using BERT-encoder and outputs a logical form using an LSTM decoder. In the example shown in Figure 1, topic shift may cause poor generalization for specific terminology or token usage across unseen topics.
+
+We introduce a novel experimental protocol to highlight the difficulties of topic shift in the context of two well-known Wikipedia-based TableQA datasets: WikiSQL (Zhong et al., 2017) and WikiTableQuestions Pasupat and Liang (2015). Despite recent transformer-based TableQA models being pre-trained with open-domain data, including Wikipedia itself, we observe a performance drop of $5 - 6\%$ when test instances arise from topics not seen during training.
+
+To address this challenge, we next propose a novel T3QA framework for TableQA training that leads to greater cross-topic robustness. Our approach uses only unlabeled documents with ta
+
+bles from the never-seen topic (which we interchangeably call the target topic), without any hand-created (question,logical form) pairs in the target topic. Specifically, we first extend the vocabulary of BERT for the new topic. Next, it uses a powerful text-to-text transfer transformer module to generate synthetic questions for the target topic. A pragmatic question generator first samples SQL queries of various types from the target topic table and transcribes them to natural language questions which is then used to finetune the TableQA model on target topic. Finally, T3QA improves the performance of the TableQA model with a post-hoc logical form re-ranker, aided by entity linking. The proposed improvements are applicable to any semantic parsing style TableQA with transformer encoders and is shown to confer generally cumulative improvements in our experiments. To the best of our knowledge, this is the first paper to tackle the TableQA problem in such a zero-shot setting with respect to target topics.
+
+The main contributions of this work are:
+
+- This is the first work to address the phenomenon of topic shift in Table Question Answering systems.
+- We create novel experimental protocol on 2 existing TableQA datasets to study the effects of topic shift. (WikiSQL-TS and WikiTQ-TS)
+- We propose new methods that uses unlabeled text and tables from target topic to create TableQA models which are more robust to topic shift.
+
+# 2 Related work
+
+Most TableQA systems take a semantic parsing view (Pasupat and Liang, 2015; Zhong et al., 2017; Liang et al., 2017) for question understanding and produce a logical form of the natural language question. Fully-supervised approaches, such as by (Zhong et al., 2017) need pairs of questions and logical form for training. However, obtaining logical form annotations for questions at scale is expensive. A simpler, cheaper alternative is to collect only question-answer pairs as weak supervision (Pasupat and Liang, 2015; Krishnamurthy et al., 2017; Dasigi et al., 2019). Such systems search for the correct logical forms under syntactic and semantic constraints that produce the correct answer. Weak supervision is challenging, owing
+
+| Topics | Member sub-topics from Wikipedia | WikiSQL-TS | WikiTQ-TS |
| Train | Dev | Test | Train | Dev | Test |
| Politics | Crime, Geography, Government, Law, Military, Policy, Politics, Society, World | 7728 | 1236 | 2314 | 1836 | 545 | 580 |
| Culture | Entertainment, Events, History, Human behavior, Humanities, Life, Culture, Mass media, Music, Organizations | 11804 | 1734 | 3198 | 2180 | 502 | 691 |
| Sports | Sports | 26090 | 4016 | 7242 | 4867 | 1195 | 1848 |
| People | People | 6548 | 861 | 1957 | 1946 | 420 | 743 |
| Misc | Academic disciplines, Business, Concepts, Economy, Education, Energy, Engineering, Food and Drink, Health, Industry, Knowledge, Language, Mathematics, Mind, Objects, Philosophy, Religion, Nature, Science and technology, Universe | 3059 | 395 | 852 | 1032 | 357 | 438 |
+
+Table 1: Statistics of the proposed WikiSQL-TS and WikiTQ-TS benchmarks per topic.
+
+to the large search space that includes many possible spurious logical forms (Guu et al., 2017) that may produce the target answer but not an accurate logical transformation of the natural question.
+
+Recent TableQA systems (Herzig et al., 2020; Yin et al., 2020a; Glass et al., 2021) extend BERT to encode the entire table including headers, rows and columns. They aim to learn a table-embedding representation that can capture correlations between question keywords and target cell of the table. TAPAS (Herzig et al., 2020) and RCI (Glass et al., 2021) are designed to answer a question by predicting the correct cells in the table in a truly end-to-end manner. TaBERT (Yin et al., 2020a) is a powerful encoder developed specifically for the TableQA task. TaBERT jointly encodes a natural language question and the table, implicitly creating (i) entity links between question tokens and table-content, and (ii) relationship between table cells, derived from its structure. To generate the structured query, the encoding obtained from TaBERT is coupled with a memory augmented semantic parsing approach (MAPO) (Liang et al., 2018).
+
+Question generation (QG) (Liu et al., 2020; Sultan et al., 2020; Shakeri et al., 2020) has been widely explored in reading comprehension (RC) task to reduce the burden of annotating large volumes of Q-A pairs given a context paragraph. Recently, Puri et al. (2020) used GPT-2 (Radford et al., 2019) to generate synthetic data for RC, showing that synthetic data alone is sufficient to obtain state-of-art on the SQUAD1.1 dataset. For the QG task in TableQA, systems proposed by Benmalek et al. (2019); Guo et al. (2018); Serban et al. (2016) utilize the structure of intermediate logical forms (e.g., SQL) to generate natural language questions. However, none of these QG methods utilize the additional context like table headers, structure and se
+
+mantics of the tables or the nuances of different possible question types like complex aggregations. To the best of our knowledge, our approach is the first to generate questions specifically for TableQA with the assistance of a logical query and large pre-trained multitask transformers.
+
+Domain adaptation approaches in QA (Lee et al., 2019; Ganin et al., 2016) have so far mostly used adversarial learning with an aim to identify domain agnostic features, including in RC applications (Wang et al., 2019; Cao et al., 2020). However, for the TableQA systems using BERT-style language models with vast pre-training, topic shifts remain an unexplored problem.
+
+# 3 T3QA framework
+
+To our knowledge, this is the first work to explore TableQA in unseen topic setting. Consequently, no public topic-sliced TableQA dataset is available. We introduce a topic-shift benchmark by creating new splits in existing popular TableQA datasets: WikiSQL (Zhong et al., 2017) and WikiTQ (Pasupat and Liang, 2015). The benchmark creation process is described in Section 3.1. Then, we introduce the proposed framework (illustrated in Figure 2) to help TableQA system cope with topic shift. Section 3.2 describes the topic specific vocabulary extension for BERT, followed by Question Generation in target topic in Section 3.3 and reranking logical forms in Section 3.4.
+
+# 3.1 TableQA topic-shift benchmark
+
+To create a topic-shift TableQA benchmark out of existing datasets, topics have to be assigned to every instance. Once topics are assigned, we create train-test splits with topic shift. I.e., train instances and test instances come from non-overlapping sets of topics. TableQA instances are triplets of the
+
+form {table, question, answer}. For the datasets WikiSQL and WikiTQ, these tables are taken from Wikipedia articles. WikiSQL has 24,241 tables taken from 15,258 articles and WikiTQ has 2,108 tables from 2,104 articles.
+
+The Wikipedia category graph (WCG) is a dense graph organized in a taxonomy-like structure. For the Wikipedia articles corresponding to tables in WikiSQL and WikiTQ, we found that they are connected to $16000+$ categories in WCG on an average. Among the Wikipedia Category:Main topic articles, Wikipedia articles were connected to $38+$ out of 42 categories in WCG.
+
+We use category information from Wikipedia articles to identify topics for each of the article and then transfer those topics to the corresponding tables. The main steps are listed below; details can be found in Appendix B.
+
+- We identify 42 main Wikipedia categories.
+- For each table, we locate the Wikipedia article containing it.
+- From the page, we follow category ancestor links until we reach one or more main categories.
+- In case of multiple candidates, we choose one based on the traversed path length and the number of paths between the candidate and the article.
+
+We cannot take an arbitrary subset of topics for train and the rest for test split to create a topic-shift protocol, because many topics are strongly related to others. For example, topic Entertainment is more strongly related to Music than to Law. To avoid this problem, we cluster these Wikipedia main topics into groups such that similar topics fall in the same group. Using a clustering procedure described in Appendix B, we arrive at 5 high-level topic groups: Politics, Culture, Sports, People and Miscellaneous.
+
+Table 1 gives the membership of each topic group and the number of instances in WikiSQL and WikiTQ dataset per topic. For ease of discussion, we will be calling the five topic groups as topics from now on. For both datasets, we create five leave-one-out topic-shift experiment protocols where in each topic becomes the test set, called the target topic and the rest four the training set is called the source topic(s).
+
+In our protocol, for training, apart from the instances from source topic, we also provide tables and document from the target topic. Documents are the text crawled from the target topic articles from Wikipedia. Collecting unlabeled tables and
+
+text data for a target topic is inexpensive. We name these datasets WikiSQL-TS (WikiSQL with topic shift) and WikiTQ-TS.
+
+# 3.2 Topic specific BERT vocabulary extension
+
+Sub word segmentation in BERT has a potential risk of segmenting named entities or in general unseen words in the target corpus. Vocabulary extension ensures that topic specific words are encoded in entirety and avoids splitting into sub-words. Our goal is to finetune BERT with extended vocabulary on topic specific target corpus to learn topic sensitive contextual representation. So we add frequent topic-specific words to encourage the BERT encoder to learn better topic sensitive representation, which is crucial for better query understanding and query-table entity linking.
+
+# 3.3 Table-question generation
+
+In our proposed topic-shift experiment protocol with the training set from source topic, unlabeled tables and free text from target topic are provided in the training phase. We propose to use tables from the target topic to generate synthetic question-answer pairs and use these augmented instances for training the TableQA model. Unlike question generation from text, a great deal of additional control is available when generating questions from tables. Similar to Guo et al. (2018), we first sample SQL queries from a given table, and then use a text-to-text transformers (T5) (Raffel et al., 2020) based sequence-to-sequence model to transcribe the SQL query to a natural language question.
+
+# 3.3.1 SQL sampling
+
+For generating synthetic SQL queries from a given table T, we have designed a focused and controllable SQL query generation mechanism presented in Algorithm 1. Our approach is similar to Zhong et al. (2017) but unlike the existing approaches, we use guidance from target query syntax to offer much more control over the type of natural language questions being generated. We also use additional context such as table header, target answer cell to help the model generate more meaningful questions suitable for T3QA. We sample the query type (simple retrieval vs. aggregations) and associated where clauses from a distribution that matches the prior probability distribution of training data, if that is available. Sampling of query type and number of where clauses is important to mitigate
+
+Algorithm 1: Algorithm for SQL query Generation from a table.
+Input: Table T, Integer targetNum
+Output: SQLQuery[] generatedSQLs
+1 foreach Column C ∈ T.columns do
+2 C.dataType ← ExtractDataType(C)
+3 while generatedSQLs.size() < targetNum do
+4 SQLQuery S ← Empty;
+5 Integer num Everywhere ← sample from a multinomial distribution over {1,2,3,4};
+6 Where[] whereClauses ← generateWhereClauses(T, num Everywhere);
+7 S.Where ← whereClauses;
+8 StringReturnType ← sample from a multinomial distribution over {SELECT, SUM, AVG, MAX, MIN};
+9 if�� Type ∈ {SUM, AVG, MAX, MIN} then
+10 Column selectColumn ← sample Column C from {T.Columns \ whereClausesColumns | C.dataType = Numeric};
+11 else
+12 Column selectColumn ← sample Column C from {T.Columns \ whereClauses Columns}
+13 S.Select ← selectColumn;
+14 if ∃SQLS2 | S2.Where ⊆ S.Where AND S2.Result = S1,result then
+15 valid = false;
+16 if�� Type ∈ {SUM, AVG, MAX, MIN} AND numOfRows(S.Result) == 1 then
+17 valid = false;
+18 ifvalid then
+19 generatedSQLs.add(S)
+20 Return generatedSQLs
+
+the risk of learning a biased model that cannot generalize for more complex queries with more than 2 where clauses, as reported by Guo et al. (2018).
+
+The generated SQL queries are checked for various aspects of semantic quality, beyond mere syntactic correctness in typical rule based generations. WikiSQL has a known imitation: even an incorrect SQL query can produce the same answer as the gold SQL query. To avoid such cases, we make two important checks: (1) The WHERE clauses in the generated SQL queries must all be mandatory to produce the correct answer. i.e., dropping a WHERE clause should not produce the expected answer and (2) a generated SQL query with an aggregation must have at least 2 rows to aggregate on and therefore, dropping the aggregation will not produce the expected answer. These quality checks ensure that the generated synthetic SQL queries are fit to be used in TableQA training pipeline.
+
+# 3.3.2 T5 transfer learning for QG
+
+For question generation in the TableQA setup, it is more intuitive to create SQL queries first and then use the structure of the SQL query to translate it to a natural language question. Previously, Guo et al. (2018) and Benmalek et al. (2019) used LSTM-based sequence to sequence models for direct question generation from tables. However, we
+
+
+Figure 3: Generating synthetic questions on target topics using only tables. Special tokens are shown in colored font.
+
+hypothesize that apart from SQL queries, using answers and column headers with the help of transformer based models, can be more effective.
+
+For our question generation module we have used unified text-to-text transformers (T5) (Raffel et al., 2020), which is popular for its constrained text generation capabilities for multiple tasks such as translation and summarization. To leverage this capability of T5 for generating natural language questions from SQL queries, we encode a SQL query in a specific text format. We also pass the answer of the SQL query and the column headers of table to T5 as we observe that using these two sets of extra information along with the SQL query helps in generating better questions, especially with "Wh" words. As illustrated in Figure 3, the generated SQL query with answer and column headers are encoded into a specific sequence before passing onto T5 model. Special separator tokens are used to demarcate different parts of the input sequence: [S] to specify the main column and operation, [W] demarcates elements in a WHERE clause, [A] marks the answer, [C] and [CS] show the beginning of set of column headers and separation between them, respectively.
+
+In this example, one can observe that although the SQL query do not have any term on day or date, our QG module was able to add "What day". Furthermore, ill-formed and unnatural questions gener
+
+| Type | Ground truth SQL | Generated Question | Ground truth question |
| Lookup | SELECT Rounds WHERE Chassis = b195 | What round has a car with a b195 chassis? | Which rounds had the B195 chassis? |
| SELECT College WHERE Player = Paul Seiler | What college does Paul Seiler play for? | What college has Paul Seiler as a player? |
| SELECT Date WHERE Attendance > 20,066 AND Home = Tampa Bay | On what date was the attendance more than 20,066 at Tampa Bay? | When has an Attendance larger than 20,066 in tampa bay? |
| Aggregate | SELECT SUM(Attendance) WHERE Date = May 31 | How many people attended the May 31 game? | How many people attended the game on May 31? |
| SELECT MAX(Mpix) WHERE Aspect Ratio = 2:1 AND Height < 1536 AND Width < 2048 | What is the highest Mpix with an Aspect Ratio of 2:1, a Height smaller than 1536, and a Width smaller than 2048? | What camera has the highest Mpix with an aspect ratio of 2:1, a height less than 1536, and a width smaller than 2048? |
| SELECT AVG(Score) WHERE Player = Lee Westwood | What is Lee Westwood's average score? | What is the average score with lee westwood as the player? |
+
+Table 2: Ground truth SQL queries with generated questions (using T5 based QG module) and gold questions
+
+| Operation | Sampled SQL | Generated Question |
| SELECT | SELECT Production code WHERE Written by = José Rivera | what is the production code for the episode written by José rivera? |
| SELECT Average WHERE Rank by average > 3 AND Number of dances=17 | what is the average for a rank by average larger than 3 and 17 dances? |
| MAX | SELECT MAX(SEATS) WHERE Kit/Factory = Factory | can you tell me the highest seats that has the kit/ factory of factory? |
| SELECT MAX(YEAR) WHERE WINS = 70 AND Manager = Jim Beauchamp | what is the most recent year of the team with 70 wins and manager Jim Beauchamp? |
| MIN | SELECT MIN(Rank) WHERE Nationality = RUS | which rank is the lowest one that has a nationality offrus? |
| SELECT MIN(Televote Points) WHERE Panel Points = 0 | which Televote points is the lowest one that has panels pointss of 0? |
| SUM | SELECT SUM(Game) WHERE Team = Bali-
+more | what is the sum of game, when team is Bali-
+more? |
| SELECT SUM(Division) WHERE Year < 2011 AND Playoffs = Did not qualify | what is the total number of division(s), when year is less than 2011, and when playoffs did not qualify? |
| AVG | SELECT AVG(Digital PSIP) WHERE Network = Omni Television | which digital PSIP has a network of Omni tele-
+vision? |
| SELECT AVG(Attendance) WHERE Week < 5 | what was the average attendance before week 5? |
+
+Table 3: Synthetic questions generated on sampled SQLs with SELECT and various aggregate functions on Wiki-SQL-TS tables. Observe that the quality of questions is generally better with SELECT operation than aggregate ones. The reason for this might be that the data used to train QG module includes more SELECT questions.
+
+ated by T5 model are filtered out using a pretrained GPT-2 model (Radford et al., 2019). We removed questions with the highest perplexity scores before passing the rest to the TableQA training module.
+
+For training the QG module, we use SQL queries and questions provided with the WikiSQL dataset. In our experiments, only query+question pairs from the source topics are used to train the question generation module and synthetic questions are gener
+
+ated for the target topic.
+
+We are able to produce high-quality questions using this T5 transcription. Table 2 shows a few example of generated questions from ground truth SQL and Table 3 on sampled SQLs. Observe that the model is able to generate lookup questions, multiple conditions, and aggregate questions of high quality. It is interesting to see that for the first example in Table 2, T5 model included the
+
+term car in the question even though it was not available in the SQL query, probably taking the clue from chassis. Some questions created from sampled SQLs for WikiTQ tables is provided in Appendix C.
+
+# 3.4 Reranking logical forms
+
+We analysed the logical forms predicted by TaBERT model in WikiSQL-TS and observed that the top logical forms often do not have the correct column headers and cell values. In fact, in WikiSQL-TS there is a $15 - 20\%$ greater chance of finding a correct prediction from the top-5 predicted logical form than the top 1.
+
+We propose to use a classifier, Gboost (Friedman, 2002) to rerank the predicted top-5 logical form. Given a logical form and table-question pair we create a set of features on which a classifier is trained to give higher score to the correct logical form.
+
+The logical form-question pair which gives the correct prediction is labelled as $+ve$ and wrong predictions as $-ve$ . We use the predicted logical forms for source topic dev set to train this classifier and in the inference step while predicting for target topic, the logical form which got highest score by the classifier is selected.
+
+# 3.4.1 Features for logical form reranker
+
+Two sets of features are extracted for the reranker: (1) entity linking based features, (2) logical form based features.
+
+Entity linking based features: This captures matches between query fragments and table elements. Our system of entity linking using string matching also finds partial matches. Partial matches happen when only a part of column name or cell value appear in the question. Another scenario is when token in the question partially matches with multiple entities in the table. We create three feature separately for cell values and column headers.
+
+- Number of linked entities in logical form which appear partially or fully in question.
+- Sum of ratio of tokens matched with entities in logical form. If the questions has word States and corresponding entity in table is United States, then the ratio would be 0.5.
+- Sum of a measure of certainty in entity linking. If the question token partially matches with multiple entities in table then certainty is less. If the question has word United and there are three en
+
+tities in the table United Kingdom, United States and United Arab Emirates, then we assign certainty score as $1/3$ .
+
+# Only logical form features:
+
+- Probability score of logical form given by the TableQA model
+- Length of answer obtained by using this logical form. Length here doesn't mean the number of characters but number of cells in prediction.
+
+- If 'count' is present in the logical form
+- If 'select' is present in the logical form
+- Number of where clauses.
+- If columns are repeated in the logical form.
+
+# 4 Experiments and Analysis
+
+Here we describe key details of the experimental setup, the models compared and evaluation techniques. We also provide a thorough analysis of the results to highlight the key takeaways.
+
+# 4.1 Setup
+
+We consider WikiSQL-TS and WikiTQ-TS for our experiments with topic assignments as described in Section 3.1. The larger WikiSQL-TS dataset consists of tables, questions and corresponding ground truth SQL queries, whereas WikiTQ-TS contains only natural language questions and answers. The five topics are 1) Politics 2) Culture 3) Sports 4) People and 5) Miscellaneous. Table 1 captures some interesting statistics about the topic split benchmark created from WikiSQL. All experiments are conducted in a leave-one-out (LOO) fashion where the target topic examples are withheld. For example, if the target topic is Politics then the model is trained using the train set and dev set of Culture, Sports, People, Misc and evaluated on test set of Politics. Further, a composite dev set is curated by adding equal number of synthetically generated questions from the target topic to the dev set of source topics.
+
+# 4.2 Models
+
+We perform all experiments using a variant of TaBERT+MAPO architecture, with the underlying BERT model initialized with bert-base-uncased. TaBERT+MAPO uses standard BERT as table-question encoder and MAPO (Liang et al., 2018) as the base semantic parser. TaBERTt+MAPO uses topic spe
+
+| Topic | TaBERT | TaBERTt | TaBERT+QG | TaBERTt+QG | TaBERTt+QG+Reranker |
| Politics | 61.71 | 64.95 | 64.26 | 66.12 | 70.22 |
| Culture | 64.89 | 66.10 | 69.32 | 69.88 | 72.63 |
| Sports | 62.10 | 62.70 | 63.03 | 63.83 | 66.5 |
| People | 60.34 | 61.93 | 63.10 | 66.27 | 70.87 |
| Misc | 61.85 | 59.03 | 64.31 | 64.43 | 69.60 |
+
+cific pre-trained BERT encoder (as described in section 3.2). Similar to the base model, this model use MAPO as the base semantic parser. TaBERT+MAPO+QG uses an extended training set with question answer pairs generated from the proposed QG model to train the TaBERT+MAPO model. TaBERT $t + \mathbf{MAPO} + \mathbf{QG}$ uses an initialized BERT encoder parameters with topic specific pre-trained BERT and add question-answer pairs generated by our QG model to train the TaBERT $t + \mathbf{MAPO}$ model.
+
+Table Question Generation (QG): We use the T5 implementation of Wolf et al. (2019) for question generation, initialized with t5-base and finetuned using SQL and corresponding questions from WikiSQL dataset. To ensure that the target topic is not leaked through the T5 model, we trained five topic-specific T5 models, one for each leave-one-out group by considering only SQL-question pairs from the source topic only. As WikiTQ-TS does not have ground truth SQL queries included in the dataset, we use T5 trained on WikiSQL-TS to generate synthetic questions. We use a batch-size of 10 with a learning rate of $10^{-3}$ .
+
+Implementation details: We build upon the existing code base for TaBERT+MAPO released by Yin et al. (2020b) and use $\mathrm{BERT}_{\mathrm{base}}$ as the encoder for tables and questions. We use topic-specific vocabulary (explained in Section 3.2) for BERT's tokenizer and train it using MLM (masked language model) objective for 3 epochs with $p = 0.15$ chance of masking a topic-specific high frequency (occurring more than 15 times in target topic corpus) token. We optimize BERT parameters using Adam optimizer with learning rate of $5 \times 10^{-5}$ .
+
+All numbers reported are from the test fold, fixing system parameters and model selection with best performance on the corresponding composite dev set. Further details and the dataset are provided in the supplementary material.
+
+Table 4: Performance on MongoDB-TS benchmark. Here, TaBERT means TaBERT+MAPO and TaBERT $t$ means TaBERT ${}_{t} +$ MAPO. All numbers are in %.
+
+| Topic | Number of WHERE clauses |
| 1 | 2 | 3 | 4 |
| Politics | 2.11 | 12.24 | 6.66 | 15.00 |
| Culture | 0.85 | 8.93 | 4.89 | 5.00 |
| Sports | 0.96 | 6.81 | 5.20 | -3.89 |
| People | 1.65 | 9.52 | 11.03 | 6.25 |
| Misc | 1.71 | 13.00 | 10.00 | 33.34 |
+
+Table 5: Change in performance in WikiSQL-TS after applying Reranker to $\mathrm{TaBERT}_t + \mathrm{MAPO} + \mathrm{QG}$ , across number of WHERE clauses. All numbers are in absolute %.
+
+# 4.3 Results and Analysis
+
+WikiSQL-TS: $\mathrm{TaBERT}_t + \mathrm{MAPO}$ improves over TaBERT+MAPO for four out of five test topics by an average of $1.66\%$ , showing the advantage of vocabulary extension (Table 4). In addition to supplying the topic-specific sense of vocabulary, fine tuning also avoids introducing word-pieces that adversely affect topic-specific language understanding. For instance, for the topic culture the whole word 'rockstar' is added to the vocabulary rather than the word-pieces 'rocks', '#tar'. We implement vocabulary extension by using the 1000 placeholders in BERT's vocabulary, accommodating high frequency words from the target topic corpus.
+
+Further, TaBERT+MAPO+QG significantly outperforms TaBERT+MAPO and also $\mathrm{TaBERT}_t + \mathrm{MAPO}$ when finetuned with target topic samples obtained from QG (after careful filtering). In WikiSQL-TS, QG also improves the performance of $\mathrm{TaBERT}_t + \mathrm{MAPO}$ , though relevant vocabulary was already added to BERT, suggesting additional benefits of QG in T3QA framework. While vocabulary extension ensures topical tokens are encoded, QG improves implicit linking between question and table header tokens within the joint encoding of question-table. The largest improvement of $10.53\%$ and $7.74\%$ is obtained for People and Culture respectively. Moreover, TaBERT+MAPO+QG out-performs an in-topic performance of $64.07\%$ and $67\%$ with $66.27\%$ and $69.88\%$ (details in Appendix D), showing that the unseen topic performance can be substantially improved with only auxiliary text and tables from documents without explicitly annotated table, question, and answer tuples.
+
+As mentioned, Misc is a topic chimera with a mixed individual statistics, hence an explicit injection of frequent vocabulary does not significantly improve $\mathrm{TaBERT}_t + \mathrm{MAPO}$ over
+
+| Topic | TaBERT+MAPO | TaBERTt+MAPO+QG+Reranker |
| overall | select | count | min | max | sum | avg | overall | select | count | min | max | sum | avg |
| Politics | 61.71 | 62.82 | 66.17 | 53.28 | 58.64 | 46.26 | 60.21 | 70.22 | 73.90 | 60.59 | 70.98 | 56.57 | 56.71 | 65.59 |
| Culture | 64.89 | 64.47 | 70.62 | 62.74 | 65.56 | 62.66 | 60.71 | 72.63 | 74.50 | 65.01 | 69.53 | 69.93 | 64.0 | 63.09 |
| Sports | 62.10 | 61.60 | 57.16 | 69.55 | 72.09 | 54.14 | 62.07 | 66.5 | 67.06 | 45.45 | 78.85 | 74.39 | 67.15 | 69.41 |
| People | 60.34 | 59.10 | 66.92 | 60.71 | 69.56 | 50.72 | 73.33 | 70.87 | 72.55 | 60.0 | 72.82 | 65.17 | 60.86 | 73.33 |
| Misc | 61.85 | 60.8 | 65.0 | 72.34 | 76.19 | 44.82 | 55.17 | 69.60 | 69.76 | 66.25 | 95.23↑ | 74.46 | 44.82 | 51.72 |
+
+Table 6: Performance on WikiSQL Topic specific benchmark across various question types. The largest group, select, is shown in bold. Largest improvement is shown as $\uparrow$ . All numbers are in absolute%.
+
+| Topic | TaBERT | TaBERTt | TaBERT+QG | TaBERTt+QG | TaBERTt+QG+Reranker |
| Politics | 40.52 | 41.03 | 41.55 | 41.38 | 43.79 |
| Culture | 36.03 | 38.49 | 38.49 | 37.05 | 39.50 |
| Sports | 37.55 | 37.5 | 37.93 | 39.12 | 41.50 |
| People | 35.94 | 37.69 | 37.42 | 36.61 | 39.30 |
| Misc | 38.58 | 40.64 | 41.10 | 40.18 | 42.23 |
+
+Table 7: Performance on WikiTQ-TS benchmark. Here, TaBERT means TaBERT+MAPO and TaBERT $_t$ means TaBERT $_t$ +MAPO. All numbers are in %.
+
+TaBERT+MAPO. However, TaBERT+MAPO+QG outperforms $\mathrm{TaBERT}_t + \mathrm{MAPO}$ by $5.4\%$ due to QG, suggesting that the improvement from both methods are disjoint. Further, Question generation, though conditioned on the table and topic specific text is not supplied with the topic vocabulary. We also observe that the composite dev set with $50\%$ real questions and $50\%$ questions generated on tables from target topic improves performance. Tables 4 & 5 take the advantage of ground truth SQL queries to further dissect the performance along question types and number of WHERE clauses.
+
+Number of Where clauses: As described previously, performance of TaBERT+MAPO is substantially affected by the number of WHERE clauses in the ground truth logical form (also observed by (Guo et al., 2018)), see Appendix A. Table 5, shows that performance improvement by "Reranker" is significantly higher for more than 1 WHERE clause. This might have happened because TaBERT+MAPO prefers to decode shorter logical forms, whereas the reranker prioritizes logical forms with more linked entities present from the question.
+
+WikiSQL question types: Table 4 breaks down the performance of TaBERT+MAPO+QG based on the question types labels obtained from the dataset ground truth only for analysis. The improvement, viewed from the lens of question types is more significant with average gain in SELECT-style queries at $9.76\%$ . Aggregate (count, min/max, sum, avg) questions are more challenging to gener
+
+ate as the answer is not present in the table. Consequently, the performance improvement with QG is less significant for these question types.
+
+WikiTQ-TS: WikiTQ-TS is a smaller dataset and contains more complex questions (negatives, implicit nested query) compared to MySQL-TS. Correspondingly, there is also less topic specific text to pretrain the TaBERT encoder. Despite these limitations, we observe in Table 7 that $\mathrm{TaBERT}_t$ with vocabulary extension and pretraining shows overall improvement. We resort to using synthetic questions generated from QG model of WikiSQL-TS, due to unavailability of ground truth SQL queries in WikiTQ. Hence, the generated questions are often different in structure from the ground truth questions. Samples of real and generated questions are in Table 8 of Appendix C. Despite this difference in question distribution we see TaBERT+QG consistently performs better than the baseline. We provide an analysis of the perplexity scores from TaBERT and $\mathrm{TaBERT}_t$ on the generated questions in Appendix G. Ultimately, the proposed T3QA framework significantly improves performance in all target domains.
+
+# 5 Conclusion
+
+This paper introduces the problem of TableQA for unseen topics. We propose novel topic split benchmarks over WikiSQL and WikiTQ and highlight the drop in performance of TaBERT+MAPO, even when TaBERT is pretrained on a large open domain corpora. We show that significant gains in performance can be achieved by (i) extending the vocabulary of BERT with topic-specific tokens (ii) fine-tuning the model with our proposed constrained question generation which transcribes SQL into natural language, (iii) re-ranking logical forms based on features associated with entity linking and logical form structure. We believe that the proposed benchmark can be used by the community for building and evaluating robust TableQA models for practical settings.
+
+# References
+
+Ryan Benmalek, Madian Khabsa, Suma Desu, Claire Cardie, and Michele Banko. 2019. Keeping notes: Conditional natural language generation with a scratchpad encoder. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4157-4167.
+Yu Cao, Meng Fang, Baosheng Yu, and Joey Tianyi Zhou. 2020. Unsupervised domain adaptation on reading comprehension.
+Pradeep Dasigi, Matt Gardner, Shikhar Murty, Luke Zettlemoyer, and Eduard Hovy. 2019. Iterative search for weakly supervised semantic parsing. 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 2669-2680, Minneapolis, Minnesota. Association for Computational Linguistics.
+Inderjit S Dhillon. 2001. Co-clustering documents and words using bipartite spectral graph partitioning. In Proceedings of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining, pages 269-274. ACM.
+Jerome H Friedman. 2002. Stochastic gradient boosting. Computational statistics & data analysis, 38(4):367-378.
+Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. 2016. Domain-adversarial training of neural networks.
+Michael Glass, Mustafa Canim, Alfio Gliozzo, Saneem Chemmengath, Vishwajeet Kumar, Rishav Chakravarti, Avirup Sil, Feifei Pan, Samarth Bharadwaj, and Nicolas Rodolfo Fauceglia. 2021. Capturing row and column semantics in transformer based question answering over tables. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1212-1224.
+Daya Guo, Yibo Sun, Duyu Tang, Nan Duan, Jian Yin, Hong Chi, James Cao, Peng Chen, and Ming Zhou. 2018. Question generation from sql queries improves neural semantic parsing. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1597-1607.
+Kelvin Guu, Panupong Pasupat, Evan Zheran Liu, and Percy Liang. 2017. From language to programs: Bridging reinforcement learning and maximum marginal likelihood.
+Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Müller, Francesco Piccinno, and Julian Martin Eisenschlos. 2020. Tapas: Weakly supervised table parsing via pre-training.
+
+Jayant Krishnamurthy, Pradeep Dasigi, and Matt Gardner. 2017. Neural semantic parsing with type constraints for semi-structured tables. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1516–1526, Copenhagen, Denmark. Association for Computational Linguistics.
+Seanie Lee, Donggyu Kim, and Jangwon Park. 2019. Domain-agnostic question-answering with adversarial training.
+Chen Liang, Jonathan Berant, Quoc Le, Kenneth Forbus, and Ni Lao. 2017. Neural symbolic machines: Learning semantic parsers on freebase with weak supervision. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 23-33.
+Chen Liang, Mohammad Norouzi, Jonathan Berant, Quoc V Le, and Ni Lao. 2018. Memory augmented policy optimization for program synthesis and semantic parsing. In Advances in Neural Information Processing Systems, pages 9994-10006.
+Bang Liu, Haojie Wei, Di Niu, Haolan Chen, and Yancheng He. 2020. Asking questions the human way: Scalable question-answer generation from text corpus. Proceedings of The Web Conference 2020.
+Panupong Pasupat and Percy Liang. 2015. Compositional semantic parsing on semi-structured tables.
+Raul Puri, Ryan Spring, Mostofa Patwary, Mohammad Shoeybi, and Bryan Catanzaro. 2020. Training question answering models from synthetic data.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
+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.
+Iulian Vlad Serban, Alberto Garcia-Duran, Caglar Gulcehre, Sungjin Ahn, Sarath Chandar, Aaron Courville, and Yoshua Bengio. 2016. Generating factoid questions with recurrent neural networks: The $30\mathrm{m}$ factoid question-answer corpus. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 588-598.
+Siamak Shakeri, Cicero Nogueira dos Santos, Henry Zhu, Patrick Ng, Feng Nan, Zhiguo Wang, Ramesh Nallapati, and Bing Xiang. 2020. End-to-end synthetic data generation for domain adaptation of question answering systems.
+Md Arafat Sultan, Shubham Chandel, Ramón Fernández Astudillo, and Vittorio Castelli. 2020. On the importance of diversity in question generation for
+
+QA. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5651-5656, Online. Association for Computational Linguistics.
+Huazheng Wang, Zhe Gan, Xiaodong Liu, Jingjing Liu, Jianfeng Gao, and Hongning Wang. 2019. Adversarial domain adaptation for machine reading comprehension. 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 2510-2520, Hong Kong, China. Association for Computational Linguistics.
+Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, et al. 2019. Huggingface's transformers: State-of-the-art natural language processing. ArXiv, pages arXiv-1910.
+Pengcheng Yin, Graham Neubig, Wen tau Yih, and Sebastian Riedel. 2020a. Tabert: Pretraining for joint understanding of textual and tabular data.
+Pengcheng Yin, Graham Neubig, Wen tau Yih, and Sebastian Riedel. 2020b. TaBERT: Pretraining for joint understanding of textual and tabular data. In Annual Conference of the Association for Computational Linguistics (ACL).
+Torsten Zesch and Iryna Gurevych. 2007. Analysis of the wikipedia category graph for nlp applications. In Proceedings of the Second Workshop on TextGraphs: Graph-Based Algorithms for Natural Language Processing, pages 1-8.
+Victor Zhong, Caiming Xiong, and Richard Socher. 2017. Seq2sql: Generating structured queries from natural language using reinforcement learning.
+
+# Topic Transferable Table Question Answering (Appendix)
+
+# A TaBERT performance on WikiSQL
+
+We analyse accuracy of TaBERT model on Wiki-SQL in terms of the number of WHERE clauses, which are skewed as shown in Fig. 4(a). In Fig. 4(b), we observe that accuracy decreases when ground truth SQL has a larger number of WHERE clauses. Interestingly, we observe in Fig. 4(c) and (d) that even though the model achieves $30\%$ to $40\%$ accuracy for 2-4 WHERE clauses, the predicted logical form still produced one WHERE clause. This shows that, for many questions, wrong or incomplete logical forms can produce correct answers.
+
+
+(a)
+
+
+(b)
+
+
+(c)
+Figure 4: WHERE clause analysis on TaBERT+MAPO performance on SELECT questions in WikiSQL test set (not topic shift): (a) Frequency of questions in different number of WHERE clauses buckets; (b) Accuracy achieved in each WHERE bucket; (c) Average number of conditions in predicted logical forms; (d) Average number of conditions in predicted logical forms which produces correct answers.
+
+
+(d)
+
+# B Topic-shift benchmark details
+
+Continuing from Section 3.1, this section provides more details about the creation of the topic shift benchmark datasets. Each Wikipedia article is tagged with a set of categories and each category is further tagged with a set of parent categories, and those to their parent categories, and so on. The whole set of Wikipedia categories are organized in
+
+a taxonomy-like structure called Wikipedia Category Graph (WCG) (Zesch and Gurevych, 2007). These categories range from specific topics such as "Major League Soccer awards" to general topics such as "Human Nature". To have categories of similar granularity, we use the 42 categories listed in Wikipedia Category:Main topic articles $^{4}$ as topics.
+
+To assign a unique category to a Wikipedia article, we proceed as follows:
+
+- For each Table $T$ , we extract the Wikipedia Article $A$ which contains Table $T$ .
+- We start with the category of $A$ and traverse the hierarchical categories till we reach one (or more) of the 42 categories listed in Wikipedia Category:Main topic articles.
+- If multiple main topic categories can be reached from $A$ , we take the category which is reached via the shortest path (in terms of number of hierarchical categories traversed from $A$ ) and assign that as the category for table $T$ .
+- If there are multiple main topic categories which can be reached with the same length of shortest path, we consider the number of different paths between the main topic category and $A$ as the tie breaker to assign the topic for $A$ .
+
+Now we describe the method used to cluster categories into topics. For every article we identify five categories closest to the article in Wikipedia Category Graph. We then compute the Jaccard similarity between two topics as the ratio of number of common articles between topics (in the first-5 list) to the total number of articles assigned to both topic. Using this similarity, we apply spectral co-clustering (Dhillon, 2001) to form five topic groups.
+
+To verify the coherence of the five topic groups, we performed a vocab overlap exercise. For questions in WikiTQ, we find the 100 most frequent words in the test set of each of the topics. Then we measure how many of these frequent words appeared in the train set of each of these topics. Table 9 shows the that word overlap is large within clusters.
+
+| Gold questions in the dataset | Generated Questions |
| - how many v8 engines competed in the 1982 British formula one season?- how many entrants have names that contain the word "team"? - name an entrant with no cosworth engines. - how many drivers use v8 engines? - what is the total number of drivers listed? - who is the only driver to use a v12 engine? - Are there any other engines listed besides cosworth or brm? - Which is the only driver whose vehicle used a brm 202 v12 engine? - What is the last chassis listed? | - which constructor has an Entrant of Colin Bennett racing, and a no smaller than 7.0?- what is the average number that has a constructor of Ensign? - who is the driver with a no of 14.0? - what is the average number of FW07 chassisassis? - what engine has a driver of Steveo'rourke? - name the most number for Chassis being N180b. - what is the lowest number that has a constructor of Ensign? - what is the total number that has a constructor of Williams? - what is the largest number for teamensign? |
+
+Table 8: Real questions and generated questions for table csv/203-csv/1.csv from WikiTQ-TS dataset. Observe that generated questions (finetuned on Apache-ML) have different semantics than the real questions.
+
+| Test/Train | Politics | Culture | Sports | People | Misc |
| Politics | 88 | 73 | 74 | 72 | 64 |
| Culture | 79 | 87 | 89 | 85 | 69 |
| Sports | 67 | 72 | 100 | 81 | 50 |
| People | 66 | 78 | 88 | 93 | 55 |
| Misc | 74 | 73 | 74 | 72 | 68 |
+
+# C Questions generation for target topics
+
+Table 8 compares ground truth questions with that of generated questions for the same table from WikiSQL-TS. One can see that even template of questions in real dataset is very different and often tougher than the generated ones. Question generator being trained on WikiSQL-TS dataset with much simple questions might be the reason for this phenomenon.
+
+# D Performance when topics are seen
+
+We further analyse the performance of the model in both seen-topic training (when the topic specific train set is available), against the unseen topic train (when the topic specific train set is not used during training). In Table 10, we present results in both training setups.
+
+Table 9: Percent vocabulary match within and across topics (category groups/clusters).
+
+| Topic | Seen Topic | Unseen Topic |
| Politics | 65.52 | 61.71 |
| Culture | 67.26 | 64.88 |
| Sports | 63.14 | 62.10 |
| People | 64.07 | 60.34 |
| Misc | 63.14 | 61.85 |
+
+# E Additional Experiments
+
+Table 11 shows the absolute values corresponding to Table 6. in the paper. The performance of both models is lower for questions with larger WHERE clauses. Table 12 summarizes the answer accuracy of $\mathrm{TaBERT}_t + \mathrm{MAPO} + \mathrm{QG} + \mathrm{Reranker}$ and TaBERT+MAPO across number of where clauses in the ground truth logical forms.
+
+Table 10: Drop in performance due to topic shift in WikiSQL-TS. (Numbers are percentages.)
+
+| Topic | Number of WHERE clauses |
| 1 | 2 | 3 | 4 |
| Politics | 75.78/73.67 | 58.36/46.12 | 51.66/45.0 | 40.0/25.0 |
| Culture | 77.52/76.67 | 61.23/52.30 | 52.44/47.55 | 55.0/50.0 |
| Sports | 71.26/70.30 | 57.62/50.81 | 56.26/51.06 | 48.05/51.94 ↓ |
| People | 77.61/75.96 | 61.37/51.85 | 58.82/47.79 | 25.0/18.75 |
| Misc | 75.17/73.46 | 57.0/44.0 | 54.0/44.0 | 66.67/33.33 |
+
+Table 11: WikiSQL-TS performance for TaBERTt+MAPO +QG+Reranker and TaBERTt+MAPO+QG (seperated by /') across number of WHERE clauses in the ground truth logical forms. All numbers are in %.
+
+| Topic | Number of WHERE clauses |
| 1 | 2 | 3 | 4 |
| Politics | 75.78/67.61 | 58.36/46.94 | 51.66/48.33 | 40.0/40.0 |
| Culture | 77.52/71.36 | 61.23/46.46 | 52.44/51.05 | 55.0/35.0 |
| Sports | 71.26/67.78 | 57.62/50.66 | 56.26/53.9 | 48.05/44.16 |
| People | 77.61/69.55 | 61.37/44.62 | 58.82/45.59 | 25.0/37.5↓ |
| Misc | 75.17/70.58 | 57.0/40.5 | 54.0/46.0 | 66.67/66.67 |
+
+Table 12: WikiSQL-TS performance for TaBERTt+MAPO +QG +Reranker and TaBERT+MAPO (separated by /') across number of WHERE clauses in the ground truth logical forms.
+
+# F Training details
+
+We train all TaBERT+MAPO variants for 10 epochs on 4 Tesla V100 GPUs using mixed precision training5. For training TaBERT+MAPO, we set batch size to 10, number of explore samples 10 and other hyperparameters are kept same as (Yin et al., 2020a). We build upon codebase6 released by (Yin et al., 2020a). The hyper-parameters (where not mentioned explicitly) are the same as the original code. We include all the data splits and predictions from our best model as supplementary material with the paper. These will be released publicly upon acceptance. The experimentation requires for 5 topics, we performed 6 variations of the model. We performed search over 4 sets of hyper-parameters, primarily on the composition of generated vs. real questions.
+
+# G TaBERT vs. TaBERT $t$ perplexity of generated questions for WikiTQ-TS
+
+We compute the perplexity scores over a subset of 50 generated questions used in the experiments using both TaBERT and $\mathrm{TaBERT}_t$ language models. Note that TaBERT is pretrained on large open domain set whereas $\mathrm{TaBERT}_t$ was further fine-tuned on topic specific documents closely related to the tables of target domain. As shown in Table 13, the average perplexity score from $\mathrm{TaBERT}_t$ is larger than TaBERT. This indicates that the generated questions are not aligned to the topic in the case of WikiTQ-TS. This is due to the lack of any training examples for specific to the dataset, as mentioned in Section 4.3. Future work on topic-specific question generation may address this issue.
+
+| Topic | TaBERT | TaBERTt |
| Politics | 1.088 | 1.112 |
| Culture | 1.099 | 1.142 |
| Sports | 1.084 | 1.134 |
| People | 1.109 | 1.164 |
| Misc | 1.104 | 1.153 |
+
+Table 13: The average perplexity scores of a subset of generated questions from TaBERT and $\mathrm{TaBERT}_t$ for WikiTQ-TS
+
+We suspect that this might be the reason why TaBERT+QG does not outperform TaBERT+QG
+
+in the case of WikiTQ-TS (Table 7). However, we obtain best performance via the overall T3QA framework.
\ No newline at end of file
diff --git a/topictransferabletablequestionanswering/images.zip b/topictransferabletablequestionanswering/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..57700b987d07f2f38542ade3a29353a27dffba54
--- /dev/null
+++ b/topictransferabletablequestionanswering/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:17c5c2f32f2200d68e9e1b0fb777c42f10b256e768e252ac400ccdcd98393489
+size 846178
diff --git a/topictransferabletablequestionanswering/layout.json b/topictransferabletablequestionanswering/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..8eb72a5447cbdb1b0f138e03f7f988c960f690bc
--- /dev/null
+++ b/topictransferabletablequestionanswering/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d2d4098d2a1a132367ba7a915dd53c784f9625c9dd9de3802ffcdbec8de7f76
+size 409699
diff --git a/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/c012dd35-7e2d-44a0-8573-882eff6f2a91_content_list.json b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/c012dd35-7e2d-44a0-8573-882eff6f2a91_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..5b42cc8148c0a56d7c9e7e73da36262cf533f0d0
--- /dev/null
+++ b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/c012dd35-7e2d-44a0-8573-882eff6f2a91_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4d72a352597331376435961f8f59630705b76cd83c3461f7a3e056d2dcb50e1d
+size 79256
diff --git a/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/c012dd35-7e2d-44a0-8573-882eff6f2a91_model.json b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/c012dd35-7e2d-44a0-8573-882eff6f2a91_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..efa00c58d4a849e44e283091848b689505ed6df3
--- /dev/null
+++ b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/c012dd35-7e2d-44a0-8573-882eff6f2a91_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:622b8980b1715233f064420f7898db5944c654632f9c6cde1bb1bf3593d4e046
+size 97789
diff --git a/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/c012dd35-7e2d-44a0-8573-882eff6f2a91_origin.pdf b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/c012dd35-7e2d-44a0-8573-882eff6f2a91_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..0d1e5a7a0b2aa39023ab3346044c743b6a5365fd
--- /dev/null
+++ b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/c012dd35-7e2d-44a0-8573-882eff6f2a91_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fe38b0eb983a2815619ad1d9617557729bb6ad373dc35283ede9d3a580891e43
+size 772969
diff --git a/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/full.md b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..fd49570e8a88a1a908238545ffee303bad093cab
--- /dev/null
+++ b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/full.md
@@ -0,0 +1,286 @@
+# To Share or not to Share: Predicting Sets of Sources for Model Transfer Learning
+
+Lukas Lange $^{1,2,3}$
+
+Jannik Strötgen
+
+Heike Adel
+
+Dietrich Klakow2
+
+1 Bosch Center for Artificial Intelligence, Renningen, Germany
+
+2 Spoken Language Systems (LSV), Saarland University, Saarbrücken, Germany
+$^{3}$ Saarbrücken Graduate School of Computer Science, Saarbrücken, Germany
+
+{Lukas.Lange,Heike.Adel,Jannik.Stroetgen}@de.bosch.com
+
+dietrich.klakow@lsv.uni-saarland.de
+
+# Abstract
+
+In low-resource settings, model transfer can help to overcome a lack of labeled data for many tasks and domains. However, predicting useful transfer sources is a challenging problem, as even the most similar sources might lead to unexpected negative transfer results. Thus, ranking methods based on task and text similarity — as suggested in prior work — may not be sufficient to identify promising sources. To tackle this problem, we propose a new approach to automatically determine which and how many sources should be exploited. For this, we study the effects of model transfer on sequence labeling across various domains and tasks and show that our methods based on model similarity and support vector machines are able to predict promising sources, resulting in performance increases of up to $24F_{1}$ points.
+
+# 1 Introduction
+
+For many natural language processing applications in non-standard domains, only little labeled data is available. This even holds for high-resource languages like English (Klie et al., 2020). The most popular method to overcome this lack of supervision is transfer learning from high-resource tasks or domains. This includes the usage of resources from similar domains (Ruder and Plank, 2017), domain-specific pretraining on unlabeled text (Gururangan et al., 2020), and the transfer of trained models to a new domain (Bingel and Søgaard, 2017). While having the choice among various transfer sources can be advantageous, it becomes more challenging to identify the most valuable ones as many sources might lead to negative transfer results, i.e., actually reduce performance (Pruksachatkun et al., 2020).
+
+Current methods to select transfer sources are based on text or task similarity measures (Dai et al., 2019; Schroder and Biemann, 2020). The underlying assumption is that similar texts and tasks can support each other. An example for similarity
+
+
+Figure 1: Observed transfer gains by transferring models from a source corpus to SMS texts. The domains are sorted by their vocabulary overlap to the target.
+
+based on vocabulary overlap is shown in Figure 1. However, current methods typically consider text and task similarity in isolation, which limits their application in transfer settings where both the task and the text domain change.
+
+Thus, as a first major contribution, this paper proposes a new model similarity measure that represents text and task similarity jointly. By learning a mapping between two neural models, it captures similarity between domain-specific models across tasks. We perform experiments for different transfer settings, namely zero-shot model transfer, supervised domain adaptation and cross-task transfer across a large set of domains and tasks. Our newly proposed similarity measure successfully predicts the best transfer sources and outperforms existing text and task similarity measures.
+
+As a second major contribution, we introduce a new method to automatically determine which and how many sources should be used in the transfer process, as the transfer can benefit from multiple sources. Our selection method overcomes the limitations of current transfer methods, which solely predict single sources based on rankings. We show the benefits of transfer from sets of sources and demonstrate that support vector machines are able to predict the best sources across domains and tasks. This improves performance with absolute gains of up to $24F_{1}$ points and effectively prevents negative transfer.
+
+The code for our sequence taggers, prediction methods and the results are publicly available.
+
+# 2 Related Work
+
+Domain adaptation & transfer learning are typically performed by transferring information and knowledge from a high-resource to a low-resource domain or task (Daumé III, 2007; Ruder, 2019; Hedderich et al., 2021). Recent approaches can be divided into two groups: (i) model transfer (Ruder and Plank, 2017) by reusing trained task-specific weights (Vu et al., 2020; Lange et al., 2021) or by first adapting models on the target domain before training the downstream task (Gururangan et al., 2020; Rietzler et al., 2020) and (ii) multi-task training (Collobert and Weston, 2008) where multiple tasks are trained jointly by learning shared representations (Peng and Dredze, 2017; Meftah et al., 2020). We follow the first approach in this paper.
+
+For transfer learning, the selection of sources is utterly important. Text and task similarity measures (Ruder and Plank, 2017; Bingel and Søgaard, 2017) are used to select the best sources for cross-task transfer (Jiang et al., 2020), multi-task transfer (Schroder and Biemann, 2020), cross-lingual transfer (Chen et al., 2019) and language modeling (Dai et al., 2019). Alternatively, neural embeddings for corpora can be compared (Vu et al., 2020). In prior work, the set of domains is usually limited and the focus is on the single-best source. In contrast, we exploit sources from a larger set of domains and also explore the prediction of sets of sources, as using multiple sources is likely to be beneficial, as also shown by Parvez and Chang (2021) contemporaneously to this work.
+
+# 3 Similarity Measures and Predictors
+
+In this section, we describe the sequencer tagger model and similarity measures along with metrics for the evaluation. Finally, we introduce our new prediction method for sets of transfer sources.
+
+# 3.1 Terminology
+
+We consider two dimensions of datasets: the task $T$ , which defines the label set, and the input text coming from a specific domain $D$ . We thus define a dataset as a tuple $\langle T, D \rangle$ , and specify in our experiments which of the two dimensions are changed.
+
+# 3.2 Similarity Measures
+
+We apply the following measures to rank sources according to their similarity with the target data.
+
+Baselines. We use the most promising domain similarity measures reported by Dai et al. (2020): Vocabulary and Annotation overlap, Language model perplexity (Baldwin et al., 2013), Dataset size (Bingel and Søgaard, 2017) and Term distribution (Ruder and Plank, 2017). We also compare to domain similarity via Text embeddings and task similarity using Task embeddings (Vu et al., 2020).
+
+Model similarity. As a new strong method, we propose Model similarity that is able to combine domain and task similarity. For this, feature vectors $f$ for a target dataset $t$ are extracted from the last layer of two models $m_{s}, m_{t}$ which have been trained on the source and target datasets, respectively. The features are then aligned by a linear transformation $W$ , a learned mapping, between the feature spaces using the Procrustes method (Schönemann, 1966) to minimize their pointwise differences:
+
+$$
+\arg \min _ {W} | W (f (m _ {s}, t)) - f (m _ {t}, t) | \tag {1}
+$$
+
+The resulting transformation $W$ is the optimal mapping between the features $f(m_{s},t)$ to $f(m_{t},t)$ . If both feature spaces are the same, $W$ would be the identity matrix $I$ , i.e., no change is required for the transformation. Larger changes indicate dissimilarity, thus the distance between the two models is the difference of the mapping $W$ and the identity matrix $I$ : $\text{diff}(m_s, m_t) := |W - I|$ .
+
+Similar mappings have been used for the alignment of different embedding spaces (Mikolov et al., 2013; Artetxe et al., 2018) as they inherently carry information on the relatedness between models.
+
+# 3.3 Prediction Methods for Sets of Sources
+
+While these similarity measures can be applied to create rankings and select similar datasets, they still have a major shortcoming in practice: None of them provides explicit insights when positive or negative transfer can be expected.
+
+Typically, the most similar source is selected for training based on a given similarity measure. We call this method Top-1. This might introduce only a low risk of selecting a negative transfer source, but it also cannot benefit from further positive transfer sources. Thus, we also test its extension to an arbitrary selection of the $n$ best sources denoted by Top-n. However, it is unclear how to choose $n$ ,
+
+and increasing $n$ comes with the risk of including sources that lead to negative transfer results.
+
+As a solution, we propose two methods that predict whether positive transfer is likely for a given distance between datasets: The first method models the prediction as a 3-class classification task, and the second one as a regression task predicting the transfer gain. For classification, we split the transfer gain $g$ into the three classes positive ( $g \geq \theta$ ), neutral ( $|g| < \theta$ ) and negative ( $g \leq -\theta$ ) based on a predefined threshold $\theta$ . (In our experiments, we set $\theta = 0.5$ .) We introduce the neutral class for classification to cope with small transfer gains $|g| < \theta$ that do not provide additional information, but would increase the training time.
+
+To solve these tasks, we propose to use support-vector machines (SVM) for classification (-C) and regression (-R) and compare to $k$ -nearest-neighbour classifiers ( $k$ -NN) as well as logistic and linear regression in our experiments. For each method, the input to the model is a similarity value between source and target. The training label is either the observed transfer gain (for regression) or the corresponding class (for classification) for the source-target pair. Given a new similarity value, a trained model can then be used to predict which kind of transfer can be expected. The predictions for a target and a set of sources can then be used to select the subset of sources with expected positive transfer.
+
+# 4 Experimental Setup
+
+In this section, we introduce the tasks, datasets and transfer settings used in our experiments.
+
+# 4.1 Tasks and Evaluation Metrics
+
+We perform experiments on 33 datasets for three tasks: Named entity recognition (NER), part-of-speech tagging (POS), and temporal expression extraction (TIME).
+
+For TIME tagging and for POS tagging, we use the English corpora described by Strötgen and Gertz (2016) and the four publicly available universal dependencies corpora with the UPOS tag (Nivre et al., 2016), respectively. Following Lange et al. (2020), we convert the TIMEX corpora into the BIO format for sequence tagging. For NER with different label sets, we collected several datasets
+
+from a wide range of domains, including clinical (I2B2, Stubbs and Uzuner, 2015), social media (WNUT, Strauss et al., 2016a) and materials science corpora (SOFC, Friedrich et al., 2020). The GUM (Zeldes, 2017) and ACE'05 (Walker et al., 2006) can be split easily into multiple domains. Thus, we perform experiments for all subcorpora. The GUM corpus has multi-layer annotations and includes named entity annotations as well. We use this to study the effects of NER transfer when the label set is shared. All datasets are listed in the appendix with information on their domain and size with respect to the label set and number of sentences in the training, development, and test splits.
+
+The metric for all experiments is micro $F_{1}$ . We use the difference in $F_{1}$ to measure transfer effects and also report transfer gain (Vu et al., 2020), i.e., the relative improvement of a transferred model compared to the single-task performance.
+
+In Section 5.2, we rank sources according to their similarity to the target. These rankings are evaluated with two metrics, following Vu et al. (2020): (1) the average rank of the best performing model in the predicted ranking denoted by $\rho$ and (2) the normalized discounted cumulative gain (NDCG, Jarvelin and Kekalainen, 2002). The latter is a ranking measure commonly used in information retrieval, which evaluates the complete ranking while $\rho$ only considers the top.
+
+# 4.2 Sequence Tagger Model
+
+For sequence tagging, we follow Devlin et al. (2019) and use BERT-base-cased as the feature extractor and a linear mapping to the label space followed by a softmax as the classifier.
+
+Models are trained using the AdamW optimizer (Loshchilov and Hutter, 2019) with a learning rate of $2e - 5$ . The training is performed for a maximum of 100 epochs. We apply early stopping after 5 epochs without change of the $F_{1}$ -score on the development set. We use the same hyperparameters across all settings. $^{4}$
+
+# 4.3 Transfer Settings
+
+Zero-shot model transfer. We apply a model trained on a source dataset to a target with the same task but a different domain: $\langle T_i, D_i \rangle \to \langle T_i, D_j \rangle$ .
+
+| Task | Min. | Avg. | Max. |
| Zero-shot Model Transfer |
| NER | -57.3 | (-37.9) | -17.7 | (-10.1) | 18.1 | (8.0) |
| POS | -8.7 | (-8.4) | -2.8 | (-2.7) | 1.6 | (1.5) |
| TIME | -100.0 | (-83.2) | -42.7 | (-29.6) | 38.6 | (13.7) |
| Supervised Domain Adaptation |
| NER | -5.2 | (-2.7) | 3.8 | (1.9) | 14.5 | (6.3) |
| POS | -0.3 | (-0.3) | 0.4 | (0.4) | 1.8 | (1.7) |
| TIME | -15.3 | (-10.1) | 3.4 | (2.0) | 32.7 | (15.1) |
| Cross-Task Transfer |
| NER→NER | -9.1 | (-4.1) | -0.2 | (-0.2) | 6.8 | (3.1) |
| POS→NER | -5.9 | (-4.8) | -0.5 | (-0.3) | 2.6 | (1.2) |
| TIME→NER | -7.2 | (-3.3) | -0.9 | (-0.5) | 0.9 | (0.6) |
+
+Supervised domain adaptation. A model trained on a source domain is adapted to a target domain by finetuning its weights on target training data: $\langle T_i, D_i \rangle \to \langle T_i, D_j \rangle$ .
+
+Cross-task transfer. For applying a model to a different task, we replace the classification layer with a randomly initialized layer and adapt it to the new target task: $\langle T_i,D_i\rangle \to \langle T_j,D_j\rangle$ .
+
+# 5 Results
+
+This section presents the results of the different transfer settings and analyzes how similarity measures can be used to predict transfer sources.
+
+# 5.1 Analysis of Transfer Performance
+
+Table 1 shows the observed performance gains compared to the single-task performance. For zero-shot model transfer, we observe severe performance drops. In addition to domain-specific challenges, this setting is impaired by differences in the underlying annotation schemes.[6]
+
+Supervised domain adaptation, i.e., adapting a model to the target domain, improves performance across all settings independent of the source domain. Table 1 shows that the average transfer gains are positive for all tasks and that the maximum transfer gain is 32.7 points for TIME.
+
+Table 1: Statistics on transfer gains ( $F_{1}$ differences) for the three transfer settings. The average is aggregated over all domains and the 5 random seeds resulting in 210 task-specific experiments for NER and up to 780 for TIME.
+
+| Distance | Model Transfer ρ N | Domain Adapt. ρ N | Cross -Task ρ N | Avg. ρ N |
| Vocabulary | 2.4 | 92.1 | 2.8 | 88.9 | 6.4 | 84.9 | 3.9 | 88.7 |
| Annotation | 2.4 | 91.7 | 3.1 | 89.3 | 6.1 | 85.3 | 3.9 | 89.1 |
| Dataset size | 3.6 | 86.4 | 3.8 | 85.9 | 7.2 | 82.3 | 4.9 | 84.9 |
| Term Dist | 2.8 | 90.5 | 4.2 | 87.5 | 6.7 | 85.2 | 4.5 | 87.7 |
| LM Perp. | 3.9 | 85.6 | 3.4 | 88.2 | 5.9 | 84.4 | 4.4 | 86.1 |
| Text Emb. | 4.0 | 88.1 | 4.6 | 85.0 | 7.1 | 84.6 | 5.2 | 85.9 |
| Task Emb. | 4.1 | 88.5 | 4.7 | 84.8 | 6.6 | 84.5 | 5.1 | 85.6 |
| Model Sim. | 2.8 | 90.8 | 3.3 | 88.7 | 5.1 | 85.4 | 3.7 | 88.3 |
+
+Table 2: Ranking results for different similarity measures in the three transfer settings. Corpus-based measures are listed first and model-based ones below. The values displayed are the average rank of the best model $(\rho)$ and the NDCG-score (N).
+
+The gains for cross-task transfer are smaller than for supervised domain adaptation. While we still observe some performance increases, the average transfer gains are negative for all tasks. This shows that it is likely that the adaptation of models from other tasks will decrease performance. These results demonstrate the need for reliable similarity measures and methods to predict the expected transfer gains given the source task and domain. We will explore them in Section 5.2 and Section 5.3.
+
+# 5.2 Similarity-based Ranking
+
+To evaluate the prospects of different sources for model transfer, we compute the pairwise distances between all datasets using the similarity measures presented in Section 3.2 and rank them accordingly.
+
+Table 2 shows that the text-based methods vocabulary and annotation overlap are most suited for in-task transfer, i.e., model transfer and domain adaptation, while our model similarity is most useful for cross-task transfer. This shows that task similarity alone is not the most decisive factor for predicting promising transfer sources and domain similarity is equally or even more important, in particular, when more distant domains are considered. Our model similarity is able to capture both properties. It is the best similarity measure on average across all transfer settings according to the predicted rank of the top-performing source $(\rho)$ and the best neural method according to NDCG. A more fine-grained analysis is given in Table 7 in the appendix.
+
+In general, we find that selecting only the top source(s) based on a ranking from a distance measure, as done in current research, gives no informa
+
+| Target | Method | Sources | F1 (increase) |
| TIME-ACE-UN | Single-Task Performance | No source corpora for pretraining | 60.5 F1 |
| Top-1 | WWARS | + 10.9 |
| Top-2 | WWARS, ACE-BN | + 11.2 |
| Top-3 | WWARS, ACE-BN, TIMEBANK | + 15.8 |
| All | WWARS, ACE-ALL, TIMEBANK, AQUAINT, 12B2-TIME, ANCIENT, TIME4SCI, TIME4SMS | + 10.2 |
| SVM (Classifier) | WWARS, ACE-ALL, TIMEBANK, AQUAINT, TIME4SCI, TIME4SMS | + 24.0 |
| Logistic Regression | WWARS, ACE-ALL, TIMEBANK, AQUAINT, ANCIENT, TIME4SCI, TIME4SMS | + 18.2 |
| k-Nearest-Neighbor | WWARS, ACE-ALL, TIMEBANK, AQUAINT, 12B2-TIME, TIME4SCI, TIME4SMS | + 17.1 |
| SVM (Regression) | WWARS, ACE-ALL, TIMEBANK, AQUAINT, TIME4SCI, TIME4SMS | + 24.0 |
| Linear Regression | WWARS, ACE-ALL, TIMEBANK, AQUAINT, ANCIENT, TIME4SCI, TIME4SMS | + 18.2 |
+
+Table 3: Predicted transfer sources for TIME domain adaptation with target ACE-UN (usenet).
+
+
+Figure 2: Average transfer gains using different classifiers for predicting the set of most promising sources.
+
+tion on whether to expect positive transfer. Thus, we now explore methods to automatically predict sets of promising sources.
+
+# 5.3 Prediction of Sets of Sources
+
+We use the methods introduced in Section 3.3 to predict the set of most promising sources. Then, we train a model on the combination of the selected sources and adapt it to the target.7
+
+The results averaged across the different settings are visualized in Figure 2. While NER and TIME targets benefit from training on many sources, POS tagging targets gain the most from using only one or two of the most related source domains. We find that our methods based on SVMs are able to predict this behavior and assign fewer sources for POS targets, and more sources for TIME and NER settings. In particular, for TIME settings, our methods SVM-C and -R result in much higher transfer gains compared to the static ranking-based methods and other classifiers or regression models.
+
+For example, transferring multiple sources using our SVM classifier to the ACE-UN target (see
+
+Table 3) increases performance from $60.5F_{1}$ for single-task training to $84.5F_{1}(+24.0)$ , which is much higher than the 10.9 points increase when using the single best source or 10.2 points using all available sources.
+
+For the cross-task experiments in the lower part of Figure 2, we find that even the inclusion of the single best-ranked model results in a transfer loss of -0.9 points on average for TIME $\rightarrow$ NER. In this setting, our models correctly adapt to this new challenge and predict an empty set of sources, indicating that no transfer should be performed.
+
+# 6 Conclusion
+
+We explored different transfer settings across three sequence-labeling tasks and various domains. Our new model similarity measure based on feature mappings outperforms currently used similarity measures as it is able to capture both task and domain similarity at the same time. We further addressed the automatic selection of sets of sources as well as the challenge of potential negative transfer by proposing a selection method based on support vector machines. Our method results in performance gains of up to $24F_{1}$ points.
+
+# References
+
+Lars Ahrenberg. 2015. Converting an English-Swedish parallel treebank to Universal Dependencies. In Proceedings of the Third International Conference on Dependency Linguistics (Depling 2015), pages 10-19, Uppsala, Sweden. Uppsala University.
+Mikel Artetxe, Gorka Labaka, and Eneko Agirre. 2018. Generalizing and improving bilingual word embedding mappings with a multi-step framework of linear transformations. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence (AAAI 2018), pages 5012-5019, New Orleans, Louisiana, USA. AAAI Press.
+Timothy Baldwin, Paul Cook, Marco Lui, Andrew MacKinlay, and Li Wang. 2013. How noisy social media text, how diffrnt social media sources?
+
+In Proceedings of the Sixth International Joint Conference on Natural Language Processing (IJCNLP 2013), pages 356-364, Nagoya, Japan. Asian Federation of Natural Language Processing.
+David Bamman, Sejal Popat, and Sheng Shen. 2019. An annotated dataset of literary entities. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume I (Long and Short Papers) (NAACL 2019), pages 2138-2144, Minneapolis, Minnesota, USA. Association for Computational Linguistics.
+Joachim Bingel and Anders Søgaard. 2017. Identifying beneficial task relations for multi-task learning in deep neural networks. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers (EACL 2017), pages 164-169, Valencia, Spain. Association for Computational Linguistics.
+Xilun Chen, Ahmed Hassan Awadallah, Hany Hassan, Wei Wang, and Claire Cardie. 2019. Multi-source cross-lingual model transfer: Learning what to share. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (ACL 2019), pages 3098–3112, Florence, Italy. Association for Computational Linguistics.
+Ronan Collobert and Jason Weston. 2008. A unified architecture for natural language processing: Deep neural networks with multitask learning. In Proceedings of the 25th International Conference on Machine Learning (ICML 2008), pages 160-167, New York, New York, USA. Association for Computing Machinery.
+Gordon V Cormack, Charles LA Clarke, and Stefan Buettcher. 2009. Reciprocal rank fusion outperforms condorcet and individual rank learning methods. In Proceedings of the 32nd International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR 2009), pages 758-759, New York, New York, USA. Association for Computing Machinery.
+Xiang Dai, Sarvaz Karimi, Ben Hachey, and Cecile Paris. 2019. Using similarity measures to select pretraining data for NER. 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) (NAACL 2019), pages 1460-1470, Minneapolis, Minnesota, USA. Association for Computational Linguistics.
+Xiang Dai, Sarvnaz Karimi, Ben Hachey, and Cecile Paris. 2020. Cost-effective selection of pretraining data: A case study of pretraining BERT on social media. In *Findings of the 2020 Conference on Empirical Methods in Natural Language Processing* (EMNLP 2020), Online. Association for Computational Linguistics.
+
+Hal Daumé III. 2007. Frustratingly easy domain adaptation. In Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics (ACL 2007), pages 256-263, Prague, Czech Republic. Association for Computational Linguistics.
+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 (WNUT 2017), pages 140-147, Copenhagen, Denmark. Association for Computational Linguistics.
+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) (NAACL 2019), pages 4171-4186, Minneapolis, Minnesota, USA. Association for Computational Linguistics.
+Lisa Ferro, Laurie Gerber, Inderjeet Mani, Beth Sundheim, and George Wilson. 2005. TIDES 2005 standard for the annotation of temporal expressions. The MITRE Corporation.
+Annemarie Friedrich, Heike Adel, Federico Tomazic, Johannes Hingerl, Renou Benteau, Anika Marusczyk, and Lukas Lange. 2020. The SOFC-exp corpus and neural approaches to information extraction in the materials science domain. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL 2020), pages 1255-1268, Online. Association for Computational Linguistics.
+Suchin Gururangan, Ana Marasovic, Swabha Swayamdipta, Kyle Lo, Iz Beltagy, Doug Downey, and Noah A. Smith. 2020. Don't stop pretraining: Adapt language models to domains and tasks. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL 2020), pages 8342-8360, Online. Association for Computational Linguistics.
+Kenneth Heafield. 2011. KenLM: Faster and smaller language model queries. In Proceedings of the Sixth Workshop on Statistical Machine Translation (WMT 2011), pages 187-197, Edinburgh, Scotland. Association for Computational Linguistics.
+Michael A. Hedderich, Lukas Lange, Heike Adel, Jannik Strötgen, and Dietrich Klakow. 2021. A survey on recent approaches for natural language processing in low-resource scenarios. pages 2545-2568.
+Kalervo Järvelin and Jaana Kekäläinen. 2002. Cumulated gain-based evaluation of ir techniques. ACM Trans. Inf. Syst., 20(4):422-446.
+
+Zhengbao Jiang, Wei Xu, Jun Araki, and Graham Neubig. 2020. Generalizing natural language analysis through span-relation representations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL 2020), pages 2120-2133, Online. Association for Computational Linguistics.
+Jan-Christoph Klie, Richard Eckart de Castilho, and Iryna Gurevych. 2020. From zero to hero: Human-in-the-loop entity linking in low resource domains. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL 2020), pages 6982-6993, Online. Association for Computational Linguistics.
+Lukas Lange, Heike Adel, and Jannik Strötgen. 2021. Boosting transformers for job expression extraction and classification in a low-resource setting. In Proceedings of The Iberian Languages Evaluation Forum (IberLEF 2021), CEUR Workshop Proceedings.
+Lukas Lange, Anastasiia Iurshina, Heike Adel, and Jannik Strötgen. 2020. Adversarial alignment of multilingual models for extracting temporal expressions from text. In Proceedings of the 5th Workshop on Representation Learning for NLP, pages 103-109, Online. Association for Computational Linguistics.
+Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, (ICLR 2019), New Orleans, Louisiana, USA. Open-Review.net.
+Pawel Mazur and Robert Dale. 2010. WikiWars: A new corpus for research on temporal expressions. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing (EMNLP 2010), Cambridge, Massachusetts, USA.
+Sara Meftah, Nasredine Seminar, Mohamed-Ayoub Tahiri, Youssef Tamaazousti, Hassane Essafi, and Fatiha Sadat. 2020. Multi-task supervised pretraining for neural domain adaptation. In Proceedings of the Eighth International Workshop on Natural Language Processing for Social Media (SocialNLP 2020), pages 61-71, Online. Association for Computational Linguistics.
+Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Efficient estimation of word representations in vector space. In 1st International Conference on Learning Representations (ICLR 2013), Scottsdale, Arizona, USA.
+Joakim Nivre, Marie-Catherine de Marneffe, Filip Ginter, Yoav Goldberg, Jan Hajic, Christopher D. Manning, Ryan McDonald, Slav Petrov, Sampo Pyysalo, Natalia Silveira, Reut Tsarfaty, and Daniel Zeman. 2016. Universal Dependencies v1: A multilingual treebank collection. In Proceedings of the Tenth International Conference on Language Resources and
+
+Evaluation (LREC 20h16), pages 1659-1666, Portož, Slovenia. European Language Resources Association (ELRA).
+Md Rizwan Parvez and Kai-Wei Chang. 2021. Evaluating the values of sources in transfer learning. arXiv preprint arXiv:2104.12567.
+Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, RON Weiss, Vincent Dubourg, Jake Vanderplas, Alexandre Passos, David Cournaepau, Matthieu Brucher, Matthieu Perrot, and Édouard Duchesnay. 2011. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12(85):2825-2830.
+Nanyun Peng and Mark Dredze. 2017. Multi-task domain adaptation for sequence tagging. In Proceedings of the 2nd Workshop on Representation Learning for NLP (RepL4NLP 2017), pages 91-100, Vancouver, Canada. Association for Computational Linguistics.
+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 (ACL 2020), pages 5231-5247, Online. Association for Computational Linguistics.
+James Pustejovsky, Robert Ingria, Roser Saurí, José Castanó, Jessica Littman, Rob Gaizauskas, Andrea Setzer, Graham Katz, and Inderjeet Mani. 2005. The specification language TimeML. In *The language of time: a reader*, pages 545-557. Oxford University Press.
+Alexander Rietzler, Sebastian Stabinger, Paul Opitz, and Stefan Engl. 2020. Adapt or get left behind: Domain adaptation through BERT language model finetuning for aspect-target sentiment classification. In Proceedings of the 12th Language Resources and Evaluation Conference (LREC 2020), pages 4933-4941, Marseille, France. European Language Resources Association (ELRA).
+Sebastian Ruder. 2019. Neural Transfer Learning for Natural Language Processing. Ph.D. thesis, National University of Ireland, Galway.
+Sebastian Ruder and Barbara Plank. 2017. Learning to select data for transfer learning with Bayesian optimization. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing (EMNLP 2017), pages 372-382, Copenhagen, Denmark. Association for Computational Linguistics.
+Julio Cesar Salinas Alvarado, Karin Verspoor, and Timothy Baldwin. 2015. Domain adaption of named entity recognition to support credit risk assessment. In
+
+Proceedings of the Australasian Language Technology Association Workshop (ALTA 2015), pages 84-90, Parramatta, Australia.
+Manuela Sanguinetti and Cristina Bosco. 2014. Converting the parallel treebank ParTUT in Universal Stanford Dependencies. In Proceedings of the First Italian Conference on Computational Linguistics (CLiC-it 2014), pages 316-321, Pisa, Italy. Pisa University Press.
+Peter H Schonemann. 1966. A generalized solution of the orthogonal procrustes problem. Psychometrika, 31(1):1-10.
+Fynn Schroder and Chris Biemann. 2020. Estimating the influence of auxiliary tasks for multi-task learning of sequence tagging tasks. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL 2020), pages 2971-2985, Online. Association for Computational Linguistics.
+Natalia Silveira, Timothy Dozat, Marie-Catherine de Marneffe, Samuel Bowman, Miriam Connor, John Bauer, and Christopher D. Manning. 2014. A gold standard dependency corpus for English. In Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC 2014), page 2897-2904, Reykjavik, Iceland. European Language Resources Association (ELRA).
+Benjamin Strauss, Bethany Toma, Alan Ritter, Marie-Catherine de Marneffe, and Wei Xu. 2016a. Results of the WNUT16 named entity recognition shared task. In Proceedings of the 2nd Workshop on Noisy User-generated Text (WNUT), pages 138-144, Osaka, Japan. The COLING 2016 Organizing Committee.
+Benjamin Strauss, Bethany Toma, Alan Ritter, Marie-Catherine de Marneffe, and Wei Xu. 2016b. Results of the WNUT16 named entity recognition shared task. In Proceedings of the 2nd Workshop on Noisy User-generated Text (WNUT 2016), pages 138-144, Osaka, Japan. The COLING 2016 Organizing Committee.
+Jannik Strötgen, Thomas Bögel, Julian Zell, Ayser Armiti, Tran Van Canh, and Michael Gertz. 2014. Extending HeidelTime for temporal expressions referring to historic dates. In Proceedings of the Ninth International Conference on Language Resources and Evaluation (LREC 2014), pages 2390-2397, Reykjavik, Iceland. European Language Resources Association (ELRA).
+Jannik Strötgen and Michael Gertz. 2013. Multilingual and cross-domain temporal tagging. *Language Resources and Evaluation*, 47(2):269-298.
+Jannik Strötgen and Michael Gertz. 2016. Domain-sensitive temporal tagging. Synthesis Lectures on Human Language Technologies, 9(3):1-151.
+
+Amber Stubbs and Ozlem Uzuner. 2015. Annotating longitudinal clinical narratives for de-identification: The 2014 i2b2/uthealth corpus. Journal of Biomedical Informatics, 58:S20-S29.
+Weiyi Sun, Anna Rumshisky, and Ozlem Uzuner. 2013. Evaluating temporal relations in clinical text: 2012 i2b2 challenge. Journal of the American Medical Informatics Association, 20(5):806-813.
+Jeniya Tabassum, Sydney Lee, Wei Xu, and Alan Ritter. 2020. WNUT-2020 task 1 overview: Extracting entities and relations from wet lab protocols. In Proceedings of EMNLP 2020 Workshop on Noisy User-generated Text (WNUT 2020), pages 260–267, Online. Association for Computational Linguistics.
+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 (CoNLL 2003), pages 142-147.
+Ozlem Uzuner, Brett R South, Shuying Shen, and Scott L DuVall. 2011. 2010 i2b2/va challenge on concepts, assertions, and relations in clinical text. Journal of the American Medical Informatics Association, 18(5):552-556.
+Naushad UzZaman, Hector Llorens, Leon Derczynski, James Allen, Marc Verhagen, and James Pustejovsky. 2013. SemEval-2013 task 1: TempEval-3: Evaluating time expressions, events, and temporal relations. In Second Joint Conference on Lexical and Computational Semantics (*SEM), Volume 2: Proceedings of the Seventh International Workshop on Semantic Evaluation (SemEval 2013), pages 1–9, Atlanta, Georgia, USA. Association for Computational Linguistics.
+Tu Vu, Tong Wang, Tsendsuren Munkhdalai, Adam Trischler Alessandro Sordoni, Andrew Mattarella-Micke, Subhransu Maji, and Mohit Iyyer. 2020. Exploring and predicting transferability across nlp tasks. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP 2020), pages 7882-7926, Online. Association for Computational Linguistics.
+Christopher Walker, Stephanie Strassel, Julie Medero, and Kazuaki Maeda. 2006. ACE 2005 multilingual training corpus. Linguistic Data Consortium, Philadelphia, 57:45.
+Amir Zeldes. 2017. The GUM corpus: creating multilayer resources in the classroom. Language Resources and Evaluation, 51(3):581-612.
+
+# A Datasets
+
+All datasets are listed in Table 4 with information on their domain and size with respect to the label set and number of sentences. We take the last $20\%$ and $10\%$ of the training data as test or development data whenever no split was provided.
+
+| Task | Corpus | Domain | # Labels | # Train / Dev / Test sentences |
| NER | CONLL (Tjong Kim Sang and De Meulder, 2003) News | 9 | 14,987 / 3,466 / 3,684 | |
| I2B2-CLIN (Uzuner et al., 2011) | Clinical concepts | 7 | 13,052 / 3,263 / 27,625 |
| I2B2-ANON (Stubbs and Uzuner, 2015) | Clinical anonymization | 47 | 45,443 / 5,439 / 32,587 |
| WNUT-16 (Strauss et al., 2016b) | Twitter posts | 21 | 2,394 / 1,000 / 3,850 |
| WNUT-17 (Derczynski et al., 2017) | Social media | 13 | 3.394 / 1,009 / 1.287 |
| WNUT-20 (Tabassum et al., 2020) | Wetlab protocols | 37 | 8.444 / 2,862 / 2,813 |
| LITBANK (Bamman et al., 2019) | Literature | 13 | 5.549 / 1.388 / 2.973 |
| SEC (Salinas Alvarado et al., 2015) | Financial | 9 | 825 / 207 / 443 |
| SOFC (Friedrich et al., 2020) | Materials science | 9 | 490 / 123 / 263 |
| NER&POS | GUM-ALL (Zeldes, 2017) | All (GUM) | 23/17 | 3,883 / 960 / 2,060 |
| GUM-ACAD | Academic | 23/17 | 321 / 81 / 173 |
| GUM-BIO | Biography | 23/17 | 434 / 106 / 233 |
| GUM-FICT | Fiction | 23/17 | 576 / 144 / 309 |
| GUM-INT | Interview | 23/17 | 599 / 150 / 321 |
| GUM-NEWS | News | 23/17 | 360 / 91 / 194 |
| GUM-RED | Reddit | 23/17 | 500 / 126 / 269 |
| GUM-TRAV | Travel | 23/17 | 431 / 108 / 232 |
| GUM-WHOW | Wikihow | 23/17 | 612 / 154 / 329 |
| POS | EWT (Silveira et al., 2014) | Blog. Email. Social | 17 | 12,514 / 1,998 / 2.074 |
| LINES (Ahrenberg, 2015) | (non-)Fiction. spoken | 17 | 2,738 / 912 / 914 |
| PARTUT (Sanguinetti and Bosco, 2014) | Legal. News. Wikipedia | 17 | 1,781 / 156 / 153 |
| Temporal Expressions | TIMEBANK (UzZaman et al., 2013) | News | 9 | 2,557 / 640 / 303 |
| AQUAINT (UzZaman et al., 2013) | News | 9 | 972 / 243 / 522 |
| ANCIENT (Ströttgen et al., 2014) | Historical Wikipedia | 9 | 456 / 114 / 245 |
| WWARS (Mazur and Dale, 2010) | Wikipedia | 9 | 2,788 / 697 / 1,494 |
| TIME4SMS (Ströttgen and Gertz, 2013) | SMS | 9 | 1,674 / 419 / 898 |
| TIME4SCI (Ströttgen and Gertz, 2013) | Clinical | 9 | 461 / 116 / 248 |
| I2B2-TIME (Sun et al., 2013) | Clinical | 9 | 5,943 / 1,486 / 5,665 |
| ACE-ALL (Walker et al., 2006) | All (ACE-05) | 9 | 8,958 / 2,241 / 4,802 |
| ACE-BC | Broadcast conversations | 9 | 1,655 / 414 / 887 |
| ACE-BN | Broadcast news | 9 | 2,087 / 522 / 1,119 |
| ACE-CTS | Conversational telephony | 9 | 1,756 / 440 / 942 |
| ACE-NW | Newswire | 9 | 1,172 / 293 / 628 |
| ACE-UN | Usenet | 9 | 1,168 / 292 / 626 |
| ACE-WB | Webblog | 9 | 1,120 / 280 / 600 |
+
+Table 4: Overview of dataset domains and their sizes used in the transfer experiments.
+
+| Corpus | BERT |
| Pre | Rec | F1 |
| CONLL | 90.5 | 91.9 | 91.2 |
| WNUT-20 | 78.2 | 81.0 | 79.6 |
| WNUT-17 | 60.1 | 35.9 | 44.9 |
| WNUT-16 | 46.8 | 44.7 | 45.7 |
| I2B2-CLIN | 82.0 | 85.8 | 83.9 |
| I2B2-ANON | 94.7 | 93.2 | 94.0 |
| SEC | 76.7 | 87.9 | 81.9 |
| LITBANK | 66.1 | 74.5 | 70.0 |
| SOFC | 73.3 | 82.8 | 77.8 |
| GUM-ACAD | 46.3 | 58.8 | 51.8 |
| GUM-BIO | 61.0 | 72.1 | 66.1 |
| GUM-FICT | 62.8 | 72.0 | 67.1 |
| GUM-INT | 48.9 | 58.7 | 53.4 |
| GUM-NEWS | 43.7 | 52.7 | 47.8 |
| GUM-RED | 50.5 | 61.9 | 55.6 |
| GUM-TRAV | 37.7 | 51.0 | 43.3 |
| GUM-WHOW | 40.0 | 49.0 | 44.0 |
| GUM-ALL | 55.1 | 64.3 | 59.4 |
+
+(a) Named Entity Recognition
+
+| Corpus | BERT |
| Pre | Rec | F1 |
| TIMEBANK | 75.2 | 76.3 | 75.7 |
| AQUAINT | 77.6 | 77.6 | 77.6 |
| ANCIENT | 71.8 | 79.6 | 75.5 |
| WWARS | 87.1 | 90.7 | 88.9 |
| TIME4SMS | 63.8 | 68.4 | 66.0 |
| TIME4SCI | 55.9 | 51.6 | 53.7 |
| I2B2-TIME | 72.2 | 76.7 | 74.4 |
| ACE-BC | 60.5 | 64.0 | 62.2 |
| ACE-BN | 60.3 | 71.5 | 65.4 |
| ACE-CTS | 39.0 | 55.6 | 45.8 |
| ACE-NW | 76.8 | 81.9 | 79.2 |
| ACE-UN | 56.5 | 65.2 | 60.5 |
| ACE-WB | 65.6 | 69.4 | 67.5 |
| ACE-ALL | 66.9 | 77.6 | 71.8 |
+
+(b) Temporal Expression Extraction
+
+| Corpus | BERT
+F1=Acc. |
| PARTUT | 96.9 |
| EWT | 97.0 |
| LINES | 97.5 |
| GUM-ACAD | 95.1 |
| GUM-BIO | 96.3 |
| GUM-FICT | 96.8 |
| GUM-INT | 95.5 |
| GUM-NEWS | 95.9 |
| GUM-RED | 94.6 |
| GUM-TRAV | 94.5 |
| GUM-WHOW | 94.9 |
| GUM-ALL | 96.5 |
+
+(c) POS Tagging
+
+Table 5: Single task learning performance.
+
+| Task | Min. | Avg. | Max. | # Pos. | Pos. Avg. | # Neg. | Neg. Avg. |
| Zero-Shot Model Transfer |
| NER | -57.3 (-37.9) | -17.7 (-10.1) | 18.1 (8.0) | 7 /64 | 8.6 (3.8) | 56 /64 | -21.3 (-12.0) |
| POS | -8.7 (-8.4) | -2.8 (-2.7) | 1.6 (1.5) | 13 /144 | 0.9 (0.8) | 127 /144 | -3.3 (-3.2) |
| TIME | -100.0 (-83.2) | -42.7 (-29.6) | 38.6 (17.7) | 13 /196 | 10.3 (5.6) | 183 /196 | -46.5 (-31.7) |
| Supervised Domain Adaptation |
| NER | -5.2 (-2.7) | 3.8 (1.9) | 14.5 (6.3) | 55 /64 | 4.7 (2.3) | 8 /64 | -1.7 (-0.9) |
| POS | -0.3 (-0.3) | 0.4 (0.4) | 1.8 (1.7) | 116 /144 | 0.5 (0.5) | 9 /144 | -0.1 (0.1) |
| TIME | -15.3 (-10.1) | 3.4 (2.0) | 32.7 (15.1) | 133 /196 | 6.0 (3.7) | 62 /196 | -2.1 (-1.4) |
| Cross-Task Transfer |
| NER→NER | -9.1 (-4.1) | -0.2 (-0.2) | 6.8 (3.1) | 39 /90 | 1.1 (0.6) | 46 /90 | -1.4 (-0.9) |
| POS→NER | -5.9 (-4.8) | -0.5 (-0.3) | 2.6 (1.2) | 42 /120 | 2.6 (1.2) | 65 /120 | -1.3 (-0.9) |
| TIME→NER | -7.2 (-3.3) | -0.9 (-0.5) | 0.9 (0.6) | 35 /150 | 0.4 (0.3) | 100 /150 | -1.5 (-0.9) |
+
+Table 6: Transfer gains $\left( {F}_{1}\right.$ increase) and the number of positive and negative transfer scenarios for each setting.
+
+| Distance | Zero-Shot Model Transfer | Supervised Domain Adaptation | Cross-Task Transfer | Average | | | | |
| NER | POS | TIME | NER | POS | TIME | NER→NER | POS→NER | TIME→NER | | | | |
| ρ | N | ρ | N | ρ | N | ρ | N | ρ | N | ρ | N | ρ | N | ρ | N | ρ | N | | |
| Vocabulary | 3.1 | 90.8 | 1.3 | 91.7 | 2.9 | 93.9 | 3.6 | 83.7 | 2.3 | 92.4 | 2.6 | 90.7 | 5.3 | 82.8 | 5.4 | 87.7 | 8.4 | 84.3 | 3.9 | 88.7 |
| Annotation | 3.5 | 89.7 | 1.3 | 91.7 | 2.4 | 93.8 | 3.9 | 85.1 | 2.3 | 92.4 | 3.1 | 90.5 | 5.3 | 86.2 | 5.2 | 87.7 | 7.9 | 84.0 | 3.9 | 89.1 |
| Datasize | 5.0 | 81.0 | 2.1 | 88.3 | 3.6 | 90.0 | 4.6 | 81.2 | 2.8 | 89.9 | 4.1 | 86.7 | 6.9 | 75.0 | 5.5 | 87.3 | 9.1 | 84.6 | 4.9 | 84.9 |
| Term Dist. | 4.4 | 86.1 | 1.0 | 92.8 | 2.9 | 92.5 | 5.0 | 83.4 | 3.5 | 90.4 | 4.1 | 88.6 | 4.9 | 87.1 | 6.3 | 85.0 | 8.8 | 83.5 | 4.5 | 87.7 |
| LM Perp. | 4.9 | 83.8 | 2.1 | 91.2 | 4.6 | 81.8 | 3.9 | 86.8 | 1.8 | 93.5 | 4.6 | 84.4 | 4.8 | 84.8 | 6.8 | 86.5 | 6.1 | 81.9 | 4.4 | 86.1 |
| Text Emb. | 3.5 | 88.8 | 4.0 | 86.1 | 4.4 | 89.4 | 4.0 | 84.3 | 5.0 | 84.1 | 4.9 | 86.5 | 4.7 | 84.3 | 9.6 | 84.7 | 7.0 | 84.8 | 5.2 | 85.9 |
| Task Emb. | 3.4 | 89.4 | 4.0 | 86.3 | 5.0 | 89.8 | 3.8 | 83.7 | 5.0 | 84.3 | 5.2 | 86.3 | 4.9 | 84.5 | 7.2 | 82.8 | 7.8 | 83.3 | 5.1 | 85.6 |
| Model Sim. | 2.6 | 91.8 | 2.7 | 88.7 | 3.2 | 91.9 | 3.5 | 85.9 | 3.3 | 88.4 | 3.1 | 91.8 | 3.0 | 87.2 | 6.6 | 84.5 | 5.7 | 84.6 | 3.7 | 88.3 |
+
+Table 7: Ranking results for different similarity measures in the three transfer settings. The values displayed are the average rank of the best model $(\rho)$ and the NDCG-score (N) compared to the observed performance.
+
+# B Model Performance
+
+We list the performance for all single-task models in Table 5 with precision, recall and micro- $F_{1}$ for NER and TIME corpora and accuracy for POS.
+
+# C Fine-grained Results
+
+In addition to Table 1 and Table 2 that display taskwise averages, we report more fine-grained results in Table 6 and Table 7.
+
+# D Similarity Measures
+
+This section provides a more detailed overview of the similarity measures introduced in Section 3.2.
+
+Target vocabulary overlap is the percentage of unique words from the target corpus covered in the source corpus. In contrast to vocabulary overlap, this is an asymmetric measure. Annotation overlap is a special case considering only annotated words.
+
+We also experiment with the Language model perplexity (Baldwin et al., 2013) between two datasets. For this, a language model, in our case a 5-gram LM with Kneser-Ney smoothing (Heafield, 2011) as used by Dai et al. (2019), is trained for each source domain and tested against the target
+
+domain. The resulting perplexity gives hints how similar these domains are, i.e., a lower perplexity indicates similarity between domains.
+
+Jensen-Shannon divergence (Ruder and Plank, 2017) compares the term distributions between two texts, which are probability distributions that capture the frequency of words. It is similar to vocabulary overlap, as it describes the textual overlap, but based on distributions instead of sets of terms.
+
+A Text embedding (Vu et al., 2020) can be computed by extracting the feature vectors of a neural model. For this, the output of the last layer is averaged over all words in the dataset. This vector then represents the text domain. The distance between two vectors is computed by using cosine similarity.
+
+The Task embedding (Vu et al., 2020) takes a labeled source dataset and computes a representation based on the Fisher Information Matrix, which captures the change of model parameters w.r.t. the computed loss. This method assumes that similar tasks require similar parameters changes. We use the code released by Vu et al. (2020) to compute task embeddings from the different components of our BERT models and similarly use reciprocal rank fusion (Cormack et al., 2009) to combine these.
\ No newline at end of file
diff --git a/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/images.zip b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..ed7bf14f2803cdebbe97d00c0f0f1d9d3e30e867
--- /dev/null
+++ b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6f830492818cea59cf39f1db84e34f23051a7183e2b9fb8dfaab8200380e79f6
+size 722673
diff --git a/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/layout.json b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..aa7a6d8f183936fe30ae6bcd4c68f035359d96ee
--- /dev/null
+++ b/toshareornottosharepredictingsetsofsourcesformodeltransferlearning/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:14f77c36c5cc1d10aa2809980cd4669e08b1b35787ffddfc0700eae3933849b2
+size 339024
diff --git a/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/09939172-2881-4558-953f-7d856b84d718_content_list.json b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/09939172-2881-4558-953f-7d856b84d718_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..d06f9e742de546684c4926b2acbd0f8008060205
--- /dev/null
+++ b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/09939172-2881-4558-953f-7d856b84d718_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:093103df3a92143814b819038b84859db5397cd409bd29480c0b134c9d5517b2
+size 112775
diff --git a/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/09939172-2881-4558-953f-7d856b84d718_model.json b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/09939172-2881-4558-953f-7d856b84d718_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..1068e0decca5eead87f7250f8d529cda971ec90c
--- /dev/null
+++ b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/09939172-2881-4558-953f-7d856b84d718_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b0c8b06b773169c19f7c6070da8629dd19d72d786a65cf67111954428469f891
+size 136846
diff --git a/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/09939172-2881-4558-953f-7d856b84d718_origin.pdf b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/09939172-2881-4558-953f-7d856b84d718_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7b7d95c30f9d04e8a026aac28211a848ae0d6edd
--- /dev/null
+++ b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/09939172-2881-4558-953f-7d856b84d718_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:578114ea14b77d52cf066c6644b391a6bb68cbc3e9fe044bc68da551486c55fe
+size 900914
diff --git a/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/full.md b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..2669ab2d57c90ae14029168b33398e81211a1b8f
--- /dev/null
+++ b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/full.md
@@ -0,0 +1,456 @@
+# Total Recall: a Customized Continual Learning Method for Neural Semantic Parsers
+
+Zhuang Li, Lizhen Qu*, Gholamreza Haffari
+
+Faculty of Information Technology
+
+Monash University
+
+firstname.lastname@monash.edu
+
+# Abstract
+
+This paper investigates continual learning for semantic parsing. In this setting, a neural semantic parser learns tasks sequentially without accessing full training data from previous tasks. Direct application of the SOTA continual learning algorithms to this problem fails to achieve comparable performance with retraining models with all seen tasks, because they have not considered the special properties of structured outputs, yielded by semantic parsers. Therefore, we propose TOTAL RECALL, a continual learning method designed for neural semantic parsers from two aspects: i) a sampling method for memory replay that diversifies logical form templates and balances distributions of parse actions in a memory; ii) a two-stage training method that significantly improves generalization capability of the parsers across tasks. We conduct extensive experiments to study the research problems involved in continual semantic parsing, and demonstrate that a neural semantic parser trained with TOTAL RECALL achieves superior performance than the one trained directly with the SOTA continual learning algorithms, and achieve a 3-6 times speedup compared to retraining from scratch. Code and datasets are available at: https://github.com/zhuang-li/cl_nsp.
+
+# 1 Introduction
+
+In the recent market research report published by MarketsandMarkets (INC., 2020), it is estimated that the smart speaker market is expected to grow from USD 7.1 billion in 2020 to USD 15.6 billion by 2025. Commercial smart speakers, such as Alexa and Google assistant, often need to translate users' commands and questions into actions. Therefore, semantic parsers are widely adopted in dialogue systems to map natural language (NL) utterances to executable programs or logical forms
+
+(LFs) (Damonte et al., 2019; Rongali et al., 2020). Due to the increasing popularity of such speakers, software developers have implemented a large volume of skills for them and the number of new skills grow quickly every year. For example, as of 2020, the number of Alexa skills exceeds 100,000 and 24 new skills are introduced per day in 2020 (KINSELLA, 2020). Although machine learning-based semantic parsers achieve the state-of-the-art performance, they face the following challenges due to the fast growing number of tasks.
+
+Given new tasks, one common practice is to retrain the parser from scratch on the training data of all seen tasks. However, it is both economically and computationally expensive to re-train semantic parsers because of a fast-growing number of new tasks (Lialin et al., 2020). To achieve its optimal performance, training a deep model on all 8 tasks of NLMap (Lawrence and Riezler, 2018) takes approximately 14 times longer than training the same model on one of those tasks. In practice, the cost of repeated re-training for a commercial smart speaker is much higher, e.g. Alexa needs to cope with the number of tasks which is over 10,000 times more than the one in NLMap1. In contrast, continual learning provides an alternative cost-effective training paradigm, which learns tasks sequentially without accessing full training data from the previous tasks, such that the computational resources are utilized only for new tasks.
+
+Privacy leakage has gradually become a major concern in many Artificial Intelligence (AI) applications. As most computing environments are not $100\%$ safe, it is not desirable to always keep a copy of the training data including identifiable personal information. Thus, it is almost not feasible to assume that complete training data of all known tasks is always available for re-training a semantic
+
+parser (Irfan et al., 2021). For the semantic parser of a privacy-sensitive AI system, e.g. personalized social robot, continual learning provides a solution to maintain the knowledge of all learned tasks when the complete training data of those data is not available anymore due to security reasons.
+
+A major challenge of continual learning lies in catastrophic forgetting that the (deep) models easily forget the knowledge learned in the previous tasks when they learn new tasks (French, 1991; Mi et al., 2020). Another challenge is to learn what kind of knowledge the tasks share in common and support fast adaptation of models for new tasks. Methods are developed to mitigate catastrophic forgetting (Lopez-Paz and Ranzato, 2017; Han et al., 2020) and facilitate forward knowledge transfer (Li and Hoiem, 2017). Instead of directly measuring speedup of training, those methods assume that there is a small fixed-size memory available for storing training examples or parameters from the previous tasks. The memory limits the size of training data thus proportionally reduces training time. However, we empirically found that direct application of those methods to neural semantic parsers leads to a significant drop of test performance on benchmark datasets, in comparison to re-training them with all available tasks each time.
+
+In this work, we investigated the applicability of existing continual learning methods to semantic parsing in-depth, and we have found that most methods have not considered the special properties of structured outputs, which distinct semantic parsing from the multi-class classification problem. Therefore, we propose TOTAL RECALL (TR), a continual learning method that is especially designed to address the semantic parsing specific problems from two perspectives. First, we customize the sampling algorithm for memory replay, which stores a small sample of examples from each previous task when continually learning new tasks. The corresponding sampling algorithm, called Diversified Logical Form Selection (DLFS), diversifies LF templates and maximizes the entropy of the parse action distribution in a memory. Second, motivated by findings from cognitive neuroscience (Goyal and Bengio, 2020), we facilitate knowledge transfer between tasks by proposing a two-stage training procedure, called Fast Slow Continual Learning (FSCL). It updates only unseen action embeddings in the fast-learning stage and updates all model parameters in the follow-up
+
+stage. As a result, it significantly improves generalization capability of parsing models.
+
+Our key contributions are as follows:
+
+- We conduct the first in-depth empirical study of the problems encountered by neural semantic parsers to learn a sequence of tasks continually in various settings. The most related work (Lialin et al., 2020) only investigated incremental learning between two semantic parsing tasks.
+- We propose DLFS, a sampling algorithm for memory replay that is customized for semantic parsing. As a result, it improves the best sampling methods of memory replay by 2-11% on Overnight (Wang et al., 2015a).
+- We propose a two-stage training algorithm, coined FSCL, that improves the test performance of parsers across tasks by $5 - 13\%$ in comparison with using only Adam (Kingma and Ba, 2014).
+- In our extensive experiments, we investigate applicability of the SOTA continual learning methods to semantic parsing with three different task definitions, and show that TR outperforms the competitive baselines by $4 - 9\%$ and achieves a speedup by 3-6 times compared to training from scratch.
+
+# 2 Related Work
+
+Semantic Parsing The recent surveys (Kamath and Das, 2018; Zhu et al., 2019; Li et al., 2020) cover an ample of work in semantic parsing. Most current work employs a sequence-to-sequence architecture (Sutskever et al., 2014) to map an utterance into a structured meaning representations, such as LFs, SQL, and abstract meaning representation (Banarescu et al., 2013). The output sequences are either linearized LFs (Dong and Lapata, 2016, 2018; Cao et al., 2019) or sequences of parse actions (Chen et al., 2018; Cheng et al., 2019; Lin et al., 2019; Zhang et al., 2019; Yin and Neubig, 2018; Chen et al., 2018; Guo et al., 2019; Wang et al., 2020a; Li et al., 2021). There are also work (Guo et al., 2019; Wang et al., 2020a; Li et al., 2021) exploring semantic parsing with unseen database schemas or actions. Feedback semantic parsing interactively collects data from user feedbacks as continuous data streams but does not address the problem of catastrophic forgetting or
+
+improve forward transfer (Iyer et al., 2017; Yao et al., 2019; Labutov et al., 2018).
+
+Continual Learning The continual learning methods can be coarsely categorized into i) regularization-based methods (Kirkpatrick et al., 2017; Zenke et al., 2017; Ritter et al., 2018; Li and Hoiem, 2017; Zhao et al., 2020; Schwarz et al., 2018) which either applies knowledge distillation (Hinton et al., 2015) to penalize the loss updates or regularizes parameters which are crucial to the old tasks; ii) dynamic architecture methods (Mallya and Lazebnik, 2018; Serra et al., 2018; Maltoni and Lomonaco, 2019; Houlsby et al., 2019; Wang et al., 2020b; Pfeiffer et al., 2021; Rusu et al., 2016) which dynamically alter the structures of models to reduce the catastrophic forgetting; iii) memory-based methods (Lopez-Paz and Ranzato, 2017; Wang et al., 2019; Han et al., 2020; Aljundi et al., 2019; Chrysakis and Moens, 2020; Kim et al., 2020) which stores historical instances and continually learn them along with instances in new tasks. There are also hybrid methods (Mi et al., 2020; Liu et al., 2020; Rebuffi et al., 2017) which integrate more than one type of such methods.
+
+In natural language processing (NLP), continual learning is applied to tasks such as relation extraction (Wang et al., 2019; Han et al., 2020), natural language generation (Mi et al., 2020), language modelling (Sun et al., 2019) and the pretrained language models adapting to multiple NLP tasks (Wang et al., 2020b; Pfeiffer et al., 2021). To the best of our knowledge, (Lialin et al., 2020) is the only work studying catastrophic forgetting for semantic parsing. However, they consider learning between only two tasks, have not proposed new methods, and also have not evaluated recently proposed continual learning methods. In contrast, we propose two novel continual learning methods customized for semantic parsing and compare them with the strong and recently proposed continual learning methods that are not applied to semantic parsing before.
+
+# 3 Base Parser
+
+A semantic parser learns a mapping $\pi_{\theta}:\mathcal{X}\to \mathcal{Y}$ to convert an natural language (NL) utterance $\pmb {x}\in \mathcal{X}$ into its corresponding logical form (LF) $\pmb {y}\in \mathcal{V}$ . Most SOTA neural semantic parsers formulate this task as translating a word sequence into an output sequence, whereby an output sequence is either a sequence of LF tokens or a sequence of parse ac
+
+tions that construct an LF. For a fair comparison between different continual learning algorithms, we adopt the same base model for them, as commonly used in prior works (Lopez-Paz and Ranzato, 2017; Wang et al., 2019; Han et al., 2020).
+
+Similar to (Shin et al., 2019; Iyer et al., 2019), the base parser converts the utterance $\pmb{x}$ into a sequence of actions $\pmb{a} = \{a_1, \dots, a_t\}$ . As an LF can be equivalently parsed into an abstract syntax tree (AST), the actions $\pmb{a}$ sequentially construct an AST deterministically in the depth-first order, wherein each action $a_t$ at time step $t$ either i) expands an intermediate node according to the production rules from a grammar, or ii) generates a leaf node. As in (Shin et al., 2019), the idioms (frequently occurred AST fragments) are collapsed into single units. The AST is further mapped back to the target LF.
+
+The parser employs the attention-based sequence-to-sequence (SEQ2SEQ) architecture (Luong et al., 2015) for estimating action probabilities.
+
+$$
+P (\boldsymbol {a} | \boldsymbol {x}) = \prod_ {t = 1} ^ {| \boldsymbol {a} |} P \left(a _ {t} \mid \boldsymbol {a} _ {< t}, \boldsymbol {x}\right) \tag {1}
+$$
+
+Encoder. The encoder in SEQ2SEQ is a standard bidirectional Long Short-term Memory (LSTM) network (Hochreiter and Schmidhuber, 1997), which encodes an utterance $x$ into a sequence of contextual word representations.
+
+Decoder. The decoder applies an LSTM to generate action sequences. At time $t$ , the decoder produces an action representation $\mathbf{s}_t$ , which is yielded by concatenating the hidden representation $\mathbf{h}_t$ produced by the LSTM and the context vector $\mathbf{o}_t$ produced by the soft attention (Luong et al., 2015).
+
+We maintain an embedding for each action in the embedding table. The probability of an action $a_{t}$ is estimated by:
+
+$$
+P \left(a _ {t} \mid \boldsymbol {a} _ {< t}, \boldsymbol {x}\right) = \frac {\exp \left(\mathbf {c} _ {a _ {t}} ^ {\top} \mathbf {s} _ {t}\right)}{\sum_ {a ^ {\prime} \in \mathcal {A} _ {t}} \exp \left(\mathbf {c} _ {a ^ {\prime}} ^ {\top} \mathbf {s} _ {t}\right)} \tag {2}
+$$
+
+where $\mathcal{A}_t$ is the set of applicable actions at time $t$ , and $\mathbf{c}_a$ is the embedding of the action $a_t$ , which is referred to as action embedding in the following.
+
+# 4 Continual Semantic Parsing
+
+Problem Formulation. We consider a widely adopted continual learning setting that a parser $\pi_{\theta}$ is trained continually on a sequence of $K$ distinct tasks $\{\mathcal{T}^{(1)},\mathcal{T}^{(2)},\dots,\mathcal{T}^{(K)}\}$ (Lopez-Paz and Ranzato, 2017; Han et al., 2020). In both training and testing, we know which task an example belongs
+
+to. As the definition of tasks is application specific and parallel data of semantic parsing is often created by domain experts, it is easy to identify the task of an example in practice. We further assume that there is a fixed-size memory $\mathcal{M}_k$ associated with each task $\mathcal{T}^{(k)}$ for e.g. storing a small amount of replay instances, as adopted in (Rebuffi et al., 2017; Wang et al., 2019). This setting is practical for personalized conversational agents because it is difficult for them to re-collect past information except reusing the ones in the memories.
+
+# 4.1 Challenges
+
+We demonstrate catastrophic forgetting in continual semantic parsing by training the base parser sequentially with each task from the OVERNIGHT corpus (Wang et al., 2015a) and report the test accuracy of exactly matched LFs of all seen tasks combined (More evaluation details are in Sec. 5).
+
+
+Figure 1: The accuracy on OVERNIGHT after the parser being trained on each task. The parser uses GLOVE (Pennington et al., 2014), BERT (Devlin et al., 2019) with parameters updated (BERT-finetune) and fixed (BERT-fix) as the input embedding layer.
+
+Fig. 1 shows the performance of continually training the base parser with BERT (Devlin et al., 2019) (with and without fine-tuning BERT parameters) and GLOVE respectively by using the standard cross entropy loss. The accuracy on the combined test set drops dramatically after learning the second task. The training on the initial task appears to be crucial on mitigating catastrophic forgetting. The BERT-based parser with/without fine-tuning obtains no improvement over the one using GLOVE. The forgetting with BERT is even more serious compared with using GLOVE. The same phenomenon is also observed in (Arora et al., 2019) that the models with pre-trained language models obtain inferior performance than LSTM or CNN, when fine-tuning incrementally on each task. They
+
+conjecture that it is more difficult for models with large capacity to mitigate catastrophic forgetting.
+
+
+Figure 2: The average conditional probabilities $P(a_{t} | \boldsymbol{a}_{| Methods | OVERNIGHT | NLMAP(QT) | NLMAP(CITY) |
| W | A | W | A | W | A |
| Fine-tune | 14.40 | 14.37 | 60.22 | 55.53 | 49.29 | 48.11 |
| EWC | 38.57 | 40.45 | 65.44 | 62.25 | 59.28 | 57.56 |
| HAT | 15.45 | 15.71 | 64.69 | 60.88 | 53.30 | 52.41 |
| GEM | 41.33 | 42.13 | 63.28 | 59.38 | 55.14 | 54.37 |
| EMR | 45.29 | 46.01 | 59.75 | 55.59 | 58.36 | 56.95 |
| EMAR | 46.68 | 48.57 | 14.25 | 12.89 | 51.79 | 50.93 |
| ARPER | 48.28 | 49.90 | 67.79 | 64.73 | 62.62 | 60.61 |
| PROTOPARSEN | 48.15 | 49.71 | 67.10 | 63.73 | 62.58 | 60.87 |
| TR | 54.40 | 54.73 | 70.06 | 67.77 | 62.96 | 61.59 |
| TR (+EWC) | 59.02 | 58.04 | 72.36 | 70.66 | 67.15 | 64.89 |
| ORACLE (All Tasks) | 63.14 | 62.76 | 73.20 | 71.65 | 69.48 | 67.18 |
+
+Table 1: LF Exact Match Accuracy $(\%)$ on two datasets with three settings after model learning on all tasks. "W" stands for the Whole performance $\mathrm{ACC}_{\mathrm{whole}}$ and "A" stands for the Average performance $\mathrm{ACC}_{\mathrm{avg}}$ . All the results are statistically significant $(p < 0.005)$ compared with TR (+EWC) according to the Wilcoxon signed-rank test (Woolson, 2007). All experiments are run 10 times with different sequence orders and seeds.
+
+The dynamic architecture method, HAT, performs worst on OVERNIGHT while achieves much better performance on NLMAP(QT) and NLMAP(CITY). Though the performance of the regularization method, EWC, is steady across different settings, it ranks higher among other baselines on NLMAP(CITY) and NLMAP(QT) than on OVERNIGHT. In contrast, the memory-based methods, GEM, and EMR, rank better on OVERNIGHT than on NLMAP(QT) and NLMAP(CITY).
+
+We conjecture that the overall performance of continual learning approaches varies significantly in different settings due to different distribution discrepancies as introduced in Datasets. The general memory-based methods are better at handling catastrophic forgetting than the regularization-based and dynamic architecture methods, when the distribution discrepancies are large. However, those memory-based methods are less effective when the distribution discrepancies across tasks are small. Another weakness of memory-based methods is demonstrated by EMAR, which achieves only $14.25\%$ of $\mathrm{ACC_{whole}}$ on NLMAP(QT), despite it is the SOTA method on continual relation extraction. A close inspection shows that the instances in the memory are usually insufficient to include all actions when the number of actions is extremely large (i.e., more than 1000 actions per task in NLMAP(QT)) while EMAR relies on instances in memory to construct prototypes for each label. Furthermore, large training epochs for memory-based methods usually lead to severe catastrophic forgetting on the previous tasks, while the regularization method could largely alleviate this effect.
+
+ARPER and PROTOPARSER are the two best
+
+basielines. Similar to TR, ARPER is a hybrid method combining EMR and EWC, thus the joint benefits lead to consistent superior performance over the other baselines except PROTOPARSER in all three settings. The generalization capability to unseen actions in new tasks also seems critical in continual semantic parsing. Merely combining PROTOPARSER and EMR yields a new baseline, which performs surprisingly better than most existing continual learning baselines. From that perspective, the parser with FSCL performs well in continual learning also because of its strength in generalizing to unseen actions.
+
+| Methods | OVERNIGHT | NLMAP(CITY) |
| 10 | 25 | 50 | 10 | 25 | 50 |
| RANDOM | 37.63 | 45.18 | 50.63 | 58.82 | 59.96 | 60.64 |
| FSS | 38.64 | 47.08 | 52.63 | 58.94 | 59.67 | 60.89 |
| GSS | 34.01 | 39.45 | 43.87 | 57.97 | 59.40 | 60.36 |
| PRIOR | 37.60 | 44.84 | 50.14 | 54.39 | 54.09 | 53.43 |
| BALANCE | 38.21 | 45.33 | 48.64 | 58.39 | 59.89 | 61.19 |
| LFS | 38.24 | 44.66 | 53.06 | 58.88 | 59.81 | 60.76 |
| DLFS | 39.24 | 48.21 | 54.73 | 59.31 | 60.58 | 61.59 |
+
+Influence of Sampling Strategies. Table 2 reports the evaluation results of TR with different sampling strategies and sizes on OVERNIGHT and NLMAP(CITY). The results on NLMAP(QT) can be found in Appendix C. RANDOM randomly samples instances from the train set of each task. FSS (Aljundi et al., 2019; Wang et al., 2019; Mi et al., 2020), GSS (Aljundi et al., 2019) and LFS partition the instances into clusters w.r.t. the spaces of utterance encoding features, instance gradients, and LFs, respectively, and then select the instances which are closest to the centroids. PRIOR (Mi et al., 2020) selects instances that are most confident to the models and diversifies the entities in the utterances of memory. BALANCE (Chrysakis and Moens, 2020; Kim et al., 2020) balances the action distribution in a memory.
+
+Overall, our sampling method consistently outperforms all other baselines on both OVERNIGHT and NLMAP(CITY). On OVERNIGHT with memory size 50, the gap between DLFS and GSS is even up to $11\%$ and $2\%$ between DLFS and FSS, the best baseline. However, on NLMAP(CITY), the performance differences across various sampling methods are smaller than those on OVERNIGHT. Similar observation applies to the influence of different sample sizes. We conclude that the smaller distribution discrepancy reduces the differences of
+
+sampling methods as well as the sample sizes in the memory-based methods.
+
+RANDOM performs steadily across different settings though it is usually in mediocre performance. FSS, GSS, and PRIOR are model-dependent sampling methods. The gradients and model confidence scores are not stable features for the sample selection algorithms. We inspect that the instances selected with GSS are significantly different even when model parameters are slightly disturbed. For the PRIOR, the semantic parsing model is usually confident to instances with similar LF templates. Diversifying entities do not necessarily lead to diversities of LF templates since the LFs with different entities may share similar templates. Therefore, GSS and PRIOR can only perform well in one setting. In contrast, the utterance encoding features are much more reliable. FSS can achieve the second-best performance among all methods. Either balancing action distribution (BALANCE) or selecting centroid LFs from LF clusters (LFS) alone performs no better than DLFS, proving it is advantageous to select a instance in a cluster which balances the memory action distribution over directly using the centroid.
+
+Table 2: $\mathrm{ACC}_{\mathrm{avg}}$ (\%) of TR with different sampling strategies and memory sizes 10, 25 and 50.
+
+| Methods | OVERNIGHT | NLMAP(QT) | NLMAP(CITY) |
| W | A | W | A | W | A |
| TR (+EWC) | 59.02 | 58.04 | 72.36 | 70.66 | 67.15 | 64.89 |
| - fast | 56.22 | 54.77 | 69.12 | 65.97 | 64.88 | 62.42 |
| -/+ fast/lwf | 55.80 | 54.54 | 69.45 | 66.37 | 65.14 | 62.70 |
| -/+ fast/emar | 56.93 | 56.05 | 69.43 | 66.42 | 64.89 | 62.51 |
| TR | 54.40 | 54.73 | 70.06 | 67.77 | 62.96 | 61.59 |
| - fast | 49.28 | 49.48 | 60.22 | 54.84 | 57.53 | 55.75 |
| -/+ fast/lwf | 47.47 | 47.77 | 58.96 | 53.54 | 55.24 | 56.89 |
| -/+ fast/emar | 49.63 | 48.74 | 64.98 | 61.09 | 56.89 | 55.24 |
+
+Table 3: The ablation study results of FSCL.
+
+Ablation Study of FSCL Training. Table 3 shows the ablation study of FSCL training by removing (-) or replacing $(- / +)$ the corresponding component/step.
+
+The fast-learning with action embeddings is the most critical step in FSCL training. Removing it causes up to $13\%$ performance drop. To study this step in depth, we also replace our fast-learning with fine-tuning all task-specific parameters except in the first task, as done in LwF (Li and Hoiem, 2017), or fine tuning all parameters, as done in EMAR (Han et al., 2020), in the fast-learning stage. The corresponding performance is no better than removing it in most cases. We also plot the training errors and test errors with or without this step in Fig. 3. This step clearly leads to dramatically improvement of both generalization and optimization.
+
+
+Figure 3: The training and test errors of the base parser with/without fast-learning on OVERNIGHT.
+
+
+Figure 4: $\mathrm{ACC}_{\mathrm{whole}}$ till the seen tasks on OVERNIGHT after learning on each task sequentially.
+
+Another benefit of this fast-learning step is in the first task. We observe that a good optimization on the first task is crucial to the model learning on the following tasks. Our preliminary study shows that by applying the fast-learning only to the first task, the model can still keep the close-to-optimal performance. As shown in Fig. 4, our method with this fast-learning step is better optimized and generalized on the initial tasks than all the other baselines and largely alleviate the forgetting problem caused by learning on the second task.
+
+Influence of Pre-trained Language Models. We study the impact of pre-trained language models for semantic parsing in supervised learning and continual learning, respectively. In both settings, we evaluate the base parsers using BERT (Devlin et al., 2019) as its embedding layer in two configurations: fine-tuning the parameters of BERT (BERT-finetune) and freezing BERT's parameters (BERT-fix). As in Tab. 4, BERT slightly improves the overall performance of the base parsers in supervised training (the ORACLE setting) on OVERNIGHT. In contrast, in the continual learning setting, base parsers with the BERT embedding perform worse than the ones with the GLOVE em
+
+bedding. On NLMAP(QT), the accuracy of FINETUNE with GLOVE embedding is $30\%$ and $20\%$ higher than that with BERT's embedding updated and fixed, respectively. We conjecture the deeper neural models suffer more from the catastrophic forgetting. However, the average training speeds of parsers with BERT-fix and BERT-finetune are 5-10 times and 20-40 times respectively slower than those with GLOVE on each task. Overall, our method outperforms other SOTA continual learning methods except that EWC with BERT-fix performs comparably with ours on NLMAP(CITY). In contrast, the performance of PROTOPARSER, the best baseline with GLOVE, is highly unstable on NLMap with BERT.
+
+| Methods | OVERNIGHT | NLMAP(QT) | NLMAP(CITY) |
| W | A | W | A | W | A |
| BERT-finetune |
| Fine-tune | 16.19 | 14.89 | 30.33 | 29.22 | 39.47 | 36.07 |
| EWC | 13.97 | 13.39 | 45.97 | 44.19 | 35.74 | 34.17 |
| EMR | 51.74 | 51.40 | 37.39 | 34.61 | 54.89 | 52.61 |
| PROTOPARSER | 47.74 | 46.99 | 15.10 | 13.03 | 34.56 | 32.27 |
| TR | 52.58 | 52.86 | 64.07 | 61.35 | 58.38 | 56.35 |
| ORACLE (All Tasks) | 65.40 | 64.39 | 72.70 | 71.60 | 67.51 | 68.80 |
| BERT-fix |
| Fine-tune | 14.10 | 12.09 | 40.45 | 36.06 | 49.15 | 46.48 |
| EWC | 17.69 | 18.56 | 54.20 | 51.32 | 64.10 | 61.67 |
| EMR | 39.10 | 39.03 | 42.46 | 39.50 | 57.55 | 55.42 |
| PROTOPARSER | 41.69 | 41.79 | 51.39 | 48.90 | 45.66 | 43.92 |
| TR | 47.14 | 48.12 | 59.41 | 55.84 | 64.48 | 62.66 |
| ORACLE (All Tasks) | 64.70 | 63.90 | 73.20 | 71.91 | 69.80 | 67.57 |
+
+Table 4: $\mathrm{ACC}_{\mathrm{whole}}$ and $\mathrm{ACC}_{\mathrm{avg}}$ (\%) of parsers using BERT by fine-tuning (Up) and fixing (Bottom) BERT's parameters.
+
+# 6 Conclusion
+
+We conducted the first in-depth empirical study to investigate continual learning for semantic parsing. To cope with the catastrophic forgetting and facilitate knowledge transfer between tasks, we propose TOTAL RECALL, consisting of a sampling method specifically designed for semantic parsing and a two-stage training method implementing an inductive bias for continual learning. The resulted parser achieves superior performance over the existing baselines on three benchmark settings. The ablation studies also demonstrate why it is effective.
+
+# Acknowledgements
+
+This material is based on research sponsored by the ARC Future Fellowship FT190100039. The computational resources of this work are supported by the Multi-modal Australian Science Imaging and Visualisation Environment (MASSIVE). We appreciate the reviewers for their useful comments.
+
+# References
+
+Rahaf Aljundi, Min Lin, Baptiste Goujaud, and Yoshua Bengio. 2019. Gradient based sample selection for online continual learning. In Advances in Neural Information Processing Systems, pages 11816-11825.
+Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paz. 2019. Invariant risk minimization. arXiv preprint arXiv:1907.02893.
+Gaurav Arora, Afshin Rahimi, and Timothy Baldwin. 2019. Does an lstm forget more than a cnn? an empirical study of catastrophic forgetting in nlp. In Proceedings of the The 17th Annual Workshop of the Australasian Language Technology Association, pages 77-86.
+Laura Banarescu, Claire Bonial, Shu Cai, Madalina Georgescu, Kira Griffith, Ulf Hermjakob, Kevin Knight, Philipp Koehn, Martha Palmer, and Nathan Schneider. 2013. Abstract meaning representation for sembanking. In Proceedings of the 7th Linguistic Annotation Workshop and Interoperability with Discourse, pages 178-186.
+Shu Cai and Kevin Knight. 2013. Smatch: an evaluation metric for semantic feature structures. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 748-752.
+Ruisheng Cao, Su Zhu, Chen Liu, Jieyu Li, and Kai Yu. 2019. Semantic parsing with dual learning. arXiv preprint arXiv:1907.05343.
+Arslan Chaudhry, Marcus Rohrbach, Mohamed Elhoseiny, Thalaiyasingam Ajanthan, Puneet K Dokania, Philip HS Torr, and Marc'Aurelio Ranzato. 2019. On tiny episodic memories in continual learning. arXiv preprint arXiv:1902.10486.
+Bo Chen, Le Sun, and Xianpei Han. 2018. Sequenceto-action: End-to-end semantic graph generation forsemantic parsing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 766-777.
+Jianpeng Cheng, Siva Reddy, Vijay Saraswat, and Mirella Lapata. 2019. Learning an executable neural semantic parser. Computational Linguistics, 45(1):59-94.
+Aristotelis Chrysakis and Marie-Francine Moens. 2020. Online continual learning from imbalanced data. In International Conference on Machine Learning, pages 1952-1961. PMLR.
+Marco Damonte, Rahul Goel, and Tagyoung Chung. 2019. Practical semantic parsing for spoken language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Industry Papers), pages 16-23.
+
+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.
+Li Dong and Mirella Lapata. 2016. Language to logical form with neural attention. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 33-43.
+Li Dong and Mirella Lapata. 2018. Coarse-to-fine decoding for neural semantic parsing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 731-742.
+Robert M French. 1991. Using semi-distributed representations to overcome catastrophic forgetting in connectionist networks. In Proceedings of the 13th annual cognitive science society conference, volume 1, pages 173-178.
+Anirudh Goyal and Yoshua Bengio. 2020. Inductive biases for deep learning of higher-level cognition. arXiv preprint arXiv:2011.15091.
+Jiaqi Guo, Zecheng Zhan, Yan Gao, Yan Xiao, Jian-Guang Lou, Ting Liu, and Dongmei Zhang. 2019. Towards complex text-to-sql in cross-domain database with intermediate representation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4524-4535.
+Xu Han, Yi Dai, Tianyu Gao, Yankai Lin, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. 2020. Continual relation learning via episodic memory activation and reconsolidation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6429-6440.
+Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531.
+Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735-1780.
+Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019. Parameter-efficient transfer learning for nlp. In International Conference on Machine Learning, pages 2790-2799. PMLR.
+MarketsandMarkets INC. 2020. Smart speaker market worth $15.6 billion by 2025.
+
+Bahar Irfan, Aditi Ramachandran, Samuel Spaulding, Sinan Kalkan, German I Parisi, and Hatice Gunes. 2021. Lifelong learning and personalization in long-term human-robot interaction (leap-hri). In *Companion of the 2021 ACM/IEEE International Conference on Human-Robot Interaction*, pages 724–727.
+Srinivasan Iyer, Alvin Cheung, and Luke Zettlemoyer. 2019. Learning programmatic idioms for scalable semantic parsing. 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 5429-5438.
+Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, Jayant Krishnamurthy, and Luke Zettlemoyer. 2017. Learning a neural semantic parser from user feedback. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 963-973.
+Aishwarya Kamath and Rajarshi Das. 2018. A survey on semantic parsing. In *Automated Knowledge Base Construction* (AKBC).
+Chris Dongjoo Kim, Jinseo Jeong, and Gunhee Kim. 2020. Imbalanced continual learning with partitioning reservoir sampling. In European Conference on Computer Vision, pages 411-428. Springer.
+Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
+BRET KINSELLA. 2020. Amazon alexa skill growth has slowed further in 2020.
+James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. 2017. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 114(13):3521-3526.
+Igor Labutov, Bishan Yang, and Tom Mitchell. 2018. Learning to learn semantic parsers from natural language supervision. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1676-1690.
+Carolin Lawrence and Stefan Riezler. 2018. Improving a neural semantic parser by counterfactual learning from human bandit feedback. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1820-1830.
+Zhizhong Li and Derek Hoiem. 2017. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence, 40(12):2935-2947.
+Zhuang Li, Lizhen Qu, and Gholamreza Haffari. 2020. Context dependent semantic parsing: A survey. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2509-2521.
+
+Zhuang Li, Lizhen Qu, Shuo Huang, and Gholamreza Haffari. 2021. Few-shot semantic parsing for new predicates. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1281-1291.
+Vladislav Lialin, Rahul Goel, Andrey Simanovsky, Anna Rumshisky, and Rushin Shah. 2020. Update frequently, update fast: Retraining semantic parsing systems in a fraction of time. arXiv preprint arXiv:2010.07865.
+Kevin Lin, Ben Bogin, Mark Neumann, Jonathan Berant, and Matt Gardner. 2019. Grammar-based neural text-to-sql generation. arXiv preprint arXiv:1905.13326.
+Yaoyao Liu, Yuting Su, An-An Liu, Bernt Schiele, and Qianru Sun. 2020. Mnemonics training: Multi-class incremental learning without forgetting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12245-12254.
+David Lopez-Paz and Marc'Aurelio Ranzato. 2017. Gradient episodic memory for continual learning. In Advances in neural information processing systems, pages 6467-6476.
+Minh-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.
+Arun Mallya and Svetlana Lazebnik. 2018. Packnet: Adding multiple tasks to a single network by iterative pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7765-7773.
+Davide Maltoni and Vincenzo Lomonaco. 2019. Continuous learning in single-incremental-task scenarios. Neural Networks, 116:56-73.
+Fei Mi, Liangwei Chen, Mengjie Zhao, Minlie Huang, and Boi Faltings. 2020. Continual learning for natural language generation in task-oriented dialog systems. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, pages 3461-3474.
+Hae-Sang Park and Chi-Hyuck Jun. 2009. A simple and fast algorithm for k-medoids clustering. Expert systems with applications, 36(2):3336-3341.
+Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 1532-1543.
+Jonas Pfeiffer, Aishwarya Kamath, Andreas Rückle, Kyunghyun Cho, and Iryna Gurevych. 2021. Adapterfusion: Non-destructive task composition for transfer learning. In Proceedings of the 16th
+
+Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 487-503.
+Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert. 2017. icarl: Incremental classifier and representation learning. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 2001-2010.
+Hippolyt Ritter, Aleksandar Botev, and David Barber. 2018. Online structured laplace approximations for overcoming catastrophic forgetting. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 3742-3752.
+Subendhu Rongali, Luca Soldaini, Emilio Monti, and Wael Hamza. 2020. Don't parse, generate! a sequence to sequence architecture for task-oriented semantic parsing. In Proceedings of The Web Conference 2020, pages 2962-2968.
+Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. 2016. Progressive neural networks. arXiv preprint arXiv:1606.04671.
+Jonathan Schwarz, Wojciech Czarnecki, Jelena Luketina, Agnieszka Grabska-Barwinska, Yee Whye Teh, Razvan Pascanu, and Raia Hadsell. 2018. Progress & compress: A scalable framework for continual learning. In International Conference on Machine Learning, pages 4528-4537. PMLR.
+Joan Serra, Didac Suris, Marius Miron, and Alexandros Karatzoglou. 2018. Overcoming catastrophic forgetting with hard attention to the task. In International Conference on Machine Learning, pages 4548-4557. PMLR.
+Eui Chul Shin, Miltiadis Allamanis, Marc Brockschmidt, and Alex Polozov. 2019. Program synthesis and semantic parsing with learned code idioms. In Advances in Neural Information Processing Systems, pages 10824-10834.
+Jake Snell, Kevin Swersky, and Richard Zemel. 2017. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, pages 4077-4087.
+Fan-Keng Sun, Cheng-Hao Ho, and Hung-Yi Lee. 2019. Lamol: Language modeling for lifelong language learning. In International Conference on Learning Representations.
+I Sutskever, O Vinyals, and QV Le. 2014. Sequence to sequence learning with neural networks. Advances in NIPS.
+Bailin Wang, Richard Shin, Xiaodong Liu, Oleksandr Polozov, and Matthew Richardson. 2020a. Rat-sql: Relation-aware schema encoding and linking for text-to-sql parsers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7567-7578.
+
+Hong Wang, Wenhan Xiong, Mo Yu, Xiaoxiao Guo, Shiyu Chang, and William Yang Wang. 2019. Sentence embedding alignment for lifelong relation extraction. 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 796-806.
+Ruize Wang, Duyu Tang, Nan Duan, Zhongyu Wei, Xuanjing Huang, Cuihong Cao, Daxin Jiang, Ming Zhou, et al. 2020b. K-adapter: Infusing knowledge into pre-trained models with adapters. arXiv preprint arXiv:2002.01808.
+Yushi Wang, Jonathan Berant, and Percy Liang. 2015a. Building a semantic parser overnight. 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), volume 1, pages 1332-1342.
+Yushi Wang, Jonathan Berant, and Percy Liang. 2015b. Building a semantic parser overnight. 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 1332-1342.
+RF Woolson. 2007. Wilcoxon signed-rank test. Wiley encyclopedia of clinical trials, pages 1-3.
+Ziyu Yao, Yu Su, Huan Sun, and Wen-tau Yih. 2019. Model-based interactive semantic parsing: A unified framework and a text-to-sql case study. 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 5450-5461.
+Pengcheng Yin and Graham Neubig. 2018. Tranx: A transition-based neural abstract syntax parser for semantic parsing and code generation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (Demo Track).
+Friedemann Zenke, Ben Poole, and Surya Ganguli. 2017. Continual learning through synaptic intelligence. In International Conference on Machine Learning, pages 3987-3995. PMLR.
+Sheng Zhang, Xutai Ma, Kevin Duh, and Benjamin Van Durme. 2019. Broad-coverage semantic parsing as transduction. arXiv preprint arXiv:1909.02607.
+Bowen Zhao, Xi Xiao, Guojun Gan, Bin Zhang, and Shu-Tao Xia. 2020. Maintaining discrimination and fairness in class incremental learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 13208-13217.
+Q. Zhu, X. Ma, and X. Li. 2019. Statistical learning for semantic parsing: A survey. *Big Data Mining and Analytics*, 2(4):217-239.
+
+# A Reproducibility Checklist
+
+The hyper-parameters are cross-validated on the training set of OVERNIGHT and validated on the validation set of NLMAP(QT) and NLMAP(CITY). We train the semantic parser on each task with learning rate 0.0025, batch size 64 and for 10 epochs. The fast-learning training epochs is 5. We use the 200-dimensional GLOVE embeddings (Pennington et al., 2014) to initialize the word embeddings for utterances. As different task orders influence the performance of the continual semantic parsing, all experiments are run on 10 different task orders with a different seed for each run. We report the average $\mathrm{ACC}_{\mathrm{avg}}$ and $\mathrm{ACC}_{\mathrm{whole}}$ of 10 runs. In addition, we use one GPU of Nvidia V100 to run all our experiments. The sizes of hidden states for LSTM and the action embeddings are 256 and 128, respectively. The default optimizer is Adam (Kingma and Ba, 2014). For our DLFS method, we sample the subsets of the action sets with size 300 and 500 on NLMAP(CITY) and NLMAP(QT), respectively. The number of our model parameters is around 1.8 million. We grid-search the training epochs from $\{10,50\}$ , the learning rate from $\{0.001,0.0025\}$ . The coefficient for EWC is selected from $\{50000,200000\}$ . Here we also provide the experiment results on the validation sets as in Table 5.
+
+| Methods | OVERNIGHT | NLMAP(QT) | NLMAP(CITY) |
| W | A | W | A | W | A |
| TR | 52.38 | 53.30 | 68.78 | 66.83 | 68.51 | 66.23 |
| TR (+EWC) | 56.84 | 54.85 | 70.74 | 69.21 | 74.84 | 71.19 |
+
+Table 5: Results on the validation sets.
+
+# B DLFS Algorithm
+
+We provide the detailed DLFS as in Algo. 2.
+
+# C Results of Different Sampling Methods
+
+Table 6 shows the performance of TR with different sampling strategies and different memory sizes on NLMAP(QT).
+
+# D Dynamic Action Representation
+
+To differentiate the learning of cross-task and task-specific aspects, we innovatively integrate a designated dynamic architecture into the base parser along with DLFS and FSCL for continual semantic parsing, coined Dynamic Action Representation
+
+Algorithm 2: DLFS
+Input: Training set $\mathcal{D}$ , memory size $M$
+Output: The memory $\mathcal{M}$
+Partition $\mathcal{D}$ into $M$ clusters, denoted as $C$ , with the similarity/distance metric
+Randomly sample the memory $\mathcal{M}$ of size $M$ from $D$ $H_{old} \gets -\inf$
+Compute the entropy $H_{new}$ of the action distribution $P_{\mathcal{M}}(\mathcal{A})$ in $\mathcal{M}$ as in Eq. 4
+while $H_{new} > H_{old}$ do
+for $i$ -th cluster $c_i \in \mathcal{C}$ do
+Compute the entropy $H_c$ of $P_{\mathcal{M}}(\mathcal{A})$
+for instance $n \in c_i$ do
+Replicate $\mathcal{M}$ with $\mathcal{M}'$
+Replace the $i$ -th instance $m_i$ in $\mathcal{M}'$ with $n$
+Compute the entropy $H_c'$ of $\mathcal{M}'$
+if $H_c' > H_c$ then
+ $\mathcal{M} \gets \mathcal{M}'$ $E_c \gets H_c'$
+end
+end
+ $H_{old} \gets H_{new}$
+Compute the entropy $H_{new}$ of $P_{\mathcal{M}}(\mathcal{A})$
+end
+
+(DAR). This method could also significantly mitigate the catastrophic forgetting and improve the forward transfer in the continual semantic parsing. Due to the limited space, we did not put it into the main paper. The details and analysis of this method are listed below.
+
+Decoder of Base Parser. The decoder of the base parser applies an LSTM to generate action sequences. At time $t$ , the LSTM produces a hidden state $\mathbf{h}_t = \mathrm{LSTM}(\mathbf{c}_{a_{t-1}}, \mathbf{h}_{t-1})$ , where $\mathbf{c}_{a_{t-1}}$ is the embedding of the previous action $a_{t-1}$ . We maintain an embedding for each action in the embedding table. As defined in Luong et al. (2015), we concatenate $\mathbf{h}_t$ with a context vector $\mathbf{o}_t$ to yield $\mathbf{s}_t$ ,
+
+$$
+\mathbf {s} _ {t} = \tanh \left(\mathbf {W} _ {c} \left[ \mathbf {h} _ {t}; \mathbf {o} _ {t} \right]\right) \tag {5}
+$$
+
+where $\mathbf{W}_c$ is a weight matrix and the context vector $\mathbf{c}_t$ is generated by the soft attention (Luong et al., 2015),
+
+$$
+\mathbf {o} _ {t} = \sum_ {i = 1} ^ {n} \operatorname {s o f t m a x} \left(\mathbf {h} _ {t} ^ {\intercal} \mathbf {E}\right) \mathbf {e} _ {i} \tag {6}
+$$
+
+The probability of an action $a_{t}$ is estimated by:
+
+$$
+P \left(a _ {t} \mid \boldsymbol {a} _ {< t}, \boldsymbol {x}\right) = \frac {\exp \left(\mathbf {c} _ {a _ {t}} ^ {\top} \mathbf {s} _ {t}\right)}{\sum_ {a ^ {\prime} \in \mathcal {A} _ {t}} \exp \left(\mathbf {c} _ {a ^ {\prime}} ^ {\top} \mathbf {s} _ {t}\right)} \tag {7}
+$$
+
+where $\mathcal{A}_t$ is the set of applicable actions at time $t$ . In the following, the dense vectors $\mathbf{c}_a$ are referred to as action embeddings.
+
+Decoder of DAR. The key idea of dynamic architectures is to add new parameters for new tasks and retain the previous parameters for old
+
+| Methods | NLMAP(QT) |
| 10 | 25 | 50 |
| RANDOM | 65.63 | 66.20 | 67.21 |
| FSS | 66.51 | 67.15 | 67.67 |
| GSS | 65.89 | 66.60 | 67.07 |
| PRIOR | 66.08 | 67.47 | 67.42 |
| BALANCE | 65.37 | 66.21 | 66.99 |
| LFS | 66.08 | 67.20 | 67.53 |
| DLFS | 65.21 | 66.60 | 67.77 |
+
+tasks (Houlsby et al., 2019; Wang et al., 2020b; Pfeiffer et al., 2021). As a result, those methods can adapt to new tasks by using new parameters and still memorize the knowledge of previous tasks by keeping existing parameters. In semantic parsing, we differentiate task-specific actions $\mathcal{A}_s^{(k)}$ , which generate task-specific predicates or entities, from cross-task actions, which are the remaining actions $\mathcal{A}_g$ associated with predicates appearing in more than one tasks. We model different actions using different action embeddings (Eq. (7)). But the key challenge lies in switching between task-specific and cross-task hidden representations.
+
+To address the problem, given an output hidden state of LSTM, $\mathbf{h}_t = \mathrm{LSTM}(\mathbf{c}_{a_{t-1}}, \mathbf{h}_{t-1})$ , we apply a task-specific adapter modules to transform the hidden state $\mathbf{h}_t \in \mathbb{R}^d$ .
+
+$$
+\hat {\mathbf {h}} _ {t} = g _ {i} \left(\mathbf {h} _ {t}\right) \phi_ {i} \left(\mathbf {h} _ {t}\right) + \left(1 - g _ {i} \left(\mathbf {h} _ {t}\right)\right) \mathbf {h} _ {t} \tag {8}
+$$
+
+where $\phi_i(\cdot):\mathbb{R}^d\to \mathbb{R}^d$ is an adapter network and $g_{i}(\cdot):\mathbb{R}^{d}\rightarrow \mathbb{R}^{d}$ is a gating function for task $\mathcal{T}^{(i)}$ . Here, we adopt the following modules for the adaptor network and the gating function,
+
+$$
+\phi_ {i} \left(\mathbf {h} _ {t}\right) = \tanh \left(\mathbf {W} _ {\phi} ^ {i} \mathbf {h} _ {t}\right) \tag {9}
+$$
+
+$$
+g _ {i} \left(\mathbf {h} _ {t}\right) = \operatorname {s i g m o i d} \left(\mathbf {W} _ {g} ^ {i} \left[ \phi_ {i} \left(\mathbf {h} _ {t}\right); \mathbf {h} _ {t} \right]\right) \tag {10}
+$$
+
+where parameters $\mathbf{W}_{\phi}^{i}\in \mathbb{R}^{d\times d}$ and $\mathbf{W}_g^i\in \mathbb{R}^{2d\times d}$ are task-specific. The number of parameters introduced per task is merely $O(3d^{2})$ , which is parameter-efficient. Therefore, the context vector of attention and the state to infer action probability
+
+in Eq. 5 and 6 become:
+
+$$
+\hat {\mathbf {o}} _ {t} = \sum_ {i = 1} ^ {n} \operatorname {s o f t m a x} \left(\hat {\mathbf {h}} _ {t} ^ {\intercal} \mathbf {E}\right) \mathbf {e} _ {i} \tag {11}
+$$
+
+$$
+\hat {\mathbf {s}} _ {t} = \tanh \left(\mathbf {W} _ {c} [ \hat {\mathbf {h}} _ {t}; \hat {\mathbf {o}} _ {t} ]\right) \tag {12}
+$$
+
+Table 6: $\mathrm{ACC}_{\mathrm{whole}}$ (\%) of TR with different sampling strategies and memory sizes 10, 25 and 50 on NLMAP(QT).
+
+| Methods | OVERNIGHT | NLMAP(QT) | NLMAP(CITY) |
| W | A | W | A | W | A |
| TR (+EWC) | 59.02 | 58.04 | 72.36 | 70.66 | 67.15 | 64.89 |
| - cross | 57.90 | 56.65 | 71.52 | 69.74 | 66.06 | 63.92 |
| - specific | 55.32 | 54.64 | 71.47 | 69.81 | 65.87 | 63.73 |
| TR | 54.40 | 54.73 | 70.06 | 67.77 | 62.96 | 61.59 |
| - cross | 52.77 | 53.07 | 68.87 | 66.49 | 62.18 | 60.91 |
| - specific | 51.44 | 52.84 | 69.18 | 66.88 | 61.26 | 59.93 |
+
+Ablation Study of DAR As shown in Tab. 7, removing the task-specific representations (-specific) generally degrades the model performance by $1.5 - 3.5\%$ except on NLMAP(QT). Our further inspection shows that the proportion of task-specific actions in NLMAP(QT) is only 1/20 while the ratios are 1/4 and 2/5 in OVERNIGHT and NLMAP(CITY), respectively. Using either task-specific representations (-specific) or cross-task representations (-cross) alone cannot achieve the optimal performance.
+
+# E Accuracy Curve
+
+Table 7: The ablation study results of DAR.
+
+| Methods | OVERNIGHT | NLMAP(QT) | NLMAP(CITY) |
| Fine-tune | 54.19 | 360.09 | 110.12 |
| EWC | 71.66 | 541.20 | 223.02 |
| HAT | 53.85 | 212.63 | 128.67 |
| GEM | 94.67 | 389.04 | 259.80 |
| EMR | 102.97 | 399.05 | 214.95 |
| EMAR | 139.44 | 402.64 | 240.64 |
| ARPER | 160.05 | 901.33 | 654.51 |
| PROTOPARSER | 148.04 | 490.95 | 304.45 |
| TR | 117.63 | 549.22 | 275.09 |
| TR (+EWC) | 124.49 | 540.68 | 282.87 |
| ORACLE (All Tasks) | 712.43 | 1876.60 | 1531.05 |
+
+Table 8: The average training time (seconds) of each continual learning method on one task. The training time of the ORACLE setting is reported with training on all tasks. All the methods are running on a server with one Nvidia V100 and four cores of Intel i5 5400.
+
+Figs. 5 depicts the performance curve of semantic parsers till the seen tasks on NLMAP(CITY) and NLMAP(QT) after learning on each task sequentially.
+
+The base parsers are the same for all training methods in comparison. However, the training methods are not exactly the same. For example, PROTOPARSER and EMAR use meta-learning
+
+
+
+
+
+
+Figure 5: $\mathrm{ACC}_{\mathrm{whole}}$ till the seen tasks on NLMAP(CITY) (Up) and NLMAP(QT) (Bottom) after learning on each task sequentially.
+
+
+Figure 6: The training and test error points of semantic parsing models with/without fast-learning on NLMAP(CITY) (Up) and NLMAP(QT) (Bottom).
+
+methods to train the parser. HAT manipulates parameter gradients during training and uses adapter layers to modify the weights of model parameters on different tasks. ARPER and EWC use regularization during continual training. Different training methods cause the baselines to obtain different results on the initial and subsequent tasks.
+
+In the first task, Fast-Slow Continual Learning (FSCL) differs from the traditional supervised training by updating all action embeddings first, followed by updating all model parameters. From Fig. 4 and Fig. 5, we can tell FSCL leads to a significant performance gain over the baselines in the first task. In this way, our parser trained with FSCL lays a better foundation than the baselines for learning future tasks in terms of both the forward and backward transfer. For the new tasks, the fast-learning step of FSCL leads to minimal changes of model parameters for task-specific patterns. In contrast, the baselines modify the majority of model parameters for each new task, hence easily lead to catastrophic forgetting. As a result, our model with FSCL could
+
+achieve better performance than all baselines on both all tasks and only the initial task as in Fig. 4 and Fig. 5.
+
+# F Training Time Analysis
+
+The average training times of different continual learning models on each task of OVERNIGHT, NLMAP(CITY), and NLMAP(QT) are depicted in Tab. 8. On average, the training time of Finetune is 13, 5, and 14 times faster than training the parser from scratch on the tasks of OVERNIGHT, NLMAP(CITY), and NLMAP(QT), respectively. In general, the training times of memory-based methods are longer than regularization and dynamic architecture methods due to the replay training. Since our method, TOTAL RECALL, is a memory-based method, its training time is comparable to the other memory-based methods such as GEM, EMR and EMAR. In addition, EWC slows the convergence speed of the parser on NLMAP(CITY), and NLMAP(QT), thus increases the training time of parsers on each task to achieve their optimal per
+
+
+
+
+Figure 7: The conditional probabilities $P(a_{t} | \boldsymbol{a}_{< t}, \boldsymbol{x})$ of the representative cross-task actions (Up) and task-specific actions (Bottom) from evaluation on the initial task after parser being trained on each task on OVERNIGHT sequentially.
+
+formance. Therefore, the hybrid method, ARPER, that utilizes both EMR and EWC takes the longest training time among all continual learning methods. However, our FSCL could speed up the convergence of the base parser even with EWC; thus, the training time of TOTAL RECALL (+EWC) is much less than the one of ARPER.
+
+# G Training and Test Error Plots
+
+Fig. 6 provides the training and test error points of semantic parsers on NLMAP(CITY) and NLMAP(QT), respectively. As we can see, same as on OVERNIGHT, the base parser with this fast-learning step is better optimized than without this step on NLMAP(CITY) and NLMAP(QT).
+
+# H Forgetting Analysis on Actions
+
+Following 4.1, Fig. 7 depicts the conditional probabilities, $P(a_{t} | \boldsymbol{a}_{< t}, \boldsymbol{x})$ , of cross-task and task-specific actions, respectively, predicted by the base parser fine-tuned sequentially on each task. Overall, task-specific actions are more likely to be forgotten than cross-task actions while learning parsers on the new tasks. Due to the rehearsal training of the cross-task actions in the future tasks, the prediction performance over cross-task actions fluctuates on different tasks.
\ No newline at end of file
diff --git a/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/images.zip b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..a8f216de3c86d7c3778276caa7f4c86a5805a15a
--- /dev/null
+++ b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:39603e03714e6c1fbfd5df926c99727ddeb49e5d587c95a0e0414cb5643d4c61
+size 537875
diff --git a/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/layout.json b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..de9b03ad07451488937fee989d37f15a7c3d1696
--- /dev/null
+++ b/totalrecallacustomizedcontinuallearningmethodforneuralsemanticparsers/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d272b4645f2b0ace44bc834130aec04dda2fd17f8e12226960108beb4fe4348
+size 602461
diff --git a/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/b4d4d934-4019-4e3b-916b-90c0f6260012_content_list.json b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/b4d4d934-4019-4e3b-916b-90c0f6260012_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..342e99b5d84580f34c3bc341c93cbecb9db3a54f
--- /dev/null
+++ b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/b4d4d934-4019-4e3b-916b-90c0f6260012_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d43a4c5b17486337607ff670a36266df0bd1334a32b1faeddc7f2172936e9c76
+size 206086
diff --git a/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/b4d4d934-4019-4e3b-916b-90c0f6260012_model.json b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/b4d4d934-4019-4e3b-916b-90c0f6260012_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..7566733c7c41fa6145938b1c90ee15ab0794d155
--- /dev/null
+++ b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/b4d4d934-4019-4e3b-916b-90c0f6260012_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fe6d6b2831f90aa2b69b9fccb36b1ebb0bfc148679321ea7181dbcd7a10c2cac
+size 260424
diff --git a/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/b4d4d934-4019-4e3b-916b-90c0f6260012_origin.pdf b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/b4d4d934-4019-4e3b-916b-90c0f6260012_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..6ea1d104d4cfd664dbeb2763f16cc753972fa85e
--- /dev/null
+++ b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/b4d4d934-4019-4e3b-916b-90c0f6260012_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8c165caa1f6f04bd350c66e70640ca7dee0b7ce3fa92a0fde20776e3c6a94626
+size 1142958
diff --git a/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/full.md b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..c18c151ac69e856d334dc19eedad0dba5b6ef53d
--- /dev/null
+++ b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/full.md
@@ -0,0 +1,1481 @@
+# Toward Deconfounding the Influence of Entity Demographics for Question Answering Accuracy
+
+Maharshi Gor* CS University of Maryland mgor@cs.umd.edu
+
+Kellie Webster
+Google Research, New York
+websterk@google.com
+
+Jordan Boyd-Graber*
+CS, UMIACS, iSchool, LCS
+University of Maryland
+jbg@uniacs.umd.edu
+
+# Abstract
+
+The goal of question answering (QA) is to answer any question. However, major QA datasets have skewed distributions over gender, profession, and nationality. Despite that skew, model accuracy analysis reveals little evidence that accuracy is lower for people based on gender or nationality; instead, there is more variation on professions (question topic). But QA's lack of representation could itself hide evidence of bias, necessitating QA datasets that better represent global diversity.
+
+# 1 Introduction
+
+Question answering (QA) systems have impressive recent victories—beating trivia masters (Ferrucci et al., 2010) and superhuman reading (Najberg, 2018)—but these triumphs hold only if they generalize; QA systems should be able to answer questions even if they do not look like training examples. While other work (Section 4) focuses on demographic representation in NLP resources, our focus is how well QA models generalize across demographic subsets.
+
+After mapping mentions to a knowledge base (Section 2), we show existing QA datasets lack diversity in the gender and national origin of the people mentioned: English-language QA datasets mostly ask about US men from a few professions (Section 2.2). This is problematic because most English speakers (and users of English QA systems) are not from the US or UK. Moreover, multilingual QA datasets are often translated from English datasets (Lewis et al., 2020; Artetxe et al., 2019). However, no work has verified that QA systems generalize to infrequent demographic groups.
+
+Section 3 investigates whether statistical tests reveal patterns on demographic subgroups. Despite skewed distributions, accuracy is not correlated with gender or nationality, though it is with
+
+| Entity Type | NQ | QB | SQuAD | TriviaQA |
| Train | Dev | Train | Dev | Train | Dev | Train | Dev |
| Person | 32.14 | 32.27 | 58.49 | 57.18 | 14.56 | 9.56 | 40.89 | 40.69 |
| No entity | 21.97 | 22.61 | 15.88 | 20.13 | 37.27 | 47.95 | 14.85 | 14.93 |
| Location | 28.42 | 27.82 | 34.50 | 35.11 | 33.52 | 29.34 | 44.32 | 44.10 |
| Work of art | 17.31 | 16.19 | 27.98 | 28.16 | 3.15 | 1.15 | 17.53 | 17.76 |
| Other | 2.66 | 2.70 | 9.83 | 9.88 | 5.08 | 3.10 | 14.38 | 14.61 |
| Organization | 17.73 | 18.05 | 20.37 | 17.78 | 21.34 | 19.14 | 22.15 | 21.14 |
| Event | 8.15 | 8.89 | 8.87 | 8.75 | 3.16 | 3.01 | 8.59 | 8.73 |
| Product | 0.85 | 1.06 | 0.88 | 0.63 | 1.39 | 0.33 | 3.99 | 3.99 |
| Total Examples | 106926 | 2631 | 112927 | 2216 | 130319 | 11873 | 87622 | 11313 |
+
+Table 1: Coverage (% of examples) of entity-types in QA datasets. Since examples can mention more than one entity, columns can sum to $>100\%$ . Most datasets except SQuAD are rich in people.
+
+professional field. For instance, Natural Questions (Kwiatkowski et al., 2019, NQ) systems do well with entertainers but poorly with scientists, which are handled well in TriviaQA. However, absence of evidence is not evidence of absence (Section 5), and existing QA datasets are not yet diverse enough to vet QA's generalization.
+
+# 2 Mapping Questions to Entities
+
+We analyze four QA tasks: NQ, SQuAD (Rajpurkar et al., 2016), QB (Boyd-Graber et al., 2012) and TriviaQA (Joshi et al., 2017). Google CLOUD-NL² finds and links entity mentions in QA examples.³
+
+# 2.1 Focus on People
+
+Many entities appear in examples (Table 1) but people form a majority in our QA tasks (except SQuAD). Existing work in AI fairness focuses on disparate impacts on people, and models harm especially when it comes to people; hence, our primary intent is to understand how demographic characteristics of "people" correlate with model correctness.
+
+The people asked about in a question can be in the answer—"who founded Sikhism?" (A: Guru
+
+Nanak), in the question—"what did Clara Barton found?" (A: American Red Cross), or the title of the source document—"what play featuring General Uzi premiered in Lagos in 2001?" (A: King Baabu is in the page on Wole Soyinka). We search until we find an entity: first in the answer, then the question if no entity is found in the answer, and finally the document title.
+
+Demographics are a natural way to categorize these entities and we consider the high-coverage demographic characteristics from Wikidata. Given an entity, Wikidata has good coverage for all datasets: gender ( $>99\%$ ), nationality ( $>93\%$ ), and profession ( $>94\%$ ). For each characteristic, we use the knowledge base to extract the specific value for a person (e.g., the value "poet" for the characteristic "profession"). However, the values defined by Wikidata have inconsistent granularity, so we collapse near-equivalent values (E.g., "writer", "author", "poet", etc. See Appendix A.1-A.2 for an exhaustive list). For questions with multiple values (where multiple entities appear in the answer, or a single entity has multiple values), we create a new value concatenating them together. An 'others' value subsumes values with fewer than fifteen examples; people without a value become 'not found' for that characteristic.
+
+Three authors manually verify entity assignments by vetting fifty random questions from each dataset. Questions with at least one entity had near-perfect $96\%$ inter-annotator agreement for CLOUD-NL's annotations, while for questions where CLOUD-NL didn't find any entity, agreement is $98\%$ . Some errors were benign: incorrect entities sometimes retain correct demographic values; e.g., Elizabeth II instead of Elizabeth I. Other times, coarse-grained nationality ignores nuance, such as the distinction between Greece and Ancient Greece.
+
+# 2.2 Who is in Questions?
+
+Our demographic analysis reveals skews in all datasets, reflecting differences in task focus (Table 2). NQ are search queries and skew toward popular culture. QB nominally reflects an undergraduate curriculum and captures more "academic" knowledge. TriviaQA is popular trivia, and SQuAD reflects Wikipedia articles.
+
+Across all datasets, men are asked about more than women, and the US is the subject of the majority of questions except in TriviaQA, where the
+
+ | Value | NQ | QB | SQuAD | TriviaQA |
| Train | Dev | Train | Dev | Train | Dev | Train | Dev |
| Gender | Male | 75.67 | 76.33 | 91.77 | 91.63 | 87.82 | 95.15 | 83.76 | 83.32 |
| Female | 27.47 | 27.56 | 10.29 | 9.87 | 13.44 | 5.20 | 20.54 | 20.29 |
| No Gender | 0.31 | 0.47 | 0.35 | 0.39 | 0.27 | 0.00 | 0.30 | 0.35 |
| Country | US | 59.62 | 58.66 | 29.70 | 26.28 | 32.74 | 24.93 | 31.32 | 30.91 |
| UK | 15.76 | 15.78 | 17.92 | 17.68 | 19.66 | 16.83 | 41.92 | 41.32 |
| France | 1.79 | 1.18 | 10.06 | 10.34 | 7.76 | 10.57 | 4.37 | 4.84 |
| Italy | 1.83 | 1.88 | 8.07 | 10.50 | 9.00 | 3.88 | 3.75 | 3.48 |
| Germany | 1.52 | 2.12 | 7.21 | 6.71 | 4.77 | 6.61 | 3.01 | 3.00 |
| No country | 4.82 | 4.36 | 7.12 | 6.79 | 3.48 | 2.56 | 6.19 | 6.10 |
| Professional Field | Film/TV | 39.19 | 37.93 | 3.16 | 1.89 | 10.72 | 1.32 | 20.64 | 20.75 |
| Writing | 7.40 | 6.95 | 36.62 | 36.39 | 10.46 | 6.70 | 18.41 | 18.05 |
| Politics | 11.98 | 10.84 | 24.02 | 24.86 | 36.97 | 46.61 | 21.18 | 20.72 |
| Science/Tech | 3.61 | 4.71 | 8.93 | 7.50 | 13.67 | 29.60 | 5.43 | 5.54 |
| Music | 24.08 | 23.44 | 9.51 | 10.73 | 13.56 | 2.64 | 16.46 | 17.38 |
| Sports | 13.69 | 16.49 | 1.31 | 0.32 | 2.99 | 1.76 | 11.03 | 11.19 |
| Stage | 15.67 | 14.84 | 1.49 | 1.03 | 1.21 | 1.23 | 10.89 | 10.28 |
| Artist | 1.84 | 2.47 | 9.17 | 9.00 | 4.58 | 2.38 | 5.75 | 5.93 |
+
+Table 2: Coverage (% of examples) of demographic values across examples with people in QA datasets. Men dominate, as do Americans.
+
+plurality of questions are about the UK. NQ has the highest coverage of women through its focus on entertainment (Film/TV, Music and Sports).
+
+# 3 What Questions can QA Answer?
+
+QA datasets have different representations of demographic characteristics; is this focus benign or do these differences carry through to model accuracy?
+
+We analyze a SOTA system for each of our four tasks. For NQ and SQuAD, we use a fine-tuned BERT (Alberti et al., 2019) with curated training data (e.g., downsample questions without answers and split documents into multiple training instances). For the open-domain TriviaQA task, we use ORQA (Lee et al., 2019) with a BERT-based reader and retriever components. Finally, for QB, we use the competition winner from Wallace et al. (2019), a BERT-based reranker of a TF-IDF retriever. Accuracy (exact-match) and average F1 are both common QA metrics (Rajpurkar et al., 2016). Since both are related and some statistical tests require binary scores, we focus on exact-match.
+
+Rather than focus on aggregate accuracy, we focus on demographic subsets' accuracy (Figure 1). For instance, while $66.2\%$ of questions about people are correct in QB, the number is lower for the Dutch (Netherlands) $(55.6\%)$ and higher for Ireland $(87.5\%)$ . Unsurprisingly, accuracy is consistently low on the 'not_found' subset, where Wikipedia lacks a person's demographic value.
+
+Are the differences we observe across strata significant? We probe this in two ways: using $\chi^2$ tests (Plackett, 1983) to see if trends exist and using logistic regression to explore those that do.
+
+
+Figure 1: Accuracies split by demographic subsets in our QA datasets' dev fold for all three characteristics compared to average accuracy (vertical line). For each dataset, we only consider examples that have a mention of a person-entity in either the answer, question or document title. Individual plots correspond to a $\chi^2$ test on whether demographic values and accuracy are independent (Section 3.1) with the significant characteristics highlighted in red ( $p$ -value $< 0.0167$ ).
+
+
+
+# 3.1 Do Demographic Values Affect Accuracy?
+
+The $\chi^2$ test is a non-parametric test of whether two variables are independent. To see if accuracy and characteristics are independent, we apply a $\chi^2$ test to a $n \times 2$ contingency table with $n$ rows representing the frequency of that characteristic's subsets contingent on whether the model prediction is correct or not (Table 3). If we reject the null with a Bonferroni correction (Holm, 1979, divide the $p$ -value threshold by three, as we have multiple tests for each dataset), that suggests possible relationships: gender in NQ ( $p = 2.36 \times 10^{-12}$ ) and professional field in NQ ( $p = 0.0142$ ), QB ( $p = 2.34 \times 10^{-7}$ ) and TriviaQA ( $p = 0.0092$ ). However, we find no significant relationship between nationality and accuracy in any dataset.
+
+While $\chi^2$ identifies which characteristics impact model accuracy, it does not characterize how. For instance, $\chi^2$ indicates NQ's gender is significant, but is this because accuracy is higher for women, or because the presence of both genders in examples lowers the accuracy?
+
+# 3.2 Exploration with Logistic Regression
+
+Thus, we formulate a simple logistic regression: can an example's demographic values predict if a model answers correctly? Logistic regression and related models are the workhorse for discovering and explaining the relationship between variables in history (McCloskey and McCloskey, 1987), ed
+
+| Gender | # Correct | # Incorrect | Accuracy |
| male | 433 | 177 | 70.98% |
| female | 161 | 35 | 82.14% |
| female/male | 9 | 29 | 23.68% |
+
+Table 3: Illustration of $n \times 2$ contingency table for the $\chi^2$ -test: Gender in NQ, with $n = 3$ values: male, female and female/male. Female entities have a higher accuracy (82%) than male (71%). With two degrees of freedom and $\chi^2 = 53.55$ , we get $p = 2.4 \times 10^{-12}$ , signaling significance.
+
+ucation (van der Linden and Hambleton, 2013), political science (Poole and Rosenthal, 2011), and sports (Glickman and Jones, 1999). Logistic regression is also a common tool in NLP: to find linguistic constructs that allow determiner omission (Kiss et al., 2010) or to understand how a scientific paper's attributes effect citations (Yogatama et al., 2011). Unlike model calibration (Niculescu-Mizil and Caruana, 2005), whose goal it to maximize prediction accuracy, the goal here is explanation.
+
+We define binary features for demographic values of characteristics the $\chi^2$ test found significant (thus we exclude all of SQuAD, the nationality characteristic, and gender characteristic for all but NQ). For instance, a question about Abidali Neemuchwala would have features for g_male, o_executive but zero for everything else. Real-valued features, multi Entities and multi_answers, capture the effect of multiple
+
+person-entities and multiple gold-answers (scaled with the base two logarithm).
+
+But that is not the only reason an answer may be difficult or easy. Following Sugawara et al. (2018), we incorporate features that reveal the questions' difficulty. For instance, questions that clearly hint the answer type reduce ambiguity. The t_who checks if the token "who" is in the start of the question. Similarly, twhat, twhen, and t.where capture other entity-types. Questions are also easier if evidence only differs from the question by a couple of words; thus, q_sim is the Jaccard similarity between question and evidence tokens. Finally, the binary feature e_train_count marks if the person-entities occur in the training data more than twice.
+
+We first drop features with negligible effect on accuracy using LASSO (regularization $\lambda = 1$ ) by removing zero coefficients. For the remaining features, Wald statistics (Fahrmeir et al., 2007) estimate $p$ -values. Although we initially use quadratic features they are all eliminated during feature reduction. Thus, we only report the linear features with a minimal significance ( $p$ -value $< 0.1$ ).
+
+# 3.3 How do Properties Affect Accuracy?
+
+Recall that logistic regression uses features to predict whether the QA system will get the answer right or not. Features associated with correct answers have positive weights (like those derived from Sugawara et al. (2018), q_sim and e_train_count), those associated with incorrect answers have negative weights, and features without effect will be near zero. Among the t_wh* features, t_who significantly correlates with model correctness, especially in NQ and QB, where questions asked directly about a person.
+
+However, our goal is to see if, after accounting for obvious reasons a question could be easy, demographic properties can explain QA accuracy. The strongest effect is for professions (Table 4). For instance, while NQ and QB systems struggle on science questions, TriviaQA's does not. Science has roughly equivalent representation (Table 2), suggesting QB questions are harder.
+
+While multi_answer (and multi Entities) reveal harder NQ questions, it has a positive effect in TriviaQA, as TriviaQA uses multiple answers for alternate formulations of answers (Appendix B.2.1, B.2.2), which aids machine reading, while multiple NQ answers are often a sign of ambiguity (Boyd-Graber and Borschinger, 2020; Si et al., 2021):
+
+"Who says that which we call a rose?" A: Juliet, A: William Shakespeare. For male and female genders, NQ has no statistically significant effect on accuracy, only questions about entities with multiple genders depresses accuracy. Given the many findings of gender bias in NLU (Zhao et al., 2017; Webster et al., 2018; Zhao et al., 2018; Stanovsky et al., 2019), this is surprising. However, we caution against accepting this conclusion without further investigation given the strong correlation of gender with professional field (Goulden et al., 2011), where we do see significant effects.
+
+Taken together, the $\chi^2$ and logistic regression analysis give us reason to be optimistic: although data are skewed for all subsets, QA systems might well generalize from limited training data across gender and nationality.
+
+# 4 Related Work
+
+Language is a reflection of culture. Like other cultural artifacts—encyclopedias (Reagle and Rhue, 2011), and films (Sap et al., 2017)—QA has more men than women. Other artifacts like children's books have more gender balance but reflect other aspects of culture (Larrick, 1965).
+
+The NLP literature is also grappling with demographic discrepancies. Standard coreference systems falter on gender-balanced corpora (Webster et al., 2018), and Zhao et al. (2018) create synthetic training data to reduce bias. Similar coreference issues plague machine translation systems (Stanovsky et al., 2019), and Li et al. (2020) use QA to probe biases of NLP systems. Sen and Saffari (2020) show that there are shortcomings in QA datasets and evaluations by analysing their out-of-domain generalization capabilities and ability to handle question variation. Joint models of vision and language suggest that biases come from language, rather than from vision (Ross et al., 2021). However, despite a range of mitigation techniques (Zhao et al., 2017, inter alia) none, to our knowledge, have been successfully applied to QA, especially from the demographic viewpoint.
+
+# 5 Discussion and Conclusion
+
+This paper delivers both good news and bad news. While datasets remain imperfect and reflect societal imperfections, for many demographic properties, we do not find strong evidence that QA suffers from this skew.
+
+However, this is an absence of evidence rather
+
+| Dataset | Features | Coef | SE | Wald (|W|) | PZ~N(|Z| > |W|) |
| NQ | bias | +1.964 | 0.727 | 2.703 | 0.0069 | *** |
| multi_answers | -1.893 | 0.438 | 4.327 | 0.0000 | *** |
| o_not_found | -1.112 | 0.514 | 2.163 | 0.0305 | ** |
| t_who | +0.773 | 0.280 | 2.764 | 0.0057 | *** |
| Model Fit: 78.09% | o_science/tech | -0.715 | 0.390 | 1.832 | 0.0670 | * |
| multi Entities | -0.678 | 0.342 | 1.979 | 0.0478 | ** |
| q_sim | +0.406 | 0.210 | 1.934 | 0.0531 | * |
| e_train_count | +0.353 | 0.178 | 1.979 | 0.0479 | ** |
| QB | e_train_count | +1.922 | 0.269 | 7.144 | 0.0000 | *** |
| bias | -1.024 | 0.291 | 3.516 | 0.0004 | *** |
| o_film/tv | -0.910 | 0.470 | 1.934 | 0.0531 | * |
| multi Entities | -0.870 | 0.165 | 5.287 | 0.0000 | *** |
| Model Fit: 71.90% | o_science/tech | -0.667 | 0.265 | 2.522 | 0.0117 | ** |
| o_religion | -0.655 | 0.362 | 1.812 | 0.0700 | * |
| o-writing | +0.402 | 0.189 | 2.128 | 0.0334 | ** |
| t_who | +0.363 | 0.183 | 1.990 | 0.0466 | ** |
| TriviaQA | bias | -1.066 | 0.114 | 9.353 | 0.0000 | *** |
| oRELigion | -0.443 | 0.255 | 1.738 | 0.0822 | * |
| o_law/crime | +0.412 | 0.218 | 1.890 | 0.0588 | * |
| multiAnswers | +0.341 | 0.024 | 14.090 | 0.0000 | *** |
| Model Fit: 60.18% | t_who | +0.230 | 0.129 | 1.778 | 0.0754 | * |
| o_politics | -0.208 | 0.095 | 2.177 | 0.0295 | ** |
| o_writing | +0.192 | 0.098 | 1.955 | 0.0506 | * |
+
+Table 4: Influential features after filtering characteristics based on a $\chi^2$ test (Figure 1). Highly influential features $(p$ -value $< 0.1)$ , both positive (blue) and negative (red). Higher number of $\star$ 's signals higher significance.
+
+than evidence of absence: these are skewed datasets that have fewer than a quarter of the questions about women. It is difficult to make confident assessments on such small datasets—many demographic values were excluded because they appeared infrequently (or not at all). Improving the diversity of QA datasets can help us be more certain that QA systems do generalize and reflect the diverse human experience. Considering such shortcomings, Rodriguez et al. (2021) advocate improving evaluation by focusing on more important examples for ranking models; demographic properties could further refine more holistic evaluations.
+
+A broader analysis beyond person entities would indeed be a natural extension of this work. Label propagation can expand the analysis beyond people: the Hershey-Chase experiment is associated with Alfred Hershey and Martha Chase, so it would—given the neighboring entities in the Wikipedia link graph—be $100\%$ American, $50\%$ male, and $50\%$ female. Another direction for future work is accuracy under counterfactual perturbation: swapping real-world entities (in contrast with nonce entities in Li et al. (2020)) with different demographic values.
+
+Nonetheless, particularly for professional fields, imbalances remain. The lack of representation in QA could cause us to think that things are better
+
+than they are because of Simpson's paradox (Blyth, 1972): gender and profession are not independent! For example, in NQ, our accuracy on women is higher in part because of its tilt toward entertainment, and we cannot say much about women scientists. We therefore caution against interpreting strong model performance on existing QA datasets as evidence that the task is 'solved'. Instead, future work must consider better dataset construction strategies and robustness of accuracy metrics to different subsets of available data, as well as unseen examples.
+
+# Acknowledgements
+
+We thank Michael Collins, Slav Petrov, Tulsee Doshi, Sephora Madjiheurem, Benjamin Borschinger, Pedro Rodriguez, Massimiliano Ciaramita, Kenton Lee, Alex Beutal, Kenton Lee, and Emily Pitler for their early and insightful comments on the proposal and drafts. Additionally, insights about Google's CLOUD-NL entity linking tool and WIKIDATA KB from Jan Botha, Denny Vrandecic, Livio Soares, and Tom Kwiatkowski were useful in designing the entity linking and attribute extraction pipeline.
+
+# Ethical Considerations
+
+This work analyses demographic subsets across QA datasets based on Gender, Nationality and Profession. We believe the work makes a positive contribution to representation and diversity by pointing out the skewed distribution of existing QA datasets. To avoid noise being interpreted as signal given the lack of diversity in these datasets, we could not include various subgroups that we believe should have been part of this study: non-binary, intersectional groups (e.g., women scientists in NQ), people indigenous to subnational regions, etc. We believe increasing representation of all such groups in QA datasets would improve upon the status quo. We infer properties of mentions using Google Cloud-NL to link the entity in a QA example to an entry in the WIKIDATA knowledge base to attribute gender, profession and nationality. We acknowledge that this is not foolproof and itself vulnerable to bias, although our small-scale accuracy evaluation did not reveal any concerning patterns.
+
+All human annotations are provided by authors to verify entity-linkings and were fairly compensated.
+
+# References
+
+Chris Alberti, Kenton Lee, and Michael Collins. 2019. A BERT baseline for the natural questions. arXiv preprint arXiv:1901.08634.
+Mikel Artetxe, Sebastian Ruder, and Dani Yogatama. 2019. On the cross-lingual transferability of monolingual representations. CoRR, abs/1910.11856.
+Colin R. Blyth. 1972. On Simpson's paradox and the sure-thing principle. Journal of the American Statistical Association, 67(338):364-366.
+Jordan Boyd-Graber and Benjamin Borschinger. 2020. What question answering can learn from trivia nerds. In Proceedings of the Association for Computational Linguistics.
+Jordan Boyd-Graber, Brianna Satinoff, He He, and Hal Daume III. 2012. Busting the quiz master: Crowdsourcing incremental classification games. In Proceedings of Empirical Methods in Natural Language Processing.
+Ludwig Fahrmeir, Thomas Kneib, Stefan Lang, and Brian Marx. 2007. Regression. Springer.
+David Ferrucci, Eric Brown, Jennifer Chu-Carroll, James Fan, David Gondek, Aditya A. Kalyanpur, Adam Lally, J. William Murdock, Eric Nyberg, John Prager, Nico Schlaefer, and Chris Welty. 2010. Building Watson: An Overview of the DeepQA Project. AI Magazine, 31(3).
+
+Mark E Glickman and Albyn C Jones. 1999. Rating the chess rating system. Chance, 12.
+Marc Goulden, Mary Ann Mason, and Karie Frasch. 2011. Keeping women in the science pipeline. The Annals of the American Academy of Political and Social Science, 638:141-162.
+Sture Holm. 1979. A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6(2):65-70.
+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 Association for Computational Linguistics.
+Tibor Kiss, Katja Keßelmeier, Antje Müller, Claudia Roch, Tobias Stadtfeld, and Jan Strunk. 2010. A logistic regression model of determiner omission in PPs. In Proceedings of International Conference on Computational Linguistics, pages 561-569, Beijing, China.
+Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Matthew Kelcey, Jacob Devlin, Kenton Lee, Kristina N. Toutanova, Llion Jones, Ming-Wei Chang, Andrew Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics.
+Nancy Larrick. 1965. The all-white world of children's books. The Saturday Review, 64:63-65.
+Kenton Lee, Ming-Wei Chang, and Kristina Toutanova. 2019. Latent retrieval for weakly supervised open domain question answering. In Proceedings of the Association for Computational Linguistics.
+Patrick Lewis, Barlas Oguz, Rudy Rinott, Sebastian Riedel, and Holger Schwenk. 2020. MLQA: Evaluating cross-lingual extractive question answering. In Proceedings of the Association for Computational Linguistics, Online.
+Tao Li, Daniel Khashabi, Tushar Khot, Ashish Sabharwal, and Vivek Srikumar. 2020. UNQOVERing stereotyping biases via underspecified questions. In Findings of the Association for Computational Linguistics: EMNLP.
+Deirdre N. McCloskey and Donald N. McCloskey. 1987. Econometric History. Casebook Series. Macmillan Education.
+Sewon Min, Julian Michael, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2020. AmbigQA: Answering ambiguous open-domain questions. In Proceedings of Empirical Methods in Natural Language Processing, Online.
+Adam Najberg. 2018. Alibaba AI model tops humans in reading comprehension.
+
+Alexandru Niculescu-Mizil and Rich Caruana. 2005. Predicting good probabilities with supervised learning. In Proceedings of the International Conference of Machine Learning.
+Robin L Plackett. 1983. Karl Pearson and the chisquared test. International Statistical Review/Revue Internationale de Statistique, pages 59-72.
+K.T. Poole and H.L. Rosenthal. 2011. Ideology and Congress. American Studies. Transaction Publishers.
+Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of Empirical Methods in Natural Language Processing.
+Joseph Reagle and Lauren Rhue. 2011. Gender bias in Wikipedia and Britannica. International Journal of Communication, 5(0).
+Pedro Rodriguez, Joe Barrow, Alexander Miserlis Hoyle, John P. Lalor, Robin Jia, and Jordan Boyd-Graber. 2021. Evaluation examples are not equally informative: How should that change nlp leaderboards? In Proceedings of the Association for Computational Linguistics.
+Candace Ross, Boris Katz, and Andrei Barbu. 2021. Measuring social biases in grounded vision and language embeddings. In *Conference of the North American Chapter of the Association for Computational Linguistics*, Online.
+Maarten Sap, Marcella Cindy Prasettio, Ari Holtzman, Hannah Rashkin, and Yejin Choi. 2017. Connotation frames of power and agency in modern films. In Proceedings of Empirical Methods in Natural Language Processing.
+Priyanka Sen and Amir Saffari. 2020. What do models learn from question answering datasets? In Proceedings of Empirical Methods in Natural Language Processing.
+Chenglei Si, Chen Zhao, and Jordan Boyd-Graber. 2021. What's in a name? answer equivalence for open-domain question answering. In *Emperial Methods in Natural Language Processing*.
+Gabriel Stanovsky, Noah A. Smith, and Luke Zettlemoyer. 2019. Evaluating gender bias in machine translation. In Proceedings of the Association for Computational Linguistics.
+Saku Sugawara, Kentaro Inui, Satoshi Sekine, and Akiko Aizawa. 2018. What makes reading comprehension questions easier? In Proceedings of Empirical Methods in Natural Language Processing.
+Wim J van der Linden and Ronald K Hambleton. 2013. Handbook of modern item response theory. Springer Science & Business Media.
+
+Eric Wallace, Pedro Rodriguez, Shi Feng, Ikuya Yamada, and Jordan Boyd-Graber. 2019. Trick me if you can: Human-in-the-loop generation of adversarial question answering examples. Transactions of the Association of Computational Linguistics, 10.
+Kellie Webster, Marta Recasens, Vera Axelrod, and Jason Baldridge. 2018. Mind the GAP: A balanced corpus of gendered ambiguous pronouns. Transactions of the Association for Computational Linguistics, 6:605-617.
+Dani Yogatama, Michael Heilman, Brendan O'Connor, Chris Dyer, Bryan R. Routledge, and Noah A. Smith. 2011. Predicting a scientific community's response to an article. In Proceedings of Empirical Methods in Natural Language Processing.
+Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2017. Men also like shopping: Reducing gender bias amplification using corpus-level constraints. In Proceedings of Empirical Methods in Natural Language Processing.
+Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2018. Gender bias in coreference resolution: Evaluation and debiasing methods. In Conference of the North American Chapter of the Association for Computational Linguistics.
+
+# Appendix
+
+# A Entity collapses of demographic values
+
+While mapping QA examples to person entities and values for their corresponding demographic characteristics (Section 2), we encountered many nearby values: 'Poet', 'Writer', 'Author'. We collapse such values into a single label which we use for further analysis. This section enlists all the collapses that we encounter for determining nationality of people (Appendix A.1) and their professions (Appendix A.2).
+
+# A.1 Entity-collapses for Nationality values
+
+US: kingdom of hawaii, united states, united states of america
+
+UK: commonwealth of england, great britain, kingdom of england, kingdom of mercia, kingdom of scotland, kingdom of wessex, united kingdom, united kingdom of great britain and ireland
+
+Albania: kingdom of albania
+
+Austria: austrian empire, federal state of austria, first republic of austria
+
+Cyprus: kingdom of cyprus, republic of cyprus, turkish republic of northern cyprus
+
+Denmark: kingdom of denmark
+
+France: kingdom of france
+
+Germany: german confederation, german democratic republic, german empire, german reich, germany, kingdom of hanover, kingdom of prussia, kingdom of saxony, nazi germany, north german confederation, prussia, republic of german-austria, west germany
+
+Greece: ancient greece, greece
+
+Hungary: hungary, kingdom of hungary, people's republic of hungary
+
+Ireland: irish republic, kingdom of ireland
+
+Italy: ancient rome, florence, holy roman empire, kingdom of italy, kingdom of sardinia
+
+Netherlands: dutch republic, kingdom of the netherlands
+
+Poland: kingdom of poland, poland
+
+Portugal: kingdom of portugal
+
+Romania: kingdom of romania, romania, socialist republic of romania
+
+Spain: crown of castile, kingdom of aragon, kingdom of castile, kingdom of navarre, spain
+
+Yugoslavia: federal republic of
+yugoslavia, kingdom of yugoslavia,
+socialist federal republic of yugoslavia,
+yugoslavia
+
+Iraq: ba'athist iraq, iraq, kingdom of iraq, mandatory iraq, republic of iraq (1958-68)
+
+Israel: israel, kingdom of israel, land of israel
+
+Russia: russia, russian empire, russiansoviet federative socialist republic,soviet union,tsardom of russia
+
+India: british raj, delhi sultanate, dominion of india, india
+
+China: china, people's republic of china, republic of china (1912-1949)
+
+Egypt: ancient egypt, egypt, kingdom of egypt, republic of egypt
+
+# A.2 Entity-collapses for Profession values
+
+Writing: author, biographer, cartoonist, children's writer, comedy writer, comics artist, comics writer, contributing editor, cookery writer, detective writer, diarist, editor, editorial columnist, essayist, fairy tales writer, grammarian, hymnwriter, journalist, lexicographer, librettist, linguist, literary, literary critic, literary editor, literary scholar, memoirist, newspaper editor, non-fiction writer, novelist, opinion journalist, philologist, photojournalist, physician writer, playwright, poet, poet lawyer, preface author, prosaist, religious writer, science fiction writer, science writer, scientific editor, screenwriter, short story writer, tragedy writer, travel writer, women letter writer, writer
+
+Sports: amateur wrestler, american football coach, american football player, archer, artistic gymnast, association football manager, association football player, association football referee, athlete, athletics competitor, australian rules football player, badminton player, ballet dancer, ballet master, ballet pedagogue, baseball player, basketball coach, basketball player, biathlete, biathlon coach, boxer, bridge player, canadian football player, chess player, choreographer, coach, cricketUMPire, cricketer, dancer, darts player, field hockey player, figure skater, figure skating choreographer, figure skating coach, formula one driver, gaelic football player, golfer, gridiron football player, gymnast, head coach, hurler, ice dancer, ice hockey coach, ice hockey player, jockey, judoka, lacrosse player, long-distance runner, marathon runner, marimba player, martial artist, middle-distance runner, mixed martial artist, motorcycle racer,
+
+poker player, polo player, pool player, professional wrestler, quidditch player, racing automobile driver, racing driver, rink hockey player, rugby league player, rugby player, rugby union coach, rugby union player, runner, short track speed skater, skateboarder, skeleton racer, snooker player, snowboarder, sport cyclist, sport shooter, sporting director, sports agent, sports commentator, sprinter, squash player, surfer, swimmer, table tennis player, taekwondo athlete, tennis coach, tennis player, thai boxer, track and field coach, viol player, volleyball player, water polo player
+
+Music: bass guitar, bassist, blues musician, child singer, classical composer, classical guitarist, classical pianist, collector of folk music, composer, conductor, country musician, drummer, film score composer, ghost singer, guitar maker, guitarist, heavy metal singer, instrument maker, instrumentalist, jazz guitarist, jazz musician, jazz singer, keyboardist, lyricist, multi-instrumentalist, music arranger, music artist, music critic, music director, music interpreter, music pedagogue, music pedagogy, music producer, music publisher, music theorist, music video director, musical, musical instrument maker, musician, musicologetist, opera composer, opera singer, optical instrument maker, organist, pianist, playback singer, professor of music composition, rapper, record producer, recording artist, rock drummer, rock musician, saxophonist, session musician, singer, singer-songwriter, songwriter, violinist
+
+# Fictional: fictionalaviator,
+
+fictional businessperson, fictional character, fictional cowboy, fictional domestic worker, fictional firefighter, fictional journalist, fictional mass murderer, fictional pirate, fictional police officer, fictional politician, fictional schoolteacher, fictional scientist, fictional seaman, fictional
+
+secretary, fictional soldier, fictional space traveller, fictional taxi driver, fictional vigilante, fictional waitperson, fictional writer
+
+Politics: activist, ambassador, animal rights advocate, anti-vaccine activist, civil rights advocate, civil servant, climate activist, colonial administrator, consort, dictator, diplomat, drag queen, duke, emperor, feminist, foreign minister, government agent, governor, human rights activist, internet activist, khan, king, leader, lgbt rights activist, military commander, military leader, military officer, military personnel, military theorist, minister, monarch, peace activist, political activist, political philosopher, political scientist, political theorist, politician, president, prince, princess, protestant reformer, queen, queen consort, queen regnant, religious leader, revolutionary, ruler, secretary, social reformer, socialite, tribal chief
+
+Artist: architect, artist, baker, blacksmith, car designer, chef, costume designer, design, designer, fashion designer, fashion photographer, fresco painter, furniture designer, game designer, glass artist, goldsmith, graffiti artist, graphic artist, graphic designer, house painter, illustrator, industrial designer, interior designer, jewellery designer, landscape architect, landscape painter, lighting designer, painter, photographer, postage stamp designer, printmaker, production designer, scientific illustrator, sculptor, sound designer, textile designer, type designer, typographer, visual artist
+
+Film/tv: actor, character actor, child actor, documentary filmmaker, dub actor, factory owner, fashion model, film actor, film critic, film director, film editor, film producer, filmmaker, glamour model, line producer, model, pornographic actor, reality television participant, runway model, television actor, television
+
+director, television editor, television presenter, television producer, voice actor
+
+Executive: bank manager, business executive, business magnate, businessperson, chief executive officer, entrepreneur, executive officer, executive producer, manager, real estate entrepreneur,talent manager
+
+Stage: circus performer, comedian, entertainer, mime artist, musical theatre actor, stage actor, stand-up comedian, theater director
+
+Law/crime: art thief, attorney at law, bank robber, canon law jurist, courtier, criminal, judge, jurist, lawyer, official, private investigator, robber, serial killer, spy, thief, war criminal
+
+History: anthropologist, archaeologist, art historian, church historian, classical archaeologist, egyptologist, explorer, historian, historian of classical antiquity, historian of mathematics, historian of science, historian of the modern age, labor historian, legal historian, literary historian, military historian, music historian, paleoanthropologist, paleontologist, philosophy historian, polar explorer, scientific explorer
+
+Science/tech: aerospace engineer, alchemist, anesthesiologist, artificial intelligence researcher, astrologer, astronaut, astronomer, astrophysicist, auto mechanic, bacteriologist, biochemist, biologist, botanist, bryologist, cardiologist, chemical engineer, chemist, chief engineer, civil engineer, climatologist, cognitive scientist, combat engineer, computer scientist, cosmologist, crystallographer, earth scientist, ecologist, educational psychologist, electrical engineer, engineer, environmental scientist, epidemiologist,
+
+ethnologist, ethologist, evolutionary biologist, geochemist, geographer, geologist, geophysicist, immunologist, industrial engineer, inventor, marine biologist, mathematician, mechanic, mechanical automaton engineer, mechanical engineer, meteorologist, microbiologist, mining engineer, naturalist, neurologist, neuroscientist, nuclear physicist, nurse, ontologist, ornithologist, patent inventor, pharmacologist, physician, physicist, physiologist, planetary scientist, psychiatrist, psychoanalyst, psychologist, railroad engineer, railway engineer, research assistant, researcher, scientist, social psychologist, social scientist, sociologist, software engineer, space scientist, statistician, structural engineer, theoretical biologist, theoretical physicist, virologist, zoologist
+
+Education: academic, adjunct professor, associate professor, educator, head teacher, high school teacher, history teacher, lady margaret's professor of divinity, pedagogue, professor, school teacher, sex educator, teacher, university teacher
+
+# Economics: economist
+
+Religion: anglican priest, bible translator, bishop, catholic priest, christian monk, lay theologian, monk, pastor, pope, preacher, priest, theologian
+
+Military: air force officer, aircraft pilot, commanding officer, fighter pilot, general officer, helicopter pilot, intelligence officer, naval officer, officer of the french navy, police officer, soldier, starship pilot, test pilot
+
+# Translation: translator
+
+Philosophy: analytic philosopher, philosopher, philosopher of language,
+
+philosopher of science
+
+Polymath: polymath
+
+# B Logistic Regression features.
+
+This section enlists a full set of features used for the logistic regression analysis after feature reduction, each with their coefficients, standard error, Wald Statistic and significance level in Table 5. We also describe the templates and the implementation details of the features using in our logistic regression analysis (Section 3.2) in Appendix B.1, and finally enlist some randomly sampled examples both from NQ and TriviaQA datasets in Appendix B.2 to show how multi_answers feature has disparate effects on them.
+
+# B.1 Implementation of Logistic Regression features
+
+- q_sim: For closed-domain QA tasks like NQ and SQuAD, this feature measures (sim)ilarity between (q)question text and evidence sentence—the sentence from the evidence passage which contains the answer text—using Jaccard similarity over unigram tokens (Sugawara et al., 2018). Since we do not include SQuAD in our logistic regression analysis (Section 3.2, this feature is only relevant for NQ.
+- e_train_count: This binary feature represents if distinct (e)ntities appearing in a QA example (through the approach described in Section 2) appears more than twice in the particular dataset's training fold. We avoid logarithm here as even the log frequency for some commonly occurring entities exceeds the expected feature value range.
+- t_wh*: This represents the features that captures the expected entity type of the answer: t_who, t_what, t.where, t_when. Each binary feature captures if the particular "wh*" word appears in the first ten (t) tokens of the question text.
+- multi Entities: For number of linked person-entities in a example as described in Section 2 as $n$ , this feature is $\log_2(n)$ . Hence, this feature is 0 for example with just single person entity.
+- multi_answers: For number of gold-answers annotated in a example as $n$ , this feature is
+
+$\log_2(n)$ . Hence, this feature is 0 for example with just answer.
+
+- g_*: Binary demographic feature signaling the presence of the (g)ender characterized by the feature. For instance, g_female signals if the question is about a female person.
+- o_*: Binary demographic feature signaling the presence of the occupation (or profession) as characterized by the feature. For instance, o Writer signals if the question is about a writer.
+
+# B.2 Examples with multi_answers feature
+
+In the Logistic Regression analysis (Section 3.2), we create two features: multi Answers and multi Entities. Former captures the presence of multiple gold answers to the question in a given example, while latter signals presence of multiple person entities — all in either the answers, the question text or the document title for a given example. While multi Entities has consistent negative co-relation with model correctness (Appendix B), multi Answers has a disparate effect. Though it signals towards incorrectly answered examples in NQ, it has a statistically significant positive correlation with model correctness for TriviaQA examples. Going through the examples, it reveals that TriviaQA uses multiple answers to give alternate formulations of an answer, which aids machine reading, while multiple NQ answers are often a sign of question ambiguity (Min et al., 2020).
+
+To demonstrate that, we enlist here examples from development fold of both NQ (Appendix B.2.1) and TriviaQA (Appendix B.2.2) that have multiple gold answers.
+
+# B.2.1 NQ examples with multiple answers:
+
+id: -4135209844918483842
+Q: who carried the us flag in the 2014 olympics
+A: Todd Lodwick
+A: Julie Chu
+id:8838716539218945006
+Q: who says that which we call a rose
+A: William Shakespeare
+A: Juliet
+id: -6197052503812142206
+Q: who has won the most superbowls as a player
+A: Charles Haley
+A:Tom Brady
+id: -2840415450119119129
+Q: who started the guinness book of world records
+A: Hugh Beaver
+A: Norris and Ross McWhirter
+id:6997422338613101186
+Q: who played the nurse on andy griffith show
+A: Langdon
+A: Julie Adams
+id: -7064677612340044331
+Q: who wrote the song if i were a boy
+A: BC Jean
+A: Toby Gad
+id:3248410603422198181
+Q: who conducted the opening concert at carnegie hall
+
+| Dataset | Features | Coef | SE | Wald (Wl) | \( \mathbb{P}_{Z\sim \mathcal{N}}(|Z| > |W|) \) |
| NQ | bias | +1.964 | 0.727 | 2.703 | 0.0069 |
| multi_answers | -1.893 | 0.438 | 4.327 | 0.0000 |
| o.not_found | -1.112 | 0.514 | 2.163 | 0.0305 |
| t_who | +0.773 | 0.280 | 2.764 | 0.0057 |
| o_law/crime | +0.729 | 0.738 | 0.989 | 0.3227 |
| o_science/tech | -0.715 | 0.390 | 1.832 | 0.0670 |
| t.where | -0.695 | 0.645 | 1.078 | 0.2811 |
| multi Entities | -0.678 | 0.342 | 1.979 | 0.0478 |
| t WHAT | +0.505 | 0.415 | 1.216 | 0.2240 |
| o stage | -0.444 | 0.607 | 0.732 | 0.4640 |
| Model Fit: | g_female | +0.427 | 0.489 | 0.873 | 0.3829 |
| o_executive | +0.425 | 0.684 | 0.622 | 0.5341 |
| q_sim | +0.406 | 0.210 | 1.934 | 0.0531 |
| e_train_count | +0.353 | 0.178 | 1.979 | 0.0479 |
| o_others | +0.346 | 0.443 | 0.781 | 0.4346 |
| o_music | +0.310 | 0.259 | 1.200 | 0.2302 |
| o_fictional | -0.256 | 0.445 | 0.576 | 0.5644 |
| o_politics | -0.197 | 0.304 | 0.646 | 0.5185 |
| o_film/tv | +0.142 | 0.226 | 0.629 | 0.5294 |
| t_when | -0.134 | 0.378 | 0.354 | 0.7233 |
| g_male | -0.126 | 0.508 | 0.249 | 0.8033 |
| QB | e_train_count | +1.922 | 0.269 | 7.144 | 0.0000 |
| bias | -1.024 | 0.291 | 3.516 | 0.0004 |
| o_film/tv | -0.910 | 0.470 | 1.934 | 0.0531 |
| multi Entities | -0.870 | 0.165 | 5.287 | 0.0000 |
| t WHAT | -0.734 | 0.457 | 1.605 | 0.1085 |
| oTranslation | +0.671 | 1.439 | 0.466 | 0.6412 |
| o_science/tech | -0.667 | 0.265 | 2.522 | 0.0117 |
| o_religion | -0.655 | 0.362 | 1.812 | 0.0700 |
| t.where | +0.545 | 0.615 | 0.885 | 0.3760 |
| Model Fit: | o_history | -0.484 | 0.436 | 1.109 | 0.2673 |
| o-writing | +0.402 | 0.189 | 2.128 | 0.0334 |
| o_not_found | -0.382 | 0.349 | 1.093 | 0.2744 |
| o_fictional | -0.368 | 0.540 | 0.681 | 0.4957 |
| t_who | +0.363 | 0.183 | 1.990 | 0.0466 |
| o_artist | +0.194 | 0.268 | 0.721 | 0.4709 |
| o_music | +0.123 | 0.249 | 0.492 | 0.6225 |
| o_politics | -0.113 | 0.202 | 0.560 | 0.5756 |
| o_philosophy | -0.082 | 0.259 | 0.315 | 0.7530 |
| TriviaQA | bias | -1.066 | 0.114 | 9.353 | 0.0000 |
| o_education | -0.665 | 0.534 | 1.245 | 0.2132 |
| o_economics | +0.503 | 0.579 | 0.869 | 0.3848 |
| o_philosophy | -0.469 | 0.342 | 1.370 | 0.1706 |
| oRELigion | -0.443 | 0.255 | 1.738 | 0.0822 |
| o_law/crime | +0.412 | 0.218 | 1.890 | 0.0588 |
| multi_answers | +0.341 | 0.024 | 14.090 | 0.0000 |
| t_who | +0.230 | 0.129 | 1.778 | 0.0754 |
| o_science/tech | +0.219 | 0.151 | 1.452 | 0.1466 |
| oStage | -0.212 | 0.257 | 0.824 | 0.4098 |
| o_politics | -0.208 | 0.095 | 2.177 | 0.0295 |
| Model Fit: | o书写 | +0.192 | 0.098 | 1.955 | 0.0506 |
| o_sports | -0.183 | 0.117 | 1.570 | 0.1164 |
| o_film/tv | +0.150 | 0.092 | 1.626 | 0.1039 |
| t_when | -0.146 | 0.299 | 0.488 | 0.6258 |
| o_not_found | -0.143 | 0.205 | 0.699 | 0.4845 |
| o_executive | -0.130 | 0.207 | 0.625 | 0.5323 |
| o_others | -0.101 | 0.152 | 0.665 | 0.5058 |
| multi Entities | -0.099 | 0.077 | 1.290 | 0.1971 |
| e_train_count | +0.081 | 0.075 | 1.079 | 0.2804 |
| o_music | +0.022 | 0.097 | 0.223 | 0.8237 |
| t什么事 | +0.018 | 0.134 | 0.132 | 0.8947 |
+
+Table 5: Influential features revealed through Logistic Regression Analysis (Sec 3.2) over the demographic characteristics deemed significant through the $\chi^2$ test (Figure 1). We report the highly influential features with significance of $p$ -value $< 0.1$ , both positive (blue) and negative (red), and **bold** the highly significant ones ( $p$ -value $< 0.05$ ). Number of $\star$ in the last column represents the significance level of that feature.
+
+| A: Walter Damrosch | A: George Harrison |
| A: Pyotr Ilyich Tchaikovsky | id: -5674327280636928690 |
| id: -3772952199709196386 | Q: who sings you're welcome in moana credits |
| Q: who founded amazon where is the headquarters of amazon | A: Lin - Manuel Miranda |
| A: founded by Jeff Bezos | A: Jordan Fisher |
| A: based in Seattle, Washington | id: -2432292250757146771 |
| id: 4053461415821443645 | Q: who wrote the song i hate you i love you |
| Q: who wrote song what a friend we have in jesus | A: Garrett Nash |
| A: Joseph M. Scriven | A: Olivia O'Brien |
| A: Charles Crozat Converse | id: -3632974700795137148 |
| id: -5670674709553776773 | Q: who is the owner of reading football club |
| Q: who sings the theme song for the proud family | A: Xiu Li Dai |
| A: Solange Knowles | A: Yongge Dai |
| A: Solange Knowles | id: 7163132803738849961 |
| id: 2978779480736570480 | Q: who played guitar on my guitar gently weeps |
| Q: days of our lives cast doug and julie | A: Eric Clapton |
| A: Bill Hayes | A: George Harrison |
| A: Susan Seaforth | id: 1318031841813121387 |
| id: 6173192803639008655 | Q: who sang the theme song to that 70s show |
| Q: who has appeared in the most royal rumbles | A: Todd Griffin |
| A: Isaac Yankem / “Diesel”/ Kane | A: Cheap Trick |
| A: Shawn Michaels | id: 1393634180793653648 |
| id: 7561389892504775773 | Q: who came up with the initial concept of protons and neutrons |
| Q: who wrote the song stop the world and let me off | A: Werner Heisenberg |
| A: Carl Belew | A: Dmitri Ivanenko |
| A: W.S. Stevenson | id: 9134704289334516617 |
| id: -8366545547296627039 | Q: who missed the plane the day the music died |
| Q: who wrote the song photograph by ringo starr | A: Waylon Jennings |
| A: Ringo Starr | A: Tommy Allsup |
+
+# id:8466196474705624263
+
+Q: who was running as vice president in 1984
+
+A: Congresswoman Ferraro
+
+A: Vice President George H.W. Bush
+
+# id:5579013873387598720
+
+Q: who has won the canada open women's doubles
+
+A: Mayu Matsumoto
+
+A: Wakana Nagahara
+
+id:5584540254904933863
+
+Q: who sang what are we doing in love
+
+A: Dottie West
+
+A: Kenny Rogers
+
+# id: -8677459248394445003
+
+Q: who is hosting e live from the red carpet
+
+A: Ryan Seacrest
+
+A: Giuliana Rancic
+
+id: -1342189058950802702
+
+Q: who made the poppies at tower of London
+
+A: Paul Cummins
+
+A: Tom Piper
+
+# id:6014950976264156000
+
+Q: who sang never gonna let you go
+
+A: Joe Pizzulo
+
+A: Leeza Miller
+
+# id: -8052136860650205450
+
+Q: who wrote the song rainy days and mondays
+
+A: Roger Nichols
+
+A: Paul Williams
+
+# id:7903911150166287814
+
+Q: what position did doug peterson play in the nfl
+
+A: quarterly
+
+A: holder on placekicks
+
+id:583026970021621830
+
+Q: who invented the first home video security system
+
+A: Marie Van Brittan Brown
+
+A: her husband Albert Brown
+
+# id:5427679691711111925
+
+Q: who were the two mathematicians that invented calculus
+
+A: Isaac Newton
+
+A: Gottfried Leibniz
+
+# id: -9163844183450408581
+
+Q: nba record for most double doubles in a season
+
+A: Tim Duncan leads the National Basketball Association ( NBA ) in the points - rebounds
+
+combination with 840
+
+A: John Stockton leads the points - assists combination with 714
+
+# id: -8109367537690343895
+
+Q: who were the twins that played for kentucky
+
+A: Andrew Michael Harrison
+
+A: Aaron Harrison
+
+# id:4784420206031467202
+
+Q: who wrote he ain't heavy he's my brother lyrics
+
+A: Bobby Scott
+
+A: Bob Russell
+
+# id: 4136958282795887427
+
+Q: who opens the church of the holy sepulchre
+
+A: the Nusaybah family
+
+A: the Joudeh Al - Goudia family
+
+# id: -2610209560699528896
+
+Q: who is the writer of 50 shades of grey?
+
+A: Erika Mitchell Leonard
+
+A:E.L.James
+
+# id:8968036245733884389
+
+Q: when did stephen curry won the mvp award
+
+A:2015
+
+A:2015
+
+# id: -1899514742808499173
+
+Q: who are nominated for president of india 2017
+
+A: Ram Nath Kovind
+
+A: Meira Kumar
+
+# id: -3019484115332998709
+
+Q: what movie is count on me by bruno mars in
+
+A: A Turtle's Tale: Sammy's Adventures
+
+# A: Diary of a Wimpy Kid : The Long Haul
+
+# id:810060125994185205
+
+Q: who was the first to say i'm going to disney world?
+
+A: Dick Rutan
+
+A: Jeana Yeager
+
+# id:339027965927992295
+
+Q: who sings the whiskey ain't workin anymore
+
+A: Travis Tritt
+
+A: Marty Stuart
+
+# id:5995814638252489040
+
+Q: who played scotty baldwins father on general hospital
+
+A: Peter Hansen
+
+A: Ross Elliott
+
+# id:3723628014502752965
+
+Q: who wrote cant get you out of my head lyrics
+
+A: Cathy Dennis
+
+A: Rob Davis
+
+# id:3886074985605209321
+
+Q: who sings find out who your friends are with tracy lawrence
+
+A: Tim McGraw
+
+A:Kenny Chesney
+
+# id:3624266518328727040
+
+Q: who invented the printing press and what year
+
+A: Johannes Gutenberg
+
+A: circa 1439
+
+# id: -4951004239400083779
+
+Q: who plays chris grandy in 13 going on 30
+
+A:Jim Gaffigan
+
+A: Alex Black
+
+# id:2672721743911117185
+
+Q: who developed a set of postulates to prove that specific microorganisms cause disease
+
+A: Robert Koch
+
+A: Friedrich Loeffler
+
+# id:2166092801797515500
+
+Q: who is the director of taarak mehta ka ooltah chashmah
+
+A: Harshad Joshi
+
+A:Malay Suresh Rajda
+
+# id: -3389723371168293793
+
+Q: who has the most olympic medals in figure skating
+
+A: Tessa Virtue
+
+A: Scott Moir
+
+# id: -8391680223788694572
+
+Q: who wrote if i were a boy reba or beyonce
+
+A: BC Jean
+
+A: Toby Gad
+
+# id:1070572237499172286
+
+Q: who wrote the song after you've gone
+
+A: Turner Layton
+
+A: Henry Creamer
+
+# id:2343902375984110832
+
+Q: who does the voice of mickey mouse on mickey mouse clubhouse
+
+A: Wayne Allwine
+
+A:Bret Iwan
+
+# id:7013863939803495694
+
+Q: who sings love me tender in princess diaries 2
+
+A: Norah Jones
+
+A: Adam Levy
+
+# id:4925057086725798331
+
+Q: who wrote yakkity yak don't talk back
+
+A: Jerry Leiber
+
+A: Mike Stoller
+
+# id:647605647914971565
+
+Q: who wrote lyrics for phantom of the opera
+
+A: Charles Hart
+
+A: Richard Stilgoe
+
+# id:-6371603500131574271
+
+Q: who sings somebody's watching me with michael jackson
+
+A: Rockwell
+
+A: Jermaine Jackson
+
+# id: -4036503601399675973
+
+Q: when did michael jordan return to the nba?
+
+A:1995
+
+A:2001
+
+# id:4323871331649279373
+
+Q: who invented the printing press and in what year
+
+A: Johannes Gutenberg
+
+A:1440
+
+# id:7234277123646852447
+
+Q: who sings war don't let me down
+
+A: American production duo The Chainsmokers
+
+# A: vocals of American singer Daya
+
+id:4245798066923223457
+
+Q: who has the most all star mvp awards
+
+A: Bob Pettit
+
+A: Kobe Bryant
+
+# id: -3585157729928173881
+
+Q: who plays hulk in the thor and avengers series of movies
+
+A: Fred Tatasciore
+
+A: Rick D. Wasserman
+
+# id: -7892904540301629325
+
+Q: who wrote the song going to kansas city
+
+A: Jerry Leiber
+
+A: Mike Stoller
+
+# id:1838851770314085590
+
+Q: who plays sheila carter on the bold and the beautiful
+
+A:Kimberlin Brown
+
+A: Michelle Stafford
+
+# B.2.2 TriviaQA multi-answer examples:
+
+We randomly sample 100 examples from TriviaQA where questions had multiple answers.
+
+id: sfq_6110
+
+Q: On which island in the North Sea did both St Aidan and St Cuthbert live?
+
+A: Lindisfarne
+
+# A: LINDISFARNE
+
+id:tc 1008
+
+Q: To the nearest two, how many tennis Grand Slam titles did Jimmy Connors win?
+
+A:10
+
+A:ten
+
+# id: sfq_26211
+
+Q: In the TV series Doctor Who, who was the creator of the Daleks and arch enemy of the
+
+Doctor?
+
+A:Davros
+
+# A: Creator of the Daleks
+
+# id: sfq_22212
+
+Q: In which book of the bible is the story of Samson and Delilah?
+
+A: Judge (disambiguation)
+
+A:Judges
+
+# id:bt 1538
+
+Q: What is cartoon character Mr. Magoo's first name
+
+A: Quincy (disambiguation)
+
+A: Quincy
+
+# id: qz_2444
+
+Q: What is Robin Williams character called in Good Morning Vietnam?
+
+A: Adrian
+
+id: sfq 22693
+
+Q: What was the first name of the jazz trombonist Kid Ory?
+
+A: Eadweard
+
+A: Edward
+
+id:qw 1606
+
+Q: Which of Queen Elizabeth's children is the lowest in succession to (i.e. furthest away from) the throne?
+
+A: Anne
+
+A:Ann(name)
+
+id: odql 5503
+
+Q: "Which radio comedian's catchphrase was ""daft as a brush""?"
+
+A: KEN PLATT
+
+A: Ken Platt
+
+id:aa2993
+
+Q: According to Sammy Haggar, what can't he drive?
+
+A:55
+
+A: fifty-five
+
+id:af 3440
+
+Q: What was Grace Darling's father's job?
+
+A: Lighthouse-keeper
+
+A: Lighthouse keeper
+
+id:qw_12369
+
+Q: "What year did Jean-Francois Champollion publish the first correct translation of Egyptian hieroglyphs from the Rosetta Stone, the Roman Catholic Church take Galileo Galilei's "Dialogue" off their list of banned books, and Britain repeal the death penalty for over 100 crimes?"
+
+A: one thousand, eight hundred and twenty-two
+
+A:1822
+
+id:qw_4143
+
+Q: What is the title of the most famous painting by Franz Hals?
+
+A: Laughing Cavalier
+
+A: The Laughing Cavalier
+
+id: qb 2647
+
+Q: What is the title of the 1944 film starring Barbara Stanwyck as the wife who seduces an insurance salesman into killing her husband?
+
+A: Double indemnity (disambiguation)
+
+A: Double Indemnity
+
+id: sfq_22920
+
+Q: Who was the choreographer of the dance troupe Hot Gossip?
+
+A: Arlene Philips
+
+A: Arlene Phillips
+
+id:tc_719
+
+Q: River Phoenix died during the making of which movie?
+
+A: Dark Blood (film)
+
+A: Dark Blood
+
+id: sfq_1945
+
+Q: Who won the first ever boxing gold for women? She shares her surname with two US Presidents.
+
+A: Nicola Adams
+
+A:Adams,Nicola
+
+id: sfq 8996
+
+Q: Actor Norman Painting died in November 2009, which part in a log running radio series did he make his own?
+
+A:PHIL ARCHER
+
+A: Phil Archer
+
+id: dpql 6111
+
+Q: Which Jersey-born actor played Superman in Man of Steel?
+
+A: Henry Cavill
+
+A: Henry William Dalgliesh Cavill
+
+id: qz_2135
+
+Q: Name the game show, presented by Leslie Grantham and Melinda Messenger, where contestants were set physical and mental challenges?
+
+A: Fort Boyard (disambiguation)
+
+A:FortBoyard
+
+id: odql_3205
+
+Q: Who wrote the novel 'The Beach' on which the film was based?
+
+A: Alex Garland
+
+A: ALEX GARLAND
+
+id: qz 2999
+
+Q: In what year did Edward Vlll abdicate?
+
+A: one thousand, nine hundred and thirty-six
+
+A:1936
+
+id:tc_723
+
+Q: Which artist David was born in Bradford UK?
+
+A: Hockney
+
+A:David Hockney
+
+id:odql_3708
+
+Q: Three Liverpool players were in the 1966 England World Cup winning squad. Roger Hunt and Ian Callaghan were two - who was the third?
+
+A: Gerry Byrne
+
+A: Gerry Byrne (disambiguation)
+
+id:qw_11151
+
+Q: Which artist has a daughter and two sons with Jane Asher, whom he married in 1981?
+
+A: Gerald Anthony Scarfe
+
+A:Gerald Scarfe
+
+id:gb 3652
+
+Q: Who wrote the novel 'The Eagle Has landed'?
+
+A: Harry Patterson
+
+A:Jack Higgins
+
+id: odq1_14683
+
+Q: Who presents the BBC quiz show 'Perfection'?
+
+A: Nick Knowles
+
+A: NICK KNOWLES
+
+id: sfq 9464
+
+Q: Who succeeded Brian Epstein as manager of The Beatles?
+
+A: Allan Klein
+
+A:Allen Klein
+
+id:wh 2615
+
+Q: In which year did both T-Rex's Marc Bolan and Elvis Presley die?
+
+A:1977
+
+A: one thousand, nine hundred and seventy-seven
+
+id: sfq_9018
+
+Q: Who played Hot lips Houlihan in the 1972 film MASH?
+
+A: Sally Kellerman
+
+A: SALLY KELLERMAN
+
+id: qz_1516
+
+Q: Who bought Chelsea football club for £1 in 1982?
+
+A: Ken Bates
+
+A: Kenneth Bates
+
+id: sfq_23289
+
+Q: What was the middle name of the author William Thackeray?
+
+A:Makepeace
+
+A:MAKEPACE
+
+id: sfq_7589
+
+Q: What was the name of the older brother of Henry 8th?
+
+A:Arthur
+
+A: Arthur (name)
+
+id: odql 1031c
+
+Q: Which actor played 'Hadley', in the TV series of the same name?
+
+A: GERALD HARPER
+
+A: Gerald Harper
+
+id: sfq_12933
+
+Q: Operation Barbarossa, Hitler invades Russia.
+
+A: one thousand, nine hundred and forty-one
+
+A:1941
+
+id:qw_5050
+
+Q: "Which Italian Nobel prize winner (1934) wrote novels such as ""Mal Gioconda"" and
+
+switched to writing plays in 1910?'
+
+A: Pirandello
+
+A: Luigi Pirandello
+
+id:bt_2403
+
+Q: What was the name of the driver of the mail train robbed by the great train robbers
+
+A: Jack Mills (train driver)
+
+A:Jack Mills
+
+id: sfq_2189
+
+Q: What was the name of the private eye played by Trevor Eve on TV in the '70s?
+
+A: Shoestring (TV series)
+
+A: Eddie Shoestring
+
+id: QB_5431
+
+Q: Brazilian football legend Pele wore which number on his shirt?
+
+A:10
+
+A:ter
+
+id: QB_4726
+
+Q: Michael J Fox travels back to which year in the Wild West in the 1990 film 'Back To The Future Part III'?
+
+A: one thousand, eight hundred and eighty-five
+
+A:1885
+
+id: odq1_8275
+
+Q: Later a 'Blue Peter' presenter, who played 'Steven Taylor', an assistant to William Hartnell's 'Doctor Who'?
+
+A: PETER PURVES
+
+A:Peter Purves
+
+id: sfq_962
+
+Q: Which city was the subject of the 1949 song 'Dirty Old Town' by Ewan McColl?
+
+A: Salford
+
+A: Salford (disambiguation)
+
+id:tc 1348
+
+Q: In the late 60s Owen Finlay MacLaren pioneered what useful item for parents of small children?
+
+A: Baby Buggy
+
+A: Baby buggy
+
+id:qw_12732
+
+Q: General Franco, the Spanish military general, was head of state of Spain from October 1936 following the Spanish Civil War; until when?
+
+A:1975
+
+A: one thousand, nine hundred and seventy-five
+
+id:bt_4495
+
+Q: Which of the Great Train Robbers became a florist outside Waterloo station until he was found hanged in a lock up
+
+A: Buster Edwards
+
+A: Ronald $\% 22$ Buster\%22 Edwards
+
+id: sfq_20394
+
+Q: Which TV presenter, who died in February 2013, was for over 20 years the host of 'Mr &
+
+Mrs'?
+
+A:Derek Batey
+
+A:Derek Beatty
+
+id: odq1_12918
+
+Q: Which British political party leader is MP for Westmorland and Lonsdale?
+
+A: Tim Farron
+
+A: Timothy Farron
+
+id: odq1_13785
+
+Q: Who wrote the lyrics for 'Sing', written to celebrate the Queen's Diamond Jubilee?
+
+A:Gary Barlow
+
+A: GARY BARLOW
+
+id: sfq_20830
+
+Q: Which top National Hunt trainer's establishment is based at Seven Barrows?
+
+A:NICKY HENDERSON
+
+A: Nicky Henderson
+
+id:wh 2133
+
+Q: Which T.V. Quiz show host used the catchphrase :- If its' up there, I'll give you the money myself ?
+
+A:LES DENNIS
+
+A: Les Dennis
+
+# id: sfq_15663
+
+Q: The 27 episodes of which sitcom featuring Julia Mckenzie, Anton Rodgers and Ballard Berkley were first broadcast in the 1980s?
+
+A: Fresh Fields (TV series)
+
+A: Fresh Fields
+
+id: odql 4871
+
+Q: When US President James Garfield was shot in Washington DC in July 1881, what was he doing?
+
+A: WAITING FOR A TRAIN
+
+A: Waiting for a Train
+
+id: bb_6592
+
+O: Which artist was born in Bradford in 1937?
+
+A: Hockney
+
+A: David Hockney
+
+id: qw 10270
+
+Q: Argentina invaded UK's Falkland Islands, Israel invaded Southern Lebanon, Canada became officially independent of the UK, Leonid Brezhnev, leader of the USSR, died, all in what year?
+
+A: one thousand, nine hundred and eighty-two
+
+A:1982
+
+id:bt 4206
+
+Q: Who was the first woman to be seen on Channel 4
+
+A: Carol Vorderman
+
+A: Carol Voderman
+
+id:qw 8871
+
+Q: Lieutenant General James Thomas Brudenell, who commanded the Light Brigade of the British Army during the Crimean War, was the 7th Earl of what?
+
+A: Cardigan
+
+A: Cardigan (disambiguation)
+
+id: sfq 13639
+
+Q: Which model village did Samuel Greg build to house workers at his nearby Quarry Bank Mill?
+
+A:Styal
+
+A:STYLAL
+
+id:tc812
+
+Q: Who was the defending champion when Martina Navratilova first won Wimbledon singles?
+
+A: Virginia Wade
+
+A: Sarah Virginia Wade
+
+id:sfg 11790
+
+Q: Opened in 1963, which London nightclub did Mark Birley name after his then wife?
+
+A:Annabel's
+
+A: ANNABELS
+
+id:cw.8397
+
+Q: In 1995, Steffi Graf became the only tennis player to have won each of the four grand slam events how many times?
+
+A: four
+
+A:4
+
+id: dpql_3151
+
+Q: On which river does Ipswich stand?
+
+A:Orwell (disambiguation)
+
+A:Orwell
+
+id:qw_14634
+
+Q: "Which Bob Dylan song begins "'You got a lotta nerveTo say you are my friend. When I was down, You just stood there grinning''
+
+A: Positively Fourth Street
+
+A: Positively 4th Street
+
+id: dpql_1801
+
+Q: Nick Bega was lead singer with which 80's pop band?
+
+A: Kaja Googoo
+
+A: Kajagoogoo
+
+id:qw 16011
+
+Q: In 1483, who was appointed the first grand inquisitor of the Spanish Inquisition?
+
+A: Torquemada (disambiguation)
+
+A: Torquemada
+
+id:qw 1933
+
+Q: What remake of a British science-fiction serial broadcast by BBC Television in the summer of 1953 was staged live by BBC Four in 2005 with actors Jason Flemyng, Mark Gatiss, Andrew Tiernan, Indira Varma, David Tennant and Adrian Bower?
+
+A: Quatermass experiment
+
+A: The Quatermass Experiment
+
+id: odal 2323
+
+Q: Which 2009 film is a biopic of John Lennon?
+
+A: 'NOWHERE BOY'
+
+A: Nowhere Boy
+
+id:bb 522
+
+Q: 'The Battle of Trafalgar' is the work of which British painter?
+
+A: Joseph Turner
+
+A: Joseph Turner (disambiguation)
+
+id:qw_4463
+
+Q: Who discovered the two moons of Mars in 1877?
+
+A: Asaph Hall
+
+A: Asaph Hall III
+
+id: qz 1111
+
+Q: Which brand of beer does Homer Simpson drink regularly?
+
+A:Duff
+
+A: Duff (disambiguation)
+
+id:wh8
+
+Q: In the novel 'Treasure Island' name the pirate shot dead by Jim Hawkins in the rigging of the Hispaniola
+
+A: Israel Hands
+
+A: ISRAEL HANDS
+
+id: qg_3884
+
+Q: Dow Constantine and Susan Hutchinson are currently running for was position?
+
+A: King County executive
+
+A: King County Executive
+
+id:sfg 25940
+
+Q: Which actor played the part of Ross Poldark in the BBC's mid 1970's television series?
+
+A: Robin Ellis
+
+A:ROBIN ELLIS
+
+id: odql 12777
+
+Q: For which 1960 film did Billy Wilder become the first person to win three Oscar for the same film?
+
+A: The Apartment
+
+A: The apartment
+
+id: bb 4540
+
+Q: Famous for 'Die Welt als Wille und Vorstellung', Arthur Schopenhauer (1788-1860) was a German?
+
+A:Philosophers
+
+A:Philosopher
+
+id:gb_8589
+
+Q: What is the nickname of the frontiersman Nathaniel Poe, played by Daniel Day Lewis, in the 1992, film 'The Last of the Mohicans'?
+
+A: Hawkeye
+
+A: Hawkeye (disambiguation)
+
+id:bt 2852
+
+Q: Who played the part of Tina Seabrook in Casualty
+
+A: Claire Woodrow
+
+A: Claire Goose
+
+id:wh 557
+
+Q: Who duetted with Syd Owen on the single Better Believe It, which was released as part of the Children in Need appeal in 1995?
+
+A: PATSY PALMER
+
+A: Patsy Palmer
+
+id: odal 3979
+
+Q: What is the name of the character played by Nicole Kidman in the film 'Moulin Rouge'?
+
+A: Satine
+
+A: 'SATINE'
+
+id: odq1 10365
+
+O: Which British girl won the Women's Junior Singles title at Wimbledon this year (2008)?
+
+A: LAURA ROBSON
+
+A: Laura Robson
+
+id: qf_1735
+
+Q: In what year did Elvis Presley and his parents move from Tupelo to Memphis?
+
+A: one thousand, nine hundred and forty-eight
+
+A:1948
+
+id:tc_1468
+
+Q: What was Pete Sampras seeded when he won his first US Open?
+
+A: twelve
+
+A:12
+
+id:qf_2679
+
+Q: Who on TV has played a scarecrow and a Time Lord?
+
+A: John Pertwee
+
+A:Jon Pertwee
+
+id: sfq 11844
+
+Q: In which year was Olaf Palme assassinated and the Chernobyl nuclear power station exploded?
+
+A:1986
+
+A: one thousand, nine hundred and eighty-six
+
+id: qf 3578
+
+Q: Cassandra was the pseudonym of which writer in the Daily Mirror?
+
+A: William Neil Connor
+
+A: William Connor
+
+id: qz_3898
+
+Q: How many times did Steffi Graf win the Ladies Singles at Wimbledon?
+
+A: seven
+
+A:7
+
+id:qw_6782
+
+Q: What is the disease that Stephen Hawking has?
+
+A: Motor neuron disease
+
+A: Motor neuron diseases
+
+id:qw_15255
+
+Q: "How many films were made by director Sir Peter Jackson from Tolkien's short book. "The Hobbit""2"
+
+A:3
+
+A:three
+
+id: sfq_7168
+
+Q: Who invented the wind-up radio?
+
+A:Trevor Bayliss
+
+A: TREVOR BAYLISS
+
+id: sfg
+
+Q: In Pride and Prejudice what was the first name of Mr Darcy?
+
+A: Fitzwilliam (disambiguation)
+
+A: Fitzwilliam
+
+id: odql 8230
+
+Q: Which single by 'Leapy Lee' reached number two in the UK charts in 1968?
+
+A: 'LITTLE ARROWS'
+
+A: Little Arrows
+
+id: dpql 1416
+
+Q: Whose is the first tale in Chaucer's Canterbury Tales?
+
+A: The Knight
+
+A:Knight (disambiguation)
+
+id:qw_1672
+
+Q: Which womens squash player won the World Open four times (1985, 1987, 1990 & 1992)
+
+and the British Open eight times?
+
+A: Susan Devoy
+
+A: Susan Elizabeth Anne Devoy
+
+id: qz_832
+
+Q: Who wrote the novels About A Boy, How To Be Good and High Fidelity?
+
+A: Nick Hornby
+
+A: Hornby, Nick
+
+id: sfq_22884
+
+Q: Which TV series was about a pop group called 'Little Ladies' featuring Charlotte Cornwell, Julie Covington and Rula Lenska?
+
+A: Rock Follies
+
+A: Rock Follies of '77
+
+id: odql_10746
+Q: Who wrote the 1951 novel 'The Caine Mutiny'?
+A:HERMAN WOUK
+A: Herman Wouk
+id: bb 285
+Q: Said to refer erroneously to the temperature at which book paper catches fire, the title of Ray Bradbury's 1953 novel about a futuristic society in which reading books is illegal, is called 'Fahrenheit...' what? 972; 451; 100; or 25?
+A:451
+A: four hundred and fifty-one
+id: odql_7290
+Q: Who was the driver of the limousine at the time of Diana Princess of Wales' death?
+A: HENRI PAUL
+A: Henri Paul
+id: sfq_4368
+Q: Which island in the Grenadines of St. Vincent was bought by Colin Tennant in 1958? Princess Margaret built a holiday home there in the 1960's.
+A: MUSTIQUE
+A: Mustique
+id: odql 5476
+Q: Which pop star had the real name of Ernest Evans?
+A:Chubby Checker
+A:CHUBBYCHECKER
+id:tc 980
+Q: "Which supermodel said, "'I look very scary in the mornings?"
+A: We don't wake up for less than $10,000 a day
+A: Linda Evangelista
\ No newline at end of file
diff --git a/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/images.zip b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..3c80a6ebdb1f8ef8e0c391257d3c1aa759bfe713
--- /dev/null
+++ b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:72e06b1b0ce0637676909cdf11ac4f39ce5f8670101930be0385d8af02ddcda4
+size 547779
diff --git a/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/layout.json b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..6708e257d5337040311b6b7bfa14d74edfea52c4
--- /dev/null
+++ b/towarddeconfoundingtheeffectofentitydemographicsforquestionansweringaccuracy/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3d6a3b28a7dcff9c7d2cc59bd11a7334fa5f6ba3650a18fce451bce70baadd6d
+size 1072256
diff --git a/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/7caa6078-5c9a-4d5e-8222-b0f39872e217_content_list.json b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/7caa6078-5c9a-4d5e-8222-b0f39872e217_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..d6b378a991a6080642c62731ca9ca4f6d647b4fa
--- /dev/null
+++ b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/7caa6078-5c9a-4d5e-8222-b0f39872e217_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a96ddfd4f9b77967d828d73f6e2d6507f897146fdba48df65858c95a773939a1
+size 200100
diff --git a/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/7caa6078-5c9a-4d5e-8222-b0f39872e217_model.json b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/7caa6078-5c9a-4d5e-8222-b0f39872e217_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..2b25c65c1e6c9824905f0f577f87c227fdc04dd9
--- /dev/null
+++ b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/7caa6078-5c9a-4d5e-8222-b0f39872e217_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:50f475aaf121985cd831d046d925161714dbb5f68ba60d7fa77b4c95c7481241
+size 231602
diff --git a/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/7caa6078-5c9a-4d5e-8222-b0f39872e217_origin.pdf b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/7caa6078-5c9a-4d5e-8222-b0f39872e217_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..352e9b14fcba5ab570cf1d5fa20162abf2648313
--- /dev/null
+++ b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/7caa6078-5c9a-4d5e-8222-b0f39872e217_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:72b2a0bead0fc8b582855a6fc006637f71561a47248920e15f9d0c38bc36d83a
+size 5669875
diff --git a/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/full.md b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..624bf41ab2b51e01c4b5a62188ff51315bb4401c
--- /dev/null
+++ b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/full.md
@@ -0,0 +1,933 @@
+# Towards Automatic Evaluation of Dialog Systems: A Model-Free Off-Policy Evaluation Approach
+
+Haoming Jiang\*1,2, Bo Dai3, Mengjiao Yang3, Tuo Zhao2, Wei Wei4
+
+$^{1}$ Amazon.com Inc, CA, USA $^{2}$ Georgia Institute of Technology, GA, USA
+
+3Google Brain, CA, USA 4Google Cloud AI, CA, USA
+
+{jiangm,tourzhao}@gatech.edu
+
+{bodai,sherry,wewei}@google.com
+
+# Abstract
+
+Reliable automatic evaluation of dialogue systems under an interactive environment has long been overdue. An ideal environment for evaluating dialog systems, also known as the Turing test, needs to involve human interaction, which is usually not affordable for large scale experiments. Though researchers have attempted to use metrics for language generation tasks (e.g., perplexity, BLEU) or some model-based reinforcement learning methods (e.g., self-play evaluation) for automatic evaluation, these methods only show very weak correlation with the actual human evaluation in practice. To bridge such a gap, we propose a new framework named ENIGMA for estimating human evaluation scores based on recent advances of off-policy evaluation in reinforcement learning. ENIGMA only requires a handful of pre-collected experience data, and therefore does not involve human interaction with the target policy during the evaluation, making automatic evaluations feasible. More importantly, ENIGMA is model-free and agnostic to the behavior policies for collecting the experience data (see details in Section 2), which significantly alleviates the technical difficulties of modeling complex dialogue environments and human behaviors. Our experiments show that ENIGMA significantly outperforms existing methods in terms of correlation with human evaluation scores.
+
+# 1 Introduction
+
+One of the fundamental research bottlenecks for developing dialog systems falls in evaluation, namely how to measure the performance of these systems in an automatic and scalable manner. Different from supervised natural language understanding tasks (e.g., text classification and machine translation), an ideal environment for evaluating dialog systems, also known as the Turing test, involves multi-turn human interaction (Turing, 1950; Liu
+
+et al., 2016; Ghandeharioun et al., 2019; See et al., 2019). While online platforms such as Amazon Mechanical Turk can provide human-based evaluation, they are often expensive and not scalable.
+
+Researchers have adopted language quality metrics for single-turn response generation given a fixed context (e.g., BLEU score and perplexity) to implement automatic dialog systems evaluation (DeVault et al., 2011; Xiang et al., 2014; Higashinaka et al., 2014; Gandhe and Traum, 2016; Lowe et al., 2017). However, these metrics only weakly correlate to human evaluation in practice (Liu et al., 2016; Ghandeharioun et al., 2019). One cause of such weak correlation is that language quality metrics rely on the exact match between generated text and ground-truth, which generally do not fully overlap. While certain embedding-based metrics have been developed to combat this lack of coverage (Mitchell and Lapata, 2008; Dziri et al., 2019), they are only post-hoc judgments based on static experience data, and does not necessarily reflect the dynamic quality of multi-turn interactive dialog well (Ghandeharioun et al., 2019). Moreover, evaluation of goal-oriented dialog systems should be based on how well dialog systems collect information from users and whether the goal is completed; language quality metrics are thus unable to meet these requirements.
+
+To overcome the limitations of the aforementioned static evaluation methods, another line of work has proposed to model the interactive process of a conversation as a Markov decision process (MDP) (Möller et al., 2006; Li et al., 2016; Yu et al., 2016; Shah et al., 2018; Jaques et al., 2019). Accordingly, automatic evaluation of dialog systems can be formulated as an off-policy evaluation (OPE) problem, where a human subject is the so-called "environment" in the reinforcement learning (RL) literature. For instance, Wei et al. (2018) propose a model-based approach for goal-oriented dialog systems. They first learn an envi
+
+ronment/human model from the experience data consisting of human response, and then evaluate a dialog agent/policy by executing the policy within the learned environment. This procedure is known as "self-play evaluation". Such a model-based approach requires an accurate estimation of an environment/human. However, both the input and output of the environment are in a combinatorially large space, i.e., the trained model needs to be able to mimic complex human behavior of generating meaningful sentences from huge vocabulary. Unfortunately, such a requirement is far beyond the current capability of model-based RL algorithms. As a result, evaluations that require accurate modeling of the environment are often unreliable. A similar model-based approach is proposed (Ghandeharioun et al., 2019) to evaluate open-domain chit-chat dialog systems. In addition to modeling human behavior, they also model the reward function (for mimicking the complex mechanism behind human ratings) based on handcrafted features, which makes evaluation even more unreliable.
+
+In this paper, we propose a general OPE framework named ENIGMA (EvaluatiNg dIaloG sysEms Automatically) for estimating human evaluation score (i.e., how a human would rate a dialog system). Different from the existing model-based approaches, which rely on complex modeling of human behavior given combinatorially large vocabulary, ENIGMA takes advantage of recent advances in model-free OPE and avoids direct modeling of dynamic transitions and reward functions in a complex environment. Moreover, ENIGMA overcomes several limitations of existing OPE methods in order to evaluate dialog systems: (I) Existing OPE methods only apply to infinite or fixed horizon settings (where horizon length corresponds to number of turns in a conversation), while conversations, on the other hand, often have varying horizon lengths; (II) Existing OPE methods require experience data to sufficiently cover states and actions a target policy might visit. Due to limited experience data and the combinatorial nature of languages, such a requirement can hardly be satisfied in dialog evaluation; (III) Certain OPE methods rely on accurate estimation of the behavior policies used to collect the experience data. Unfortunately, such behavior policies are humans or complex dialog systems, and estimating their probabilistic model is a challenging imitation learning problem.
+
+To address (I), we propose a pseudo state padding method, which augments each conversation into infinitely many turns while preserving the original policy value; to address (II), we leverage pre-trained language models (Devlin et al., 2018), which essentially transfer knowledge from open-domain data to learn a representation for alleviating the coverage requirement in original combinatorial space; to address (III), we adopt a stationary distribution correction estimation approach (Nachum et al., 2019a), which directly models the state-action density ratio between the experience data and the target policy (Liu et al., 2018), and is therefore agnostic to the behavior policy.
+
+We conduct thorough experiments on evaluating goal-oriented (AirDialog, Wei et al. (2018)) and chit-chat (ConvAI2, Dinan et al. (2020)) dialog systems to demonstrate the superiority of ENIGMA. Specifically, we follow the experimental settings similar to Ghandeharioun et al. (2019); See et al. (2019) (See details in Section 4), and show ENIGMA significantly outperforms the existing static and self-play evaluation methods.
+
+# 2 Background
+
+- Dialog Generation as Markov Decision Process. A conversation is generated through interactions alternating between an agent $\pi$ (i.e., a dialog system) and an environment $\mathcal{E}$ (i.e., a human). We denote the conversation as $h = \{e_0, a_1, e_1, \ldots, a_T\}$ , where $a_i$ and $e_i$ are sentences generated by $\pi$ and $\mathcal{E}$ respectively, and $T$ is the number of turns in the conversation. Dialog can be naturally described as a MDP (Puterman, 1995), $\mathcal{M} = \langle S, \mathcal{A}, P, R, \mu_0 \rangle$ . Specifically, at the $t$ -th turn, state $s_t \in \mathcal{S}$ captures the previous conversation history $s_t = \{e_0, a_1, e_1, \ldots, a_{t-1}, e_{t-1}\}$ . An action $a_t \in \mathcal{A}$ is an agent's response given this context. Conversation can then be represented by the last state and action, i.e., $h = \{s_T, a_T\}$ . An agent $\pi$ is essentially a policy that maps $\mathcal{S}$ to $\mathcal{P}(\mathcal{A})$ , where $\mathcal{P}(\cdot)$ denotes the set of probability measures over the action space. A transition kernel $P(\cdot | s_t, a_t)$ returns $s_{t+1}$ as the state at turn $t+1$ , and an environment $\mathcal{E}$ generates a reward $r_t = R(s_t, a_t) \in [0, 1]$ . Note that $s_{t+1}$ essentially concatenates $s_t$ and $a_t$ with $e_t$ . The initial state $s_1 = \{e_0\}$ is randomly sampled from some distribution $\mu_0$ . We follow the sparse reward setting,
+
+where each conversation is only evaluated at the ending state, i.e., $r_t = 0$ for $t < T$ .
+
+- Automatic Dialog Evaluation as Off-Policy Evaluation. Dialog evaluation can be naturally viewed as computing the expected reward of the above MDP defined as
+
+$$
+\rho (\pi) = \mathbb {E} _ {h \sim \mu_ {0}, \pi , \mathcal {E}} [ R (s _ {T}, a _ {T}) ], \tag {1}
+$$
+
+where $h = \{s_T, a_T\}$ is sampled from the initial distribution $\mu_0$ and the interaction between $\pi$ and $\mathcal{E}$ . When the environment (i.e., human) is accessible, $\rho(\pi)$ can be directly estimated by interaction with the environment, which is known as on-policy evaluation (Sutton and Barto, 2018).
+
+When interaction with human is prohibited, human-free automatic evaluation is required and Off-policy evaluation (OPE) (Precup, 2000) is an appealing choice. In particular, OPE can estimate $\rho (\pi)$ based solely on pre-collected tuples $\{(s,a,r,s')_i\}_{i = 1}^N$ from (multiple) behavior policies that are different from $\pi$ .
+
+OPE has been considered as one of the most fundamental problems in RL. A straightforward approach is to first directly learn an environment model $(R$ and $P)$ from experience data and then estimate $\rho (\pi)$ by executing the policy within the learned environment. Such model-based OPE exactly corresponds to the so-called "self-play evaluation" in the dialog system literature (Wei et al., 2018; Ghandeharioun et al., 2019). Unfortunately, it is notoriously difficult to specify a proper model for highly complicated environments such as a dialog environment (i.e., a human), where the state and action spaces are combinatorially large due to huge vocabulary size and complex transitions. As a result, the estimation error of the environment accumulates as interaction proceeds, and model-based self-play evaluation of dialog systems often becomes unreliable (Voloshin et al., 2019).
+
+To address the challenge above, many model-free OPE methods that avoid direct modeling of the environment have been proposed. Model-free OPE can be categorized into behavior-aware and behavior-agnostic methods. Specifically, behavior-aware methods rely on either knowing or accurately estimating the probabilistic model of the behavior policies used for collecting the experience data (e.g., inverse propensity scoring, Horvitz and Thompson (1952)). Unfortunately, behavior policies are often unknown in practice. Estimating their probabilistic models is also quite challenging, as
+
+it requires modeling human behaviors or complex dialog systems. Behavior-agnostic methods, on the other hand, do not require explicit knowledge or direct modeling of behavior policies, and are therefore more favorable when experience data is collected by multiple (potentially unknown) behavior policies.
+
+Unfortunately, most of the existing model-free behavior-agnostic OPE methods focus on either infinite-horizon (Nachum et al., 2019a; Zhang et al., 2020b; Yang et al., 2020) or fixed-horizon settings (Yin and Wang, 2020; Duan and Wang, 2020), and cannot be applied to evaluating dialog systems whose horizon (number of turns) vary between conversations. While LSTDQ (Lagoudakis and Parr, 2003) can be adopted to handle varying horizons, it has been shown to not work well under the sparse reward setting (Lagoudakis and Parr, 2003; Mataric, 1994).
+
+# 3 ENIGMA
+
+We present the ENIGMA framework for automatically evaluating dialog systems. In particular, ENIGMA is model-free and agnostic to behavior policies for generating the experience data. ENIGMA has three components: (1) pseudo-state padding for converting a dialog into an infinite-horizon MDP, (2) distribution-correction estimation (DICE, Nachum et al. (2019a)) with post-normalization for estimating the value of the target policy based on experience data, and (3) function approximation with pre-trained language models.
+
+# 3.1 Pseudo-State Padding
+
+As mentioned in Section 2, existing model-free behavior-agnostic OPE methods cannot handle varying horizon lengths in conversations under the sparse reward setting. To address this issue, we design a special padding scheme, so that the policy value can be estimated by OPE methods from the resulting padded MDP. We first pad conversation sequences with pseudo states, which leads to a padded MDP with a fixed horizon length $T_{\mathrm{max}}$ . We then convert such a fixed horizon MDP into infinite horizon by augmentation, i.e., we repeatedly concatenate the ending state of the fixed horizon MDP to its initial state. More specifically, the policy takes a deterministic action at all pseudo states, i.e., $\pi(a = \mathrm{NextPad}|s = \mathrm{Pad}_k) = 1$ . The transition kernel of the new process can be defined as
+
+Conversation Transition :
+
+$$
+P \left(s ^ {\prime} = s \cup a \cup e | s, a, \text {i n c o m p l e t e c o n v .}\right) = \mathcal {E} (e | s, a),
+$$
+
+Padding with Pseudo States :
+
+$$
+P \left(s ^ {\prime} = \operatorname {P a d} _ {T + 1} | s, a, \text {c o m p l e t e c o n v . w i t h} T \text {t u r n s}) = 1, \right.
+$$
+
+$$
+P \left(s ^ {\prime} = \operatorname {P a d} _ {k + 1} \mid s = \operatorname {P a d} _ {k}, a = \text {N e x t P a d}, k < T _ {\max }\right) = 1,
+$$
+
+Concatenate Conversations :
+
+$$
+P \left(s ^ {\prime} \mid s = \operatorname {P a d} _ {T _ {\max }}, a = \text {N e x t P a d}\right) = \mu_ {0} \left(s ^ {\prime}\right).
+$$
+
+This new process is still a valid MDP, as its transition kernel satisfies the Markov property. For notational simplicity, we refer to this new process as "the augmented MDP".
+
+Accordingly, the policy value of $\pi$ for the augmented MDP can be defined as
+
+$$
+\rho_ {A} (\pi) = \lim _ {N \rightarrow \infty} \mathbb {E} _ {\left\{h _ {i} \right\} _ {i = 1} ^ {N} \sim \mu_ {0}, \pi , \varepsilon} \left[ \sum_ {i = 1} ^ {N} \sum_ {t = 1} ^ {T _ {\max }} \frac {R \left(s _ {t} ^ {(i)} , a _ {t} ^ {(i)}\right)}{N T _ {\max }} \right], \tag {2}
+$$
+
+where $h_i$ 's are padded conversations sampled from interactions between $\pi$ and $\mathcal{E}$ . Since there is only one non-zero reward for every $T_{\mathrm{max}}$ steps, rewards in the augmented MDP are also sparse.
+
+We remark that the augmented MDP has a unique stationary distribution $d^{\pi}(s,a)$ . For the station-action pair $(s_t, a_t)$ in a conversation $h$ with padded pseudo states, we have
+
+$$
+d ^ {\pi} \left(s _ {t}, a _ {t}\right) = \frac {1}{T _ {\max }} \sum_ {\left\{\left(s _ {k}, a _ {k}\right) \right\} _ {k = 1} ^ {t - 1}} \left[ \mu_ {0} \left(s _ {1}\right) \pi \left(a _ {1} \mid s _ {1}\right) \right.
+$$
+
+$$
+P \left(s _ {2} \mid a _ {1}, s _ {1}\right) \dots P \left(s _ {t} \mid a _ {t - 1}, s _ {t - 1}\right) \pi \left(a _ {t} \mid s _ {t}\right) ], \tag {3}
+$$
+
+where $\{(s_k, a_k)\}_{k=1}^{t-1}$ are the state-action pairs in the same conversation as $(s_t, a_t)$ .
+
+Moreover, the policy value of $\pi$ under the augmented MDP is proportional to its counterpart under the original MDP without augmentation:
+
+$$
+\rho_ {A} (\pi) = \mathbb {E} _ {(s, a) \sim d ^ {\pi} (s, a)} [ R (s, a) ] = \frac {\rho (\pi)}{T _ {\max}}. \tag {4}
+$$
+
+Due to space limit, we defer the details and proof to Appendix A.1.
+
+Remark 1. Some OPE methods, e.g., LSTDQ (Lagoudakis and Parr, 2003), can handle fixed horizons, therefore only applying the fixed-horizon padding would suffice. DICE estimators (Nachum et al., 2019a), on the other hand, can only handle infinite horizons, therefore the infinite-horizon augmentation is necessary.
+
+Remark 2. In practice, we do not actually need to concatenate infinitely many conversations for computing $\rho_A(\pi)$ . As suggested by (4), $\rho_A(\pi)$ can be computed based on $d^{\pi}(s_t,a_t)$ defined in (3), which is the product of only finite terms.
+
+# 3.2 Model-Free Behavior-Agnostic DICE Estimator
+
+With the proposed augmentation, we obtain an infinite horizon MDP from which the policy value of the original MDP can be recovered. We then apply DICE (Nachum et al., 2019a; Yang et al., 2020) to estimate $\rho_A(\pi)$ based on pre-collected experience data $\mathcal{D} = \{(s,a,r,s')_i\}_{i=1}^N$ without interacting with $\mathcal{E}$ (i.e., a human), where $(s,a) \sim d^{\mathcal{D}}$ are samples from some unknown distribution $d^{\mathcal{D}}$ . We slightly abuse the notations and use $(s,a,r,s') \sim d^{\mathcal{D}}$ as a shorthand for $(s,a) \sim d^{\mathcal{D}}, r = R(s,a), s' \sim P(\cdot|s,a)$ , which simulates sampling form the dataset $\mathcal{D}$ .
+
+DICE is a model-free policy evaluation method (without explicitly modeling $\mathcal{E}$ ) and does not require knowledge of behavior policies for generating the experience data, which provides a more reliable estimation of $\rho_{A}(\pi)$ than other OPE methods. Specifically, DICE decomposes $\rho_{A}(\pi)$ into:
+
+$$
+\rho_ {A} (\pi) = \mathbb {E} _ {(s, a, r) \sim d ^ {\mathcal {D}}} [ \zeta (s, a) r ], \tag {5}
+$$
+
+where $\zeta(s, a) := d^{\pi}(s, a) / d^{\mathcal{D}}(s, a)$ is the distribution correction ratio. Then DICE estimates $\zeta$ by solving the following regularized minimax optimization problem:
+
+$$
+\begin{array}{l} \max_{\zeta \geq 0}\min_{\nu ,\lambda}L_{D}(\zeta ,\nu ,\lambda) = \mathbb{E}_{(s,a,r,s^{\prime})\sim d^{\mathcal{D}},a^{\prime}\sim \pi (s^{\prime})}[\zeta (s,a) \\ \cdot \left(\nu \left(s ^ {\prime}, a ^ {\prime}\right) - \nu (s, a)\right) ] + \mathbb {E} _ {(s, a) \sim d ^ {\mathcal {D}}} [ \lambda (\zeta (s, a) \\ - 1) ] - \alpha_ {\zeta} \cdot \mathbb {E} _ {(s, a) \sim d ^ {D}} [ f (\zeta (s, a)) ]. \tag {6} \\ \end{array}
+$$
+
+where $\nu (s,a)$ 's are auxiliary variables, $f$ is a convex regularizer (e.g., $f(x) = x^{2}$ ), and $\alpha_{\zeta}$ is a tuning parameter. Due to the space limit, we omit the details of deriving the DICE estimator. Please refer to Yang et al. (2020) for more details.
+
+- Post-Normalization. Note that (6) handles the constraint $\mathbb{E}_{(s,a)\sim d^{\mathcal{D}}}\zeta (s,a) = 1$ by Lagrange multipliers $\lambda$ , which cannot guarantee that the constraint is exactly satisfied when solving (6) using alternating SGD-type algorithms (Dai et al., 2017; Chen et al., 2018). To address this issue, we propose a post-normalization step that explicitly enforces the constraint:
+
+$$
+\rho_ {n} (\pi) = \sum_ {(s, a, r) \sim d ^ {\mathcal {D}}} \zeta (s, a) r / \sum_ {(s, a) \sim d ^ {\mathcal {D}}} \zeta (s, a). \tag {7}
+$$
+
+As we will see in our experiments in Section 4, the post-normalization step is crucial for DICE to attain good estimation accuracy in practice; without postnormalization, we observe potential divergence in terms of policy value estimation.
+
+- Why do we prefer DICE? Deep Q-learning and its variants are another popular model-free and behavior-agnostic approach to off-policy evaluation. However, due to the sparse rewards in dialogs, fitting the state-action value function (i.e., the $Q$ -function) in deep Q-learning is notoriously difficult (Mataric, 1994). We observe in Section 4 that deep Q-learning is computationally unstable.
+
+In contrast, DICE only needs to estimate the density correction ratio $\zeta$ , which is decoupled from the rewards associated with the policy value as shown from (6). This significantly alleviates the computational challenge incurred by sparse rewards. Moreover, DICE also applies the post-normalization, additional regularization (i.e., $\mathbb{E}_{(s,a)\sim d^{\mathcal{D}}}[f(\zeta (s,a))]$ ), and constraints on $\zeta$ (i.e., $\zeta \geq 0$ and $\mathbb{E}_{(s,a)\sim d^{\mathcal{D}}}[\zeta (s,a)] = 1$ ), all of which further stabilize training. These features allow DICE achieve better estimation performance than deep Q-learning in dialog systems evaluation.
+
+Recent progresses in OPE based on density ratio estimation are remarkable (Liu et al., 2018; Nachum et al., 2019a; Xie et al., 2019; Uehara et al., 2019), however, there exists a statistical limit in off-policy evaluation. Specifically, the Cramer-Rao lower bound of the MSE has been established in Jiang and Li (2016), which is proportional to the square of the density ratio. This implies that we can only obtain accurate estimation of policy value only if the ratio $\zeta$ is not too large. While the ratio-based minimax algorithms should have achieved the lower bound (Kallus and Uehara, 2019; Yin and Wang, 2020; Ren et al., 2021), even better estimation results can be obtained when behavior and target policies are more similar. We thus introduce an experience data collection protocol in Section 4.1 which satisfies the bounded ratio requirement and ensures the success of OPE methods.
+
+# 3.3 Function Approximation with RoBERTa
+
+Despite the apparent advantages of DICE estimators, directly training DICE from scratch will fall short due to the bounded ratio requirement being quickly broken in the large combinatorial state-action space in dialog.
+
+We alleviate this issue by using reliable representations of pre-trained language models (Devlin et al., 2018). By virtue of the huge amounts of pretraining data and the massive model size, the pretrained models can effectively capture rich semantic and syntactic information of natural language (rather than enumerating the original combinatorial
+
+language space).
+
+In particular, we transfer the knowledge from RoBERTa (Liu et al., 2019) to dialog evaluation, and parameterize $\zeta$ and $\nu$ as follows: we keep the pre-trained RoBERTa encoder layer and replace the original mask language modeling head by a two-layer fully connected network with a scalar output. For simplicity, we denote the corresponding parametric forms of $\zeta$ and $\nu$ in (6) as RoBERTa- $\zeta$ and RoBERTa- $\nu$ , respectively. Note that we only need RoBERTa- $\zeta$ and RoBERTa- $\nu$ to share the same encoder. We then use RoBERTa- $\zeta$ and RoBERTa- $\nu$ as the initial solution to solve (6), which is also known as fine-tuning (Devlin et al., 2018).
+
+With a properly designed mask, the self-attention mechanism in the bi-direction transformer architecture allows us to efficiently compute $\zeta(s,a)$ and $\nu(s,a)$ for all state-action pairs in the same dialog simultaneously. Due to the space limit, we defer the mask design details to Appendix A.2.
+
+Algorithm 1 ENIGMA
+Input: Experience conversations $\mathcal{D} = \{(h_i =$ $\{e_0^{(i)},a_1^{(i)},e_1^{(i)},\dots,a_{T_i}^{(i)}\},r^{(i)})\}_{i = 1}^N$ , Target Pol-
+icy $\pi$ , Padding Length $T_{\mathrm{max}}$ , Regularization
+function $f$ , DICE hyper-parameters $\alpha \zeta$ $\alpha_{R}$
+Output: Performance Estimation $\widehat{\rho}_n(\pi)$
+Parameters: $\zeta = \{\mathrm{RoBERTa - }\zeta ,[\zeta_{\mathrm{pad},t}]_{t = 1}^{T_{\mathrm{max}}}\}$ $\nu = \{\mathrm{RoBERTa - }\nu ,[\nu_{\mathrm{pad},t}]]_{t = 1}^{T_{\mathrm{max}}}\} ,\lambda$
+1: while Sample $(h,r)$ in $\mathcal{D}$ do
+2: $\zeta_0 = \zeta_{\mathrm{pad},T_{\mathrm{max}}}$ $\nu_0 = \nu_0' = \nu_{\mathrm{pad},T_{\mathrm{max}}}$
+3: for $t$ in $1,\dots ,T$ do
+4: $\zeta_t = \mathrm{RoBERTa - }\zeta (e_0,a_1,\dots,e_{t - 1},a_t)$
+5: $\nu_{t} = \mathrm{RoBERTa - }\nu (e_{0},a_{1},\dots,e_{t - 1},a_{t})$
+6: $\widetilde{a}_t\sim \pi (e_0,a_1,\dots,e_{t - 1})$
+7: $\nu_t' = \mathrm{RoBERTa - }\nu (e_0,a_1,\dots,e_{t - 1},\widetilde{a}_t)$
+8: end for
+9: for $t$ in $T + 1,\dots ,T_{\mathrm{max}}$ do
+10: $\zeta_t = \zeta_{\mathrm{pad},t}$ $\nu_{t} = \nu_{t}^{\prime} = \nu_{\mathrm{pad},t}$
+11: end for
+12: $L_D(\zeta ,\nu ,\lambda) = \frac{1}{T_{\mathrm{max}}} [\sum_{t = 0}^{T_{\mathrm{max}} - 1}[\zeta_t(\nu_{t + 1}'-$ $\nu_{t}) + \lambda (\zeta_{t} - 1) - \alpha_{\zeta}f(\zeta_{t})])]$
+13: SGD update based on $\frac{\partial L_D}{\partial\nu},\frac{\partial L_D}{\partial\lambda},\frac{\partial-L_D}{\partial\zeta}$
+14: end while
+15: for $(h_i,r^{(i)})$ in $\mathcal{D}$ do
+16: $\zeta_i = \mathrm{RoBERTa - }\zeta (h_i)$
+17: end for
+18: Return $\widehat{\rho}_n(\pi) = \sum_i\zeta_ir^{(i)} / \sum_i\zeta_i$
+
+# 3.4 Summary
+
+We summarize ENIGMA in Algorithm 1. Due to the space limit, we only present ENIGMA using SGD with batch-size 1 here. We defer the details of ENIGMA with mini-batch SGD to Appendix A.3 (Algorithm 2).
+
+# 4 Experiments
+
+We empirically evaluate ENIGMA on two dialog datasets: AirDialog (Wei et al., 2018) for goal-oriented tasks and ConvAI2 (Dinan et al., 2020) for open-domain chit-chat respectively. See details of experimental setup in Appendix B.
+
+# 4.1 Policy Training Data and Experience Data
+
+As mentioned in Section 3.2, there exists an information theoretic limit for all off-policy evaluation methods: no method can perform well when the state-action density ratio between the target and behavior policy is too large. To avoid such a circumstance, we need to ensure that the experience data collected by a behavior policy do not deviate too much from data induced by the target policy. Unfortunately, both datasets used in our experiments do not satisfy such a requirement. AirDialog, for example, consists of dialog between humans, which are near-perfect golden samples as human agents almost always successfully book tickets for customers. Dialog system agents, on the other hand, have many failure modes (i.e., the target policy/agent does not book the correct ticket for a human customer). Hence, directly using human dialog as the behavior data to evaluate dialog agents is subject to limitations.
+
+In order to properly evaluate an imperfect target policy in the presence of the information theoretic limit, we refer to Lowe et al. (2017); Ghandehar-ioun et al. (2019), and collect experience data using behavior policies similar to the target policy. To avoid confusion, we call data collected by the behavior policy "experience data" and data used to train an agent "policy training data". More details are elaborated below for each dataset.
+
+It is worth noting that existing work on dialog systems evaluation also enforces similar requirements. For example, Lowe et al. (2017) show higher Pearson correlation coefficient (0.37) be
+
+tween automatic metrics and human ratings when behavior policies contain the target policy. When the target policy is excluded from behavior policies, however, the correlation is only 0.13, even lower than the meaningless correlation between dialog lengths and human ratings (0.27). Another example is Ghandeharioun et al. (2019), where the studied agents are similar to each other in their hierarchical architectures, hyperparameters, and training data.
+
+# 4.2 Goal-Oriented Systems
+
+We first test ENIGMA for evaluating goal-oriented dialog systems on a flight ticket booking task.
+
+- Policy Training Data. We use the AirDialog dataset3 for policy training (Wei et al., 2018). It contains 402,038 pieces of dialog from human sellers and human customers collaborating on buying flight tickets. We use different proportions of the dataset and different hyperparameters to train 24 seller agents using behavioral cloning (See Appendix C for details)4.
+
+- Experience Data. We invite 20 people to evaluate the 24 seller agents. Specifically, each of the 20 human customers interacts with a seller agent 5 times to generate 100 pieces of dialog, and gives each piece an evaluation score between 0 and 1. The final score an agent receives is the average of the 100 scores. We consider three types of scores: flight score, status score, and overall reward used in Wei et al. (2018).
+
+We evaluate ENIGMA, BLEU/PPL (Papineni et al., 2002) and Self-Play Evaluation (SPE) based on the correlation between estimated reward and true reward. The results are summarized in Table 1. ENIGMA uses the experience data of the other 23 agents to evaluate each agent (i.e., leave-one-bot-out). Note that SPE (Wei et al., 2018) needs to train a customer agent in addition to the seller agent being evaluated. For a fair comparison, we train the SPE customer agent on both experience data and policy training data (See Appendix C for details). Our empirical observations are as follows:
+
+- ENIGMA vs. BLEU/PPL. ENIGMA significantly outperforms BLEU/PPL. As mentioned earlier, BLEU and PPL are well-known metrics for evaluating language quality. For goal-oriented systems whose goal is to complete a specific task, however, BLEU and PPL scores show little correlation
+
+| Setting | Method | Pearson Correlation | Spearman's Rank Correlation |
| Flight Score | Status Score | Reward | Average | Flight Score | Status Score | Reward | Average |
| All Agents | BLEU | 0.1450 | -0.1907 | -0.0709 | -0.0389 | 0.0370 | -0.1453 | -0.1472 | -0.0852 |
| PPL | -0.1598 | 0.1325 | 0.0195 | -0.0026 | -0.1817 | 0.0090 | -0.0039 | -0.0649 |
| SPE | 0.6450 | 0.7926 | 0.7482 | 0.7286 | 0.3539 | 0.8004 | 0.7400 | 0.6314 |
| ENIGMA | 0.9255 | 0.9854 | 0.9672 | 0.9593 | 0.8948 | 0.9839 | 0.9435 | 0.9407 |
| Selected Agents | BLEU | -0.0621 | -0.1442 | 0.2944 | 0.0294 | -0.1273 | -0.2208 | 0.1793 | -0.1758 |
| PPL | -0.0197 | -0.1775 | 0.0460 | -0.0504 | -0.1146 | -0.4652 | -0.0404 | -0.2067 |
| SPE | 0.0970 | 0.5203 | 0.4777 | 0.3650 | 0.1368 | 0.5304 | 0.4943 | 0.3872 |
| ENIGMA | 0.8640 | 0.9031 | 0.8952 | 0.8874 | 0.8496 | 0.9414 | 0.8782 | 0.8686 |
+
+Table 1: The correlation between two metrics. Each column is a task completion score obtained by interacting human customers ("Selected Agents" denotes only evaluating agents with reasonably good performance).
+
+with task completion scores.
+
+- ENIGMA vs. SPE. ENIGMA significantly outperforms SPE. To better understand their performance, we also present the regression plots between estimated and true rewards in Figure 1. Both ENIGMA and SPE can easily identify agents with extremely poor rewards. However, for certain good agents whose flight score, status score, and overall reward are better than 0.5, 0.7, and 0.65 respectively, SPE performs worse than ENIGMA by a much larger margin (especially for flight score). Additional regression plots are shown in Appendix D.1.
+- Ablation Study. We select 2 out of the 24 agents to illustrate the importance of each component in ENIGMA.
+$\star$ DICE vs. LSTDQ. Figure 2(a) and Figure 2(b) show the estimated values of LSTDQ (only fitting the $Q$ -function) and DICE respectively: estimates of LSTDQ are stuck at 0 whereas estimates of DICE approach the true rewards (dotted lines) as training progresses. Figure 3 additionally shows that the training objectives of LSTDQ oscillates as DICE stably converges.
+$\star$ Post-normalization. Figure 2(c) shows the performance of ENIGMA without post-normalization: The algorithm fails to estimate the true rewards.
+$\star$ Pretrained Encoder. Figure 2(d) shows the performance of ENIGMA without the pretrained encoder: The estimated values can approach the true rewards, but are less stable and less accurate than the counterpart with the pretrained encoder.
+
+# 4.3 Open-Domain Chit-chat Systems
+
+We now test ENIGMA for evaluating open-domain chit-chat dialog systems.
+
+- Policy Training Data. We use 29 pre-trained agents5 provided by See et al. (2019). These agents
+
+are trained using behavioral cloning on the ConvA12 dataset $^6$ (Zhang et al., 2018; Dinan et al., 2020). The dataset contains 8,939 pieces of dialog, where participants are instructed to chat naturally using given personas.
+
+- Experience Data. We use the experience dataset provided by See et al. (2019). The dataset contains 3,316 agent-human evaluation logs and 10 different language quality metrics for each log.
+
+We follow the setups from Section 4.2 to evaluate ENIGMA, SPE, BLEU, BLEURT (Sellam et al., 2020), BERTscore (Zhang et al., 2019), and 8 Hand-Crafted Dialog Features (HCDFs) based on Pearson and Spearman's rank correlations between the estimated rewards and the true rewards. Here the true rewards are human evaluation scores under 10 different language quality metrics. More details of HCDFs and language quality metrics can be found in See et al. (2019). The average, minimum and maximum of the 10 correlations (under different language quality metrics) of each method are summarized in Table 2. Moreover, we consider using 8 HCDFs to fit the true rewards using linear regression, and the results are included in Table 2.
+
+Note that since we are considering a chit-chat dialog system, SPE does not train an additional agent but asks two identical target agents to chat with each other. However, SPE needs to train an additional model to predict the reward of each dialog. Specifically, we fine-tune the pre-trained RoBERTa encoder with an output layer over the experience data (an additional sigmoid function is applied to ensure an output between 0 and 1). For automatic evaluation of each agent using ENIGMA, we use the experience data of the other 28 agents (i.e., leave-one-bot-out).
+
+- ENIGMA vs. Baselines. ENIGMA significantly outperforms SPE, BLEU, BLEURT, BERTscore and HCDFs in both Pearson and Spearman's rank
+
+
+(a) SPE vs. Human Evaluation
+
+
+Figure 1: Regression Plots. The x-axis is the average reward obtained by chatting with human. The y-axis is the reward estimated by SPE / ENIGMA. Different colors denote different types of rewards (flight, status, and overall score). The solid line is obtained by linear regression and the shaded region indicates $95\%$ confidence interval.
+
+
+
+
+(b) ENIGMA vs. Human Evaluation
+
+
+
+
+
+| Method | Experience Data | Pearson Correlation | Spearman's Rank Correlation |
| Average | Min | Max | Average | Min | Max |
| Best of 8 HCDFs | Human-Human | 0.6045 | 0.4468 | 0.9352 | 0.3384 | 0.1724 | 0.7526 |
| 8 HCDFs + Regression | Human-Human | 0.5387 | -0.0348 | 0.7519 | 0.4740 | 0.2784 | 0.7880 |
| BLEU | Human-Human | 0.4127 | 0.0671 | 0.6785 | 0.2965 | 0.0482 | 0.7236 |
| BLEURT | Human-Human | 0.4513 | 0.1557 | 0.6572 | 0.4389 | 0.0055 | 0.6864 |
| BERTscore F-1 | Human-Human | 0.5365 | 0.0609 | 0.8385 | 0.5293 | 0.2852 | 0.7044 |
| SPE | Human-Model | 0.5907 | 0.0962 | 0.8820 | 0.4350 | 0.1363 | 0.6405 |
| SPE | Human-Model (Challenging) | 0.3559 | -0.1679 | 0.6900 | 0.1429 | -0.0777 | 0.3216 |
| ENIGMA | Human-Model | 0.9666 | 0.9415 | 0.9792 | 0.9167 | 0.8717 | 0.9485 |
| ENIGMA | Human-Model (50% data) | 0.9126 | 0.8506 | 0.9585 | 0.7790 | 0.6651 | 0.8647 |
| ENIGMA | Human-Model (10% data) | 0.7327 | 0.4544 | 0.9266 | 0.5214 | 0.3651 | 0.6492 |
| ENIGMA | Human-Model (Challenging) | 0.6505 | 0.5394 | 0.7762 | 0.5190 | 0.3168 | 0.6672 |
+
+Table 2: The correlation between automatic metrics and language score obtained by interacting with human. We only present the average/min/max correlations to all 10 different language metrics in this table. For detailed numbers, please refer to Appendix D.3, Figure 23.
+
+
+Figure 2: Value estimation using different methods for two target agents $(\pi_{1}$ and $\pi_{2})$ vs. # of iterations. Dotted lines denote the true rewards.
+Figure 3: Training Objectives vs. Number of Iterations for two target agents.
+
+correlations. Moreover, we compare the correlations between estimated rewards and human evaluation scores under each language quality metric. Due to space limit, we only show the plots of ENIGMA and SPE under 3 out of 10 language quality metrics in Figure 4. Additional plots and detailed results can be found in Appendix D.3. We see that ENIGMA outperforms SPE and HCDFs
+
+
+
+under all language equality metrics.
+
+- Sample Efficiency of ENIGMA. To demonstrate that ENIGMA is sample efficient, we test ENIGMA on randomly sub-sampled (10% and 50%) experience data. We found that even using only 10% of the experience data, ENIGMA still outperforms SPE and HCDFs.
+- Evaluation under Challenging Experience Data. To make the evaluation more challenging, we further test ENIGMA by excluding the experience data obtained by the behavior policies similar to the target policy (see more details in Appendix D.3). We see that even with such challenging experience data, ENIGMA still outperforms SPE with trained on full data and HCDFs under
+
+
+(a) SPE vs. Human Evaluation
+
+
+(b) ENIGMA vs. Human Evaluation
+Figure 4: Regression Plots. Only three metrics are presented. Please refer to Appendix D.3 for all plots.
+
+almost all language quality metrics.
+
+# 5 Discussions and Conclusion
+
+Existing research on automatic evaluation of dialog systems can be categorized into static vs. dynamic evaluation. Most of existing research falls into static evaluation focusing on language quality of single-turn response or on task-completion given fixed dialog, while few literature emphasizes dynamic properties of an interactive environment and tries to consider the sequential interaction between a human and an agent, and thus it is more challenging.
+
+We note that in both static and dynamic evaluations, the algorithms rely on the assumption of sufficient data coverage (explicitly or implicitly) to ensure reliable evaluation. For example, in static evaluation, BLEU score requires all reasonably good responses to be exactly covered by the experience data. More recently, Lowe et al. (2017) show that their method only works when the behavior policies include the target policy. Dynamic evaluation also assumes the sufficient coverage. We emphasize that it is the information-theoretic limit of all OPE methods (Jiang and Li, 2016), which requires the experience data to cover sufficient target policy behaviors to ensure accurate estimation. Therefore, we suggest the broader research community to release human-model interaction evaluation data to further promote research in automatic dialog systems evaluation.
+
+In this paper, we develop a model-free dynamic evaluation framework, ENIGMA, which adopts the current state-of-the-art OPE method in reinforcement learning. Different from existing single-turn language quality metrics and model-based reinforcement learning methods, ENIGMA naturally takes into consideration the interactive and dynamic nature of conversations, while avoiding the difficulty of modeling complex human conversational behaviors. Our thorough experimental results demonstrate that ENIGMA significantly
+
+outperforms existing methods in terms of correlation with human evaluation scores. One potential future direction is to extend ENIGMA from off-policy evaluation to off-policy improvement, which aims to learn a dialog system based on experience data (Nachum et al., 2019b; Kallus and Uehara, 2020).
+
+# Broader Impact
+
+This paper proposes ENIGMA, a model-free dynamic evaluation framework for dialog systems. We demonstrate that the ENIGMA framework can be used for both goal-oriented systems and chitchat systems. For AirDialog dataset, we collect experience data (human-model conversations), which does not contain any personal or sensitive information (see Figure 9, Appendix C). In all other experiments, we use publicly available data. We build our algorithms using public code bases and do not find any ethical concerns.
+
+# References
+
+Daniel Adiwardana, Minh-Thang Luong, David R So, Jamie Hall, Noah Fiedel, Romal Thoppilan, Zi Yang, Apoorv Kulshreshtha, Gaurav Nemade, Yifeng Lu, et al. 2020. Towards a human-like open-domain chatbot. arXiv preprint arXiv:2001.09977.
+Satanjeev Banerjee and Alon Lavie. 2005. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pages 65-72.
+Peter F Brown, Stephen A Della Pietra, Vincent J Della Pietra, Jennifer C Lai, and Robert L Mercer. 1992. An estimate of an upper bound for the entropy of english. Computational Linguistics, 18(1):31-40.
+Zehui Chen, Xingguo Li, Lin F Yang, Jarvis Haupt, and Tuo Zhao. 2018. On landscape of lagrangian functions and stochastic search for constrained nonconvex optimization. arXiv preprint arXiv:1806.05151.
+Bo Dai, Albert Shaw, Niao He, Lihong Li, and Le Song.
+
+2017. Boosting the actor with dual critic. arXiv preprint arXiv:1712.10282.
+Jan Deriu, Alvaro Rodrigo, Arantxa Otegi, Guillermo Echegoyen, Sophie Rosset, Eneko Agirre, and Mark Cieliebak. 2020. Survey on evaluation methods for dialogue systems. Artificial Intelligence Review, pages 1-56.
+David DeVault, Anton Leuski, and Kenji Sagea. 2011. Toward learning and evaluation of dialogue policies with text examples. In Proceedings of the SIGDIAL 2011 Conference, pages 39-48.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
+Emily Dinan, Varvara Logacheva, Valentin Malykh, Alexander Miller, Kurt Shuster, Jack Urbanek, Douwe Kiela, Arthur Szlam, Iulian Serban, Ryan Lowe, et al. 2020. The second conversational intelligence challenge (convai2). In *The NeurIPS'18 Competition*, pages 187–208. Springer.
+Yaqi Duan and Mengdi Wang. 2020. Minimax-optimal off-policy evaluation with linear function approximation. arXiv preprint arXiv:2002.09516.
+Nouha Dziri, Ehsan Kamalloo, Kory W Mathewson, and Osmar Zaiane. 2019. Evaluating coherence in dialogue systems using entailment. arXiv preprint arXiv:1904.03371.
+Sarah E Finch and Jinho D Choi. 2020. Towards unified dialogue system evaluation: A comprehensive analysis of current evaluation protocols. arXiv preprint arXiv:2006.06110.
+Gabriel Forgues, Joelle Pineau, Jean-Marie Larchevéque, and Réal Tremblay. 2014. Bootstrapping dialog systems with word embeddings. In Nips, modern machine learning and natural language processing workshop, volume 2.
+Michel Galley, Chris Brockett, Alessandro Sordoni, Yangfeng Ji, Michael Auli, Chris Quirk, Margaret Mitchell, Jianfeng Gao, and Bill Dolan. 2015. deltableu: A discriminative metric for generation tasks with intrinsically diverse targets. arXiv preprint arXiv:1506.06863.
+Sudeep Gandhi and David Traum. 2016. A semi-automated evaluation metric for dialogue model coherence. In Situated Dialog in Speech-Based Human-Computer Interaction, pages 217-225. Springer.
+Xiang Gao, Yizhe Zhang, Michel Galley, Chris Brockett, and Bill Dolan. 2020. Dialogue response ranking training with large-scale human feedback data. arXiv preprint arXiv:2009.06978.
+
+Asma Ghandeharioun, Judy Hanwen Shen, Natasha Jaques, Craig Ferguson, Noah Jones, Agata Lapedriza, and Rosalind Picard. 2019. Approximating interactive human evaluation with self-play for open-domain dialog systems. In Advances in Neural Information Processing Systems, pages 13658-13669.
+Sarik Ghazarian, Johnny Tian-Zheng Wei, Aram Galstyan, and Nanyun Peng. 2019. Better automatic evaluation of open-domain dialogue systems with contextualized embeddings. arXiv preprint arXiv:1904.10635.
+Charles T Hemphill, John J Godfrey, and George R Doddington. 1990. The atis spoken language systems pilot corpus. In Speech and Natural Language: Proceedings of a Workshop Held at Hidden Valley, Pennsylvania, June 24-27, 1990.
+Dan Hendrycks and Kevin Gimpel. 2016. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415.
+Ryuichiro Higashinaka, Toyomi Meguro, Kenji Imamura, Hiroaki Sugiyama, Toshiro Makino, and Yoshihiro Matsuo. 2014. Evaluating coherence in open domain conversational systems. In Fifteenth Annual Conference of the International Speech Communication Association.
+Daniel G Horvitz and Donovan J Thompson. 1952. A generalization of sampling without replacement from a finite universe. Journal of the American statistical Association, 47(260):663-685.
+Lishan Huang, Zheng Ye, Jinghui Qin, Liang Lin, and Xiaodan Liang. 2020. Grade: Automatic graph-enhanced coherence metric for evaluating open-domain dialogue systems. arXiv preprint arXiv:2010.03994.
+Natasha Jaques, Asma Ghandeharioun, Judy Hanwen Shen, Craig Ferguson, Agata Lapedriza, Noah Jones, Shixiang Gu, and Rosalind Picard. 2019. Way off-policy batch deep reinforcement learning of implicit human preferences in dialog. arXiv preprint arXiv:1907.00456.
+Nan Jiang and Lihong Li. 2016. Doubly robust off-policy value evaluation for reinforcement learning. In International Conference on Machine Learning, pages 652-661. PMLR.
+Nathan Kallus and Masatoshi Uehara. 2019. Efficiently breaking the curse of horizon in off-policy evaluation with double reinforcement learning. arXiv preprint arXiv:1909.05850.
+Nathan Kallus and Masatoshi Uehara. 2020. Statistically efficient off-policy policy gradients. In International Conference on Machine Learning, pages 5089-5100. PMLR.
+Michail G Lagoudakis and Ronald Parr. 2003. Least-squares policy iteration. Journal of machine learning research, 4(Dec):1107-1149.
+
+Tian Lan, Xian-Ling Mao, Wei Wei, Xiaoyan Gao, and Heyan Huang. 2020. Pone: A novel automatic evaluation metric for open-domain generative dialogue systems. arXiv preprint arXiv:2004.02399.
+Jiwei Li, Will Monroe, Alan Ritter, Michel Galley, Jianfeng Gao, and Dan Jurafsky. 2016. Deep reinforcement learning for dialogue generation. arXiv preprint arXiv:1606.01541.
+Junlong Li, Zhuosheng Zhang, Hai Zhao, Xi Zhou, and Xiang Zhou. 2020. Task-specific objectives of pre-trained language models for dialogue adaptation. arXiv preprint arXiv:2009.04984.
+Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74-81.
+Chia-Wei Liu, Ryan Lowe, Iulian V Serban, Michael Noseworthy, Laurent Charlin, and Joelle Pineau. 2016. How not to evaluate your dialogue system: An empirical study of unsupervised evaluation metrics for dialogue response generation. arXiv preprint arXiv:1603.08023.
+Qiang Liu, Lihong Li, Ziyang Tang, and Dengyong Zhou. 2018. Breaking the curse of horizon: Infinite-horizon off-policy estimation. In Advances in Neural Information Processing Systems, pages 5356-5366.
+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.
+Ryan Lowe, Michael Noseworthy, Iulian Vlad Serban, Nicolas Angelard-Gontier, Yoshua Bengio, and Joelle Pineau. 2017. Towards an automatic turing test: Learning to evaluate dialogue responses. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1116-1126.
+Maja J Mataric. 1994. Reward functions for accelerated learning. In Machine learning proceedings 1994, pages 181-189. Elsevier.
+Shikib Mehri and Maxine Eskenazi. 2020. Unsupervised evaluation of interactive dialog with dialogpt. arXiv preprint arXiv:2006.12719.
+A. H. Miller, W. Feng, A. Fisch, J. Lu, D. Batra, A. Bordes, D. Parikh, and J. Weston. 2017. Parlai: A dialog research software platform. arXiv preprint arXiv:1705.06476.
+Jeff Mitchell and Mirella Lapata. 2008. Vector-based models of semantic composition. In proceedings of ACL-08: HLT, pages 236-244.
+Sebastian Möller, Roman Englert, Klaus Engelbrecht, Verena Hafner, Anthony Jameson, Antti Oulasvirta, Alexander Raake, and Norbert Reithinger. 2006.
+
+Memo: towards automatic usability evaluation of spoken dialogue services by user error simulations. In Ninth International Conference on Spoken Language Processing.
+Ofir Nachum, Yinlam Chow, Bo Dai, and Lihong Li. 2019a. Dualdice: Behavior-agnostic estimation of discounted stationary distribution corrections. In Advances in Neural Information Processing Systems, pages 2318-2328.
+Ofir Nachum, Bo Dai, Ilya Kostrikov, Yinlam Chow, Li-hong Li, and Dale Schuurmans. 2019b. Algaedice: Policy gradient from arbitrary experience. arXiv preprint arXiv:1912.02074.
+Bo Pang, Erik Nijkamp, Wenjuan Han, Linqi Zhou, Yixian Liu, and Kewei Tu. 2020. Towards holistic and automatic evaluation of open-domain dialogue generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 3619-3629, Online. Association for Computational Linguistics.
+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.
+Doina Precup. 2000. Eligibility traces for off-policy policy evaluation. Computer Science Department Faculty Publication Series, page 80.
+Martin L Puterman. 1995. Markov decision processes: Discrete stochastic dynamic programming. Journal of the Operational Research Society, 46(6):792-792.
+Tongzheng Ren, Jialian Li, Bo Dai, Simon S Du, and Sujay Sanghavi. 2021. Nearly horizon-free offline reinforcement learning. arXiv preprint arXiv:2103.14077.
+Vasile Rus and Mihai Lintean. 2012. An optimal assessment of natural language student input using word-to-word similarity metrics. In International Conference on Intelligent Tutoring Systems, pages 675-676. Springer.
+Ananya B Sai, Akash Kumar Mohankumar, Siddhartha Arora, and Mitesh M Khapra. 2020. Improving dialog evaluation with a multi-reference adversarial dataset and large scale pretraining. Transactions of the Association for Computational Linguistics, 8:810-827.
+Abigail See, Stephen Roller, Douwe Kiela, and Jason Weston. 2019. What makes a good conversation? how controllable attributes affect human judgments. In North American Chapter of the Association for Computational Linguistics (NAACL).
+Thibault Sellam, Dipanjan Das, and Ankur P Parikh. 2020. Bleurt: Learning robust metrics for text generation. arXiv preprint arXiv:2004.04696.
+
+Pararth Shah, Dilek Hakkani-Tur, Bing Liu, and Gokhan Tur. 2018. Bootstrapping a neural conversational agent with dialogue self-play, crowdsourcing and on-line reinforcement learning. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 3 (Industry Papers), pages 41-51.
+Hiroki Shimanaka, Tomoyuki Kajiwara, and Mamoru Komachi. 2019. Machine translation evaluation with bert regressor. arXiv preprint arXiv:1907.12679.
+Richard S Sutton and Andrew G Barto. 2018. Reinforcement learning: An introduction.
+Chongyang Tao, Lili Mou, Dongyan Zhao, and Rui Yan. 2017. Rubber: An unsupervised method for automatic evaluation of open-domain dialog systems. arXiv preprint arXiv:1701.03079.
+AM Turing. 1950. Computing machinery and intelligence. Mind, 59(236):433-460.
+Masatoshi Uehara, Jiawei Huang, and Nan Jiang. 2019. Minimax weight and q-function learning for off-policy evaluation. arXiv, pages arXiv-1910.
+Cameron Voloshin, Hoang M Le, Nan Jiang, and Yisong Yue. 2019. Empirical study of off-policy policy evaluation for reinforcement learning. arXiv preprint arXiv:1911.06854.
+Jie Wang, Rui Gao, and Hongyuan Zha. 2020a. Reliable off-policy evaluation for reinforcement learning. arXiv preprint arXiv:2011.04102.
+Ruosong Wang, Dean P Foster, and Sham M Kakade. 2020b. What are the statistical limits of offline rl with linear function approximation? arXiv preprint arXiv:2010.11895.
+Wei Wei, Quoc Le, Andrew Dai, and Jia Li. 2018. Airdialogue: An environment for goal-oriented dialogue research. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3844-3854.
+John Wieting, Mohit Bansal, Kevin Gimpel, and Karen Livescu. 2015. Towards universal paraphrastic sentence embeddings. arXiv preprint arXiv:1511.08198.
+Jason Williams, Antoine Raux, Deepak Ramachandran, and Alan Black. 2013. The dialog state tracking challenge. In Proceedings of the SIGDIAL 2013 Conference, pages 404-413, Metz, France. Association for Computational Linguistics.
+Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric 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.
+
+Yang Xiang, Yaoyun Zhang, Xiaogiang Zhou, Xiaolong Wang, and Yang Qin. 2014. Problematic situation analysis and automatic recognition for chinese online conversational system. In Proceedings of The Third CIPS-SIGHAN Joint Conference on Chinese Language Processing, pages 43-51.
+Tengyang Xie, Yifei Ma, and Yu-Xiang Wang. 2019. Towards optimal off-policy evaluation for reinforcement learning with marginalized importance sampling. In Advances in Neural Information Processing Systems, pages 9668-9678.
+Mengjiao Yang, Ofir Nachum, Bo Dai, Lihong Li, and Dale Schuurmans. 2020. Off-policy evaluation via the regularized lagrangian. arXiv preprint arXiv:2007.03438.
+Ming Yin and Yu-Xiang Wang. 2020. Asymptotically efficient off-policy evaluation for tabular reinforcement learning. In International Conference on Artificial Intelligence and Statistics, pages 3948-3958. PMLR.
+Zhou Yu, Ziyu Xu, Alan W Black, and Alexander Rudnicky. 2016. Strategy and policy learning for nontask-oriented conversational systems. In Proceedings of the 17th annual meeting of the special interest group on discourse and dialogue, pages 404-412.
+Tsuta Yuma, Naoki Yoshinaga, and Masashi Toyoda. 2020. uBLEU: Uncertainty-aware automatic evaluation method for open-domain dialogue systems. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop, pages 199-206, Online. Association for Computational Linguistics.
+Hainan Zhang, Yanyan Lan, Liang Pang, Hongshen Chen, Zhuoye Ding, and Dawei Yin. 2020a. Modeling topical relevance for multi-turn dialogue generation. arXiv preprint arXiv:2009.12735.
+Ruiyi Zhang, Bo Dai, Lihong Li, and Dale Schuurmans. 2020b. Gendice: Generalized offline estimation of stationary values. arXiv preprint arXiv:2002.09072.
+Saizheng Zhang, Emily Dinan, Jack Urbanek, Arthur Szlam, Douwe Kiela, and Jason Weston. 2018. Personalizing dialogue agents: I have a dog, do you have pets too? arXiv preprint arXiv:1801.07243.
+Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. 2019. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675.
+Tianyu Zhao, Divesh Lala, and Tatsuya Kawahara. 2020. Designing precise and robust dialogue response evaluators. arXiv preprint arXiv:2004.04908.
+
+# A ENIGMA
+
+# A.1 Supporting Theorem
+
+
+Figure 5: Illustration of Augmented MDP with Infinite Horizon.
+
+Theorem 1. The augmented MDP with infinite horizon satisfies the following properties:
+
+- It has a unique stationary state-action visitation distribution $d^{\pi}(s,a)$ ;
+- For the station-action pair $(s_t, a_t)$ in a conversation $h$ with padded pseudo states, we have
+
+$$
+d ^ {\pi} \left(s _ {t}, a _ {t}\right) = \frac {1}{T _ {\max }} \sum_ {\left\{\left(s _ {k}, a _ {k}\right) \right\} _ {k = 1} ^ {t - 1}} \left[ \mu_ {0} \left(s _ {1}\right) \pi \left(a _ {1} \mid s _ {1}\right) P \left(s _ {2} \mid a _ {1}, s _ {1}\right) \dots P \left(s _ {t} \mid a _ {t - 1}, s _ {t - 1}\right) \pi \left(a _ {t} \mid s _ {t}\right) \right], \tag {8}
+$$
+
+where $\{(s_k, a_k)\}_{k=1}^{t-1}$ are the state-action pairs in the same conversation as $(s_t, a_t)$ ;
+
+- The policy value can be computed by sampling from $d^{\pi}(s, a)$ , and we have
+
+$$
+\rho_ {A} (\pi) = \mathbb {E} _ {(s, a) \sim d ^ {\pi} (s, a)} [ R (s, a) ] = \rho (\pi) / T _ {\max } \tag {9}
+$$
+
+Proof. First, we prove that the augmented MDP has a unique stationary state-action visitation distribution shown in (8).
+
+As the augmented MDP is periodic with period $T_{\mathrm{max}}$ , the uniqueness and stationary distribution can not be immediately obtained by ergodicity of the MDP (the first two points of the Theorem).
+
+To obtain the stationary state-action visitation distribution, we essentially need to solve the following equations:
+
+$$
+d ^ {\pi} (s, a) = \sum_ {(s ^ {\prime}, a ^ {\prime})} d ^ {\pi} \left(s ^ {\prime}, a ^ {\prime}\right) P \left(s \mid s ^ {\prime}, a ^ {\prime}\right) \pi (a \mid s), \text {f o r a l l} (s, a) \tag {10}
+$$
+
+with $d^{\pi}(s,a)$ is a probability measure on the state-action space, i.e., $\sum_{(s,a)}d^{\pi}(s,a) = 1$
+
+We first group the state-action pairs by their dialog turns $t$ . More specifically, we define $S_{t} := \{s_{t} : s_{t} \text{ contains } t \text{ dialog turns}\}$ , $A_{t} := \{a_{t} : a_{t} \text{ is the response at the } t \text{-th dialog turn}\}$ and $Q_{t} = S_{t} \times A_{t}$ . We have the state space is the direct sum of state groups $S_{0} \oplus S_{1} \cdots \oplus S_{T_{\max}} = S$ and the action space is the union of all action groups $\bigcup_{t=1}^{T_{\max}} A_{t} = A$ . We further have $Q_{0} \oplus Q_{1} \cdots \oplus Q_{T_{\max}} = S \times A = Q$ . Notice that $t$ is the number of dialog turns in original MDP, not the time step for the augmented MDP.
+
+We then consider the quantity $S_{t} = \sum_{(s_{t},a_{t})\in \mathcal{Q}_{t}}d^{\pi}(s_{t},a_{t})$ , which sum over the LHS of the Eq.(10) for each group of $(s_t,a_t)$ . We now expand the corresponding sum of the RHS of (10):
+
+$$
+\begin{array}{l} S _ {t} = \sum_ {\left(s _ {t}, a _ {t}\right) \in \mathcal {Q} _ {t}} d ^ {\pi} \left(s _ {t}, a _ {t}\right) \\ = \sum_ {(s _ {t}, a _ {t}) \in \mathcal {Q} _ {t}} \sum_ {(s _ {t - 1}, a _ {t - 1}) \in \mathcal {Q} _ {t - 1}} d ^ {\pi} (s _ {t - 1}, a _ {t - 1}) P (s _ {t} | s _ {t - 1}, a _ {t - 1}) \pi (a _ {t} | s _ {t}) \\ = \sum_ {\left(s _ {t - 1}, a _ {t - 1}\right) \in \mathcal {Q} _ {t - 1}} \sum_ {\left(s _ {t}, a _ {t}\right) \in \mathcal {Q} _ {t}} d ^ {\pi} \left(s _ {t - 1}, a _ {t - 1}\right) P \left(s _ {t} \mid s _ {t - 1}, a _ {t - 1}\right) \pi \left(a _ {t} \mid s _ {t}\right) \\ = \sum_ {(s _ {t - 1}, a _ {t - 1}) \in \mathcal {Q} _ {t - 1}} d ^ {\pi} (s _ {t - 1}, a _ {t - 1}) \\ = S _ {t - 1} (t > 1). \\ \end{array}
+$$
+
+We have $S_{1} = S_{2} = \dots = S_{T_{\max}} = S$ . As $d^{\pi}(s, a)$ is a probability measure, we have the following unique solution for $S_{t}$ 's
+
+$$
+S = \frac {1}{T _ {\mathrm {m a x}}} \sum_ {t = 1} ^ {T _ {\mathrm {m a x}}} S _ {t} = \frac {1}{T _ {\mathrm {m a x}}} \sum_ {t = 1} ^ {T _ {\mathrm {m a x}}} \sum_ {(s _ {t}, a _ {t}) \in \mathcal {Q} _ {t}} d ^ {\pi} (s _ {t}, a _ {t}) = \frac {1}{T _ {\mathrm {m a x}}} \sum_ {(s, a) \in \mathcal {Q}} d ^ {\pi} (s, a) = \frac {1}{T _ {\mathrm {m a x}}}.
+$$
+
+As there is only one possibility for the last state-action pairs in all possible conversation that $s_{T_{\max}} = \mathrm{Pad}_{T_{\max}}, a_{T_{\max}} = \mathrm{NextPad}$ , we have $d^{\pi}(\mathrm{Pad}_{T_{\max}}, \mathrm{NextPad}) = S_{T_{\max}} = \frac{1}{T_{\max}}$ . We now consider $(s_1, a_1)$ , which is the first state-action pair of a conversation. We have
+
+$$
+\begin{array}{l} d ^ {\pi} (s _ {1}, a _ {1}) = \sum_ {(s ^ {\prime}, a ^ {\prime})} d ^ {\pi} (s ^ {\prime}, a ^ {\prime}) P (s _ {1} | s ^ {\prime}, a ^ {\prime}) \pi (a _ {1} | s _ {1}) \\ = d ^ {\pi} \left(\operatorname {P a d} _ {T _ {\max }}, \text {N e x t P a d}\right) P \left(s _ {1} \mid \operatorname {P a d} _ {T _ {\max }} , \operatorname {N e x t P a d}\right) \pi \left(a _ {1} \mid s _ {1}\right) = \frac {1}{T _ {\max }} \mu_ {0} \left(s _ {1}\right) \pi \left(a _ {1} \mid s _ {1}\right), \tag {11} \\ \end{array}
+$$
+
+which is the unique solution. For any $(s_t, a_t) \in \mathcal{Q}_t (t > 1)$ , the previous state-action pairs in the same conversation must be in $\mathcal{Q}_{t-1}$ . We have
+
+$$
+\begin{array}{l} d ^ {\pi} (s _ {t}, a _ {t}) = \sum_ {(s ^ {\prime}, a ^ {\prime})} d ^ {\pi} (s ^ {\prime}, a ^ {\prime}) P (s _ {t} | s ^ {\prime}, a ^ {\prime}) \pi (a _ {t} | s _ {t}) \\ = \sum_ {\left(s _ {t - 1}, a _ {t - 1}\right) \in \mathcal {Q} _ {t - 1}} d ^ {\pi} \left(s _ {t - 1}, a _ {t - 1}\right) P \left(s _ {t} \mid s _ {t - 1}, a _ {t - 1}\right) \pi \left(a _ {t} \mid s _ {t}\right). \tag {12} \\ \end{array}
+$$
+
+Based on (11) and (12), we can obtain the unique solution for (10):
+
+$$
+\begin{array}{l} d ^ {\pi} (s _ {t}, a _ {t}) \\ = \sum_ {(s _ {t - 1}, a _ {t - 1}) \in \mathcal {Q} _ {t - 1}} d ^ {\pi} (s _ {t - 1}, a _ {t - 1}) P (s _ {t} | s _ {t - 1}, a _ {t - 1}) \pi (a _ {t - 1} | s _ {t - 1}) \\ = \sum_ {(s _ {t - 1}, a _ {t - 1}) \in \mathcal {Q} _ {t - 1}} \sum_ {(s _ {t - 2}, a _ {t - 2}) \in \mathcal {Q} _ {t - 2}} d ^ {\pi} (s _ {t - 2}, a _ {t - 2}) P (s _ {t - 1} | s _ {t - 2}, a _ {t - 2}) \pi (a _ {t - 1} | s _ {t - 1}) P (s _ {t} | s _ {t - 1}, a _ {t - 1}) \pi (a _ {t} | s _ {t}) \\ \end{array}
+$$
+
+$$
+\begin{array}{l} \cdot \cdot \cdot \\ = \frac {1}{T _ {\operatorname* {m a x}}} \sum_ {\left\{\left(s _ {k}, a _ {k}\right) \right\} _ {k = 1} ^ {t - 1}} \left[ \mu_ {0} (s _ {1}) \pi (a _ {1} | s _ {1}) P (s _ {2} | a _ {1}, s _ {1}) \dots P (s _ {t} | a _ {t - 1}, s _ {t - 1}) \pi (a _ {t} | s _ {t}) \right], \\ \end{array}
+$$
+
+where we omit the constraint of $\mathcal{Q}_t$ as the transition kernel $P$ naturally satisfies the constraints.
+
+Till now, we have shown that the augmented MDP has a unique stationary state-action visitation distribution shown in (8) (the first two points of the Theorem).
+
+Next, we show that the policy value of the policy $\pi$ under the augmented MDP is proportional to its counterpart under the original MDP without the augmentation (the third point of the Theorem).
+
+Recall that the expected reward of original MDP (1) is defined as
+
+$$
+\begin{array}{l} \rho (\pi) = \mathbb {E} _ {h \sim \mu_ {0}, \pi , \mathcal {E}} [ R (s _ {T}, a _ {T}) ] = \sum_ {T = 1} ^ {T _ {\max}} \sum_ {h} P r (h, h \mathrm {h a s} T \mathrm {t u r n s}) R (s _ {T}, a _ {T}) \\ = \sum_ {T = 1} ^ {T _ {\max }} \sum_ {\left\{\left(s _ {k}, a _ {k}\right) \right\} _ {k = 1} ^ {T - 1}} \mu_ {0} (s _ {1}) \pi (a _ {1} | s _ {1}) P (s _ {2} | a _ {1}, s _ {1}) \dots P (s _ {T} | a _ {T - 1}, s _ {T - 1}) \pi (a _ {T} | s _ {T}) \\ \times \mathbb {1} (a _ {T} \text {E n d C o n v e s a t i o n}) R (s _ {T}, a _ {T}), \\ \end{array}
+$$
+
+where $T$ is the number of turns in the original dialog before padding. Recall that, the MDP only obtain non-zero reward when the dialog ends, (i.e., when $a$ End Conversation). On the other hand, Due to the
+
+existence of unique stationary distribution, the policy value of $\pi$ for the augmented MDP (2) can written as:
+
+$$
+\begin{array}{l} \rho_ {A} (\pi) = \mathbb {E} _ {(s, a) \sim d ^ {\pi} (s, a)} [ R (s, a) ] = \mathbb {E} _ {(s, a) \sim d ^ {\pi} (s, a)} [ \mathbb {I} (a \text {E n d C o n v e r s a t i o n}) R (s, a) ] \\ = \frac {1}{T _ {\max }} \sum_ {t = 1} ^ {T _ {\max }} \sum_ {\left\{\left(s _ {k}, a _ {k}\right) \right\} _ {k = 1} ^ {t}} \mu_ {0} (s _ {1}) \pi \left(a _ {1} \mid s _ {1}\right) P \left(s _ {2} \mid a _ {1}, s _ {1}\right) \dots P \left(s _ {t} \mid a _ {t - 1}, s _ {t - 1}\right) \pi \left(a _ {t} \mid s _ {t}\right) \\ \times \mathbb {1} (a _ {t} \text {E n d C o n v e r s a t i o n}) R (s _ {t}, a _ {t}) \\ = \frac {1}{T _ {\max }} \rho (\pi). \\ \end{array}
+$$
+
+
+
+Can we directly apply infinite-horizon augmentation without padding? The answer is NO. Here we use an example to illustrate the difference between $\rho_{\mathrm{A}}$ and $\rho$ and why we need to pad every dialog to have the same length for using OPE:
+
+Example 1. Suppose you have two experience dialogs $a_0 \to \dots \to a_{t_1}$ and $b_0 \to \dots \to b_{t_2}$ with rewards 0 and 1 respectively. For the target policy, dialogs has per-episode density 0.2 and 0.8 respectively. The true value of such policy is $0 \times 0.2 + 1 \times 0.8 = 0.8$ . The corresponding per-state density of $[a_0, \dots, a_{t_1}]$ is $\frac{0.2}{0.2 \times t_1 + 0.8 \times t_2}$ and the one for $[b_0, \dots, b_{t_1}]$ is $\frac{0.8}{0.2 \times t_1 + 0.8 \times t_2}$ . The value in the new augmented MDP is $\frac{0.2*0 + 0.8*1}{0.2 \times t_1 + 0.8 \times t_2}$ , which depends on the dialog turns and can not be directly turned into policy value in the original MDP.
+
+# A.2 Function Approximation with Pre-Trained Language Models
+
+We can compute all state-action pairs for the same dialog in a parallel way as shown in Figure 6. The input to the RoBERTa encoder consists of three parts, word tokens, position ids, and token types.
+
+Notation: an experience dialog $h = \{e_0, a_1, e_1, \dots, a_T\}$ , and the corresponding response generated by the target policy $\pi$ , $\{a_t' = \pi(s_t)\}_{t=1}^T$ .
+
+Word Tokens. The input token is the concatenation of responses $\{e_0, a_1, a_1', e_1, \dots, e_{T-1}, a_T, a_T'\}$ .
+
+Position Ids. The position ids is separately calculated for each response. For $e_i$ , the position ids is from $l_{2i} = \sum_{j < i} \mathrm{len}(e_j) + \sum_{j \leq i} \mathrm{len}(a_j)$ to $l_{2i+1} = l_{2i} + \mathrm{len}(e_i)$ , where $\mathrm{len}(\cdot)$ denotes the number of tokens of a given response. For $a_i$ , the position ids is from $l_{2i-1}$ to $l_{2i}$ . For $a_i'$ , the position ids is from $l_{2i-1}$ to $l_{2i}' = l_{2i-1} + \mathrm{len}(a_i')$ .
+
+Token types. For $e_i$ 's, the token types are 0 which denotes human responses. For $a_i$ 's and $a_i'$ 's, the token types are 1 which denotes agent responses.
+
+Attention Masking. We need to modify the attention masks to prevent tokens from attending future responses. Specifically, the attention masks make sure:
+
+1. The tokens in each response can be mutually attended;
+2. $e_i$ attends to $\{e_0, a_1, e_1, a_2, \dots, e_{i-1}, a_i\}$ ;
+3. $a_{i}$ attends to $\{e_0,a_1,e_1,a_2,\dots ,a_{i - 1},e_{i - 1}\}$
+4. $a_{i}^{\prime}$ attends to $\{e_0,a_1,e_1,a_2,\dots ,a_{i - 1},e_{i - 1}\}$
+
+# A.3 ENIGMA with regularized DICE
+
+
+Figure 6: RoBERTa- $\zeta$ and RoBERTa- $\nu$
+
+Algorithm 2 Dialog OPE using regularized DICE
+Input: Experience Dialog with rewards $\mathcal{D} = \{(h_i = \{e_0^{(i)},a_1^{(i)},e_1^{(i)},\dots,a_{T_i}^{(i)}\},r^{(i)})\}_{i = 1}^N$ Target Policy $\pi$ Padding Length $T_{\mathrm{max}}$ Regularization function $f$ , DICE hyper-parameters $\alpha_{\zeta}$ $\alpha_{R}$
+Output: Performance Estimation $\widehat{\rho}_n(\pi)$
+Parameters: $\zeta = \{\mathrm{RoBERTa - }\zeta ,[\zeta_{\mathrm{pad},t}]_{1\leq t\leq T_{\mathrm{max}}}\} ,\nu = \{\mathrm{RoBERTa - }\nu ,[\nu_{\mathrm{pad},t}]_{1\leq t\leq T_{\mathrm{max}}}\} ,\lambda$
+Generate OPE Data via Pseudo State Padding
+1: for $(h_i,r^{(i)})$ in $\mathcal{D}$ do
+2: for $t$ in $1,\dots,T_{i}$ do
+3: $\widetilde{a}_t^{(i)}\sim \pi (\{e_0^{(i)},a_1^{(i)},e_1^{(i)},\dots,e_{t - 1}^{(i)}\}) / \mathrm{Sample~Action~From~Target~Policy}$
+4: end for
+5: end for
+6: $\widetilde{\mathcal{D}} = \{(\widetilde{h}_i = e_0^{(i)},a_1^{(i)},e_1^{(i)},\dots,a_{T_i}^{(i)}],r^{(i)})\}_{i = 1}^N$
+Estimate $\zeta$ by Regularized DICE
+7: while Not Converged do
+8: Sample Mini-Batch $\mathcal{B}\subset \widetilde{\mathcal{D}}$
+9: for $(\widetilde{h}_i,r^{(i)})$ in $\mathcal{B}$ do
+10: $\zeta_0^{(i)} = \zeta_{\mathrm{pad},T_{\mathrm{max}}}$ $\nu_0^{(i)} = \nu_0^{\prime (i)} = \nu_{\mathrm{pad},T_{\mathrm{max}}}$ // infinite-horizon concatenation
+11: for $t$ in $1,\dots,T_{i}$ do
+12: $\zeta_t^{(i)} = \mathrm{RoBERTa - }\zeta (e_0^{(i)},a_1^{(i)},\dots,a_{t - 1}^{(i)},e_{t - 1}^{(i)},a_t^{(i)})$
+13: $\nu_t^{(i)} = \mathrm{RoBERTa - }\nu (e_0^{(i)},a_1^{(i)},\dots,a_{t - 1}^{(i)},e_{t - 1}^{(i)},a_t^{(i)})$
+14: $\nu_t^{\prime (i)} = \mathrm{RoBERTa - }\nu (e_0^{(i)},a_1^{(i)},\dots,a_{t - 1}^{(i)},e_{t - 1}^{(i)},\widetilde{a}_t^{(i)})$
+15: end for
+16: for $t$ in $T_{i} + 1,\dots,T_{\mathrm{max}}$ do
+17: $\zeta_t^{(i)} = \zeta_{\mathrm{pad},t}$ $\nu_t^{(i)} = \nu_t^{\prime (i)} = \nu_{\mathrm{pad},t}$ // pseudo state padding
+18: end for
+19: $\ell_i = \frac{1}{T_\mathrm{max}} [\sum_{t = 0}^{T_\mathrm{max} - 1}[\zeta_t(\nu_{t + 1}^{\prime (i)} - \nu_t^{(i)}) + \lambda (\zeta_t^{(i)} - 1) - \alpha_\zeta f(\zeta_t^{(i)})]]$
+20: end for
+21: $L_D(\zeta ,\nu ,\lambda) = \frac{1}{|\mathcal{B}|}\sum_{i\in \mathcal{B}}\ell_i$
+22: SGD update based on. $\frac{\partial L_D}{\partial\nu},\frac{\partial L_D}{\partial\lambda},\frac{\partial-L_D}{\partial\zeta}$ (Gradient Reversal).
+23: end while
+Estimate Average Reward with Post-Normalization
+24: for $(h_i,r^{(i)})$ in $\mathcal{D}$ do
+25: $\zeta_i = \mathrm{RoBERTa - }\zeta (e_0^{(i)},a_1^{(i)},\dots,a_{T_i - 1}^{(i)},e_{T_i - 1}^{(i)},a_{T_i}^{(i)})$
+26: end for
+27: Return $\widehat{\rho}_n(\pi) = \sum_i\zeta_ir^{(i)} / \sum_i\zeta_i$
+
+# B Experiment Set-Up
+
+In the following experiments, we share the RoBERTa encoder for RoBERTa- $\zeta$ and RoBERTa- $\nu$ . On the top of RoBERTa- $\zeta$ and RoBERTa- $\nu$ , it is a two-layer fully connected neural network equipped with GeLU activation (Hendrycks and Gimpel, 2016) and the same hidden dimension as RoBERTa. The RoBERTa encoder is initialized from RoBERTa-base checkpoint (Liu et al., 2019). We simply use reverse gradients for the mini-max updates. We set learning rate as $2 \times 10^{-4}$ and use inverse square root learning rate decay. We impose the gradient norm clipping with the maximum norm $\| \cdot \|_2 \leq 10$ . We use 100 times larger learning rate for optimizing $\lambda$ , 2 times larger learning rate for RoBERTa- $\nu$ . In (6), we set $\alpha_{\zeta} = 1$ , $f(x) = x^2$ as suggested in Yang et al. (2020). We maintain $\zeta \geq 0$ by adding a square activation at the end of RoBERTa- $\zeta$ . The source code is built based on Transformers (Wolf et al., 2019), AirDialog (Wei et al., 2018), and ParlAI (Miller et al., 2017). All experiments are conducted on a machine with $8 \times$ V100 GPUs on Google Cloud.
+
+# C Transformer-Based Agents for AirDialog
+
+Seller Agent Transformer Architecture There are four components for the encoder: ticket encoder, reservation encoder, dialog encoder, and task-specific heads (intent classification head and name classification head). All tickets and reservation are converted to natural languages. Noticing that, we always append a pseudo ticket in the ticket database representing "no ticket found" situation. The architecture is illustrated in Figure 7.
+
+
+Figure 7: Transformer-based Seller Agent
+
+Customer Agent Transformer Architecture There are two components for the encoder: intent encoder, reservation encoder. All intents are converted to natural languages. The architecture is illustrated in Figure 8.
+
+Training Objective Besides the language generation loss $\mathcal{L}_l$ , the training objective for seller consists of three parts: name loss, flight loss, intent loss:
+
+$$
+\min _ {\theta} \mathcal {L} _ {s} (\theta) = \mathcal {L} _ {l} (\theta) + \lambda_ {n} \mathcal {L} _ {\text {n a m e}} (\theta) + \lambda_ {f} \mathcal {L} _ {\text {f l i g h t}} (\theta) + \lambda_ {i} \mathcal {L} _ {\text {i n t e n t}} (\theta) \tag {13}
+$$
+
+The customer agent is trained with normal language generation loss.
+
+Benchmark We compare the proposed model with the current AirDialog RNN baseline (Wei et al., 2018). As can be seen, the agent used in this paper are significantly stronger than the baseline agent used in Wei et al. (2018).
+
+
+Figure 8: Transformer-based Customer Agent
+
+| Model | BLEU (C) | BLEU (S) | PPL (C) | PPL (S) | Reward | Name | Flight | Status |
| RNN | 22.92 | 32.95 | - | - | 0.23 | 0.41 | 0.13 | 0.29 |
| Ours | 31.78 | 31.70 | 1.671 | 1.843 | 0.702 | 1.00 | 0.547 | 0.761 |
+
+Table 3: Benchmark of the proposed transformer based agent. 'C' means customer, 'S' means seller. Reward, Name, Flight, status are the task-specific scores obtained from self-play evaluation.
+
+Hyper-Parameters For training 24 seller agents used in Section 4, we varies the size of training data (number of training dialogs) from $5K$ to the full size and varies $\lambda_{i}$ and $\lambda_{f}$ from 0.0001 to 1. For training the customer agent used in self-play evaluation, we use the full training data and tune the hyperparameters based on the BLEU score evaluated using the validation set.
+
+Human Evaluation The human evaluation is collected from 20 different Ph.D. students majored in Math/Stats/CS/IEOR. We provide detailed guidelines to the human evaluator that they have to speak to the agents with similar tone. Figure 9 presents the screen shots of the human evaluation software.
+
+We first provide the context to the human evaluator.
+
+
+
+For easy use and the consistency of human evaluation, we have prepared several response templates.
+
+
+Figure 9: Screen Shots of Human Evaluation Software
+
+The human evaluators are allowed to use their own words.
+
+
+
+After the end of conversation, we provide the details about the agent's decision (ticket booked/cancelation), as well as the task completion scores (flight/name/status/reward score).
+
+
+
+# D Additional Experiment
+
+# D.1 AirDialog
+
+# Regression Plot
+
+We present the regression plot for the full setting in Figure 10 and for the selected agent in Figure 11.
+
+
+
+
+
+
+
+
+(a) BLEU vs.Human Evaluation
+
+
+(c) SPE vs. Human Evaluation
+
+
+Figure 10: Regression Plot. The x-axis is the average reward obtained by chatting with human. The y-axis is BLEU/PPL/the reward estimated by ENIGMA. Different colors denotes different type of rewards (flight score, status score, and overall reward). The solid line is obtained by linear regression and the shaded region indicates $95\%$ confidence interval. (see more in seaborn packages).
+
+
+(b) PPL vs. Human Evaluation
+
+
+
+
+
+
+(d) ENIGMA vs. Human Evaluation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(a) BLEU vs.Human Evaluation
+
+
+(c) SPE vs. Human Evaluation
+
+
+Figure 11: Regression Plot for "selected agent" Setting. The x-axis is the average reward obtained by chatting with human. The y-axis is BLEU/PPL/the reward estimated by ENIGMA/Self-Play Evaluation (SPE). Different colors denotes different type of rewards (flight score, status score, and overall reward). The solid line is obtained by linear regression and the shaded region indicates $95\%$ confidence interval. (see more in seaborn packages).
+
+
+(b) PPL vs. Human Evaluation
+
+
+(d) ENIGMA vs. Human Evaluation
+
+
+
+# Training Curves
+
+We show the training curves of the ENIGMA in Figure 12. Here four models are presented, the best model (ranked $100\%$ ), model ranked as $50\%$ , model ranked as $25\%$ and the worst model (ranked $0\%$ ). As can be seen the estimated reward estimation converges steadily to it's true values.
+
+# Ablation Study
+
+Here we provide large figures (Figure 13 and Figure 14) for the ablation study mentioned in Section 4.
+
+# D.2 Additional Results for Rule-Based Agents of AirDialog
+
+- Rule-Rule (R-R): Both customer and seller agents are rule based. We fix the customer rule-based model and construct and evaluate 6 seller agents. The strongest agent can perfectly interpret the intent of
+
+
+Figure 12: Learning curve for AirDialog. The x-axis is the number of mini-max updates, while y-axis is the estimated values. The straight line is the true reward, while the shaded region denotes the $90\%$ confidence interval. The true reward and the confidence interval is obtained via different evaluation chats between the agents and the environment (model/human). Different colors denotes different agents.
+
+
+
+
+
+
+
+
+Figure 13: Reward estimation of two target agents $(\pi_{1}$ and $\pi_{2})$ vs. # of iterations. Dotted lines represent true rewards.
+
+
+
+
+Figure 14: Loss value of two target agents during mini-max optimization.
+
+
+
+rule-based customers. While the weaker agents interprets the intent with different levels of noise. The learning curve is presented in Figure 15.
+
+
+Figure 15: Learning Curve under Rule-Rule setting
+
+| Setting | Method | Pearson Correlation | Spearman's Rank Correlation |
| Flight Score | Status Score | Reward | Flight Score | Status Score | Reward |
| R-R | BLEU | 0.1981 | -0.0067 | 0.0980 | 0.1525 | 0.0009 | 0.0924 |
| ppl | -0.1584 | -0.0610 | -0.1209 | -0.2475 | -0.1060 | -0.1178 |
| ENIGMA | 0.9687 | 0.9947 | 0.9874 | 0.8800 | 0.9872 | 0.9574 |
+
+Table 4: The correlation between two metrics. Each column is a task completion score obtained by interacting with the environments under R-R setting. Each row is an automatic metric.
+
+# D.3 ConvAI2
+
+# Training Curves.
+
+Similar to the AirDialog dataset, we also show the training curves for the agents ranked at $100\%$ , $50\%$ , $25\%$ , $0\%$ in Figure 16. ENIGMA also converges steadily to the true values within a reasonable error.
+
+
+Figure 16: Learning curve for ConvAI2. The x-axis is the number of mini-max updates, while y-axis is estimated values. The straight line is the true reward, while the shaded area denotes the $95\%$ confidence interval. The true reward and the confidence interval is obtained via different evaluation chats between the agents and human. Different colors denotes different agents.
+
+# Regression Plot.
+
+We present the regression plot for the all 10 metrics in setting in Figure 17. The corresponding corresponding correlation is presented in Table 5. For comparison, we present the regression plot for self-play evaluation in Figure 18.
+
+
+Figure 17: ENIGMA vs. Human Evaluation for ConvAI2. The x-axis is the average reward obtained by chatting with human. The y-axis it the reward estimated by ENIGMA. Different colors represent different language quality metrics. The solid line is obtained by simple linear regression.
+
+Experience Data. To analysis how many human-model evaluation dialogs are needed, we analysis ENIGMA error under different sizes of the experience data. For ConvAI2, we compare the error for using $100\%$ data, $50\%$ data and $10\%$ data. As shown in Table 5 and Figure 19, when we use half of the data, the error is similar to the one using full data. If we only use $10\%$ data, ENIGMA becomes very inaccurate. OPE under low resource setting remains very challenging.
+
+In Figure 19, we study the estimation error under different sizes of the experience data. As can be seen, when using $50\%$ data, the reward value estimation is very similar to the one of using full data. When using only $10\%$ data, the error is larger and ENIGMA has lower correlation with the true reward.
+
+# A More Challenging Setting.
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 18: Self-Play Evaluation vs. Human Evaluation for ConvAI2. The x-axis is the average reward obtained by chatting with human. The y-axis is the reward estimated by self-play evaluation. Different colors represent different language quality metrics. The solid line is obtained by simple linear regression.
+
+
+
+
+
+
+
+
+
+| Pearson Correlation |
| Setting | Avoid Rep. | Enjoy | Fluency | Inquisitive | Interest |
| Full Data | 0.9792 | 0.9661 | 0.9767 | 0.9584 | 0.9488 |
| 50% Data | 0.9573 | 0.9046 | 0.9550 | 0.9237 | 0.8644 |
| 10% Data | 0.9266 | 0.6595 | 0.8910 | 0.8286 | 0.5052 |
| Selected Data | 0.6944 | 0.6759 | 0.7762 | 0.5605 | 0.5820 |
| Setting | Listen | Make Sense | Persona | Reward | Turing |
| Full Data | 0.9754 | 0.9788 | 0.9415 | 0.9773 | 0.9637 |
| 50% Data | 0.8971 | 0.9585 | 0.8770 | 0.9374 | 0.8506 |
| 10% Data | 0.7455 | 0.8100 | 0.4544 | 0.8240 | 0.6825 |
| Selected Data | 0.5520 | 0.7402 | 0.6879 | 0.6968 | 0.5394 |
+
+| Spearman's rank correlation |
| Setting | Avoid Rep. | Enjoy | Fluency | Inquisitive | Interest |
| Full Data | 0.8905 | 0.9070 | 0.9178 | 0.8717 | 0.9210 |
| 50% Data | 0.7558 | 0.7980 | 0.6651 | 0.8482 | 0.7727 |
| 10% Data | 0.4128 | 0.6147 | 0.6492 | 0.6335 | 0.4713 |
| Selected Data | 0.5138 | 0.5561 | 0.4522 | 0.3168 | 0.6027 |
| Setting | Listen | Make Sense | Persona | Reward | Turing |
| Full Data | 0.9240 | 0.9448 | 0.9205 | 0.9485 | 0.9213 |
| 50% Data | 0.7784 | 0.8647 | 0.8293 | 0.7750 | 0.7026 |
| 10% Data | 0.3914 | 0.5096 | 0.3651 | 0.5774 | 0.5893 |
| Selected Data | 0.4585 | 0.6126 | 0.5844 | 0.6672 | 0.4259 |
+
+Table 5: The correlation between different metrics and ENIGMA estimation. Each column is each average language quality score obtained by chatting with human. Different rows represent different experience data ENIGMA used.
+
+Considering that some target agents are similar to the behavior policies with only slight difference in the way of decoding, they might yield very the similar dialog when the human acts in the same way. Specifically, in the data collection process, the target model might yield the responses that are very similar to the ones of the behavior policy for all turns in the dialog: EditDistance $(a_{t}, a_{t}^{\prime}) \leq 15 \forall 0 \leq t \leq T$ . For a more realistic setting, we consider removing these highly overlapped dialogs after the data collection
+
+
+Figure 19: Error Analysis on Convai2 under different data size. The x-axis is the true average reward. The y-axis is the ENIGMA error. The solid line is the fitted quadratic function. Blue, orange, green colors represent $100\%$ , $50\%$ , $10\%$ datasets respectively.
+
+
+
+
+
+
+
+
+
+process. This setting is very challenging that the target policy behavior is less covered by the experience data and ENIGMA can only hopefully generalize via pre-trained RoBERTa. The results are shown in Figure 20 and Table 5. As can be seen, this setting remains challenging as the Pearson correlation is between 0.5 and 0.8. For comparison, we present the regression plot for self-play evaluation using this challenging subset of the experience data in Figure 21.
+
+
+Figure 20: ENIGMA vs. Human Evaluation for ConvAI2 under the challenging setting. The x-axis is the average reward obtained by chatting with human. The y-axis it the reward estimated by ENIGMA. Different colors represent different language quality metrics. The solid line is obtained by simple linear regression.
+
+
+
+
+
+
+
+We remark that such experiments can also be done for AirDialog. However, due to the limitation that most agents are just learning template responses due to the goal-oriented nature, removing overlapped dialogs results in an extremely incomplete experience dataset. For example, most "cancelation" dialogs will be removed since they are very simple and basically the same for different agents. As a result ENIGMA can not make a reasonable estimation due to the highly incomplete experience data.
+
+Figure 22 compares the error of ENIGMA between using the normal experience data and the selected challenging one. As can be seen, the error using the selected data is larger particularly for the agents with exceptionally low/high true reward. That indicates the problem of the lack of dialog coverage is exaggerated under the challenging setting, while the ENIGMA estimation remains accurate when there is sufficient dialog coverage.
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 21: Self-Play Evaluation vs. Human Evaluation for ConvAI2 under the challenging setting. The x-axis is the average reward obtained by chatting with human. The y-axis it the reward estimated by self-play evaluation. Different colors represent different language quality metrics. The solid line is obtained by simple linear regression.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Normal Selected
+
+
+Figure 22: ENIGMA Error Comparison between using normal and selected challenging experience data on ConvAI2. The x-axis is the true average reward. The y-axis is the ENIGMA error. The solid line is the fitted quadratic function. The histogram is the empirical distribution of the rewards of all the experience data. Orange represents challenging dataset, and blue represents normal dataset.
+
+
+
+
+
+
+
+
+
+# Comparison to Automatic Hand-crafted Metrics.
+
+We compare ENIGMA with other automatic hand-crafted metrics proposed in See et al. (2019). For a more intuitive comparison, we use heat map and box plot to visualize the correlations between different automatic evaluation metrics and different human evaluation metrics. As can be seen in Figure 23 and Figure 24, most hand-crafted metrics have relatively low correlation to human evaluation metrics. The only exception is the "question marks" automatic metrics for inquisitive human evaluation metric. Some hand-crafted metrics have high Pearson correlation to some human evaluation metrics, while the corresponding Spearman's rank correlation is low. The reason is that they can easily identify some extremely good/bad agents while they are less effective for identifying agents with similar performance.
+
+Comparison to BLEU, BLEURT, and BERTscore. We compare ENIGMA with other automatic single-turn language quality metrics in Figure 23: BLEU, BLEURT (Sellam et al., 2020), and BERTscore (Zhang et al., 2019). As can be seen, these metrics only have high correlation to certain human evaluation metrics and low correlation to other metrics. Note that, we do not compare the perplexity as the agents rely on complicated decoding methods (See et al., 2019) and perplexity does not take decoding into consideration.
+
+ | Avoid Rep. | Enjoy | Fluency | Inquisitive | Interest | Listen | Make Sense | Persona Guess | Reward | Turing |
| Repetition External Bigram | 0.94 | 0.50 | 0.17 | 0.22 | 0.55 | 0.53 | 0.08 | 0.03 | 0.48 | 0.57 |
| Repetition External Unigram | 0.93 | 0.49 | 0.18 | 0.29 | 0.54 | 0.52 | 0.07 | 0.03 | 0.48 | 0.56 |
| Repetition Internal Bigram | 0.35 | 0.40 | 0.15 | 0.38 | 0.48 | 0.25 | 0.16 | 0.09 | 0.34 | 0.30 |
| Repetition Internal Unigram | 0.65 | 0.33 | 0.13 | 0.45 | 0.34 | 0.31 | 0.10 | 0.14 | 0.35 | 0.40 |
| Repetition Partner Rep. Bigram | 0.33 | 0.16 | 0.42 | 0.34 | 0.03 | 0.16 | 0.51 | 0.11 | 0.22 | 0.08 |
| Specificity | 0.05 | 0.29 | 0.69 | 0.52 | 0.09 | 0.47 | 0.64 | 0.18 | 0.43 | 0.34 |
| Response-rel | 0.02 | 0.29 | 0.54 | 0.26 | 0.16 | 0.17 | 0.45 | 0.45 | 0.33 | 0.22 |
| Questions | 0.16 | 0.17 | 0.26 | 0.69 | 0.11 | 0.13 | 0.34 | 0.26 | 0.21 | 0.06 |
| 8 Features + Linear Regression | 0.74 | 0.58 | 0.59 | 0.75 | 0.54 | 0.64 | 0.44 | -0.03 | 0.61 | 0.53 |
| BERTscore-P | 0.07 | 0.56 | 0.84 | 0.49 | 0.42 | 0.66 | 0.79 | 0.16 | 0.64 | 0.54 |
| BERTscore-R | 0.02 | 0.60 | 0.70 | 0.54 | 0.57 | 0.58 | 0.72 | 0.30 | 0.61 | 0.46 |
| BERTscore-F1 | 0.06 | 0.59 | 0.84 | 0.53 | 0.48 | 0.66 | 0.80 | 0.20 | 0.66 | 0.54 |
| BLEURT | 0.32 | 0.54 | 0.50 | 0.16 | 0.52 | 0.66 | 0.51 | 0.20 | 0.55 | 0.56 |
| BLEU | 0.09 | 0.42 | 0.59 | 0.68 | 0.33 | 0.50 | 0.64 | 0.07 | 0.48 | 0.32 |
| SPE Full Data | 0.73 | 0.60 | 0.66 | 0.70 | 0.10 | 0.74 | 0.88 | 0.29 | 0.48 | 0.71 |
| SPE Challenging Data | 0.40 | 0.29 | 0.50 | 0.39 | 0.18 | 0.53 | 0.69 | -0.17 | 0.30 | 0.45 |
| ENIGMA Full Data | 0.98 | 0.97 | 0.98 | 0.96 | 0.95 | 0.98 | 0.98 | 0.94 | 0.98 | 0.96 |
| ENIGMA 50% Data | 0.96 | 0.90 | 0.96 | 0.92 | 0.86 | 0.90 | 0.96 | 0.88 | 0.94 | 0.85 |
| ENIGMA 10% Data | 0.93 | 0.66 | 0.89 | 0.83 | 0.51 | 0.75 | 0.81 | 0.45 | 0.82 | 0.68 |
| ENIGMA Challenging Data | 0.69 | 0.68 | 0.78 | 0.56 | 0.58 | 0.55 | 0.74 | 0.69 | 0.70 | 0.54 |
+
+(a) Pearson Correlation
+
+ | Avoid Rep. | Enjoy | Fluency | Inquisitive | Interest | Listen | Make Sense | Persona Guess | Reward | Turing |
| Repetition External Bigram | 0.26 | 0.07 | 0.18 | 0.42 | 0.06 | 0.02 | 0.25 | 0.40 | 0.02 | 0.07 |
| Repetition External Unigram | 0.27 | 0.21 | 0.12 | 0.07 | 0.25 | 0.03 | 0.06 | 0.12 | 0.17 | 0.28 |
| Repetition Internal Bigram | 0.17 | 0.00 | 0.12 | 0.10 | 0.09 | 0.18 | 0.28 | 0.00 | 0.04 | 0.03 |
| Repetition Internal Unigram | 0.22 | 0.15 | 0.07 | 0.07 | 0.19 | 0.10 | 0.11 | 0.07 | 0.11 | 0.22 |
| Repetition Partner Rep. Bigram | 0.37 | 0.12 | 0.12 | 0.27 | 0.18 | 0.01 | 0.22 | 0.18 | 0.08 | 0.13 |
| Specificity | 0.30 | 0.11 | 0.23 | 0.33 | 0.18 | 0.06 | 0.28 | 0.43 | 0.03 | 0.09 |
| Response-rel | 0.26 | 0.17 | 0.07 | 0.08 | 0.26 | 0.07 | 0.15 | 0.22 | 0.11 | 0.15 |
| Questions | 0.18 | 0.13 | 0.28 | 0.75 | 0.13 | 0.18 | 0.45 | 0.37 | 0.17 | 0.03 |
| 8 Features + Linear Regression | 0.48 | 0.45 | 0.52 | 0.79 | 0.28 | 0.48 | 0.53 | 0.35 | 0.45 | 0.42 |
| BERTscore-P | 0.47 | 0.56 | 0.65 | 0.28 | 0.48 | 0.74 | 0.61 | 0.27 | 0.64 | 0.60 |
| BERTscore-R | 0.19 | 0.45 | 0.41 | 0.66 | 0.49 | 0.51 | 0.47 | 0.11 | 0.48 | 0.33 |
| BERTscore-F1 | 0.44 | 0.59 | 0.57 | 0.42 | 0.55 | 0.70 | 0.55 | 0.29 | 0.65 | 0.54 |
| BLEURT | 0.48 | 0.51 | 0.43 | 0.01 | 0.45 | 0.69 | 0.45 | 0.24 | 0.55 | 0.59 |
| BLEU | 0.05 | 0.23 | 0.36 | 0.72 | 0.22 | 0.36 | 0.42 | 0.17 | 0.28 | 0.14 |
| SPE Full Data | 0.60 | 0.47 | 0.55 | 0.64 | 0.14 | 0.48 | 0.56 | 0.15 | 0.23 | 0.55 |
| SPE Challenging Data | 0.21 | 0.08 | 0.25 | 0.20 | 0.06 | 0.18 | 0.32 | -0.08 | -0.01 | 0.22 |
| ENIGMA Full Data | 0.89 | 0.91 | 0.92 | 0.87 | 0.92 | 0.92 | 0.94 | 0.92 | 0.95 | 0.92 |
| ENIGMA 50% Data | 0.76 | 0.80 | 0.67 | 0.85 | 0.77 | 0.78 | 0.86 | 0.83 | 0.78 | 0.70 |
| ENIGMA 10% Data | 0.41 | 0.61 | 0.65 | 0.63 | 0.47 | 0.39 | 0.51 | 0.37 | 0.58 | 0.59 |
| ENIGMA Challenging Data | 0.51 | 0.56 | 0.45 | 0.32 | 0.60 | 0.46 | 0.61 | 0.58 | 0.67 | 0.43 |
+
+(b) Spearman's Rank Correlation
+
+Figure 23: Heat map for correlation between different automatic evaluation metrics and different human evaluation metrics. Different rows represent different automatic metrics. Different column represent different human evaluation metrics.
+
+
+(a) Pearson Correlation
+
+
+(b) Spearman's Rank Correlation
+Figure 24: Box plot of performance. Each box corresponds to each method. There are 10 points for each box representing correlations to 10 different human evaluation metrics.
+
+# D.4 Error Analysis
+
+We analyze the detailed errors to identify the error pattern for better understand the limit of ENIGMA. We calculate the absolute difference between the estimation and the true average reward. The results are summarized in Figure 25. A common pattern we see in ConvAI2 is that, when the true average reward is too high or too low, the ENIGMA becomes less accurate. One possible reason for that is the lack of samples of dialogs with the extreme rewards in the experience data. We empirically verify this conjecture by comparing the the error with the reward distribution in the experience data in Figure 25. For AirDialog, such pattern is not obvious. That is because the quality of the decision module is more important to the agent performance for this task completion scores. As a result, even performance of the target agent is much higher/lower than the experience data, as long as they share similar languages, ENIGMA can estimate the performance accurately.
+
+
+
+
+(a) AirDialog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 25: Error Analysis on AirDialog and ConvAI2. The x-axis is the true reward. The y-axis is the Estimation error. The solid line is the fitted quadratic function. The histogram is the empirical distribution of the true rewards of all the experience data.
+
+
+
+
+(b) ConvAI2
+
+
+
+
+
+# D.5 Embedding Visualization
+
+In Figure 26, we present the t-SNE plots for the embedding of the state-action pairs from the behavior experience data and the target policy. The two sets of embeddings provided by the pre-trained language models are largely overlapped with rich semantic information. On the other hand, the embeddings provided by a randomly initialized model spread over the entire high-dimensional space.
+
+
+(a) Initialized from RoBERTa-base.
+
+
+
+
+
+
+(b) Random initialization.
+
+
+Figure 26: t-SNE Plots for contextual embedding extracted from RoBERTa- $\zeta$ and RoBERTa- $\nu$ on AirDialog.
+
+
+
+# E Automatic Dialog Evaluation Comparison
+
+| Method | Criterion | Dynamic (RL) | Model Free | Experience Data | Behavior Policy Similar to Target Policy | Behavior Agnostic | Description / Examples |
| BLEU, Perplexity,METEOR,ROUGE (Papineni et al., 2002; Brown et al., 1992; Banerjee and Lavie, 2005; Lin, 2004; Galley et al., 2015) | Language Quality Score | No | N/A | Human-Human | Yes | N/A | The most widely use metrics: Given a fixed dialog history, they compute heuristic scores / statistics based on comparing single turn response given by the model and reference human responses. E.g., BLEU, perplexity |
| Mitchell and Lapata (2008); Rus and Lintean (2012); Forgues et al. (2014); Higashinaka et al. (2014); Xiang et al. (2014); Wieting et al. (2015); Gandhe and Traum (2016); Tao et al. (2017); Shimanaka et al. (2019); Zhang et al. (2019); Ghazarian et al. (2019); Li et al. (2020); Mehri and Eskenazi (2020); Gao et al. (2020); Lan et al. (2020); Pang et al. (2020); Zhang et al. (2020a); Yuma et al. (2020); Zhao et al. (2020); Sai et al. (2020) | Language Quality Score | No | N/A | Human-human experience data or specially designed data. | Yes (Implicitly) Although they do not explicitly require such similarity, the single-turn responses of models trained from the same data are usually similar to human responses. | N/A | Given a fixed dialog history, they compute some scores for single-turn response given by the model using an evaluator, e.g., pretrained word embeddings and pretrained language models. These method are the so-called "embedding-based metrics". The evaluator usually require training on a large-scale text dataset. They may or may not depends on reference human responses. E.g. RUBER (Tao et al., 2017). |
| Lowe et al. (2017); Huang et al. (2020); Sellam et al. (2020) | Language Quality Score | No | N/A | Human-Human and Human-Model | Yes | N/A | Mostly the same as above. In addition, the data for training the evaluator includes human-model experience data to improve performance. E.g., ADEM (Lowe et al., 2017). |
| Hemphill et al. (1990); Williams et al. (2013) | Task Completion Score | No | N/A | Human-Human | No | N/A | They compute task related score of task-specific actions (e.g., intent detection) given by the model for a fixed complete dialog. These can only be used to test classification / information retrieval module. E.g., Intent Detection Accuracy. |
| Wei et al. (2018) | Task Completion Score | Yes | No | Human-Human and/or Human-Model | Yes (Implicitly) | N/A | They compute task related score of task-specific actions (e.g., intent detection) given by the model for a dialog that is obtained by interaction with a user simulator. E.g., Self-Play Evaluation (Wei et al., 2018). |
| Ghandeharioun et al. (2019) | Language Quality Score | Yes | No | Human-Model | Yes | N/A | Basically the same as above. In addition to modeling human responses, they usually require modeling human reward function. E.g., Self-Play Evaluation (Ghandeharioun et al., 2019). |
| Inverse Proportional Score E.g., Horvitz and Thompson (1952); Wang et al. (2020a); Precup (2000) (not practical for dialog ) | Both | Yes | Yes | Human-Model | Yes | No (not practical for dialog) | Directly model the performance under the interaction environment using experience collected from known probabilistic models. E.g., Inverse Proportional Score. |
| ENIGMA | Both | Yes | Yes | Human-Model | Yes | Yes | Directly model the performance under interaction environment using experience collected from unknown distribution. E.g., Q-Learning, ENIGMA. |
+
+Table 6: Comparison between current automatic evaluation approaches. Part of the table is collected from two comprehensive surveys (Finch and Choi, 2020; Deriu et al., 2020). Red: Drawback; Green: Advantage.
+
+# E.1 Static Methods
+
+As can be seen, most previous methods only focus on evaluating language quality for single-turn response of a fixed context. These methods can not evaluate agents under interactive context. As a result, they can not be extended to goal-oriented dialogs.
+
+For goal-oriented dialogs, the static evaluation methods are very limited. The static methods can only evaluate the model actions to a fixed complete dialog, e.g., intent detection.
+
+Comparison to Meena Paper (Adiwardana et al., 2020): 1. They only show that PPL correlates with one specific metric: Sensibleness and Specificity Average. We consider a wide range of metrics for both task-completion scores and dialog quality scores (listed in Table 7). No evidence shows PPL correlates well with most metrics. 2. They draw the conclusion using only 7 chatbots. This conclusion is not statistically reliable, i.e. for $R^2 = 0.93$ with 7 data points, the $95\%$ confident interval is $0.64 \leq R^2 \leq 0.99$ . On the other hand, we use 24/29 agents. With 24 data points, the $95\%$ CI is $0.87 \leq R^2 \leq 0.96$ , which is much more reliable.
+
+# E.2 Dynamic Methods
+
+Previous dynamic methods under RL framework are based on self-play evaluation, which requires learning the environment, i.e., human. As discussed in the main paper, learning a human model is significantly beyond the current technical limit.
+
+ENIGMA overcome learning the environment by directly modeling the performance of agents.
+
+# E.3 Information Theoretic Limit
+
+The common limitation of all existing methods is that they require similarity between the target policy and behavioral policies, so that the experience data can cover sufficient interaction patterns between the target policy and human.
+
+For example, BLEU score requires the agent response being similar to the reference response. Another example is ADEM (Lowe et al., 2017), they include the target policy into the experience data collection to achieve decent performance (0.37 Pearson correlation to human ratings). If the target policy is excluded from the behavior policies, ADEM only achieves 0.13 Pearson correlation, which is even lower than the one between dialog length and human ratings 0.27.
+
+For static single-turn evaluation for language quality, one might satisfy the requirement by just using human as the behavior policy and large-scale diverse experience data. That is because the single-turn responses of the target model have a very similar pattern to the human responses, as they are usually trained to mimic one-turn human response. However, high similarity of responses between the target model and human requires a very strong target model trained with large-scale data, which is not practical in most settings. Some existing work try to alleviate such requirement and increase the coverage of experience data by external knowledge graph (Huang et al., 2020) and synthetic samples (Sellam et al., 2020). We remark that although the static methods only require single-turn similarity between behavior and target policies, their empirical performance is unsatisfactory comparing with multi-turn interactive human evaluation (Ghandeharioun et al., 2019).
+
+In multi-turn interactive evaluation, we can not just use human as the behavior policy especially for goal-oriented dialogs. That is because the multi-turn behavior of the target model is very different from the human behavior. Take Airdialog as an example, human agents can always book the correct tickets while the target model may fail for many times.
+
+Such a limitation is the theoretical requirement of bounded state-action density ratio between target and behavior policies, which has been discussed in many off-policy evaluation literature (Wang et al., 2020b; Xie et al., 2019).
+
+Due to such theoretical limitation, a large amount of human-model interactive evaluation data is needed to study automatic interactive evaluation. However, most evaluation logs are not publicly available, and research in this direction has largely lagged behind. To the best of our knowledge, ConvAI2 (See et al., 2019) is the only public comprehensive human-model interactive evaluation data. Therefore, we recommend that the research community release human-model interaction evaluation data to promote dialog evaluation/learning research and benefit the entire community.
\ No newline at end of file
diff --git a/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/images.zip b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..190350c2ffa7944987a34d87af5e9f1e4a58f54a
--- /dev/null
+++ b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f25ca6935dfb450a1320e1d95ce79d3bc641574207b7d045375e79b2f35d3abd
+size 2529599
diff --git a/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/layout.json b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..14a1fed91c8f1571ef5867d9ef0fca0d5f43b90b
--- /dev/null
+++ b/towardsautomaticevaluationofdialogsystemsamodelfreeoffpolicyevaluationapproach/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:efb4abbbe3a46bb954bb50988e303f1e3b853eefc1d2c921f3f8a068341402b2
+size 1092030
diff --git a/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/4baa31e1-1848-401d-906e-52fb6ac80982_content_list.json b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/4baa31e1-1848-401d-906e-52fb6ac80982_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..4f2c3f87a0c4680196626e05adebd0ae3976916e
--- /dev/null
+++ b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/4baa31e1-1848-401d-906e-52fb6ac80982_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:314b3d283356d09f15083879c506fa5afe4b5f379b1311d1dab0d6db8c221828
+size 79184
diff --git a/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/4baa31e1-1848-401d-906e-52fb6ac80982_model.json b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/4baa31e1-1848-401d-906e-52fb6ac80982_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..665ed650a812b6baa3d6ddc897757fc8de023019
--- /dev/null
+++ b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/4baa31e1-1848-401d-906e-52fb6ac80982_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:934045e3ab137a4e4012b85d2b9305015f27e984b3dca1d65c93c27606a6ab6c
+size 92048
diff --git a/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/4baa31e1-1848-401d-906e-52fb6ac80982_origin.pdf b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/4baa31e1-1848-401d-906e-52fb6ac80982_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..5a341b096abc74c95bb96d8294c3a4b410c392fd
--- /dev/null
+++ b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/4baa31e1-1848-401d-906e-52fb6ac80982_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0e284dace53c05c2ac0a5f8919fac6d46051f59c24110664f63f3f75ce73b1ec
+size 2232538
diff --git a/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/full.md b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..8127833ac301f30652f2d27f852d78f81ed6c106
--- /dev/null
+++ b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/full.md
@@ -0,0 +1,247 @@
+# Towards Incremental Transformers: An Empirical Analysis of Transformer Models for Incremental NLU
+
+Patrick Kahardipraja Brien Madureira David Schlangen
+
+Computational Linguistics, Department of Linguistics
+
+University of Potsdam, Germany
+
+{kahardipraja,madureiraliasota,david.schlangen}@uni-potsdam.de
+
+# Abstract
+
+Incremental processing allows interactive systems to respond based on partial inputs, which is a desirable property e.g. in dialogue agents. The currently popular Transformer architecture inherently processes sequences as a whole, abstracting away the notion of time. Recent work attempts to apply Transformers incrementally via restart-incrementality by repeatedly feeding, to an unchanged model, increasingly longer input prefixes to produce partial outputs. However, this approach is computationally costly and does not scale efficiently for long sequences. In parallel, we witness efforts to make Transformers more efficient, e.g. the Linear Transformer (LT) with a recurrence mechanism. In this work, we examine the feasibility of LT for incremental NLU in English. Our results show that the recurrent LT model has better incremental performance and faster inference speed compared to the standard Transformer and LT with restart-incrementality, at the cost of part of the non-incremental (full sequence) quality. We show that the performance drop can be mitigated by training the model to wait for right context before committing to an output and that training with input prefixes is beneficial for delivering correct partial outputs.
+
+# 1 Introduction
+
+One fundamental property of human language processing is incrementality (Keller, 2010). Humans process language on a word-by-word basis by maintaining a partial representation of the sentence meaning at a fast pace and with great accuracy (Marslen-Wilson, 1973). The garden path effect, for example, shows that language comprehension is approximated incrementally before committing to a careful syntactic analysis (Frazier and Rayner, 1982; Altmann and Steedman, 1988; Trueswell et al., 1994, inter alia).
+
+The notion of order along the time axis during computation is a key aspect of incremental pro
+
+cessing and thus a desirable property both of cognitively plausible language encoders as well as in applications such as interactive systems (Skantze and Schlangen, 2009). RNNs, for example, are inherently able to process words sequentially while updating a recurrent state representation. However, the Transformer architecture (Vaswani et al., 2017), which has brought significant improvements on several NLP tasks, processes the input sequence as a whole, thus prioritising parallelisation to the detriment of the notion of linear order.
+
+One way to employ non-incremental models in incremental settings is resorting to an incremental interface, like in Beuck et al. (2011), where a complete recomputation of the available partial input happens at each time step to deliver partial output. Madureira and Schlangen (2020) examined the output stability of non-incremental encoders in this restart-incremental fashion. While qualitatively feasible, this procedure is computationally costly, especially for long sequences, since it requires as many forward passes as the number of input tokens.
+
+In parallel, there is ongoing research on ways to make Transformers more efficient, e.g. the Linear Transformer (LT) introduced by Katharopoulos et al. (2020). Besides being more efficient, LTs can be employed with a recurrence mechanism based on causal masking that turns them into models similar to RNNs. In this work, we examine the suitability of using LTs in incremental processing for sequence tagging and classification in English. We also inspect the use of the delay strategy (Baumann et al., 2011; Oda et al., 2015; Ma et al., 2019) to examine the effect of right context availability on the model's incremental performance. Our hypothesis is that recurrence will allow LTs to be better in incremental processing as it captures sequence order. As LTs use an approximation of softmax attention, we also expect a performance drop compared to the standard Transformer while being faster in the incremental setting due to its linear time attention.
+
+# 2 Related Work
+
+In recent years, neural approaches, including Transformer-based architectures (Vaswani et al., 2017), have become more popular for incremental processing. Given that Transformer models are not inherently incremental, employing them for incremental processing demands adaptation.
+
+In simultaneous translation, for instance, Ma et al. (2019) proposed to use an incremental encoder by limiting each source word to attend to its predecessors and recompute the representation for previous source words when there is new input. Zhang et al. (2021) introduced an average embedding layer to avoid recalculation when using an incremental encoder, while exploiting right context through knowledge distillation. An investigation of the use of non-incremental encoders for incremental NLU in interactive systems was conducted by Madureira and Schlangen (2020). The authors employed BERT (Devlin et al., 2019) for sequence tagging and classification using restart-incrementality, a procedure with high computational cost.
+
+The computational cost of a restart-incremental Transformer can be reduced with more efficient models or even avoided if an inherently incremental Transformer architecture existed. Recent works have proposed modifications that could help achieve that. For instance, by approximating the softmax attention with a recurrent state (Katharopoulos et al., 2020; Choromanski et al., 2021; Peng et al., 2021). The Linear Transformer model (Katharopoulos et al., 2020, LT henceforth) can be viewed as an RNN when the attention is causal (see also, very recently, Kasai et al., 2021).
+
+# 3 Methods
+
+# 3.1 Overview of the Linear Transformer
+
+In LTs, the similarity score between a query and a key for the $i$ -th position is computed using a kernel function. The causal attention can be written as:
+
+$$
+\operatorname {A t t} _ {i} (Q, K, V) = \frac {\phi \left(Q _ {i}\right) ^ {T} S _ {i}}{\phi \left(Q _ {i}\right) ^ {T} Z _ {i}} \tag {1}
+$$
+
+$$
+S _ {i} = \sum_ {j = 1} ^ {i} \phi (K _ {j}) V _ {j} ^ {T}; Z _ {i} = \sum_ {j = 1} ^ {i} \phi (K _ {j}) \tag {2}
+$$
+
+with feature map $\phi (x) = \mathrm{elu}(x) + 1$ where $\mathrm{elu}(\cdot)$ denotes the exponential linear unit (Clevert et al., 2016). Hence, $S_{i}$ and $Z_{i}$ can be viewed as a recur
+
+rent state:
+
+$$
+S _ {i} = S _ {i - 1} + \phi (K _ {i}) V _ {i} ^ {T} \tag {3}
+$$
+
+$$
+Z _ {i} = Z _ {i - 1} + \phi \left(K _ {i}\right) \tag {4}
+$$
+
+with $S_0 = Z_0 = 0$ . As an RNN, the run-time complexity is linear with respect to the sequence length and constant for each added token, which promises faster inference compared to the restart-incremental approach.
+
+# 3.2 Models
+
+We examine the behaviour of Transformer models used as incremental processors on token level, in five configurations (Table 1):
+
+1. Baseline: the standard Transformer encoder incrementalised via restart-incrementality, trained with access to full sequences.
+2. LT: the LT encoder incrementalised via restart-incrementality, trained with access to full sequences.
+3. $\mathbf{LT} + \mathbf{R}$ : the LT encoder trained as in (2) but during test time we use its recurrent state vector to predict the label at each time step, as in an RNN.
+4. LT+R+CM: the LT encoder trained with causal masking to ensure each token representation can only attend to previous tokens. During inference, we convert the model to an RNN as in (3). Training with input prefixes aims at encouraging the learning of intermediate structures (Kohn and Menzel, 2014) and the anticipation of future output (Ma et al., 2019).
+5. $\mathbf{LT} + \mathbf{R} + \mathbf{CM} + \mathbf{D}$ : similar to (4), but, during training, the output for the input token $x_{t}$ is obtained at time $t + d$ , where $d \in \{1,2\}$ is the delay, following the approach in Turek et al. (2020). There is evidence that additional right context improve the models' incremental performance (Baumann et al., 2011; Ma et al., 2019; Madureira and Schlangen, 2020), which results in a trade-off between providing timely output or waiting for more context to deliver more stable output.
+
+We also delay the output by 1 and 2 time steps for the baseline and LT following Madureira and Schlangen (2020), to provide a fair comparison on incremental metrics. Note that outputs from both (1) and (2) are non-monotonic, as labels can be
+
+reassigned when a new input token is observed. The other models deliver monotonic output for sequence tagging as RNNs. A slight modification is needed for sequence classification as each sequence is mapped to a single label. We average the hidden representation at the last layer and project it linearly, followed by a softmax to obtain the sequence label $\hat{y}_t$ based on the consumed input until time $t$ . For LT+ models, we use incremental averaging to avoid recomputation. By doing this, sequence classification is performed similarly for all models.
+
+| Models | Restart Incremental | Recurrence | Causal Masking | Delay |
| Baseline | ✓ | - | - | -* |
| LT | ✓ | - | - | -* |
| LT+R | - | ✓ | - | - |
| LT+R+CM | - | ✓ | ✓ | - |
| LT+R+CM+D | - | ✓ | ✓ | ✓ |
+
+Table 1: Overview of the Transformer models. * means we perform further comparisons with a delayed variant.
+
+# 4 Experimental Setup
+
+# 4.1 Datasets
+
+We evaluate our models on 9 datasets in English, which were also used in Madureira and Schlangen (2020). The tasks consist of sequence tagging: slot filling (ATIS, Hemphill et al. (1990); Dahl et al. (1994) and SNIPS, Coucke et al. (2018)), chunking (CoNLL-2000, Tjong Kim Sang and Buchholz (2000)), NER and PoS tagging (OntoNotes 5.0, WSJ section, Weischedel et al. (2013)); and sequence classification: intent detection (ATIS and SNIPS) and sentiment classification (positive/negative, Kotzias et al. (2015) and pros/cons, Ganapathibhotla and Liu (2008)). More details are available in the Appendix.
+
+# 4.2 Evaluation
+
+The overall performance of the models is measured with accuracy and F1 Score, according to the task. For the incremental evaluation, we report the diachronic metrics proposed by Baumann et al. (2011) and adapted in Madureira and Schlangen (2020): edit overhead (EO, the proportion of unnecessary edits over all edits), correction time score (CT, the average proportion of time steps necessary to reach a final decision), and relative correctness (RC, the proportion of time steps in which the output is a correct prefix of the final, non-incremental output).
+
+To focus on the incremental quality of the models and allow a clear separation between incremen
+
+tal and non-incremental evaluation, we follow the approach by Baumann et al. (2011) and Madureira and Schlangen (2020), evaluating incremental outputs with respect to the final output produced by the models. While the final output may differ from the gold standard, it serves as the target for the incremental output, as the non-incremental performance is an upper bound for incremental processing (Baumann et al., 2011).
+
+# 4.3 Implementation
+
+We re-implement the Transformer and use the original implementation of the LT.1 All models are trained to minimise cross-entropy with the AdamW optimiser (Loshchilov and Hutter, 2019). We use 300-D GloVe embeddings (Pennington et al., 2014) which are passed through a linear projection layer with size $d_{\mathrm{model}}$ . All experiments were performed on a GPU GeForce GTX 1080 Ti. Details on the implementation, hyperparameters and reproducibility are available in the Appendix. Our implementation is publicly available.2
+
+5 Results and Discussion
+
+| Tasks | Baseline | LT | LT+R | LT+R +CM | LT+R+ CM+D1 | LT+R+ CM+D2 |
| ATIS-Slot | 94.51 | 93.67 | 86.84 | 93.78 | 94.38 | 93.54 |
| SNIPS-Slot | 90.13 | 87.98 | 63.16 | 81.88 | 85.72 | 86.91 |
| Chunk | 91.27 | 88.42 | 67.54 | 86.63 | 89.42 | 89.33 |
| NER | 89.55 | 86.13 | 52.04 | 69.09 | 81.39 | 85.55 |
| PoS Tagging | 96.88 | 96.49 | 89.30 | 95.11 | 96.49 | 96.55 |
| ATIS-Intent | 97.20 | 97.09 | 95.63 | 95.74 | 96.53 | 96.53 |
| SNIPS-Intent | 97.14 | 97.14 | 83.71 | 96.43 | 97.14 | 96.86 |
| Pos/Neg | 86.00 | 85.17 | 68.00 | 80.33 | 81.16 | 82.67 |
| Pros/Cons | 94.42 | 94.21 | 90.97 | 94.37 | 94.56 | 94.46 |
+
+Table 2: Non-incremental performance of our models on test sets (first group, F1, second group, accuracy). Here, the baseline performs generally better than the LT variants.
+
+Ultimately, the quality of the output when all input has been seen matters; hence, we first look at the non-incremental or full-sequence performance, in Table 2. We can see that LTs do not outperform the baseline here, although they have the advantage of being faster (Table 3). We see two possible reasons for this: First, as the LT variants strictly go left-to-right through the sequence, they have less information for each token to make their decision. This can be alleviated by allowing $\mathrm{LT + R + CM}$ to
+
+wait for 1 or 2 tokens before producing partial output, and indeed we see an overall performance increase of $0.1\% - 16.5\%$ for the +D variants. Second, we suspect that the chosen feature map in LTs to approximate the softmax attention is sub-optimal, and a further gating mechanism could yield a better performance (Peng et al., 2021).
+
+Comparing $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ against $\mathrm{LT} + \mathrm{R}$ , we observe that training on prefixes yields a better result during test time, as $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ may learn anticipation as a by-product, in line with the work of Ma et al. (2019). $\mathrm{LT} + \mathrm{R} + \mathrm{CM} + \mathrm{D}$ performs competitively with LT, outperforming the latter in 4 out of 9 datasets. This is likely due to the better capability of the delayed network in modelling both non-linear and acausal functions that appear in some of the tasks (Turek et al., 2020).
+
+Figure 1 depicts the incremental metrics of all models. The EO and CT score for sequence tagging is low for all models, which indicates that the models are capable, in general, of producing stable and accurate partial outputs. Notice that the LT+ models are not able to revise the output in sequence tagging. For sequence classification, the models have higher EO and CT score due to the fact that the label is a function of the whole sequence and the model might be unable to reach an early decision without enough right context.
+
+$\mathrm{LT + R + CM}$ performs better in incremental metrics compared to the baseline and LT in sequence classification. This is evidence that the notion of order is important for incremental processing, as the recurrent state in the LT allows partial representation updates along the time axis when processing partial input. Here, sequence classification is treated in a similar fashion for all models, by using the average of the hidden representation in the last layer.
+
+All the models have high RC score in general for both sequence tagging and classification. This means that most of the partial outputs are a correct prefix of the final ("non-incremental") output and could fruitfully be used as input to subsequent processors in an incremental pipeline. For RC, $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ also outperforms both the baseline and LT in all tasks. A delay of 1 or 2 tokens before committing to an output also helps to improve the incremental performance across all models. In terms of incremental inference speed, we see that the recurrent mode is more than 10 times faster compared to using restart-incrementality (Table 3).
+
+To understand the models' behaviour better, especially pertaining to their potential for real-time applications, we also examine their incremental inference speed for different sequence lengths as shown in Figure 2. As expected, $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ scales linearly and outperforms the baseline and LT considerably as the sequence becomes longer. The run-time performance of LT is slightly better than the baseline because of its linear time attention, however it is still slower compared to $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ as it is restart-incremental.
+
+
+
+
+
+
+
+
+Figure 1: Incremental evaluation on the test sets. EO, CT and RC $\in [0,1]$ , y-axes are clipped to improve readability. Lower is better for EO and CT, higher for RC. For EO, the lines on the bars refer to original, delay=1 and delay=2, from top to bottom, and vice versa for RC, showing that delay improves the results. LT+R+CM performs better compared to the baseline and LT.
+
+| Tasks | Baseline | LT | LT+R+CM |
| ATIS-Slot | 0.983 | 1.025 | 13.780 |
| SNIPS-Slot | 1.021 | 1.137 | 14.957 |
| Chunk | 0.393 | 0.448 | 6.023 |
| NER | 0.382 | 0.436 | 5.745 |
| PoS Tagging | 0.383 | 0.435 | 5.831 |
| ATIS-Intent | 0.883 | 1.005 | 13.310 |
| SNIPS-Intent | 0.995 | 1.129 | 14.907 |
| Pos/Neg | 0.725 | 0.767 | 9.962 |
| Pros/Cons | 1.073 | 1.228 | 14.979 |
| Average | 0.76 (1×) | 0.85 (1.12×) | 11.06 (14.55×) |
+
+
+Figure 2: Incremental inference speed of models from Table 3 with increasing sequence length. $\mathrm{LT + R + CM}$ scales linearly with sequence length unlike the baseline and LT. Note that the incremental inference speed of $\mathrm{LT + R + CM}$ is similar to $\mathrm{LT + R}$ .
+
+# 5.1 Ablations
+
+We examine the importance of word and positional embeddings on the baseline and $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ for non-incremental metrics (Table 4). We find that using pre-trained GloVe (Pennington et al., 2014) embeddings is beneficial for the models' performance. On average, it contributes 2.74 accuracy and 5.16 F1 for the baseline, while improving $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ by 1.6 and 2.55 points for accuracy and F1. On the other hand, we observe that positional embeddings play a less significant role in $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ compared to the baseline. Without them the performance, on average, for $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ improves in accuracy by 0.15 and the F1 score degrades by 1.35. The baseline, however, experiences degradation in performance by 1.79 and 18.46 points for accuracy and F1, on average. The recurrence mechanism may be a reason for the effect of positional embeddings being less pronounced in $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ .
+
+Table 3: Comparison of incremental inference speed on test sets, measured in sequences/sec. All the models have similar size with 4 layers, feed-forward dimension of 2048 and self-attention dimension of 512.
+
+ | Tasks | Score | -GloVe | -Pos | -Glove & Pos |
| Baseline |
| FI | ATIS-Slot | 94.51 | -3.02 | -17.99 | -20.44 |
| SNIPS-Slot | 90.13 | -6.74 | -16.39 | -21.47 |
| Chunk | 91.27 | -5.28 | -18.19 | -19.36 |
| NER | 89.55 | -5.61 | -21.27 | -26.07 |
| Accuracy | PoS Tagging | 96.88 | -0.79 | -3.31 | -4.15 |
| ATIS-Intent | 97.20 | -2.35 | -2.69 | -3.81 |
| SNIPS-Intent | 97.14 | -0.57 | +0.72 | -0.43 |
| Pos/Neg | 86.00 | -8.83 | -3.83 | -12.00 |
| Pros/Cons | 94.42 | -1.18 | +0.15 | -1.64 |
| LT+R+CM |
| FI | ATIS-Slot | 93.78 | -0.42 | -0.25 | -1.37 |
| SNIPS-Slot | 81.88 | -2.44 | -0.55 | -2.79 |
| Chunk | 86.63 | -3.82 | -3.35 | -7.30 |
| NER | 69.09 | -3.52 | -1.24 | -6.69 |
| Accuracy | PoS Tagging | 95.11 | -0.74 | -0.79 | -1.58 |
| ATIS-Intent | 95.74 | -0.89 | -0.11 | -0.67 |
| SNIPS-Intent | 96.43 | +0.14 | 0.00 | +0.28 |
| Pos/Neg | 80.33 | -6.00 | +1.17 | -9.00 |
| Pros/Cons | 94.37 | -0.53 | +0.46 | -0.83 |
+
+Table 4: Ablation of GloVe and positional embeddings on the baseline and LT+R+CM for non-incremental metrics.
+
+# 6 Conclusion
+
+We studied the use of Transformer encoders for incremental processing and concluded that it is possible to deploy them as incremental processors with certain trade-offs. With recurrent computation, the Linear Transformer (LT) has inferior non-incremental performance compared to the regular Transformer and the LT with restart-incrementality. However, it has the great advantage of being much more efficient for incremental processing, since recomputation at each time step is avoided. The output of the recurrent LT is generally more stable for sequence classification and monotonic for tagging. Its non-incremental performance drop can be mitigated by introducing delay, which also improves the incremental metrics. It is also beneficial to train such model with input prefixes, allowing it to learn more robust predictions.
+
+# Acknowledgements
+
+We thank the anonymous reviewers for their critical reading of our manuscript and their insightful comments and suggestions. This work is partially funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - Project ID 423217434 (Schlangen).
+
+# References
+
+Gerry Altmann and Mark Steedman. 1988. Interaction with context during human sentence processing. Cognition, 30(3):191-238.
+
+Timo Baumann, Okko Buß, and David Schlangen. 2011. Evaluation and optimisation of incremental processors. Dialogue & Discourse, 2(1):113-141. Special Issue on Incremental Processing in Dialogue.
+Niels Beuck, Arne Kohn, and Wolfgang Menzel. 2011. Decision strategies for incremental POS tagging. In Proceedings of the 18th Nordic Conference of Computational Linguistics (NODALIDA 2011), pages 26-33, Riga, Latvia. Northern European Association for Language Technology (NEALT).
+Krzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Quincy Davis, Afroz Mohiuddin, Lukasz Kaiser, David Benjamin Belanger, Lucy J Colwell, and Adrian Weller. 2021. Rethinking attention with performers. In 9th International Conference on Learning Representations, ICLR 2021, Vienna, Austria, May 3-7, 2021.
+Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. 2016. Fast and accurate deep network learning by exponential linear units (elus). In 4th International Conference on Learning Representations, ICLR 2016, San Juan, Puerto Rico, May 2-4, 2016, Conference Track Proceedings.
+Alice Coucke, Alaa Saade, Adrien Ball, Theodore Bluche, Alexandre Caulier, David Leroy, Clément Doumouro, Thibault Lavril, Maël Primet, and Joseph Dureau. 2018. Snips voice platform: an embedded spoken language understanding system for private-by-design voice interfaces. arXiv preprint, arXiv:1805.10190.
+Deborah A. Dahl, Madeleine Bates, Michael Brown, William Fisher, Kate Hunicke-Smith, David Pallett, Christine Pao, Alexander Rudnicky, and Elizabeth Shriberg. 1994. Expanding the scope of the ATIS task: The ATIS-3 corpus. In Human Language Technology: Proceedings of a Workshop held at Plainsboro, New Jersey, March 8-11, 1994.
+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.
+Haihong E, Peiqing Niu, Zhongfu Chen, and Meina Song. 2019. A novel bi-directional interrelated model for joint intent detection and slot filling. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5467-5471, Florence, Italy. Association for Computational Linguistics.
+Lyn Frazier and Keith Rayner. 1982. Making and correcting errors during sentence comprehension: Eye
+
+movements in the analysis of structurally ambiguous sentences. Cognitive Psychology, 14(2):178-210.
+Murthy Ganapathibhotla and Bing Liu. 2008. Mining opinions in comparative sentences. In Proceedings of the 22nd International Conference on Computational Linguistics (Coling 2008), pages 241-248, Manchester, UK. Coling 2008 Organizing Committee.
+Xavier Glorot and Yoshua Bengio. 2010. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, volume 9 of Proceedings of Machine Learning Research, pages 249-256, Chia Laguna Resort, Sardinia, Italy. PMLR.
+Charles T. Hemphill, John J. Godfrey, and George R. Doddington. 1990. The ATIS spoken language systems pilot corpus. In Speech and Natural Language: Proceedings of a Workshop Held at Hidden Valley, Pennsylvania, June 24-27, 1990.
+Jungo Kasai, Hao Peng, Yizhe Zhang, Dani Yogatama, Gabriel Ilharco, Nikolaos Pappas, Yi Mao, Weizhu Chen, and Noah A. Smith. 2021. Finetuning pretrained transformers into RNNs. arXiv preprint, arXiv:2103.13076.
+Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. 2020. Transformers are RNNs: Fast autoregressive transformers with linear attention. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 5156-5165. PMLR.
+Frank Keller. 2010. Cognitively plausible models of human language processing. In Proceedings of the ACL 2010 Conference Short Papers, pages 60-67, Uppsala, Sweden. Association for Computational Linguistics.
+Arne Kohn and Wolfgang Menzel. 2014. Incremental predictive parsing with TurboParser. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 803-808, Baltimore, Maryland. Association for Computational Linguistics.
+Dimitrios Kotzias, Misha Denil, Nando de Freitas, and Padhraic Smyth. 2015. From group to individual labels using deep features. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD '15, page 597-606, New York, NY, USA. Association for Computing Machinery.
+Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019.
+
+Mingbo Ma, Liang Huang, Hao Xiong, Renjie Zheng, Kaibo Liu, Baigong Zheng, Chuanqiang Zhang, Zhongjun He, Hairong Liu, Xing Li, Hua Wu, and Haifeng Wang. 2019. STACL: Simultaneous translation with implicit anticipation and controllable latency using prefix-to-prefix framework. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3025-3036, Florence, Italy. Association for Computational Linguistics.
+Brielen Madureira and David Schlangen. 2020. Incremental processing in the age of non-incremental encoders: An empirical assessment of bidirectional models for incremental NLU. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 357-374, Online. Association for Computational Linguistics.
+William Marslen-Wilson. 1973. Linguistic structure and speech shadowing at very short latencies. Nature, 244:522-3.
+Yusuke Oda, Graham Neubig, Sakriani Sakti, Tomoki Toda, and Satoshi Nakamura. 2015. Syntax-based simultaneous translation through prediction of unseen syntactic constituents. 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 198-207, Beijing, China. Association for Computational Linguistics.
+Hao Peng, Nikolaos Pappas, Dani Yogatama, Roy Schwartz, Noah Smith, and Lingpeng Kong. 2021. Random feature attention. In 9th International Conference on Learning Representations, ICLR 2021, Vienna, Austria, May 3-7, 2021.
+Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. GloVe: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1532-1543, Doha, Qatar. Association for Computational Linguistics.
+Sameer Pradhan, Alessandro Moschitti, Nianwen Xue, Hwee Tou Ng, Anders Björkelund, Olga Uryupina, Yuchen Zhang, and Zhi Zhong. 2013. Towards robust linguistic analysis using OntoNotes. In Proceedings of the Seventeenth Conference on Computational Natural Language Learning, pages 143-152, Sofia, Bulgaria. Association for Computational Linguistics.
+Gabriel Skantze and David Schlangen. 2009. Incremental dialogue processing in a micro-domain. In Proceedings of the 12th Conference of the European Chapter of the ACL (EACL 2009), pages 745-753, Athens, Greece. Association for Computational Linguistics.
+Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. 2016. Rethinking the inception architecture for computer vision. In
+
+2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2818-2826.
+Erik F. Tjong Kim Sang and Sabine Buchholz. 2000. Introduction to the CoNLL-2000 shared task chunking. In Fourth Conference on Computational Natural Language Learning and the Second Learning Language in Logic Workshop.
+John C. Trueswell, Michael K. Tanenhaus, and Susan M. Garnsey. 1994. Semantic influences on parsing: Use of thematic role information in syntactic ambiguity resolution. Journal of Memory and Language, 33(3):285-318.
+Javier Turek, Shailee Jain, Vv Vo, Mihai Capota, Alexander Huth, and Theodore Willke. 2020. Approximating stacked and bidirectional recurrent architectures with the delayed recurrent neural network. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 9648-9658. PMLR.
+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, volume 30, pages 5998-6008. Curran Associates, Inc.
+Ralph Weischedel, Martha Palmer, Mitchell Marcus, Eduard Hovy, Sameer Pradhan, Lance Ramshaw, Nianwen Xue, Ann Taylor, Jeff Kaufman, Michelle Franchini, Mohammed El-Bachouti, Robert Belvin, and Ann Houston. 2013. Ontonotes release 5.0 ldc2013t19.
+Shaolei Zhang, Yang Feng, and Liangyou Li. 2021. Future-guided incremental transformer for simultaneous translation. Proceedings of the AAAI Conference on Artificial Intelligence.
+Lukas Žilka and Filip Jurcicek. 2015. Lectrack: Incremental dialog state tracking with long short-term memory networks. In Text, Speech, and Dialogue, pages 174-182, Cham. Springer International Publishing.
+
+# A Reproducibility
+
+We describe in more detail the hyperparameters and implementation of our models.
+
+# Data
+
+We mostly follow Madureira and Schlangen (2020). We use only the WSJ section of OntoNotes with splits following Pradhan et al. (2013). For Pos/Neg and Pros/Cons datasets, we split them randomly with a proportion of $70\%$ train, $10\%$ validation, and $20\%$ test set due to the unavailability of an official splitting scheme. We removed sentences longer than 200 words as they were infeasible to compute. We use the preprocessed data and splits for SNIPS and ATIS made available by E et al. (2019).
+
+# Training details
+
+Our models are trained for 50 epochs, using early stopping with patience of 10 and dropout of 0.1. For AdamW (Loshchilov and Hutter, 2019), we use $\beta_{1} = 0.9$ and $\beta_{2} = 0.98$ . The learning rate is increased linearly for the first 5 epochs. After 30, 40, and 45 epochs, we decay the learning rate by 0.5. Xavier initialisation (Glorot and Bengio, 2010) is applied to all parameters. The number of attention heads is set to 8, where the dimension of each head is self-attention dimension $d / 8$ .
+
+We also apply label smoothing (Szegedy et al., 2016) with $\epsilon = 0.1$ for sequence classification to make the model more robust for incremental processing. For OOV words, we randomly replace tokens by "UNK" token with $p = 0.02$ during training and use it for testing (Zilka and Jurčíček, 2015). We perform hyperparameter search using Comet's Bayesian search algorithm4, maximising F1 score for sequence tagging and accuracy for sequence classification on the validation set. The hyperparameter search trials are limited to 20 for all of our experiments. The hyperparameters for LT were also used for LT+R. We use similar hyperparameters for LT+R+CM and LT+R+CM+D. We set the seed to 42119392 for all of our experiments.
+
+| Hyperparameters |
| Layers | 1, 2, 3, 4 |
| Gradient clipping | no clip, 0.5, 1 |
| Learning rate | 5e-5, 7e-5, 1e-4 |
| Batch size | 32, 64, 128 |
| Feed-forward dimension | 1024, 2048 |
| Self-attention dimension | 256, 512 |
+
+Table 5: Hyperparameter search space. We use the same search space for all of our models.
+
+| Tasks | Average sequence length |
| ATIS-Slot | 10.26 |
| SNIPS-Slot | 9.08 |
| Chunk | 23.55 |
| NER | 24.14 |
| PoS Tagging | 24.14 |
| ATIS-Intent | 10.26 |
| SNIPS-Intent | 9.08 |
| Pos/Neg | 13.95 |
| Pros/Cons | 8.99 |
+
+Table 6: Average sequence length on test sets for each task.
+
+| Tasks | Layers | Gradient clip | Learning rate | Batch size | Feed-forward | Self-attention |
| Baseline |
| ATIS-Slot | 2 | no clip | 1e-4 | 32 | 1024 | 256 |
| SNIPS-Slot | 3 | 0.5 | 1e-4 | 64 | 1024 | 512 |
| Chunk | 4 | 1 | 7e-5 | 32 | 2048 | 512 |
| NER | 4 | no clip | 7e-5 | 32 | 2048 | 512 |
| PoS Tagging | 4 | 0.5 | 1e-4 | 32 | 1024 | 512 |
| ATIS-Ient | 4 | no clip | 1e-4 | 32 | 1024 | 256 |
| SNIPS-Ient | 3 | 0.5 | 1e-4 | 64 | 1024 | 512 |
| Pos/Neg | 2 | 0.5 | 5e-5 | 64 | 2048 | 256 |
| Pros/Cons | 3 | 1 | 7e-5 | 64 | 2048 | 512 |
| LT |
| ATIS-Slot | 3 | 1 | 7e-5 | 32 | 2048 | 512 |
| SNIPS-Slot | 3 | no clip | 1e-4 | 32 | 1024 | 512 |
| Chunk | 3 | 0.5 | 1e-4 | 64 | 1024 | 512 |
| NER | 2 | 1 | 1e-4 | 32 | 1024 | 512 |
| PoS Tagging | 2 | 0.5 | 7e-5 | 32 | 2048 | 512 |
| ATIS-Ient | 2 | 1 | 7e-5 | 32 | 2048 | 512 |
| SNIPS-Ient | 3 | 0.5 | 1e-4 | 32 | 1024 | 256 |
| Pos/Neg | 4 | 1 | 1e-4 | 64 | 2048 | 512 |
| Pros/Cons | 3 | no clip | 7e-5 | 32 | 2048 | 256 |
| LT+R+CM |
| ATIS-Slot | 3 | no clip | 1e-4 | 64 | 2048 | 512 |
| SNIPS-Slot | 3 | no clip | 7e-5 | 32 | 1024 | 512 |
| Chunk | 3 | 1 | 7e-5 | 32 | 1024 | 512 |
| NER | 4 | 1 | 7e-5 | 64 | 1024 | 512 |
| PoS Tagging | 2 | no clip | 1e-4 | 64 | 1024 | 512 |
| ATIS-Ient | 3 | 1 | 5e-5 | 32 | 2048 | 512 |
| SNIPS-Ient | 3 | no clip | 1e-4 | 32 | 2048 | 512 |
| Pos/Neg | 4 | 1 | 1e-4 | 32 | 2048 | 256 |
| Pros/Cons | 2 | 0.5 | 5e-5 | 32 | 1024 | 512 |
+
+Table 7: Hyperparameters used for our experiments. The best configuration for LT was also used for $\mathrm{LT + R}$ , while the best configuration for $\mathrm{LT + R + CM}$ was also used for $\mathrm{LT + R + CM + D1}$ and $\mathrm{LT + R + CM + D2}$ .
+
+| Tasks | Baseline | LT | LT+R | LT+R +CM | LT+R+ CM+D1 | LT+R+ CM+D2 |
| ATIS-Slot | 2.0M | 9.9M | 9.9M | 9.9M | 9.9M | 9.9M |
| SNIPS-Slot | 10.0M | 10.0M | 10.0M | 10.0M | 10.0M | 10.0M |
| Chunk | 18.5M | 12.2M | 12.2M | 12.2M | 12.2M | 12.2M |
| NER | 24.4M | 16.0M | 16.0M | 20.2M | 20.2M | 20.2M |
| PoS Tagging | 20.2M | 18.1M | 18.1M | 16.0M | 16.0M | 16.0M |
| ATIS-Intent | 3.5M | 6.7M | 6.7M | 9.9M | 9.9M | 9.9M |
| SNIPS-Intent | 10.0M | 6.0M | 6.0M | 13.1M | 13.1M | 13.1M |
| Pos/Neg | 4.3M | 14.4M | 14.4M | 6.9M | 6.9M | 6.9M |
| Pros/Cons | 14.1M | 8.5M | 8.5M | 8.8M | 8.8M | 8.8M |
+
+Table 8: Number of parameter for each model.
+
+| Tasks | Datasets | Labels | Train | Valid | Test |
| Slot filling | ATIS (Hemphill et al., 1990; Dahl et al., 1994) | 127 | 4,478 | 500 | 893 |
| Slot filling | SNIPS (Coucke et al., 2018) | 72 | 13,084 | 700 | 700 |
| Chunking | CoNLL 2000 (Tjong Kim Sang and Buchholz, 2000) | 23 | 7,922 | 1,014 | 2,012 |
| Named entity recognition | OntoNotes 5.0, WSJ section (Weischedel et al., 2013) | 37 | 30,060 | 5,315 | 1,640 |
| Parts-of-Speech tagging | OntoNotes 5.0, WSJ section (Weischedel et al., 2013) | 48 | 30,060 | 5,315 | 1,640 |
| Intent detection | ATIS (Hemphill et al., 1990; Dahl et al., 1994) | 26 | 4,478 | 500 | 893 |
| Intent detection | SNIPS (Coucke et al., 2018) | 7 | 13,084 | 700 | 700 |
| Sentiment classification | Positive/Negative (Kotzias et al., 2015) | 2 | 2,100 | 300 | 600 |
| Sentiment classification | Pros/Cons (Ganapathibhotla and Liu, 2008) | 2 | 32,088 | 4,602 | 9,175 |
+
+Table 9: Tasks, datasets and their size.
+
+ | Tasks | Baseline | LT | LT+R | LT+R +CM | LT+R+ CM+D1 | LT+R+ CM+D2 |
| F1 | ATIS-Slot | 96.93 | 95.88 | 89.67 | 96.07 | 96.72 | 94.60 |
| SNIPS-Slot | 91.36 | 90.02 | 58.91 | 83.41 | 86.44 | 87.81 |
| Chunk | 92.14 | 89.66 | 69.49 | 87.58 | 90.46 | 90.26 |
| NER | 86.43 | 81.87 | 51.09 | 67.50 | 78.54 | 82.47 |
| Accuracy | PoS Tagging | 96.34 | 95.72 | 90.02 | 94.86 | 95.84 | 95.88 |
| ATIS-Intent | 98.40 | 98.40 | 93.20 | 98.60 | 98.00 | 98.00 |
| SNIPS-Intent | 99.43 | 98.86 | 89.43 | 99.00 | 99.00 | 99.00 |
| Pos/Neg | 87.67 | 84.67 | 68.67 | 83.67 | 83.33 | 82.67 |
| Pros/Cons | 95.13 | 94.98 | 90.59 | 94.85 | 95.11 | 94.98 |
+
+Table 10: Non-incremental performance of our models on validation sets for reproducibility purpose.
+
+| Tasks/Models | EO | CT | RC | EOΔ1 | EOΔ2 | RCΔ1 | RCΔ2 |
| ATIS-Slot |
| Baseline | 0.029 | 0.012 | 0.963 | 0.008 | 0.002 | 0.986 | 0.995 |
| LT | 0.038 | 0.017 | 0.947 | 0.016 | 0.007 | 0.972 | 0.985 |
| LT+R | 0.000 | 0.000 | 1.000 | - | - | - | - |
| LT+R+CM | 0.000 | 0.000 | 1.000 | - | - | - | - |
| LT+R+CM+D1 | - | 0.000 | - | 0.000 | - | 1.000 | - |
| LT+R+CM+D2 | - | 0.000 | - | - | 0.000 | - | 1.000 |
| SNIPS-Slot |
| Baseline | 0.147 | 0.078 | 0.805 | 0.054 | 0.026 | 0.906 | 0.945 |
| LT | 0.189 | 0.103 | 0.738 | 0.075 | 0.033 | 0.868 | 0.929 |
| LT+R | 0.000 | 0.000 | 1.000 | - | - | - | - |
| LT+R+CM | 0.000 | 0.000 | 1.000 | - | - | - | - |
| LT+R+CM+D1 | - | 0.000 | - | 0.000 | - | 1.010 | - |
| LT+R+CM+D2 | - | 0.000 | - | - | 0.000 | - | 1.000 |
| Chunk |
| Baseline | 0.166 | 0.046 | 0.743 | 0.063 | 0.045 | 0.852 | 0.874 |
| LT | 0.184 | 0.056 | 0.680 | 0.105 | 0.081 | 0.757 | 0.786 |
| LT+R | 0.000 | 0.000 | 1.000 | - | - | - | - |
| LT+R+CM | 0.000 | 0.000 | 1.000 | - | - | - | - |
| LT+R+CM+D1 | - | 0.000 | - | 0.000 | - | 1.020 | - |
| LT+R+CM+D2 | - | 0.000 | - | - | 0.000 | - | 1.000 |
| NER |
| Baseline | 0.072 | 0.019 | 0.898 | 0.033 | 0.019 | 0.935 | 0.952 |
| LT | 0.078 | 0.022 | 0.883 | 0.036 | 0.021 | 0.926 | 0.944 |
| LT+R | 0.000 | 0.000 | 1.000 | - | - | - | - |
| LT+R+CM | 0.000 | 0.000 | 1.000 | - | - | - | - |
| LT+R+CM+D1 | - | 0.000 | - | 0.000 | - | 1.030 | - |
| LT+R+CM+D2 | - | 0.000 | - | - | 0.000 | - | 1.000 |
| PoS Tagging |
| Baseline | 0.114 | 0.032 | 0.812 | 0.045 | 0.033 | 0.886 | 0.904 |
| LT | 0.125 | 0.036 | 0.777 | 0.054 | 0.036 | 0.854 | 0.879 |
| LT+R | 0.000 | 0.000 | 1.000 | - | - | - | - |
| LT+R+CM | 0.000 | 0.000 | 1.000 | - | - | - | - |
| LT+R+CM+D1 | - | 0.000 | - | 0.000 | - | 1.100 | - |
| LT+R+CM+D2 | - | 0.000 | - | - | 0.000 | - | 1.000 |
+
+Table 11: Mean value of Edit Overhead, Correction Time Score and Relative Correctness on test sets for sequence tagging. $\Delta t$ denotes delay for $t$ time steps.
+
+| Tasks/Models | EO | CT | RC | EOΔ1 | EOΔ2 | RCΔ1 | RCΔ2 |
| ATIS-Intent |
| Baseline | 0.488 | 0.238 | 0.812 | 0.304 | 0.196 | 0.874 | 0.923 |
| LT | 0.320 | 0.152 | 0.885 | 0.157 | 0.095 | 0.934 | 0.959 |
| LT+R | 0.276 | 0.191 | 0.836 | - | - | - | - |
| LT+R+CM | 0.174 | 0.097 | 0.925 | - | - | - | - |
| LT+R+CM+D1 | - | 0.056 | - | 0.097 | - | 0.958 | - |
| LT+R+CM+D2 | - | 0.032 | - | - | 0.073 | - | 0.976 |
| SNIPS-Intent |
| Baseline | 0.294 | 0.176 | 0.857 | 0.171 | 0.108 | 0.896 | 0.925 |
| LT | 0.241 | 0.172 | 0.867 | 0.173 | 0.132 | 0.895 | 0.919 |
| LT+R | 0.120 | 0.131 | 0.883 | - | - | - | - |
| LT+R+CM | 0.188 | 0.112 | 0.915 | - | - | - | - |
| LT+R+CM+D1 | - | 0.073 | - | 0.130 | - | 0.944 | - |
| LT+R+CM+D2 | - | 0.044 | - | - | 0.083 | - | 0.969 |
| Pos/Neg |
| Baseline | 0.358 | 0.249 | 0.829 | 0.245 | 0.191 | 0.859 | 0.881 |
| LT | 0.363 | 0.272 | 0.821 | 0.272 | 0.216 | 0.843 | 0.867 |
| LT+R | 0.103 | 0.081 | 0.931 | - | - | - | - |
| LT+R+CM | 0.317 | 0.205 | 0.852 | - | - | - | - |
| LT+R+CM+D1 | - | 0.162 | - | 0.250 | - | 0.876 | - |
| LT+R+CM+D2 | - | 0.117 | - | - | 0.167 | - | 0.908 |
| Pros/Cons |
| Baseline | 0.150 | 0.112 | 0.927 | 0.089 | 0.054 | 0.951 | 0.965 |
| LT | 0.158 | 0.113 | 0.925 | 0.086 | 0.053 | 0.952 | 0.966 |
| LT+R | 0.095 | 0.071 | 0.943 | - | - | - | - |
| LT+R+CM | 0.098 | 0.069 | 0.952 | - | - | - | - |
| LT+R+CM+D1 | - | 0.040 | - | 0.059 | - | 0.972 | - |
| LT+R+CM+D2 | - | 0.027 | - | - | 0.042 | - | 0.981 |
+
+Table 12: Mean value of Edit Overhead, Correction Time Score and Relative Correctness on test sets for sequence classification. $\Delta t$ denotes delay for $t$ time steps.
+
+| Tasks/Models | EO | CT | RC |
| ATIS-Slot | | | |
| Baseline | | | |
| -GloVe | 0.030 | 0.016 | 0.955 |
| -Pos | 0.109 | 0.058 | 0.836 |
| -GloVe & Pos | 0.108 | 0.059 | 0.834 |
| LT+R+CM | | | |
| -GloVe | 0.000 | 0.000 | 1.000 |
| -Pos | 0.000 | 0.000 | 1.000 |
| -GloVe & Pos | 0.000 | 0.000 | 1.000 |
| SNIPS-Slot | | | |
| Baseline | | | |
| -GloVe | 0.154 | 0.086 | 0.778 |
| -Pos | 0.264 | 0.172 | 0.597 |
| -GloVe & Pos | 0.236 | 0.149 | 0.645 |
| LT+R+CM | | | |
| -GloVe | 0.000 | 0.000 | 1.000 |
| -Pos | 0.000 | 0.000 | 1.000 |
| -GloVe & Pos | 0.000 | 0.000 | 1.000 |
| Chunk | | | |
| Baseline | | | |
| -GloVe | 0.177 | 0.059 | 0.675 |
| -Pos | 0.325 | 0.190 | 0.296 |
| -GloVe & Pos | 0.360 | 0.200 | 0.276 |
| LT+R+CM | | | |
| -GloVe | 0.000 | 0.000 | 1.000 |
| -Pos | 0.000 | 0.000 | 1.000 |
| -GloVe & Pos | 0.000 | 0.000 | 1.000 |
| NER | | | |
| Baseline | | | |
| -GloVe | 0.079 | 0.021 | 0.875 |
| -Pos | 0.096 | 0.040 | 0.792 |
| -GloVe & Pos | 0.114 | 0.046 | 0.759 |
| LT+R+CM | | | |
| -GloVe | 0.000 | 0.000 | 1.000 |
| -Pos | 0.000 | 0.000 | 1.000 |
| -GloVe & Pos | 0.000 | 0.000 | 1.000 |
| PoS Tagging | | | |
| Baseline | | | |
| -GloVe | 0.124 | 0.035 | 0.790 |
| -Pos | 0.184 | 0.079 | 0.567 |
| -GloVe & Pos | 0.195 | 0.087 | 0.545 |
| LT+R+CM | | | |
| -GloVe | 0.000 | 0.000 | 1.000 |
| -Pos | 0.000 | 0.000 | 1.000 |
| -GloVe & Pos | 0.000 | 0.000 | 1.000 |
+
+Table 13: Ablation of GloVe and positional embeddings on the baseline and $\mathrm{LT + R + CM}$ for incremental metrics in sequence tagging.
+
+| Tasks/Models | EO | CT | RC |
| ATIS-Intent | | | |
| Baseline | | | |
| -GloVe | 0.505 | 0.248 | 0.798 |
| -Pos | 0.472 | 0.235 | 0.807 |
| -GloVe & Pos | 0.497 | 0.239 | 0.802 |
| LT+R+CM | | | |
| -GloVe | 0.179 | 0.101 | 0.922 |
| -Pos | 0.166 | 0.091 | 0.927 |
| -GloVe & Pos | 0.190 | 0.115 | 0.916 |
| SNIPS-Intent | | | |
| Baseline | | | |
| -GloVe | 0.247 | 0.172 | 0.869 |
| -Pos | 0.263 | 0.165 | 0.872 |
| -GloVe & Pos | 0.195 | 0.139 | 0.892 |
| LT+R+CM | | | |
| -GloVe | 0.162 | 0.093 | 0.925 |
| -Pos | 0.179 | 0.105 | 0.921 |
| -GloVe & Pos | 0.176 | 0.102 | 0.919 |
| Pos/Neg | | | |
| Baseline | | | |
| -GloVe | 0.452 | 0.368 | 0.769 |
| -Pos | 0.356 | 0.256 | 0.826 |
| -GloVe & Pos | 0.477 | 0.375 | 0.774 |
| LT+R+CM | | | |
| -GloVe | 0.324 | 0.197 | 0.859 |
| -Pos | 0.284 | 0.192 | 0.856 |
| -GloVe & Pos | 0.306 | 0.180 | 0.865 |
| Pros/Cons | | | |
| Baseline | | | |
| -GloVe | 0.162 | 0.116 | 0.924 |
| -Pos | 0.167 | 0.120 | 0.924 |
| -GloVe & Pos | 0.188 | 0.142 | 0.910 |
| LT+R+CM | | | |
| -GloVe | 0.096 | 0.065 | 0.955 |
| -Pos | 0.095 | 0.064 | 0.955 |
| -GloVe & Pos | 0.094 | 0.066 | 0.954 |
+
+Table 14: Ablation of GloVe and positional embeddings on the baseline and $\mathrm{LT} + \mathrm{R} + \mathrm{CM}$ for incremental metrics in sequence classification.
\ No newline at end of file
diff --git a/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/images.zip b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..90ab91c523998cca6e0c4f7acca248113ecd71f2
--- /dev/null
+++ b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:34ea51f787619f3dabe3a7ded821aaa8e38adc68da9c6e13b93b7e501d10f2e8
+size 1034293
diff --git a/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/layout.json b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..6e2d8beb3eb64a43a806c63f767a206759a33d2a
--- /dev/null
+++ b/towardsincrementaltransformersanempiricalanalysisoftransformermodelsforincrementalnlu/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2280735f6e42cae416a91b1149aa4ae5d2a7ee9e7484824167f11e8e76fb84e3
+size 309887
diff --git a/towardslabelagnosticemotionembeddings/e87a179b-125a-4dea-ba3a-df5298a2b48d_content_list.json b/towardslabelagnosticemotionembeddings/e87a179b-125a-4dea-ba3a-df5298a2b48d_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..69c1d031fb59b7789737f49ec884554080aeaebb
--- /dev/null
+++ b/towardslabelagnosticemotionembeddings/e87a179b-125a-4dea-ba3a-df5298a2b48d_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a494755c970d9d34013ccdbfa3d322e9570b19c94c12f9bd0dc901951d5927e6
+size 134237
diff --git a/towardslabelagnosticemotionembeddings/e87a179b-125a-4dea-ba3a-df5298a2b48d_model.json b/towardslabelagnosticemotionembeddings/e87a179b-125a-4dea-ba3a-df5298a2b48d_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..0bcbee5eae370a3fa8b2b3267c11d651a0cb64d5
--- /dev/null
+++ b/towardslabelagnosticemotionembeddings/e87a179b-125a-4dea-ba3a-df5298a2b48d_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e1f7e12babb809e99b3ab51e5dfc4310c233c15b1d95f56dfc2223ccfce73b3d
+size 160133
diff --git a/towardslabelagnosticemotionembeddings/e87a179b-125a-4dea-ba3a-df5298a2b48d_origin.pdf b/towardslabelagnosticemotionembeddings/e87a179b-125a-4dea-ba3a-df5298a2b48d_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..f66f26f5422391992fde065f71bd429ea8e59ddc
--- /dev/null
+++ b/towardslabelagnosticemotionembeddings/e87a179b-125a-4dea-ba3a-df5298a2b48d_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:069358488d33d43b2d8f7349342a8a197026e11049c390f594e81c246697f73a
+size 1070898
diff --git a/towardslabelagnosticemotionembeddings/full.md b/towardslabelagnosticemotionembeddings/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..5b443de22773b71f1f3c978f8869309fc9dbf255
--- /dev/null
+++ b/towardslabelagnosticemotionembeddings/full.md
@@ -0,0 +1,510 @@
+# Towards Label-Agnostic Emotion Embeddings
+
+Sven Buechel Louise Modersohn Udo Hahn
+
+Jena University Language & Information Engineering (JULIE) Lab
+
+Friedrich-Schiller-Universität Jena, Fürstengraben 27, 07743 Jena, Germany
+
+firstname.lastname@uni-jena.de
+
+https://julielab.de
+
+# Abstract
+
+Research in emotion analysis is scattered across different label formats (e.g., polarity types, basic emotion categories, and affective dimensions), linguistic levels (word vs. sentence vs. discourse), and, of course, (few well-resourced but much more under-resourced) natural languages and text genres (e.g., product reviews, tweets, news). The resulting heterogeneity makes data and software developed under these conflicting constraints hard to compare and challenging to integrate. To resolve this unsatisfactory state of affairs we here propose a training scheme that learns a shared latent representation of emotion independent from different label formats, natural languages, and even disparate model architectures. Experiments on a wide range of datasets indicate that this approach yields the desired interoperability without penalizing prediction quality. Code and data are archived under DOI 10.5281/zenodo.5466068.
+
+# 1 Introduction
+
+Emotion analysis in the field of NLP1 has experienced a remarkable evolution of representation schemes. Starting from the early focus on polarity, i.e., the main distinction between positive and negative feelings emerging from natural language utterances (Hatzivassiloglou and McKeown, 1997; Turney and Littman, 2003), the number and variety of label formats, i.e., groups of emotional target variables and their associated value ranges, has been growing rapidly (Bostan and Klinger, 2018; De Bruyne et al., 2020). This development is a double-edged sword though.
+
+On the one hand, the wide variety of available label formats allows NLP models to become more informative and richer in expressive power. This gain is because many of the newer representation
+
+schemes follow well-researched branches of psychological theory, such as basic emotion categories or affective dimensions (Ekman, 1992; Russell and Mehrabian, 1977), which offer information complementary to each other (Stevenson et al., 2007). Others argue that different emotional nuances turn out to be particularly useful for specific targeted downstream applications (Bollen et al., 2011; Desmet and Hoste, 2013).
+
+On the other hand, this proliferation of label formats has led to a severe loss in cross-data comparability. As Tab. 1 illustrates, the total volume of available gold data is spread not only over distinct languages but also a huge number of emotion annotation schemes. Consequently, comparing or even merging data from different rating studies is often impossible. This, in turn, contributes to the development of an unnecessarily large number of prediction models, each with limited coverage of the full range of human emotion.
+
+To escape from these dilemmata, we propose a method that mediates between such different representation schemes. In contrast to previous work which unified some sources of heterogeneity (see §2), to the best of our knowledge, our approach is the first to learn a representation space for emotions that generalizes over individual languages, emotion label formats, and distinct model architectures for emotion analysis.
+
+Technically speaking, our approach consists of a set of pre-trained prediction heads that can be easily attached to existing state-of-the-art neural models. Doing so, a model learns to embed language items of a particular domain in a shared representation space that resembles an "interlingua for emotion". These "emotion embeddings" capture a rich array of affective nuances and allow for a direct comparison of emotional load between heterogeneous samples (see Fig. 1). They may thus form a solid basis for a broad range of linguistic, psychological, and cultural follow-up studies.
+
+| Sample | Val | Aro | Dom | Joy | Ang | Sad | Fea | Dis |
| rollercoaster | 8.0° | 8.1° | 5.1° | 3.4□ | 1.4□ | 1.1□ | 2.8□ | 1.1□ |
| urine | 3.3° | 4.2° | 5.2° | 1.9□ | 1.4□ | 1.2□ | 1.4□ | 2.6□ |
| szczęsliwy (a) | 2.8° | 4.0° | | | | | | |
| College tuition continues climbing | | | | 0■ | 54■ | 40■ | 3■ | 31■ |
| A gentle, compassionate drama about grief and healing | pos△ | | | | | |
| 喇叭這一代還是差勁透了。 (b) | 2.8° | 6.1° | | | | | | |
| Value Ranges: | °[1,9] | ●[-3,3] | △{pos,neg} | □[1,5] | ■[0,100] |
+
+Table 1: Sample entries from various sources described along eight emotional variables:
+
+[VAD]—Valence (≈ Polarity), Arousal, Dominance, and [BE5]—Joy, Anger, Sadness, Fear, and Disgust.
+
+Samples differ in languages addressed (English, Polish, Mandarin), linguistic domain (word vs. text, register) and label format (covered variables and their value ranges).
+
+Translations: (a) “happy” (from Polish); (b) “This product generation still has terrible speakers.” (from Mandarin)
+
+
+Figure 1: Emotional loading of heterogenous samples in common representation space with selected emotion variables (in capitals); first three principal components. Color only used as visual aid. Translations for non-English items are given in Tab. 1.
+
+In terms of practical benefits, our method allows models to predict label formats unseen during training and lowers space requirements by reducing a large number of format-specific models to a small number of format-agnostic ones. Although not in the center of interest of this study, our approach also often leads to small improvements in prediction quality, as experiments on 13 datasets for 6 natural languages reveal.
+
+# 2 Related Work
+
+Representing Emotion. At the heart of computational emotion representation lies a set of emotion variables ("classes", "constructs") used to capture different facets of affective meaning. Researchers may choose from a multitude of approaches designed in the long and controversial history of the psychology of emotion (Scherer, 2000; Hofmann et al., 2020). A popular choice are so-called basic
+
+emotions (Alm et al., 2005; Aman and Szpakowicz, 2007; Strapparava and Mihalcea, 2007), such as the six categories identified by Ekman (1992): Joy, Anger, Sadness, Fear, Disgust, and Surprise (BE6, for short). A subset of these excluding Surprise (BE5) is often used for emotional word datasets in psychology ("affective norms") which are available for a wide range of languages.
+
+Affective dimensions constitute a popular alternative to basic emotions (Yu et al., 2016; Sedoc et al., 2017; Buechel and Hahn, 2017; Li et al., 2017; Mohammad, 2018). The most important ones are Valence (negative vs. positive, thus corresponding to the notion of polarity; Turney and Littman, 2003) and Arousal (calm vs. excited) (VA). These two dimensions are sometimes extended by Dominance (feeling powerless vs. empowered; VAD).
+
+Other theories influential for NLP include Plutchik's (2001) Wheel of Emotion (Mohammad and Turney, 2013; Abdul-Mageed and Ungar, 2017; Tafreshi and Diab, 2018; Bostan et al., 2020) and appraisal dimensions (Balahur et al., 2012; Troiano et al., 2019; Hofmann et al., 2020). Yet frequently, studies do not follow any of these established approaches but rather design a customized set of variables in an ad-hoc fashion, often driven by the availability of user-labeled data in social media, or the specifics of an application or domain which requires attention to particular emotional nuances (Bollen et al., 2011; Desmet and Hoste, 2013; Staiano and Guerini, 2014; Qadir and Riloff, 2014; Li et al., 2016; Demszky et al., 2020).
+
+This proliferating diversity of emotion label formats is the reason for the lack of comparability outlined in §1. Our work aims to unify these heterogeneous labels by learning to translate them into a shared distributional representation (see Fig. 1).
+
+Analyzing Emotion. There are several subtasks in emotion analysis that require distinct model types. Word-level prediction (or "emotion lexicon induction") is concerned with the emotion associated with an individual word out of context. Early work exploited primarily surface patterns of word usage (Hatzivassiloglou and McKeown, 1997; Turney and Littman, 2003) whereas more recent activities rely on more sophisticated statistical signals encoded in word embeddings (Amir et al., 2015; Rothe et al., 2016; Li et al., 2017). Combinations of high-quality embeddings with feed-forward nets have proven to be very successful, rivaling human annotation capabilities (Buechel and Hahn, 2018b).
+
+In contrast, modeling emotion of sentences or short texts (jointly referred to as "text") was traditionally based largely on lexical resources (Taboada et al., 2011). Later, those were combined with conventional machine learning techniques (Mohammad et al., 2013) before being widely replaced by neural end-to-end approaches (Socher et al., 2013; Kim, 2014; Abdul-Mageed and Ungar, 2017). Current state-of-the-art results are achieved by transfer learning with transformer models (Devlin et al., 2019; Zhong et al., 2019; Delbrouck et al., 2020).
+
+Our work complements these lines of research by providing a method that allows existing models to embed the emotional loading of some unit of language in a common emotion embedding space. This broadens the range of emotional nuances said models can capture. Importantly, our method learns a representation not for a specific unit of language itself but the emotion attached to it. This differs from previous work aiming to increase the affective load of, e.g., word embeddings (see below).
+
+Emotion Embeddings. Several existing studies have used the term "emotion embeddings" (or similar phrasing) to characterize their work, yet either use the term in a different way or tackle a different problem compared to our study.
+
+In more detail, Wang et al. (2020) present a method for increasing the emotional content of word embeddings based on re-ordering vectors according to the similarity in their emotion values, referring to the result as "emotional embeddings". Similarly, Xu et al. (2018) learn word embeddings that are particularly rich in affective information by sharing an embedding layer between models for different emotion-related tasks. They refer to these embeddings as "generalized emotion representation". Different from our work, these two studies
+
+primarily learn to represent words (with a focus on their affective meaning though), not emotions themselves. They are thus in line with previous research aiming to increase the affective load of word embeddings (Faruqui et al., 2015; Yu et al., 2017; Khosla et al., 2018).
+
+Shantala et al. (2018) improve a dialogue system by augmenting their training data with emotion predictions from a separate system. Predicted emotion labels are fed into the dialogue model using a representation ("emotion embeddings") learned in a supervised fashion with the remainder of the model parameters. These embeddings are specific to their architecture and training dataset, they do not generalize to other label formats. Gaonkar et al. (2020) as well as Wang and Zong (2021) learn vector representations for emotion classes from annotated text datasets to explicitly model their semantics and inter-relatedness. Yet again, these emotion embeddings (the class representations) do not generalize to other datasets and label formats. Han et al. (2021) propose a framework for learning a common embedding space as a means of joining information from different modalities in multimodal emotion data. While these embeddings generalize over different modalities (audio and video), they do not generalize across languages and label formats. In summary, different from these studies, our emotion embeddings are not bound to any particular model architecture or dataset but instead generalize across domains and label formats, thus allowing to directly compare, say, English language items with BE5 ratings to Mandarin ones with VA ratings (see Tab. 1 vs. Fig. 1).
+
+Coping with Incompatibility. In face of the variety of emotion formats, Felbo et al. (2017) present a transfer learning approach in which they pre-train a model with self-supervision to predict emojis in a large Twitter dataset, thus learning a representation that captures even subtle emotional nuances. Similarly, multi-task learning can be used to fit a model on multiple datasets potentially having different label formats, thus resulting in shared hidden representations (Tafreshi and Diab, 2018; Augenstein et al., 2018). While representations learned with these approaches generalize across different label formats, they do not generalize across model architectures or language domains.
+
+Cross-lingual approaches learn a common latent representation for different languages but these representations are often specific to only one pair of
+
+languages and do not generalize to other label formats (Gao et al., 2015; Abdalla and Hirst, 2017; Barnes et al., 2018). Similarly, recent work with Multilingual BERT (Devlin et al., 2019) shows strong performance in cross-lingual zero-shot transfer (Lamprinidis et al., 2021), but samples from different languages still end up in different regions of the embedding space (Pires et al., 2019). These approaches are also specific to a particular model architecture so that they do not naturally carry over to, e.g., single-word emotion prediction. Multimodal approaches to emotion analysis show some similarity to our work, as they learn a common latent representation for several modalities which can be seen as separate domains (Zadeh et al., 2017; Han et al., 2021; Poria et al., 2019). However, these representations are typically specific to a single dataset and are not meant to generalize further.
+
+In a recent survey on text emotion datasets, Bostan and Klinger (2018) point out naming inconsistencies between label formats. They build a joint resource that unifies twelve datasets under a common file format and annotation scheme. Annotations were unified based on the semantic closeness of their class names (e.g., merging "happy" and "Joy"). This approach is limited by its reliance on manually crafted rules which are difficult to formulate, especially for numerical label formats.
+
+In contrast, emotion representation mapping (or "label mapping") aims at automatically learning such conversion schemes between formats from data (especially from "double-annotated" samples, such as the first two rows in Tab. 1; Stevenson et al., 2007; Calvo and Mac Kim, 2013; Buechel and Hahn, 2018a). As the name suggests, label mapping operates exclusively on the gold ratings, without actually deriving representations for language items. It can, however, be used as a post-processor, converting the prediction of another model to an alternative label format (used as a baseline in §4). Label mapping learns to transform one format into another, yet without establishing a more general representation. In a related study, De Bruyne et al. (2022) indeed do learn a common representation for different label formats by applying variational autoencoders to multiple emotion lexicons. However, their method still only operates exclusively on the gold ratings without actually predicting labels based on words or texts.
+
+In summary, while there are methods to learn common emotion representations across either lan
+
+guages, linguistic domains, label formats, or model architectures, to the best of our knowledge, our proposal is the first to achieve all this simultaneously.
+
+# 3 Methods
+
+Let $(X,Y)$ be a dataset with samples $X\coloneqq \{x_{1},\ldots x_{n}\}$ and labels $Y\coloneqq \{y_{1},\dots ,y_{n}\}$ . The aim of emotion analysis is to find a model $f$ that best predicts $Y$ given $X$ . Let us assume that the samples $X$ are drawn from one of $M$ domains $\mathcal{D}_1,\ldots ,\mathcal{D}_M$ and the labels are drawn from one of $N$ label formats $\mathcal{L}_1,\ldots ,\mathcal{L}_N$ . A domain refers to the vocabulary or a particular register of a given language (word- and text-level prediction). A label format is a set of valid labels with reference to particular emotion constructs. For instance, the VAD format consists of vectors $(v,a,d)$ where the components $v,a,d$ refer to Valence, Arousal, and Dominance, respectively, and are bound within a specified interval, e.g., [1, 9].
+
+# 3.1 Towards a Common Emotion Space
+
+Fig. 2 provides an overview of our methodology. The naive approach to emotion analysis is to learn separate models for each language domain, $\mathcal{D}_1,\ldots ,\mathcal{D}_M$ and label format, $\mathcal{L}_1,\dots ,\mathcal{L}_N$ , resulting in a potentially very high number of relatively weak models in terms of the emotional nuances they can capture (a). The alternative we propose consists of two steps. First, we train a multi-way mapping that can translate between every pair of label formats $(\mathcal{L}_i,\mathcal{L}_j)$ $i,j\in [1,N]$ via a shared intermediate representation layer, the common emotion space $(b)$ . In a second step, we adopt existing model architectures to embed samples from a given domain in the emotion space, while the format-specific top layers of said mapping model are now utilized as portable prediction heads. The emotion space then acts as a mediating "interlingua" which connects each language domain, $\mathcal{D}_1,\ldots ,\mathcal{D}_M$ , with each label format, $\mathcal{L}_1,\ldots ,\mathcal{L}_N(c)$
+
+# 3.2 Prediction Head Training
+
+A prediction head here refers to a function $h$ that maps from a Euclidean input space $\mathbb{R}^d$ (the "emotion space") to a label format $\mathcal{L}_j$ . We give prediction heads a purposefully minimalist design that consists only of a single linear layer without bias term. Thus, a head $h$ predicts ratings $\hat{y}$ for an emotion embedding $x \in \mathbb{R}^d$ as $h(x) := Wx$ , where $W$ is a weight matrix. The reason for this simple head
+
+
+(a) Standard Procedure
+
+
+(b) Multi-Way Mapping Model
+
+
+(c) Portable Prediction Heads
+Figure 2: Overview of our methodology, illustrated by several choices of language domains and label formats.
+
+design is to ensure that the affective information is more readily available in the emotion space. Alternatively, we can describe the weight matrix $W$ as a concatenation of row vectors $W_{i}$ , where each emotion variable corresponds to exactly one row. Thus, as a positive side effect of the lightweight design, we can directly locate emotion variables within the emotion space by interpreting their respective coefficients $W_{i}$ as position vector (see Fig. 1).
+
+Our challenge is to train a collection of heads $h_1, \ldots, h_N$ such that all heads produce consistent label outputs for a given emotion embedding from $\mathbb{R}^d$ . For example, if the VAD head predicts a joyful VAD label, then the BE5 head should also produce a congruent joyful BE5 rating. In this sense, the prediction heads are "the heart and soul" of the emotion space: they define which affective state a region of the space corresponds to.
+
+To devise a suitable training scheme for the heads, we first need to elaborate on our understanding of "consistency" between differently formatted emotion labels. We argue that an obvious case of such consistency is found in datasets for emotion label mapping (see §2). A label mapping dataset consists of two sets of labels following different formats $Y_{1} \coloneqq \{y_{1,1}, y_{1,2}, \ldots, y_{1,n}\}$ and $Y_{2} \coloneqq \{y_{2,1}, y_{2,2}, \ldots, y_{2,n}\}$ , respectively. Typically, they are constructed by matching instances from independent annotation studies (e.g., the first two rows in Tab. 1). Thus, we can think of the two sets of labels as "translational equivalents", i.e., differently formatted emotion ratings, possibly capturing different affective nuances, yet still describing the same underlying expression of emotion in humans.
+
+The intuition behind our training scheme is to "fuse" multiple mapping models by forcing them to
+
+produce the same intermediate representation for both mapping directions. This results in a multiway mapping model with a shared representation layer in the middle (the common emotion space) followed by the prediction heads on top (Fig. 2b).
+
+In more detail (see also Fig. 3 for an illustration of the following training procedure), let $(Y_{1}, Y_{2})$ be a mapping dataset with a sample $(y_{1}, y_{2})$ . We introduce two new, auxiliary models $g_{1}, g_{2}$ that we call label encoders. Label encoders embed input ratings in the emotion space $\mathbb{R}^{d}$ and can be combined with the complementary prediction heads $h_{2}, h_{1}$ to form a mapping model (the subscript here refers to the label format). That is $h_{2}(g_{1}(y_{1}))$ yields predictions for $y_{2}$ and $h_{1}(g_{2}(y_{2}))$ for $y_{1}$ .
+
+Our goal is to align both the intermediate representations, $g_{1}(y_{1}), g_{2}(y_{2})$ while also deriving accurate mapping predictions. Therefore, we propose the following three training objectives:
+
+$$
+\begin{array}{l} L _ {\text {m a p}} := \mathcal {C} \left[ y _ {1}, h _ {1} \left(g _ {2} \left(y _ {2}\right)\right) \right] + \mathcal {C} \left[ y _ {2}, h _ {2} \left(g _ {1} \left(y _ {1}\right)\right) \right] \\ L _ {\text {a u t o}} := \mathcal {C} \left[ y _ {1}, h _ {1} \left(g _ {1} \left(y _ {1}\right)\right) \right] + \mathcal {C} \left[ y _ {2}, \left(h _ {2} \left(g _ {2} \left(y _ {2}\right)\right) \right] \right. \\ L _ {\text {s i m}} := \mathcal {C} \left[ g _ {1} \left(y _ {1}\right), g _ {2} \left(y _ {2}\right) \right] \\ \end{array}
+$$
+
+where $\mathcal{C}$ denotes the Mean-Squared-Error loss cri
+
+
+Figure 3: Training the Multi-Way Mapping Model.
+
+terion. $L_{\mathrm{map}}$ is the mapping loss term where we compare true vs. predicted labels. The two summands represent the two mapping directions, assigning either of the two labels as the source, the other as the target format. The autoencoder loss, $L_{\mathrm{auto}}$ , captures how well the model can reconstruct the original input label from the hidden emotion representation. It is meant to supplement the mapping loss. Lastly, the similarity loss, $L_{\mathrm{sim}}$ , directly assesses whether both input label formats end up with a similar intermediate representation. The total loss for one instance, finally, is given by
+
+$$
+L _ {\text {t o t a l}} := L _ {\text {m a p}} + L _ {\text {a u t o}} + L _ {\text {s i m}}
+$$
+
+In practice, we train a matching label encoder $g_{1}, \ldots, g_{N}$ for each of our prediction heads $h_{1}, \ldots, h_{N}$ , thus covering all considered label formats $\mathcal{L}_{1}, \ldots, \mathcal{L}_{N}$ . All label encoders and prediction heads are trained simultaneously on a collection of mapping datasets. This is done as a hierarchical sampling procedure, where we first sample one of the mapping datasets (which determines the encoder and the head to be optimized in this step), then a randomly selected instance. The total loss is computed in a batch-wise fashion and the encoder and head parameters are updated via standard gradient descent-based techniques (see Appendix A for details). We use min-max scaling to normalize value ranges of the labels across datasets: for VAD we choose the interval $[-1, 1]$ and for BE5 the interval $[0, 1]$ , reflecting their respective bipolar (VAD) and unipolar (BE5) nature (see Tab. 1).
+
+# 3.3 Prediction Head Deployment
+
+Following the training of the prediction heads $h_1, \ldots, h_N$ , deploying them on top of a base model architecture $f$ is relatively straightforward, resulting in a multi-headed model. The base model's output layer must be resized to the dimensionality of the emotion space $\mathbb{R}^d$ and any present nonlinearity (e.g., softmax or sigmoid activation) must be removed. This modified base model $\bar{f}$ is then optimized to produce emotion embeddings, the heads' input representation (see Fig. 4).
+
+Head parameters are kept constant so that the base model is forced to optimize the representations it provides. Since the heads are specifically trained to treat emotion embeddings consistently, producing suitable representations for one head is also likely to produce suitable representations for the remaining heads. Yet, to avoid overfitting the
+
+
+Figure 4: Schematic illustration of a base model before (left) and after (right) head deployment.
+
+
+
+base model to a particular one (i.e., producing representations that are particularly favorable for one head, but much less so for every other), each model $\bar{f}_i$ is trained using multiple heads depending on the available data.
+
+If multiple datasets are available that match the domain of the base model and use different label formats, we train the base model in a multi-task setup: We first draw one of the available datasets and then sample an instance $(x,y)$ from there. Next, we derive a prediction using the matching head $h_j$ as $\hat{y} \coloneqq h_j(\bar{f}_i(x))$ , before computing the prediction loss:
+
+$$
+L _ {\mathrm {p r e d}} := \mathcal {C} [ y, \hat {y} ]
+$$
+
+If, on the other hand, only one dataset is available which matches the domain of the base model $\bar{f}_i$ , we complement the prediction loss with additional error signal using a newly proposed data augmentation technique. This method which we call emotion label augmentation synthesizes an alternative label $y^{*} \coloneqq h_{k}(g_{j}(y))$ for a given instance $(x,y)$ by taking advantage of the label encoder $g_{j}$ that was trained in the previous step. While $g_{j}$ translates the label $y$ to the emotion space, the prediction head $h_k$ provides labels in a format different from $y$ . Those artificial labels are then used in place of actual gold labels resulting in the data augmentation loss
+
+$$
+L _ {\mathrm {a u g}} := \mathcal {C} [ y ^ {*}, h _ {k} (\bar {f} _ {i} (x) ]
+$$
+
+where the second argument to the loss criterion $\mathcal{C}$ denotes the model's prediction for the previously synthesized labels. Then, $L_{\mathrm{pred}} + L_{\mathrm{aug}}$ yields the final loss.
+
+# 4 Experimental Setup
+
+The main idea behind our experimental setup is to compare a base model trained with the standard
+
+procedure against the same model with portable prediction heads (PPH) attached (cf. Fig. 2 $(a)$ vs. $(c))$ . Our goal is to show that we obtain the same, if not better, results using PPH compared with the naive approach.
+
+This study design reflects two purposes. First, comparing the base model with the PPH architecture yields experimental data that allow to indirectly assess the quality of the learned emotion representations. Second, such a comparison may help find evidence that the performance of the PPH approach scales with the employed base model—this would suggest that our method is likely to remain valuable even when today's state-of-the-art models are replaced by their successors. Importantly, we train only a single set of prediction heads. Thus, all experimental results of the PPH condition are based on the same underlying emotion space.
+
+We distinguish two evaluation settings. In the first ("supervised") setting, train and test data come from (different parts of) the same dataset. Without PPH, we train one base model per dataset. Yet, with PPH, base models are shared across datasets of the same domain, whether or not their label formats agree. Consequently, the emotion space needs to store heterogeneous affective information in an easy-to-retrieve way (recall the "lightweight" head design; §3.2). Thus, positive evaluation results would indicate that our method learns a particularly rich representation of emotion. A practical advantage of PPH lies in the reduction of total disk space utilized by the resulting model checkpoints.
+
+The second ("zero-shot") setting assumes that only one dataset per language is available, with one particular label format, but one would like to predict ratings in another format as well (e.g., imagine having a VA dataset for Mandarin but you are actually more interested in basic emotions for that language). Doing so with PPH is very simple—one only has to choose the desired head at inference time. Yet, doing so with the base model per se is simply impossible. To still be able to offer a quantitative comparison, we resort to an external label mapping component that translates the base model's output into the desired format. We emphasize that this is a very strong baseline due to the high accuracy of the label mapping approach, in general (Buechel and Hahn, 2018a). In this case, the practical advantage of the PPH approach lies in its independence of (possibly unavailable) external post-processors.
+
+We conducted experiments on different word and text datasets. For words, we collected ten datasets (cf. Tab. 2) covering five languages. These data are structured as illustrated in the top half of Tab. 1. For text-level experiments we selected three corpora (cf. Tab. 3): Affective Text (AFFT; Strapparava and Mihalcea, 2007), EMOBANK (EMOB; Buechel and Hahn, 2017), and the Chinese Valence Arousal Texts (CVAT; Yu et al., 2016). For an illustration of the type and format of text-level data, see the bottom half in Tab. 1. Since these datasets comprise real-valued annotations, we will use Pearson Correlation $r$ for measuring prediction quality. Datasets were partitioned into fixed train-dev-test splits with ratios ranging between 8-1-1 and 3-1-1; smaller datasets received larger dev and test shares.
+
+The selected data govern how to train a given base model with PPH (§3.3). Since, except for Mandarin, there are always two datasets available per domain, we train the models in the supervised setting using the multi-task approach (but use emotion label augmentation for CVAT). By contrast, in the zero-shot setting, we train a model on one, yet test on another dataset. Thus, we rely on emotion label augmentation here (and have to exclude CVAT for a lack of a second Mandarin dataset). We emphasize that the zero-shot evaluation has very demanding data requirements: This setting not only requires two datasets of the same language domain with different label formats (which is already rare) but also additional data to fit mapping models for those particular label formats. To the best of our
+
+| ID | Vars | Size | Citation |
| en1 | VAD | 1,034 | Bradley and Lang (1999) |
| en2 | BE5 | 1,034 | Stevenson et al. (2007) |
| es1 | VA | 14,031 | Stadthagen-González et al. (2017) |
| es2 | BE5 | 10,491 | Stadthagen-González et al. (2018) |
| de1 | VA | 2,902 | Võ et al. (2009) |
| de2 | BE5 | 1,958 | Briesemeister et al. (2011) |
| pl1 | VA | 2,902 | Riegel et al. (2015) |
| pl2 | BE5 | 2,902 | Wierzba et al. (2015) |
| tr1 | VA | 2,029 | Kapucu et al. (2018) |
| tr2 | BE5 | 2,029 | Kapucu et al. (2018) |
+
+Table 2: Word datasets. IDs contain the respective ISO 639-1 language code.
+
+| ID | Vars | Size | Lg | Domain |
| AFFT | BE5 | 1,250 | en | news headlines |
| EMOB | VAD | 10,062 | en | genre-balanced |
| CVAT | VA | 2,969 | zh | mixed online domains |
+
+Table 3: Overview of text datasets.
+
+knowledge, EMOBANK and AFFT form the only suitable dataset pair on the text-level. At the word-level, such pairs are somewhat easier to get due to highly standardized data collection efforts for affective word norm datasets in psychology (see §2). For this reason, we employ a larger number of word- than text-level datasets in our experiments.
+
+Importantly, only the data requirements for evaluating our approach in the zero-shot setting are hard to meet. Yet, inference is much easier to provide. We would even argue that the reason why our method is so hard to evaluate is precisely what makes it so valuable. Take the Mandarin CVAT dataset, for example. It is annotated with Valence and Arousal, but there is, to our knowledge, no compatible Mandarin dataset with basic emotions (thus, CVAT is not used in the zero-shot setting). Our method allows to freely switch between output label formats at inference time without language constraints. That is, we can predict BE5 ratings in Chinese even though there is no such training data.
+
+In terms of base models, we used the Feed-Forward Network developed by Buechel and Hahn (2018b) for the word datasets. This model predicts emotion ratings based on pre-trained embedding vectors (taken from Grave et al., 2018). For text datasets, we chose the $\mathrm{BERT}_{\mathrm{base}}$ transformer model by Devlin et al. (2019) using the implementation and pre-trained weights by Wolf et al. (2020). Both (word and text) base models use identical hyperparameter settings with or without PPH extension. For the word model, we copied the settings of the authors, whereas text model hyperparameters were tuned manually for the base model without PPH.
+
+We derived training data for the prediction heads (label mapping datasets) by combining the ratings of the word datasets en1 and en2. We used the label mapping model from Buechel and Hahn (2018a) as auxiliary label encoders. The dimensionality of the emotion space was set to 100. The label mapping models used as external post-processors in the zero-shot setting were also based on Buechel and Hahn (2018a) and were trained on the same data as the label encoders. Further details beneficial for reproducibility are given in Appendix D.
+
+# 5 Results
+
+Our main experimental results are summarized in Tables 4 to 7. For conciseness, correlation values are averaged over all target variables per dataset. Per-variable results are given in Appendix B.
+
+Looking at the word datasets in the supervised setup (Tab. 4), we find that attaching portable prediction heads (PPH) not only retains, but often enough slightly increases the performance of the FFN base model ( $p=.008$ ; two-sided Wilcoxon signed-rank test based on per-dataset results). Since we trained only one base model with PPH per language (but two without PPH), our data suggest that the emotion representations learned with PPH can easily hold affective information from different label formats at the same time. Moreover, PPH here offers the practical benefit of reducing the total disk space used by the resulting model checkpoints due to the smaller number of trained base models. Experiments on the text datasets using BERT as base model show results in line with these findings (see Tab. 5).
+
+In the zero-shot setup, models are tested on datasets with label formats different from the training phase (e.g., en1 and en2). On the word datasets, using PPH shows small improvements in comparison with the base model as is $(p=.003$ ; Tab. 6), again suggesting that the learned emotion representations generalize robustly across label formats. Importantly, the base model is only capable of producing this label format at all because we equip it with a label mapping post-processor. While this procedure is very accurate (indeed, it constitutes a very strong baseline), it depends on an external component that may or may not be available for
+
+| Test Data | Base Model (FFN) | Base Model + PPH |
| Train Data | r | Train Data | r |
| en1 (VAD) | en1 (VAD) | .818 | en1+en2 | .824 |
| en2 (BE5) | en2 (BE5) | .898 | en1+en2 | .898 |
| es1 (VA) | es1 (VA) | .820 | es1+es2 | .833 |
| es2 (BE5) | es2 (BE5) | .789 | es1+es2 | .820 |
| de1 (VA) | de1 (VA) | .822 | de1+de2 | .836 |
| de2 (BE5) | de2 (BE5) | .754 | de1+de2 | .748 |
| pl1 (VA) | pl1 (VA) | .794 | pl1+pl2 | .835 |
| pl2 (BE5) | pl2 (BE5) | .814 | pl1+pl2 | .845 |
| tr1 (VA) | tr1 (VA) | .567 | tr1+tr2 | .575 |
| tr2 (BE5) | tr2 (BE5) | .607 | tr1+tr2 | .614 |
| Mean | .768 | .783 |
| Disk Use | 4.33 MB | 2.52 MB |
+
+Table 4: Word-level results of supervised setting.
+
+| Test Data | Base Model (BERT) | Base Model + PPH |
| Train Data | r | Train Data | r |
| EmoB | EmoB | .630 | EmoB+AffT | .619 |
| AffT | AffT | .746 | EmoB+AffT | .755 |
| CVAT | CVAT | .737 | CVAT | .748 |
| Mean | .704 | .707 |
| Disk Use | 1.25 GB | 0.81 GB |
+
+Table 5: Text-level results of supervised setting.
+
+| Test Data | Base Model (FFN) | Base Model + PPH |
| Train Data | r | Train Data | r |
| en1 (VAD) | en2 (BE5) | .801 | en2 | .810 |
| en2 (BE5) | en1 (VAD) | .834 | en1 | .839 |
| es1 (VA) | es2 (BE5) | .720 | es2 | .723 |
| es2 (BE5) | es1 (VA) | .777 | es1 | .792 |
| de1 (VA) | de2 (BE5) | .681 | de2 | .684 |
| de2 (BE5) | de1 (VA) | .637 | de1 | .641 |
| pl1 (VA) | pl2 (BE5) | .812 | pl2 | .812 |
| pl2 (BE5) | pl1 (VA) | .787 | pl1 | .807 |
| tr1 (VA) | tr2 (BE5) | .538 | tr2 | .563 |
| tr2 (BE5) | tr1 (VA) | .550 | tr1 | .554 |
| Mean | .714 | .723 |
| Method | ext. post-processor | built-in |
+
+Table 6: Word-level results of zero-shot setting.
+
+| Test Data | Base Model (BERT) | Base Model + PPH |
| Train Data | r | Train Data | r |
| EmoB | AffT | .385 | AffT | .407 |
| AffT | EmoB | .584 | EmoB | .582 |
| Mean | .485 | .495 |
| Method | ext. post-processor | built-in |
+
+Table 7: Text-level results of zero-shot setting.
+
+the desired mapping direction (the source and the target label format). In contrast, the zero-shot capability is innate to ("built-in") the PPH approach. While we need only one prediction head per label format, the number of required mapping components for the base model grows on a quadratic scale with the number of considered formats. Again, text-level experiments show consistent results with word-level ones (Tab. 7).
+
+One may object that the reduction of memory footprint shown in Tables 4 and 5 can also be achieved by traditional multi-task learning (i.e., attaching multiple heads to the base model, training it on two datasets, at once). Likewise, as Tables 6 and 7 indicate, the zero-shot capabilities offered by PPH can, in principle, be provided by additional label mapping components. However, PPH offers a much more elegant solution to combine the advantages of multi-task learning and label mapping without calling for additional (language) resources. Most importantly though, PPH is unique in its ability to embed samples from such heterogeneous datasets in a common representation space—a trait that may offer a general solution to studying emotion across languages, cultures, and individually preferred psychological theory.
+
+# 6 Visualization of the Emotion Space
+
+To gain first insights into the structure of our learned emotion space, we submitted the weight vectors of the emotion variables to principal com
+
+ponent analysis (PCA; recall from §3.2 that each row in a head's weights matrix $W$ corresponds to exactly one variable). Further, we derived emotion embeddings for the samples in Tab. 1 using the PPH-extended models evaluated in the last section. Applying the same PCA transformation to the embedding vectors, we co-locate the samples next to the emotion variables. The results (for the first three PCs) are displayed in Fig. 1. As can be seen, the relative positioning of the samples and variables shows high face validity—samples associated with similar feelings appear close to each other as well as to their akin variable. Appendix C provides additional analyses of the learned embedding space (focusing more deeply on the emotional interpretation of the PC axes and the distribution of emotion embeddings across languages) that further support this positive impression.
+
+# 7 Conclusions & Future Work
+
+We presented a method for learning a common representation space for the emotional loading of heterogeneous language items. While previous work successfully unified some sources' heterogeneity, our emotion embeddings are the first to comprehensively generalize over arbitrarily disparate language domains, label formats, and distinct neural network architectures. Our technique is based on a collection of portable prediction heads that can be attached to existing state-of-the-art models. Consequently, a model learns to embed language items in the common learned emotion space and thus to predict a wider range of emotional meaning facets, yet without sacrificing any predictive power as our experiments on 13 datasets (6 languages) indicate.
+
+Since the resulting emotion representations both generalize across various use cases and evidently capture a rich set of affective nuances, we consider this work particularly useful for downstream applications. Thus, future work may build on a concept of emotion similarity to, e.g., cluster diverse language items by their associated feeling, retrieve words that evoke emotions similar to a query, or compare the affective meaning of phrases and concepts across cultures.
+
+# Acknowledgments
+
+We would like to thank the anonymous reviewers for their helpful suggestions and comments, and Tinghui Duan, doctoral student at the JULIE LAB, for assisting us with the Mandarin gold data.
+
+# References
+
+Mohamed Abdalla and Graeme Hirst. 2017. Crosslingual sentiment analysis without (good) translation. In IJCNLP 2017 - Proceedings of the 8th International Joint Conference on Natural Language Processing, volume 1: Long Papers, pages 506-515, Taipei, Taiwan, November 27 - December 1, 2017.
+Muhammad Abdul-Mageed and Lyle H. Ungar. 2017. EmoNet: Fine-grained emotion detection with gated recurrent neural networks. In ACL 2017 - Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, volume 1: Long Papers, pages 718-728, Vancouver, British Columbia, Canada, July 30 - August 4, 2017.
+Cecilia Ovesdotter Alm, Dan Roth, and Richard Sproat. 2005. Emotions from text: Machine learning for text-based emotion prediction. In HLT-EMNLP 2005 - Proceedings of the Human Language Technology Conference & 2005 Conference on Empirical Methods in Natural Language Processing, pages 579-586, Vancouver, British Columbia, Canada, October 6-8, 2005.
+Saima Aman and Stan Szpakowicz. 2007. Identifying expressions of emotion in text. In TSD 2007 - Proceedings of the 10th International Conference on Text, Speech and Dialogue, pages 196-205, Pilsen, Czech Republic, September 3-7, 2007.
+Silvio Amir, Ramón F. Astudillo, Wang Ling, Bruno Martins, Mário J. Silva, and Isabel Trancoso. 2015. INESC-ID: A regression model for large scale Twitter sentiment lexicon induction. In SemEval 2015 — Proceedings of the 9th International Workshop on Semantic Evaluation @ NAACL-HLT 2015, pages 613-618, Denver, Colorado, USA, June 4-5, 2015.
+Isabelle Augenstein, Sebastian Ruder, and Anders Søgaard. 2018. Multi-task learning of pairwise sequence classification tasks over disparate label spaces. In *NAACL-HLT* 2018 — Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, volume 1: Long Papers, pages 1896–1906, New Orleans, Louisiana, USA, June 1–6, 2018.
+A. Balahur, J. M. Hermida, and A. Montoyo. 2012. Building and exploiting EMOTINET, a knowledge base for emotion detection based on the appraisal theory model. IEEE Transactions on Affective Computing, 3(1):88-101.
+Jeremy Barnes, Roman Klinger, and Sabine Schulte im Walde. 2018. Bilingual sentiment embeddings: Joint projection of sentiment across languages. In ACL 2018 — Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, volume 1: Long Papers, pages 2483–2493, Melbourne, Victoria, Australia, July 15–20, 2018.
+Johan Bollen, Huina Mao, and Xiaojun Zeng. 2011. Twitter mood predicts the stock market. Journal of Computational Science, 2(1):1-8.
+
+Laura Ana Maria Bostan, Evgeny Kim, and Roman Klinger. 2020. GOODNEWSEVERYONE: A corpus of news headlines annotated with emotions, semantic roles, and reader perception. In LREC 2020 — Proceedings of the 12th International Conference on Language Resources and Evaluation, pages 1554–1566, Marseille, France, May 11–16, 2020.
+Laura-Ana-Maria Bostan and Roman Klinger. 2018. An analysis of annotated corpora for emotion classification in text. In COLING 2018 - Proceedings of the 27th International Conference on Computational Linguistics, pages 2104-2119, Santa Fe, New Mexico, USA, August 20-26, 2018.
+Margaret M. Bradley and Peter J. Lang. 1999. Affective norms for English words (ANew): Stimuli, instruction manual and affective ratings. Technical Report C-1, The Center for Research in Psychophysiology, University of Florida, Gainesville, Florida, USA.
+Benny B. Briesemeister, Lars Kuchenke, and Arthur M. Jacobs. 2011. Discrete Emotion Norms for Nouns: Berlin Affective Word List (DENN-BAWL). Behavior Research Methods, 43(2):#441.
+Sven Buechel and Udo Hahn. 2017. EMOBANK: Studying the impact of annotation perspective and representation format on dimensional emotion analysis. In EACL 2017 - Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics, volume 2: Short Papers, pages 578-585, Valencia, Spain, April 3-7, 2017.
+Sven Buechel and Udo Hahn. 2018a. Emotion representation mapping for automatic lexicon construction (mostly) performs on human level. In COLING 2018 - Proceedings of the 27th International Conference on Computational Linguistics, pages 2892-2904, Santa Fe, New Mexico, USA, August 20-26, 2018.
+Sven Buechel and Udo Hahn. 2018b. Word emotion induction for multiple languages as a deep multi-task learning problem. In *NAACL-HLT* 2018 — Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, volume 1: Long Papers, pages 1907–1918, New Orleans, Louisiana, USA, June 1–6, 2018.
+Rafael A. Calvo and Sunghwan Mac Kim. 2013. Emotions in text: Dimensional and categorical models. Computational Intelligence, 29(3):527-543.
+Luna De Bruyne, Pepa Atanasova, and Isabelle Augenstein. 2022. Joint emotion label space modeling for affect lexica. Computer Speech & Language, 71:#101257.
+Luna De Bruyne, Orphée De Clercq, and Véronique Hoste. 2020. An emotional mess! Deciding on a framework for building a Dutch emotion-annotated
+
+corpus. In LREC 2020 — Proceedings of the 12th International Conference on Language Resources and Evaluation, pages 1643–1651, Marseille, France, May 11–16, 2020.
+Jean-Benoit Delbrouck, Noé Tits, Mathilde Brousmiche, and Stéphane Dupont. 2020. A transformer-based joint-encoding for emotion recognition and sentiment analysis. In *Challenge-HML* 2020 — Proceedings of the 2nd Grand Challenge and Workshop on Multimodal Language @ ACL 2020, pages 1–7, Virtual event, July 10, 2020.
+Dorottya Demszky, Dana Movshovitz-Attias, Jeongwoo Ko, Alan Cowen, Gaurav Nemade, and Sujith Ravi. 2020. GOEMOTIONS: A dataset of fine-grained emotions. In ACL 2020 — Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4040–4054, Virtual event, July 5–10, 2020.
+Bart Desmet and Véronique Hoste. 2013. Emotion detection in suicide notes. Expert Systems with Applications, 40(16):6351-6358.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In *NAACL-HLT* 2019 — 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, USA, June 2–7, 2019.
+Paul Ekman. 1992. An argument for basic emotions. Cognition and Emotion, 6(3-4):169-200.
+Manaal Faruqui, Jesse Dodge, Sujay Kumar Jauhar, Chris Dyer, Eduard H. Hovy, and Noah A. Smith. 2015. Retrofitting word vectors to semantic lexicons. In *NAACL-HLT* 2015 — Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1606–1615, Denver, Colorado, USA, May 31 – June 5, 2015.
+Bjarke Felbo, Alan Mislove, Anders Søgaard, Iyad Rahwan, and Sune Lehmann. 2017. Using millions of emoji occurrences to learn any-domain representations for detecting sentiment, emotion and sarcasm. In EMNLP 2017 - Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1615-1625, Copenhagen, Denmark, September 7-11, 2017.
+Dehong Gao, Furu Wei, Wenjie Li, Xiaohua Liu, and Ming Zhou. 2015. Cross-lingual sentiment lexicon learning with bilingual word graph label propagation. Computational Linguistics, 41(1):21-40.
+Radhika Gaonkar, Heeyoung Kwon, Mohaddeseh Bastan, Niranjan Balasubramanian, and Nathanael
+
+Chambers. 2020. Modeling label semantics for predicting emotional reactions. In ACL 2020 — Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4687-4692, Virtual event, Juli 5-10, 2020.
+Edouard Grave, Piotr Bojanowski, Prakhar Gupta, Armand Joulin, and Tomáš Mikolov. 2018. Learning word vectors for 157 languages. In LREC 2018 — Proceedings of the 11th International Conference on Language Resources and Evaluation, pages 3483–3487, Miyazaki, Japan, May 7–12, 2018.
+Jing Han, Zixing Zhang, Zhao Ren, and Björn W. Schuller. 2021. EMOBED: Strengthening monomodal emotion recognition via training with cross-modal emotion embeddings. IEEE Transactions on Affective Computing, 12:553-564.
+Vasileios Hatzivassiloglou and Kathleen R. McKeown. 1997. Predicting the semantic orientation of adjectives. In ACL-EACL 1997 - Proceedings of the 35th Annual Meeting of the Association for Computational Linguistics & 8th Conference of the European Chapter of the Association for Computational Linguistics, pages 174-181, Madrid, Spain, July 7-12, 1997.
+Jan Hofmann, Enrica Troiano, Kai Sassenberg, and Roman Klinger. 2020. Appraisal theories for emotion classification in text. In *COLING* 2020 — Proceedings of the 28th International Conference on Computational Linguistics, pages 125–138, Virtual Event, December 8–13, 2020.
+Aycan Kapucu, Asli Kılıç, Yildiz Özkılıç, and Bengisu Saribaz. 2018. Turkish emotional word norms for arousal, valence, and discrete emotion categories. Psychological Reports, pages 1-22. [Available online Dec 4, 2018].
+Sopan Khosla, Niyati Chhaya, and Kushal Chawla. 2018. AFF2VEC: Affect-enriched distributional word representations. In COLING 2018 - Proceedings of the 27th International Conference on Computational Linguistics, pages 2204-2218, Santa Fe, New Mexico, USA, August 20-26, 2018.
+Yoon Kim. 2014. Convolutional neural networks for sentence classification. In EMNLP 2014 - Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, pages 1746-1751, Doha, Qatar, October 25-29, 2014.
+Sotiris Lamprinidis, Federico Bianchi, Daniel Hardt, and Dirk Hovy. 2021. UNIVERSAL JOY: A data set and results for classifying emotions across languages. In WASSA 2021 - Proceedings of the 11th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis @ EACL 2021, pages 62-75, Virtual Event, April 19, 2021.
+Minglei Li, Qin Lu, Yunfei Long, and Lin Gui. 2017. Inferring affective meanings of words from word embedding. IEEE Transactions on Affective Computing, 8(4):443-456.
+
+Shoushan Li, Jian Xu, Dong Zhang, and Guodong Zhou. 2016. Two-view label propagation to semi-supervised reader emotion classification. In COLING 2016 - Proceedings of the 26th International Conference on Computational Linguistics, volume Technical Papers, pages 2647-2655, Osaka, Japan, December 11-16, 2016.
+Saif Mohammad. 2018. Obtaining reliable human ratings of valence, arousal, and dominance for 20,000 English words. In ACL 2018 — Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, volume 1: Long Papers, pages 174–184, Melbourne, Victoria, Australia, July 15–20, 2018.
+Saif Mohammad, Svetlana Kiritchenko, and Xiaodan Zhu. 2013. NRC-CANADA: Building the state-of-the-art in sentiment analysis of tweets. In SemEval 2013 — Proceedings of the 7th International Workshop on Semantic Evaluation @ NAACL-HLT 2013, pages 321–327, Atlanta, Georgia, USA, June 14–15, 2013.
+Saif M. Mohammad and Peter D. Turney. 2013. Crowdsourcing a word-emotion association lexicon. Computational Intelligence, 29(3):436-465.
+Telmo Pires, Eva Schlinger, and Dan Garrette. 2019. How multilingual is multilingual BERT? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4996-5001, Florence, Italy, July 28 - August 2, 2019.
+Robert Plutchik. 2001. The nature of emotions. Human emotions have deep evolutionary roots, a fact that may explain their complexity and provide tools for clinical practice. American Scientist, 89(4):344-350.
+Soujanya Poria, Devamanyu Hazarika, Navonil Majumder, Gautam Naik, Erik Cambria, and Rada Mihalcea. 2019. MELD: A multimodal multi-party dataset for emotion recognition in conversations. In ACL 2019 — Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 527–536, Florence, Italy, July 28 – August 2, 2019.
+Ashequl Qadir and Ellen Riloff. 2014. Learning emotion indicators from tweets: Hashtags, hashtag patterns, and phrases. In *EMNLP* 2014 — Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, pages 1203–1209, Doha, Qatar, October 25–29, 2014.
+Monika Riegel, Małgorzata Wierzba, Marek Wypych, Łukasz Žurawski, Katarzyna Jednoróg, Anna Grabowska, and Artur Marchewka. 2015. Nencki Affective Word List (NAWL): The cultural adaptation of the Berlin Affective Word List—Reloaded (BAWL-R) for Polish. Behavior Research Methods, 47(4):1222-1236.
+
+Sascha Rothe, Sebastian Ebert, and Hinrich Schütze. 2016. Ultradense word embeddings by orthogonal transformation. In *NAACL* 2016 — Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 767–777, San Diego, California, USA, June 12–17, 2016.
+James A. Russell and Albert Mehrabian. 1977. Evidence for a three-factor theory of emotions. Journal of Research in Personality, 11(3):273-294.
+Klaus R. Scherer. 2000. Psychological models of emotion. In Joan C. Borod, editor, The Neuropsychology of Emotion, pages 137-162. Oxford University Press.
+João Sedoc, Daniel Preoticiuc-Pietro, and Lyle H. Ungar. 2017. Predicting emotional word ratings using distributional representations and signed clustering. In EACL 2017 - Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics, volume 2: Short Papers, pages 564-571, Valencia, Spain, April 3-7, 2017.
+Roman Shantala, Gennadiv Kyselov, and Anna Kyselova. 2018. Neural dialogue system with emotion embeddings. In SAIC 2018—Proceedings of the 1st IEEE International Conference on System Analysis & Intelligent Computing, pages 1-4, Kyiv, Ukraine, October 8-12, 2018.
+Richard Socher, Alex Perelygin, Jean Y. Wu, Jason Chuang, Christopher D. Manning, Andrew Y. Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP 2013 — Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1631–1642, Seattle, Washington, USA, October 18-21, 2013.
+Hans Stadthagen-González, Pilar Ferré, Miguel A. Pérez-Sánchez, Constance Imbault, and José Antonio Hinojosa. 2018. Norms for 10,491 Spanish words for five discrete emotions: Happiness, disgust, anger, fear, and sadness. Behavior Research Methods, 50(5):1943-1952.
+Hans Stadthagen-González, Constance Imbault, Miguel A. Pérez-Sánchez, and Marc Brysbært. 2017. Norms of valence and arousal for 14,031 Spanish words. Behavior Research Methods, 49(1):111-123.
+Jacopo Staiano and Marco Guerini. 2014. DEPECHE MOOD: A lexicon for emotion analysis from crowd annotated news. In ACL 2014 - Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics, volume 2: Short Papers, pages 427-433, Baltimore, Maryland, USA, June 22-27, 2014.
+Ryan A. Stevenson, Joseph A. Mikels, and Thomas W. James. 2007. Characterization of the Affective
+
+Norms for English Words by discrete emotional categories. Behavior Research Methods, 39(4):1020-1024.
+Carlo Strapparava and Rada Mihalcea. 2007. SemEval 2007 Task 14: Affective text. In SemEval 2007 — Proceedings of the 4th International Workshop on Semantic Evaluations @ ACL 2007, pages 70-74, Prague, Czech Republic, June 23-24, 2007.
+Maite Taboada, Julian Brooke, Milan Tofiloski, Kimberly Voll, and Manfred Stede. 2011. Lexicon-based methods for sentiment analysis. Computational Linguistics, 37(2):267-307.
+Shabnam Tafreshi and Mona Diab. 2018. Emotion detection and classification in a multigene corpus with joint multi-task deep learning. In COLING 2018 — Proceedings of the 27th International Conference on Computational Linguistics, volume 1, Technical Papers, pages 2905–2913, Santa Fe, New Mexico, USA, August 20–26, 2018.
+Enrica Troiano, Sebastian Padó, and Roman Klinger. 2019. Crowdsourcing and validating event-focused emotion corpora for German and English. In ACL 2019 — Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4005–4011, Florence, Italy, July 28 – August 2, 2019.
+Peter D. Turney and Michael L. Littman. 2003. Measuring praise and criticism: Inference of semantic orientation from association. ACM Transactions on Information Systems, 21(4):315-346.
+Melissa L.-H. Vō, Markus Conrad, Lars Kuchenke, Karolina Urton, Markus J. Hofmann, and Arthur M. Jacobs. 2009. The Berlin Affective Word List Reloaded (BOWL-R). Behavior Research Methods, 41(2):534-538.
+Shuo Wang, Aishan Maoliniyazi, Xinle Wu, and Xiaofeng Meng. 2020. EMO2VEC: Learning emotional embeddings via multi-emotion category. ACM Transactions on Internet Technology, 20(2):1-17.
+Xiangyu Wang and Chengqing Zong. 2021. Distributed representations of emotion categories in emotion space. In ACL-IJCNLP 2021 - Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics & 11th International Joint Conference on Natural Language Processing, volume 1: Long Papers, pages 2364-2375, Virtual Event, August 1-6, 2021.
+Małgorzata Wierzba, Monika Riegel, Marek Wypych, Katarzyna Jednoróg, Paweł Turnau, Anna Grabowska, and Artur Marchewka. 2015. Basic emotions in the Nencki Affective Word List (NAWL BE): New method of classifying emotional stimuli. PLoS ONE, 10(7):#e0132305.
+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 M. Rush. 2020. Huggingface's transformers: State-of-the-art natural language processing. arXiv:1910.03771 [cs].
+Peng Xu, Andrea Madotto, Chien-Sheng Wu, Ji Ho Park, and Pascale Fung. 2018. EMO2VEC: Learning generalized emotion representation by multi-task training. In WASSA 2018 - Proceedings of the 9th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis @ EMNLP 2018, pages 292-298, Brussels, Belgium, October 31, 2018.
+Liang-Chih Yu, Lung-Hao Lee, Shuai Hao, Jin Wang, Yunchao He, Jun Hu, K. Robert Lai, and Xuejie Zhang. 2016. Building Chinese affective resources in valence-arousal dimensions. In *NAACL-HLT* 2016 — Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 540–545, San Diego, California, USA, June 12–17, 2016.
+Liang-Chih Yu, Jin Wang, K. Robert Lai, and Xuejie Zhang. 2017. Refining word embeddings for sentiment analysis. In EMNLP 2017 - Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 534-539, Copenhagen, Denmark, September 9-11, 2017.
+Amir Zadeh, Minghai Chen, Soujanya Poria, Erik Cambria, and Louis-Philippe Morency. 2017. Tensor fusion network for multimodal sentiment analysis. In EMNLP 2017 - Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1103-1114, Copenhagen, Denmark, September 7-11, 2017.
+Peixiang Zhong, Di Wang, and Chunyan Miao. 2019. Knowledge-enriched transformer for emotion detection in textual conversations. In EMNLP-IJCNLP 2019 - Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing & 9th International Joint Conference on Natural Language Processing, pages 165-176, Hong Kong, China, November 3-7, 2019.
+
+Algorithm 1 Training the Multi-Way Mapping Model
+1: $(Y_{1,1},Y_{1,2}),(Y_{2,1},Y_{2,2}),\ldots (Y_{n,1},Y_{n,2})\gets$ Mapping datasets used for training
+2: $g_{1,1},h_{1,1},g_{1,2},h_{1,2},\dots ,g_{n,1},h_{n,1},g_{n,2},h_{n,2}\gets$ randomly initialized label encoders and prediction heads
+3: $n_{\mathrm{steps}}\gets$ total number of training steps
+4: for all $i_{\mathrm{step}}$ in 1,..., $n_{\mathrm{steps}}$ do
+5: $(Y_{i,1},Y_{i,2})\gets$ randomly sample a mapping dataset
+6: $(y_1,y_2)\gets$ randomly sample a batch s.t. $y_{1}\subset Y_{i,1}$ and $y_{2}\subset Y_{i,2}$ with identical indices
+7: $(e_1,e_2)\gets (gi,1(y_1),gi,2(y_2))$
+8: $\hat{y}_{1,1}\gets h_{i,1}(e_1)$
+9: $\hat{y}_{1,2}\gets h_{i,2}(e_1)$
+10: $\hat{y}_{2,1}\gets h_{i,1}(e_2)$
+11: $\hat{y}_{2,2}\gets h_{i,2}(e_2)$
+12: $L_{\mathrm{map}}\gets \mathcal{C}(y_1,\hat{y}_{2,1}) + \mathcal{C}(y_2,\hat{y}_{1,2})^{\ddagger}$
+13: $L_{\mathrm{auto}}\gets \mathcal{C}(y_1,\hat{y}_{1,1}) + \mathcal{C}(y_2,\hat{y}_{2,2})$
+14: $L_{\mathrm{sim}}\gets \mathcal{C}(e_1,e_2)$
+15: $L_{\mathrm{total}}\gets L_{\mathrm{map}} + L_{\mathrm{auto}} + L_{\mathrm{sim}}$
+16: compute $\nabla L_{\mathrm{total}}$ and update weights
+17: end for
+
+# A Algorithmic Details for Training the Multi-Way Mapping Model
+
+The intuition behind Algorithm 1 is as follows: We simultaneously train multiple label encoders and prediction heads on several mapping datasets using three distinct objective functions. First, of course, we consider the quality of the label mapping (mapping loss; line 12). Second, we propose an autoencoder loss (line 13) where the model must learn to reconstruct the original input from the emotion embedding. Third, we propose an embedding similarity loss (line 14) which enforces the similarity of the hidden representation of both formats for a given instance since they supposedly describe the same emotion. Our training loop starts by first sampling one of the mapping datasets and then a batch from the chosen dataset (lines 5-6). To compute the loss efficiently, we first cache the encoded representations of both label formats (line 7) before applying all relevant prediction heads (lines 8-11).
+
+# B Per-Variable Results
+
+For readability reasons, the experimental results reported in §5 only give the average performance score over all emotional target variables for a given
+
+dataset. To complement this, the full set of per-variable results are given in Tab. 8.
+
+| Level | Test | Setting | Model | Train | Val | Aro | Dom | Joy | Ang | Sad | Fea | Dis | Mean |
| word | en1 | supervised | FFN | en1 | .920 | .704 | .829 | — | — | — | — | — | .818 |
| FFN+PPH | en1+en2 | .936 | .700 | .836 | — | — | — | — | — | .824 |
| zeroshot | FFN | en2 | .932 | .664 | .808 | — | — | — | — | — | .801 |
| FFN+PPH | en2 | .927 | .701 | .802 | — | — | — | — | — | .810 |
| en2 | supervised | FFN | en2 | — | — | — | .929 | .900 | .898 | .890 | .873 | .898 |
| FFN+PPH | en1+en2 | — | — | — | .936 | .890 | .895 | .901 | .869 | .898 |
| zeroshot | FFN | en1 | — | — | — | .918 | .822 | .805 | .864 | .759 | .834 |
| FFN+PPH | en1 | — | — | — | .914 | .835 | .850 | .843 | .751 | .839 |
| es1 | supervised | FFN | es2 | .848 | .792 | — | — | — | — | — | — | .820 |
| FFN+PPH | es1+es2 | .870 | .795 | — | — | — | — | — | — | .833 |
| zeroshot | FFN | es2 | .873 | .567 | — | — | — | — | — | — | .720 |
| FFN+PPH | es2 | .872 | .575 | — | — | — | — | — | — | .723 |
| es2 | supervised | FFN | es2 | — | — | — | .768 | .793 | .834 | .803 | .745 | .789 |
| FFN+PPH | es1+es2 | — | — | — | .817 | .832 | .857 | .838 | .754 | .820 |
| zeroshot | FFN | es1 | — | — | — | .808 | .795 | .823 | .775 | .685 | .777 |
| FFN+PPH | es2 | — | — | — | .811 | .805 | .839 | .810 | .695 | .792 |
| de1 | supervised | FFN | de1 | .867 | .776 | — | — | — | — | — | — | .822 |
| FFN+PPH | de1+de2 | .892 | .780 | — | — | — | — | — | — | .836 |
| zeroshot | FFN | de2 | .832 | .530 | — | — | — | — | — | — | .681 |
| FFN+PPH | de2 | .836 | .532 | — | — | — | — | — | — | .684 |
| de2 | supervised | FFN | de2 | — | — | — | .812 | .766 | .738 | .798 | .653 | .754 |
| FFN+PPH | de1+de2 | — | — | — | .842 | .788 | .655 | .795 | .662 | .748 |
| zeroshot | FFN | de1 | — | — | — | .824 | .717 | .500 | .733 | .411 | .637 |
| FFN+PPH | de1 | — | — | — | .824 | .720 | .489 | .749 | .424 | .641 |
| pl1 | supervised | FFN | pl1 | .852 | .735 | — | — | — | — | — | — | .794 |
| FFN+PPH | pl1+pl2 | .907 | .764 | — | — | — | — | — | — | .835 |
| zeroshot | FFN | pl2 | .919 | .705 | — | — | — | — | — | — | .812 |
| FFN+PPH | pl2 | .918 | .707 | — | — | — | — | — | — | .812 |
| pl2 | supervised | FFN | pl2 | — | — | — | .819 | .807 | .815 | .810 | .821 | .814 |
| FFN+PPH | pl1+pl2 | — | — | — | .897 | .835 | .820 | .826 | .846 | .845 |
| zeroshot | FFN | pl1 | — | — | — | .877 | .786 | .749 | .763 | .761 | .787 |
| FFN+PPH | pl1 | — | — | — | .893 | .798 | .777 | .779 | .789 | .807 |
| tr1 | supervised | FFN | tr1 | .556 | .577 | — | — | — | — | — | — | .567 |
| FFN+PPH | tr1+tr2 | .571 | .579 | — | — | — | — | — | — | .575 |
| zeroshot | FFN | tr2 | .561 | .514 | — | — | — | — | — | — | .538 |
| FFN+PPH | tr2 | .576 | .549 | — | — | — | — | — | — | .563 |
| tr2 | supervised | FFN | tr1 | — | — | — | .607 | .603 | .628 | .627 | .568 | .607 |
| FFN+PPH | tr1+tr2 | — | — | — | .611 | .608 | .628 | .634 | .589 | .614 |
| zeroshot | FFN | tr1 | — | — | — | .547 | .566 | .563 | .579 | .495 | .550 |
| FFN+PPH | tr1 | — | — | — | .583 | .533 | .575 | .588 | .488 | .554 |
| text | EmoB | supervised | BERT | EmoB | .801 | .562 | .527 | — | — | — | — | — | .630 |
| BERT+PPH | EmoB+AffT | .798 | .550 | .509 | — | — | — | — | — | .619 |
| zeroshot | BERT | AffT | .660 | .200 | .295 | — | — | — | — | — | .385 |
| BERT+PPH | AffT | .686 | .238 | .297 | — | — | — | — | — | .407 |
| AffT | supervised | BERT | AffT | — | — | — | .730 | .634 | .818 | .836 | .712 | .746 |
| BERT+PPH | EmoB+AffT | — | — | — | .776 | .659 | .823 | .841 | .675 | .755 |
| BERT | EmoB | — | — | — | .727 | .485 | .727 | .689 | .290 | .584 |
| BERT+PPH | EmoB | — | — | — | .724 | .491 | .736 | .704 | .255 | .582 |
| CVAT | supervised | BERT | CVAT | .878 | .596 | — | — | — | — | — | — | .737 |
| BERT+PPH | CVAT | .878 | .617 | — | — | — | — | — | — | .748 |
+
+Table 8: Full experimental results per dataset and target variable in Pearson's $r$ . "Mean" column corresponds to data given in Tabs. 4, 5, 6, and 7.
+
+# C Further Analysis of the Emotion Space
+
+Building on the PCA transformation described in §6, we illustrate the position of all emotion variables in Fig. 5.
+
+Within the first three principal components, two major groups can be visually discerned: the negative basic emotions of Sadness, Fear, and Anger forming the first group, and Joy and the two affective dimensions of Valence and Dominance forming the second. Intuitively speaking, this stands to reason, as Valence and Dominance typically show a very high positive correlation in annotation studies. The same holds for Valence and Joy. Likewise, Sadness, Fear, and Anger usually correlate positively with each other. Yet, between these groups of variables, studies show a negative correlation (cf. studies listed in Tab. 2). Interestingly, these observations indicate that the first principal component of the emotion space may represent a Polarity axis.
+
+The remaining two variables, Disgust and Arousal, position themselves relatively far from the aforementioned groups and opposite of each other in the second principal component. While it is less obvious what this component represents, it is worth noting that both Arousal and Disgust generalize poorly across label formats. That is, while Joy, Anger, Sadness, and Fear are relatively easy to predict from VAD ratings in a label mapping experiment, and, likewise, Valence and Dominance can well be estimated from BE5 ratings, the variables of Arousal and Disgust seem to carry information more specific to their respective label format (Buechel and Hahn, 2018a). In the light of these observations, it may not come as a surprise that these variables receive positions that demarcate them clearly from the remaining ones.
+
+The third principal component seems to be linked to the intensity or action potential of a feeling. Here, Arousal, Dominance, and Disgust and, less pronounced, Fear and Anger score highly, while Sadness and Joy receive comparatively low values.
+
+Next, we examine whether the learned representations are sufficiently language-agnostic, i.e., that samples with similar emotional load receive similar embeddings independent of their language domain. We derived emotion embeddings for all entries in all of our word datasets (cf. Tab. 2) using the base models with portable prediction heads from the "supervised" setting of our main experiments. Again building on the previously established PCA
+
+
+Figure 5: Position of emotion variables in PCA space.
+
+transformation, we plotted the position of these multilingual samples in 2D (see Fig. 6).
+
+It is noteworthy that entries in our emotion space seem to form clusters according to their affective meaning and not within their dataset or language. As a result, items from different languages overlap so heavily that their respective markers $(\bigcirc, \triangle, \square, \diamond, \text{and} \star)$ become hard to differentiate.
+
+Furthermore, we selected the highest- and lowest-rated words for Valence and Arousal and the highest-rated word for Disgust in each language. We locate these words in the PCA space and give translations for non-English entries. As can be seen, their position shows high face validity relative to each other and the emotion variables, supporting our claim that the learned emotion space is indeed language-independent.
+
+We emphasize that monolingual, rather than crosslingual, word embeddings were used and that samples from each language were embedded using a separate base model. Hence, the observed alignment of words in PCA space may safely be attributed to our proposed training scheme using portable prediction heads.
+
+# D Further Details for Reproducibility
+
+# D.1 Description of Computing Infrastructure
+
+All experiments were conducted on a single machine with a Debian 4 operating system. The hardware specifications are as follows:
+
+- 1 GeForce GTX 1080 with 8 GB graphics memory
+- 1 Intel i7 CPU with $3.60\mathrm{GHz}$
+64 GB RAM
+
+
+Figure 6: Position of the emotion variables Valence, Arousal, Dominance and joy, anger, sadness, fear, and disgust in the learned emotion space $\mathbb{R}^d$ (first two PCA dimensions; origin marked with "0") together with entries from English $(\bigcirc)$ , Spanish $(\triangle)$ , German $(\square)$ , Polish $(\diamond)$ , and Turkish $(\star)$ word datasets, as well as highest and lowest Valence and Arousal word, and highest Disgust word per language (arrows).
+
+# D.2 Runtime of the Experiments
+
+Training the multi-way mapping model takes about one minute. Training time for the base models varies depending on the dataset. In the following, we report training and inference times for the largest dataset per condition, respectively, describing an upper bound of the time requirements.
+
+Regarding the word models, it takes about ten minutes to train a base model without portable prediction heads (PPH) and about 15 minutes to train one with PPH. Since the latter base model replaces two of the former ones in our experiments, the overall training time is reduced by using PPH. Training a word model with emotion label augmentation (the alternative technique for fitting a model with PPH) takes 10 minutes, about as long as training it without PPH. Inference is completed in 1.5 minutes in either case. However, most of that time is needed for loading the language-specific word embeddings. Once this task is done, actually computing the predictions takes only about one second.
+
+Regarding the text models, a baseline model without PPH is trained in about 15 minutes. This number increases with PPH to 30 minutes using the multi-task approach (but again, one PPH model replaces two of the baseline models). In line with the runtime results of the word models, training the text base model with emotion label augmentation takes 15 minutes, about as long as training it without PPH. In either case, inference is completed in well under a minute.
+
+# D.3 Number of Parameters in Each Model
+
+The number of parameters per model is given in Tab. 9.
+
+| Model (Component) | No. Parameters |
| Portable Prediction Heads | 0.8K |
| Label Encoders (per format) | 18.8K |
| Label Encoders (in total) | 53.4K |
| Word-Level FFN (per model) | 110.6K |
| BERTbase (per model) | 110.0M |
+
+Table 9: Number of parameters in each model.
+
+# D.4 Validation Performance
+
+Tables 10 - 13 show the dev set results corresponding to the test set results in Tables 4 - 7, respectively. As can be seen, the former are consistent with the latter, yet overall slightly higher, as is usually the case.
+
+# D.5 Evaluation Metric
+
+Prediction quality is evaluated using Pearson correlation defined as
+
+$$
+r _ {x, y} := \frac {\sum_ {i = 1} ^ {n} (x _ {i} - \bar {x}) (y _ {i} - \bar {y})}{\sqrt {\sum_ {i = 1} ^ {n} (x _ {i} - \bar {x}) ^ {2}} \sqrt {\sum_ {i = 1} ^ {n} (y _ {i} - \bar {y}) ^ {2}}}
+$$
+
+where $x = x_{1},x_{2},\ldots ,x_{n},y = y_{1},y_{2},\ldots ,y_{n}$ are real-valued number sequences and $\bar{x},\bar{y}$ are their
+
+| Test Data | Base Model (FFN) | Base Model + PPH |
| Train Data | r | Train Data | r |
| en1 (VAD) | en1 (VAD) | .800 | en1+en2 | .806 |
| en2 (BE5) | en2 (BE5) | .876 | en1+en2 | .877 |
| es1 (VA) | es1 (BE5) | .832 | es1+es2 | .850 |
| es2 (BE5) | es2 (BE5) | .783 | es1+es2 | .820 |
| de1 (VA) | de1 (BE5) | .825 | de1+de2 | .835 |
| de2 (BE5) | de2 (BE5) | .780 | de1+de2 | .792 |
| pl1 (VA) | pl1 (BE5) | .794 | pl1+pl2 | .841 |
| pl2 (BE5) | pl2 (BE5) | .784 | pl1+pl2 | .835 |
| tr1 (VA) | tr1 (BE5) | .600 | tr1+tr2 | .611 |
| tr2 (BE5) | tr2 (BE5) | .613 | tr1+tr2 | .628 |
| Mean | .769 | .790 |
| Disk Use | 4.33 MB | 2.52 MB |
+
+Table 10: Validation word-level results in the supervised setting.
+
+| Test Data | Base Model (BERT) | Base Model + PPH |
| Train Data | r | Train Data | r |
| EmoB | EmoB | .610 | EmoB+AffT | .600 |
| AffT | AffT | .783 | EmoB+AffT | .790 |
| CVAT | CVAT | .748 | CVAT | .749 |
| Mean | .714 | .713 |
| Disk Use | 1.25 GB | 0.81 GB |
+
+respective means. We rely on the implementation provided in the SCIPY package. $^2$
+
+# D.6 Model and Hyperparameter Selection
+
+As described in §4, we mostly relied on hyperparameter choices by the authors of our base models. Hence, we performed only a relatively small amount of tuning throughout this work.
+
+For the word base model and the label encoder, no further hyperparameter selection was required. For the text base model (BERT), we verified via a first round of development experiments that default settings yield satisfying prediction quality on our datasets. The learning rate of the ADAMW optimizer was set to $10^{-5}$ based on established recommendations. Besides the number of training epochs (see below), the only dataset-specific hyperparameter choice had to be made for the batch size which we set according to constraints in GPU memory. (The samples in the CVAT dataset are significantly longer than in AFFT so that fewer samples of the former can be placed in one batch.) We used the pre-trained weights "bert-base-uncased" and "bert-base-chinese" from Wolf et al. (2020) for the English and Mandarin datasets, respectively. The dimensionality of the emotion space $\mathbb{R}^d$ was
+
+Table 11: Validation text-level results in the supervised setting.
+
+| Test Data | Base Model (FFN) | Base Model + PPH |
| Train Data | r | Train Data | r |
| en1 (VAD) | en2 (BE5) | .762 | en2 | .778 |
| en2 (BE5) | en1 (VAD) | .814 | en1 | .815 |
| es1 (VA) | es2 (BE5) | .759 | es2 | .758 |
| es2 (BE5) | es1 (VA) | .767 | es1 | .779 |
| de1 (VA) | de2 (BE5) | .692 | de2 | .672 |
| de2 (BE5) | de1 (VA) | .696 | de1 | .696 |
| pl1 (VA) | pl2 (BE5) | .806 | pl2 | .829 |
| pl2 (BE5) | pl1 (VA) | .776 | pl1 | .796 |
| tr1 (VA) | tr2 (BE5) | .556 | tr2 | .571 |
| tr2 (BE5) | tr1 (VA) | .556 | tr1 | .565 |
| Mean | .719 | .726 |
| Method | ext. post-processor | built-in |
+
+Table 12: Validation word-level results in the zero-shot setting.
+
+| Test Data | Base Model (BERT) | Base Model + PPH |
| Train Data | r | Train Data | r |
| EmoB | AffT | .353 | AffT | .368 |
| AffT | EmoB | .636 | EmoB | .664 |
| Mean | .495 | .516 |
| Method | ext. post-processor | built-in |
+
+Table 13: Validation text-level results in the zero-shot setting.
+
+initially set to 100 and remained unchanged after verifying that the Multi-Way Mapping Model indeed showed good label mapping performance.
+
+For each (word or text) dataset, we trained the models well beyond convergence, recording their dev set performance after each epoch (number of epochs differs between datasets). We then chose the best-performing checkpoint (according to Pearson correlation) for the final test set evaluation.
+
+Hyperparameter choices were identical between base models with and without PPH. We emphasize that for each base model, hyperparameters were set (by us or by the respective authors) with respect to base model without PPH, thus forming a challenging testbed for our approach. We see an extensive hyperparameter search as a fruitful venue for future work.
+
+# D.7 Data Access
+
+Below, we list URLs for all datasets used in our experiments.
+
+en1 https://osf.io/2k97q/download (ratings must be extracted from PDF)
+
+en2 https://static-content.springer.com/ esm/art%3A10.3758%2FBF03192999/ MediaObjects/Stevenson-BRM-2007.zip
+
+es1 https://static-content.springer.com/esm/art%3A10.3758%2Fs13428-015-0700-2/MediaObjects/13428_2015_700_MOESM1_ESM.csv
+
+```txt
+es2 https://static-content.springer.com/esm/art%3A10.3758% 2Fs13428-017-0962-y/MediaObjects/13428_2017_962 MOZESM1_ESM.csv
+```
+
+```html
+de1 https://www ewi-psy.fu-berlin.de/ einrichtungen/arbeitsbereiche/ allgpsy/Download/BAWL/index.html
+```
+
+```batch
+de2 https://static-content.springer.com/esm/art%3A10.3758% 2Fs13428-011-0059-y/MediaObjects/ 13428_2011_59 MOZESM1_ESM.xls
+```
+
+```txt
+pl1 https://static-content.springer.com/esm/art%3A10.3758%2Fs13428-014-0552-1/MediaObjects/13428_2014_552_MOESM1_ESM.xlsx
+```
+
+```txt
+pl2 https://doi.org/10.1371/journal.pone. 0132305.s004
+```
+
+```txt
+tr1 https://osf.io/rxtdm
+```
+
+```txt
+tr2 https://osf.io/rxtdm
+```
+
+```txt
+AFFT http://web.eecs.umich.edu/~mihalcea/affectivetext/
+```
+
+```txt
+EMOB https://github.com/JULIELab/EmoBank
+```
+
+```txt
+CVAT http://nlp.innobic.yzu.edu.tw/resources/cvat.html
+```
+
+# D.8 Details of Train-Dev-Test Splits
+
+EMOB comes with a stratified split with ratios of about 8-1-1 (exactly 8062 train, 1000 dev, 1000 test samples). Since the samples of AFFT are mostly also included in EMOB, we decided to use the data split of the latter for the former, too. Samples of AFFT that were not included in EMOB (about $5\%$ of the data) were removed before the experiments. CVAT features a 5-fold data split but without assigning the resulting parts to train, dev, or test utilization. We used the first three for training, the fourth for development/validation, and the fifth for testing.
+
+The word datasets in Tab. 2 do not come with a fixed data split. Instead, we defined splits ourselves with ratios ranging between 3-1-1 to 8-1-1, depending on the number of samples. Instances were randomly assigned to train, dev, and test split using fixed random seeds. The resulting partitions were stored as JSON files and placed under version control.
\ No newline at end of file
diff --git a/towardslabelagnosticemotionembeddings/images.zip b/towardslabelagnosticemotionembeddings/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..2d053c6378e4e7924f4cc44723364e341ec6916b
--- /dev/null
+++ b/towardslabelagnosticemotionembeddings/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:44c9f551611a7f7c2c1c0709a145971b80d6800acc985d7e373918625701ce56
+size 970911
diff --git a/towardslabelagnosticemotionembeddings/layout.json b/towardslabelagnosticemotionembeddings/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..e5486f78c6bf2d17b4ebb62b3dc5edb19dda5fec
--- /dev/null
+++ b/towardslabelagnosticemotionembeddings/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:153b299b212edea5844d5d261fee1aca366cd622d79527a13eea4c4ce09765a0
+size 580290
diff --git a/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/4c9da47d-dfd7-4016-a2ff-c448ff1bf7ba_content_list.json b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/4c9da47d-dfd7-4016-a2ff-c448ff1bf7ba_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..04418a246a2d628aaf4287af1747e84e8c5f01d6
--- /dev/null
+++ b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/4c9da47d-dfd7-4016-a2ff-c448ff1bf7ba_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f703a0a881366f63df1a1515e1cca276b1a6897dbe568a9ed1f8b9cd54a0bc84
+size 101381
diff --git a/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/4c9da47d-dfd7-4016-a2ff-c448ff1bf7ba_model.json b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/4c9da47d-dfd7-4016-a2ff-c448ff1bf7ba_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..42d4d269b86d03119c9b379a7e471dc2a0defacf
--- /dev/null
+++ b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/4c9da47d-dfd7-4016-a2ff-c448ff1bf7ba_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e35064fcc29c1904c6b30e9502a7457227faa12a0cf3ac85d9035b9a76e25d0f
+size 128906
diff --git a/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/4c9da47d-dfd7-4016-a2ff-c448ff1bf7ba_origin.pdf b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/4c9da47d-dfd7-4016-a2ff-c448ff1bf7ba_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7fdf7ec687072acff49469a65e43bccccfbdcb38
--- /dev/null
+++ b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/4c9da47d-dfd7-4016-a2ff-c448ff1bf7ba_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ca29a54208d7b171fef169525fd39d92453f3cd5c8379870a3d4f7ac3129857a
+size 2525709
diff --git a/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/full.md b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..64c3033c1d0bfb97bcb9d74d0578473d4d894a79
--- /dev/null
+++ b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/full.md
@@ -0,0 +1,470 @@
+# Towards Making the Most of Dialogue Characteristics for Neural Chat Translation
+
+Yunlong Liang $^{1*}$ , Chulun Zhou $^{2*}$ , Fandong Meng $^{3}$ , Jinan Xu $^{1}$ , Yufeng Chen $^{1}$ , Jinsong Su $^{2}$ and Jie Zhou $^{3}$
+
+$^{1}$ Beijing Key Lab of Traffic Data Analysis and Mining, Beijing Jiaotong University $^{2}$ School of Informatics, Xiamen University
+
+$^{3}$ Pattern Recognition Center, WeChat AI, Tencent Inc, China
+
+{yunlongliang, chenyf, jaxu}@bjtu.edu.cn clzhou@stu.xmu.edu.cn
+
+jssu@xmu.edu.cn {fandongmeng,withtomzhou}@tencent.com
+
+# Abstract
+
+Neural Chat Translation (NCT) aims to translate conversational text between speakers of different languages. Despite the promising performance of sentence-level and context-aware neural machine translation models, there still remain limitations in current NCT models because the inherent dialogue characteristics of chat, such as dialogue coherence and speaker personality, are neglected. In this paper, we propose to promote the chat translation by introducing the modeling of dialogue characteristics into the NCT model. To this end, we design four auxiliary tasks including monolingual response generation, cross-lingual response generation, next utterance discrimination, and speaker identification. Together with the main chat translation task, we optimize the NCT model through the training objectives of all these tasks. By this means, the NCT model can be enhanced by capturing the inherent dialogue characteristics, thus generating more coherent and speaker-relevant translations. Comprehensive experiments on four language directions (English $\Leftrightarrow$ German and English $\Leftrightarrow$ Chinese) verify the effectiveness and superiority of the proposed approach.
+
+# 1 Introduction
+
+A cross-lingual conversation involves participants that speak in different languages (e.g., one speaking in English and another in Chinese as shown in Fig. 1), where a chat translator can be applied to help participants communicate in their individual native languages. The chat translator converts the language of bilingual conversational text in both directions, e.g. from English to Chinese and vice versa (Farajian et al., 2020). With more international communication worldwide, the chat transla
+
+
+Figure 1: A dialogue example $(\mathrm{En} \Leftrightarrow \mathrm{Zh})$ when translating the utterance $X_{u}$ . CRG: cross-lingual response generation. MRG: monolingual response generation.
+
+tion task becomes more important and has a wider range of applications.
+
+In recent years, although sentence-level Neural Machine Translation (NMT) models (Sutskever et al., 2014; Vaswani et al., 2017; Hassan et al., 2018; Meng and Zhang, 2019; Yan et al., 2020; Zhang et al., 2019) have achieved remarkable progress and can be directly used as the chat translator, they often lead to incoherent and speakerirrelevant translations (Mirkin et al., 2015; Wang et al., 2017a; Läubli et al., 2018; Toral et al., 2018) due to ignoring the chat history that contains useful contextual information. To exploit chat history, context-aware NMT models (Tiedemann and Scherrer, 2017; Maruf and Haffari, 2018; Bawden et al., 2018; Miculicich et al., 2018; Tu et al., 2018; Voita et al., 2018, 2019a,b; Wang et al., 2019a; Maruf et al., 2019; Chen et al., 2020; Ma et al., 2020, etc) can also be directly adapted to chat translation. However, their performances are usually limited because of lacking the modeling of the inherent dialogue characteristics (e.g., the dialogue coherence and speaker personality), which matter for chat translation task as pointed out by Farajian et al. (2020).
+
+In this paper, we propose a Coherence-Speaker-
+
+Aware NCT (CSA-NCT) training framework to improve the NCT model by making use of dialogue characteristics in conversations. Concretely, from the perspectives of dialogue coherence and speaker personality, we design four auxiliary tasks along with the main chat translation task. For dialogue coherence, there are three tasks (two generation tasks and one discrimination task), namely monolingual response generation, cross-lingual response generation, and next utterance discrimination. Specifically, as shown in Fig. 1, (1) the monolingual response generation task aims to generate the coherent corresponding utterance in target language given the dialogue history context of the same language. Similarly, (2) the cross-lingual response generation task is to leverage the dialogue history context in source language to generate the coherent corresponding utterance in target language. Besides the above two generation tasks, (3) the next utterance discrimination task focuses on distinguishing whether the translated text is coherent to be the next utterance of the given dialogue history context. Moreover, for speaker personality, (4) we design the speaker identification task that judges whether the translated text is consistent with the personality of its original speaker. Together with the main chat translation task, the NCT model is optimized through the joint objectives of all these auxiliary tasks. In this way, the model is enhanced to capture dialogue coherence and speaker personality in conversation, which thus can generate more coherent and speaker-relevant translations.
+
+We validate our CSA-NCT framework on the datasets of different language pairs: BContrasT (Farajian et al., 2020) $(\mathrm{En} \Leftrightarrow \mathrm{De}^{1})$ and BMELD (Liang et al., 2021a) $(\mathrm{En} \Leftrightarrow \mathrm{Zh}^{2})$ . The experimental results show that our model achieves consistent improvements on four translation tasks in terms of both BLEU (Papineni et al., 2002) and TER (Snover et al., 2006), demonstrating its effectiveness and generalizability. Human evaluation further suggests that our model can generate more coherent and speaker-relevant translations compared to the existing related methods.
+
+Our contributions are summarized as follows:
+
+- To the best of our knowledge, we are the first to incorporate the dialogue coherence and speaker personality into neural chat translation.
+
+- We propose a multi-task learning framework with four auxiliary tasks to help the NCT model generate more coherent and speaker-relevant translations.
+- Extensive experiments on datasets of different language pairs demonstrate that our model with multi-task learning achieves the state-of-the-art performances on the chat translation task and significantly outperforms the existing sentence-level/context-aware NMT models.3
+
+# 2 Background
+
+Sentence-Level NMT. Given an input sequence $X = \{x_{i}\}_{i = 1}^{|X|}$ , the goal of the sentence-level NMT model is to generate its translation $Y = \{y_{i}\}_{i = 1}^{|Y|}$ . The model is optimized through the following objective:
+
+$$
+\mathcal {L} _ {\mathrm {S - N M T}} = - \sum_ {t = 1} ^ {| Y |} \log \left(p \left(y _ {t} \mid X, y _ {< t}\right)\right). \tag {1}
+$$
+
+Context-Aware NMT. As in (Ma et al., 2020), given a paragraph of input sentences $D^{X} = \{X_{j}\}_{j=1}^{J}$ in source language and its corresponding translations $D^{Y} = \{Y_{j}\}_{j=1}^{J}$ in target language with $J$ paired sentences, the training objective of a context-aware NMT model can be formalized as
+
+$$
+\mathcal {L} _ {\mathrm {C - N M T}} = - \sum_ {j = 1} ^ {J} \log \left(p \left(Y _ {j} \mid X _ {j}, X _ {< j}, Y _ {< j}\right)\right), \tag {2}
+$$
+
+where $X_{< j}$ and $Y_{< j}$ are the preceding contexts of the $j$ -th input source sentence and the $j$ -th target translation, respectively.
+
+# 3 CSA-NCT Training Framework
+
+In this section, we introduce the proposed CSA-NCT training framework, which aims to improve the NCT model with four elaborately designed auxiliary tasks. In the following subsections, we first describe the problem formalization (§ 3.1) and the NCT model (§ 3.2). Then, we introduce each auxiliary task in detail (§ 3.3). Finally, we elaborate the process of training and inference (§ 3.4).
+
+# 3.1 Problem Formalization
+
+In the scenario of this paper, the chat involves two speakers $(sx$ and $sy)$ speaking in two languages. As shown in Fig. 1, we assume the
+
+two speakers have alternately given utterances in their individual languages for $u$ turns, resulting in $X_{1}, X_{2}, X_{3}, X_{4}, X_{5}, \ldots, X_{u-1}, X_{u}$ and $Y_{1}, Y_{2}, Y_{3}, Y_{4}, Y_{5}, \ldots, Y_{u-1}, Y_{u}$ on the source and target sides, respectively. Among these utterances, $X_{1}, X_{3}, X_{5}, \ldots, X_{u}$ are originally spoken by the speaker $sx$ and $Y_{1}, Y_{3}, Y_{5}, \ldots, Y_{u}$ are the corresponding translations in target language. Analogously, $Y_{2}, Y_{4}, Y_{6}, \ldots, Y_{u-1}$ are originally spoken by the speaker $sy$ and $X_{2}, X_{4}, X_{6}, \ldots, X_{u-1}$ are the translated utterances in source language.
+
+According to languages, we define the dialogue history context of $X_{u}$ on the source side as $\mathcal{C}_{X_u} = \{X_1,X_2,X_3,X_4,X_5,\ldots ,X_{u - 1}\}$ and that of $Y_{u}$ on the target side as $C_{Y_u} = \{Y_1,Y_2,Y_3,Y_4,Y_5,\ldots ,Y_{u - 1}\}$ . According to original speakers, on the target side, we define the speaker $sx$ -specific dialogue history context of $Y_{u}$ as the partial set of its preceding utterances $\mathcal{C}_{Y_u}^{sx} = \{Y_1,Y_3,Y_5,\ldots ,Y_{u - 2}\}$ and the speaker $sy$ -specific dialogue history context of $Y_{u}$ as $\mathcal{C}_{Y_u}^{sy} = \{Y_2,Y_4,Y_6,\ldots ,Y_{u - 1}\}$ .
+
+Based on the above formulations, the goal of an NCT model is to translate $X_{u}$ to $Y_{u}$ with certain types of dialogue history context. Next, we will describe the NCT model in our CSA-NCT training framework.
+
+# 3.2 The NCT Model
+
+The NCT model is based on transformer (Vaswani et al., 2017), which is composed of an encoder and a decoder as shown in Fig. 2.
+
+Encoder. Following (Ma et al., 2020), the encoder takes $\left[\mathcal{C}_{X_u};X_u\right]$ as input, where $[\cdot ]$ denotes the concatenation. In addition to the conventional embedding layer with only word embedding WE and position embedding PE, we additionally add a speaker embedding SE and a turn embedding TE. The final embedding $\mathbf{B}(x_i)$ of the input word $x_{i}$ can be written as
+
+$$
+\mathbf {B} (x _ {i}) = \mathbf {W E} (x _ {i}) + \mathbf {P E} (x _ {i}) + \mathbf {S E} (x _ {i}) + \mathbf {T E} (x _ {i}),
+$$
+
+where $\mathbf{WE} \in \mathbb{R}^{|V| \times d}$ , $\mathbf{SE} \in \mathbb{R}^{2 \times d}$ and $\mathbf{TE} \in \mathbb{R}^{|T| \times d}$ .
+
+
+Figure 2: Architecture of the proposed CSA-NCT framework. The right part is the general NCT model, which is enhanced by four auxiliary tasks. The four auxiliary tasks including monolingual response generation (MRG), cross-lingual response generation (CRG), next utterance discrimination (NUD), and speaker identification (SI), are proposed to improve the coherence and speaker relevance of chat translation, which are presented in Fig. 3 in detail.
+
+Then, the embedding is fed into the NCT encoder that has $L$ identical layers, each of which is composed of a self-attention (SelfAtt) sub-layer and a feed-forward network (FFN) sub-layer. Let $\mathbf{h}_e^l$ denote the hidden states of the $l$ -th encoder layer, it is calculated as the following equations:
+
+$$
+\mathbf {z} _ {e} ^ {l} = \operatorname {S e l f A t t} (\mathbf {h} _ {e} ^ {l - 1}) + \mathbf {h} _ {e} ^ {l - 1},
+$$
+
+$$
+\mathbf {h} _ {e} ^ {l} = \mathrm {F F N} (\mathbf {z} _ {e} ^ {l}) + \mathbf {z} _ {e} ^ {l},
+$$
+
+where $\mathbf{h}_e^0$ is initialized as the embedding of input words. Particularly, words in $\mathcal{C}_{X_u}$ can only be attended to by those in $X_{u}$ at the first encoder layer while $\mathcal{C}_{X_u}$ is masked at the other layers, which is the same implementation as in (Ma et al., 2020).
+
+Decoder. The decoder also consists of $L$ identical layers, each of which additionally includes a cross-attention (CrossAtt) sub-layer compared to the encoder. Let $\mathbf{h}_d^l$ denote the hidden states of the $l$ -th decoder layer, it is computed as
+
+$$
+\mathbf {z} _ {d} ^ {l} = \operatorname {S e l f A t t} \left(\mathbf {h} _ {d} ^ {l - 1}\right) + \mathbf {h} _ {d} ^ {l - 1},
+$$
+
+$$
+\mathbf {c} _ {d} ^ {l} = \operatorname {C r o s s A t t} (\mathbf {z} _ {d} ^ {l}, \mathbf {h} _ {e} ^ {L}) + \mathbf {z} _ {d} ^ {l},
+$$
+
+$$
+\mathbf {h} _ {d} ^ {l} = \mathrm {F F N} (\mathbf {c} _ {d} ^ {l}) + \mathbf {c} _ {d} ^ {l},
+$$
+
+where $\mathbf{h}_e^L$ is the top-layer encoder hidden states.
+
+At each decoding time step $t$ , $\mathbf{h}_{d,t}^{L}$ is fed into a linear transformation layer and a softmax layer to predict the probability distribution of the next target token:
+
+$$
+p \left(Y _ {u, t} \mid Y _ {u, < t}, X _ {u}, \mathcal {C} _ {X _ {u}}\right) = \operatorname {S o f t m a x} \left(\mathbf {W} _ {o} \mathbf {h} _ {d, t} ^ {L} + \mathbf {b} _ {o}\right),
+$$
+
+
+Figure 3: Overview of four auxiliary tasks. The encoder and the decoder of auxiliary tasks are shared with the NCT model. The encoder encodes not only source-side but also target-side history context to enhance its ability of representation.
+
+
+
+where $Y_{u, < t}$ denotes the preceding tokens before the $t$ -th time step in the utterance $Y_{u}$ , $\mathbf{W}_{o} \in \mathbb{R}^{|V| \times d}$ and $\mathbf{b}_{o} \in \mathbb{R}^{|V|}$ are trainable parameters.
+
+Finally, the training objective is as follows:
+
+$$
+\mathcal {L} _ {\mathrm {N C T}} = - \sum_ {t = 1} ^ {| Y _ {u} |} \log \left(p \left(Y _ {u, t} \mid Y _ {u, < t}, X _ {u}, \mathcal {C} _ {X _ {u}}\right)\right). \tag {3}
+$$
+
+# 3.3 Auxiliary Tasks
+
+We elaborately design four auxiliary tasks to incorporate the modeling of dialogue characteristics. The four auxiliary tasks are divided into two groups. The first group is for dialogue coherence modeling while the second is for speaker personality modeling. Together with the main chat translation task, the NCT model can be enhanced to generate more coherent and speaker-relevant translations through multi-task learning.
+
+# 3.3.1 Dialogue Coherence Modeling
+
+Many studies (Kuang et al., 2018; Wang et al., 2019b; Xiong et al., 2019; Wang and Wan, 2019; Huang et al., 2020) have indicated that the modeling of global textual coherence can lead to more coherent text generation. Inspired by this, we add two response generation tasks and an utterance discrimination task during the NCT model training. All the three tasks are related to the dialogue coherence of conversations, thus introducing the modeling of dialogue coherence into the NCT model.
+
+Monolingual Response Generation (MRG). As illustrated in Fig. 3(a), given the dialogue history context $\mathcal{C}_{Y_u}$ in target language, the MRG task forces the NCT model to generate the corresponding utterance $Y_{u}$ coherent to $\mathcal{C}_{Y_u}$ . Particularly, we first use the encoder of the NCT model to encode
+
+$\mathcal{C}_{Y_u}$ , and then use the NCT decoder to predict $Y_{u}$ . The training objective of this task can be formulated as:
+
+$$
+\mathcal {L} _ {\mathrm {M R G}} = - \sum_ {t = 1} ^ {| Y _ {u} |} \log (p \left(Y _ {u, t} \mid \mathcal {C} _ {Y _ {u}}, Y _ {u, < t}\right)),
+$$
+
+$$
+p (Y _ {u, t} | \mathcal {C} _ {Y _ {u}}, Y _ {u, < t}) = \mathrm {S o f t m a x} (\mathbf {W} _ {m} \mathbf {h} _ {d, t} ^ {L} + \mathbf {b} _ {m}),
+$$
+
+where $\mathbf{h}_{d,t}^{L}$ is the top-layer decoder hidden state at the $t$ -th decoding step, $\mathbf{W}_m$ and $\mathbf{b}_m$ are trainable parameters.
+
+Cross-lingual Response Generation (CRG). The CRG task is similar to the MRG as shown in Fig. 3(b), where the NCT model is trained to generate the corresponding utterance $Y_{u}$ in target language which is coherent to the given dialogue history context $C_{X_u}$ in source language. We first use the encoder of the NCT model to encode $C_{X_u}$ and then use the NCT decoder to predict $Y_{u}$ . The training objective of this task can be formulated as:
+
+$$
+\mathcal {L} _ {\mathrm {C R G}} = - \sum_ {t = 1} ^ {| Y _ {u} |} \log (p (Y _ {u, t} | \mathcal {C} _ {X _ {u}}, Y _ {u, < t})),
+$$
+
+$$
+p (Y _ {u, t} | \mathcal {C} _ {X _ {u}}, Y _ {u, < t}) = \mathrm {S o f t m a x} (\mathbf {W} _ {c} \mathbf {h} _ {d, t} ^ {L} + \mathbf {b} _ {c}),
+$$
+
+where $\mathbf{h}_{d,t}^{L}$ denotes the top-layer decoder hidden state at the $t$ -th decoding step, $\mathbf{W}_{crg}$ and $\mathbf{b}_{crg}$ are trainable parameters.
+
+Note that in the above two response generation tasks, we use the same set of NCT model parameters except for the softmax layer (i.e., $\mathbf{W}_m$ , $\mathbf{b}_m$ , $\mathbf{W}_c$ and $\mathbf{b}_c$ ).
+
+Next Utterance Discrimination (NUD). As shown in Fig. 3(c), we design the NUD task to
+
+distinguish whether the translated text is coherent to be the next utterance of the given dialogue history context. Concretely, we construct positive and negative samples of context-utterance pairs from the chat corpus. A positive sample $(\mathcal{C}_{Y_u}, Y_{u^+})$ with the label $\ell = 1$ consists of the target utterance $Y_u$ and its dialogue history context $\mathcal{C}_{Y_u}$ . A negative sample $(\mathcal{C}_{Y_u}, Y_{u^-})$ with the label $\ell = 0$ consists of the identical $\mathcal{C}_{Y_u}$ and a randomly selected utterance $Y_{u^-}$ from the training set. Formally, the training objective of NUD is defined as follows:
+
+$$
+\begin{array}{l} \mathcal {L} _ {\mathrm {N U D}} = - \log (p (\ell = 1 | \mathcal {C} _ {Y _ {u}}, Y _ {u ^ {+}})) \tag {4} \\ - \log (p (\ell = 0 | \mathcal {C} _ {Y _ {u}}, Y _ {u ^ {-}})). \\ \end{array}
+$$
+
+For a training sample $(\mathcal{C}_{Y_u}, Y_u)$ , to estimate the probability in Eq. 4 for discrimination, we first obtain the representations $\mathbf{H}_{Y_u}$ of the target utterance $Y_u$ and $\mathbf{H}_{\mathcal{C}_{Y_u}}$ of the given dialogue history context $\mathcal{C}_{Y_u}$ using the NCT encoder. Specifically, $\mathbf{H}_{Y_u}$ is calculated as $\frac{1}{|Y_u|} \sum_{t=1}^{|Y_u|} \mathbf{h}_{e,t}^L$ while $\mathbf{H}_{\mathcal{C}_{Y_u}}$ is defined as the encoder hidden state $\mathbf{h}_{e,0}^L$ of the prepended special token '[cls]' of $\mathcal{C}_{Y_u}$ . Then, the concatenation of $\mathbf{H}_{Y_u}$ and $\mathbf{H}_{\mathcal{C}_{Y_u}}$ is fed into a binary NUD classifier, which is an extra fully-connected layer on top of the NCT encoder:
+
+$$
+p (\ell = 1 | \mathcal {C} _ {Y _ {u}}, Y _ {u}) = \mathrm {S o f t m a x} (\mathbf {W} _ {n} [ \mathbf {H} _ {Y _ {u}}; \mathbf {H} _ {\mathcal {C} _ {Y _ {u}}} ]),
+$$
+
+where $\mathbf{W}_n$ is the trainable parameter of the NUD classifier and the bias term is omitted for simplicity.
+
+# 3.3.2 Speaker Personality Modeling
+
+A dialogue always involves speakers who have different personalities, which is a salient characteristic of conversations. Therefore, we design a speaker identification task that incorporates the modeling of speaker personality into the NCT model, making the translated utterance more speaker-relevant.
+
+Speaker Identification (SI). As explored in (Bak and Oh, 2019; Wu et al., 2020; Liang et al., 2021b; Lin et al., 2021), the history utterances of a speaker can reflect a distinctive personality. Fig. 3(d) depicts the SI task in detail, where the NCT model is used to distinguish whether a translated utterance and a given speaker-specific history utterances are spoken by the same speaker. We also construct positive and negative training samples from the chat corpus. A positive sample $(\mathcal{C}_{Y_u}^{sx}, Y_u)$ with the label $\ell = 1$ consists of the target utterance $Y_u$ and the speaker $sx$ -specific history context $\mathcal{C}_{Y_u}^{sx}$ , because $Y_u$ is the translation of the utterance originally spoken by the speaker $sx$ . A negative sample
+
+# Algorithm 1: Optimization Algorithm
+
+Input: Sentence-level/Chat-level translation data $\mathcal{D}^s /\mathcal{D}^c$ Sentence-level/Chat-level MaxStep $T_{1} / T_{2}$ , CoherenceMaxStep $T_{2}$ SpeakerMaxStep $T_{2}$
+
+Init: $\theta$
+
+1 $t_1 = 0$ (Training sentence-level NMT model)
+2 for $t_1 < T_1$ do
+
+3 Randomly sample a batch $k$ from $\mathcal{D}^s$ .
+4 Compute $\mathcal{L}_{\mathrm{S - NMT}}$
+5 Update the parameters of the standard transformer model using Adam.
+
+Output: $\theta$
+
+$\mathbf{Init}$ : $\Theta$ using $\theta ,\alpha = 1.0,\beta = 1.0$
+
+$t_2 = 0$ (Training chat-level NMT model)
+
+7 for $t_2 < T_2$ do
+
+8 | Randomly sample a batch $k$ from $\mathcal{D}^c$ .
+9 Compute $\mathcal{L}_{\mathrm{MRG}},\mathcal{L}_{\mathrm{CRG}},\mathcal{L}_{\mathrm{NUD}},\mathcal{L}_{\mathrm{SI}}$ ,and $\mathcal{L}_{\mathrm{NCT}}$
+10 Update the parameters of the CSA-NCT model with respect to $\mathcal{I}$ using Adam.
+11 $d_{1} = \alpha *t_{2} / T_{2},\quad d_{2} = \beta *t_{2} / T_{2}$
+12 $\alpha = \max (0,\alpha -d_1)$
+13 $\beta = \max (0,\beta -d_2)$
+
+# Output: $\Theta$
+
+$(\mathcal{C}_{Y_u}^{sy}, Y_u)$ with the label $\ell = 0$ consists of the target utterance $Y_u$ and the speaker $sy$ -specific history context $\mathcal{C}_{Y_u}^{sy}$ . Formally, the training objective of SI is defined as follows:
+
+$$
+\begin{array}{l} \mathcal {L} _ {\mathrm {S I}} = - \log (p (\ell = 1 | \mathcal {C} _ {Y _ {u}} ^ {s x}, Y _ {u})) \tag {5} \\ - \log (p (\ell = 0 | \mathcal {C} _ {Y _ {u}} ^ {s y}, Y _ {u})). \\ \end{array}
+$$
+
+For a training sample $(\mathcal{C}_{Y_u}^s,Y_u)$ with $s\in \{sx, sy\}$ , we also use the NCT encoder to obtain the representations $\mathbf{H}_{Y_u}$ of the target utterance $Y_{u}$ and $\mathbf{H}_{\mathcal{C}_{Y_u}^s}$ of the given speaker-specific history context $\mathcal{C}_{Y_u}^s$ . Similar to the NUD task, $\mathbf{H}_{Y_u} = \frac{1}{|Y_u|}\sum_{t = 1}^{|Y_u|}\mathbf{h}_{e,t}^L$ and the $\mathbf{h}_{e,0}^L$ of $\mathcal{C}_{Y_u}^s$ is used as $\mathbf{H}_{\mathcal{C}_{Y_u}^s}$ . Then, to estimate the probability in Eq. 5, the concatenation of $\mathbf{H}_{Y_u}$ and $\mathbf{H}_{\mathcal{C}_{Y_u}^s}$ is fed into a binary SI classifier, which is another fully-connected layer on top of the NCT encoder:
+
+$$
+p (\ell = 1 | \mathcal {C} _ {Y _ {u}} ^ {s}, Y _ {u}) = \mathrm {S o f t m a x} (\mathbf {W} _ {s} [ \mathbf {H} _ {Y _ {u}}; \mathbf {H} _ {\mathcal {C} _ {Y _ {u}} ^ {s}} ]),
+$$
+
+where $\mathbf{W}_s$ is the trainable parameter of the SI classifier and the bias term is also omitted.
+
+# 3.4 Training and Inference
+
+For training, with the main chat translation task and four auxiliary tasks, the total training objective is finally formulated as
+
+$$
+\mathcal {J} = \mathcal {L} _ {\mathrm {N C T}} + \alpha \left(\mathcal {L} _ {\mathrm {M R G}} + \mathcal {L} _ {\mathrm {C R G}} + \mathcal {L} _ {\mathrm {N U D}}\right) + \beta \mathcal {L} _ {\mathrm {S I}}, \tag {6}
+$$
+
+where $\alpha$ and $\beta$ are balancing hyper-parameters for the trade-off between $\mathcal{L}_{\mathrm{NCT}}$ and the other auxiliary objectives. Algorithm 1 summarizes the training procedure of the above multi-task learning process, where $\theta$ refers to the parameters of our NCT model and $\Theta$ refers to the whole set of parameters including both $\theta$ and the parameters of the additional classifiers for auxiliary tasks.
+
+During inference, the four auxiliary tasks are not involved and only the NCT model $(\theta)$ is used to conduct chat translation.
+
+# 4 Experiments
+
+# 4.1 Datasets and Metrics
+
+Datasets. As shown in Algorithm 1, the training of our CSA-NCT framework consists of two stages: (1) pre-train the model on a large-scale sentence-level NMT corpus $(\mathrm{WMT20^8})$ ; (2) fine-tune on the chat translation corpus (BConTrasT (Farajian et al., 2020) and BMELD (Liang et al., 2021a)). The dataset details (e.g., splits of training, validation or test sets) are described in Appendix A.
+
+Metrics. For fair comparison, we use the Sacre-BLEU $^9$ (Post, 2018) and TER (Snover et al., 2006) with the statistical significance test (Koehn, 2004). For $\mathrm{En} \Leftrightarrow \mathrm{De}$ , we report case-sensitive score following the WMT20 chat task (Farajian et al., 2020). For $\mathrm{Zh} \Rightarrow \mathrm{En}$ , we report case-insensitive score. For $\mathrm{En} \Rightarrow \mathrm{Zh}$ , the reported SacreBLEU is at the character level.
+
+# 4.2 Implementation Details
+
+In this paper, we adopt the settings of standard Transformer-Base and Transformer-Big in (Vaswani et al., 2017) and follow the main setting in (Liang et al., 2021a). Specifically, in Transformer-Base, we use 512 as hidden size (i.e., $d$ ), 2048 as filter size and 8 heads in multihead attention. In Transformer-Big, we use 1024 as hidden size, 4096 as filter size, and 16 heads in multihead
+
+ | Setting | En⇒De | En⇒Zh |
| Big | Fixed α and β | 60.91/24.6 | 29.69/55.4 |
| Dynamic α and β | 61.27/24.3 | 30.52/54.6 |
+
+Table 1: The BLEU/TER score $(\%)$ results on the validation sets.
+
+attention. All our Transformer models contain $L = 6$ encoder layers and $L = 6$ decoder layers and all models are trained using THUMT (Tan et al., 2020) framework. The training step for the first pre-training stage is set to $T_{1} = 200,000$ while that of the second fine-tuning stage is set to $T_{2} = 5,000$ . The batch size for each GPU is set to 4096 tokens. All experiments in the first stage are conducted utilizing 8 NVIDIA Tesla V100 GPUs, while we use 4 GPUs for the second stage, i.e., fine-tuning. That gives us about 8*4096 and 4*4096 tokens per update for all experiments in the first-stage and second-stage, respectively. All models are optimized using Adam (Kingma and Ba, 2014) with $\beta_{1} = 0.9$ and $\beta_{2} = 0.998$ , and learning rate is set to 1.0 for all experiments. Label smoothing is set to 0.1. We use dropout of 0.1/0.3 for Base and Big setting, respectively. $|T|$ is set to 10. Following (Liang et al., 2021a), we set the number of preceding sentences to 3 in all experiments. The criterion for selecting hyper-parameters is the BLEU score on validation sets for both tasks. During inference, the beam size is set to 4, and the length penalty is 0.6 among all experiments.
+
+# 4.3 Effect of $\alpha$ and $\beta$
+
+We also investigate the effect of balancing factor $\alpha$ and $\beta$ , where $\alpha$ and $\beta$ gradually decrease from 1 to 0 over 5,000 steps, which is similar to (Zhao et al., 2020). "Fixed $\alpha$ and $\beta$ means we keep $\alpha = \beta = 1$ across the training. "Dynamic $\alpha$ and $\beta$ denotes decaying $\alpha$ and $\beta$ with the training step of auxiliary tasks. The results of Tab. 1 show that "Dynamic $\alpha$ and $\beta$ gives better performance than "Fixed $\alpha$ and $\beta$ . Therefore, we apply this dynamic strategy in the following experiments.
+
+# 4.4 Comparison Models
+
+# Baseline Sentence-Level NMT Models.
+
+- Transformer (Vaswani et al., 2017): The defacto NMT model trained on sentence-level NMT corpus.
+- Transformer+FT (Vaswani et al., 2017): The NMT model that is directly fine-tuned on the
+
+ | Models | En⇒De | De⇒En | En⇒Zh | Zh⇒En |
| BLEU↑ | TER↓ | BLEU↑ | TER↓ | BLEU↑ | TER↓ | BLEU↑ | TER↓ |
| Sentence-Level | Transformer | 40.02 | 42.5 | 48.38 | 33.4 | 21.40 | 72.4 | 18.52 | 59.1 |
| NMT models (Base) | Transformer+FT | 58.43 | 26.7 | 59.57 | 26.2 | 25.22 | 62.8 | 21.59 | 56.7 |
| Context-Aware | Dia-Transformer+FT | 58.33 | 26.8 | 59.09 | 26.2 | 24.96 | 63.7 | 20.49 | 60.1 |
| Doc-Transformer+FT | 58.15 | 27.1 | 59.46 | 25.7 | 24.76 | 63.4 | 20.61 | 59.8 |
| NMT models (Base) | Gate-Transformer+FT | 58.48 | 26.6 | 59.53 | 26.1 | 25.34 | 62.5 | 21.03 | 56.9 |
| CSA-NCT (Ours) | 59.50†† | 25.7†† | 60.65†† | 25.4† | 27.77†† | 60.0†† | 22.36† | 55.9† |
| Sentence-Level | Transformer | 40.53 | 42.2 | 49.90 | 33.3 | 22.81 | 69.6 | 19.58 | 57.7 |
| NMT models (Big) | Transformer+FT | 59.01 | 26.0 | 59.98 | 25.9 | 26.95 | 60.7 | 22.15 | 56.1 |
| Context-Aware | Dia-Transformer+FT | 58.68 | 26.8 | 59.63 | 26.0 | 26.72 | 62.4 | 21.09 | 58.1 |
| Doc-Transformer+FT | 58.61 | 26.5 | 59.98 | 25.4 | 26.45 | 62.6 | 21.38 | 57.7 |
| NMT models (Big) | Gate-Transformer+FT | 58.94 | 26.2 | 60.08 | 25.5 | 27.13 | 60.3 | 22.26 | 55.8 |
| CSA-NCT (Ours) | 60.64†† | 25.3† | 61.21†† | 24.9† | 28.86†† | 58.7†† | 23.69†† | 54.7†† |
+
+Table 2: Results on the test sets of BConTrasT (En\LzDe) and BMELD (En\LZh) in terms of BLEU (\%) and TER (\%). The best and the second results are bold and underlined, respectively. “†” and “††” indicate that statistically significant better than the best result of all contrast NMT models with t-test $p < 0.05$ and $p < 0.01$ , respectively. All “+FT” models apply the same two-stage training strategy with our CSA-NCT model for fair comparison.
+
+chat translation data after being pre-trained on sentence-level NMT corpus.
+
+# Existing Context-Aware NMT Systems.
+
+- Dia-Transformer+FT (Maruf et al., 2018): The original model is RNN-based and an additional encoder is used to incorporate the mixed-language dialogue history. We re-implement it based on Transformer where an additional encoder layer is used to introduce the dialogue history into NMT model.
+- Doc-Transformer+FT (Ma et al., 2020): A state-of-the-art document-level NMT model based on Transformer sharing the first encoder layer to incorporate the dialogue history.
+- Gate-Transformer+FT (Zhang et al., 2018): A document-aware Transformer that uses a gate to incorporate the context information. Note that we share the Transformer encoder to obtain the context representation instead of utilizing the additional context encoder, which performs better in our experiments.
+
+# 4.5 Main Results
+
+In Tab. 2, We report the main results on $\mathrm{En} \Leftrightarrow \mathrm{De}$ and $\mathrm{En} \Leftrightarrow \mathrm{Zh}$ under Base and Big settings. For comparison, as in § 4.4, "Transformer" and "Transformer+FT" are sentence-level baselines while "Dia-Transformer+FT", "Doc-Transformer+FT" and "Gate-Transformer+FT" are the existing context-aware NMT systems re
+
+implemented by us. Particularly, "CSA-NCT" represents our proposed approach.
+
+Results on $\mathbf{En} \Leftrightarrow \mathbf{De}$ . Under the Base setting, our model substantially outperforms the sentence-level/context-aware baselines by a large margin (e.g., the previous best "Gate-Transformer+FT"), $1.02 \uparrow$ on $\mathrm{En} \Rightarrow \mathrm{De}$ and $1.12 \uparrow$ on $\mathrm{De} \Rightarrow \mathrm{En}$ . In term of TER, CSA-NCT also performs better on the two directions, $0.9 \downarrow$ and $0.7 \downarrow$ lower than "Gate-Transformer+FT" (the lower the better), respectively. Under the Big setting, on $\mathrm{En} \Rightarrow \mathrm{De}$ and $\mathrm{De} \Rightarrow \mathrm{En}$ , our model consistently surpasses the baselines and other existing systems again.
+
+Results on $\mathbf{En} \Leftrightarrow \mathbf{Zh}$ . We also conduct experiments on the BMELD dataset. Concretely, on $\mathrm{En} \Rightarrow \mathrm{Zh}$ and $\mathrm{Zh} \Rightarrow \mathrm{En}$ , our model also presents notable improvements over all comparison models by at least $2.43 \uparrow$ and $0.77 \uparrow$ BLEU gains under the Base setting, and by $1.73 \uparrow$ and $1.43 \uparrow$ BLEU gains under the Big setting, respectively. These results demonstrate the effectiveness and generalizability of our model across different language pairs.
+
+# 5 Analysis
+
+# 5.1 Ablation Study
+
+Effect of Each Auxiliary Task Group. We conduct ablation studies to investigate the effects of the two groups (DCM and SPM) of auxiliary tasks. The results under the Big setting are listed in Tab. 3.
+
+| # | Models | En⇒De | De⇒En |
| BLEU↑ | TER↓ | BLEU↑ | TER↓ |
| 0 | Baseline | 60.40 | 25.0 | 61.68 | 24.9 |
| 1 | w/ DCM | 61.05†† | (+0.65) | 62.63†† | (+0.95) |
| 2 | w/ SPM | 60.57 | (+0.17) | 61.97 | (+0.29) |
+
+Table 3: Ablation results on the validation sets of each auxiliary task group under the Big setting. "Baseline" represents the NCT model without any auxiliary task. "DCM": dialogue coherence modeling, including MRG, CRG, NUD. "SPM": speaker personality modeling, i.e., SI. "†" and "††" indicate the improvement over the result of the baseline model is statistically significant with $p < 0.05$ and $p < 0.01$ , respectively.
+
+| # | Models | En⇒De | De⇒En |
| BLEU↑ | TER↓ | BLEU↑ | TER↓ |
| 0 | Baseline | 60.40 | 25.0 | 61.68 | 24.9 |
| 1 | w/ MRG | 61.00†† | (+0.60) | 24.4†† | 62.37†† |
| 2 | w/ CRG | 60.68 | (+0.28) | 24.6† | 62.14† |
| 3 | w/ NUD | 60.82† | (+0.42) | 24.7 | 62.32†† |
| 4 | w/ SI | 60.57 | (+0.17) | 24.8 | 61.97 |
+
+We have the following findings: (1) DCM substantially improves the NCT model in terms of both BLEU and TER metrics, which demonstrates modeling coherence is beneficial for better translations. (2) SPM makes slight contributions to the NCT model in terms of BLEU, which is less significant than DCM. However, further human evaluation in § 5.3 will show that our model can keep the personality consistent with the original speaker.
+
+Effect of Each Auxiliary Task. We also investigate the effect of each auxiliary task by adding a single task at a time. In Tab. 4, rows $1\sim 4$ denote singly adding on the corresponding auxiliary task with the main chat translation task, each of which shows a positive impact on the model performance (rows $1\sim 4$ vs. row 0).
+
+# 5.2 Dialogue Coherence
+
+Following (Lapata and Barzilay, 2005; Xiong et al., 2019), we measure dialogue coherence as sentence similarity, which is determined by the cosine similarity between two sentences $s_1$ and $s_2$ :
+
+$$
+\operatorname {s i m} \left(s _ {1}, s _ {2}\right) = \cos \left(f \left(s _ {1}\right), f \left(s _ {2}\right)\right),
+$$
+
+Table 4: Ablation results on the validation sets of each auxiliary task under the Big setting. “†” and “††” indicate the improvement over the result of the baseline model is statistically significant with $p < 0.05$ and $p < 0.01$ , respectively.
+
+| Models | 1-th Pr. | 2-th Pr. | 3-th Pr. |
| Transformer | 65.02 | 60.37 | 56.59 |
| Transformer+FT | 65.87 | 61.04 | 57.14 |
| Dia-Transformer+FT | 65.53 | 60.84 | 57.09 |
| Doc-Transformer+FT | 65.69 | 60.93 | 57.13 |
| Gate-Transformer+FT | 65.96 | 61.35 | 57.45 |
| CSA-NCT (Ours) | 66.57†† | 61.78†† | 57.83†† |
| Human Reference | 66.63 | 61.90 | 57.95 |
+
+Table 5: Results (\%) of dialogue coherence in terms of sentence similarity on the test set of BConTrasT in $\mathrm{De}\Rightarrow \mathrm{En}$ direction under the Base setting. The "#-th $\mathbf{Pr}.$ " denotes the #-th preceding utterance to the current one. " $\dagger\dagger$ ") indicates the improvement over the best result of all other comparison models is statistically significant $(p < 0.01)$ .
+
+| Models | Coh. | Spe. | Flu. |
| Transformer | 0.540 | 0.485 | 0.590 |
| Transformer+FT | 0.590 | 0.530 | 0.635 |
| Dia-Transformer+FT | 0.580 | 0.525 | 0.625 |
| Doc-Transformer+FT | 0.595 | 0.525 | 0.630 |
| Gate-Transformer+FT | 0.605 | 0.540 | 0.635 |
| CSA-NCT (Ours) | 0.635 | 0.575 | 0.655 |
+
+Table 6: Results of Human evaluation (Zh $\Rightarrow$ En, Base). "Coh." : Coherence. "Spe." : Speaker. "Flu." : Fluency.
+
+where $f(s_{i}) = \frac{1}{|s_{i}|}\sum_{\mathbf{w}\in s_{i}}(\mathbf{w})$ and $\mathbf{w}$ is the vector for word $w$ . We use Word2Vec10 (Mikolov et al., 2013) trained on a dialogue dataset11 to obtain the distributed word vectors whose dimension is set to 100.
+
+Tab. 5 shows the measured coherence of different models on the test set of BConTrasT in $\mathrm{De} \Rightarrow \mathrm{End}$ direction. It shows that our CSA-NCT produces more coherent translations compared to baselines and other existing systems (significance test, $p < 0.01$ ).
+
+# 5.3 Human Evaluation
+
+Inspired by (Bao et al., 2020; Farajian et al., 2020), we use three criteria for human evaluation: (1) Coherence measures whether the translation is semantically coherent with the dialogue history; (2) Speaker measures whether the translation preserves the personality of the speaker; (3) Fluency measures whether the translation is fluent and gram
+
+matically correct.
+
+First, we randomly sample 200 conversations from the test set of BMELD in $\mathrm{Zh} \Rightarrow \mathrm{En}$ direction. Then, we use the 6 models in Tab. 6 to generate the translated utterances of these sampled conversations. Finally, we assign the translated utterances and their corresponding dialogue history utterances in target language to three postgraduate human annotators, and ask them to make evaluations from the above three criteria.
+
+The results in Tab. 6 show that our model generates more coherent, speaker-relevant, and fluent translations compared with other models (significance test, $p < 0.05$ ), indicating the superiority of our model. The inter-annotator agreements calculated by the Fleiss' kappa (Fleiss and Cohen, 1973) are 0.506, 0.548, and 0.497 for coherence, speaker and fluency, respectively, indicating "Moderate Agreement" for all four criteria. We also present one case study in Appendix B.
+
+# 6 Related Work
+
+Chat NMT. Little prior work is available due to the lack of human-annotated publicly available data (Farajian et al., 2020). Therefore, some existing studies (Wang et al., 2016; Maruf et al., 2018; Zhang and Zhou, 2019; Rikters et al., 2020) mainly pay attention to designing methods to automatically construct the subtitle corpus, which may contain noisy bilingual utterances. Recently, Farajian et al. (2020) organize the WMT20 chat translation task and first provide a chat corpus post-edited by humans. More recently, based on document-level parallel corpus, Wang et al. (2021) propose to jointly identify omissions and typos within dialogue along with translating utterances by using the context. As a concurrent work, Liang et al. (2021a) provide a clean bilingual dialogue dataset and design a variational framework for NCT. Different from them, we focus on introducing the modeling of dialogue coherence and speaker personality into the NCT model with multi-task learning to promote the translation quality.
+
+Context-Aware NMT. In a sense, chat MT can be viewed as a special case of context-aware MT that has many related studies (Gong et al., 2011; Jean et al., 2017; Wang et al., 2017b; Zheng et al., 2020; Yang et al., 2019; Kang et al., 2020; Li et al., 2020; Chen et al., 2020; Ma et al., 2020). Typically, they resort to extending conventional NMT models for exploiting the context. Although these
+
+models can be directly applied to the chat translation scenario, they cannot explicitly capture the inherent dialogue characteristics and usually lead to incoherent and speaker-irrelevant translations.
+
+# 7 Conclusion
+
+In this paper, we propose to enhance the NCT model by introducing the modeling of the inherent dialogue characteristics, i.e., dialogue coherence and speaker personality. We train the NCT model with the four well-designed auxiliary tasks, i.e., MRG, CRG, NUD and SI. Experiments on $\mathrm{En} \Leftrightarrow \mathrm{De}$ and $\mathrm{En} \Leftrightarrow \mathrm{Zh}$ show that our model notably improves translation quality on both BLEU and TER metrics, showing its superiority and generalizability. Human evaluation further verifies that our model yields more coherent and speaker-relevant translations.
+
+# Acknowledgements
+
+The research work described in this paper has been supported by the National Key R&D Program of China (2020AAA0108001) and the National Nature Science Foundation of China (No. 61976015, 61976016, 61876198 and 61370130). The authors would like to thank the anonymous reviewers for their valuable comments and suggestions to improve this paper.
+
+# References
+
+JinYeong Bak and Alice Oh. 2019. Variational hierarchical user-based conversation model. In Proceedings of EMNLP-IJCNLP, pages 1941-1950.
+Calvin Bao, Yow-Ting Shiue, Chujun Song, Jie Li, and Marine Carpuat. 2020. The university of maryland's submissions to the wmt20 chat translation task: Searching for more data to adapt discourse-aware neural machine translation. In Proceedings of WMT, pages 454-459.
+Rachel Bawden, Rico Sennrich, Alexandra Birch, and Barry Haddow. 2018. Evaluating discourse phenomena in neural machine translation. In Proceedings of NAACL, pages 1304-1313.
+Bill Byrne, Karthik Krishnamoorthi, Chinnadhurai Sankar, Arvind Neelakantan, Ben Goodrich, Daniel Duckworth, Semih Yavuz, Amit Dubey, Kyu-Young Kim, and Andy Cedilnik. 2019. Taskmaster-1: Toward a realistic and diverse dialog dataset. In Proceedings of EMNLP-IJCNLP, pages 4516-4525.
+Junxuan Chen, Xiang Li, Jiarui Zhang, Chulun Zhou, Jianwei Cui, Bin Wang, and Jinsong Su. 2020. Mod
+
+eling discourse structure for document-level neural machine translation. CoRR.
+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.
+M. Amin Farajian, Antonio V. Lopes, Andre F. T. Martins, Sameen Maruf, and Gholamreza Haffari. 2020. Findings of the WMT 2020 shared task on chat translation. In Proceedings of WMT, pages 65-75.
+Joseph L. Fleiss and Jacob Cohen. 1973. The equivalence of weighted kappa and the intraclass correlation coefficient as measures of reliability. Educational and Psychological Measurement, pages 613-619.
+Zhengxian Gong, Min Zhang, and Guodong Zhou. 2011. Cache-based document-level statistical machine translation. In Proceedings of EMNLP, pages 909-919.
+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. arXiv preprint arXiv:1803.05567.
+Lishan Huang, Zheng Ye, Jinghui Qin, Liang Lin, and Xiaodan Liang. 2020. GRADE: Automatic graph-enhanced coherence metric for evaluating open-domain dialogue systems. In Proceedings of EMNLP, pages 9230-9240, Online.
+Sebastien Jean, Stanislas Lauly, Orhan First, and Kyunghyun Cho. 2017. Does neural machine translation benefit from larger context? arXiv preprint arXiv:1704.05135.
+Xiaomian Kang, Yang Zhao, Jiajun Zhang, and Chengqing Zong. 2020. Dynamic context selection for document-level neural machine translation via reinforcement learning. In Proceedings of EMNLP, pages 2242-2254.
+Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
+Philipp Koehn. 2004. Statistical significance tests for machine translation evaluation. In Proceedings of EMNLP, pages 388-395.
+Shaohui Kuang, Deyi Xiong, Weihua Luo, and Guodong Zhou. 2018. Modeling coherence for neural machine translation with dynamic and topic caches. In Proceedings of COLING, pages 596-606.
+
+Mirella Lapata and Regina Barzilay. 2005. Automatic evaluation of text coherence: Models and representations. In Proceedings of IJCAI, pages 1085-1090.
+Samuel Läubli, Rico Sennrich, and Martin Volk. 2018. Has machine translation achieved human parity? a case for document-level evaluation. In Proceedings of EMNLP, pages 4791-4796.
+Bei Li, Hui Liu, Ziyang Wang, Yufan Jiang, Tong Xiao, Jingbo Zhu, Tongran Liu, and Changliang Li. 2020. Does multi-encoder help? a case study on context-aware neural machine translation. In Proceedings of ACL, pages 3512-3518.
+Yunlong Liang, Fandong Meng, Yufeng Chen, Jinan Xu, and Jie Zhou. 2021a. Modeling bilingual conversational characteristics for neural chat translation. In Proceedings of ACL, pages 5711-5724, Online. Association for Computational Linguistics.
+Yunlong Liang, Fandong Meng, Ying Zhang, Yufeng Chen, Jinan Xu, and Jie Zhou. 2021b. Infusing multi-source knowledge with heterogeneous graph neural network for emotional conversation generation. Proceedings of AAAI, pages 13343-13352.
+Huan Lin, Liang Yao, Baosong Yang, Dayiheng Liu, Haibo Zhang, Weihua Luo, Degen Huang, and Jinsong Su. 2021. Towards user-driven neural machine translation. In Proceedings of ACL/IJCNLP, pages 4008-4018. Association for Computational Linguistics.
+Shuming Ma, Dongdong Zhang, and Ming Zhou. 2020. A simple and effective unified encoder for document-level machine translation. In Proceedings of ACL, pages 3505-3511.
+Sameen Maruf and Gholamreza Haffari. 2018. Document context neural machine translation with memory networks. In Proceedings of ACL, pages 1275-1284.
+Sameen Maruf, André F. T. Martins, and Gholamreza Haffari. 2018. Contextual neural model for translating bilingual multi-speaker conversations. In Proceedings of WMT, pages 101-112.
+Sameen Maruf, André F. T. Martins, and Gholamreza Haffari. 2019. Selective attention for context-aware neural machine translation. In Proceedings of NAACL, pages 3092-3102.
+Fandong Meng and Jinchao Zhang. 2019. DTMT: A novel deep transition architecture for neural machine translation. In Proceedings of AAAI, pages 224-231.
+Lesly Miculicich, Dhananjay Ram, Nikolaos Pappas, and James Henderson. 2018. Document-level neural machine translation with hierarchical attention networks. In Proceedings of EMNLP, pages 2947-2954.
+Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Efficient estimation of word representations in vector space. In Proceedings of ICLR.
+
+Shachar Mirkin, Scott Nowson, Caroline Brun, and Julien Perez. 2015. Motivating personality-aware machine translation. In Proceedings of EMNLP, pages 1102-1108.
+Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of ACL, pages 311-318.
+Soujanya Poria, Devamanyu Hazarika, Navonil Majumder, Gautam Naik, Erik Cambria, and Rada Mihalcea. 2019. MELD: A multimodal multi-party dataset for emotion recognition in conversations. In Proceedings of ACL, pages 527-536.
+Matt Post. 2018. A call for clarity in reporting BLEU scores. In Proceedings of WMT, pages 186-191.
+Matiss Rikters, Ryokan Ri, Tong Li, and Toshiaki Nakazawa. 2020. Document-aligned Japanese-English conversation parallel corpus. In Proceedings of MT, pages 639-645, Online.
+Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of ACL, pages 1715-1725.
+Matthew Snover, Bonnie Dorr, Richard Schwartz, Linnea Micciulla, and John Makhoul. 2006. A study of translation edit rate with targeted human annotation. In Proceedings of AMTA.
+Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In Proceedings of NIPS, pages 3104-3112.
+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 AMTA, pages 116-122.
+Jörg Tiedemann and Yves Scherrer. 2017. Neural machine translation with extended context. In Proceedings of the DiscoMT, pages 82-92.
+Antonio Toral, Sheila Castilho, Ke Hu, and Andy Way. 2018. Attaining the unattainable? reassessing claims of human parity in neural machine translation. In Proceedings of WMT, pages 113-123.
+Zhaopeng Tu, Yang Liu, Shuming Shi, and Tong Zhang. 2018. Learning to remember translation history with a continuous cache. TACL, pages 407-420.
+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 Proceedings of NIPS, pages 5998-6008.
+Elena Voita, Rico Sennrich, and Ivan Titov. 2019a. Context-aware monolingual repair for neural machine translation. In Proceedings of EMNLP-IJCNLP, pages 877-886.
+
+Elena Voita, Rico Senrich, and Ivan Titov. 2019b. When a good translation is wrong in context: Context-aware machine translation improves on deixis, ellipsis, and lexical cohesion. In Proceedings of ACL, pages 1198-1212.
+Elena Voita, Pavel Serdyukov, Rico Sennrich, and Ivan Titov. 2018. Context-aware neural machine translation learns anaphora resolution. In Proceedings of ACL, pages 1264-1274.
+Longyue Wang, Jinhua Du, Liangyou Li, Zhaopeng Tu, Andy Way, and Qun Liu. 2017a. Semantics-enhanced task-oriented dialogue translation: A case study on hotel booking. In Proceedings of IJCNLP, pages 33-36.
+Longyue Wang, Zhaopeng Tu, Xing Wang, Li Ding, Liang Ding, and Shuming Shi. 2020. Tencent ai lab machine translation systems for wmt20 chat translation task. In Proceedings of WMT, pages 481-489.
+Longyue Wang, Zhaopeng Tu, Xing Wang, and Shuming Shi. 2019a. One model to learn both: Zero pronoun prediction and translation. In Proceedings of EMNLP-IJCNLP, pages 921-930.
+Longyue Wang, Zhaopeng Tu, Andy Way, and Qun Liu. 2017b. Exploiting cross-sentence context for neural machine translation. In Proceedings of EMNLP, pages 2826-2831.
+Longyue Wang, Xiaojun Zhang, Zhaopeng Tu, Andy Way, and Qun Liu. 2016. Automatic construction of discourse corpora for dialogue translation. In Proceedings of LREC, pages 2748-2754.
+Tao Wang, Chengqi Zhao, Mingxuan Wang, Lei Li, and Deyi Xiong. 2021. Autocorrect in the process of translation - multi-task learning improves dialogue machine translation.
+Tianming Wang and Xiaojun Wan. 2019. T-cvae: Transformer-based conditioned variational autoencoder for story completion. In Proceedings of IJCAI, pages 5233-5239.
+Weichao Wang, Shi Feng, Daling Wang, and Yifei Zhang. 2019b. Answer-guided and semantic coherent question generation in open-domain conversation. In Proceedings of EMNLP-IJCNLP, pages 5066-5076, Hong Kong, China.
+Bowen Wu, MengYuan Li, Zongsheng Wang, Yifu Chen, Derek F. Wong, Qihang Feng, Junhong Huang, and Baoxun Wang. 2020. Guiding variational response generator to exploit persona. In Proceedings of ACL, pages 53-65.
+Hao Xiong, Zhongjun He, Hua Wu, and Haifeng Wang. 2019. Modeling coherence for discourse neural machine translation. Proceedings of AAAI, pages 7338-7345.
+
+Jianhao Yan, Fandong Meng, and Jie Zhou. 2020. Multi-unit transformers for neural machine translation. In Proceedings of EMNLP, pages 1047-1059, Online.
+Pengcheng Yang, Lei Li, Fuli Luo, Tianyu Liu, and Xu Sun. 2019. Enhancing topic-to-essay generation with external commonsense knowledge. In Proceedings of ACL, pages 2002–2012.
+Jiacheng Zhang, Huanbo Luan, Maosong Sun, Feifei Zhai, Jingfang Xu, Min Zhang, and Yang Liu. 2018. Improving the transformer translation model with document-level context. In Proceedings of EMNLP, pages 533-542.
+L. Zhang and Q. Zhou. 2019. Automatically annotate tv series subtitles for dialogue corpus construction. In APSIPA ASC, pages 1029-1035.
+Wen Zhang, Yang Feng, Fandong Meng, Di You, and Qun Liu. 2019. Bridging the gap between training and inference for neural machine translation. In Proceedings of ACL, pages 4334-4343, Florence, Italy.
+Yufan Zhao, Can Xu, and Wei Wu. 2020. Learning a simple and effective model for multi-turn response generation with auxiliary tasks. In Proceedings of EMNLP, pages 3472-3483, Online. Association for Computational Linguistics.
+Zaixiang Zheng, Xiang Yue, Shujian Huang, Jiajun Chen, and Alexandra Birch. 2020. Towards making the most of context in neural machine translation. In Proceedings of IJCAI.
+
+# A Datasets
+
+As mentioned in § 4.1, our experiments involve the dataset WMT20 for pre-training and two chat translation corpus, BConTrasT (Farajian et al., 2020) and BMELD (Liang et al., 2021a). The statistics about the splits of training, validation, and test sets are shown in Tab. 7.
+
+WMT20. Following (Liang et al., 2021a), for $\mathrm{En} \Leftrightarrow \mathrm{De}$ , we combine six corpora including Euporal, ParaCrawl, CommonCrawl, TildeRapid, NewsCommentary, and WikiMatrix. For $\mathrm{En} \Leftrightarrow \mathrm{Zh}$ , we combine News Commentary v15, Wiki Titles v2, UN Parallel Corpus V1.0, CCMT Corpus, and WikiMatrix. First, we filter out duplicate sentence pairs and remove those whose length exceeds 80. To pre-process the raw data, we employ a series of open-source/in-house scripts, including full-/half-width conversion, unicode conversation, punctuation normalization, and tokenization (Wang et al., 2020). After filtering, we apply BPE (Sennrich et al., 2016) with 32K merge operations to obtain subwords. Finally, we obtain 45,541,367 sentence
+
+| Datasets | # Dialogues | # Utterances |
| Train | Valid | Test | Train | Valid | Test |
| En⇒De | 550 | 78 | 78 | 7,629 | 1,040 | 1,133 |
| De⇒En | 550 | 78 | 78 | 6,216 | 862 | 967 |
| En⇒Zh | 1,036 | 108 | 274 | 5,560 | 567 | 1,466 |
| Zh⇒En | 1,036 | 108 | 274 | 4,427 | 517 | 1,135 |
+
+Table 7: Statistics of chat translation data.
+
+| Models | En⇒De | De⇒En | En⇒Zh | Zh⇒En |
| Transformer (Base) | 39.88 | 40.72 | 32.55 | 24.42 |
| Transformer (Big) | 41.35 | 41.56 | 33.85 | 24.86 |
+
+Table 8: The BLEU scores on the newstest2019 of the first stage.
+
+pairs for $\mathrm{En}\Leftrightarrow \mathrm{De}$ and 22,244,006 sentence pairs for $\mathrm{En}\Leftrightarrow \mathrm{Zh}$ , respectively.
+
+We test the model performance of the first stage on newstest2019. The results are shown in Tab. 8.
+
+BConTrasT. The dataset12 is first provided by WMT 2020 Chat Translation Task (Farajian et al., 2020), which is translated from English into German and is based on the monolingual Taskmaster-1 corpus (Byrne et al., 2019). The conversations (originally in English) were first automatically translated into German and then manually post-edited by Unbabel editors13 who are native German speakers. Having the conversations in both languages allows us to simulate bilingual conversations in which one speaker (customer), speaks in German and the other speaker (agent), responds in English.
+
+BMELD. The dataset is a recently released English $\Leftrightarrow$ Chinese bilingual dialogue dataset, provided by Liang et al. (2021a). Based on the dialogue dataset in the MELD (originally in English) (Poria et al., 2019) $^{14}$ , they firstly crawled the corresponding Chinese translations from https://www.zimutiantang.com/ and then manually post-edited them according to the dialogue history by native Chinese speakers who are post-graduate students majoring in English. Finally, following (Farajian et al., 2020), they assume $50\%$ speakers as Chinese speakers to keep data balance for $\mathrm{Zh} \Rightarrow \mathrm{En}$ translations and build the bilingual MELD (BMELD). For the Chinese, we follow them to segment the sentence using Stanford
+
+12https://github.com/Unbabel/BConTrasT
+13www.unbabel.com
+14The MELD is a multimodal emotionLines dialogue dataset, each utterance of which corresponds to a video, voice, and text, and is annotated with detailed emotion and sentiment.
+
+
+Figure 4: An illustrative case of bilingual conversation.
+
+CoreNLP toolkit15.
+
+# B Case Study
+
+In this section, we deliver an illustrative case in Fig. 4 to show different outputs among the comparison models and ours.
+
+Dialogue Coherence and Speaker Personality. For the case in Fig. 4, we find that all comparison models cannot generate coherent translated utterences. The reason may be that they fail to capture contextual clues, i.e., "boat". By contrast, we explicitly introduce the modeling of preceding context through auxiliary tasks and thus obtain satisfactory results. Meanwhile, we observe that the sentence-level models and the context-aware models cannot preserve the speaker personality information, e.g., joy emotion, even though context-aware models incorporate the bilingual conversational history into the encoder.
+
+The case shows that our CSA-NCT model enhanced by the four auxiliary tasks yields coherent and speaker-relevant translations, demonstrating its effectiveness and superiority.
\ No newline at end of file
diff --git a/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/images.zip b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..f7e55bd3e4a57338184800b091b15a74450845ac
--- /dev/null
+++ b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bc4541128c5fbf2266c2df094aee3245d461677d474e0e160d26e6ad89980a43
+size 656670
diff --git a/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/layout.json b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..6443946b276497de5550d66251082c1b10e72558
--- /dev/null
+++ b/towardsmakingthemostofdialoguecharacteristicsforneuralchattranslation/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0c0770b37c16c5391de72deba0580432a798d592f056c4033daeddce4db1f239
+size 646046
diff --git a/towardsrealisticfewshotrelationextraction/65a3c693-925a-48e4-ab6b-1f49af6811e4_content_list.json b/towardsrealisticfewshotrelationextraction/65a3c693-925a-48e4-ab6b-1f49af6811e4_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..7d8ab14eb3885a2fdab6ed073cd4f4decb61a7ca
--- /dev/null
+++ b/towardsrealisticfewshotrelationextraction/65a3c693-925a-48e4-ab6b-1f49af6811e4_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f0d85e656a5cf80349f53b2a11660e10655b61556f209e25a885a7c058c0694f
+size 46563
diff --git a/towardsrealisticfewshotrelationextraction/65a3c693-925a-48e4-ab6b-1f49af6811e4_model.json b/towardsrealisticfewshotrelationextraction/65a3c693-925a-48e4-ab6b-1f49af6811e4_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..81d47e39ee0459f863b96471e4c41f5ec80bb451
--- /dev/null
+++ b/towardsrealisticfewshotrelationextraction/65a3c693-925a-48e4-ab6b-1f49af6811e4_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3b31dfd93b687f133333dab5802e7be91d842ad1b7e90376c0ec073ec106a59d
+size 57610
diff --git a/towardsrealisticfewshotrelationextraction/65a3c693-925a-48e4-ab6b-1f49af6811e4_origin.pdf b/towardsrealisticfewshotrelationextraction/65a3c693-925a-48e4-ab6b-1f49af6811e4_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..24945e5a16830b088ec477928ad55f23766150e4
--- /dev/null
+++ b/towardsrealisticfewshotrelationextraction/65a3c693-925a-48e4-ab6b-1f49af6811e4_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6af089c8abfc117b7e10f78fb957b5013353bb2743043482cf5d1c9087f8c44c
+size 241979
diff --git a/towardsrealisticfewshotrelationextraction/full.md b/towardsrealisticfewshotrelationextraction/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..7f3a11bce43a0e35b55aeb78334a531240bdeef9
--- /dev/null
+++ b/towardsrealisticfewshotrelationextraction/full.md
@@ -0,0 +1,198 @@
+# Towards Realistic Few-Shot Relation Extraction
+
+Sam Brody, Sichao Wu, Adrian Benton
+
+Bloomberg
+
+731 Lexington Ave
+
+New York, NY 10022 USA
+
+{sbrody18,swu389,abenton10}@bloomberg.net
+
+# Abstract
+
+In recent years, few-shot models have been applied successfully to a variety of NLP tasks. Han et al. (2018) introduced a few-shot learning framework for relation classification, and since then, several models have surpassed human performance on this task, leading to the impression that few-shot relation classification is solved. In this paper we take a deeper look at the efficacy of strong few-shot classification models in the more common relation extraction setting, and show that typical few-shot evaluation metrics obscure a wide variability in performance across relations. In particular, we find that state of the art few-shot relation classification models overly rely on entity type information, and propose modifications to the training routine to encourage models to better discriminate between relations involving similar entity types.
+
+# 1 Introduction
+
+Few-shot approaches have been explored in a variety of natural language processing (NLP) tasks, such as machine translation (Gu et al., 2018) and textual entailment (Yin et al., 2020), as well as an assortment of classification and natural language inference tasks (Yan et al., 2018; Brown et al., 2020b). The introduction of large, pretrained transformer language models in NLP increased the promise of building systems that can perform complex NLP tasks from only a small number of training examples (Brown et al., 2020a). Han et al. (2018) introduced a few-shot learning framework for relation classification (FewRel), and recently several systems have achieved near-human performance on this task – in some settings even exceeding it.1 These stunning results might give the impression that FewRel has been solved, and that these systems can be used to extract any relation of interest from a collection of text (e.g., to populate a
+
+knowledge-base from web documents) with only a few example instances.
+
+In this paper, we take a deeper look at the applicability of high performing few-shot relation classification models in a more realistic relation extraction (RE) setting. We find that although transformer-based models achieve high accuracy at the FewRel task, this obscures a wide variability in performance across relation types. In particular, we find that state-of-the-art FewRel models heavily rely on entity type information, and thus are unable to discriminate between many types of relations that are trivial for humans (e.g., spouse-of vs. child-of). However, we find that enriching the training data with relations with similar entity types forces the model to attend less to entity type information, and in a ranking evaluation, improves performance on unseen relations by up to $24\%$ precision at 50, absolute.
+
+# 2 Few-shot Relation Extraction
+
+# 2.1 FewRel 1.0
+
+The FewRel challenge (Han et al., 2018) introduced the few-shot paradigm to relation classification. The authors provided a dataset and evaluation framework for measuring performance on the task. They also adapted several few-shot text classification systems to relation classification. The dataset was comprised of 700 example instances from Wikipedia for each of 100 relations. Of these, 64 were designated for training, 16 for validation, and 20 were withheld for testing. The evaluation was structured as follows: for each instance, $N$ relations were chosen from the pool and, for each relation, $K$ support examples were sampled. These examples were the only information provided to the model regarding these relations. In addition, $Q$ query examples were selected from each of the $N$ relations, and the task of the model was to decide the correct label for each query from among $N$ possible answers ( $N$ -class classification). This pro
+
+cess was repeated a fixed number of times (1,000 by default) and the results were averaged.
+
+# 2.2 State of the Art (SOTA)
+
+Although multiple representation and modeling strategies were proposed by the authors and challenge participants, the authors' most successful CNN-based system, as well as the current top performing system (Baldini Soares et al., 2019) employed a simple prototype approach. In this approach, each example was encoded as a vector, and the prototype representation for each relation was derived as the average across all exemplar vectors. The representation of a query example was then compared to the prototypical representations of the candidate relations, and the most similar one (by inner product) was chosen as the label.
+
+# 2.3 FewRel 2.0
+
+Two main concerns were raised about the FewRel 1.0 setup: the cross-domain applicability of the models, and their performance in the none-of-the-above (NOTA) scenario, where a portion of the query instances may belong to none of the candidate relations. FewRel 2.0 (Gao et al., 2019) was designed to address both of these concerns. Our work addresses orthogonal issues, and we limit ourselves to the FewRel 1.0 dataset.
+
+# 3 Performance on Relation Extraction
+
+# 3.1 Experimental Setup
+
+Our first set of experiments was exploratory. We set out to reproduce the results of several high-scoring models on the FewRel 1.0 dataset, and to examine how they performed in a setting that more closely reflected a few-shot RE use case, where the model is expected to extract instances of a small number of relations from a large corpus, with high precision and recall. We refer to this scenario as "Realistic RE" because it is common in applied RE tasks such as knowledge-base population (KBP) and information extraction. Since prototypical models offered simplicity and best-in-class performance, we focused on those.
+
+In addition to the CNN and BERT (Devlin et al., 2019) models provided by the FewRel framework, we experimented with other extensions of BERT. These included RoBERTa (Liu et al., 2019), SpanBert (Joshi et al., 2020), and LUKE (Peters et al., 2018). We were unable to evaluate the best performing model on the task (Baldini Soares et al., 2019) since the authors have not made this model
+
+| Encoder | Acc. ENT | Acc. CLS |
| CNN | 85.24% | 83.14% |
| BERT | 93.78% | 92.21% |
| SpanBERT | 95.19% | 92.73% |
| RoBERTa-base | 95.18% | 93.27% |
| RoBERTa-large | 96.23% | 93.03% |
| LUKE-base | 95.08% | 95.03% |
+
+Table 1: Accuracy of trained models on FewRel Wikipedia validation set $\left( {N = 5,K = 5}\right)$ .
+
+or training code public.
+
+For representation of individual relations, we followed two common strategies mentioned in the RE literature and implemented in the FewRel codebase. In both strategies, the subject and object entities in the sentence are enclosed in special tokens. In the first strategy (CLS) the encoding of the [CLS] token in the subword-tokenized sentence is used as its representation. In the second strategy (ENT), the encoding of the two special tokens preceding the entities are concatenated to form the example representation.
+
+We averaged the representations of the examples to create a prototype representation for each relation, and computed similarity between prototype and query by inner product. All models were trained with the default set of hyperparameters provided in the FewRel repository, without any tuning. Since the official test set is not publicly available, we report validation set performance. This set was not used during training or tuning.
+
+For evaluation that more closely mirrors the realistic few-shot RE scenario, we used a total ranking setting. Instead of randomly sampling $K$ examples of $N$ relations for each instance, we compiled a single test set containing 50 instances of each relation. We then evaluated performance on this test set on a relation-by-relation basis. For each relation, we sampled $K = 5$ examples and created a prototypical representation. We then ranked the entire test set by similarity to the prototype representation, and calculated precision at 50 (P@50) for this ranking (Jarvelin and Kekäläinen, 2017). We repeated this process 10 times, and reported mean P@503. All models were trained using a single V100 GPU.
+
+# 3.2 Results
+
+Performance at FewRel and RE In Table 1 we can see the performance of several models in the
+
+| Relation | RoBERTa ENT | RoBERTa CLS | Span ENT | Span CLS | BERT ENT | BERT CLS |
| P59 (celestial sphere) | 99.4 | 100 | 98.2 | 93.0 | 98.0 | 99.8 |
| P364 (language of work) | 98.2 | 98.0 | 97.8 | 97.0 | 100 | 98.0 |
| P410 (military rank) | 98.0 | 97.8 | 99.6 | 99.0 | 98.4 | 97.2 |
| P155 (prior item) | 97.0 | 91.6 | 92.6 | 93.0 | 86.6 | 88.2 |
| P412 (voice type) | 96.8 | 97.4 | 95.8 | 98.0 | 100 | 96.6 |
| P2094 (sport classification) | 95.6 | 95.2 | 98.0 | 94.4 | 97.2 | 96.2 |
| P413 (player position) | 92.6 | 86.2 | 90.6 | 94.6 | 89.8 | 94.0 |
| P177 (obstacle crossed) | 88.4 | 92.4 | 94.4 | 85.0 | 89.6 | 85.8 |
| P25 (mother) | 84.2 | 44.2 | 76.0 | 68.0 | 81.6 | 50.2 |
| P921 (primary topic) | 79.8 | 82.4 | 77.6 | 74.6 | 69.4 | 74.6 |
| P40 (child) | 75.6 | 59.0 | 75.4 | 73.6 | 66.6 | 42.2 |
| P641 (sport) | 70.2 | 66.2 | 64.0 | 62.8 | 64.0 | 75.6 |
| P463 (organization) | 69.8 | 79.4 | 80.0 | 65.6 | 75.8 | 62.0 |
| P206 (in/near body of water) | 51.8 | 67.4 | 61.6 | 53.4 | 51.0 | 61.4 |
| P26 (spouse) | 50.8 | 49.0 | 48.6 | 39.4 | 44.6 | 49.8 |
| P361 (part of) | 36.2 | 31.0 | 38.0 | 35.8 | 25.0 | 38.4 |
+
+FewRel 5-way-5-shot setup. We chose these values for $K$ and $N$ since they were the most similar to the few-shot-RE scenario described above. All models were trained on the FewRel training set for 10,000 iterations and with default parameters.
+
+As seen in the table, performance increases with model complexity and size, with a large gap between the CNN model and the transformer-based models, and smaller gaps between the latter group. Entity representations consistently outperform sentence-level, [CLS] token representations across model classes, suggesting that entity representations provide a powerful signal for FewRel models.
+
+Table 2 shows P@50 model performance in the RE setting. Performance varies widely between relations and, for many relations, is much lower than one would expect from the numbers in Table 1. We see that the order between models shown in Table 1 is not maintained on individual relations. There is, however, a rough ordering of difficulty among relations, with all models achieving $>85\%$ precision on the top half of relations.
+
+For the rest of the paper, we report results from a single model, RoBERTa-base with ENT representation, due to the tractable size of the model and its strong overall performance.
+
+Difficult Relations Table 3 displays the two most frequent confounders for the RoBERTa-base ENT representation for the least accurate relations. We can see that on these "hard" relations the model gets confused with one or two primary confounders a significant portion of the time.
+
+For many of these relations, the confusion is
+
+Table 2: P@50 for individual relations (Rob/Span/Bert: RoBERTa-base/SpanBERT/BERT-base). See Appendix A for full descriptions of these relations.
+
+| Relation | P@50 | Top 2 Confounders |
| P25 (mother) | 84.2 | P26 (12.8) | P40 (3) |
| P921 (main topic) | 79.8 | P361 (11.2) | P641 (3) |
| P40 (child) | 75.6 | P26 (23.8) | P25 (0.6) |
| P641 (sport played) | 70.2 | P413 (14) | P2094 (13) |
| P463 (member org) | 69.8 | P361 (17.8) | P59 (5.2) |
| P206 (nearby water) | 51.8 | P177 (48.2) | - |
| P26 (spouse) | 50.8 | P25 (41.2) | P40 (8) |
| P361 (part of) | 36.2 | P59 (29.6) | P463 (25.8) |
+
+Table 3: P@50 for individual relations with top-2 confounders (and their percentage) for ENT RoBERTa-base.
+
+justified, and probably does not represent actual false-positives. For example, when extracting relation P206 (the relation between a location and a nearby body of water), the model selects instances of P177 (the relation between a road or bridge and the natural obstacle is crosses) as positives. The most difficult relation, P361 ("part of"), is confused with instances of P463 ("member of organization") and P59 ("star's constellation"), which are both subtypes of that P361. These types of errors are also likely to be made by humans, and may account for the somewhat low human performance on the FewRel task.
+
+However there is one group of relations: mother, child, spouse, which are easily distinguished by humans, but are confused by the models. These relations all share similar entity type signatures - both entities are people. Since several recent papers (see Section 5) demonstrate that supervised RE models rely heavily on entity type information, we hypothesize that few-shot models do the same.
+
+To test this hypothesis, we evaluated the models on TACRED data. In this evaluation, family relations are confused, as are other groups of relations which share a similar type signature. Table 4
+
+| Rel. types | Relation | P@50 | Top 2 Confounders |
| per:family | children siblings | 72.0 | other_family (14.0) | spouse (8.4) |
| 69.6 | other_family. (16.0) | children (11.0) |
| parents | 62.2 | spouse (20.0) | other_family. (8.6) |
| spouse | 43.2 | children (31.0) | parents (9.8) |
| other_family | 23.6 | spouse (21.2) | siblings (15.0) |
| per: date | birth_date | 77.2 | death_date (22.8) | - |
| death_date | 62.4 | birth_date (35.6) | cause_of_death (1.4) |
| per:location | birth_city | 52.8 | birth_state (13.2) | death_city (11.4) |
| birth_state | 41.4 | birth_city (20.2) | death_state (15.4) |
| death_state | 35.8 | birth_city (18.0) | death_city (14.4) |
| death_city | 35.6 | birth_city (25.0) | death_state(16.8) |
| org:date | founded_date | 72.6 | dissolved_date (27.2) | alt_name (0.2) |
| dissolved_date | 50.6 | founded_date (48.2) | alt_name (0.3) |
| org:location | hq_state | 68.2 | hq_city (30.8) | member_of (0.8) |
| hq_city | 59.6 | hq_state (40.0) | member_of (0.4) |
+
+shows the results for a subset of these groups. See Appendix C for the full confusion matrix for all TACRED person and organization relations. This confirms that even high-scoring few-shot RE models rely primarily on entity type information, and find it hard to distinguish between relations with similar type signatures.
+
+# 4 Overcoming Entity Type Bias
+
+# 4.1 Alternate Representations
+
+Under the hypothesis that the choice of the $ENT$ representation strategy was responsible for the entity-type bias, we experimented with other representations, including CLS (as described above), concatenation of $ENT$ and CLS, and entity masking. Our results showed no significant improvement in distinguishing confusable relations. This indicates that the models are still focusing on the entity-type information, even if they are getting it indirectly (e.g., from the [CLS] tag attending to the entity parts of the sentence).
+
+# 4.2 Data Augmentation
+
+We note that the FewRel training dataset does not contain confusable relations. Even if a few such relations existed in the dataset, the training procedure, which randomly samples a small subset of relation from a large pool, would rarely result in a difficult example where two or more sampled relations share the same type.
+
+In the supervised setting, Rosenman et al. (2020) show that model performance can be improved by introducing (manually-created) challenging exam
+
+plies into the training data. We attempted a similar remedy in the FewRel setting, by adding examples from TACRED, which contains a large number of confusable relations. In order to avoid overlap between training and test data, we split the TACRED relations in two: all person relations were added to the FewRel training set, and all organization relations were used for testing.
+
+# 4.3 Results
+
+Table 4: TACRED: P@50 for a subset of relations along with top-2 confounders.
+
+| Relation | FewRel | FR+per |
| founded_date | 72.6 | 74.8 |
| dissolved_date | 50.6 | 57.3 |
| hq_city | 59.6 | 84.4 |
| hq_state | 68.2 | 92.4 |
+
+Table 5: P@50 for selected TACRED organization relations when training on FewRel alone, and after augmenting with TACRED person relations.
+
+Table 5 shows the results of training on the FewRel dataset, augmented with TACRED person relations and testing on TACRED organization. We can see improved results and less confusion among the relations sharing similar entity type signatures. This means that with the addition of more challenging examples, the model was forced to look beyond the entity-type signature, and incorporate other information suitable for distinguishing confusable relations. Note that organization TACRED relations were never observed during training. In addition, augmenting the training data with TACRED person relations improves the overall accuracy from $95.18\%$ to $96.16\%$ on the original
+
+FewRel validation set and from $82.54\%$ to $85.48\%$ on the TACRED organization relations.
+
+# 5 Related Work
+
+Several recent papers have analyzed the weaknesses of SOTA supervised relation extraction systems, primarily on the TACRED dataset (Zhang et al., 2017). Rosenman et al. (2020) list several "lazy" strategies employed by supervised SOTA models in the TACRED challenge, including the "entity-type heuristic" which relies solely on entity types, ignoring context. Alt et al. (2020) perform in-depth error analysis and show that many errors stem from confusing relations with identical (coarse) type signatures, and ignoring context. Tran et al. (2020) present a system that uses only entity information (in the form of unsupervised cluster IDs) to match SOTA results on TACRED. To the best of our knowledge, there has not been a similar error analysis for few-shot classification models.
+
+# 6 Conclusions
+
+In this work we explored the applicability of few-shot relation classification models in a relation extraction setting. We showed that high classification accuracy does not translate to high extraction performance, due to the reliance of few-shot models on entity type information. As a result, the models tend to perform poorly on relations involving broad entity types, such as people, locations, or dates. By explicitly adding confusable relations at training time, we force the model to rely less heavily on entity types, and consequently discriminate between relations with similar argument types. Further modifications to the training sampler that encourage the model to downweight entity type information are the subject of ongoing work.
+
+# References
+
+Christoph Alt, Aleksandra Gabryszak, and Leonhard Hennig. 2020. TACRED revisited: A thorough evaluation of the TACRED relation extraction task. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1558-1569, Online. Association for Computational Linguistics.
+Livio Baldini Soares, Nicholas FitzGerald, Jeffrey Ling, and Tom Kwiatkowski. 2019. Matching the blanks: Distributional similarity for relation learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2895-2905, Florence, Italy. Association for Computational Linguistics.
+
+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. 2020a. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877-1901. Curran Associates, Inc.
+Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020b. Language models are few-shot learners. arXiv preprint arXiv:2005.14165.
+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.
+Tianyu Gao, Xu Han, Hao Zhu, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. 2019. FewRel 2.0: Towards more challenging few-shot relation classification. 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 6251-6256, Hong Kong, China. Association for Computational Linguistics.
+Jiatao Gu, Yong Wang, Yun Chen, Victor OK Li, and Kyunghyun Cho. 2018. Meta-learning for low-resource neural machine translation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3622-3631.
+Xu Han, Hao Zhu, Pengfei Yu, Ziyun Wang, Yuan Yao, Zhiyuan Liu, and Maosong Sun. 2018. FewRel: A large-scale supervised few-shot relation classification dataset with state-of-the-art evaluation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4803-4809, Brussels, Belgium. Association for Computational Linguistics.
+Kalervo Järvelin and Jaana Kekäläinen. 2017. Ir evaluation methods for retrieving highly relevant documents. In ACM SIGIR Forum, volume 51, pages 243-250. ACM New York, NY, USA.
+Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S. Weld, Luke Zettlemoyer, and Omer Levy. 2020. SpanBERT: Improving pre-training by representing and predicting spans. Transactions of the Association for Computational Linguistics, 8:64-77.
+
+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. CoRR, abs/1907.11692.
+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.
+Shachar Rosenman, Alon Jacovi, and Yoav Goldberg. 2020. Exposing Shallow Heuristics of Relation Extraction Models with Challenge Data. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 3702-3710, Online. Association for Computational Linguistics.
+Thy Thy Tran, Phong Le, and Sophia Ananiadou. 2020. Revisiting unsupervised relation extraction. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7498-7505, Online. Association for Computational Linguistics.
+Leiming Yan, Yuhui Zheng, and Jie Cao. 2018. Few-shot learning for short text classification. Multimedia Tools and Applications, 77(22):29799-29810.
+Wenpeng Yin, Nazneen Fatema Rajani, Dragomir Radev, Richard Socher, and Caiming Xiong. 2020. Universal natural language processing with limited annotations: Try few-shot textual entailment as a start. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8229-8239.
+Yuhao Zhang, Victor Zhong, Danqi Chen, Gabor Angeli, and Christopher D. Manning. 2017. Position-aware attention and supervised data improve slot filling. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing (EMNLP 2017), pages 35-45.
+
+# A FewRel Relations - Validation Set
+
+P59 The area of the celestial sphere of which the subject is a part (from a scientific standpoint, not an astrological one).
+P364 Language in which a film or a performance work was originally created.
+P410 Military rank achieved by a person, or military rank associated with a position.
+P155 Immediately prior item in a series of which the subject is a part.
+P412 Person's voice type. Expected values: soprano, mezzo-soprano, contralto, countertenor, tenor, baritone, bass (and derivatives).
+P2094 Official classification by a regulating body under which the subject (events, teams, participants, or equipment) qualifies for inclusion.
+P413 Position or specialism of a player on a team, e.g., Small Forward.
+P177 Obstacle (body of water, road, ...) which this bridge crosses over or this tunnel goes under.
+P25 Female parent of the subject.
+P921 Primary topic of a work.
+P40 Subject has object as biological, foster, and/or adoptive child.
+P641 Sport in which the subject participates or belongs to.
+P463 Organization or club to which the subject belongs.
+P206 Sea, lake or river.
+P26 The subject has the object as their spouse (husband, wife, partner, etc.).
+P361 Object of which the subject is a part.
+
+# B TACRED Relations
+
+# Person relations
+
+```ruby
+per:employee_of per:children per:siblings per:age per:countries_of_residence per:origin per:stateorprovince_of_birth per:alternate_names per:schools_attended per:city_of_death per:country_of_birth per:city_of_birth per:country_of_death
+```
+
+# Organization relations
+
+```txt
+org:founded_by org:alternate_names
+org:website org:member_of
+org:top_members/employees org:city_ofheadquarters
+org:members org:country_ofheadquarters
+org:stateorprovince_ofheadquarters org:number_of_employees/members
+org:parents org:subsidiaries
+org:political/religious_affiliation org:dissolved
+org:shareholders org:founded
+```
+
+# C Few-shot Confusion Matrices
+
+
+Figure 1 and Figure 2 are the confusion matrices for TACRED person and organization relations from a RoBERTa-base model trained on FewRel alone (values in percent).
+Figure 1: Confusion matrix over TACRED person relations.
+
+
+Figure 2: Confusion matrix over TACRED organization relations.
\ No newline at end of file
diff --git a/towardsrealisticfewshotrelationextraction/images.zip b/towardsrealisticfewshotrelationextraction/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..134065e0f28a96796c0ce1c88f7ae5942b06420c
--- /dev/null
+++ b/towardsrealisticfewshotrelationextraction/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ca6e8569a65bc1ee757fdd0637dc7debeb656c9f88833d5ea23eaf9cdb4284ad
+size 536206
diff --git a/towardsrealisticfewshotrelationextraction/layout.json b/towardsrealisticfewshotrelationextraction/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..d3d633e600b9b4ea4efbcd85f2e4155106dbfec7
--- /dev/null
+++ b/towardsrealisticfewshotrelationextraction/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4b2b79377fbb8651475febe222ca697a4f5209eec161f6a02b475cc481b37226
+size 204376
diff --git a/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/557c8763-f7e3-48fe-9a14-5e117fdc7a65_content_list.json b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/557c8763-f7e3-48fe-9a14-5e117fdc7a65_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..368b1e0ccda96f67df4a697ba1d053b894d5d48f
--- /dev/null
+++ b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/557c8763-f7e3-48fe-9a14-5e117fdc7a65_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:473af667323d7dba070df5cf84dba0e4c309a355cf63e84b1ee17b7b8816a99f
+size 49084
diff --git a/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/557c8763-f7e3-48fe-9a14-5e117fdc7a65_model.json b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/557c8763-f7e3-48fe-9a14-5e117fdc7a65_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..bbb608b23b8784fe2cfaa585c2d5aa57a71eeb64
--- /dev/null
+++ b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/557c8763-f7e3-48fe-9a14-5e117fdc7a65_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a0e30db6c6a5cc2f99179307d0090c871f018e04bf36afcdb0e4d37d29539529
+size 60642
diff --git a/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/557c8763-f7e3-48fe-9a14-5e117fdc7a65_origin.pdf b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/557c8763-f7e3-48fe-9a14-5e117fdc7a65_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..142aed79a94908248288b249fd466fdaece85e0d
--- /dev/null
+++ b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/557c8763-f7e3-48fe-9a14-5e117fdc7a65_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6db64ad08d97c20d91d69b390935fd14581364bb328a893a62d8a94b11ce7647
+size 372027
diff --git a/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/full.md b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..24426cef1dfe674c6670198695eba688b72cb819
--- /dev/null
+++ b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/full.md
@@ -0,0 +1,220 @@
+# Towards Zero-shot Commonsense Reasoning with Self-supervised Refinement of Language Models
+
+Tassilo Klein
+
+SAP AI Research
+
+tassilo.klein@sap.com
+
+Moin Nabi
+
+SAP AI Research
+
+m.nabi@sap.com
+
+# Abstract
+
+Can we get existing language models and refine them for zero-shot commonsense reasoning? This paper presents an initial study exploring the feasibility of zero-shot commonsense reasoning for the Winograd Schema Challenge by formulating the task as self-supervised refinement of a pre-trained language model. In contrast to previous studies that rely on fine-tuning annotated datasets, we seek to boost conceptualization via loss landscape refinement. To this end, we propose a novel self-supervised learning approach that refines the language model utilizing a set of linguistic perturbations of similar concept relationships. Empirical analysis of our conceptually simple framework demonstrates the viability of zero-shot commonsense reasoning on multiple benchmarks.
+
+# 1 Introduction
+
+Natural language processing has recently experienced unprecedented progress, boosting the performance of many applications to new levels. However, this gain in performance does not equally transfer to applications requiring commonsense reasoning capabilities, which has largely remained an unsolved problem (Marcus, 2020; Kocijan et al., 2020). In order to assess the commonsense reasoning capabilities of automatic systems, several tasks have been devised. Among them is the popular Winograd Schema Challenge (WSC), which frames commonsense reasoning as a pronoun resolution task (Levesque et al., 2012). Although appearing evident and natural to the human mind, modern machine learning methods still struggle to solve this challenge.
+
+Lately, the research community has experienced an abundance of methods proposing utilization of
+
+
+Figure 1: WSC sample: a) original sentence, b) perturbation (noun synonym). Task: resolve pronoun with a candidate. The trigger-word induces an answer flip.
+
+language models (LM) to tackle commonsense reasoning in a two-stage learning pipeline. Starting from an initial self-supervised learned model, commonsense enhanced LMs are obtained in a subsequent fine-tuning (ft) phase. Fine-tuning enforces the LM to solve the downstream WSC task as a plain co-reference resolution task. However, such supervised approaches are prone to leverage statistical data artifacts for reasoning, giving rise to the "Clever Hans" effect (Lapuschkin et al., 2019). As such, instead of truly featuring reasoning capabilities, approaches become very good in faking. On the other hand, the lack of commonsense reasoning capabilities of LMs can be partially attributed to the training corpora itself, as the commonsense knowledge is often not incorporated into the training text due to the assumed triviality (Trichelair et al., 2018; Saba, 2018; Trichelair et al., 2019; Emami et al., 2019; Kavumba et al., 2019; Liu et al., 2020; Cui et al., 2020). We hypothesize that the current self-supervised tasks used in the pre-training phase are insufficient to enforce the model to generalize commonsense concepts (Kejriwal and Shen, 2020). This shortcoming is easily unveiled by the susceptibility of LM to semantic variations. In this regard, it has been shown that LMs are sensitive to linguistic perturbations (Abdou et al., 2020). A case in point is the WSC example in Fig. 1. It shows a pair of sentences sub
+
+ject to semantic variations establishing the same relationship between entities. This can be defined as the joint concept triplet consisting of two nouns and a verb that determines the relationship between the nouns, e.g., (container, item, fit). Inappropriate semantic sensitivity to semantic variants leads to inadequate "conceptualization" and misconstruction of such triplets. To address this, we propose self-supervised refinement. It seeks to achieve generalization through a task agnostic objective.
+
+To this end, we tackle the problem of commonsense reasoning from a zero-shot learning perspective. Leveraging zero-shot models to gauge the intrinsic incorporation of commonsense knowledge suggests being the more valid approach than finetuned models. That can be attributed to the exploitation of implicit biases less likely to occur in this setup. Hence, the associated benchmarks constitute a more realistic and reliable benchmark (Elazar et al., 2021). Other zero-shot methods for commonsense reasoning either use large supervised datasets Winogrande (Sakaguchi et al., 2019)) or very large LMs such as GPT-3 (Brown et al., 2020). In contrast, the proposed method takes a pre-trained LM as input, which undergoes a refinement step. During refinement, the LM is exposed to semantic variations, aiming at improved concept generalization by making the model more robust w.r.t. perturbations. Motivated by the recent advancements in contrastive representation learning (Chen et al., 2020; He et al., 2020; Jean-Bastien et al., 2020; Klein and Nabi, 2020), we propose refining the LM in a self-supervised contrastive fashion. This entails refinement without the use of any labels and hence with no gradient update on the downstream datasets. Consequently, the supervision level is identical to the test time of the Winograd schema challenge.
+
+Our contributions are two-fold: (i) we introduce the task of zero-shot commonsense reasoning for WSC by reformulating the task as performing self-supervised refinement on a pre-trained language model (ii) We propose a self-supervised refinement framework which leverages semantic perturbations to facilitate zero-shot commonsense reasoning.
+
+# 2 Method
+
+Preliminaries: Transformer-based LMs are based on an encoder-decoder architecture, consisting of a set of encoding layers that process the input it-
+
+eratively. Prior to entering the Transformer stack, the input is pre-processed by a tokenizer that turns the input sentence into a sequence of tokens. Besides tokens arising from the input sentence, there are also auxiliary tokens such as [CLS], [SEP]. In BERT and RoBERTa, these tokens delimit the input from padding for fixed-length sequence processing. Furthermore, there are special tokens that are tailored to frame specific tasks. For example, [MASK] is used to mask out words for learning the masked language model. Instantiation of language models on the tokenized sequence yields a sequence of embedding vectors. To avoid clutter in the notation and subsuming the fact that only fixed-length sequences are encoded, for the following $\mathbf{x} \in \mathbb{T}$ will refer to the tensor obtained by stacking the sequence of token embeddings.
+
+# 2.1 Perturbation Generation Framework
+
+Starting from a pre-trained LM (init-LM), we conduct a refinement step exposing the model to semantic variations of Winograd schemas. Given a sentence $x$ and a specific semantic [perturbation token], the LM is trained to generate the embedding $\hat{x}$ of the provided perturbation type. We enforce the generator to estimate the embedding obtained by the LM on the sentence with the actual semantic perturbation as the target. Intuitively speaking, an LM that generates perturbed representations from an unperturbed input is equipped with a generalized view of commonsense concepts. This builds upon the idea that the injection of noise to the input can flatten the loss landscape to promote generalization (Qin et al., 2019; Moosavi-Dezfooli et al., 2019).
+
+To this end, we extend the set of auxiliary tokens with some new tokens referred to as "perturbation tokens". In the course of training, the perturbation tokens are prepended to the input sentence directly after the [CLS] token. For the following, we let $\mathcal{P}$ denote the set of semantic perturbations. Besides perturbations, $\mathcal{P}$ also includes the identity transformation [IDENTICAL], which implies no semantic change. Figure 1 shows an example of a perturbation induced by the perturbation token [SYNONYM], which entails replacing nouns of the input sentence with synonyms. Following the example from the figure, the LM seeks to map the representation of the (tokenized) sentence (a) in conjunction with [SYNONYM] to the representation of (b). To enforce consistency across com
+
+
+Figure 2: Schematic illustration of the proposed approach. Two examples $\mathbf{x}_i$ and $\mathbf{x}_j$ from the WSC dataset, both demonstrating the concept triplet (container, item, fit) and their generated embeddings (dashed outline) for two perturbation types: top: [SYNOYM] and bottom: [TENSE]. Loss terms defined as attraction $(\longleftrightarrow)$ and repulsion $(\longleftrightarrow)$ between embeddings of unperturbed and corresponding generated perturbation, each shown in a different color: Reconstruction loss, Contrastive loss and Diversity loss (best shown in color).
+
+monsense concepts and semantic perturbations, we embed learning in a contrastive setting.
+
+# 2.2 Self-supervised Refinement
+
+The method's core idea is to construct an abstract, generic view of a commonsense concept by exploiting slightly different examples of the same concept (i.e., perturbations). This is achieved by joint optimization of a LM w.r.t. three different loss terms (Reconstruction, Contrastive and Diversity):
+
+$$
+\min _ {\theta_ {1}, \theta_ {2}} \mathcal {L} _ {R} \left(f _ {\theta_ {1}}\right) + \mathcal {L} _ {C} \left(f _ {\theta_ {1}}\right) + \mathcal {L} _ {D} \left(f _ {\theta_ {1}}, q _ {\theta_ {2}}\right) \tag {1}
+$$
+
+Here $f$ denotes the LM, e.g., BERT or RoBERTa parameterized by $\theta_{1}$ , and $q: \mathbb{T} \to \mathcal{P}$ denotes a representation discriminator (MLP) parameterized by $\theta_{2}$ . The functionality of the individual loss terms of Eq. 1 will be explained in the following subsections. Additionally, Fig. 2 shows a schematic illustration of the proposed approach and each loss term.
+
+Optimization of Eq. 1 entails computation of similarities between embeddings, employing a metric $\phi (\mathbf{x},\hat{\mathbf{x}}):\mathbb{T}\times \mathbb{T}\to \mathbb{R}$ . Here, we employ a variant of the BERTscore (Zhang et al., 2020) as a similarity metric. BERTscore computes sentence similarities by matching tokens based on their cosine similarity. Subsequently, the scores for the entire sequence are aggregated. Unlike the original BERTscore, we restrict token matching to each token's vicinity to accommodate that perturbations typically induce changes only in a small neighborhood. To this end, we restrict token matching by applying a sliding window mechanism centered on each token.
+
+# 2.2.1 Reconstruction loss
+
+The reconstruction loss's objective is to regress embeddings by minimizing the distance between the ground-truth and the approximated "perturbation" embedding:
+
+$$
+\mathcal {L} _ {R} = - \alpha \sum_ {i} ^ {N} \sum_ {k \in \mathcal {P}} \phi \left(\mathrm {x} _ {i} ^ {[ k ]}, \hat {\mathrm {x}} _ {i} ^ {[ k ]}\right) \tag {2}
+$$
+
+# 2.2.2 Contrastive loss
+
+The objective of the contrastive loss is to preserve the "semantic expressivity of individual samples and prevent the collapse to a singular perturbation representation. This is achieved by pushing apart the embeddings for different samples of the same perturbation type.
+
+$$
+\mathcal {L} _ {C} = \beta \sum_ {i, j: i \neq j} ^ {N} \sum_ {k \in \mathcal {P}} \phi \left(\hat {\mathrm {x}} _ {i} ^ {[ k ]}, \hat {\mathrm {x}} _ {j} ^ {[ k ]}\right) \tag {3}
+$$
+
+# 2.2.3 Diversity loss
+
+The diversity loss term aims to guarantee the discriminativeness of the perturbation embeddings arising from the same sample. As such, it imposes the semantic perturbations for the same sample to be diverse, preventing the collapse of different perturbations to a single embedding. Maximizing diversity entails minimization of cross-entropy w.r.t. perturbations:
+
+$$
+\mathcal {L} _ {D} = - \gamma \sum_ {i} ^ {N} \sum_ {k \in \mathcal {P}} \log \frac {q (k | \hat {\mathrm {x}} _ {i} ^ {[ k ]})}{\sum_ {\forall t \in \mathcal {P} : t \neq k} q (t | \hat {\mathrm {x}} _ {i} ^ {[ k ]})}, (4)
+$$
+
+Here $q(\cdot|\cdot): \mathbb{T} \to \mathbb{R}$ denotes the likelihood of a classifier w.r.t. embeddings. $N$ denotes the
+
+number of data samples, and $\alpha ,\beta ,\gamma \in \mathbb{R}$ denote the hyperparameters, balancing the terms in the loss function.
+
+# 2.2.4 Zero-shot Pronoun Disambiguation
+
+For resolving the WSC we leverage the Transformer Masked Token Prediction following (Koci-jan et al., 2019). This entails replacing the [MASK] token with the possible candidates. Given an associated pair of training sentences with $i \in N$ , i.e., $(s_i^1, s_i^2)$ , the difference between the sentence pairs is the trigger word(s). Here $c_1, c_2$ denote the answer candidates, yielding probabilities for the candidates: $p(c_1 | s_i^1)$ and $p(c_2 | s_i^1)$ . The answer prediction corresponds to the candidate with a more significant likelihood. If a candidate consists of several tokens, the probability corresponds to the average of the log probabilities.
+
+# 3 Experiments and Results
+
+# 3.1 Setup
+
+We approach training the language model by first training the LM on perturbations on the enhanced-WSC corpus (Abdou et al., 2020). It is a perturbation augmented version of the original WSC dataset. It consists of 285 sample sentences, with up to 10 semantic perturbations per sample. We make use of the following 7 perturbations: tense switch [TENSE], number switch [NUMBER], gender switch [GENDER], voice switch (active to passive or vice versa) [VOICE], relative clause insertion (a relative clause is inserted after the first referent) [RELCLAUSE], adverbial qualification (an adverb is inserted to qualify the main verb of each instance) [ADVERB], synonym/name substitution [SYNONYM].
+
+# 3.2 Architecture
+
+The proposed approach is applicable to any Transformer architecture. Here, we adopted standard LMs such as BERT and RoBERTa for comparability, without aiming to optimize the results for any downstream dataset/benchmark. Specifically, we employ the Hugging Face (Wolf et al., 2019) implementation of BERT large-uncased architecture as well as RoBERTA large. The LM is trained for 10 epochs for BERT and 5 for RoBERTa, using a batch size of 10 sentence samples. Each sample was associated with 4 perturbation, yielding an effective batch size of 40. For optimization, we
+
+| DPR (Rahman and Ng, 2012) |
| Method | BERT | RoBERTa |
| Baseline (init-LM) | 58.50 % | 70.39 % |
| Ours (Zero-shot) | 61.35 % | 76.95 % |
+
+GAP (Webster et al., 2018)
+
+| Method | BERT | RoBERTa |
| Baseline (init-LM) | 58.70 % | 58.87 % |
| Ours (Zero-shot) | 58.73 % | 59.13 % |
+
+KnowRef (Emami et al., 2019)
+
+| Method | BERT | RoBERTa |
| Baseline (init-LM) | 62.36 % | 60.42 % |
| Ours (Zero-shot) | 62.44 % | 63.97 % |
+
+PDP-60 (Davis et al., 2016)
+
+| Method | BERT | RoBERTa |
| Baseline (init-LM) | 60.00 % | 50.00 % |
| Ours (Zero-shot) | 58.33 % | 55.00 % |
+
+WSC-273 (Levesque et al., 2012)
+
+| Method | BERT | RoBERTa |
| Baseline (init-LM) | 62.64 % | 67.77 % |
| Ours (Zero-shot) | 61.54 % | 71.79 % |
+
+WinoGender (Rudinger et al., 2018)
+
+| Method | BERT | RoBERTa |
| Baseline (init-LM) | 62.50 % | 61.67 % |
| Ours (Zero-shot) | 62.08 % | 69.17 % |
+
+WinoGrande (Sakaguchi et al., 2019)
+
+| Method | BERT | RoBERTa |
| Baseline (init-LM) | 51.70 % | 53.75 % |
| Ours (Zero-shot) | 52.33 % | 55.01 % |
+
+WinoBias Anti (Zhao et al., 2018)
+
+| Method | BERT | RoBERTa |
| Baseline (init-LM) | 56.82 % | 55.93 % |
| Ours (Zero-shot) | 56.82 % | 60.61 % |
+
+WinoBias Pro (Zhao et al., 2018)
+
+| Method | BERT | RoBERTa |
| Baseline (init-LM) | 68.43 % | 68.43 % |
| Ours (Zero-shot) | 75.12 % | 75.76 % |
+
+Table 1: Results for zero-shot commonsense reasoning
+
+used a typical setup of AdamW with 500 warmup steps, a learning rate of $5.0^{-5}$ with $\epsilon = 1.0^{-8}$ and $\epsilon = 1.0^{-5}$ for BERT and RoBERTa, respectively. For training BERT, we used $\alpha = 130$ , $\beta = 0.5$ , $\gamma = 2.5$ , for RoBERTa $\alpha = 1.25$ , $\beta = 7.25$ , $\gamma = 6.255$ . For hyperparameter optimization of
+
+$\alpha, \beta, \gamma$ we follow a standard greedy heuristic, leveraging a weighted-sum optimization scheme (Jakob and Blume, 2014). From an initial a candidate solution set, coarse-grid random search is utilized to explore the neighborhood on a fine grid of a randomly selected candidates.
+
+The representation discriminator $q$ is a MLP consisting of two fully connected layers with BatchNorm, parametric ReLU (PReLU) activation function and $20\%$ Dropout.
+
+# 3.3 Results
+
+Given the BERT and RoBERTa language models for comparison, the baseline constitute the initial-LM prior to undergoing refinement. We evaluated our method on nine different benchmarks. Results are reported in Tab. 1. Accuracy gains are significant and consistent with RoBERTa across all benchmarks. On average, the proposed approach increases the accuracy of $(+0.8\%)$ with BERT and of $(+4.5\%)$ with RoBERTa. The benchmarks and the results are discussed below:
+
+DPR (Rahman and Ng, 2012): a pronoun disambiguation benchmark resembling WSC-273, yet significantly larger. According to (Trichelair et al., 2018), less challenging due to inherent biases. Here the proposed approach outperforms the baseline for both BERT and RoBERTA by a margin of $(+2.85\%)$ and $(+6.56\%)$ , respectively.
+
+GAP (Webster et al., 2018): a gender-balanced coreference corpus. The proposed approach outperforms the baseline on BERT and RoBERTA with $(+0.08\%)$ and $(+0.26\%)$ .
+
+KnowRef (Emami et al., 2019): a co-reference corpus addressing gender and number bias. The proposed approach outperforms the baseline on BERT and RoBERTA with $(+0.08\%)$ and $(+3.55\%)$ .
+
+PDP-60 (Davis et al., 2016): pronoun disambiguation dataset. Our method outperforms the baseline with RoBERTa with $(+5.0\%)$ , while on BERT showing a drop of $(-1.67\%)$ .
+
+WSC-273 (Levesque et al., 2012): a pronoun disambiguation benchmark, known to be more challenging than PDP-60. Our method outperforms the baseline with RoBERTa with $(+4.0\%)$ , with a drop of $(-1.1\%)$ with BERT.
+
+WinoGender (Rudinger et al., 2018): a genderbalanced co-reference corpus. The proposed approach outperforms the baseline on RoBERTA by $(+7.6\%)$ , observing a drop on BERT $(-0.42\%)$ .
+
+WinoGrande (W.G.) (Sakaguchi et al., 2019): the
+
+| Method | DPR | W.G. |
| RoBERTa (Liu et al., 2019) | 70.39 | 53.75 |
| Ours (LC+LD) | 73.76 | 53.28 |
| Ours (LR+LD) | 65.60 | 53.59 |
| Ours (LR+LC) | 65.07 | 52.01 |
| Ours (LR+LC+LD) | 76.95 | 55.01 |
+
+Table 2: Ablation study, performance in accuracy (%)
+
+largest dataset for Winograd commonsense reasoning. Our method outperforms the baseline with BERT by $(+0.63)$ and with RoBERTa by $(+1.26\%)$ .
+
+WinoBias (Rudinger et al., 2018): a genderbalanced co-reference corpus consisting of two types. Type-1 requiring world knowledge, Type-2 requiring syntactic understanding. While on par for the first type in combination with BERT and a margin of $(+6.69\%)$ , the proposed approach outperforms the baseline with RoBERTa with $(+4.68)$ and $(+7.33)$ .
+
+# 3.3.1 Ablation Study
+
+To assess each loss term's contribution, we evaluated each component's performance by removing them individually from the loss. It should be noted that $\mathcal{L}_C$ of Eq. 3 and $\mathcal{L}_D$ of Eq. 4 both interact in a competitive fashion. Hence, only the equilibrium of these terms yields an optimal solution. Changes - such as eliminating a term - have detrimental effects, as they prevent achieving such an equilibrium, resulting in a significant drop in performance. See Tab. 2 for the ablation study on two benchmarks. Best performance is achieved in the presence of all loss terms.
+
+# 4 Discussion and Conclusion
+
+We introduced a method for self-supervised refinement of LMs. Its conceptual simplicity facilitates generic integration into frameworks tackling commonsense reasoning. A first empirical analysis on multiple benchmarks indicates that the proposed approach consistently outperforms the baselines in terms of standard pre-trained LMs, confirming the fundamental viability. We believe that the performance gain will be more pronounced when leveraging larger perturbation datasets for LM refinement. Hence, future work will focus on the generation of perturbations. This could specifically entail the consideration of sample-specific perturbations.
+
+# References
+
+Mostafa Abdou, Vinit Ravishankar, Maria Barrett, Yonatan Belinkov, Desmond Elliott, and Anders Søgaard. 2020. The sensitivity of language models and humans to Winograd schema perturbations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7590-7604, Online. Association for Computational Linguistics.
+Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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.
+Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. 2020. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709.
+Leyang Cui, Sijie Cheng, Yu Wu, and Yue Zhang. 2020. Does bert solve commonsense task via commonsense knowledge? arXiv preprint arXiv:2008.03945.
+Ernest Davis, Leora Morgenstern, and Charles Ortiz. 2016. Human tests of materials for the winograd schema challenge 2016.
+Yanai Elazar, Hongming Zhang, Yoav Goldberg, and Dan Roth. 2021. Back to square one: Bias detection, training and commonsense disentanglement in the winograd schema.
+Ali Emami, Paul Trichelair, Adam Trischler, Kaheer Suleman, Hannes Schulz, and Jackie Chi Kit Cheung. 2019. The knowref coreference corpus: Removing gender and number cues for difficult pronominal anaphora resolution. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3952-3961.
+Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).
+Wilfried Jakob and Christian Blume. 2014. Pareto optimization or cascaded weighted sum: A comparison of concepts. Algorithms, 7(1):166-185.
+Grill Jean-Bastien, Strub Florian, Altché Florent, Tallec Corentin, Pierre Richemond H., Buchatskaya Elena, Doersch Carl, Bernardo Pires Avila, Zhaohan Guo Daniel, Mohammad Azar Gheshlaghi, Piot Bilal, Kavukcuoglu Koray, Munos Rémi, and Valko
+
+Michal. 2020. Bootstrap your own latent - a new approach to self-supervised learning. NIPS 2020.
+Pride Kavumba, Naoya Inoue, Benjamin Heinzerling, Keshav Singh, Paul Reisert, and Kentaro Inui. 2019. In Proceedings of the First Workshop on Common sense Inference in Natural Language Processing, pages 33-42, Hong Kong, China. Association for Computational Linguistics. [link].
+Mayank Kejriwal and Ke Shen. 2020. Do fine-tuned commonsense language models really generalize?
+Tassilo Klein and Moin Nabi. 2020. Contrastive self-supervised learning for commonsense reasoning. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7517-7523.
+Vid Kocijan, Ana-Maria Cretu, Oana-Maria Camburu, Yordan Yordanov, and Thomas Lukasiewicz. 2019. A surprisingly robust trick for winograd schema challenge. In The 57th Annual Meeting of the Association for Computational Linguistics (ACL), Florence, Italy.
+Vid Kocijan, Thomas Lukasiewicz, Ernest Davis, Gary Marcus, and Leora Morgenstern. 2020. A review of winograd schema challenge datasets and approaches. arXiv preprint arXiv:2004.13831.
+Sebastian Lapuschkin, Stephan Waldchen, Alexander Binder, Gregoire Montavon, Wojciech Samek, and Klaus-Robert Müller. 2019. Unmasking clever hans predictors and assessing what machines really learn. Nature Communications, 10:1096.
+Hector Levesque, Ernest Davis, and Leora Morgenstern. 2012. The winograd schema challenge. In Thirteenth International Conference on the Principles of Knowledge Representation and Reasoning.
+Haokun Liu, William Huang, Dhara Mungra, and Samuel Bowman. 2020. Precise task formalization matters in winograd schema evaluations. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8275-8280.
+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.
+Gary Marcus. 2020. The next decade in ai: four steps towards robust artificial intelligence. arXiv preprint arXiv:2002.06177.
+Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Jonathan Uesato, and Pascal Frossard. 2019. Robustness via curvature regularization, and vice versa. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).
+
+Chongli Qin, James Martens, Sven Gowal, Dilip Krishnan, Krishnamurthy Dvijotham, Alhussein Fawzi, Soham De, Robert Stanforth, and Pushmeet Kohli. 2019. Adversarial robustness through local linearization. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc.
+Altaf Rahman and Vincent Ng. 2012. Resolving complex cases of definite pronouns: The Winograd schema challenge. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning, pages 777-789, Jeju Island, Korea. Association for Computational Linguistics.
+Rachel Rudinger, Jason Naradowsky, Brian Leonard, and Benjamin Van Durme. 2018. Gender bias in coreference resolution. 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 8-14, New Orleans, Louisiana. Association for Computational Linguistics.
+Walid S. Saba. 2018. A simple machine learning method for commonsense reasoning? A short commentary on trinh & le (2018). CoRR, abs/1810.00521.
+Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. 2019. WINOGRANDE: an adversarial winograd schema challenge at scale. CoRR, abs/1907.10641.
+Paul Trichelair, Ali Emami, Jackie Chi Kit Cheung, Adam Trischler, Kaheer Suleman, and Fernando Diaz. 2018. On the evaluation of common-sense reasoning in natural language understanding. CoRR, abs/1811.01778.
+Paul Trichelair, Ali Emami, Adam Trischler, Kaheer Suleman, and Jackie Chi Kit Cheung. 2019. How reasonable are common-sense reasoning tasks: A case-study on the Winograd schema challenge and SWAG. 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 3382-3387, Hong Kong, China. Association for Computational Linguistics.
+Kellie Webster, Marta Recasens, Vera Axelrod, and Jason Baldridge. 2018. Mind the GAP: A balanced corpus of gendered ambiguous pronouns. Transactions of the Association for Computational Linguistics, 6:605-617.
+Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric 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.
+
+Varsha Kishore Zhang, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. 2020. Bertscore: Evaluating text generation with bert. In International Conference on Learning Representations.
+Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. 2018. Gender bias in coreference resolution: Evaluation and debiasing methods. 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 15-20, New Orleans, Louisiana. Association for Computational Linguistics.
\ No newline at end of file
diff --git a/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/images.zip b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..093b5cdd831d22f4774a86eb7f5d8ee0f744dccc
--- /dev/null
+++ b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e5d9aceeb52e0ce2609b794550e905fb9cac4a4101c4813b35f7d9edfeb44396
+size 291162
diff --git a/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/layout.json b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..22f0e77fff28788821a7193a2619496505fcb788
--- /dev/null
+++ b/towardszeroshotcommonsensereasoningwithselfsupervisedrefinementoflanguagemodels/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f047380c72329bdf0fab392be2349d6dd2c6fd2cc8414551aa9352661b7afef9
+size 249629
diff --git a/towardszeroshotknowledgedistillationfornaturallanguageprocessing/7913f54b-f5bf-4f64-bae4-04f63ec5e805_content_list.json b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/7913f54b-f5bf-4f64-bae4-04f63ec5e805_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..228a7ddeaac4187afc711402c5bcbb25d264c9ce
--- /dev/null
+++ b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/7913f54b-f5bf-4f64-bae4-04f63ec5e805_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a2a32d2a8687c67d013f0cc8babd026a3aabae35475b2707e43c18db19069f10
+size 71872
diff --git a/towardszeroshotknowledgedistillationfornaturallanguageprocessing/7913f54b-f5bf-4f64-bae4-04f63ec5e805_model.json b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/7913f54b-f5bf-4f64-bae4-04f63ec5e805_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..d03828b0eaa8ff86288e70da2376297d08ec27af
--- /dev/null
+++ b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/7913f54b-f5bf-4f64-bae4-04f63ec5e805_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:abbc3d4a54ffb58861720aa68375b648e160629220b7839502e316a40d4b001a
+size 89859
diff --git a/towardszeroshotknowledgedistillationfornaturallanguageprocessing/7913f54b-f5bf-4f64-bae4-04f63ec5e805_origin.pdf b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/7913f54b-f5bf-4f64-bae4-04f63ec5e805_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..145d7cbd1684b876c64e6ae2c0df769d2abf0199
--- /dev/null
+++ b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/7913f54b-f5bf-4f64-bae4-04f63ec5e805_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7ed9ec0a2d7df86a7e3ca4f4139834d3b1fcb852b9b1d27640caa26d729d14e6
+size 507918
diff --git a/towardszeroshotknowledgedistillationfornaturallanguageprocessing/full.md b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..4207d58574db14718d3e5b89cd3ac390e2fc4525
--- /dev/null
+++ b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/full.md
@@ -0,0 +1,338 @@
+# Towards Zero-Shot Knowledge Distillation for Natural Language Processing
+
+Ahmad Rashid1, Vasileios Lioutas2*, Abbas Ghaddar1, Mehdi Rezagholizadeh1
+
+1Huawei Noah's Ark Lab, 2University of British Columbia
+
+ahmad.rashid@huawei.com, contact@vlioutas.com,
+
+abbas.ghaddar@huawei.com, mehdi.rezagholizadeh@huawei.com
+
+# Abstract
+
+Knowledge distillation (KD) is a common knowledge transfer algorithm used for model compression across a variety of deep learning based natural language processing (NLP) solutions. In its regular manifestations, KD requires access to the teacher's training data for knowledge transfer to the student network. However, privacy concerns, data regulations and proprietary reasons may prevent access to such data. We present, to the best of our knowledge, the first work on Zero-shot Knowledge Distillation for NLP, where the student learns from the much larger teacher without any task specific data. Our solution combines out-of-domain data and adversarial training to learn the teacher's output distribution. We investigate six tasks from the GLUE benchmark and demonstrate that we can achieve between $75\%$ and $92\%$ of the teacher's classification score (accuracy or F1) while compressing the model 30 times.
+
+# 1 Introduction
+
+Deep learning based natural learning processing (NLP) systems have become state-of-the-art on many applications such as machine translation (MT) (Vaswani et al., 2017; Lioutas and Guo, 2020), natural language understanding (NLU) (Devlin et al., 2019) and language generation (Brown et al., 2020) among others. These models are increasingly trained on huge corpora and with billions of trainable parameters (Brown et al., 2020). This is prohibitive for deploying them on edge devices as well as maintaining them on servers. Moreover, training and evaluating them leaves a significant environmental footprint (Strubell et al., 2019) wherein avoiding the resource hungry training is very challenging (Ghaddar and Langlais, 2019) and may be unavoidable (Li et al., 2020). Model com
+
+pression approaches make it feasible to employ current state of the art models on edge devices.
+
+Model compression (Sanh et al., 2019; Jiao et al., 2019) has received a lot of attention in the NLP community due to the aforementioned reasons. Some of the algorithms include model pruning (See et al., 2016), quantization (Shen et al., 2019), low-rank matrix factorization (Sainath et al., 2013; Lioutas et al., 2019) and knowledge distillation (KD) (Bucilua et al., 2006; Hinton et al., 2015).
+
+KD is one of the most commonly used, application and model agnostic, compression and assembling algorithm. It is one of the most widely researched algorithms for compressing transformer based language models (Rogers et al., 2020; Rashid et al., 2021; Passban et al., 2021; Jafari et al., 2021; Wu et al., 2020; Kamalloo et al., 2021). In KD, the student needs to be trained with the teacher's training data so as to prevent loss of accuracy. However, we can not assume this access for many practical problems. Some of the concerns preventing access include data privacy, intellectual property, size and transience (Micaelli and Storkey, 2019). e.g. a model trained on patient health records might be available but the data itself may be inaccessible due to patient privacy.
+
+In computer vision (CV), Zero-shot KD (ZSKD) has been proposed to train a student without using any data. In this context Zero-shot refers to training without using data instead of no training at all. Nayak et al. (2019) propose generating "data impressions" by updating noise using backpropagation until it generates 'valid' teacher logits and then training the student on these data impressions. Chen et al. (2019) use a generator to produce synthetic images and use the teacher as discriminator, observing that for real images the softmax function of the teacher encourages a unimodal distribution. Micaelli and Storkey (2019) use a generator to produce synthetic training samples employing adver
+
+sarial training to improve the quality. Yoo et al. (2019) generate synthetic data by conditioning a generator on output samples from the teacher and a low dimensional representation of the generated samples. These works assume that there is no data available whatsoever for training the student but they do not transfer to text due to the discrete input space (Krishna et al., 2019). We relax this condition and argue that we can still achieve the goals of ZSKD if we use easy to access out-of-domain (OOD), task agnostic data to aid the process. Krishna et al. (2019) put forth a similar argument, albeit for the problem of model extraction, where they use simple heuristic rules to generate training data for a student, of similar or larger size to the teacher, in order to learn the teacher's output distribution. However, they do not put constraints on the size of the student and even propose a student larger than the teacher.
+
+We study the problem of ZSKD for NLP and adapt an OOD dataset similar to (Krishna et al., 2019). In addition we train a text generator to generate samples which maximize the divergence between the teacher and student output while staying close to the OOD distribution. Our contributions are as follows:
+
+- We present one of the first works in NLP on model compression for NLU models using KD without the teacher's training data or any other task-specific data.
+- We present a novel KD algorithm which combines OOD data gathering and adversarial training.
+- Our algorithm generalizes to different classification tasks for NLP including sentiment analysis, question answering, entailment etc.
+- We present an analysis of our algorithm on Natural Language Inference.
+- We demonstrate that our algorithm can be competitive in the general fine-tuning setting.
+
+# 2 Related Work
+
+# Knowledge Distillation
+
+KD (Hinton et al., 2015) is a well-known deep learning technique used to transfer the knowledge from an already trained large teacher model to a smaller student network. KD adds a new loss function to the student's regular training loss over the
+
+training labels. This new loss function aims at matching the smoothened output probabilities of the student with those of the teacher. More specifically, the training data is fed into the teacher model and the teacher logits are obtained. These are fed, typically, into a softmax function and the temperature parameter is adjusted to smoothen the resulting label distribution. The training loss function for the KD algorithm is as following:
+
+$$
+\begin{array}{l} \mathcal {L} _ {K D} = \alpha * \mathcal {C E} (y, \sigma (z _ {s}; T = 1)) + \\ (1 - \alpha) * \mathcal {K L} (\sigma (z _ {t}; T = \tau), \sigma (z _ {s}, T = \tau)) \tag {1} \\ \end{array}
+$$
+
+where $\mathcal{C}\mathcal{E}$ is the cross-entropy, $\mathcal{KL}$ is the Kullback-Leibler divergence and $z_{s}$ and $z_{t}$ are the student and teacher logits respectively. $\sigma$ is the softmax function, and $\tau$ and $\alpha$ the temperature and interpolation weights respectively are hyperparameters.
+
+# Zero-shot Knowledge Distillation
+
+ZSKD deals with scenarios in which either no training data is available (e.g. in (Nayak et al., 2019)) or at least teacher's training data is not available (for example due to customer's privacy issues). Lopes et al. (2017) introduce a data-free knowledge distillation approach with the assumption that the teacher's network and some meta-data (i.e. the teacher activation records or statistics on the teacher's training data) are given. This work reconstructs the original training data by tweaking a noise input and trying to recover the given metadata. We are different from (Lopes et al., 2017) in the sense that our model does not need any metadata for training. Another case in point is (Nayak et al., 2019) which introduces a data-free knowledge distillation approach with no knowledge about the target data distribution. In this regard, their Zero-shot technique models the softmax output of the teacher using the Dirichlet distribution and then builds the underlying data samples (so called Data Impressions) corresponding to the modeled distribution for the teacher. This approach is infeasible for NLP tasks due to the fact that the input data is discrete and the size of the output softmax can be really large.
+
+One potential practical scenario for NLP can be training students without accessing teacher's training data. In this scenario, we are allowed to use any text corpus in the public domain except the
+
+
+Figure 1: Schematic Diagram of our Zero-shot KD solution. a) We assume access to a pre-trained teacher. b) We gather out-of-domain (OOD) data and train the generator adversarially. c) Finally we use the generated data and the OOD data for KD.
+
+
+
+
+
+data used for training the teacher network. In this case we can borrow ideas from model extraction techniques such as (Pal et al., 2019; Krishna et al., 2019; Yoo et al., 2019) to facilitate ZSKD training by querying the teacher model using unlabeled data. (Krishna et al., 2019) deal with textual input but do not consider smaller students and the KD scenario. The framework of (Pal et al., 2019) does not apply to pairwise classification tasks. (Yoo et al., 2019) designs a conditional data generator to tackle with lack of training data for the student network and focuses on image classification. However, our solution works on text and our text generator is unconditional.
+
+# Adversarial Training
+
+Adversarial examples are small perturbations to training samples indistinguishable to humans but enough to fool neural network classifiers. Goodfellow et al. (2014) proposed adding them to the training set to make CV systems robust to adversarial attacks. Miyato et al. (2016) adapt adversarial training to text classification and improve performance on a few supervised and semi-supervised text classification tasks.
+
+Adversarial training although proposed for model robustness (Ebrahimi et al., 2018; Ghaddar et al., 2021b,a), has been shown to improve state-of-the-art model performance (Cheng et al.,
+
+2019; Zhu et al., 2019; Rashid et al., 2021) in NLP. Cheng et al. (2019) study machine translation and propose making the model robust to both source and target perturbations, generated by swapping the word embedding of a word with that of its synonym. They model small perturbations by considering word swaps which cause the smallest increase in loss gradient. Zhu et al. (2019) propose a novel adversarial training algorithm, FreeLB, to make gradient based adversarial training efficient by updating both embedding perturbations and model parameters simultaneously during the backward pass of training. They show improvements on multiple language models on the GLUE benchmark.
+
+Micaelli and Storkey (2019) adapt adversarial training for ZSKD and train an image generator to increase the divergence between student and teacher and train the student to decrease this divergence.
+
+# 3 Methodology
+
+We rely on an adversarial text generator as the backbone of our method. However, we still need data to pre-train the generator. Since we assume access to a general purpose OOD data, we delineate general principles to extract a training set from this source. Finally, we apply KD on a combination of the OOD training data and the adversarial training data. Figure 1 gives a visual illustration of the
+
+proposed ZSKD method.
+
+# 3.1 Out-of-Domain Training Data
+
+Our ZSKD method assumes that we do not have the original training data on which the teacher model is trained as well as any other task specific data. Similar to (Krishna et al., 2019), we construct an out-of-domain (OOD) dataset. The idea is that using a general purpose corpus of text, we randomly sample sentences from the text. Then depending on the task we add simple heuristics to make the text suitable for the problems at hand. We summarize a list of targeted tasks all taken from the GLUE benchmark (Wang et al., 2018).
+
+Sentiment Classification (SST-2). We do not modify the sampled sentences for this task but simply feed them to the teacher to get the sentiment output distribution, even though most sentences in the sampled text would have neutral sentiment.
+
+Pairwise Sentence Classification The training sequence typically consists of two input sentences. Depending on the task these can be:
+
+- In Natural Language Inference (NLI), the two input sentences are the hypothesis and the premise. Depending on the task, the goal can be to determine whether the hypothesis is true (entailment), false (contradiction), or undetermined (neutral) given the premise (MNLI) or whether the hypothesis entails the premise in the form of binary classification (RTE). For these tasks, we generate the OOD data by randomly extracting a sentence from the corpus to serve as the premise and then by random chance construct the hypothesis to either be a slightly changed version of the premise or be a completely new random sentence.
+
+- In tasks such as Quora Question Pair (QQP) and Microsoft Research Paraphrase Corpus (MRPC), the goal is to determine if the two input sentences are semantically equivalent or not. We follow a strategy similar to NLI tasks but for the QQP task we post-process the generated sentences by appending a question mark at the end.
+
+Question NLI. The goal of this task is to determine if the given paragraph contains the answer to the input question. We sample a paragraph from our corpus and, randomly, either sample a segment from within the paragraph to form a question or sample an unrelated sentence from the corpus.
+
+Then, we randomly append a questioning word such as Who, Where, What etc. to the start of the segment and a question mark at the end.
+
+# 3.2 Generator Pre-training
+
+Inspired by (Micaelli and Storkey, 2019) and on the promise of adversarial training for NLP (Zhu et al., 2019), the key ingredient of our proposed method is to learn a generator that generates training samples. Our adversarial generation is close to adversarial training and we consider the adversarial samples to be perturbations of the OOD training data $D$ . Therefore we pre-train the generator to follow the distribution of $D$ . Specifically, our generator $G$ is a masked language model, such as BERT, which can generate text from noise such that:
+
+$$
+x _ {p} = G (z; \phi) \tag {2}
+$$
+
+where $x_{p}$ is the output of the generator and is a sequence of tokens, $\phi$ is the set of generator parameters and $z \sim \mathcal{N}(\mathbf{0},\mathbf{std})$ .
+
+The generator is pre-trained by minimizing the following loss function:
+
+$$
+\mathcal {L} _ {G P} = \mathcal {H} _ {C E} \left(x _ {k}, x _ {p}\right) \tag {3}
+$$
+
+where $\mathcal{H}_{CE}$ is the cross-entropy loss and $x_{k}$ is a sample from the OOD training set $D$ . Note that the noise $z$ matches the length and dimension of the embedding of $x_{k}$ , with the classification token (CLS) added at the beginning and the separator tokens (SEP) inserted at the same locations as in $x_{k}$ .
+
+# 3.3 Adversarial Training
+
+Most methods in adversarial training for NLP (Zhang et al., 2020) perturb the word embeddings instead of generating text due to the discreteness problem of text. In order to generate text, we need an argmax operation which breaks end-to-end differentiability. Since our goal is KD, embedding perturbation introduces the problem of size mismatch between the student and teacher embedding. Instead we generate text and sample from the argmax by using the Gumbel-Softmax distribution (Kusner and Hernandez-Lobato, 2016; Jang et al., 2016), a continuous distribution over the simplex that can approximate one-hot samples from a discrete distribution.
+
+# 3.3.1 Adversarial Step
+
+Once pre-trained, the generator is trained with two losses. The first loss maximises the KL-divergence between the teacher and student model on the generated data. The teacher and student model parameters are fixed. The goal is to generate training samples where the teacher and student diverge the most. However, this can lead to degenerate samples which are not useful for transferring teacher knowledge. The second loss is the same as Equation 3 and prevents the generator from diverging too much from the OOD training data. The overall loss, $\mathcal{L}_{\mathcal{T}}$ , for generator training is thus:
+
+$$
+\mathcal {L} _ {A} = - D _ {K L} (T (\pmb {x} _ {p} ^ {\prime}) | | S (\pmb {x} _ {p} ^ {\prime}))
+$$
+
+$$
+\mathcal {L} _ {F} = \mathcal {H} _ {C E} \left(x _ {k}, x _ {p}\right) \tag {4}
+$$
+
+$$
+\mathcal {L} _ {T} = \frac {\mathcal {L} _ {A} + \mathcal {L} _ {F}}{2}
+$$
+
+where $T$ is the teacher, $S$ is the student, $x_{k}$ is a sample from the OOD training set, $x_{p}$ is the softmax output of the generator and $x_{p}^{\prime}$ , the one-hot output, is defined as:
+
+$$
+x _ {p} ^ {\prime} = \operatorname {a r g m a x} \left(\sigma_ {\text {G u m b e l}} \left(x _ {l}\right)\right) \tag {5}
+$$
+
+Here $\sigma_{\mathrm{Gumbel}}$ is the Gumbel-Softmax and $x_{l}$ are the logits of the generator.
+
+# 3.3.2 Knowledge Distillation
+
+In each training loop we train the generator for $n_G$ steps and the student for $n_S$ steps. Specifically, the student is optimized using a joint KD loss between the data samples generated from the generator $G$ and the data samples coming from the OOD dataset. Overall the student is trained on:
+
+$$
+\mathcal {L} _ {G} = D _ {K L} \left(T \left(\boldsymbol {x} _ {p} ^ {\prime}\right) | | S \left(\boldsymbol {x} _ {p} ^ {\prime}\right)\right)
+$$
+
+$$
+\mathcal {L} _ {O O D} = D _ {K L} \left(T \left(\boldsymbol {x} _ {k}\right) | | S \left(\boldsymbol {x} _ {k}\right)\right) \tag {6}
+$$
+
+$$
+\mathcal {L} = \alpha \cdot \mathcal {L} _ {G} + (1 - \alpha) \cdot \mathcal {L} _ {O O D}
+$$
+
+where $x_{k}$ and $x_{p}^{\prime}$ are as defined above and $\alpha$ is a weight interpolation parameter. Note that unlike regular KD where we have a hard loss and a soft loss, here we have two soft losses. One matches the student and the teacher output on adversarially augmented data and the other on OOD data respectively. Algorithm 1 presents all the steps of our procedure.
+
+Algorithm 1: Zero-shot KD (Complete)
+pretrain: $T(\cdot)$
+dataset: $D$
+initialize: $G(:,\phi)$
+initialize: $S(\cdot ;\theta)$
+# Pre-train Generator
+for $k\gets 1,2,\dots,N$ do
+ $z\gets \{z_0,\ldots ,z_l\} \sim \mathcal{N}(0,std)$ $\pmb {x}_k\in D$ $\pmb {x}_p\gets G(\pmb {z};\phi)$ $\mathcal{L}_{GP}\gets \mathcal{H}_{CE}(x_k,x_p)$ $\phi \leftarrow \phi -\lambda \frac{\partial\mathcal{L}_{GP}}{\partial\phi}$
+decay $\lambda$
+end
+#Adversarial Train
+for $k\gets 1,2,\dots,N$ do
+ $\pmb{x}_k\gets D$
+# Adversarial Step
+for $1,2,\dots,n_{G}$ do
+ $z\gets \{z_0,\dots ,z_l\} \sim \mathcal{N}(\mathbf{0},std)$ $\pmb{x}_{logits}\gets G(\pmb {z};\phi)$ $\pmb{x}_p\gets$ Gumbel-Softmax(xlogits)
+ $\mathcal{L}_A\gets -D_KL(T(\pmb{x}_p')||S(\pmb{x}_p'))$ $\mathcal{L}_F\gets \mathcal{H}_{CE}(x_k,x_p)$ $\mathcal{L}_T\gets \frac{\mathcal{L}_A + \mathcal{L}_F}{2}$ $\phi \leftarrow \phi -\eta \frac{\partial\mathcal{L}_T}{\partial\phi}$
+end
+# Knowledge Distillation
+for $1,2,\dots,n_{S}$ do
+ $z\gets \{z_0,\dots ,z_l\} \sim \mathcal{N}(\mathbf{0},std)$ $\pmb{x}_{logits}\gets G(\pmb {z};\phi)$ $\pmb {x}_p\gets$ Gumbel-Softmax(xlogits)
+ $\mathcal{L}_G\gets D_KL(T(\pmb{x}_p')||S(\pmb{x}_p'))$ $\mathcal{L}_{OOD}\gets D_KL(T(\pmb{x}_k)||S(\pmb{x}_k))$ $\mathcal{L}\gets \alpha \cdot \mathcal{L}_G + (1 - \alpha)\cdot \mathcal{L}_{OOD}$ $\theta \leftarrow \theta -\eta \frac{\partial\mathcal{L}}{\partial\theta}$
+end
+decay $\eta$
+
+# 4 Experiments
+
+We evaluated our proposed adversarial ZSKD approach on six classification tasks from the General Language Understanding Evaluation (GLUE) (Wang et al., 2018) benchmark. The tasks include binary sentiment analysis on the SST-2 dataset (Socher et al., 2013), ternary NLI on MNLI (Williams et al., 2018), binary entailment on the RTE dataset (Bentivogli et al., 2009), semantic equivalence on QQP (Chen et al., 2018) and MRPC (Dolan and Brockett, 2005), and finally question answering adapted to binary classification evaluated on QNLI (Wang et al., 2018). Section 3.1 gives more details about these tasks.
+
+| Task | Model | Method | Data Generation | Data Size | Score |
| SST-2 | Teacher | - | Original | 67K (×1) | 93.0 |
| Student | - | Original | 67K (×1) | 87.4 |
| Student | KD | WikiText-103 | 269K (×4) | 84.9 |
| Student | KD + Adv (Ours) | WikiText-103 | 135K (×2) | 85.0 |
| Student | KD + Adv (Ours) | WikiText-103 | 269K (×4) | 85.9 |
+
+Table 1: Results on the single sentence sentiment classification task.
+
+| Task | Model | Method | Data Generation | Data Size | Score |
| MNLI | Teacher | - | Original | 392K (×1) | 86.6 |
| Student | - | Original | 392K (×1) | 75.5 |
| Student | KD | WikiText-103 | 1.5M (×4) | 62.5 |
| Student | KD + Adv (Ours) | WikiText-103 | 785K (×2) | 63.8 |
| Student | KD + Adv (Ours) | WikiText-103 | 1.5M (×4) | 65.1 |
| RTE | Teacher | - | Original | 2.5K (×1) | 70.7 |
| Student | - | Original | 2.5K (×1) | 64.2 |
| Student | KD | WikiText-103 | 10K (×4) | 61.7 |
| Student | KD + Adv (Ours) | WikiText-103 | 5K (×2) | 62.0 |
| Student | KD + Adv (Ours) | WikiText-103 | 10K (×4) | 62.5 |
+
+Table 2: Results on the NLI classification tasks.
+
+# 4.1 Experimental Setup
+
+All models used in this paper, except those in section 4.5, are based on two architecture settings from the BERT (Devlin et al., 2019) model. Specifically, for the teacher model we used the pre-trained version of the $\mathrm{BERT}_{\mathrm{LARGE}}$ model released by the authors. The model consists of 24 layers. The hidden size is 1024 and the number of heads is 16. The total number of parameters is about $340\mathrm{M}$ . For the student model, we decided to use a significantly smaller version of the BERT model. Specifically, we used the $\mathrm{BERT}_{\mathrm{MINI}}$ version which uses 4 layers with 256 hidden dimension and 4 attention heads. The total size of the model is $11\mathrm{M}$ trainable parameters. Both models use a vocabulary of size 30,522 extracted using the Byte Pair Encoding (BPE) (Sennrich et al., 2016) tokenization method. The generator is a pre-trained $\mathrm{BERT}_{\mathrm{MINI}}$ model.
+
+We used the Wikitext-103 (Merit et al., 2016) corpus as our OOD dataset. It is a collection of over 100 million tokens from the set of verified good and featured articles in Wikipedia.
+
+Hyper-parameters We fine-tuned the BERT-based student model for 10 epochs and picked the best checkpoint that gave the lowest loss during training. We report results for all methods on the given Dev set. For each task, we selected the best fine-tuning learning rate among 5e-5, 4e-5, 3e-5, and 2e-5 values. We used the AdamW (Loshchilov and Hutter, 2017) optimizer with the default values. In addition, we used a linear decay learning rate scheduler with no warmup steps. We set the $\alpha$ values from our algorithm to be 0.2 and the std value to 0.01. Additionally, we set the value $n_G$ and $n_S$ (see Algorithm 1) to 10 and 100. Finally, we pre-train the generator for two epochs.
+
+Hardware Details We trained all models using a single NVIDIA V100 GPU. The batch size was set to 64. We used mixed-precision training (Micikevicius et al., 2018) to expedite the training procedure. All experiments were run using the PyTorch1 framework.
+
+| Task | Model | Method | Data Generation | Data Size | Score |
| QQP | Teacher | - | Original | 363K (×1) | 89.9 |
| Student | - | Original | 363K (×1) | 83.7 |
| Student | KD | WikiText-103 | 1.4M (×4) | 70.0 |
| Student | KD + Adv (Ours) | WikiText-103 | 728K (×2) | 71.7 |
| Student | KD + Adv (Ours) | WikiText-103 | 1.4M (×4) | 72.2 |
| MRPC | Teacher | - | Original | 4K (×1) | 87.1 |
| Student | - | Original | 4K (×1) | 78.5 |
| Student | KD | WikiText-103 | 15K (×4) | 74.5 |
| Student | KD + Adv (Ours) | WikiText-103 | 7K (×2) | 75.4 |
| Student | KD + Adv (Ours) | WikiText-103 | 15K (×4) | 76.4 |
+
+Table 3: Results on the pairwise sentence classification tasks.
+
+| Task | Model | Method | Data Generation | Data Size | Score |
| QNLI | Teacher | - | Original | 104K (×1) | 91.5 |
| Student | - | Original | 104K (×1) | 84.1 |
| Student | KD | WikiText-103 | 418K (×4) | 78.1 |
| Student | KD + Adv (Ours) | WikiText-103 | 209K (×2) | 79.1 |
| Student | KD + Adv (Ours) | WikiText-103 | 418K (×4) | 79.9 |
+
+Table 4: Results on the question NLI task.
+
+# 4.2 Results
+
+Table 1 presents our result on SST-2. For all the tasks, we present the original large teacher score, the smaller student score when trained on the training data, the student trained with KD on the OOD data and two experiments with different training set sizes using our algorithm. Our baseline is the KD with OOD data and is adapted from (Krishna et al., 2019). They presented the results where the student was the same size as the teacher or larger. Moreover, they applied their method only to SST-2 and MNLI from the GLUE benchmark. We implemented their method, applied it to the smaller student setting and extended the OOD generation process for the 4 other datasets of GLUE.
+
+The data size (x1, x2 and x4) are the OOD data sizes compared to the task specific training data size. The adversarially trained student, in additional to the OOD data, generates an equal number of adversarial examples. On SST-2, we attain close to the student accuracy using the OOD training data. Our method using x2 OOD data does just as
+
+well as the baseline but when we use all the OOD data used by the baseline we increase the accuracy by $1\%$ .
+
+The results of the NLI classification tasks, MNLI and RTE, are on Table 2. MNLI is one of the two hardest tasks that we evaluated on. Looking at the accuracy scores we can see that the student trained on the training data falls well short of the teacher. On this task, we can see the strength of our method as the adversarial training improves the score both when we use x2 OOD data and even further when we use x4 OOD data. High model capacity is important for MNLI. We see a similar trend for RTE.
+
+On pairwise sentence classification, on Table 3 we see that MRPC follows a similar trend where the adversarial training algorithm improves the F1 score both when used with x2 OOD data and with x4 OOD data. The same applies for the QQP task. Similar to MNLI, the model capacity and the amount of training data appears to be important for this task. Table 4 presents the result on
+
+| Model (Network)
+RoBERTa-Large (Teacher) | CoLA
+60.5 | SST-2
+96.3 | MRPC
+89.9 | STS-B
+91.7 | QQP
+91.0 | MNLI
+89.1 | QNLI
+93.0 | RTE
+79.0 | Score
+82.97 |
| DistilRoBERTa (Student) | 56.6 | 92.7 | 84.0 | 87.2 | 90.8 | 84.1 | 91.3 | 65.7 | 78.78 |
| DistilRoBERTa + Adv (α = 0.2) | 62.0 | 93.1 | 86.1 | 88.9 | 91.9 | 84.5 | 91.3 | 70.7 | 80.53 |
+
+Table 5: Results of experiments on GLUE dev set. WNLI results are not presented since they are 56.3 for all models. The are included in calculating the score.
+
+ | N | C | E | Overall |
| OOD Samples | 67.2 | 68.6 | 51.6 | 62.5 |
| +0.75M Adv | 70.8 | 66.1 | 55.7 | 63.8 |
| +1.5M Adv | 73.2 | 65.3 | 57.8 | 65.1 |
+
+the QNLI task and we see improvements using our algorithm both when using half the OOD data as the baseline and when using the same OOD data. On average we see an improvement of 1.4 over all the tasks.
+
+Overall, we were able to recover between $98.2\%$ (SST-2) and $86.2\%$ (MNLI and QQP) of the performance of a version of the student model trained with the original dataset. Similarly, we recovered between $92.3\%$ (SST-2) and $75.1\%$ (MNLI) of the teacher performance.
+
+# 4.3 Analysis
+
+We inspected the per-class results for MNLI to gain insight into the properties of the adversarially generated samples. Table 6 shows that adding adversarial examples continuously improves the performances on neutral and entailment classes.
+
+Our manual inspection shows that adding the generator to the loop makes the student more robust on examples where the premise and hypothesis doesn't significantly overlap. The gain could be imputable to the diversity of the adversarial examples, although, the generator may produce a nonsensical sequence of words. We observed that the premise and hypothesis rarely share common words, contrary to heuristically populated examples $^{2}$ . Adversarial examples prevent the student from relying on the superficial syntactic properties of OOD samples.
+
+Table 6: Per-class F1 scores on MNLI of students trained on OOD samples with incremental subsets of adversarial examples. N,C and E are Neutral, Contradiction and Entailment respectively. No Adv refer to the student trained on randomized sentence pairs.
+
+| Task | Model | LM (GPT-2) | WikiText-103 |
| SST-2 | Student+KD | 83.1 | 83.2 |
| MNLI | Student+KD | 60.0 | 60.2 |
+
+Table 7: Results when using GPT-2 for OOD generation
+
+# 4.4 Alternative for OOD Generation
+
+We explored the use of a language model for OOD generation. Here instead of sampling OOD data from a corpus, we used distilGPT-2 (Wolf et al., 2019) a lighter version of the GPT-2 (Radford et al., 2019) model. We expected the model to perform slightly better since GPT-2 is trained on a much larger dataset. However, as seen in Table 7, we do not observe any improvement and the algorithm is much slower in comparison due to the complexity of executing a language model in the training loop.
+
+# 4.5 Fine-tuning Setting
+
+We apply our data generator to fine-tuning a 6-layer transformer model on the GLUE benchmark. In this setting we use the training data and demonstrate that our algorithm can be used for data augmentation. We use RoBERTaLARGE (Liu et al., 2019) as the teacher and distilRoBERTa (Sanh et al., 2019) as the generator. The student is also initialized with the weights of a pre-trained distilRoBERTa model. Our baseline is a fine-tuned distilRoBERTa model. We train the student using all the steps in Algorithm 1. The only difference is that since we have access to the labels we apply cross-entropy loss on the training data and KL-divergence on augmented data. Table 5 presents the results and we observe that we can improve the average performance on the baseline by almost 2 points. Note that the baseline is trained with just the cross-entropy loss.
+
+# 5 Conclusion
+
+We present the first study on Zero-shot Knowledge Distillation (ZSKD) for NLP. We present an algorithm based on OOD data generation and ad
+
+versarial learning and evaluate on six tasks from the GLUE benchmark reaching to within $75\%$ of the teacher performance on all tasks while attaining a 30x compression. The next steps are to a) explore a generic methodology for OOD data creation and b) study sequence generation tasks such as machine translation and abstractive summarization and achieve compression without the original training data while having access to a teacher.
+
+# Acknowledgments
+
+We thank Mindspore3 which is a new deep learning computing framework for the partial support of this work.
+
+# References
+
+Luisa Bentivogli, Peter Clark, Ido Dagan, and Danilo Giampiccolo. 2009. The fifth pascal recognizing textual entailment challenge. In TAC.
+Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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.
+Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. 2006. Model compression. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 535-541.
+Hanting Chen, Yunhe Wang, Chang Xu, Zhaohui Yang, Chuanjian Liu, Boxin Shi, Chunjing Xu, Chao Xu, and Qi Tian. 2019. Data-free learning of student networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 3514-3522.
+Z. Chen, H. Zhang, X. Zhang, and L. Zhao. 2018. Quora question pairs.
+Yong Cheng, Lu Jiang, and Wolfgang Macherey. 2019. Robust neural machine translation with doubly adversarial inputs. arXiv preprint arXiv:1906.02443.
+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.
+William B. Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005).
+Javid Ebrahimi, Anyi Rao, Daniel Lowd, and Dejing Dou. 2018. Hotflip: White-box adversarial examples for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 31-36.
+Abbas Ghaddar and Philippe Langlais. 2019. Contextualized word representations from distant supervision with and for ner. In Proceedings of the 5th Workshop on Noisy User-generated Text (W-NUT 2019), pages 101-108.
+Abbas Ghaddar, Philippe Langlais, Ahmad Rashid, and Mehdi Rezagholizadeh. 2021a. Context-aware adversarial training for name regularity bias in named entity recognition. Trans. Assoc. Comput. Linguistics, 9:586-604.
+Abbas Ghaddar, Philippe Langlais, Mehdi Reza-gholizadeh, and Ahmad Rashid. 2021b. End-to-end self-debiasing framework for robust NLU training. In Findings of the Association for Computational Linguistics: ACL/IJCNLP 2021, Online Event, August 1-6, 2021, volume ACL/IJCNLP 2021 of Findings of ACL, pages 1923-1929. Association for Computational Linguistics.
+Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. 2014. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572.
+Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531.
+Aref Jafari, Mehdi Rezagholizadeh, Pranav Sharma, and Ali Ghodsi. 2021. Annealing knowledge distillation. arXiv preprint arXiv:2104.07163.
+Eric Jang, Shixiang Gu, and Ben Poole. 2016. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144.
+Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. 2019. Tinybert: Distilling bert for natural language understanding. arXiv preprint arXiv:1909.10351.
+Ehsan Kamalloo, Mehdi Rezagholizadeh, Peyman Passban, and Ali Ghodsi. 2021. Not far away, not so close: Sample efficient nearest neighbour data augmentation via minimax. arXiv preprint arXiv:2105.13608.
+
+Kalpesh Krishna, Gaurav Singh Tomar, Ankur P Parikh, Nicolas Papernot, and Mohit Iyyer. 2019. Thieves on sesame street! model extraction of bert-based apis. arXiv preprint arXiv:1910.12366.
+Matt J. Kusner and José Miguel Hernández-Lobato. 2016. Gans for sequences of discrete elements with the gumbel-softmax distribution.
+Zhuohan Li, Eric Wallace, Sheng Shen, Kevin Lin, Kurt Keutzer, Dan Klein, and Joseph E Gonzalez. 2020. Train large, then compress: Rethinking model size for efficient training and inference of transformers. arXiv preprint arXiv:2002.11794.
+Vasileios Lioutas and Yuhong Guo. 2020. Time-aware large kernel convolutions. In Proceedings of the 37th International Conference on Machine Learning (ICML).
+Vasileios Lioutas, Ahmad Rashid, Krtin Kumar, Md Akmal Haidar, and Mehdi Rezagholizadeh. 2019. Distilled embedding: non-linear embedding factorization using knowledge distillation. arXiv preprint arXiv:1910.06720.
+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.
+Raphael Gontijo Lopes, Stefano Fenu, and Thad Starner. 2017. Data-free knowledge distillation for deep neural networks. arXiv preprint arXiv:1710.07535.
+Ilya Loshchilov and Frank Hutter. 2017. Decoupled weight decay regularization.
+Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2016. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843.
+Paul Micaelli and Amos J Storkey. 2019. Zero-shot knowledge transfer via adversarial belief matching. In Advances in Neural Information Processing Systems, pages 9547-9557.
+Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaiev, Ganesh Venkatesh, and Hao Wu. 2018. Mixed precision training. In International Conference on Learning Representations.
+Takeru Miyato, Andrew M Dai, and Ian Goodfellow. 2016. Adversarial training methods for semi-supervised text classification. arXiv preprint arXiv:1605.07725.
+Gaurav Kumar Nayak, Konda Reddy Mopuri, Vaisakh Shaj, R Venkatesh Babu, and Anirban Chakraborty. 2019. Zero-shot knowledge distillation in deep networks. arXiv preprint arXiv:1905.08114.
+
+Soham Pal, Yash Gupta, Aditya Shukla, Aditya Kanade, Shirish Shevade, and Vinod Ganapathy. 2019. A framework for the extraction of deep neural networks by leveraging public data. arXiv preprint arXiv:1905.09165.
+Peyman Passban, Yimeng Wu, Mehdi Rezagholizadeh, and Qun Liu. 2021. ALP-KD: attention-based layer projection for knowledge distillation. 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 13657-13665. AAAI Press.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI Blog, 1(8):9.
+Ahmad Rashid, Vasileios Lioutas, and Mehdi Rezagholizadeh. 2021. MATE-KD: Masked adversarial TExt, a companion to knowledge distillation. 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 1062-1071, Online. Association for Computational Linguistics.
+Anna Rogers, Olga Kovaleva, and Anna Rumshisky. 2020. A primer in BERTology: What we know about how BERT works. Transactions of the Association for Computational Linguistics, 8:842-866.
+Tara N Sainath, Brian Kingsbury, Vikas Sindhwani, Ebru Arisoy, and Bhuvana Ramabhadran. 2013. Low-rank matrix factorization for deep neural network training with high-dimensional output targets. In 2013 IEEE international conference on acoustics, speech and signal processing, pages 6655-6659. IEEE.
+Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.
+Abigail See, Minh-Thang Luong, and Christopher D. Manning. 2016. Compression of neural machine translation models via pruning. arXiv preprint arXiv:1606.09274.
+Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1715-1725, Berlin, Germany. Association for Computational Linguistics.
+Sheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma, Zhewei Yao, Amir Gholami, Michael W Mahoney, and
+
+Kurt Keutzer. 2019. Q-bert: Hessian based ultra low precision quantization of bert. arXiv preprint arXiv:1909.05840.
+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.
+Emma Strubell, Ananya Ganesh, and Andrew McCallum. 2019. Energy and policy considerations for deep learning in nlp. arXiv preprint arXiv:1906.02243.
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008.
+Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353-355, Brussels, Belgium. Association for Computational Linguistics.
+Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. 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 1112-1122, New Orleans, Louisiana. Association for Computational Linguistics.
+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 M. Rush. 2019. Huggingface's transformers: State-of-the-art natural language processing. ArXiv, abs/1910.03771.
+Yimeng Wu, Peyman Passban, Mehdi Rezagholizadeh, and Qun Liu. 2020. Why skip if you can combine: A simple knowledge distillation technique for intermediate layers. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, Online, November 16-20, 2020, pages 1016-1021. Association for Computational Linguistics.
+Jaemin Yoo, Minyong Cho, Taebum Kim, and U Kang. 2019. Knowledge extraction with no observable data. In Advances in Neural Information Processing Systems, pages 2701-2710.
+
+Wei Emma Zhang, Quan Z Sheng, Ahoud Alhazmi, and Chenliang Li. 2020. Adversarial attacks on deep-learning models in natural language processing: A survey. ACM Transactions on Intelligent Systems and Technology (TIST), 11(3):1-41.
+Chen Zhu, Yu Cheng, Zhe Gan, Siqi Sun, Thomas Goldstein, and Jingjing Liu. 2019. Freelb: Enhanced adversarial training for language understanding. arXiv preprint arXiv:1909.11764.
\ No newline at end of file
diff --git a/towardszeroshotknowledgedistillationfornaturallanguageprocessing/images.zip b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..4089a3883c0a927e1d0d9010c9b6db5ba3724fba
--- /dev/null
+++ b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:94980c43a834d50efc62a16f7c4e5f332f09ca143177885968d2c26c972206da
+size 374092
diff --git a/towardszeroshotknowledgedistillationfornaturallanguageprocessing/layout.json b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..acecab5e715f08171559f5098d828cd91f40b977
--- /dev/null
+++ b/towardszeroshotknowledgedistillationfornaturallanguageprocessing/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d0b631ae1d88531ce01f6856a520b05e86444dc05ab87d60c8fafaae42de150
+size 353854
diff --git a/transductivelearningforunsupervisedtextstyletransfer/8562cc16-15ab-42b1-b06e-a48158fe311e_content_list.json b/transductivelearningforunsupervisedtextstyletransfer/8562cc16-15ab-42b1-b06e-a48158fe311e_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..0d74ab87083e39d3692a0121c2a678cadd223128
--- /dev/null
+++ b/transductivelearningforunsupervisedtextstyletransfer/8562cc16-15ab-42b1-b06e-a48158fe311e_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:de79225569ff233aece34b091bc620769719d92b0e76896b377c504f82913dc7
+size 86692
diff --git a/transductivelearningforunsupervisedtextstyletransfer/8562cc16-15ab-42b1-b06e-a48158fe311e_model.json b/transductivelearningforunsupervisedtextstyletransfer/8562cc16-15ab-42b1-b06e-a48158fe311e_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..0dee8af8744d1a1c0c6d918aac8803b1e27d0394
--- /dev/null
+++ b/transductivelearningforunsupervisedtextstyletransfer/8562cc16-15ab-42b1-b06e-a48158fe311e_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1e925a58b70f9c2d3b868aa33abb7674b5d5419608e97f3a3407b3d060877e36
+size 103597
diff --git a/transductivelearningforunsupervisedtextstyletransfer/8562cc16-15ab-42b1-b06e-a48158fe311e_origin.pdf b/transductivelearningforunsupervisedtextstyletransfer/8562cc16-15ab-42b1-b06e-a48158fe311e_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..238f540da224c431cd2f7efe5a78055c637e0536
--- /dev/null
+++ b/transductivelearningforunsupervisedtextstyletransfer/8562cc16-15ab-42b1-b06e-a48158fe311e_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0fc0f30337a70c1cc44483931fc17671b2b7ff01efb5e0c80a6fcfd1e75bc852
+size 1141406
diff --git a/transductivelearningforunsupervisedtextstyletransfer/full.md b/transductivelearningforunsupervisedtextstyletransfer/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..57d69eb064204c76de33cecff39c8f7aae50d426
--- /dev/null
+++ b/transductivelearningforunsupervisedtextstyletransfer/full.md
@@ -0,0 +1,363 @@
+# Transductive Learning for Unsupervised Text Style Transfer
+
+Fei Xiao $^{1,4}$ , Liang Pang $^{1*}$ , Yanyan Lan $^{3*}$ , Yan Wang $^{5}$ , Huawei Shen $^{1,4}$ , Xueqi Cheng $^{2,4}$
+
+1Data Intelligence System Research Center
+
+and $^2$ CAS Key Lab of Network Data Science and Technology,
+
+Institute of Computing Technology, Chinese Academy of Sciences
+
+$^{3}$ Institute for AI Industry Research, Tsinghua University
+
+4University of Chinese Academy of Sciences 5Tencent AI Lab
+
+{xiaofei19s, pangliang, shenhuawei, cxq}@ict.ac.cn
+
+lanyanyan@tsinghua.edu.cn, brandenwang@tencent.com
+
+# Abstract
+
+Unsupervised style transfer models are mainly based on an inductive learning approach, which represents the style as embeddings, decoder parameters, or discriminator parameters and directly applies these general rules to the test cases. However, the lacking of parallel corpus hinders the ability of these inductive learning methods on this task. As a result, it is likely to cause severe inconsistent style expressions, like the salad is rude. To tackle this problem, we propose a novel transductive learning approach in this paper, based on a retrieval-based context-aware style representation. Specifically, an attentional encoder-decoder with a retriever framework is utilized. It involves top-K relevant sentences in the target style in the transfer process. In this way, we can learn a context-aware style embedding to alleviate the above inconsistency problem. In this paper, both sparse (BM25) and dense retrieval functions (MIPS) are used, and two objective functions are designed to facilitate joint learning. Experimental results show that our method outperforms several strong baselines. The proposed transductive learning approach is general and effective to the task of unsupervised style transfer, and we will apply it to the other two typical methods in the future.
+
+# 1 Introduction
+
+Text style transfer is an essential topic of natural language generation, which is widely used in many tasks such as sentiment transfer (Hu et al., 2017; Shen et al., 2017), dialogue generation (Zhou et al., 2018; Niu and Bansal, 2018; Su et al., 2021), and text formalization (Jain et al., 2019). The target is to change the style of the text while retaining style-independent content. As it is usually hard to obtain large parallel corpora with the same content
+
+
+Figure 1: Illustration of the inconsistency problem and the idea of our transductive learning approach.
+
+and different styles, unsupervised text style transfer becomes a hot yet challenging research topic in recent years.
+
+Most existing methods in this area try to find the general style transfer rules with an inductive learning paradigm, where style is represented as a specific form, e.g., embeddings, decoder parameters, or classifier parameters. For example, embedding based methods (Shen et al., 2017; Lample et al., 2019; John et al., 2019; Dai et al., 2019; Yi et al., 2020; He et al., 2020) utilize a highly generalized style embedding to replace the original sentence style and direct the generation process. Decoder based methods (Prabhumoye et al., 2018; Fu et al., 2018; Luo et al., 2019; Gong et al., 2019; Krishna et al., 2020) use multiple decoders for generation, where each encoder corresponds to an independent style. Classifier based methods (Wang et al., 2019; Liu et al., 2020; Mai et al., 2020) employ the gradient of a pre-trained style classifier to edit the latent representation of the target text.
+
+It has been well accepted that inductive learning methods have the ability to work well when there are numerous supervised labels. However, in the case of unsupervised style transfer, we are just given corpora with different styles without knowing the parallel relation, i.e. supervision label for this
+
+task. As a result, the inductive learning methods fail to produce an accurate style transfer rule, leading to generating some severe inconsistent texts, such as 'the salad is rude', as shown in Figure 1. The underlying reason for this phenomenon is that a perfect style is usually highly dependent on the context, e.g. 'terrible' for 'the salad' and 'rude' for 'a person'. Without a large scale of parallel data, it is difficult to learn a general style transfer rule working for various contexts.
+
+Inspired by the idea of transductive learning (Vapnik, 1998) and some successful historical examples, such as Transductive SVM (Joachims et al., 1999), we propose to introduce transductive learning to the area of unsupervised text style transfer. Specifically, transduction learning reasoning from specific cases to specific cases, which avoids learning a general rule to represent the style. For example, once we get a reference sentence 'the sandwiches are terrible' with negative emotion, a transductive learning method may connect the two sentences by the two kinds of food, e.g. 'salad' and 'sandwiches', then use 'terrible' to express the negative emotion for the food 'salad'.
+
+From the above discussion, we can see that there are two challenges in applying transductive learning to unsupervised text style transfer: 1) how to find specific samples that are beneficial for the style transfer of the current text; 2) how to use the style expressions in these samples to complete the style transfer process. To tackle these two challenges, we propose a novel TranSductive Style Transfer (TSST) model. In TSST, a retriever is employed to obtain the required similar samples, which tackles the first challenge. An attention-based encoder-decoder framework is then utilized to combine the specific samples to tackle the second challenge. Specifically, TSST first encodes the original text to a contextual representation and a style-independent embedding. Then either sparse (BM25) or dense retrieval functions (MIPS) are used to find the top- $K$ samples in the target style corpus, which are encoded by the same encoder. After that, a recurrent decoder is utilized to generate transfer text word by word based on the representation of those retrieved samples, contextual representation, and the representations in the last step. To jointly learn the dense retriever, encoder, and decoder, two kinds of objective functions are used in this paper, i.e. retrieval loss and bag-of-words loss.
+
+In summary, our contributions are as follows:
+
+- Facing the inconsistency problem in unsupervised style transfer, we propose a novel transductive learning approach, which avoids learning a general rule but relies on specific samples to complete the style transfer process.
+
+- We design a TranSductive Style Transfer (TSST) model, which employs a retriever to involve highly related samples to guide the learning of the target style.
+
+- Experiments on two benchmark datasets show that TSST alleviates the inconsistency problem and achieves competitive results against traditional baselines. Our code is available at https://github.com/xiaofei05/TSST.
+
+# 2 Related Work
+
+Previous unsupervised text style transfer methods can be divided into three categories according to the way they control the text style, e.g. embedding based method, decoder based method, and classifier based method.
+
+The embedding based methods assign a separated embedding for each style to control the style of generated text. Early work tries to disentangle the content and style in the text. They first implicitly eliminate the original style information from the text representation using adversarial training (Shen et al., 2017; Fu et al., 2018; John et al., 2019) or explicitly delete style-related words (Li et al., 2018; Sudhakar et al., 2019; Wu et al., 2019b; Malmi et al., 2020). Then, decode or rewrite the style-independent content with the target style embedding. As a complete disentanglement is unreachable and damaged the fluency of the text, recent approaches (Lample et al., 2019; Dai et al., 2019; Yi et al., 2020; Zhou et al., 2020; He et al., 2020) directly feed original text representation and a separated learned style embedding to a stronger generator, e.g., the attention-based sequence-to-sequence model or Transformer to obtain the style transferred text.
+
+The decoder based methods build a decoder for each style or transfer direction, where the style is implicitly represented as the parameters in the corresponding decoder. The former schema built an independent decoder for each style, which first disentangled the style-irrelevant content from the text and then applied the corresponding decoder to
+
+generate sentences with the target style (Fu et al., 2018; Xu et al., 2018; Prabhumoye et al., 2018; Krishna et al., 2020). The latter built for each transfer direction, which often regarded style transfer as a translation task (Zhang et al., 2018; Gong et al., 2019; Luo et al., 2019; Jin et al., 2019; Wu et al., 2019a; Li et al., 2020). This paradigm reduced the complexity of the learning of style to a certain extent but consumed more resources. It is worth mentioning that the boundaries of embedding controlled and decoder controlled methods are sometimes not very clear, and many studies (Fu et al., 2018; He et al., 2020) consider that they are alternative.
+
+The classifier based methods convert the style by manipulating the latent representation of the text according to a pre-trained classifier. Wang et al. (2019) and Liu et al. (2020) mapped the input sentence into a latent representation, and trained classifiers on this latent space. The latent representation would be edited based on the gradients of the classifier until the predicted style changed; after that, the decoder took the modified representation to generate the desired style sentence. Mai et al. (2020) further expanded this framework to a plug and play scene. Although it has remarkable style accuracy, this method can hardly guarantee content preservation due to the concrete output sharply changes with the latent representation.
+
+We can see that all of these existing methods belong to the inductive learning approach, because they aim to learn a general style transfer rule from the training data, and then apply the rule to the test cases. Due to the lack of parallel corpus for supervision, this inductive learning approach fails to learn an accurate style representation application for various contexts, and may cause some severe inconsistency problems as illustrated before.
+
+# 3 Transductive Style Transfer
+
+Firstly, we introduce some notations. Consider the unsupervised text style transfer task with $M$ styles, its training set is composed of $M$ single-style subsets $\{D_i\}_{i=1}^M$ . For an arbitrary input text $x$ in a subset and the target style $s_j$ , the goal of text style transfer is to generate a new sentence $y$ which represents the style $s_j$ while keeping the style-independent content of $x$ as much as possible.
+
+To tackle the aforementioned inconsistency problem, we propose to utilize transductive learning to obtain a context-aware style representation for the
+
+style transfer process. Specifically, our proposed transductive style transfer(TSST) model consists of three modules, encoder, retriever, and decoder, as described in Figure 2.
+
+# 3.1 Encoder
+
+The goal of the encoder is to map the input sentence into hidden representations, to facilitate the following retrieval and generation process. Given the input sentence $x = (w_{1}, w_{2}, \ldots, w_{n})$ , the output of the encoder is a sequence of hidden states,
+
+$$
+\boldsymbol {H} ^ {\text {e n c}} = \operatorname {E n c o d e r} (x), \tag {1}
+$$
+
+where $\pmb{H}^{enc} = [h_1^{enc}, h_2^{enc}, \dots, h_n^{enc}]^{\mathrm{T}} \in \mathbb{R}^{n \times d}$ and $d$ is the dimension of the hidden state. Please note that the encoder in our model is very general, and different encoding techniques can be used. Specially, we employ a bidirectional LSTM in our experiments.
+
+# 3.2 Retriever
+
+The retriever module is introduced to involve the top- $K$ relevant texts in the target style training subset, to facilitate the transductive learning process. In this paper, we adopt both sparse and dense retrieval functions in the retriever.
+
+Sparse Retriever (BM25) BM25 (Robertson and Zaragoza, 2009) is the most famous sparse retrieval function, which has been widely used in information retrieval.
+
+$$
+\operatorname {B M 2 5} (\boldsymbol {q}, \boldsymbol {d}) = \sum_ {w \in \boldsymbol {q}} \frac {\operatorname {I D F} (w) \cdot f (w , \boldsymbol {d}) \cdot \left(k _ {1} + 1\right)}{f (w , \boldsymbol {d}) + k _ {1} \cdot \left(1 - b + \frac {b \cdot | \boldsymbol {d} |}{\operatorname {a v g d l}}\right)} \tag {2}
+$$
+
+where $k_{1}$ and $b$ are the hyper parameters, $f(w,\mathbf{d})$ represents term frequency of $w$ in document $\mathbf{d}$ , $\mathrm{IDF}(w)$ represents inverse document frequency of $w$ , $|\mathbf{d}|$ denotes the document length and avgdl denotes the averaged document length.
+
+After that, the retrieved $K$ texts $\{u_i\}_{i=1}^K$ are mapped to latent representations $\pmb{U} = [u_1, u_2, \dots, u_K]^{\mathrm{T}} \in \mathbb{R}^{K \times d}$ by the above encoder, where $\pmb{u}_i$ is the final hidden states for $u_i$ .
+
+Dense Retriever (MIPS) A term-based sparse retrieval would have difficulty retrieving such a semantic context, which is essential for style transfer. Recently, dense retrieval methods and their efficient implementation of maximum inner product search (MIPS) (Shrivastava and Li, 2014; Guo et al., 2016; Cai et al., 2021) have been proposed to capture the semantic. For a dense retriever, style-independent
+
+
+Figure 2: Illustration of our TSST model for binary style transfer as an example.
+
+text embedding is crucial because we rely on this embedding to find similar samples in a different style subset. To this end, the style-independent embedding $\pmb{q}(x)$ of the text $x$ can be represented as a linear combination of the hidden states $h_i^{enc}$ :
+
+$$
+\boldsymbol {q} (x) = \operatorname {S o f t m a x} \left(\left[ \alpha \left(w _ {1}\right), \dots , \alpha \left(w _ {n}\right) \right]\right) \cdot \boldsymbol {H} ^ {\text {e n c}}, \tag {3}
+$$
+
+where the parameter $\alpha(w_i)$ is the weight for each word $w_i$ . They are initialized as $\alpha(w_i) = 1 - \sum_j |f_{s_j}(w_i) - 1 / M|$ , where $f_{s_j}(w_i)$ is defined as the count of $w_i$ in the subset of style $s_j$ across its total count in the whole dataset. This initialization assigns a small weight to the discriminative words for each style, whose frequencies in different style subsets vary significantly. Consequently, the embeddings will focus on style-independent words, and help learn the style-independent embeddings.
+
+Based on the text embeddings, the dense retrieval approach is used to retrieve the top- $K$ similar sentences in the target style training subset, where the cosine similarity function is used to measure the similarity. Note that computing text embeddings in the whole training set are time-consuming, so we pre-compute the text embeddings at the beginning and update them after certain training iterations, as inspired by Guu et al. (2020).
+
+After that, the same encoder is employed to obtain the latent representations of the top- $K$ texts, i.e. $\boldsymbol{U} = [u_1, u_2, \ldots, u_K]^{\mathrm{T}}$ , as did in the sparse retriever.
+
+# 3.3 Decoder
+
+The decoder is used to generate the transferred text word by word. For each step, the inputs of the decoder are composed of three parts: 1) output of the previous step $\hat{y}_{t - 1}$ , 2) hidden states of $x$ , i.e. $c_{t}^{h}$ , and 3) latent representations of retrieved samples, i.e. $c_{t}^{u}$ . The generated text $\hat{y} = \{\hat{y}_1,\hat{y}_2,\dots ,\hat{y}_m\}$ , is obtained by the following equations:
+
+$$
+\boldsymbol {h} _ {t} ^ {\text {d e c}} = \operatorname {D e c o d e r} \left(\hat {y} _ {t - 1}, \boldsymbol {c} _ {t} ^ {h}, \boldsymbol {c} _ {t} ^ {u}\right), \tag {4}
+$$
+
+$$
+\mathrm {P} (\hat {y} _ {t} | \hat {y} _ {< t}, \boldsymbol {H} ^ {e n c}, \boldsymbol {U}; \boldsymbol {\theta}) = \mathrm {s o f t m a x} (\boldsymbol {o} _ {\hat {y} _ {t}} \boldsymbol {h} _ {t} ^ {d e c}),
+$$
+
+where $o_{\hat{y}_t}$ is the parameters to obtain the predicted probability on the word $\hat{y}_t$ , and $c_t^h, c_t^u$ indicates the attended input sentence and retrieved samples, respectively. $c_t^h$ and $c_t^u$ are calculated by two attention modules with different parameters:
+
+$$
+\boldsymbol {c} _ {t} ^ {h} = \operatorname {A t t e n t i o n} \left(\boldsymbol {h} _ {t - 1} ^ {\text {d e c}}, \boldsymbol {H} ^ {\text {e n c}}\right), \tag {5}
+$$
+
+$$
+\boldsymbol {c} _ {t} ^ {u} = \operatorname {A t t e n t i o n} \left(\boldsymbol {h} _ {t - 1} ^ {d e c} \boldsymbol {W} _ {h}, \boldsymbol {U} \boldsymbol {W} _ {u}\right),
+$$
+
+where $\pmb{W}_h\in \mathbb{R}^{d_{dec}\times d_{dec}}$ $W_{u}\in \mathbb{R}^{d\times d}$ and $d_{dec}$ is the dimension of the decoder's hidden state. The attention module is standard (Bahdanau et al., 2015).
+
+$$
+\operatorname {A t t e n t i o n} (\boldsymbol {h}, \boldsymbol {H}) = \sum_ {j = 1} ^ {n} \frac {\exp \left(e _ {i j}\right) \boldsymbol {H} _ {j}}{\sum_ {k = 1} ^ {n} \exp \left(e _ {i k}\right)}, \tag {6}
+$$
+
+$$
+e _ {i j} = \boldsymbol {v} ^ {T} \tanh (\boldsymbol {W} _ {d} \boldsymbol {h} + \boldsymbol {W} _ {e} \boldsymbol {H} _ {j}),
+$$
+
+where $\pmb{v}$ , $\pmb{W}_e$ , $\pmb{W}_d$ are parameters.
+
+Similar to the encoder, various decoding techniques could be used in this step, and we adopt LSTM in our experiments.
+
+# 3.4 Learning Objectives
+
+Except for the three widely used losses in previous style transfer works, i.e. the reconstruction loss, the cycle reconstruction loss, and the adversarial style loss, we also introduce two more losses related to the retriever, i.e. the retrieval loss and the Bag-of-Word loss. Therefore, for a given input $x$ , its style $s_i$ and the target style $s_j$ , the learning objective function can be represented as:
+
+$$
+\mathcal {L} = \mathcal {L} _ {r e c} + \mathcal {L} _ {c y c} + \mathcal {L} _ {a d v} + \mathcal {L} _ {r e t} + \mathcal {L} _ {b o w}, \tag {7}
+$$
+
+where $\mathcal{L}_{rec},\mathcal{L}_{cyc},\mathcal{L}_{adv},\mathcal{L}_{ret}$ and $\mathcal{L}_{bow}$ denote the reconstruction loss, the cycle reconstruction loss, the adversarial style loss, the retrieval loss, and the bag-of-words loss, respectively.
+
+Reconstruction Loss According to previous works (Shen et al., 2017; Fu et al., 2018; John et al., 2019), this loss is used to capture the informative features for reconstructing itself:
+
+$$
+\mathcal {L} _ {r e c} = - \log P (x | x, s _ {i}). \tag {8}
+$$
+
+Cycle Reconstruction Loss Cycle consistency is usually included in the loss to improve the preservation of content (Lample et al., 2019; Dai et al., 2019; Yi et al., 2020). For the generated $\hat{y}$ , the output of transferring back to the source style should be consistent with $x$ as much as possible:
+
+$$
+\mathcal {L} _ {c y c} = - \log P (x | \hat {y}, s _ {i}), \quad \hat {y} = G (x, s _ {j}), \tag {9}
+$$
+
+where $G$ is our TSST model.
+
+Adversarial Style Loss If we only use the reconstruction and cycle construction losses, the model merely learns to copy the input to the output. So we employ adversarial training to build style supervision. Specifically, we utilize a classifier with $M + 1$ classes as the discriminator $C$ , similar to Dai et al. (2019) and Yi et al. (2020). The first $M$ classes represent the real texts in the datasets, and the $(M + 1)$ -th class indicates generated fake texts. Since the generated text $\hat{y}$ is expected to be classified as the target style $s_j$ , the adversarial style loss is defined as follows, and the negative gradient of the discriminator is employed to update the model.
+
+$$
+\mathcal {L} _ {a d v} = - \log P _ {C} (j | \hat {y}), \tag {10}
+$$
+
+As for the discriminator $C$ , a loss function $\mathcal{L}_{C_1}$ is usually used in previous works Dai et al. (2019) and Yi et al. (2020). In this paper, we also ask the
+
+discriminator to identify the style of the retrieved samples. Therefore, the loss function in our work can be written as:
+
+$$
+\begin{array}{l} \mathcal {L} _ {C} = \mathcal {L} _ {C 1} + \mathcal {L} _ {C 2}, \\ \begin{array}{r l} \mathcal {L} _ {C 1} = & - [ \log P _ {C} (i | x) + \log P _ {C} (i | G (x, s _ {i})) \\ & + \log P _ {C} (M + 1 | \hat {y}) ], \end{array} \tag {11} \\ \end{array}
+$$
+
+$$
+\mathcal {L} _ {C 2} = - \left[ \log P _ {C} (j | Y ^ {x \rightarrow \hat {y}}) + \log P _ {C} (i | Y ^ {\hat {y} \rightarrow x}) \right],
+$$
+
+where $Y^{x \to \hat{y}}$ and $Y^{\hat{y} \to x}$ denotes the retrieved samples in the transfer process from $x$ to $\hat{y}$ and from $\hat{y}$ to $x$ , respectively.
+
+To jointly learn the dense retriever with the other parameters and the target style representation from the retrieved samples, we introduce two additional losses to our objective.
+
+Retrieval Loss The retrieval loss is designed to capture the similarity between the style-independent embeddings of the input sentence and the corresponding transferred sentence:
+
+$$
+\mathcal {L} _ {\text {r e t}} = 1 - \cos (\boldsymbol {q} (x), \boldsymbol {q} (\hat {y})). \tag {12}
+$$
+
+Bag-of-Words Loss This loss is proposed to encourage the generator to select some new words from the retrieved sentences, making our model pay more attention to the retrieved samples. In this way, the style representation in the target sentence will be well adapted to the context. Let $\Omega$ denote a set of new words that appear in the retrieved samples other than the input sentence $x$ , and the bag-of-words loss is defined as:
+
+$$
+\mathcal {L} _ {b o w} = \frac {1}{2} (\mathcal {L} _ {b o w} ^ {x \rightarrow \hat {y}} + \mathcal {L} _ {b o w} ^ {\hat {y} \rightarrow x}),
+$$
+
+$$
+\mathcal {L} _ {b o w} ^ {x \rightarrow \hat {y}} = \frac {1}{\| \Omega \|} \sum_ {i = 1} ^ {\| \hat {y} \|} \sum_ {w \in \Omega} \log p _ {\hat {y} _ {i}} (w), \tag {13}
+$$
+
+$$
+\mathcal {L} _ {b o w} ^ {\hat {y} \rightarrow x} = \frac {1}{\| \Omega^ {\prime} \|} \sum_ {i = 1} ^ {\| x \|} \sum_ {w \in \Omega^ {\prime}} \log p _ {x _ {i}} (w).
+$$
+
+Note that the Bag-of-Words loss is applied to both directions in the cycle reconstruction process.
+
+# 3.5 Discussion
+
+Please note that there are also some other works to involve a retrieval module to enhance the unsupervised style transfer, e.g. Li et al. (2018); Sudhakar et al. (2019); Jin et al. (2019). The differences between our TSSM and these works are listed as follows. 1) Our TSST model uses the retrieved samples to directly control the style, instead of using them as an external knowledge or pseudoparallel corpus. 2) The retrieval module in our
+
+| Dataset | Styles | Train | Dev | Test |
| Yelp | Positive | 266,041 | 2,000 | 500 |
| Negative | 177,218 | 2,000 | 500 |
| GYAFC | Formal | 51,967 | 2,247 | 1,019 |
| Informal | 51,967 | 2,788 | 1,332 |
+
+Table 1: Statistics of Yelp and GYAFC datasets.
+
+TSST can be trained in an end-to-end way (together with the encoder and decoder), to improve the style-independent text retrieval. 3) The retrieved samples influence the decoder word by word. In this way, the information of the retrieved samples will be fully exploited to learn a good context-aware style representation. It may bring no benefit if we just use the retrieved samples without these modifications, as shown in Sudhakar et al. (2019).
+
+# 4 Experiment
+
+In this section, we conduct experiments to study how well and why the proposed TSST model alleviates the inconsistency problem. Furthermore, a detailed ablation study is demonstrated to show each objective function's contribution to the overall performance.
+
+# 4.1 Datasets
+
+The experiments are conducted on two well-known transfer tasks, sentiment transfer and formality transfer. The statistics of each datasets are shown in Table 1.
+
+Yelp Dataset1 is widely used as the benchmark for sentiment transfer. It is collected from restaurant and business reviews, with each text marked as positive or negative. The same pre-processing as (Li et al., 2018) is used in our experiment, and human references are also provided for the test set.
+
+GYAFC $Daset^2$ denotes the Grammarly's Yahoo Answers Formality Corpus released by Rao and Tetreault (2018), a typical benchmark for formality transfer. The GYAFC dataset contains formal and informal sentences in two different domains, Entertainment & Music and Family & Relationships. In this paper, we use the latter one because it is more popular in this area.
+
+# 4.2 Setups
+
+Our baselines cover three different kinds of inductive learning approaches, as described in Section 2. For the embedding based method, we choose
+
+CrossAlign (Shen et al., 2017), StyTrans (Dai et al., 2019), PFST (He et al., 2020) and StyIns (Yi et al., 2020). For the generator based method, MultiDecoder (Fu et al., 2018) and DualRL (Luo et al., 2019) are selected for comparisons. Then, Revision (Liu et al., 2020) is considered as the representative of the discriminator based methods. At last, we also compare our model with previous methods involved in retrieval, DRG (Li et al., 2018), IMaT (Jin et al., 2019), B-GST and G-GST (Sudhakar et al., 2019). All baselines (including generated results) are directly taken or implemented from their public source codes, so the detailed settings are omitted in our paper.
+
+For our proposed TSST model, we employ the LSTM as our encoder and decoder to ensure the fairness of the experiment compared with previous methods. Following Yi et al. (2020), we pre-train a forward LSTM language model in each dataset and use its parameters to initialize our encoder and decoder. Similar to Yi et al. (2020), the discriminator is a CNN-based classifier with Spectral Normalization (Miyato et al., 2018), with the same word embeddings as the encoder. The word embedding size, hidden state size, and the number of retrieved samples $K$ are set to 256, 512, and 5, respectively. We exclude the trivial candidates the same as the input sentence in the retriever. The embeddings of all sentences for dense retrieval are updated every 200 steps. To demonstrate the effectiveness of the sparse and dense retrievers, we compare them with a random sampling retriever, and the corresponding TSST model is denoted as TSST-random.
+
+# 4.3 Evaluation Metrics
+
+Previous works mainly focus on evaluating the style transfer methods from the following three aspects, i.e. style transfer accuracy, content preservation, and sentence fluency. Consequently, different automatic evaluation measures such as accuracy, self-BLEU, ref-BLEU, and perplexity(PPL) are also used in the evaluation. However, all of these metrics cannot well evaluate how well a model alleviates the consistency problem, as we introduced before. So we introduce an additional human evaluation in our experiment.
+
+Automatic Evaluation To evaluate the style transfer accuracy, we first finetune a pre-trained BERT-based (Devlin et al., 2019) classifier on each dataset. The two classifiers achieve $98.6\%$ and $89.9\%$ accuracy on the test set of Yelp and GYAFC,
+
+| Model | Yelp | GYAFC |
| Acc↑ | s-BLEU↑ | r-BLEU↑ | PPL↓ | GM↑ | Acc↑ | s-BLEU↑ | r-BLEU↑ | PPL↓ | GM↑ |
| CrossAlign (Shen et al., 2017) | 78.7 | 16.65 | 8.11 | 66 | 7.09 | 61.6 | 2.21 | 3.25 | 37 | 3.32 |
| DRG (Li et al., 2018) | 88.1 | 36.75 | 16.66 | 100 | 10.4 | 58.2 | 31.57 | 21.88 | 103 | 9.65 |
| MultiDec (Fu et al., 2018) | 45.4 | 40.07 | 15.07 | 188 | 8.51 | 24.5 | 16.08 | 11.95 | 151 | 5.54 |
| B-GST (Sudhakar et al., 2019) | 82.4 | 30.82 | 16.32 | 156 | 9.52 | - | - | - | - | - |
| G-GST (Sudhakar et al., 2019) | 61.1 | 45.72 | 22.08 | 257 | 10.27 | - | - | - | - | - |
| DualRL (Luo et al., 2019) | 87.9 | 58.90 | 28.77 | 105 | 13.37 | 55.5 | 52.80 | 43.69 | 159 | 12.61 |
| StyTrans (Dai et al., 2019) | 86.0 | 59.46 | 27.32 | 154 | 12.90 | 60.3 | 61.15 | 43.95 | 168 | 13.33 |
| IMaT (Jin et al., 2019) | 93.9 | 16.92 | 11.26 | 14 | 9.08 | - | - | - | - | - |
| Revision (Liu et al., 2020) | 90.6 | 13.23 | 7.93 | 21 | 7.45 | 39.6 | 27.64 | 20.83 | 66 | 8.59 |
| PFST (He et al., 2020) | 84.6 | 48.90 | 23.72 | 67 | 12.35 | 63.9 | 28.68 | 21.53 | 40 | 10.17 |
| StyIns (Yi et al., 2020) | 90.9 | 53.10 | 26.09 | 110 | 12.80 | 69.9 | 61.87 | 47.80 | 140 | 14.32 |
| TSST-random | 88.8 | 59.64 | 28.44 | 117 | 13.34 | 76.5 | 62.84 | 50.13 | 108 | 15.06 |
| TSST-sparse | 90.7 | 59.03 | 28.71 | 108 | 13.46 | 75.3 | 64.03 | 50.39 | 101 | 15.15 |
| TSST-dense | 91.8 | 59.34 | 28.89 | 108 | 13.54 | 74.1 | 63.70 | 50.49 | 103 | 15.06 |
+
+Table 2: Automatic evaluation results on Yelp and GYAFC dataset. Acc denotes the accuracy of generated samples judged by the pre-trained classifier. s-BLEU and r-BLEU stands for self-BLEU and ref-BLEU, respectively. Bold denotes the best value in terms of each metric.
+
+| Model | Yelp | GYAFC |
| Sty | Cont | Flu | Cons | Sty | Cont | Flu | Cons |
| DualRL | 3.70 | 4.34 | 4.29 | 1.38 | 1.84 | 2.92 | 3.11 | 0.37 |
| StyTrans | 2.98 | 4.18 | 3.54 | 1.04 | 2.43 | 3.27 | 3.53 | 0.49 |
| PFST | 3.21 | 3.69 | 4.18 | 1.26 | 1.97 | 2.28 | 3.41 | 0.31 |
| StyIns | 3.43 | 4.12 | 3.82 | 1.27 | 1.36 | 1.62 | 2.21 | 0.11 |
| TSST-random | 3.64 | 4.34 | 3.84 | 0.99 | 2.84 | 3.55 | 3.59 | 0.51 |
| TSST-sparse | 3.52 | 4.42 | 4.02 | 1.33 | 2.74 | 3.48 | 3.67 | 0.75 |
| TSST-dense | 3.85 | 4.40 | 4.09 | 1.46 | 2.70 | 3.59 | 3.69 | 0.74 |
+
+Table 3: Human evaluation results on Yelp and GYAFC dataset. The Krippendorff's alpha of human rating on two datasets is 0.76 and 0.73, respectively, indicating acceptable inter-annotator agreement.
+
+respectively. Then these classifiers are used to predict the style label of the generated transferred sentences, and the classification accuracy acts as the style transfer accuracy. Both self-BLEU and ref-BLEU are used for content preservation evaluations. The former is the BLEU score between transferred sentences and source sentences, while the latter is between transferred sentences and human references. Following Dai et al. (2019) and Yi et al. (2020), we train a 5-gram language model KenLM (Heafield, 2011) for each style to measure the lanuaguage fluency by the perplexity (PPL) of transferred sentence. In addition, we report the geometric mean (GM) of Acc, self-BLEU, ref-BLEU and $\frac{1}{\log\mathrm{PPL}}$ as the overall performance.
+
+Human Evaluation We recruit three annotators who have high-level language skills for human evaluation. We choose four models with the highest GM scores and three types of TSST models in this experiment. Following previous works (Dai et al., 2019; Yi et al., 2020; Liu et al., 2020), we randomly selected 100 generated sentences (50 for each style) in the test set and the annotators are required to score sentences from 1 to 5, in terms of each aspect, i.e. style transfer accuracy (Sty),
+
+content preservation (Cont), and sentence fluency (Flu), where 1 is the lowest and 5 is the highest. In addition, they need to evaluate the consistency of the style words and other contexts in each generated sentence. To make it more clear, consistency (Cons) focuses on judging whether the modified parts are consistent with the retained content, while the fluency only focuses on the grammatical errors. The consistency is rated from 0 to 2, where 0, 1, and 2 stands for inconsistent, unsure, and consistent, respectively.
+
+# 4.4 Experimental Results
+
+Automatic Evaluation As listed in Table 2, we can see that our transductive learning models significantly improve the overall performance on both datasets, as compared with the inductive learning baselines. As for the four specific evaluation measures, our model achieves better results in terms of three of them, i.e. Acc for style transfer accuracy, s-BLEU, and r-BLEU for content preservation, and all our models are able to generate sentences with relatively low perplexity. Though previous models achieve the best on a single metric, a significant drawback can be found on another metric. For the TSST-random, although target-style relevant words in the random samples are not consistent with the input content, the few modifications and the use of target-style strong relevant words will still make the random baseline achieve the high automatic metrics. Thus we need human evaluation.
+
+Human Evaluation Results are shown in Table 3. Firstly, the comparison results are consistent with the automatic evaluation results in terms of both style accuracy, content preservation, and
+
+| Model | Negative to Positive | Positive to Negative |
| input | it's just too expensive for what you get. | mustard beef ribs are a must. |
| DualRL | it's just fun for what you get. | mustard beef ribs are a mess. |
| StyTrans | it's just too expensive for what you get. | mustard beef ribs are a negative. |
| StyIns | it's just very fun for what you get. | mustard beef ribs were a total. |
| PFST | it's just right for what you get. | gross. |
| Revision | it's too expensive for what you get and it's always good. | the beef ribs are a must do not have a BBQ beef. |
| TSST-dense | it's just really reasonable for what you get. | mustard beef ribs are a joke. |
| u1 - the price is reasonable for what you get. | u1 - garlic mashed potatoes were a joke. |
| u2 - prices are very reasonable for what you get. | u2 - all olive gardens are a joke. |
| Retrieved Samples | u3 - prices are reasonable for the quality of what you get. | u3 - the ribs are over cooked. |
| u4 - good food, a little expensive for what you get. | u4 - our food was barely edible. |
| u5 - definitely a good price for what you get. | u5 - cold grits are n't a treat. |
+
+fluency, indicating the reliability of our human evaluation. More importantly, our TSST-sparse and TSST-dense models achieve the highest consistency score, as compared to other baselines, showing the superiority of our transductive learning approach in tackling the inconsistency problem. In contrast, the consistency will become worse if the retrieved samples are not related to the input, as shown in TSST-random, which further demonstrate the soundness of our approach. Comparing TSST-sparse and TSST-dense, we can see that joint learning retriever yields better consistency results, which is accordant with previous studies.
+
+Case Study To better understand what transductive learning bring to text style transfer task, Table 4 shows some transferred examples from the Yelp test set. For the first example to transfer from negative to positive, DualRL and StyIns are able to capture the style transfer but with inappropriate expressions, e.g. 'fun' or 'very fun'. StyTrans and Revision fail to do the style transfer, either just copy or use negative expressions. Our TSST-dense model produces perfect results by using 'reasonable' as the transferred style expression, learned from the retrieved examples, as shown in the table. Similar results are observed for the second example to transfer positive to negative. More importantly, although there is no retrieved examples containing exactly the same phrase 'mustard beef ribs', our model still captures the negative pattern like '[food] is a joke' to complete the style transfer process.
+
+Ablation Study To study the role of each loss function in the objective function, we remove them one at a time and train the model from scratch. Due to the high cost of the human evaluation, we only report the automatic results on the Yelp dataset, as shown in Table 5. We can see that each loss contributes to the performance of the model, and their combination performs the best.
+
+Table 4: Case Study. Red denotes positive expressions, blue denotes negative expressions, and bold denotes the expression taken from retrieved samples.
+
+| Model | Acc↑ | s-BLEU↑ | r-BLEU↑ | PPL↓ | GM↑ |
| TSST-dense | 91.8 | 59.34 | 28.89 | 108 | 13.54 |
| - Lrec | 52.7 | 0.40 | 0.37 | N/A | 1.01 |
| - Ladv | 81.3 | 18.96 | 8.48 | N/A | 6.67 |
| - Lcyc | 89.0 | 52.07 | 24.71 | 134 | 12.37 |
| - Lret | 89.6 | 59.36 | 28.65 | 110 | 13.42 |
| - Lbow | 89.3 | 55.26 | 26.43 | 121 | 12.84 |
| - LC1 | 95.6 | 7.6 | 3.9 | N/A | 4.47 |
| - LC2 | 87.4 | 61.41 | 28.58 | 112 | 13.43 |
+
+Table 5: Ablation study on the Yelp dataset, where ‘-’ means removing one of the loss terms in the objective functions, and N/A is a very large value.
+
+
+Figure 3: The influence of the number of retrieved samples $K$ on the Yelp dataset.
+
+We also conduct experiments to explore the influence of different numbers of retrieved samples, as shown in Figure 3. Specifically, we test four different values, i.e. $K = 1, 3, 5, 10$ . We can see that the overall performance of the model gradually increases with the increase of $K$ , and become stable for 3, 5, and 10. For the sake of both effectiveness and efficiency, we set $K = 5$ in our experiments.
+
+# 5 Conclusions and Future Work
+
+Previous style transfer models are mainly based on inductive learning approach, thus suffer from the inconsistent style expression problem with lack of the parallel corpus as supervisions. To tackle this problem, we propose a novel transductive learning approach for unsupervised text style transfer. The key idea of our TSST model is to learn context-aware style expressions via retrieved samples from
+
+the target style datasets. Experimental results on two typical style transfer tasks show that TSST significantly improves the performances in terms of both automatic and human evaluation.
+
+Our proposed transductive learning approach is very general, and this work mainly focuses on the embedding-based methods. In future, we plan to extend our approach to other methods, such as decoder-based and discriminator-based methods. Moreover, we will try more powerful retrieval methods, such as DPR (Karpukhin et al., 2020).
+
+# Ethical Considerations
+
+We honor and support the ACL code of Ethics. The paper focuses on style transfer, which aims to change the style of the text while preserving the semantic content. We recognize the style transfer methods may be misused to generate misinformation, e.g. fake customer reviews. However, the style transfer methods can also provide strong support for mitigating harmful biases in online information, e.g. the transfer from offensive to nonoffensive (Nogueira dos Santos et al., 2018; Tran et al., 2020) and from biased to neutral (Pryzant et al., 2020). Overall, it is still meaningful to continue research into this work on the basis of predecessors. Simultaneously, the datasets we used in this paper are all from previously published works and do not involve privacy or ethical issues.
+
+# Acknowledgements
+
+This work was supported by National Natural Science Foundation of China (NSFC) under Grants No. 61906180, No. 61773362 and No. 91746301, National Key R&D Program of China under Grants 2020AAA0105200 and the Tencent AI Lab Rhino-Bird Focused Research Program (No. JR202033).
+
+# References
+
+Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Deng Cai, Yan Wang, Huayang Li, Wai Lam, and Lemao Liu. 2021. Neural machine translation with monolingual translation memory. 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 7307-7318, Online. Association for Computational Linguistics.
+Ning Dai, Jianze Liang, Xipeng Qiu, and Xuanjing Huang. 2019. Style transformer: Unpaired text style transfer without disentangled latent representation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5997-6007, Florence, Italy. Association for Computational Linguistics.
+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.
+Zhenxin Fu, Xiaoye Tan, Nanyun Peng, Dongyan Zhao, and Rui Yan. 2018. Style transfer in text: Exploration and evaluation. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th innovative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial Intelligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 663-670. AAAI Press.
+Hongyu Gong, Suma Bhat, Lingfei Wu, JinJun Xiong, and Wen-mei Hwu. 2019. Reinforcement learning based text style transfer without parallel training corpus. 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 3168-3180, Minneapolis, Minnesota. Association for Computational Linguistics.
+Ruiqi Guo, Sanjiv Kumar, Krzysztof Choromanski, and David Simcha. 2016. Quantization based fast inner product search. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, AISTATS 2016, Cadiz, Spain, May 9-11, 2016, volume 51 of JMLR Workshop and Conference Proceedings, pages 482-490. JMLR.org.
+Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. 2020. Realm: Retrievalaugmented language model pre-training. arXiv preprint arXiv:2002.08909.
+Junxian He, Xinyi Wang, Graham Neubig, and Taylor Berg-Kirkpatrick. 2020. A probabilistic formulation of unsupervised text style transfer. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
+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. Association for Computational Linguistics.
+
+Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P. Xing. 2017. Toward controlled generation of text. In Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pages 1587-1596. PMLR.
+Parag Jain, Abhijit Mishra, Amar Prakash Azad, and Karthik Sankaranarayanan. 2019. Unsupervised controllable text formalization. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pages 6554-6561. AAAI Press.
+Zhijing Jin, Di Jin, Jonas Mueller, Nicholas Matthews, and Enrico Santus. 2019. IMaT: Unsupervised text attribute transfer via iterative matching and translation. 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 3097-3109, Hong Kong, China. Association for Computational Linguistics.
+Thorsten Joachims et al. 1999. Transductive inference for text classification using support vector machines. In Icml, volume 99, pages 200-209.
+Vineet John, Lili Mou, Hareesh Bahuleyan, and Olga Vechtomova. 2019. Disentangled representation learning for non-parallel text style transfer. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 424–434, Florence, Italy. Association for Computational Linguistics.
+Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6769-6781, Online. Association for Computational Linguistics.
+Kalpesh Krishna, John Wieting, and Mohit Iyyer. 2020. Reformulating unsupervised style transfer as paraphrase generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 737-762, Online. Association for Computational Linguistics.
+Guillaume Lample, Sandeep Subramanian, Eric Michael Smith, Ludovic Denoyer, Marc'Aurelio Ranzato, and Y-Lan Boureau. 2019. Multiple-attribute text rewriting. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.
+
+Juncen Li, Robin Jia, He He, and Percy Liang. 2018. Delete, retrieve, generate: a simple approach to sentiment and style transfer. 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 1865-1874, New Orleans, Louisiana. Association for Computational Linguistics.
+Xiao Li, Guanyi Chen, Chenghua Lin, and Ruizhe Li. 2020. DGST: a dual-generator network for text style transfer. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7131-7136, Online. Association for Computational Linguistics.
+Dayiheng Liu, Jie Fu, Yidan Zhang, Chris Pal, and Jiancheng Lv. 2020. Revision in continuous space: Unsupervised text style transfer without adversarial learning. 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 8376-8383. AAAI Press.
+Fuli Luo, Peng Li, Jie Zhou, Pengcheng Yang, Baobao Chang, Xu Sun, and Zhifang Sui. 2019. A dual reinforcement learning framework for unsupervised text style transfer. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, pages 5116-5122. ijcai.org.
+Florian Mai, Nikolaos Pappas, Ivan Montero, Noah A. Smith, and James Henderson. 2020. Plug and play autoencoders for conditional text generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6076-6092, Online. Association for Computational Linguistics.
+Eric Malmi, Aliaksei Severyn, and Sascha Rothe. 2020. Unsupervised text style transfer with padded masked language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8671-8680, Online. Association for Computational Linguistics.
+Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. 2018. Spectral normalization for generative adversarial networks. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net.
+Tong Niu and Mohit Bansal. 2018. Polite dialogue generation without parallel data. Transactions of the Association for Computational Linguistics, 6:373-389.
+Cicero Nogueira dos Santos, Igor Melnyk, and Inkit Padhi. 2018. Fighting offensive language on social
+
+media with unsupervised text style transfer. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 189-194, Melbourne, Australia. Association for Computational Linguistics.
+Shrimai Prabhumoye, Yulia Tsvetkov, Ruslan Salakhutdinov, and Alan W Black. 2018. Style transfer through back-translation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 866-876, Melbourne, Australia. Association for Computational Linguistics.
+Reid Pryzant, Richard Diehl Martinez, Nathan Dass, Sadao Kurohashi, Dan Jurafsky, and Diyi Yang. 2020. Automatically neutralizing subjective bias in text. In Proceedings of the aaai conference on artificial intelligence, volume 34, pages 480-489.
+Sudha Rao and Joel Tetreault. 2018. Dear sir or madam, may I introduce the GYAFC dataset: Corpus, benchmarks and metrics for formality style transfer. 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 129-140, New Orleans, Louisiana. Association for Computational Linguistics.
+Stephen Robertson and Hugo Zaragoza. 2009. The probabilistic relevance framework: Bm25 and beyond. Information Retrieval, 3(4):333-389.
+Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi S. Jaakkola. 2017. Style transfer from non-parallel text by cross-alignment. 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 6830-6841.
+Anshumali Shrivastava and Ping Li. 2014. Asymmetric LSH (ALSH) for sublinear time maximum inner product search (MIPS). In Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pages 2321-2329.
+Yixuan Su, Wang Yan, Deng Cai, Simon Baker, Anna Korhonen, and Nigel Collier. 2021. Prototype-to-style: Dialogue generation with style-aware editing on retrieval memory. IEEE/ACM Transactions on Audio, Speech, and Language Processing.
+Akhilesh Sudhakar, Bhargav Upadhyay, and Arjun Maheswaran. 2019. "transforming" delete, retrieve, generate approach for controlled text style transfer. 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 3269-3279, Hong Kong, China. Association for Computational Linguistics.
+
+Minh Tran, Yipeng Zhang, and Mohammad Soleymani. 2020. Towards a friendly online community: An unsupervised style transfer framework for profanity redaction. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2107-2114, Barcelona, Spain (Online). International Committee on Computational Linguistics.
+Vladimir N. Vapnik. 1998. Statistical Learning Theory. Wiley-Interscience.
+Ke Wang, Hang Hua, and Xiaojun Wan. 2019. Controllable unsupervised text attribute transfer via editing entangled latent representation. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 11034-11044.
+Chen Wu, Xuancheng Ren, Fuli Luo, and Xu Sun. 2019a. A hierarchical reinforced sequence operation method for unsupervised text style transfer. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4873-4883, Florence, Italy. Association for Computational Linguistics.
+Xing Wu, Tao Zhang, Liangjun Zang, Jizhong Han, and Songlin Hu. 2019b. "mask and infill": Applying masked language model to sentiment transfer. arXiv preprint arXiv:1908.08039.
+Jingjing Xu, Xu Sun, Qi Zeng, Xiaodong Zhang, Xu-ancheng Ren, Houfeng Wang, and Wenjie Li. 2018. Unpaired sentiment-to-sentiment translation: A cycled reinforcement learning approach. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 979–988, Melbourne, Australia. Association for Computational Linguistics.
+Xiaoyuan Yi, Zhenghao Liu, Wenhao Li, and Maosong Sun. 2020. Text style transfer via learning style instance supported latent space. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020, pages 3801-3807. ijcai.org.
+Zhirui Zhang, Shuo Ren, Shujie Liu, Jianyong Wang, Peng Chen, Mu Li, Ming Zhou, and Enhong Chen. 2018. Style transfer as unsupervised machine translation. arXiv preprint arXiv:1808.07894.
+Chulun Zhou, Liangyu Chen, Jiachen Liu, Xinyan Xiao, Jinsong Su, Sheng Guo, and Hua Wu. 2020. Exploring contextual word-level style relevance for unsupervised style transfer. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7135-7144, Online. Association for Computational Linguistics.
+Hao Zhou, Minlie Huang, Tianyang Zhang, Xiaoyan Zhu, and Bing Liu. 2018. Emotional chatting machine: Emotional conversation generation with internal and external memory. In Proceedings of the
+
+Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th innovative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial Intelligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 730-739. AAAI Press.
\ No newline at end of file
diff --git a/transductivelearningforunsupervisedtextstyletransfer/images.zip b/transductivelearningforunsupervisedtextstyletransfer/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..16504d8d85b06ef51fc40b09558afbf0819d7d13
--- /dev/null
+++ b/transductivelearningforunsupervisedtextstyletransfer/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e3ea488f8bead6f8b30c833761d28df98faab7e0eccdd1a93c7b07a651d7f1ac
+size 530129
diff --git a/transductivelearningforunsupervisedtextstyletransfer/layout.json b/transductivelearningforunsupervisedtextstyletransfer/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..e585f61162c7d04e852d51cfdce01b34abbe7b41
--- /dev/null
+++ b/transductivelearningforunsupervisedtextstyletransfer/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:89b3ad3b64164f6db45ded03c53c9c4e9757d171c6b60ca913e3909a0ee520a6
+size 391229
diff --git a/transferablepersonagroundeddialoguesviagroundedminimaledits/7d9f21cc-c7a6-40bc-9fac-eadc96499eea_content_list.json b/transferablepersonagroundeddialoguesviagroundedminimaledits/7d9f21cc-c7a6-40bc-9fac-eadc96499eea_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..d2a6a4262307586c7bfb066d61bf95e81de60475
--- /dev/null
+++ b/transferablepersonagroundeddialoguesviagroundedminimaledits/7d9f21cc-c7a6-40bc-9fac-eadc96499eea_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2184e58c1d9c32390ed44daa0a5a713e77ec5da57d3e3f755fc851ee6eae931f
+size 99086
diff --git a/transferablepersonagroundeddialoguesviagroundedminimaledits/7d9f21cc-c7a6-40bc-9fac-eadc96499eea_model.json b/transferablepersonagroundeddialoguesviagroundedminimaledits/7d9f21cc-c7a6-40bc-9fac-eadc96499eea_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..f03672e15fb5310e7567ed43f353cdbd81d498e8
--- /dev/null
+++ b/transferablepersonagroundeddialoguesviagroundedminimaledits/7d9f21cc-c7a6-40bc-9fac-eadc96499eea_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:efe8c94ac4d0d0110ba7950ad8c9f45f96e1f05e9b966ff9c3be9b9e10ce91e6
+size 119964
diff --git a/transferablepersonagroundeddialoguesviagroundedminimaledits/7d9f21cc-c7a6-40bc-9fac-eadc96499eea_origin.pdf b/transferablepersonagroundeddialoguesviagroundedminimaledits/7d9f21cc-c7a6-40bc-9fac-eadc96499eea_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..a56d8881961a95e011a7fff0628b4b09afcc4a89
--- /dev/null
+++ b/transferablepersonagroundeddialoguesviagroundedminimaledits/7d9f21cc-c7a6-40bc-9fac-eadc96499eea_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4a1b33f601bdccdb69fe66b3fe31b0eff71eb0463a206610687b2de3c77b63bc
+size 664258
diff --git a/transferablepersonagroundeddialoguesviagroundedminimaledits/full.md b/transferablepersonagroundeddialoguesviagroundedminimaledits/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..a3be0c680e6a530b64cb67163e35b45d69fbe506
--- /dev/null
+++ b/transferablepersonagroundeddialoguesviagroundedminimaledits/full.md
@@ -0,0 +1,385 @@
+# Transferable Persona-Grounded Dialogues via Grounded Minimal Edits
+
+Chen Henry Wu $^{1}$ , Yinhe Zheng $^{2}$ , Xiaoxi Mao $^{3}$ , Minlie Huang $^{1}$
+
+$^{1}$ Department of Computer Science and Technology, Institute for Artificial Intelligence, State Key Lab of Intelligent Technology and Systems, Beijing National Research Center for Information Science and Technology, Tsinghua University, Beijing, China
+
+$^{2}$ Samsung Research China - Beijing (SRC-B) $^{3}$ Fuxi AI Lab, NetEase Inc., Hangzhou, China
+
+henrychenwu@cmu.edu, yh.zheng@samsung.com,
+
+maoxiaoxi@corp.netease.com, aihuang@tsinghua.edu.cn
+
+# Abstract
+
+Grounded dialogue models generate responses that are grounded on certain concepts. Limited by the distribution of grounded dialogue data, models trained on such data face the transferability challenges in terms of the data distribution and the type of grounded concepts. To address the challenges, we propose the grounded minimal editing framework, which minimally edits existing responses to be grounded on the given concept. Focusing on personas, we propose Grounded Minimal Editor (GME), which learns to edit by disentangling and recombining persona-related and persona-agnostic parts of the response. To evaluate persona-grounded minimal editing, we present the PERSONAMINEDIT dataset, and experimental results show that GME outperforms competitive baselines by a large margin. To evaluate the transferability, we experiment on the test set of BLENDEDSKILLTALK and show that GME can edit dialogue models' responses to largely improve their persona consistency while preserving the use of knowledge and empathy.
+
+# 1 Introduction
+
+Grounding dialogue agents on external information is important for building engaging conversational AI systems (Huang et al., 2020). Along this track, various datasets and models have been proposed to ground dialogues on personas (Zhang et al., 2018), knowledge (Dinan et al., 2019), emotions (Zhou et al., 2018a), and images (Shuster et al., 2020).
+
+Generally, grounded dialogue modeling trains a dialogue model on a dataset $\mathcal{D}$ that consists of triples $(c,r,g)$ , where $c$ is the dialogue history, $r$ is the response, and $g$ is the grounded concept. The model is generally optimized using maximum likelihood estimate (MLE), i.e.,
+
+$$
+\underset {\theta} {\arg \max } \mathbb {E} _ {(c, r, g) \sim \mathcal {D}} \log P _ {\theta} (r | c, g). \tag {1}
+$$
+
+
+Figure 1: Persona-grounded minimal editing. Edits are shown by arrows, accompanied by the explanations.
+
+Despite its effectiveness, this formulation faces two challenges regarding transferability. On one hand, grounded dialogue datasets are usually collected under a guided setting, e.g., annotators are usually encouraged to embed persona (Zhang et al., 2018) or knowledge (Dinan et al., 2019) into responses, which leads to a distributional gap between the conversations in a grounded dialogue dataset and natural conversations. As a result, models trained with Eq. (1) may generate unnatural responses and are vulnerable to the distributional shift of the dialogue history. On the other hand, at inference time, models trained with Eq. (1) cannot be grounded on unseen types of concept $g'$ other than $g$ . An example for such grounding gap is that a model trained on PERSONCHAT (Zhang et al., 2018) with Eq. (1) cannot be grounded on world knowledge.
+
+To address the above transferability challenges, we propose a grounded minimal editing framework for grounded dialogue modeling. Instead of learning a grounded response generator as is done in Eq. (1), we propose to learn a grounded minimal editor that operates on existing responses. Specifically, suppose we have an original response $r^o$ that is coherent with the dialogue history $c$ but is
+
+not grounded on the concept $g$ . Our goal is to minimally edit $r^o$ such that it is grounded on the concept $g$ and coherent with the dialogue history $c$ . Original responses can be generated by dialogue models trained on natural conversation data and grounded on other concepts $g'$ , or even produced by humans; thus, they do not suffer from the distributional gap and grounding gap. Moreover, minimal editing guarantees that the distribution of the edited responses is similar to that of the original responses, which do not suffer from the two gaps. Note that collecting paired responses before and after editing is resource-consuming; thus, our goal is to learn the editing without paired data.
+
+In this paper, we explore persona-grounded minimal editing, as demonstrated in Figure 1. We propose Grounded Minimal Editor (GME), which is trained on persona-grounded dialogue data. Specifically, response templates are sampled by corrupting persona-related spans and sentences based on gradient-based attribution and word overlap. By denoising the templates, GME disentangles and recombines persona-related and persona-agnostic expressions. Since the personas of original responses are not observed at inference, we train a classifier for template generation at inference.
+
+Two research questions are investigated in this paper: Q1) Is the proposed GME model effective for grounded minimal editing? Q2) Does our framework address the transferability challenges (more specifically, the distributional gap and the grounding gap)? For Q1, we build PERSONAMINEDIT, a new dataset derived from PERSONACHAT with multiple human references for the edited response. Automatic and human evaluations show that GME outperforms competitive baselines and has the most similar behavior to humans references. For Q2, we evaluate GME on the test set of BLENDEDSKIL-TALK (Smith et al., 2020), whose data distribution and grounded concepts are different from PERSONACHAT, which requires GME to be transferable. We observe that GME improves the persona consistency of responses generated by pretrained Blender-90M models (Roller et al., 2020), while preserving the use of knowledge and empathy. Results also show that GME-edited responses largely outperforms TransferTransfo (Wolf et al., 2019), which is trained in the canonical way as in Eq. (1). Our contributions include:
+
+- We propose a framework named grounded minimal editing to address the transferability
+
+challenges of grounded dialogue modeling.
+
+- We propose Grounded Minimal Editor (GME) and present the PERSONAMINEDIT dataset to evaluate GME's effectiveness for person-grounded minimal editing.
+- Experimental results show that GME largely outperforms strong baselines on the PERSONAMINEDIT dataset. GME is also transferable to edit other models' outputs and improve the persona consistency while preserving their use of knowledge and empathy.
+
+# 2 Related Work
+
+Recent work leveraged grounded information in dialogue agents to chat engagingly, e.g., using knowledge (Zhou et al., 2018b), emotions (Zhou et al., 2018a), personas (Zhang et al., 2018), and images (Shuster et al., 2020). For persona grounding (Li et al., 2016; Zhang et al., 2018), transfer learning methods (Zhang et al., 2019; Wolf et al., 2019; Golovanov et al., 2019) and latent variable models (Song et al., 2019; Chan et al., 2019) have shown promising results. Further, the persona consistency issue (Kim et al., 2020; Nie et al., 2020) and persona-augmented empathetic agents (Zhong et al., 2020) have also been explored. As discussed in Section 1, existing methods generally adopt the MLE objective in Eq. (1) and suffer from two transferability challenges, i.e., the distributional gap and the grounding gap, which are addressed by the proposed grounded minimal editing framework.
+
+The idea of editing existing responses has been explored, e.g., the deliberation network (Xia et al., 2017), two-pass response generation (Song et al., 2020), and retrieval-augmented dialogue modeling (Weston et al., 2018; Pandey et al., 2018; Wu et al., 2019b; Gu et al., 2019; Cai et al., 2019). This paper is essentially different from these works from two perspectives. 1) Regarding the formulation, we emphasize minimal editing, while previous works do not. As analyzed in Section 1, minimal editing is an important component to address the transferability challenges; 2) Regarding the training algorithm, previous works derive templates from self-generated or retrieved texts, while our model derives templates from the observed responses.
+
+Our work is also related to controlled text editing without parallel data, e.g., unsupervised text style transfer (Shen et al., 2017; Li et al., 2018; Rao
+
+
+Training
+
+
+Inference
+Figure 2: Graphical formulation of grounded minimal editing. Observed variables are shown in grey, and unobserved variables are shown in white (c: dialogue history, g: grounding, r: response, D: training data, u: unobserved variables). At inference, the editing $r^o \to r^e$ is based on $g^o \to g^e$ , while the unobserved variables $u$ remain unchanged. Note that $g^o$ is also not observed.
+
+and Tetreault, 2018; Lample et al., 2019), semi-supervised contextual text style transfer (Cheng et al., 2020), syntax-controlled paraphrasing (Bao et al., 2019), contrastive model explanation (Ross et al., 2020), counterfactual story generation (Qin et al., 2019, 2020), and sentence-level editing for empathetic dialogues (Sharma et al., 2021). Some of these studies also utilize masked templates (Li et al., 2018; Wu et al., 2019a; Sudhakar et al., 2019; Malmi et al., 2020; Ross et al., 2020). However, these previous works only focus on categorical conditions in a small label space, while the personas in our study are embedded in much larger spaces. In the large persona space, the persona sentences at test time are never seen during training. Further, when generating masked templates, the personas of the original responses are unobserved in our study.
+
+# 3 Formulation
+
+We provide a formulation of the proposed framework. Grounded dialogue modeling uses a dataset $\mathcal{D}$ that consists of triples $(c, r, g)$ , where $c$ , $r$ , and $g$ are the dialogue history, the response, and the grounded concept, which are shown in grey in the left part of Figure 2. To formulate the term "minimal", we need to add unobserved variables into the graphical model, denoted as $u$ in Figure 2, which cover all unobserved variables. The graph states that $r = f(c, g, u)$ . As shown in the right part of Figure 2, we observe $(c, r^o, g^e)$ at inference time, where $r^o$ and $g^e$ stand for the original response and the grounded concept for editing. The graph states that the original response $r^o = f(c, g^o, u)$ , where $g^o$ represents the concept the original response is grounded on, and that both $g^o$ and $u$ are unobserved. The edited response is defined as $r^e = f(c, g^e, u)$ ,
+
+which replaces $g^{o}$ as $g^{e}$ , and keeps $c$ and $u$ intact. Our formulation follows the idea of counterfactual reasoning (Peters et al., 2017), and it guarantees that 1) the content irrelevant to the grounded concept is preserved, and that 2) the edited response is coherent with the dialogue history. Since it is costly to collect paired $(r^{o}, r^{e})$ for training, the grounded minimal editor should be trained on the grounded dialogue data $(c, r, g) \sim \mathcal{D}$ as in Eq. (1).
+
+As the first attempt toward the proposed framework, we focus on persona-grounded minimal editing in the experiments. Thus, in the remaining part of this paper, we set the grounded concept $g$ , $g^o$ , $g^e$ as the persona $p$ , $p^o$ , $p^e$ .
+
+# 4 Our Approach
+
+# 4.1 Overview
+
+We propose Grounded Minimal Editor (GME), a pipeline model for grounded minimal editing. At inference, GME first creates a response template $t$ by masking persona-related spans in the original response $r^o$ and then recombines the template $t$ , the persona $p^e$ , and the dialogue history $c$ into an edited response $r^e$ . We design the template to approximate the unobserved variables $u$ in Section 3, which distinguishes GME from previous retrieval-based dialogue models. With some abuse of notation, we use $t$ to denote the template for both training and inference. During training, two modules are learned: 1) a generator used for the recombination described above and 2) a mask classifier that helps create the response template at inference. Note that GME can also be applied to other ground concepts besides personas. The full process is presented in Algorithm 1.
+
+# 4.2 Recombination Module
+
+The recombination module learns to recombine the response template, the persona, and the dialogue history as the edited response. During training, we create templates from the training responses, as detailed below.
+
+Span mask The span mask serves as the placeholder of persona-related spans. For each response-persona pair, we define three sets of tokens: GRADIENT, OVERLAP, and STOPWORDS. GRADIENT contains persona-related tokens that are determined using gradient-based attribution (Simonyan et al., 2014). We pretrain a response-to-persona model and compute the $L_{2}$ norm of the gradient of the
+
+
+
+
+Figure 3: Left: training example and input format. Right: inference example and input format. For readability, the same response sample is used. The context, position embeddings, and token type embeddings are omitted here.
+
+
+
+
+
+| Algorithm 1 Training and inference of GME |
| // Training |
| 1: repeat sample (c, r, p) ~ D |
| 2: Sample t ~ Ttrain(t|r, p) |
| 3: Optimize Lθ in Eq. (2) and Lφ in Eq. (3) |
| 4: until convergence |
| // Inference |
| Input: (c, r0, p^e) |
| 5: Infer t = Tφtest(t|c, r0, p^e) |
| 6: Edited response r^e ~ Pθ(r^e|c, t, p^e) |
+
+persona's cross-entropy loss w.r.t. each response token's embeddings. A token is placed into the GRADIENT set if the $L_{2}$ norm is greater than $\delta = 3$ . OVERLAP contains response tokens whose lemma overlaps with in the lemmas of the persona tokens, which are likely to be related to the persona. STOPWORDS contains stopwords and punctuation marks specified by NLTK (Bird, 2006). We mask a token if it is in GRADIENT or OVERLAP but not in STOPWORDS. We call sentences with masks after this step as persona-related sentences. For each persona-related sentence, we further mask $15\%$ of its tokens to improve the robustness. Since the number of tokens varies at the same syntactic position, we merge consecutive masks so that all masks are at the span level.
+
+Sentence deletion The above span mask is effective for correcting persona contradictions in the original response. However, span mask cannot handle the situation where we want to add new persona information into the response (examples are given in Figure 1 and Appendix E). To model this pattern, we randomly delete persona-related sentences. Suppose we have $l$ persona-related sentences in the response, the number to keep $0 \leq n \leq l - 1$ follows
+
+$P(n)\propto \exp (-n / \tau)$ , where $\tau$ is a hyperparameter. By infilling persona-related sentences, the model learns to merge persona into the response.
+
+An example of the training template is shown in Figure 3. During training, the recombination modules $P_{\theta}$ is optimized by
+
+$$
+\mathcal {L} _ {\theta} = - \mathbb {E} _ {(c, r, p) \sim \mathcal {D}} \left[ \mathbb {E} _ {t \sim \mathcal {T} (t | r, p)} \log P _ {\theta} (r | c, t, p) \right]. \tag {2}
+$$
+
+where $\mathcal{T}(t|r,p)$ denotes the distribution of the template as detailed above. As shown in Figure 3, we use GPT-2 as the backbone to parameterize $P_{\theta}$ , which is tackled as a language modeling task by concatenating input texts. We apply label smoothing $(\epsilon = 0.1)$ , and we use greedy decoding at inference. Token type embeddings are used to distinguish each type of text and each speaker.
+
+# 4.3 Mask Generator
+
+Since the persona of the original response before editing, i.e., $p^o$ , is unobserved at inference, we train a mask generator $P_{\phi}$ to predict if a token $r_i$ should be masked. The objective for the mask generator is
+
+$$
+\mathcal {L} _ {\phi} = - \mathbb {E} _ {(c, r, p) \sim \mathcal {D}} \sum_ {i = 1} ^ {| r |} \frac {1}{f _ {i}} \log P _ {\phi} (m _ {i} | c, r) \tag {3}
+$$
+
+where $m_{i} = 1$ if $r_i$ is in GRADIENT or OVERLAP but not in STOPWORDS, and $m_{i} = 0$ otherwise. $f_{i}$ is the corpus-level frequency of $m_{i}$ , which is used to balance the number of positive samples and negative samples. At inference, we mask a word if 1) $P_{\phi}$ labels it as masked with a confidence greater than $\epsilon$ ( $\epsilon = 0.5$ in the main experiment, $\epsilon = 0.75$
+
+in the transferability experiment) and meanwhile 2) it does not appear in the persona $p^e$ or the dialogue history $c$ . We merge consecutive masks to get span masks. This process is denoted as $\mathcal{T}_{test}^{\phi}(t|c,r^{o},p^{e})$ in Algorithm 1.
+
+# 5 Evaluation Data: PERSONAMINEDIT
+
+# 5.1 Data Collection
+
+We present a new dataset PERSONAMINEDIT to evaluate persona-grounded minimal editing. Validation and test data are collected in two steps:
+
+Editing persona selection We first construct inference samples $(c, r^o, p^e)$ , where the dialogue history $c$ and original response $r^o$ are from PERSONACHAT, and we select the editing persona $p^e$ based on two criteria: 1) editing difficulty and 2) conversation consistency. We bias our data to the hard cases that require correction of persona contradictions. Specifically, we use the heuristics provided by Welleck et al. (2019) to select personas that are contradictory to the original response. To ensure conversation consistency, we filter out personas that are contradictory to the speaker's responses in the dialogue history. Finally, we also ensure that the persona sentences within each persona are not contradictory to each other.
+
+Response editing For each constructed triple $(c, r^o, p^e)$ , we collect references for the edited responses $r^e$ on Amazon Mechanical Turk. Specifically, $r^e$ should satisfy three requirements: 1) consistency with the editing persona $p^e$ , 2) minimal editing, and 3) coherence with the dialogue history $c$ . We reject annotations that do not add words to the original response. Three human references are collected for each triple, and duplicate references are re-annotated. The inter-annotator BLEU (i.e., the BLEU of each reference given the other two references) is 73.8 on the validation set and 71.4 on the test set. The annotation instructions we used are detailed in Appendix A.
+
+Training data in PERSONAMINEDIT is derived from the training data of PERSONACHAT, and personas are aligned with responses following Welleck et al. (2019). We also remove training samples whose persona appears in the editing personas in the validation and test data to ensure that the persona does not leak from training to testing.
+
+# 5.2 Data Statistics
+
+After removing training samples whose persona appears in the editing personas in the validation and
+
+ | add | rm | ΔL | d(re, ro) | d(re, pe) |
| Valid | 5.1 | 2.7 | +3.2 | 7.0 | 11.0 |
| Test | 4.9 | 2.6 | +2.9 | 6.7 | 10.8 |
+
+Table 1: Data analysis. Notations follow Section 5.2.
+
+test splits, our training data has 119,078 samples. The validation split has 1,384 samples (1,266 with one sentence in the editing persona, 118 with two). The test split also has 1,384 samples (1,269 with one sentence in the editing persona, 115 with two).
+
+We study the behavior of human references to understand the human intuition of minimal editing. In Table 1, we report the number of words added (add) and removed (rm), and the length difference $(\Delta L)$ between the edited and original responses. We also report the minimum edit distance (MED) between the edited and original responses $(d(r^{e},r^{o}))$ , and that between the edited response and the editing persona $(d(r^{e},p^{e}))$ . We observe that the edited responses are generally local modifications of the original responses. On average, the edited responses are longer than the original ones, which can be explained by the observation that human sometimes add persona information into the response when no persona contradiction exists.
+
+# 6 Experiment on PERSONAMINEDIT
+
+We use PERSONAMINEDIT to evaluate personagrounded minimal editing (Q1 in Section 1).
+
+# 6.1 Baselines
+
+We modify state-of-the-art models for unsupervised text style transfer and counterfactual story generation as the baselines for grounded minimal editing. No edit This baseline does not make any edits to the original response.
+
+UNMT Lample et al. (2019); He et al. (2020) adopted the unsupervised neural machine translation (UNMT) model (Lample et al., 2018) for unsupervised text style transfer. For our task, we replace the style condition with persona condition, and use a word dropout rate $p_{wd} \in \{0.1, 0.5\}$ .
+
+CycleGAN Luo et al. (2019); Dai et al. (2019) adopted CycleGAN (Zhu et al., 2017) for unsupervised text style transfer. For our task, we replace the style classifier with a response-to-persona model. We use Gumbel-softmax straight through gradient estimator (Jang et al., 2017) for optimization.
+
+DeLorean-FT DeLorean (Qin et al., 2020) iteratively modifying GPT-2's logits via gradients from
+
+a content preserving loss. For our task, we replace GPT-2 with TransferTransfo (Wolf et al., 2019) and set the mixture rate $\gamma_{mix} \in \{0.75, 0.80, 0.85\}$ , where larger (smaller) $\gamma_{mix}$ is biased towards persona consistency (minimality of editing).
+
+We observe that CycleGAN is sensitive to hyperparameters and unstable to train, probably due to the biased gradient estimation given the large persona space. Thus, we do not include other methods that require gradient backpropagation from classifiers (Zhou et al., 2020; Madaan et al., 2020).
+
+# 6.2 Automatic Evaluation
+
+For automatic evaluation, we run each experiment with five random seeds. More details are presented in Appendix C.
+
+BLEU We compute BLEU-4 score (Papineni et al., 2002) based on the collected multiple human references, using the Moses script multi-bleu.perl. From Table 2 and Table 5, we observe that higher BLEU indicates the less editing.
+
+P-Score We define P-Score to evaluate the persona consistency. Specifically, we finetune a BERT model on the DNLI dataset (Welleck et al., 2019) to predict the relation $C(r, p_j)$ (entailment, neutral, or contradiction) of a response $r$ and a persona sentence $p_j$ . We then map entailment, neutral, and contradiction to $+0.5$ , 0, and $-0.5$ and define the P-Score of a sample as
+
+$$
+P - S c o r e = \sum_ {j} m a p \left[ C \left(r ^ {e}, p _ {j} ^ {e}\right) \right] \tag {4}
+$$
+
+where $r^e$ is the edited response and $p_j^e$ is a persona sentence in $p^e$ . We finally report the P-Score averaged over all samples.
+
+Average We observe that BLEU and P-Score show a trade-off between minimal editing and persona consistency. We report their arithmetic mean as the overall performance since BLEU and P-Score have similar scales and variances.
+
+Table 2 shows that CycleGAN and UNMT have high BLEU but negative P-Scores. Figure 4 shows that most of their outputs are contradictory to the editing personas, indicating that their edits are not focused on persona-related expressions. These results show that methods designed for binary style labels are not effective for persona-grounded minimal editing, where the persona space is much larger than the label space. Larger $\gamma_{mix}$ for DeLorean-FT
+
+ | BLEU | P-Score | Average |
| No edit | 76.4 (0.0) | -30.5 (0.0) | 23.0 (0.0) |
| UNMT | | | |
| -pwd=0.1 | 74.2 (0.2) | -30.2 (0.3) | 22.0 (0.2) |
| -pwd=0.5 | 69.0 (0.2) | -27.9 (0.7) | 20.6 (0.4) |
| CycleGAN | 74.4 (0.8) | -28.3 (1.6) | 23.0 (0.7) |
| DeLorean-FT | | | |
| -γmix=0.75 | 39.8 (2.2) | +26.4 (2.8) | 33.1 (0.6) |
| -γmix=0.80 | 34.5 (0.7) | +32.6 (1.6) | 33.5 (0.6) |
| -γmix=0.85 | 32.0 (0.8) | +36.5 (1.0) | 34.2 (0.7) |
| GME (ours) | 60.3 (1.8) | +29.9 (2.2) | 45.1 (0.5) |
+
+Table 2: Automatic evaluation. We report the average of 5 random seeds, and standard deviations are shown in parenthesis. Details of P-Score are in Figure 4.
+
+
+Figure 4: Distribution of classes in P-Score: contradiction (blue backslash), neutral (yellow), and entailment (red slash). Hyperparameters are in parenthesis.
+
+lead to lower BLEU and higher P-Score, showing that larger (smaller) $\gamma_{mix}$ is biased towards persona consistency (minimality of editing). However, results show that the overall performance cannot be improved by hyperparameter tuning.
+
+GME achieves a $31.9\%$ relative improvement on the Average score over the best performing baseline (from 34.2 to 45.1). Figure 4 shows that most of GME's outputs entail the given personas. Table 4 shows the results for 1) removing dialogue histories from the data and 2) removing sentence deletion from GME. We observe that the dialogue history only has a slight contribution, showing that the response template contains an adequate amount of information of the original response. Sentence deletion contributes largely to the performance, especially for the persona consistency.
+
+# 6.3 Human Evaluation
+
+We randomly sample 150 test samples for human evaluation. Given two edited responses $A$ and $B$ , three annotators are hired to vote prefer $A$ , none, or prefer $B$ . We instruct annotators vote none if neither $A$ nor $B$ satisfies both minimal editing and persona consistency. See detailed guidelines in Appendix B and supplementary materials.
+
+| Baseline | prefer baseline | none | prefer GME |
| UNMT (0.1) | 0.0 % | 59.3 % | 40.7 % |
| CycleGAN | 0.7 % | 59.1 % | 40.2 % |
| DeLorean-FT (0.85) | 8.4 % | 52.7 % | 38.9 % |
+
+Table 3: Human evaluation. Free-marginal $\kappa$ for each row is 0.66, 0.66, and 0.51 (substantial, substantial, and moderate agreement).
+
+ | BLEU | P-Score | Average |
| Full | 60.3 (1.8) | + 29.9 (2.2) | 45.1 (0.5) |
| w/o history | 60.2 (1.0) | + 29.3 (2.0) | 44.8 (0.8) |
| w/o sent. del. | 64.2 (0.3) | + 11.0 (0.3) | 37.6 (0.2) |
+
+Table 3 shows that human annotators generally prefer GME to the baselines. The free-marginal $\kappa$ for each row is 0.66, 0.66, and 0.51 (substantial, substantial, and moderate agreement). The strongest baseline DeLorean-FT is only preferred in $8.4\%$ cases. We observe that in most cases where DeLorean-FT wins, the original response is syntactically similar to the persona.
+
+# 6.4 Behavioral Analysis
+
+Using the metrics defined in Section 5.2, we provide a behavioral analysis of the models. Results are shown in Table 5. CycleGAN and UNMT have small add, rm, and $d(r^{e}, r^{o})$ , which shows that they make little changes to the original response. For DeLorean-FT, larger mixture rates $\gamma_{mix}$ have larger add, rm, and $d(r^{e}, r^{o})$ , which is consistent with the observation in Section 6.2. The large $d(r^{e}, r^{o})$ of DeLorean-FT also shows that this model behaves poorly at making minimal editing. GME has the most similar behavior with human references. Based on the observations in Section 6.2-6.4, we conclude that GME is effective in making minimal edits that are targeted at persona-related expressions. By checking the outputs, we observe that GME and human references add persona information into the response in some cases, which may explain why GME and human references have positive $\Delta L$ (i.e., their predictions are longer than the original responses).
+
+# 7 Transferability Experiment
+
+We evaluate the transferability of GME to minimally edit existing responses on the test split of BLENDEDSKILLTALK (Smith et al., 2020). We also evaluate whether grounded minimal editing ad
+
+Table 4: Ablation studies. Notations follow Table 2.
+
+ | add | rm | ΔL | d(r^e, r^o) | d(r^e, p^e) |
| No edit | 0.0 | 0.0 | 0.0 | 0.0 | 12.0 |
| UNMT (0.1) | 0.2 | 0.1 | + 0.1 | 0.2 | 12.1 |
| UNMT (0.3) | 0.6 | 0.4 | + 0.3 | 1.0 | 12.2 |
| CycleGAN | 0.1 | 0.1 | + 0.1 | 0.2 | 12.1 |
| DeLorean-FT | | | | | |
| - γmix = 0.75 | 5.7 | 7.9 | - 1.7 | 9.8 | 7.5 |
| - γmix = 0.80 | 6.3 | 8.7 | - 1.8 | 10.9 | 7.2 |
| - γmix = 0.85 | 6.9 | 9.2 | - 1.7 | 11.7 | 7.0 |
| GME (ours) | 4.0 | 2.5 | + 3.6 | 6.7 | 13.0 |
| Human references | 4.9 | 2.6 | + 2.9 | 6.7 | 10.8 |
+
+Table 5: Behavioral statistics. Results that are the closest to human references are shown in bold.
+
+dresses the transferability challenges of grounded dialogue modeling (Q2 in Section 1).
+
+# 7.1 Experimental Setup
+
+In BLENDEDSKILLTALK, each dialogue session is grounded on two persona sentences and an optional knowledge topic, and the distribution of responses is biased towards the mixture of displaying persona, using knowledge, and being empathetic. Two types of existing responses are considered:
+
+- Responses generated by a persona-agnostic Blender-90M (Roller et al., 2020), which is trained on BLENDEDSKILLTALK in which the persona sentences are removed.
+- Responses generated by the original personagrounded Blender-90M.
+
+We compare the above two Blender-90M variants and GME-edited responses with TransferTransfo (Wolf et al., 2019), a pretrained dialogue model finetuned on PERSONACHAT. Note that GME is not finetuned on BLENDEDSKILLTALK. Also, conversations in PERSONACHAT, on which GME and TransferTransfo are trained, barely display knowledge and empathy.
+
+# 7.2 Automatic Evaluation
+
+We report BLEU and F1 (Miller et al., 2017) computed with the human references. For persona consistency, we report the P-Score defined in Section 6.2. To evaluate fluency, we report the word-level NLL evaluated by GPT-2 (Radford et al., 2018). The automatic evaluation uses the full 5482 test samples of BLENDEDSKILLTALK.
+
+Table 6 shows that P-Scores are largely improved after GME editing (from 9.2 to 33.0, and from 0.8 to 29.4). BLEU, F1, and NLL remain comparable
+
+ | Automatic evaluation | Human evaluation |
| BLEU | F1 | P-Score | NLL ↓ | Knowledge | Empathy | Persona | Grammaticality |
| TransferTransfo | 2.31 | 13.96 | + 67.4 | 4.54 | 0.0 % | 4.0 % | 82.7 % | 90.7 % |
| Blender-90M | 3.23 | 19.22 | + 9.2 | 3.73 | 3.3 % | 29.3 % | 20.7 % | 96.3 % |
| + edited by GME | 3.10 | 19.02 | + 33.0 | 3.82 | 3.0 % | 29.0 % | 66.3 % | 88.3 % |
| Blender-90M w/o persona | 2.98 | 18.91 | + 0.8 | 3.63 | 8.3 % | 28.7 % | 1.3 % | 97.0 % |
| + edited by GME | 2.84 | 18.87 | + 29.4 | 3.78 | 7.7 % | 28.0 % | 56.7 % | 91.7 % |
+
+Table 6: Automatic and human evaluation for the transferability to the test set of BLENDEDSKILLTALK. NLL is computed using GPT-2. Free-marginal $\kappa$ for knowledge, empathy, persona, and grammaticality is 0.92, 0.70, 0.85, and 0.78 (almost perfect, substantial, almost perfect, and substantial agreement).
+
+to those before editing. Although TransferTransfo has the highest persona consistency, it has much poorer BLEU, F1, and NLL than GME. These results show that grounded minimal editing addresses the transferability issue faced by TransferTransfo.
+
+# 7.3 Human Evaluation
+
+We randomly sample 100 test samples for human evaluation. Three annotators evaluate if a response shows knowledge, empathy, persona consistency, and grammaticality. See detailed guidelines in in Appendix B and supplementary materials.
+
+Results are shown in Table 6. Free-marginal $\kappa$ for knowledge, empathy, persona, and grammaticality is 0.92, 0.70, 0.85, and 0.78 (almost perfect, substantial, almost perfect, and substantial agreement), respectively. Results show that persona consistency is largely improved after GME editing, while the use of knowledge and empathy remain comparable to those before editing. TransferTransfo has the highest persona consistency, but it has much lower knowledge and empathy than the responses edited by GME. For example, only $4.0\%$ of TransferTransfo's responses show empathy, while the ratios are $29.0\%$ and $28.0\%$ for the GME-edited responses. We also notice a slight grammaticality drop after GME editing. However, the GME edited responses still achieve competitive or higher grammaticality scores comparing to Transfertransfo. In practice, the grammaticality scores can be easily improved using reranking approaches. In summary, GME largely improves the persona consistency of existing responses while preserving their use of knowledge and empathy, which addresses the transferability challenges faced by grounded dialogue models trained on PERSONCHAT, e.g., TransferTransfo.
+
+# 8 Discussion
+
+As mentioned in Section 2, the term "minimal" distinguishes our work from two-pass generation (Xia et al., 2017) and retrieval-augmented dialogue models (Weston et al., 2018; Cai et al., 2019). Generally, their objective can be formulated as $P(r|c,r')$ where $r'$ is a response either generated by the model itself or retrieved from the dataset. However, these works do not require $r$ and $r'$ to be a minimal editing pair. By contrast, we formulate $r^e$ and $r^o$ to be a minimal editing pair. To encourage minimal editing, we construct response templates from the observed responses themselves, while these works derive templates from the $r'$ defined above.
+
+GME itself is also trained on a grounded dialogue dataset that has biased distribution. Thus, as we mentioned at the beginning of Section 7, we also need to evaluate the transferability of GME. Section 7 shows that GME editing only slightly changes the distribution of the responses generated by the Blender-90M variants, while the distribution of TransferTransfo's responses is further away from the human references. This observation suggests that minimally editing out-of-domain responses is easier than generating them.
+
+While we focus on the persona, other types of grounding, e.g., knowledge and image, remain to be explored. Many of GME's failure cases (see Appendix E) contain grammatical errors or fail to correct contradictions, which could be addressed by improving the quality of response templates or incorporating stronger language model priors.
+
+# 9 Conclusions
+
+We propose a framework named grounded minimal editing to address the transferability challenges of grounded dialogue modeling, which include the distributional gap and the grounding gap. Our Grounded Minimal Editor (GME) model achieves
+
+minimal editing by disentangling and recombining persona-related and persona-irrelevant expressions. For evaluation, we present the PERSONAMINEDIT dataset with multiple human references. Experimental results show the effectiveness of GME for persona-grounded minimal editing. GME is also transferable to edit responses generated by pretrained dialogue models and improve their persona consistency while preserving their use of knowledge and empathy.
+
+# Acknowledgements
+
+This work was supported by the National Science Foundation for Distinguished Young Scholars (with No. 62125604) and the NSFC projects (Key project with No. 61936010 and regular project with No. 61876096). This work was also supported by the Guoqiang Institute of Tsinghua University, with Grant No. 2019GQG1 and 2020GQG0005.
+
+# References
+
+Yu Bao, Hao Zhou, Shujian Huang, Lei Li, Lili Mou, Olga Vechtomova, Xin-yu Dai, and Jiajun Chen. 2019. Generating sentences from disentangled syntactic and semantic spaces. In Proceedings of ACL 2019, pages 6008-6019, Florence, Italy.
+Steven Bird. 2006. NLTK: the natural language toolkit. In Proceedings of ACL 2006, Sydney, Australia, 17-21 July 2006.
+Deng Cai, Yan Wang, Wei Bi, Zhaopeng Tu, Xiaojiang Liu, Wai Lam, and Shuming Shi. 2019. Skeleton-to-response: Dialogue generation guided by retrieval memory. In Proceedings of NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 1219-1228.
+Zhangming Chan, Juntao Li, Xiaopeng Yang, Xiuying Chen, Wenpeng Hu, Dongyan Zhao, and Rui Yan. 2019. Modeling personalization in continuous space for response generation via augmented wasserstein autoencoders. In Proceedings of EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pages 1931-1940.
+Yu Cheng, Zhe Gan, Yizhe Zhang, Ouussama Elachqar, Dianqi Li, and Jingjing Liu. 2020. Contextual text style transfer. CoRR.
+Ning Dai, Jianze Liang, Xipeng Qiu, and Xuanjing Huang. 2019. Style transformer: Unpaired text style transfer without disentangled latent representation. In Proceedings of ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pages 5997-6007.
+
+Emily Dinan, Stephen Roller, Kurt Shuster, Angela Fan, Michael Auli, and Jason Weston. 2019. Wizard of wikipedia: Knowledge-powered conversational agents. In *ICLR* 2019, New Orleans, LA, USA, May 6-9, 2019.
+Sergey Golovanov, Rauf Kurbanov, Sergey I. Nikolko, Kyryl Truskovskyi, Alexander Tselousov, and Thomas Wolf. 2019. Large-scale transfer learning for natural language generation. In Proceedings of ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pages 6053-6058.
+Jia-Chen Gu, Zhen-Hua Ling, Xiaodan Zhu, and Quan Liu. 2019. Dually interactive matching network for personalized response selection in retrieval-based chatbots. In Proceedings of EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pages 1845-1854.
+Junxian He, Xinyi Wang, Graham Neubig, and Taylor Berg-Kirkpatrick. 2020. A probabilistic formulation of unsupervised text style transfer. In ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020.
+Minlie Huang, Xiaoyan Zhu, and Jianfeng Gao. 2020. Challenges in building intelligent open-domain dialog systems. ACM Trans. Inf. Syst., 38(3):21:1-21:32.
+Eric Jang, Shixiang Gu, and Ben Poole. 2017. Categorical reparameterization with gumbel-softmax. In ICLR 2017, Toulon, France, April 24-26, 2017.
+Hyunwoo Kim, Byeongchang Kim, and Gunhee Kim. 2020. Will I sound like me? improving persona consistency in dialogues through pragmatic self-consciousness. In Proceedings of EMNLP 2020, pages 904-916, Online.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In *ICLR* 2015, San Diego, CA, USA, May 7-9, 2015.
+Guillaume Lample, Myle Ott, Alexis Conneau, Ludovic Denoyer, and Marc'Aurelio Ranzato. 2018. Phrase-based & neural unsupervised machine translation. In Proceedings of EMNLP 2018, Brussels, Belgium, October 31 - November 4, 2018, pages 5039-5049.
+Guillaume Lample, Sandeep Subramanian, Eric Michael Smith, Ludovic Denoyer, Marc'Aurelio Ranzato, and Y-Lan Boureau. 2019. Multiple-attribute text rewriting. In ICLR 2019, New Orleans, LA, USA, May 6-9, 2019.
+Jiwei Li, Michel Galley, Chris Brockett, Georgios P. Spithourakis, Jianfeng Gao, and William B. Dolan. 2016. A persona-based neural conversation model. In Proceedings of ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers.
+
+Juncen Li, Robin Jia, He He, and Percy Liang. 2018. Delete, retrieve, generate: a simple approach to sentiment and style transfer. In Proceedings of NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 1 (Long Papers), pages 1865-1874.
+Fuli Luo, Peng Li, Jie Zhou, Pengcheng Yang, Baobao Chang, Xu Sun, and Zhifang Sui. 2019. A dual reinforcement learning framework for unsupervised text style transfer. In Proceedings of IJCAI 2019, Macao, China, August 10-16, 2019, pages 5116-5122.
+Nishtha Madaan, Inkit Padhi, Naveen Panwar, and Diptikalyan Saha. 2020. Generate your counterfactuals: Towards controlled counterfactual generation for text. arXiv preprint arXiv:2012.04698.
+Andrea Madotto, Zhaojiang Lin, Chien-Sheng Wu, and Pascale Fung. 2019. Personalizing dialogue agents via meta-learning. In Proceedings of ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pages 5454-5459.
+Eric Malmi, Aliaksei Severyn, and Sascha Rothe. 2020. Unsupervised text style transfer with padded masked language models. In Proceedings of EMNLP 2020, Online, November 16-20, 2020, pages 8671-8680.
+Alexander H. Miller, Will Feng, Dhruv Batra, Antoine Bordes, Adam Fisch, Jiasen Lu, Devi Parikh, and Jason Weston. 2017. Parlai: A dialog research software platform. In Proceedings of EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017 - System Demonstrations, pages 79-84.
+Yixin Nie, Mary Williamson, Mohit Bansal, Douwe Kiela, and Jason Weston. 2020. I like fish, especially dolphins: Addressing contradictions in dialogue modelling. arXiv preprint arXiv:2012.13391.
+Gaurav Pandey, Danish Contractor, Vineet Kumar, and Sachindra Joshi. 2018. Exemplar encoder-decoder for neural conversation generation. In Proceedings of ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pages 1329-1338.
+Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of ACL 2002, July 6-12, 2002, Philadelphia, PA, USA., pages 311-318.
+Jonas Peters, Dominik Janzing, and Bernhard Schölkopf. 2017. Elements of Causal Inference: Foundations and Learning Algorithms. Adaptive Computation and Machine Learning. MIT Press, Cambridge, MA.
+Lianhui Qin, Antoine Bosselut, Ari Holtzman, Chandra Bhagavatula, Elizabeth Clark, and Yejin Choi. 2019. Counterfactual story reasoning and generation. In Proceedings of EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pages 5042-5052.
+
+Lianhui Qin, Vered Shwartz, Peter West, Chandra Bhagavatula, Jena D. Hwang, Ronan Le Bras, Antoine Bosselut, and Yejin Choi. 2020. Back to the future: Unsupervised backprop-based decoding for counterfactual and abductive commonsense reasoning. In Proceedings of EMNLP 2020, Online, November 16-20, 2020, pages 794-805.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2018. Language models are unsupervised multitask learners.
+Sudha Rao and Joel R. Tetreault. 2018. Dear sir or madam, may I introduce the GYAFC dataset: Corpus, benchmarks and metrics for formality style transfer. In Proceedings NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 1 (Long Papers), pages 129-140.
+Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric Michael Smith, Y-Lan Boureau, and Jason Weston. 2020. Recipes for building an open-domain chatbot. CoRR.
+Alexis Ross, Ana Marasovic, and Matthew E. Peters. 2020. Explaining NLP models via minimal contrastive editing (mice). CoRR.
+Ashish Sharma, Inna W Lin, Adam S Miner, David C Atkins, and Tim Althoff. 2021. Towards facilitating empathic conversations in online mental health support: A reinforcement learning approach. In WWW.
+Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi S. Jaakkola. 2017. Style transfer from non-parallel text by cross-alignment. In NIPS 2017, 4-9 December 2017, Long Beach, CA, USA, pages 6833-6844.
+Kurt Shuster, Samuel Humeau, Antoine Bordes, and Jason Weston. 2020. Image-chat: Engaging grounded conversations. In Proceedings of ACL 2020, Online, July 5-10, 2020, pages 2414-2429.
+Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. 2014. Deep inside convolutional networks: Visualising image classification models and saliency maps. In ICLR 2014, Banff, AB, Canada, April 14-16, 2014, Workshop Track Proceedings.
+Eric Michael Smith, Mary Williamson, Kurt Shuster, Jason Weston, and Y-Lan Boureau. 2020. Can you put it all together: Evaluating conversational agents' ability to blend skills. In Proceedings of ACL 2020, Online, July 5-10, 2020, pages 2021-2030.
+Haoyu Song, Yan Wang, Weinan Zhang, Xiaojiang Liu, and Ting Liu. 2020. Generate, delete and rewrite: A three-stage framework for improving persona consistency of dialogue generation. In Proceedings of ACL 2020, Online, July 5-10, 2020, pages 5821-5831.
+Haoyu Song, Weinan Zhang, Yiming Cui, Dong Wang, and Ting Liu. 2019. Exploiting persona information for diverse generation of conversational responses. In Proceedings of IJCAI 2019, Macao, China, August 10-16, 2019, pages 5190-5196.
+
+Akhilesh Sudhakar, Bhargav Upadhyay, and Arjun Maheswaran. 2019. "transforming" delete, retrieve, generate approach for controlled text style transfer. In Proceedings of EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pages 3267-3277.
+Sean Welleck, Jason Weston, Arthur Szlam, and Kyunghyun Cho. 2019. Dialogue natural language inference. In Proceedings of ACL 2019, Florence, Italy, July 28-August 2, 2019, Volume 1: Long Papers, pages 3731-3741.
+Jason Weston, Emily Dinan, and Alexander H. Miller. 2018. Retrieve and refine: Improved sequence generation models for dialogue. In Proceedings of SCAI@EMNLP 2018, Brussels, Belgium, October 31, 2018, pages 87-92.
+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 M. Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of EMNLP 2020 - Demos, Online, November 16-20, 2020, pages 38-45.
+Thomas Wolf, Victor Sanh, Julien Chaumond, and Clement Delangue. 2019. Transfertransfo: A transfer learning approach for neural network based conversational agents. CoRR.
+Xing Wu, Tao Zhang, Liangjun Zang, Jizhong Han, and Songlin Hu. 2019a. Mask and infill: Applying masked language model for sentiment transfer. In Proceedings of IJCAI 2019, Macao, China, August 10-16, 2019, pages 5271-5277.
+Yu Wu, Furu Wei, Shaohan Huang, Yunli Wang, Zhoujun Li, and Ming Zhou. 2019b. Response generation by context-aware prototype editing. In AAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pages 7281-7288.
+Yingce Xia, Fei Tian, Lijun Wu, Jianxin Lin, Tao Qin, Nenghai Yu, and Tie-Yan Liu. 2017. Deliberation networks: Sequence generation beyond one-pass decoding. 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 1784-1794.
+Saizheng Zhang, Emily Dinan, Jack Urbanek, Arthur Szlam, Douwe Kiela, and Jason Weston. 2018. Personalizing dialogue agents: I have a dog, do you have pets too? In Proceedings of ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pages 2204-2213.
+Weinan Zhang, Qingfu Zhu, Yifa Wang, Yanyan Zhao, and Ting Liu. 2019. Neural personalized response generation as domain adaptation. *World Wide Web*, 22(4):1427-1446.
+
+Peixiang Zhong, Chen Zhang, Hao Wang, Yong Liu, and Chunyan Miao. 2020. Towards persona-based empathetic conversational models. In Proceedings of EMNLP 2020, Online, November 16-20, 2020, pages 6556-6566.
+Chulun Zhou, Liangyu Chen, Jiachen Liu, Xinyan Xiao, Jinsong Su, Sheng Guo, and Hua Wu. 2020. Exploring contextual word-level style relevance for unsupervised style transfer. In Proceedings of ACL 2020, Online, July 5-10, 2020, pages 7135-7144.
+Hao Zhou, Minlie Huang, Tianyang Zhang, Xiaoyan Zhu, and Bing Liu. 2018a. Emotional chatting machine: Emotional conversation generation with internal and external memory. In Proceedings of AAAI 2018, New Orleans, Louisiana, USA, February 2-7, 2018, pages 730-739.
+Hao Zhou, Tom Young, Minlie Huang, Haizhou Zhao, Jingfang Xu, and Xiaoyan Zhu. 2018b. Commonsense knowledge aware conversation generation with graph attention. In Proceedings of IJCAI 2018, July 13-19, 2018, Stockholm, Sweden., pages 4623-4629.
+Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. 2017. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV 2017, Venice, Italy, October 22-29, 2017, pages 2242-2251.
+
+# A Annotation Guideline (Simplified)
+
+The following guideline is provided to AMT crowd-workers when collecting reference responses:
+
+"We aim at building human-like agents that have their own personal background. We need your help to correct some responses that are irrelevant to or contradictory to the speaker's personal background. In each sample, you first see the dialogue history between the two speakers (Speaker1 and Speaker2), the original response by Speaker2, and the personal background of Speaker2. These background sentences are probably irrelevant to or contradictory to Speaker2's response. Your task is to minimally edit the response such that it shows the background. Two requirements should be satisfied: 1) The edited response should show the personal background. 2) By "minimally edit" we mean that the edited response should maintain the contents in the response that are not contradictory to the background sentences. We have pasted the original response into the answer blank, and please edit it directly."
+
+# B Human Evaluation Guidelines
+
+We provide our human evaluation guidelines in software.zip, and we will make them pub
+
+lic. We briefly summarize the guidelines here, and more details can be find in software.zip.
+
+# B.1 Grounded Minimal Editing
+
+To make our task more comprehensible to human participants, we reformulate our task as a response correction task. We define two types of mistakes made by a response: 1) contradict and 2) ignore. We first ask the participants identify the type of mistake, which encourages the participants to reason over persona-grounded dialogues. We specify two requirements to be satisfied by a good correction: 1) the mistakes are corrected, and 2) minimal changes, i.e., all words that are not contradictory to the expected personal background should be maintained, and if more than four of them are not maintained, then this requirement is not satisfied. Given two corrections $A$ and $B$ , participants vote prefer $A$ , none, or prefer $B$ . We ask them to choose none if neither $A$ nor $B$ is a good correction.
+
+# B.2 Transferability
+
+For each response, we instruct the participants to answer four questions:
+
+- Knowledge (0 or 1). Does this response includes world knowledge? 0: no; 1: yes. World knowledge includes facts and commonsense (see software.zip for details).
+- Empathy (0 or 1). Do you think this response is showing empathy? 0: no; 1: yes. Showing empathy means being aware of or being sensitive to the feelings or experience of the person being talked to (see software.zip for details).
+- Background occurrences. There are two personal background sentences. How many of them are reflected by this response (examples omitted here)? Since we only care about if at least one of the personas are shown, persona consistency is 0 if the answer to this question is 0, and 1 if the answer is 1 or 2.
+- Grammaticality (0 or 1). Is this response grammatical? 0: no; 1: yes.
+
+# C Experimental Details
+
+Models are evaluated on the validation set for every 500 steps, based on the Average metric. The batch size is 32. We use Adam (Kingma and Ba, 2015) with the initial learning rate $5 \times 10^{-5}$ and gradient
+
+clip 1.0. The learning rate decays by half when the Average metric does not improve for two validations, and training terminates after three decays. We detokenize the BPE tokens into English words for evaluation. More details for the Reproducibility Checklist are in software.zip.
+
+# D Model and Baseline Details
+
+DeLorean-FT and our GME model use the GPT2 (Radford et al., 2018) as the backbone, initialized by Huggingface Transformers (Wolf et al., 2020) checkpoint gpt2 (DiaLoGPT-small for DiaLoGPT). UNMT and CycleGAN are Transformers with DistilGPT-2 encoder and decoder, initialized with distilgpt2. The auxiliary response-to-persona module in CycleGAN is implemented as a two-layer Transformer, initialized by the first two layers of DistilGPT-2.
+
+# E Data Samples and System Outputs
+
+We provide several failure cases of GME in Table 7. Table 8-11 present some data samples and system outputs.
+
+| Dialogue history | Speaker 1: hey , i love Vegas , playing the slots !Speaker 2: vegas is fun . i do not eat much so i can stay skinny and wear those jeans .Speaker 1: yeah , i like to grill outside in the summer !Speaker 2: over my skinny jeans i like to wear leggings . summer grilling is the best .Speaker 1: i also like mowing my lawn when the suns out . |
| Original response | Speaker 2: i put on the music when i mow the lawn or play video games . |
| Editing persona | i do not like music when i am working . |
| Human reference 1 | me too , but i do not like music when i mow the lawn or play video games . |
| Human reference 2 | i do not like to put on the music when i mow the lawn or play video games . |
| Human reference 3 | i like to mow the lawn or play video games when suns out , but i do not like music when i am working . |
| GME (ours) // error | i put on the music when i mow the lawn or play music . i do not like music . // Contradiction |
| Context | Speaker 1: hello . how are you today ?Speaker 2: good today . just cooking some mexican food . i cooking but am not very good .Speaker 1: oh i like mexican food , but my favorite food are cheeseburgers .Speaker 2: i inherited some money and bought a yacht to travel , i try different foods traveling . |
| Original response | Speaker 1: i help out at a soup kitchen since i grew up poor . |
| Editing persona | i grew up with lots of cash . |
| Human reference 1 | i grew up rich but i help out at a soup kitchen . |
| Human reference 2 | i have lots of cash , but i help out at a soup kitchen . |
| Human reference 3 | i help out at a soup kitchen since i grew up with lots of cash . |
| GME (ours) // error | i help out at a lot of cash since i grew up . i grew up with lots of cash . // Grammatical error |
| Dialogue history | Speaker 1: hello , how are you today ?Speaker 2: hello , i am fine thanks and you ?Speaker 1: i am good because i love music and play it all the time .Speaker 2: ah that is nice ! i play softball in my free time .Speaker 1: nice , trabajo is my favorite spanish word .Speaker 2: i wish i had time to learn another language , but i am busy with work .Speaker 1: yeah i want to study french next .Speaker 2: since i have been fired from my last job i have been working in insurance .Speaker 1: that is pretty cool ! i love to study spanish . |
| Original response | Speaker 2: i am a member of the army , served for 10 years now . |
| Editing persona | i am a school teacher , i teach middle school . |
| Human reference 1 | i am a school teacher and teach middle school , served for 10 years now . |
| Human reference 2 | i am a school teacher for 10 years now and i teach middle school . |
| Human reference 3 | i am a middle school teacher and i have taught for 10 years . |
| GME (ours) // error | i am a teacher of the middle school . i teach middle school . // Repetition |
+
+Table 7: Failure cases
+
+| Dialogue history | Speaker 1: hello, how are you doing?Speaker 2: great, how are you ? i just finished watching one of my favorite documentaries . do youenjoy those ?Speaker 1: i am doing great , just tired . i just am unpacking boxes . i do not watch tv often .Speaker 2: did you just move ? i live here in pennsylvania with my husband .Speaker 1: yes , i bought my first house . i love pennsylvania , a lot of hills and very green .Speaker 2: good for you and congratulations on your new home !Speaker 1: thank you ! so what do you do for work ?Speaker 2: i just started working as a personal assistant about three months ago . how about you ? |
| Original response | Speaker 1: that sounds fun , i am a teacher at the public school . |
| Editing persona | i work at a place that cleans cars . |
| Human reference 1 | that sounds fun , i work at a place that cleans cars beside the public school . |
| Human reference 2 | that sounds fun , i work at a place that cleans cars . |
| Human reference 3 | that sounds fun , i am a teacher at the public school but i work as a car cleaner in part time . |
| UNMT (0.1) | that sounds fun , i am a teacher at the public school . |
| CycleGAN | that sounds fun , i am a teacher at the public school . |
| DeLorean-FT | |
| -γmix=0.75 | i work at a place that cleans cars . |
| -γmix=0.80 | i work at a place that cleans cars . |
| -γmix=0.85 | i work at a place that cleans cars . |
| GME (ours) | that sounds fun , i am a car mechanic at the place . i work at a place . |
+
+Table 8: Data sample and system outputs (correction)
+
+| Dialogue history | Speaker 1: hi . i do not like working as a car salesman .Speaker 2: i recently broke my arm so i am not working .Speaker 1: what happened ? it is hard to do anything with a broken arm .Speaker 2: i blame my skateboarding friends . |
| Original response | Speaker 1: do you think 40 is too old to go back to school ? |
| Editing persona | i am seventy two years old . |
| Human reference 1 | do you think seventy two years old is too old to go back to school ? |
| Human reference 2 | do you think seventy two is too old to go back to school ? |
| Human reference 3 | do you think seventy years old is too old to go back to school ? |
| UNMT (0.1) | do you think 40 is too old to go back to school ? |
| CycleGAN | do you think 40 is too old to go back to school ? i am seventy seventy twelve years old . |
| DeLorean-FT | |
| - γmix = 0.75 | do you skateboard ? i am a seventy two year old . |
| - γmix = 0.80 | i am a seventy two year old man . |
| - γmix = 0.85 | i am a seventy two year old man . |
| GME (ours) | do you think i am too old to go back to school ? i am seventy two years old . |
+
+Table 9: Data sample and system outputs (correction)
+
+| Dialogue history | Speaker 1: hello hope your having a good night tonight ? i know i am .Speaker 2: that is good ! i am watching football highlights .Speaker 1: really what teams . and who are you rooting for .Speaker 2: i am a green bay packer fan . do you like football ?Speaker 1: no i am not a fan but my son is . |
| Original response | Speaker 2: how many kids do you have ? |
| Editing persona | i don t like kids . |
| Human reference 1 | i don t like kids very much . how many kids do you have ? |
| Human reference 2 | i don t have kids . how many kids do you have ? |
| Human reference 3 | how many kids do you have ? i don t like kids . |
| UNMT (0.1) | how many kids do you have ? |
| CycleGAN | how many kids do you have ? |
| DeLorean-FT | |
| -γmix=0.75 | how many kids do you have ? |
| -γmix=0.80 | i am a kid . i do not like kids . |
| -γmix=0.85 | i am a kid . i do not like kids . |
| GME (ours) | how many kids do you have ? i do not like kids . |
+
+Table 10: Data sample and system outputs (add new information)
+
+| Dialogue history | Speaker 1: do you have any kids ? i have one in middle school .Speaker 2: i do not . my husband and i have chosen to not have any . |
| Original response | Speaker 1: probably a smart decision , too many people on the planet . |
| Editing persona | i recently started to work online . |
| Human reference 1 | probably a smart decision , i recently started to work online because too many people on the planet . |
| Human reference 2 | probably a smart decision , too many people on the planet that is why i recently started to work online . |
| Human reference 3 | probably a smart decision , too many people on the planet . i recently started to work online . |
| UNMT (0.1) | probably a smart decision , too many people on the planet . |
| CycleGAN | probably a smart decision , too many people on the planet . |
| DeLorean-FT | |
| -γmix=0.75 | i am a computer science major . i am currently working online . |
| -γmix=0.80 | i am a computer science major . i am currently working online . |
| -γmix=0.85 | i am a computer science . i am currently working online . |
| GME (ours) | probably a smart decision , too many people on the planet . i am working online now . |
+
+Table 11: Data sample and system outputs (add new information)
\ No newline at end of file
diff --git a/transferablepersonagroundeddialoguesviagroundedminimaledits/images.zip b/transferablepersonagroundeddialoguesviagroundedminimaledits/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..5d5df7cc033819a76eaa29b15a097cb35f3c1f86
--- /dev/null
+++ b/transferablepersonagroundeddialoguesviagroundedminimaledits/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3cf3d10ceb3d9275c419bb0f6f9fc524d433b38bb1c035750a3c70712297c312
+size 1049749
diff --git a/transferablepersonagroundeddialoguesviagroundedminimaledits/layout.json b/transferablepersonagroundeddialoguesviagroundedminimaledits/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..c27fb7001813d9c7738ebbe4998b2365bc17cda8
--- /dev/null
+++ b/transferablepersonagroundeddialoguesviagroundedminimaledits/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5818bfbc76ef420cbe0a5820a299df350a3db7c6eb63fc7ce8244e879ec7e2a0
+size 498953
diff --git a/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/74a2e905-b2a8-4410-9c5b-959f8ea2def5_content_list.json b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/74a2e905-b2a8-4410-9c5b-959f8ea2def5_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..bcdb39724599dbd1753023249b6d28528ecae726
--- /dev/null
+++ b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/74a2e905-b2a8-4410-9c5b-959f8ea2def5_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:73221db592bb534baaecb68008d78f1f1b6ed066871ca1a4a69b4b1346c4eef8
+size 73827
diff --git a/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/74a2e905-b2a8-4410-9c5b-959f8ea2def5_model.json b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/74a2e905-b2a8-4410-9c5b-959f8ea2def5_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..a843ab4c72821878645caba4de42980115d7b465
--- /dev/null
+++ b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/74a2e905-b2a8-4410-9c5b-959f8ea2def5_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1a9eaa006e8f714caa96d47ece4e2d04e506b839ff4dcebf57d25fd46652e842
+size 89274
diff --git a/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/74a2e905-b2a8-4410-9c5b-959f8ea2def5_origin.pdf b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/74a2e905-b2a8-4410-9c5b-959f8ea2def5_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..9f87de6aab74afd382744bc782d20f8925cc8b06
--- /dev/null
+++ b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/74a2e905-b2a8-4410-9c5b-959f8ea2def5_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:28526412a0218cc8a7c8880894036985eee0887786ed058b73e921690247c7d8
+size 1118701
diff --git a/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/full.md b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..a8bf78f18753480cb96eba0803eb6f162f99dc57
--- /dev/null
+++ b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/full.md
@@ -0,0 +1,379 @@
+# TransferNet: An Effective and Transparent Framework for Multi-hop Question Answering over Relation Graph
+
+Jiaxin Shi $^{1,2}$ , Shulin Cao $^{1}$ , Lei Hou $^{1*}$ , Juanzi Li $^{1}$ and Hanwang Zhang $^{3}$
+
+$^{1}$ Department of Computer Science and Technology, BNRist, Tsinghua University, Beijing 100084, China
+
+$^{2}$ Cloud BU, Huawei Technologies, $^{3}$ Nanyang Technological University
+
+shijx12@gmail.com
+
+{caos19@mails.,houlei@,lixuanzi@}tsinghua.edu.cn
+
+hanwangzhang@ntu.edu.sg
+
+# Abstract
+
+Multi-hop Question Answering (QA) is a challenging task because it requires precise reasoning with entity relations at every step towards the answer. The relations can be represented in terms of labels in knowledge graph (e.g., spouse) or text in text corpus (e.g., they have been married for 26 years). Existing models usually infer the answer by predicting the sequential relation path or aggregating the hidden graph features. The former is hard to optimize, and the latter lacks interpretability. In this paper, we propose TransferNet, an effective and transparent model for multi-hop QA, which supports both label and text relations in a unified framework. TransferNet jumps across entities at multiple steps. At each step, it attends to different parts of the question, computes activated scores for relations, and then transfer the previous entity scores along activated relations in a differentiable way. We carry out extensive experiments on three datasets and demonstrate that TransferNet surpasses the state-of-the-art models by a large margin. In particular, on MetaQA, it achieves $100\%$ accuracy in 2-hop and 3-hop questions. By qualitative analysis, we show that TransferNet has transparent and interpretable intermediate results.
+
+# 1 Introduction
+
+Question answering (QA) plays a central role in artificial intelligence. It requires machines to understand the free-form questions and infer the answers by analyzing information from a large corpus (Rajpurkar et al., 2016; Joshi et al., 2017; Chen et al., 2017) or structured knowledge base (Bordes et al., 2015; Yih et al., 2015; Jiang et al., 2019). Along with the fast development of deep learning, especially the pretraining technology (Devlin et al., 2018; Lan et al., 2019), state-of-the-art models have been shown comparative with human per
+
+
+Figure 1: Answering a multi-hop question over the relation graph. The relations are constrained predicates in the label form (i.e., knowledge graph) while free texts in the text form. The reasoning process has been marked in the graph, where the correspondence between relations and question words has been highlighted in the same color.
+
+formance on simple questions that only need a single hop (Petrochuk and Zettlemoyer, 2018; Zhang et al., 2020), e.g., Who is the CEO of Microsoft Corporation. However, multi-hop QA, which requires reasoning with the entity relations at multiple steps, is far from resolved (Yang et al., 2018; Dua et al., 2019; Zhang et al., 2017; Talmor and Berant, 2018).
+
+In this paper, we focus on multi-hop QA based on relation graphs, which consists of entities and their relations. As shown in Figure 1, the relations can be represented by two forms:
+
+- Label form, also known as knowledge graph (e.g., Freebase (Bollacker et al., 2008), Wiki-data (Vrandecic and Krötzsch, 2014)), whose relations are manually-defined constrained predicates (e.g., Spouse, CEO).
+- Text form, whose relations are free texts retrieved from textual corpus. We can easily build the graph by extracting the co-occurring sentences of two entities. Since the label form
+
+is expensive and usually incomplete, the text form is more economical and practical.
+
+In this paper, we aim to tackle multi-hop questions over these two different forms in a unified framework.
+
+Existing methods for multi-hop QA have two main strands. The first is to predict the sequential relation path in a weakly supervised setting (Zhang et al., 2017; Qiu et al., 2020), that is, to learn the intermediate path only based on the final answer. These works suffer from the convergence issues due to the huge search space, which heavily hinders their performance. Besides, they are mostly proposed for the label form. So, it is not clear how to adapt them to the text form, whose search space is even much bigger. The second strand is to collect evidences by using graph neural networks (Sun et al., 2018, 2019). They can handle both the two relation forms and achieve state-of-the-art performance. Although they prevail over the path-based models in performance, they are weak in interpretability since their intermediate reasoning process is black-box neural network layers.
+
+In this paper, we propose a novel model for multi-hop QA, dubbed TransferNet, which has the following advantages: 1) Generality. It can deal with the label form, the text form, and their combinations in a unified framework. 2) Effectiveness. TransferNet outperforms previous models significantly, achieving $100\%$ accuracy of 2-hop and 3-hop questions in MetaQA dataset. 3) Transparency. TransferNet is fully attention-based, so its intermediate steps can be easily visualized and understood by humans.
+
+Specifically, TransferNet infers the answer by transferring entity scores along relation scores of multiple steps. It starts from the topic entity of the question and maintains an entity score vector, whose elements indicate the probability of an entity being activated. At each step, it attends to some question words (e.g., the wife of) and compute scores for the relations in the graph. Relations relevant to the question words will have high scores (e.g., Spouse). We formulate these relation scores into an adjacent matrix, where each entry indicates the transfer probability of an entity pair. By multiplying the entity score vector with the relation score matrix, we can "hop" along relations in a differentiable manner. After repeating for multiple steps, we can finally arrive at the target entity.
+
+We conduct experiments for the two forms
+
+respectively. For the label form, we use MetaQA (Zhang et al., 2017), WebQSP (Yih et al., 2016) and CompWebQ (Talmor and Berant, 2018). TransferNet achieves $100\%$ accuracy in the 2-hop and 3-hop questions of MetaQA. On WebQSP and CompWebQ, we also achieve a significant improvement over state-of-the-art models. For the text form, following (Sun et al., 2019), we construct the relation graph of MetaQA from the WikiMovies corpus (Miller et al., 2016). We demonstrate that TransferNet surpasses previous models by a large margin, especially for the 2-hop and 3-hop questions. When we mix the label form and the text form, TransferNet still keeps its superiority. Moreover, by visualizing the intermediate results, we show its strong interpretability.
+
+# 2 Related Work
+
+In this paper we focus on multi-hop question answering over the graph structure that is either knowledge graph or built from text corpus. In previous works, GraftNet (Sun et al., 2018) and PullNet (Sun et al., 2019) have a similar setting to ours but they mostly aim at the mixed form, which includes both label relations and text relations. They first retrieve a question-specific subgraph and then use graph convolutional networks (Kipf and Welling, 2016) to implicitly infer the answer entity. These GCN-based methods are usually weak in interpretability because they cannot produce the intermediate reasoning path, which is necessary in our opinion for the task of multi-hop question answering. Besides, there are many works specifically for only one graph form:
+
+For the label form, which is also known as "KBQA" or "KGQA", existing methods fall into two categories: information retrieval (Miller et al., 2016; Xu et al., 2019; Zhao et al., 2019b; Saxena et al., 2020) and semantic parsing (Berant et al., 2013; Yih et al., 2015; Liang et al., 2017; Guo et al., 2018; Saha et al., 2019). The former retrieves answer from KG by learning representations of question and graph, while the latter queries answer by parsing the question into logical form. Among these methods, VRN (Zhang et al., 2017) and SRN (Qiu et al., 2020) have a good interpretability as they learn an explicit reasoning path with reinforcement learning. However, they suffer from the convergence issue due to the huge search space. IRN (Zhou et al., 2018) and ReifKB (Cohen
+
+et al., 2020) learn a soft distribution for intermediate relations and can be optimized using only the final answer. However, it is not clear how to extend them to the text form.
+
+Question answering over text corpus is also known as "reading comprehension". For simple questions, whose answer can be retrieved directly from the text, pretrained models (Devlin et al., 2018; Lan et al., 2019) have performed better than humans (Zhang et al., 2020). For multi-hop questions that are much more challenging, existing works (Ding et al., 2019; Fang et al., 2019; Tu et al., 2020; Zhao et al., 2019a) usually convert the text into a rule-based or learning-based entity graph, and then use graph neural networks (Kipf and Welling, 2016) to perform implicit reasoning. Similar to PullNet, they are weak in interpretability. Besides, most of them build the graph by just connecting relevant entities, missing the important edge textual information.
+
+# 3 Methodology
+
+# 3.1 Preliminary
+
+We conduct multi-hop reasoning on a relation graph, which takes entities as nodes and relations between them as edges. The relations can be of different forms, specifically, constrained labels or free texts. The former is also known as structured Knowledge Graph (e.g., Wikidata (Vrandecic and Krötzsch, 2014)), which predefines a set of predicates to represent the entity relations. The latter can be easily extracted from large-scale document corpora according to the co-occurrence of entity pairs. Figure 1 shows examples of these two forms. In this paper we call them label form and text form respectively, and use mixed form to denote a relation graph consisting of both labels and texts.
+
+We denote a relation graph as $\mathcal{G}$ , its entities as $\mathcal{E}$ and its edges as $\mathcal{R}$ . Let $n$ denote the number of entities, then $\mathcal{R}$ is an $n \times n$ matrix whose element $r_{i,j}$ represents the relations between the head entity $e_i$ and the tail entity $e_j$ . $r_{i,j}$ can be a set of labels (for label form) or texts (for text form) or both (for mixed form). A multi-hop question $q$ usually starts from a topic entity $e_x$ and needs to traverse across relations to reach the answer entities $Y = \{e_{y^1}, \dots, e_{y|Y|\cdot}\}$ .
+
+# 3.2 TransferNet
+
+To infer the answer of a multi-hop question, TransferNet starts from the topic entity and jumps for
+
+$T$ steps. At each step, it attends to different parts of the question to determine the most proper relation. TransferNet maintains a score for each entity to denote their activated probabilities, which are initialized to 1 for the topic entity and 0 for the others. At each step, TransferNet computes a score for each relation to denote their activated probabilities in terms of the current query, and then transfer the entity scores across those activated relations. Figure 2 shows the framework.
+
+Formally, we denote the entity scores of step $t$ as a row vector $\mathbf{a}^t \in [0,1]^n$ , where $[0,1]$ means a real number between 0 and 1. $\mathbf{a}^0$ is the initial scores, i.e., only the topic entity $e_x$ gets 1. At step $t$ , we attend to part of the question to get the query vector $\mathbf{q}^t \in \mathcal{R}^d$ , where $d$ is the hidden dimension.
+
+$$
+\mathbf {q}, \left(\mathbf {h} _ {1}, \dots , \mathbf {h} _ {| q |}\right) = \operatorname {E n c o d e r} (q; \theta_ {e}),
+$$
+
+$$
+\mathbf {q} \mathbf {k} ^ {t} = f ^ {t} (\mathbf {q}; \theta_ {f t}),
+$$
+
+$$
+\mathbf {b} ^ {t} = \operatorname {S o f t m a x} \left(\mathbf {q k} ^ {t} \cdot \left[ \mathbf {h} _ {1}; \dots ; \mathbf {h} _ {| q |} \right] ^ {\top}\right), \tag {1}
+$$
+
+$$
+\mathbf {q} ^ {t} = \sum_ {i = 1} ^ {| q |} b _ {i} ^ {t} \mathbf {h} _ {i}.
+$$
+
+$\mathbf{q}$ denotes the question embedding. $f^t$ is a projecting function of step $t$ , which maps $\mathbf{q}$ to a specific query key $\mathbf{qk}^t$ . $\mathbf{qk}^t$ is the attention key to compute scores for each word based on their hidden vector $\mathbf{h}_i$ . $\mathbf{q}^t$ is the weighted sum of $\mathbf{h}_i$ .
+
+In terms of $\mathbf{q}^t$ TransferNet computes the relation scores $\mathbf{W}^t\in [0,1]^{n\times n}$ ..
+
+$$
+\mathbf {W} ^ {t} = g \left(\mathbf {q} ^ {t}; \theta_ {g}\right). \tag {2}
+$$
+
+$\theta_{g}$ denotes the learnable parameters. We will have different implementations of $g$ for the label form and the text form, which will be introduced in Sec.3.5.
+
+Then we can simulate the "jumping across edges" as the following formulation:
+
+$$
+\mathbf {a} ^ {t} = \mathbf {a} ^ {t - 1} \mathbf {W} ^ {t}. \tag {3}
+$$
+
+Specifically, we have
+
+$$
+a _ {j} ^ {t} = \sum_ {i = 1} ^ {n} a _ {i} ^ {t - 1} \times W _ {i, j} ^ {t}. \tag {4}
+$$
+
+It means that the production of entity $e_i$ 's previous score and the edge $r_{i,j}$ 's current score will be collected into $e_j$ 's current score.
+
+
+
+
+Figure 2: The framework of TransferNet (top) and example of reasoning process (bottom).
+
+
+
+
+
+After repeating for $T$ times, we get the entity scores of each step $\mathbf{a}^1, \mathbf{a}^2, \dots, \mathbf{a}^T$ . Then we compute their weighted sum as the final output:
+
+$$
+\mathbf {c} = \operatorname {S o f t m a x} (\operatorname {M L P} (\mathbf {q}))
+$$
+
+$$
+\mathbf {a} ^ {*} = \sum_ {t = 1} ^ {T} c _ {t} \mathbf {a} ^ {t}, \tag {5}
+$$
+
+where $\mathbf{c} \in [0,1]^T$ denotes the probability distribution of the question's hop, and $c_t$ is the probability value of hop $t$ . We can answer all questions from 1-hop to $T$ -hop by automatically determine its hop number. The entity with maximum score in $\mathbf{a}^*$ is outputed as the answer.
+
+TransferNet is a highly-transparent model. As shown in the example of Figure 2, we can easily track the model behaviour by visualizing the activated words, relations, and entities at each step (see Sec.5.4 for more examples).
+
+# 3.3 Training
+
+Given the golden answer set $Y = \{e_{y^1},\dots ,e_{y|Y|}\}$ , we construct the target score vector $\mathbf{y}\in \{0,1\} ^n$ by
+
+$$
+y _ {i} = \left\{ \begin{array}{l} 1, \text {i f} e _ {i} \in Y, \\ 0, \text {e l s e .} \end{array} \right. \tag {6}
+$$
+
+Then we take the L2 Euclidean distance between $\mathbf{a}^*$ and $\mathbf{y}$ as our training objective:
+
+$$
+\mathcal {L} = \left\| \mathbf {a} ^ {*} - \mathbf {y} \right\|. \tag {7}
+$$
+
+Note that TransferNet is totally differentiable, therefore we can learn all of the intermediate scores (i.e., question attention, relation scores, and entity scores of each step) via this simple objective..
+
+# 3.4 Additional Modules
+
+We propose two modules to facilitate the learning of TransferNet.
+
+Score Truncation. According to Equation 4, $a_{j}^{t}$ may exceed 1 after a transfer step. A too large score will have a bad influence to the gradient computation. Especially when the hop increases, it may lead to gradient explosion. Besides, our loss function, Equation 7, will fail if the final score has an unlimited value. So we need to rectify the entity scores after each transfer step, to ensure the value range is in [0, 1]. At the same time, we need to maintain the differentiability of the operation. We propose such a truncation function:
+
+$$
+\operatorname {T r u n c} (a) = a / z (a),
+$$
+
+$$
+z (a) = \left\{ \begin{array}{l l} a. \det \mathrm {a t a c h} (), & \text {i f} a > 1, \\ 1, & \text {i f} a \leq 1. \end{array} \right. \tag {8}
+$$
+
+After each transfer step, we truncate $\mathbf{a}^t$ by applying this function to each of its elements.
+
+Language Mask. TranferNet does not consider the language bias of the question, which may include some hints for its answer. For example, in the text-formed relation graph we may have (Harry Potter, sub> was published in , United Kingdom) and (Harry Potter, sub> was published in , 1997). These two triples depict different aspects (i.e., the publication place and the publication time of Harry Potter) but with the same relation text. As a result, given the question Where was Harry Potter published, TransferNet will produce the same scores for United Kingdom and 1997, and thus use 1997 to wrongly answer the Where-question.
+
+To solve this issue, we propose a language mask to incorporate the question hints. We predict a mask score for each entity using the question embedding:
+
+$$
+\mathbf {m} = \operatorname {S i g m o i d} (\operatorname {M L P} (\mathbf {q})), \tag {9}
+$$
+
+where $\mathbf{m} \in [0,1]^n$ , $m_i$ denotes the mask score of entity $e_i$ , MLP (short for multi-layer perceptron) projects $d$ -dimensional feature to $n$ -dimension. We multiply the mask to the final entity scores,
+
+$$
+\hat {\mathbf {a}} ^ {*} = \mathbf {m} \odot \mathbf {a} ^ {*}, \tag {10}
+$$
+
+where $\odot$ means element-wise multiplication. The $\mathbf{a}^*$ in the objective function Equation 7 should be replaced with $\hat{\mathbf{a}}^*$ . Note that we need the language mask only in the text form, because the predicates of label form have no ambiguity.
+
+# 3.5 Relation Score Computation
+
+Consider Equation 2, $\mathbf{W}^t = g(\mathbf{q}^t;\theta_g)$ , we design different implementations of $g$ for different relation forms.
+
+# 3.5.1 Label Form
+
+In the label form, relations are represented with a fixed predicate set $\mathcal{P}$ . We first compute probabilities for these predicates in terms of $\mathbf{q}^t$ , and then collect corresponding probabilities of $r_{i,j}$ as $W_{i,j}^{t}$ .
+
+Formally, the predicate distribution is computed by
+
+$$
+\mathbf {p} ^ {t} = \operatorname {S o f t m a x} (\operatorname {M L P} (\mathbf {q} ^ {t})). \tag {11}
+$$
+
+The Softmax function can be replaced with Sigmoid if predicates are not mutually exclusive, i.e., multiple predicates will be activated meanwhile. Let $b$ denote the maximum number of relations between a pair of entity, then we can denote the relation as $r_{i,j} = \{r_{i,j,1},\dots ,r_{i,j,b}\}$ , where $r_{i,j,k}\in \{1,2,\dots ,|\mathcal{P}|\}$ . The predicate probabilities are collected in terms of the relation labels:
+
+$$
+W _ {i, j} ^ {t} = \sum_ {k = 1} ^ {b} p _ {r _ {i, j, k}} ^ {t}. \tag {12}
+$$
+
+We gather the probabilities by summing them up. max is another feasible option, but we find $\sum$ is more efficient and more stable.
+
+# 3.5.2 Text Form
+
+In the text form, relations are represented with natural language descriptions. The graph is built by extracting the co-occurring sentence of a pair of
+
+entity and replacing the entities with special placeholders. For example, the sentence *Bill Gates and Melinda Gates* have been married for 26 years contributes an edge from *Bill Gates to Melinda Gates*, whose relation text is sub> and have been married for 26 years, as shown in Figure 2. We can get the reverse relations by exchanging the placeholders of subject and object, but for simplicity, we do not show them in the figure.
+
+Let $r_{i,j} = \{r_{i,j,1},\dots ,r_{i,j,b}\}$ and $r_{i,j,k}$ denotes the $k$ -th relation sentence. We use a relation encoder to obtain the relation embeddings, and then compute the relation score by
+
+$$
+\mathbf {r} _ {i, j, k} = \operatorname {E n c o d e r} \left(r _ {i, j, k}; \theta_ {r}\right),
+$$
+
+$$
+p _ {r _ {i, j, k}} ^ {t} = \underset {b} {\text {S i g m o i d}} (\operatorname {M L P} \left(\mathbf {r} _ {i, j, k} \odot \mathbf {q} ^ {t}\right)), \tag {13}
+$$
+
+$$
+W _ {i, j} ^ {t} = \sum_ {k = 1} ^ {b} p _ {r _ {i, j, k}} ^ {t},
+$$
+
+where $\odot$ means element-wise product, MLP maps the feature from $d$ -dimensional to 1-dimensional.
+
+Since there are a huge amount of (usually millions of) relation texts in a relation graph, it is impossible to compute the embeddings and scores for all of them. So in practice, we select a subset of relations at each step. Specifically, at step $t$ , we select entities whose previous score $a_{i}^{t - 1}$ is larger than a predefined threshold $\tau$ and only consider relations that start from these entities. Besides, if there are too many relations meeting this condition, we will only preserve top $\omega$ of them, sorting based on their subject entity score. By doing so, we just need to consider at most $\omega$ relations at each step.
+
+We use the same method to process the mixed form, by simply regarding the label predicates as one-word sentences.
+
+# 4 Experiments
+
+# 4.1 Datasets
+
+MetaQA (Zhang et al., 2017) is a large-scale dataset of multi-hop question answering over knowledge graph, which extends WikiMovies (Miller et al., 2016) from single-hop to multi-hop. It contains more than 400k questions, which are generated using dozens of templates and have up to 3 hops. Its knowledge graph is from the movie domain, including 43k entities, 9 predicates, and 135k triples.
+
+Besides the label from, we also constructed the text form of MetaQA by extracting the text corpus of WikiMovies (Miller et al., 2016), which
+
+introduces the information of movies with free text. Following (Sun et al., 2019), we used exact match of surface forms for entity recognition and linking. Given an article of a movie, we took the movie as subject and the other relevant entities (e.g., mentioned actor, year, and etc) as objects. The sentence was processed with placeholders, that is, replacing the movie with $\langle \text{sub} \rangle$ (if it occurs) and the object entity with $\langle \text{obj} \rangle$ , and then regarded as the relation texts. An entity pair can have multiple textual relations.
+
+WebQSP (Yih et al., 2016) has a smaller scale of questions but larger scale of knowledge graph. It contains thousands of natural language questions based on Freebase (Bollacker et al., 2008), which has millions of entities and triples. Its questions are either 1-hop or 2-hop. Following (Saxena et al., 2020), we pruned the knowledge base to contain only mentioned predicates and within 2-hop triples of mentioned entities. As a result, the processed knowledge graph includes 1.8 million entities, 572 predicates, and 5.7 million triples. We only consider the label form of WebQSP due to its huge scale.
+
+CompWebQ (Talmor and Berant, 2018) is an extended version of WebQSP with more hops and constraints. Following (Sun et al., 2019), we retrieved a subgraph for each question using PageRank algorithm. On average, there are 1948 entities in each subgraph and the recall is $64\%$ . Table 1 lists the statistics of these datasets.
+
+| Dataset | Train | Dev | Test |
| MetaQA 1-hop | 96,106 | 9,992 | 9,947 |
| MetaQA 2-hop | 118,948 | 14,872 | 14,872 |
| MetaQA 3-hop | 114,196 | 14,274 | 14,274 |
| WebQSP | 2,998 | 100 | 1,639 |
| CompWebQ | 27,623 | 3,518 | 3,531 |
+
+Table 1: Dataset statistics.
+
+# 4.2 Baselines
+
+KVMemNN (Miller et al., 2016) uses the key-value memory to store knowledge and conducts multi-hop reasoning by iteratively reading the memory.
+
+VRN (Zhang et al., 2017) learns the reasoning path via reinforcement learning. Its intermediate results have a good interpretability.
+
+SRN (Qiu et al., 2020) improves VRN by beam search and reward shaping strategy, boosting its speed and performance.
+
+GraftNet (Sun et al., 2018) extracts a question-specific subgraph from the entire relation graph with heuristics, and then uses graph neural networks to infer the answer.
+
+PullNet (Sun et al., 2019) improves GraftNet by learning to retrieve the subgraph with a graph CNN instead of heuristics.
+
+ReifKB (Cohen et al., 2020) proposes a scalable implementation of probability transfer over large-scale knowledge graph of label form. It can be regarded as a degenerated case of TransferNet.
+
+EmbedKGQA (Saxena et al., 2020) takes KGQA as a link prediction task and incorporates knowledge graph embeddings (Bordes et al., 2013; Trouillon et al., 2016) to help predict the answer.
+
+# 4.3 Implementations
+
+We added reversed relations into the relation graph, leading to double size of predicates and triples. For the text form, we exchanged the placeholder $<\mathrm{sub}>$ and $<\mathrm{obj}>$ as the reversed relation, e.g., $<\mathrm{sub}>$ co-founded the $<\mathrm{obj}>$ is converted to $<\mathrm{obj}>$ co-founded the $<\mathrm{sub}>$ .
+
+For the experiments of MetaQA, we set the step number $T = 3$ . We used bi-directional GRU (Chung et al., 2014) as the question encoder, and set the hidden dimension as 1024. The projecting function $f^t$ was a stack of linear layer and Tanh layer. The involved MLPs were implemented as simple linear layers. For the text form, we used another bi-directional GRU as the relation encoder. The threshold $\tau$ was set to 0.7 and $\omega$ was set to 400. Since the question hop is provided in MetaQA, we used the golden hop number as an auxiliary objective to help learn the hop distribution $\mathbf{c}$ . We computed the cross entropy loss and added it into Equation 7 after multiplying a factor of 0.01. The model was optimized using RAdam (Liu et al., 2020) with a learning rate 0.001 for 20 epochs, which took several hours for the label form and about one day for the text form on a single GPU of NVIDIA 1080Ti.
+
+For the experiments of WebQSP and CompWebQ, we set the step number $T = 2$ . We used a pretrained BERT (Devlin et al., 2018) as the question encoder and finetuned its parameters on our task. There is no hop annotations so we did not use the auxiliary loss. Other settings are the same as MetaQA.
+
+| Model | MetaQA | WebQSP | CompWebQ |
| 1-hop | 2-hop | 3-hop |
| KVMemNN (Miller et al., 2016) | 95.8 | 25.1 | 10.1 | 46.7 | 21.1 |
| VRN (Zhang et al., 2017) | 97.5 | 89.9 | 62.5 | - | - |
| GraftNet (Sun et al., 2018) | 97.0 | 94.8 | 77.7 | 66.4 | 32.8 |
| PullNet (Sun et al., 2019) | 97.0 | 99.9 | 91.4 | 68.1 | 47.2 |
| SRN (Qiu et al., 2020) | 97.0 | 95.1 | 75.2 | - | - |
| ReifKB (Cohen et al., 2020) | 96.2 | 81.1 | 72.3 | 52.7 | - |
| EmbedKGQA (Saxena et al., 2020) | 97.5 | 98.8 | 94.8 | 66.6 | - |
| TransferNet (Ours) | 97.5 | 100 | 100 | 71.4 | 48.6 |
+
+Table 2: Hits@1 results of the label-formed datasets. TransferNet achieves $100\%$ accuracy in the 2-hop and 3-hop questions of MetaQA. On WebQSP and CompWebQ it also outperforms baseline models by a large margin.
+
+| Model | MetaQA Text | MetaQA Text + 50% Label |
| 1-hop | 2-hop | 3-hop | 1-hop | 2-hop | 3-hop |
| KVMemNN (Miller et al., 2016) | 75.4 | 7.0 | 19.5 | 75.7 | 48.4 | 35.2 |
| GraftNet (Sun et al., 2018) | 82.5 | 36.2 | 40.2 | 91.5 | 69.5 | 66.4 |
| PullNet (Sun et al., 2019) | 84.4 | 81.0 | 78.2 | 92.4 | 90.4 | 85.2 |
| TransferNet (Ours) | 95.5 | 98.1 | 94.3 | 96.0 | 98.5 | 94.7 |
+
+Table 3: Hits@1 results on MetaQA of the text form and mixed form.
+
+# 5 Results
+
+# 5.1 Results on Label-Formed Graph
+
+Table 2 compares different models on label-formed datasets. TransferNet performs perfectly in the 2-hop and 3-hop questions of MetaQA, that is, achieving $100\%$ accuracy. As for the 1-hop questions of MetaQA, TransferNet achieves $97.5\%$ , on a par with previous models like VRN and EmbedKGQA. We analyze the wrong cases of 1-hop and find that the errors are caused by the ambiguity of entities. For example, the question who acted in The Last of the Mohicans asks the actors of the movie The Last of the Mohicans. In the knowledge graph there are two movies with this name, one released in 1936 and the other released in 1920. Our model outputs the actors of both movies, whereas the MetaQA dataset only considers the actors of the 1920 one as golden answer, causing an inevitable mismatch. Previous work's performance should also suffer from this dataset fault. In the questions of 2-hop and 3-hop, the ambiguity is mostly eliminated by the relation restrictions. Therefore, TransferNet can achieve $100\%$ accuracy. We can say that the label-formed MetaQA dataset has been nearly solved by our TransferNet.
+
+WebQSP is more challenging than MetaQA, because it has a much more predicates and triples yet much less training examples. TransferNet achieves $71.4\%$ accuracy, beating previous state-of-the-art models $(68.1\%)$ by a large margin, implying that it is well qualified for large-scale knowledge base.
+
+On the CompWebQ dataset, we compare the
+
+results with Sun et al. (2019) on the dev set. TransferNet achieves $48.6\%$ accuracy, still better than PullNet $(47.2\%)$ .
+
+# 5.2 Results on Text-Formed Graph
+
+In Table 2 we compare TransferNet with state-of-the-art models that are able to handle text-formed relations. We can see that TransferNet significantly outperforms previous models. Especially for questions of 2-hop and 3-hop, we improve the accuracy from $81.0\%$ to $98.1\%$ and from $78.2\%$ to $94.3\%$ respectively. PullNet and GraftNet both infer the answer by aggregating the graph features implicitly, and thus cannot provide the intermediate relation path. Compared with them, TransferNet not only has a superior performance, but also has a better interpretability (see Sec.5.4).
+
+Besides the pure text form, we also compare the mixed form following (Sun et al., 2018, 2019). That is, randomly selecting $50\%$ of the label-formed triples and add them into the text-formed relation graph. In this setting, we simply consider the predicates as sentences containing just one word, and use the relation encoder (see Sec.3.5.2) to process them. These $50\%$ labels slightly improve the performance of TransferNet over the pure text form (about $0.4\%$ ), because some relations are missing in the text corpus. Compared with PullNet, TransferNet is still in the lead by a large gap (85.2% v.s. 94.7%).
+
+
+Figure 3: Reasoning process of 3-hop questions. The top is in label form, where the suffix “\_rev” means reverse relation. The bottom is in text form, where “mask” in blue means the language mask. We show the relation scores in purple and highlight the activated entities and relations (score $>0.8$ ) and words (score $>0.05$ ) in red.
+
+ | Label Form | Text Form |
| TransferNet | 99.4 | 95.8 |
| w/o score truncation | 94.7 | 75.3 |
| w/o language mask | - | 62.1 |
| w/o auxiliary loss | 98.6 | 94.7 |
+
+Table 4: Ablation study on MetaQA. We show the average hits@1 of different hops.
+
+# 5.3 Ablation Study
+
+Table 4 shows results of ablation study. We can see that the score truncation and language mask are both important, especially for the text form. As stated in Sec. 3.4, the language mask is not needed in the label form. The auxiliary loss (see Sec. 4.3) slightly improves the performance because it helps the learning of hop attention.
+
+# 5.4 Interpretability
+
+We visualize the intermediate results of TransferNet for two 3-hop questions in Figure 3. The entities and relations whose score is larger than 0.8 are highlighted in red. The top question is aimed at the label-formed relation graph. The activated predicates for three hops are directed_by, directed_by_rev, and starred Actors respectively, where the suffix _rev means reverse relation. The bottom question is aimed at the text form. At step 1, TransferNet tries to find the screenwriter of the topic movie, and activates the relation whose tex
+
+tual description is "based on the novel of the same name by $$ ". At step 2, the movie written by Harold Bell Wright is found. At step 3, we aim to find the movie's release year. But since the text descriptions of Western (which is the movie's genre) and 1926 are very similar, both of these two entities are activated. Here the proposed language mask successfully filters the wrong answers out.
+
+# 5.5 Model Efficiency
+
+
+Figure 4: Comparison of data efficiency (left) and convergence speed (right) on label-formed MetaQA.
+
+
+
+Figure 4 shows the average hits@1 on the label form of MetaQA when the models are trained with partial training examples (left) and at different epochs (right). We can see that TransferNet is very data-efficient and converges very fast. With only $10\%$ training data, it still achieves the same performance as the entire training set. And it only
+
+needs two epochs to reach the optimal results.
+
+# 6 Conclusions
+
+We proposed TransferNet, an effective and transparent framework for multi-hop QA over knowledge graph or text-formed relation graph. It achieved $100\%$ accuracy on 2-hop and 3-hop questions of label-formed MetaQA, nearly solving the dataset. On the more challenging WebQSP, CompWebQ and text-formed MetaQA, it also outperforms other state-of-the-art models significantly. Qualitative analysis shows the good interpretability of TransferNet.
+
+# Acknowledgments
+
+This work is supported by the NSFC Key Project (U1736204), grants from the Institute for Guo Qiang, Tsinghua University (2019GQB0003), Beijing Academy of Artificial Intelligence, Huawei Inc, and MOE AcRF Tier 2.
+
+# References
+
+Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. 2013. Semantic parsing on freebase from question-answer pairs. In EMNLP.
+Kurt Bollacker, Colin Evans, Praveen Paritosh, Tim Sturge, and Jamie Taylor. 2008. Freebase: a collaboratively created graph database for structuring human knowledge. In SIGMOD.
+Antoine Bordes, Nicolas Usunier, Sumit Chopra, and Jason Weston. 2015. Large-scale simple question answering with memory networks. arXiv preprint arXiv:1506.02075.
+Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. 2013. Translating embeddings for modeling multi-relational data. In Advances in neural information processing systems, pages 2787-2795.
+Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. 2017. Reading wikipedia to answer open-domain questions. In ACL, pages 1870-1879.
+Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. 2014. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555.
+William W Cohen, Haitian Sun, R Alex Hofer, and Matthew Siegler. 2020. Scalable neural methods for reasoning with a symbolic knowledge base. arXiv preprint arXiv:2002.06115.
+
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
+Ming Ding, Chang Zhou, Qibin Chen, Hongxia Yang, and Jie Tang. 2019. Cognitive graph for multi-hop reading comprehension at scale. In ACL, pages 2694-2703.
+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 *NAACL-HLT*, pages 2368-2378.
+Yuwei Fang, Siqi Sun, Zhe Gan, Rohit Pillai, Shuohang Wang, and Jingjing Liu. 2019. Hierarchical graph network for multi-hop question answering. arXiv preprint arXiv:1911.03631.
+Daya Guo, Duyu Tang, Nan Duan, Ming Zhou, and Jian Yin. 2018. Dialog-to-action: Conversational question answering over a large-scale knowledge base. In Advances in Neural Information Processing Systems.
+Kelvin Jiang, Dekun Wu, and Hui Jiang. 2019. Freebaseqa: a new factoid qa data set matchingTrivia-style question-answer pairs with freebase. In NAACL-HLT, pages 318-323.
+Mandar Joshi, Eunsol Choi, Daniel S Weld, and Luke Zettlemoyer. 2017. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In ACL, pages 1601-1611.
+Thomas N Kipf and Max Welling. 2016. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907.
+Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2019. Albert: A lite bert for self-supervised learning of language representations. arXiv preprint arXiv:1909.11942.
+Chen Liang, Jonathan Berant, Quoc Le, Kenneth Forbus, and Ni Lao. 2017. Neural symbolic machines: Learning semantic parsers on freebase with weak supervision. In ACL.
+Liyuan Liu, Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, and Jiawei Han. 2020. On the variance of the adaptive learning rate and beyond. In ICLR.
+Alexander Miller, Adam Fisch, Jesse Dodge, Amir Hossein Karimi, Antoine Bordes, and Jason Weston. 2016. Key-value memory networks for directly reading documents. In EMNLP, pages 1400-1409.
+Michael Petrochuk and Luke Zettlemoyer. 2018. Simple questions nearly solved: A new upperbound and baseline approach. In EMNLP, pages 554-558.
+
+Yunqi Qiu, Yuanzhuo Wang, Xiaolong Jin, and Kun Zhang. 2020. Stepwise reasoning for multi-relation question answering over knowledge graph with weak supervision. In WSDM, pages 474-482.
+Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: $100,000+$ questions for machine comprehension of text. In EMNLP, pages 2383-2392.
+Amrita Saha, Ghulam Ahmed Ansari, Abhishek Laddha, Karthik Sankaranarayanan, and Soumen Chakrabarti. 2019. Complex program induction for querying knowledge bases in the absence of gold programs. Transactions of the Association for Computational Linguistics.
+Apoory Saxena, Aditay Tripathi, and Partha Talukdar. 2020. Improving multi-hop question answering over knowledge graphs using knowledge base embeddings. In ACL, pages 4498-4507.
+Haitian Sun, Tania Bedrax-Weiss, and William Cohen. 2019. Pullnet: Open domain question answering with iterative retrieval on knowledge bases and text. In EMNLP-IJCNLP, pages 2380-2390.
+Haitian Sun, Bhuwan Dhingra, Manzil Zaheer, Kathryn Mazaitis, Ruslan Salakhutdinov, and William Cohen. 2018. Open domain question answering using early fusion of knowledge bases and text. In *EMNLP*, pages 4231-4242.
+Alon Talmor and Jonathan Berant. 2018. The web as a knowledge-base for answering complex questions. In *NAACL-HLT*, pages 641–651.
+Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, and Guillaume Bouchard. 2016. Complex embeddings for simple link prediction. ICML.
+Ming Tu, Kevin Huang, Guangtao Wang, Jing Huang, Xiaodong He, and Bowen Zhou. 2020. Select, answer and explain: Interpretable multi-hop reading comprehension over multiple documents. In AAAI, pages 9073-9080.
+Denny Vrandecic and Markus Krötzsch. 2014. Wiki-data: a free collaborative knowledge base.
+Kun Xu, Yuxuan Lai, Yansong Feng, and Zhiguo Wang. 2019. Enhancing key-value memory neural networks for knowledge based question answering. In NAACL-HLT, pages 2937-2947.
+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 EMNLP, pages 2369-2380.
+Wen-tau Yih, Ming-Wei Chang, Xiaodong He, and Jianfeng Gao. 2015. Semantic parsing via staged query graph generation: Question answering with knowledge base. In ACL-IJCNLP, pages 1321-1331.
+
+Wen-tau Yih, Matthew Richardson, Christopher Meek, Ming-Wei Chang, and Jina Suh. 2016. The value of semantic parse labeling for knowledge base question answering. In ACL, pages 201-206.
+Yuyu Zhang, Hanjun Dai, Zornitsa Kozareva, Alexander J Smola, and Le Song. 2017. Variational reasoning for question answering with knowledge graph. arXiv preprint arXiv:1709.04071.
+Zhuosheng Zhang, Junjie Yang, and Hai Zhao. 2020. Retrospective reader for machine reading comprehension. arXiv preprint arXiv:2001.09694.
+Chen Zhao, Chenyan Xiong, Corby Rosset, Xia Song, Paul Bennett, and Saurabh Tiwary. 2019a. Transformer-xh: Multi-evidence reasoning with extra hop attention. In International Conference on Learning Representations.
+Wenbo Zhao, Tagyoung Chung, Anuj Goyal, and Angeliki Metallinou. 2019b. Simple question answering with subgraph ranking and joint-scoring. In NAACL-HLT, pages 324-334.
+Mantong Zhou, Minlie Huang, and Xiaoyan Zhu. 2018. An interpretable reasoning network for multi-relation question answering. In COLING.
\ No newline at end of file
diff --git a/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/images.zip b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..dc47089d41f90f1b03397d281e23d1835f61e1a8
--- /dev/null
+++ b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9c9465c35064e78440d1c1265a846c3110a53466157de625d06858e439d6e7b5
+size 494137
diff --git a/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/layout.json b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..5445ee8acce3e5f3a8ae903d422cf45769e8a603
--- /dev/null
+++ b/transfernetaneffectiveandtransparentframeworkformultihopquestionansweringoverrelationgraph/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8f9c709466a6f42245549ed088daaf221c2b080fd1bf5d9511918b903f65060d
+size 406425
diff --git a/transformerbasedlexicallyconstrainedheadlinegeneration/b927af78-4ac7-4fe4-9c62-9af594803ab4_content_list.json b/transformerbasedlexicallyconstrainedheadlinegeneration/b927af78-4ac7-4fe4-9c62-9af594803ab4_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..36bc5dfce1de9fa46fa0a167cf2fa95f422a965b
--- /dev/null
+++ b/transformerbasedlexicallyconstrainedheadlinegeneration/b927af78-4ac7-4fe4-9c62-9af594803ab4_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0647de914d6bb3957a0e54ae8cba502ba7a4f68f47317a7527472efede6da509
+size 41384
diff --git a/transformerbasedlexicallyconstrainedheadlinegeneration/b927af78-4ac7-4fe4-9c62-9af594803ab4_model.json b/transformerbasedlexicallyconstrainedheadlinegeneration/b927af78-4ac7-4fe4-9c62-9af594803ab4_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..a19ac7e0b86c0fb3c3fd2be9cbdb72feba17005d
--- /dev/null
+++ b/transformerbasedlexicallyconstrainedheadlinegeneration/b927af78-4ac7-4fe4-9c62-9af594803ab4_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:61fc410d82122f0ebf57fa0fbef74be79d93e8766fab341a8bf3be7a39a1caf1
+size 50666
diff --git a/transformerbasedlexicallyconstrainedheadlinegeneration/b927af78-4ac7-4fe4-9c62-9af594803ab4_origin.pdf b/transformerbasedlexicallyconstrainedheadlinegeneration/b927af78-4ac7-4fe4-9c62-9af594803ab4_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7106ae27b010fd24ba752aeaceb0d0f4f085ae6d
--- /dev/null
+++ b/transformerbasedlexicallyconstrainedheadlinegeneration/b927af78-4ac7-4fe4-9c62-9af594803ab4_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a0993899da3707cbc2fa046e6b8e0849ba2200f013a5f05d89bd7607b3f816d5
+size 589312
diff --git a/transformerbasedlexicallyconstrainedheadlinegeneration/full.md b/transformerbasedlexicallyconstrainedheadlinegeneration/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..79335c302f51f1b46909dae2e300f3a0f946ce95
--- /dev/null
+++ b/transformerbasedlexicallyconstrainedheadlinegeneration/full.md
@@ -0,0 +1,176 @@
+# Transformer-based Lexically Constrained Headline Generation
+
+Kosuke Yamada $^{1*}$ Yuta Hitomi $^{2\dagger}$ Hideaki Tamori $^{3}$ Ryohei Sasano $^{1}$
+
+Naoaki Okazaki4 Kentaro Inui5,6 Koichi Takeda1
+
+$^{1}$ Nagoya University $^{2}$ Insight Edge, Inc. $^{3}$ The Asahi Shimbun Company
+
+$^{4}$ Tokyo Institute of Technology $^{5}$ Tohoku University $^{6}$ RIKEN AIP
+
+yamada.kosuke@c.mbox.nagoya-u.ac.jp,
+
+yuta.hitomi@insightedge.jp, tamori-h@asahi.com,
+
+{sasano,takedasu}@i.nagoya-u.ac.jp,
+
+okazaki@c.titech.ac.jp, inui@ecei.tohoku.ac.jp
+
+# Abstract
+
+This paper explores a variant of automatic headline generation methods, where a generated headline is required to include a given phrase such as a company or a product name. Previous methods using Transformer-based models generate a headline including a given phrase by providing the encoder with additional information corresponding to the given phrase. However, these methods cannot always include the phrase in the generated headline. Inspired by previous RNN-based methods generating token sequences in backward and forward directions from the given phrase, we propose a simple Transformer-based method that guarantees to include the given phrase in the high-quality generated headline. We also consider a new headline generation strategy that takes advantage of the controllable generation order of Transformer. Our experiments with the Japanese News Corpus demonstrate that our methods, which are guaranteed to include the phrase in the generated headline, achieve ROUGE scores comparable to previous Transformer-based methods. We also show that our generation strategy performs better than previous strategies.
+
+# 1 Introduction
+
+Following the initial work of Rush et al. (2015), abstractive headline generation using the encoder-decoder model has been studied extensively (Chopra et al., 2016; Nallapati et al., 2016; Paulus et al., 2018). In the automatic headline generation for advertising articles, there are requests to include a given phrase such as a company or product name in the headline.
+
+Generating a headline that includes a given phrase has been considered one of the lexically constrained sentence generation tasks. For these tasks,
+
+there are two major approaches. One approach is to select a plausible sentence including the given phrase from several candidate sentences generated from left to right (Hokamp and Liu, 2017; Anderson et al., 2017; Post and Vilar, 2018). Although these methods can include multiple phrases in a generated sentence, they are computationally expensive due to the large search space of the decoding process. In addition, since they try to force given phrases into sentences at every step of the generation process, these methods may harm the quality of the generated sentence (Liu et al., 2019).
+
+Another approach proposed by Mou et al. (2015) is to generate token sequences in backward and forward directions from the given phrase. Mou et al. (2016) proposed Sequence to Backward and Forward Sequences (Seq2BF), which applies the method of Mou et al. (2015) to the sequence-to-sequence (seq2seq) framework. They use an RNN-based model and adopt the best strategies proposed by Mou et al. (2015), generating the backward sequence from the phrase and then generating the remaining forward sequence. Liu et al. (2019) introduced the Generative Adversarial Network (GAN) to the model of Mou et al. (2015) to resolve the exposure bias problem (Bengio et al., 2015) caused by generating sequences individually, and used the attention mechanism (Bahdanau et al., 2015) to improve the consistency between both sequences. However, their model does not support the seq2seq framework.
+
+Recently, He et al. (2020) used a Transformer-based model (Vaswani et al., 2017), which is reported to achieve high performance, to generate a headline containing a given phrase. They proposed providing an encoder with additional information related to the given phrase. However, their method may not always include the given phrases in the generated headline.
+
+In this study, we work on generating lexically constrained headlines using Transformer-based
+
+Seq2BF. The RNN-based model used by Mou et al. (2016) executes a strategy of continuous generation in one direction, and thus cannot utilize the information of the forward sequence when generating the backward sequence. However, Transformer can execute a variety of generative strategies by devising attention masks, so it can solve the problem of the RNN-based model. We propose a new strategy that generates each token from a given phrase alternately in the backward and forward directions, in addition to adapting and extending the strategies of Mou et al. (2016) to the Transformer architecture.
+
+Our experiments with a Japanese summarization corpus show that our proposed method always includes the given phrase in the generated headline and achieves performance comparable to previous Transformer-based methods. We also show that our proposed generating strategy performs better than the extended strategy of the previous methods.
+
+# 2 Proposed Method
+
+We propose a Transformer-based Seq2BF model that applies Seq2BF proposed by Mou et al. (2016) to the Transformer model to generate headlines including a given phrase. The Seq2BF takes $W(= w_{1},\dots,w_{L};w_{1:L})$ as the given phrase consisting of $L$ tokens and generates the headline $y_{-M: - 1}$ of $M$ tokens backward from $W$ , and the headline $y_{1:N}$ of $N$ tokens forward from $W$ . The Transformer-based Seq2BF is the Transformer model with two generation components, consisting of a linear and a softmax layer (see Figure 1).
+
+In Transformer-based Seq2BF unlike Transformer generating tokens from left to right, the token position changes relatively depending on already generated tokens. We determine the token position, inputting to the positional encoding layer of the decoder, $\lfloor \frac{L + 1}{2} \rfloor$ in $W$ to be 0, and the position in the backward direction to be negative, and the position in the forward direction to be positive.
+
+We consider the following four generation strategies. In addition to two strategies (a) and (b), which extend those proposed by Mou et al. (2016), we propose new strategies (c) and (d) as step-wise alternating generation to keep better contextual consistency in both backward and forward directions.
+
+(a) Generating a sequence backward and then a sequence forward. (Seq-B)
+(b) Generating a sequence forward and then a sequence backward. (Seq-F)
+
+
+
+
+Figure 1: Overview of Transformer-based Seq2BF. Blue, green, and orange boxes indicate Transformer encoder, decoder, and generation components, respectively. The arrow from the encoder to the decoder represents that the decoder's attention mechanism refers to the output from the encoder.
+
+(c) Generating each token backward and then forward alternately. (Tok-B)
+(d) Generating each token forward and then backward alternately. (Tok-F)
+
+Transformer-based Seq2BF is formulated as
+
+$$
+P (Y | X, W) = \prod_ {j \in P O S _ {j}} P \left(y _ {j} \mid Y _ {o b s}, X\right), \tag {1}
+$$
+
+where $X$ denotes tokens of the article, $W$ denotes tokens of the given phrase, $Y(= y_{-M: - 1},w_{1:L},y_{1:N})$ denotes tokens of the final generated headline, and $Y_{obs}$ denotes the alreadygenerated partial headline including $W$ . Also, $POS_{j}$ denotes a list of token positions representing the order of tokens to be generated corresponding to each generation strategy (see Figure 1), for example $[-1, - 2,\dots , - M,1,2,\dots ,N]$ in Seq-B. In Tok-B/F which $M$ and $N$ are different, once the generation in one direction is completed, the generation will be continued only in the remaining directions until $M + N$ steps. For example in the case of $M > N$ in Tok-B, our method completes generating tokens in the forward direction first, so it generates them in both directions until the $2N$ step, and then generates them only in the backward direction from the $2N + 1$ step to the $M + N$ step.
+
+To train the model on these generative strategies, we have prepared an attention mask for the
+
+
+Figure 2: Attention mask patterns on the decoder side during training, used for each generation strategy in Transformer-based Seq2BF. The dark cells indicate the masked areas. These are examples of the headline with the length of 5, where $w_{1}$ is specified as the phrase.
+
+
+
+
+
+
+
+decoder. Transformer can control the generation order of tokens by devising the attention mask used in the decoder's self-attention mechanism. Transformer generates tokens from left to right, so it is sufficient to disable the attention to tokens forward from the input tokens. However, the Transformer-based Seq2BF needs to specify the areas where input tokens disallow the attention in the backward and forward directions, depending on each generation strategy (see Figure 2).
+
+# 3 Experiment
+
+We conducted the experiment to verify the performance of our methods in the headline generation task. The objective of our experiment is to compare our method with previous Transformer-based methods that generate tokens from left to right. We also compare Seq-B/F, the generation orders proposed by Mou et al. (2016), with Tok-B/F, our new generation orders.
+
+# 3.1 Setting
+
+We used the 2019 version of the Japanese News Corpus (JNC)1 (Hitomi et al., 2019) as the dataset. The JNC contains 1,932,399 article-headline pairs, and we split them randomly at a ratio of 98:1:1 for use as training, validation, and test sets, respectively.2 We utilized MeCab (Kudo et al., 2004) with the IPAdic3 and then applied the Byte Pair Encoding (BPE) algorithm4 (Gage, 1994) for tokenization. We trained BPE with 10,000 merge operations and obtained the most frequent 32,000
+
+tokens from the articles and the headlines, respectively.
+
+We used context word sequences extracted from the reference headlines by $\mathrm{GInZA}^5$ as the 'given' phrase. An average of 4.99 phrases was extracted from the reference headlines, and the 'given' phrases consisted of an average of 2.32 tokens. We evaluated our methods using precision, recall, and F-score of ROUGE-1/2/L (Lin, 2004) and success rate (SR), which is the percentage of the headline that includes the given phrase. We also calculated the Average Length Difference (ALD) to analyze the length of the generated headlines, as
+
+$$
+\mathrm {A L D} = \frac {1}{n} \sum_ {i = 1} ^ {n} l _ {i} - \operatorname {l e n} _ {i}, \tag {2}
+$$
+
+where $n$ , $l_i$ , and $\mathrm{len}_i$ are the number of samples, the length of the generated headline, and the length of the reference headline, respectively.
+
+As a comparison method, we adopted the method proposed by He et al. (2020) with vanilla Transformer instead of BART (Lewis et al., 2020). This method controls the output by inserting the given phrase and the special token 'l' in front of the input articles and randomly drops the given phrase from the input articles during training to improve the performance. The hyperparameters of both the comparison and our models are determined as described in Vaswani et al. (2017). The training was terminated when the perplexity computed on the validation set did not update three times in a row, and we used the model with the minimum perplexity on the validation set. The beam size during the inference was set to three.
+
+ | SR | ROUGE-1
+P/R/F | ROUGE-2
+P/R/F | ROUGE-L
+P/R/F | ALD | params ×10^6 |
| Transformer (Vaswani et al., 2017) | 36.3 | 57.1/48.9/51.4 | 29.8/25.2/26.5 | 47.1/40.9/42.8 | -3.62 | 72 |
| Transformer version of He et al. (2020) | 90.2 | 63.1/54.8/57.2 | 36.0/30.7/32.2 | 51.9/45.4/47.4 | -3.02 | 72 |
| Transformer-based Seq2BF | (Seq-B) | 100.0 | 63.6/52.4/55.8 | 37.4/30.2/32.3 | 54.3/44.2/47.5 | -4.19 | 80 |
| (Seq-F) | 100.0 | 64.6/53.2/56.7 | 38.1/30.8/32.9 | 54.8/44.9/48.1 | -4.30 | 80 |
| (Tok-B) | 100.0 | 66.6/52.9/57.6 | 39.3/30.8/33.6 | 55.6/45.0/48.6 | -5.29 | 80 |
| (Tok-F) | 100.0 | 67.6/51.6/57.1 | 40.1/30.2/33.5 | 56.7/44.2/48.6 | -6.05 | 80 |
+
+Table 1: Experimental results. SR means success rate, and P/R/F means Precision/Recall/F-score.
+
+
+(a) Seq-B
+
+
+(b) Seq-F
+Figure 3: Histogram of the character-level position of the given phrase in the headlines generated by Transformer-based Seq2BF. Blue and orange bars indicate the generated and reference headlines, respectively.
+
+
+(c) Tok-B
+
+
+(d) Tok-F
+
+# 3.2 Results
+
+Table 1 shows the experimental results. Note that the proposed and compared methods achieved higher ROUGE scores than Transformer because we computed ROUGE scores between the reference and the system-generated headlines, including the phrase extracted from the reference headlines.
+
+Our methods always include the given phrase in the generated headlines, whereas the comparison method had a success rate of around $90\%$ . Although the recall of ROUGE scores tended to be higher in the comparison method than in the proposed method, the precision and F-scores of ROUGE scores in the proposed method were comparable or higher than in the comparison method. As we notice from ALD, we found that Transformer-based Seq2BF generated shorter headlines than the Transformer models. It has been confirmed that the Transformer models with a single output direction tend to generate shorter headlines than the reference. Because Transformer-based Seq2BF has two output directions, the generated headlines were considered to be even shorter. This is the reason why our methods had lower recall scores than the comparison methods. Comparing the generation strategies of Transformer-based Seq2BF, we can see that Tok-B/F had a higher score than Seq-B/F.
+
+To analyze how the four generation strategies of Transformer-based Seq2BF affected the system-generated headlines, we showed the character-level
+
+position of the given phrase in the headline using histograms in Figure 3. As we can see, all generation strategies had similar distributions in the reference and system-generated headlines, and hence Transformer-based Seq2BF has also been presumed to learn the position of a given phrase in the headline. Focusing on the headlines that include the given phrase in the head, the difference between the reference and the headline generated by Tok-B/F is smaller than that of the headline generated by Seq-B/F. Also, the headlines generated by Seq-B tend to place the given phrase in the beginning, while this tendency is opposite for the headlines generated by Seq-F.
+
+Table 2 shows examples of the headlines generated by the Transformer-based Seq2BF (Tok-B). When a product name such as "桉とイフなのバフロー" ("Cherry Blossom and Sardine Parfait") was given, our methods could generate a natural headline that includes the given phrase. Also, given the phrase "6月末" ("the End of June"), our methods generated a headline with the addition of "販売" ("on Sale") that matched the given phrase. On the other hand, we found the problem of generating the same words related to the given phrase in the backward and forward directions, such as the headline generated given "群れ" ("Schools"). In addition, given the phrase "約1万匹" ("About 10,000"), our methods generated the headline meaning that special sweets contain about 10,000 sardines. In this way, examples that were not faithful to the article were confirmed.
+
+| Article: 約1万匹のイフロー群て泳く樣子を見らる京都水族館。その展示に合わせ、まばじり変わった特別スイーニット6月末まて販売いたします。名前は「桜のはんだパフローで、...At the Kyoto Aquarium, you can see about 10,000 sardines swimming in schools. To coincide with this exhibition, a special sweet that is slightly unique will be on sale until the end of June. It is called “Cherry Blossom and Sardine Parfait,” and ... |
| Reference Headline:「目からウロコのお願いいたします」京都水族館にイフロー served Sardine Parfait |
| “Scales Falling from Your Eyes”- Kyoto Aquarium Serves Sardine Parfait |
| Given
+Phrases | 桜のはんだパフロー Cherry Blossom and Sardine Parfait
+6月末 the End of June
+群た Schools
+約1万匹 About 10,000 | Generated
+Headlines | 「桜のはんだパフロー特別スイーニット京都水族館Special Sweets “Cherry Blossom and Sardine Parfait” at Kyoto Aquarium
+イラジの特別スイーニット、6月まて販売京都水族館Special Sardine Sweets on Sale at Kyoto Aquarium until the End of June
+イラジの群たのイラジ、特別スイーニット京都水族館Sardines of Schools of Sardines, to Special Sweets at Kyoto Aquarium
+イラジ約1万匹の特別スイーニット京都水族館Special Sweets of About 10,000 Sardines at Kyoto Aquarium |
+
+Table 2: Examples of headlines generated by Transformer-based Seq2BF (Tok-B).
+
+As can be seen from Table 2, various headlines are generated according to given phrases. In general, it is difficult to control the diversity in headline generation, but our methods can generate diverse headlines by giving a variety of phrases. However, it may be necessary to discuss whether our methods could generate diverse headlines. The reason is that all examples are only partially diverse. Specifically, they always include "特別スイーリ" ("Special Sweets") and "京都水族館" ("Kyoto Aquarium") as important contents in the headline.
+
+# 4 Conclusion
+
+We proposed Transformer-based Seq2BF that generates the lexically constrained headline by devising the attention mask for the decoder and generating backward and forward sentences from the phrase. Our experiments using the JNC demonstrated that Transformer-based Seq2BF always includes the given phrase in the generated headline and obtains comparable performance compared to previous Transformer-based methods. We also showed that strategies of generating each token alternately between backward and forward directions are more effective than that of generating a sequence in one direction and then a sequence in another direction.
+
+In future work, we will investigate whether Transformer-based Seq2BF can generate natural headlines even when given a variety of phrases, such as phrases not in the reference or the article, and examine if our methods can creatively generate diverse headlines by giving a variety of phrases quantitatively. Also, we will explore methods for generating headlines that include multiple phrases.
+
+# References
+
+Peter Anderson, Basura Fernando, Mark Johnson, and Stephen Gould. 2017. Guided open vocabulary image captioning with constrained beam search. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing (EMNLP 2017), pages 936-945.
+Dzmitry Bahdanau, Kyung Hyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In Proceedings of the 3rd International Conference on Learning Representations (ICLR 2015).
+Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. 2015. Scheduled sampling for sequence prediction with recurrent neural networks. In Proceedings of the 28th International Conference on Neural Information Processing (NIPS 2015), pages 1171-1179.
+Sumit Chopra, Michael Auli, and Alexander M. Rush. 2016. Abstractive sentence summarization with attentive recurrent neural networks. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT 2016), pages 93-98.
+Philip Gage. 1994. A new algorithm for data compression. C Users Journal, 12(2):23-38.
+Junxian He, Wojciech Krysciński, Bryan McCann, Nazneen Rajani, and Caiming Xiong. 2020. CTRLsum: Towards generic controllable text summarization. arXiv preprint arXiv:2012.04281.
+Yuta Hitomi, Yuya Taguchi, Hideaki Tamori, Ko Kikuta, Jiro Nishitoba, Naoaki Okazaki, Kentaro Inui, and Manabu Okumura. 2019. A large-scale multi-length headline corpus for analyzing length-constrained headline generation model evaluation. In Proceedings of the 12th International Conference on Natural Language Generation (INLG 2019), pages 333-343.
+
+Chris Hokamp and Qun Liu. 2017. Lexically constrained decoding for sequence generation using grid beam search. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (ACL 2017), pages 1535-1546.
+Taku Kudo, Kaoru Yamamoto, and Yuji Matsumoto. 2004. Applying conditional random fields to Japanese morphological analysis. In Proceedings of the 2004 Conference on Empirical Methods in Natural Language Processing (EMNLP 2004), pages 230-237.
+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, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL 2020), pages 7871-7880.
+Chin-Yew Lin. 2004. ROUGE: A package for automatic evaluation of summaries. In Proceedings of the Workshop on Text Summarization Branches Out, pages 74-81.
+Dayiheng Liu, Jie Fu, Qian Qu, and Jiancheng Lv. 2019. BFGAN: Backward and forward generative adversarial networks for lexically constrained sentence generation. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 27(12):2350-2361.
+Lili Mou, Yiping Song, Rui Yan, Ge Li, Lu Zhang, and Zhi Jin. 2016. Sequence to backward and forward sequences: A content-introducing approach to generative short-text conversation. In Proceedings of the 26th International Conference on Computational Linguistics: Technical Papers (COLING 2016), pages 3349-3358.
+Lili Mou, Rui Yan, Ge Li, Lu Zhang, and Zhi Jin. 2015. Backward and forward language modeling for constrained sentence generation. arXiv preprint arXiv:1512.06612.
+Ramesh Nallapati, Bowen Zhou, Cicero dos Santos, Caglar Gulcehre, and Bing Xiang. 2016. Abstractive text summarization using sequence-to-sequence RNNs and beyond. In Proceedings of the 20th SIGNLL Conference on Computational Natural Language Learning (CoNLL 2016), pages 280-290.
+Romain Paulus, Caiming Xiong, and Richard Socher. 2018. A deep reinforced model for abstractive summarization. In Proceedings of the 6th International Conference on Learning Representations (ICLR 2018).
+Matt Post and David Vilar. 2018. Fast lexically constrained decoding with dynamic beam allocation for neural machine translation. In Proceedings of the 2018 Conference of the North American Chapter of
+
+the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT 2018), pages 1314-1324.
+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 (EMNLP 2015), pages 379-389.
+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 (NIPS 2017), pages 5998-6008.
\ No newline at end of file
diff --git a/transformerbasedlexicallyconstrainedheadlinegeneration/images.zip b/transformerbasedlexicallyconstrainedheadlinegeneration/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..826de78bc39a41399d48fee2687d9a921e83ab49
--- /dev/null
+++ b/transformerbasedlexicallyconstrainedheadlinegeneration/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d7d180deab51d6f10fda403d3b1d5696e33cfe881d3facc541c9ae621ea2ca40
+size 368794
diff --git a/transformerbasedlexicallyconstrainedheadlinegeneration/layout.json b/transformerbasedlexicallyconstrainedheadlinegeneration/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..b3dd2f6662db4e072e5b42242628cfc1e610e2f1
--- /dev/null
+++ b/transformerbasedlexicallyconstrainedheadlinegeneration/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4df5e75bd864a37c571312098faa79a1a157befdd5c05697a3e2d813920e85f1
+size 199170
diff --git a/transformerfeedforwardlayersarekeyvaluememories/dc891b22-ff62-49c2-b1ed-ca99765ccba6_content_list.json b/transformerfeedforwardlayersarekeyvaluememories/dc891b22-ff62-49c2-b1ed-ca99765ccba6_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..15d8e8ba74ff58b81ab5cd0480721de81107b110
--- /dev/null
+++ b/transformerfeedforwardlayersarekeyvaluememories/dc891b22-ff62-49c2-b1ed-ca99765ccba6_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7b48bd0fc0ab2ced86baf76d502d3edbaf229c8392938cdc06efa2d1194ab049
+size 74754
diff --git a/transformerfeedforwardlayersarekeyvaluememories/dc891b22-ff62-49c2-b1ed-ca99765ccba6_model.json b/transformerfeedforwardlayersarekeyvaluememories/dc891b22-ff62-49c2-b1ed-ca99765ccba6_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..910c8f28db4733a5bd2d4bd0744bb9a8631b2055
--- /dev/null
+++ b/transformerfeedforwardlayersarekeyvaluememories/dc891b22-ff62-49c2-b1ed-ca99765ccba6_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:59e5ba7009d37a7fda83b04592d7e2f5e20f8943b6f8e0fb3089ea3bf41deb80
+size 88516
diff --git a/transformerfeedforwardlayersarekeyvaluememories/dc891b22-ff62-49c2-b1ed-ca99765ccba6_origin.pdf b/transformerfeedforwardlayersarekeyvaluememories/dc891b22-ff62-49c2-b1ed-ca99765ccba6_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..6b63af56669f0907a4d44c343681c11f99f2ef80
--- /dev/null
+++ b/transformerfeedforwardlayersarekeyvaluememories/dc891b22-ff62-49c2-b1ed-ca99765ccba6_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:db518448029bbce97965e74a4f8b2119deb6f0cbe1c37cb79fbdee927d111c46
+size 563802
diff --git a/transformerfeedforwardlayersarekeyvaluememories/full.md b/transformerfeedforwardlayersarekeyvaluememories/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..deef66950a197214fbdd5052b6e5f4ee7fda7205
--- /dev/null
+++ b/transformerfeedforwardlayersarekeyvaluememories/full.md
@@ -0,0 +1,343 @@
+# Transformer Feed-Forward Layers Are Key-Value Memories
+
+Mor Geva $^{1,2}$ Roei Schuster $^{1,3}$ Jonathan Berant $^{1,2}$ Omer Levy $^{1}$
+
+1Blavatnik School of Computer Science, Tel-Aviv University
+
+2Allen Institute for Artificial Intelligence
+
+$^{3}$ Cornell Tech
+
+{morgeva@mail, joberant@cs,levyomer@cs}.tau.ac.il, rs864@cornell.edu
+
+# Abstract
+
+Feed-forward layers constitute two-thirds of a transformer model's parameters, yet their role in the network remains under-explored. We show that feed-forward layers in transformer-based language models operate as key-value memories, where each key correlates with textual patterns in the training examples, and each value induces a distribution over the output vocabulary. Our experiments show that the learned patterns are human-interpretable, and that lower layers tend to capture shallow patterns, while upper layers learn more semantic ones. The values complement the keys' input patterns by inducing output distributions that concentrate probability mass on tokens likely to appear immediately after each pattern, particularly in the upper layers. Finally, we demonstrate that the output of a feed-forward layer is a composition of its memories, which is subsequently refined throughout the model's layers via residual connections to produce the final output distribution.
+
+# 1 Introduction
+
+Transformer-based language models (Vaswani et al., 2017) are at the core of state-of-the-art natural language processing (Devlin et al., 2019; Brown et al., 2020), largely due to the success of self-attention. While much literature has been devoted to analyzing the function of self-attention layers (Voita et al., 2019; Clark et al., 2019; Vig and Belinkov, 2019), they account for only a third of a typical transformer's parameters ( $4d^{2}$ per layer, where $d$ is the model's hidden dimension). Most of the parameter budget is spent on position-wise feedforward layers ( $8d^{2}$ per layer), yet their role remains under-explored. What, if so, is the function of feed-forward layers in a transformer language model?
+
+We show that feed-forward layers emulate neural memories (Sukhbaatar et al., 2015), where the first
+
+
+Figure 1: An illustration of how a feed-forward layer emulates a key-value memory. Input vectors (here, $\mathbf{x}_5$ ) are multiplied by keys to produce memory coefficients (e.g., the memory coefficient for $\mathbf{v}_1$ is 0.2), which then weigh distributions over the output vocabulary, stored in the values. The feed-forward layer's output is thus the weighted sum of its values.
+
+parameter matrix in the layer corresponds to keys, and the second parameter matrix to values. Figure 1 shows how the keys (first parameter matrix) interact with the input to produce coefficients, which are then used to compute a weighted sum of the values (second parameter matrix) as the output. While the theoretical similarity between feed-forward layers and key-value memories has previously been suggested by Sukhbaatar et al. (2019), we take this observation one step further, and analyze the "memories" that the feed-forward layers store.
+
+We find that each key correlates with a specific set of human-interpretable input patterns, such as $n$ -grams or semantic topics. For example, $k_{2}$ in Figure 1 is triggered by inputs that describe a pe
+
+riod of time and end with "a". Simultaneously, we observe that each value can induce a distribution over the output vocabulary, and that this distribution correlates with the next-token distribution of the corresponding keys in the upper layers of the model. In the above example, the corresponding value $v_{2}$ represents a distribution that puts most of its probability mass on the word "while".
+
+Lastly, we analyze how the language model, as a whole, composes its final prediction from individual memories. We observe that each layer combines hundreds of active memories, creating a distribution that is qualitatively different from each of its component memories' values. Meanwhile, the residual connection between layers acts as a refinement mechanism, gently tuning the prediction at each layer while retaining most of the residual's information.
+
+In conclusion, our work sheds light on the function of feed-forward layers in transformer-based language models. We show that feed-forward layers act as pattern detectors over the input across all layers, and that the final output distribution is gradually constructed in a bottom-up fashion.
+
+# 2 Feed-Forward Layers as Unnormalized Key-Value Memories
+
+Feed-forward layers A transformer language model (Vaswani et al., 2017) is made of intertwined self-attention and feed-forward layers. Each feedforward layer is a position-wise function, processing each input vector independently. Let $\mathbf{x} \in \mathbb{R}^d$ be a vector corresponding to some input text prefix. We can express the feed-forward layer $\mathrm{FF}(\cdot)$ as follows (bias terms are omitted):
+
+$$
+\operatorname {F F} (\mathbf {x}) = f \left(\mathbf {x} \cdot K ^ {\top}\right) \cdot V \tag {1}
+$$
+
+Here, $K,V\in \mathbb{R}^{d_m\times d}$ are parameter matrices, and $f$ is a non-linearity such as ReLU.
+
+Neural memory A neural memory (Sukhbaatar et al., 2015) consists of $d_{m}$ key-value pairs, which we call memories. Each key is represented by a $d$ -dimensional vector $\mathbf{k}_i \in \mathbb{R}^d$ , and together form the parameter matrix $K \in \mathbb{R}^{d_m \times d}$ ; likewise, we define the value parameters as $V \in \mathbb{R}^{d_m \times d}$ . Given an input vector $\mathbf{x} \in \mathbb{R}^d$ , we compute a distribution
+
+over the keys, and use it to compute the expected value:
+
+$$
+p (k _ {i} \mid x) \propto \exp (\mathbf {x} \cdot \mathbf {k} _ {i})
+$$
+
+$$
+\operatorname {M N} (\mathbf {x}) = \sum_ {i = 1} ^ {d _ {m}} p \left(k _ {i} \mid x\right) \mathbf {v} _ {i}
+$$
+
+With matrix notation, we arrive at a more compact formulation:
+
+$$
+\mathrm {M N} (\mathbf {x}) = \operatorname {s o f t m a x} \left(\mathbf {x} \cdot K ^ {\top}\right) \cdot V \tag {2}
+$$
+
+Feed-forward layers emulate neural memory Comparing equations 1 and 2 shows that feedforward layers are almost identical to key-value neural memories; the only difference is that neural memory uses softmax as the non-linearity $f(\cdot)$ while the canonical transformer does not use a normalizing function in the feed-forward layer. The hidden dimension $d_{m}$ is essentially the number of memories in the layer, and the activation $\mathbf{m} = f(\mathbf{x}\cdot K^{\top})$ , commonly referred to as the hidden layer, is a vector containing an unnormalized non-negative coefficient for each memory. We refer to each $\mathbf{m}_i$ as the memory coefficient of the ith memory cell.
+
+Sukhbaatar et al. (2019) make an analogous observation, and incorporate the parameters of the feed-forward layers as persistent memory cells in the self-attention layers. While this reparameterization works in practice, the experiment does not tell us much about the role of feed-forward layers in the canonical transformer. If transformer feed-forward layers are indeed key-value memories, then what memories do they store?
+
+We conjecture that each key vector $\mathbf{k}_i$ captures a particular pattern (or set of patterns) in the input sequence (Section 3), and that its corresponding value vector $\mathbf{v}_i$ represents the distribution of tokens that follows said pattern (Section 4).
+
+# 3 Keys Capture Input Patterns
+
+We posit that the key vectors $K$ in feed-forward layers act as pattern detectors over the input sequence, where each individual key vector $\mathbf{k}_i$ corresponds to a specific pattern over the input prefix $x_1,\ldots ,x_j$ . To test our claim, we analyze the keys of a trained language model's feed-forward layers. We first retrieve the training examples (prefixes of a sentence) most associated with a given key, that is, the input texts where the memory coefficient is highest. We
+
+| Key | Pattern | Example trigger prefixes |
| k1449 | Ends with “substitutes” (shallow) | At the meeting, Elton said that “for artistic reasons there could be no substitutes In German service, they were used as substitutes
+Two weeks later, he came off the substitutes |
| k62546 | Military, ends with “base”/“bases” (shallow + semantic) | On 1 April the SRSG authorised the SADF to leave their bases
+Aircraft from all four carriers attacked the Australian base
+Bombers flying missions to Rabaul and other Japanese bases |
| k102997 | a “part of” relation (semantic) | In June 2012 she was named as one of the team that competed
+He was also a part of the Indian delegation
+Toy Story is also among the top ten in the BFI list of the 50 films you should |
| k132989 | Ends with a time range (semantic) | Worldwide, most tornadoes occur in the late afternoon, between 3 pm and 7
+Weekend tolls are in effect from 7:00 pm Friday until
+The building is open to the public seven days a week, from 11:00 am to |
| k161935 | TV shows (semantic) | Time shifting viewing added 57 percent to the episode’s
+The first season set that the episode was included in was as part of the
+From the original NBC daytime version , archived |
+
+Table 1: Examples of human-identified patterns that trigger different memory keys.
+
+then ask humans to identify patterns within the retrieved examples. For almost every key $\mathbf{k}_i$ in our sample, a small set of well-defined patterns, recognizable by humans, covers most of the examples associated with the key.
+
+# 3.1 Experiment
+
+We conduct our experiment over the language model of Baevski and Auli (2019), a 16-layer transformer language model trained on WikiText-103 (Merit et al., 2017). This model defines $d = 1024$ and $d_m = 4096$ , and has a total of $d_m \cdot 16 = 65,536$ potential keys to analyze. We randomly sample 10 keys per layer (160 in total).
+
+Retrieving trigger examples We assume that patterns stored in memory cells originate from examples the model was trained on. Therefore, given a key $\mathbf{k}_i^\ell$ that corresponds to the $i$ -th hidden dimension of the $\ell$ -th feed-forward layer, we compute the memory coefficient $\mathrm{ReLU}(\mathbf{x}_j^\ell \cdot \mathbf{k}_i^\ell)$ for every prefix $x_1, \ldots, x_j$ of every sentence from the WikiText-103's training set. For example, for the hypothetical sentence "I love dogs", we will compute three coefficients, for the prefixes "I", "I love", and "I love dogs". Then, we retrieve the top- $t$ trigger examples, that is, the $t$ prefixes whose representation at layer $\ell$ yielded the highest inner product with $\mathbf{k}_i^\ell$ .
+
+Pattern analysis We let human experts (NLP graduate students) annotate the top-25 prefixes retrieved for each key, and asked them to (a) identify repetitive patterns that occur in at least 3 prefixes (which would strongly indicate a connection to the key, as this would unlikely happen if sentences
+
+
+Figure 2: Breakdown of the labels experts assigned to trigger examples in each layer. Some examples were not associated with any pattern ("not-covered").
+
+were drawn at random) (b) describe each recognized pattern, and (c) classify each recognized pattern as "shallow" (e.g. recurring n-grams) or "semantic" (recurring topic). Each key and its corresponding top-25 prefixes were annotated by one expert. To assure that every pattern is grounded in at least 3 prefixes, we instruct the experts to specify, for each of the top-25 prefixes, which pattern(s) it contains. A prefix may be associated with multiple (shallow or semantic) patterns.
+
+Table 1 shows example patterns. A fully-annotated example of the top-25 prefixes from a single memory key is shown in Appendix A.
+
+# 3.2 Results
+
+Memories are associated with human-recognizable patterns Experts were able to identify at least one pattern for every key, with an average of 3.6 identified patterns per
+
+
+Figure 3: Relative change in memory coefficient caused by removing the first, the last, or a random token from the input.
+
+key. Furthermore, the vast majority of retrieved prefixes (65%-80%) were associated with at least one identified pattern (Figure 2). Thus, the top examples triggering each key share clear patterns that humans can recognize.
+
+Shallow layers detect shallow patterns Comparing the amount of prefixes associated with shallow patterns and semantic patterns (Figure 2), the lower layers (layers 1-9) are dominated by shallow patterns, often with prefixes that share the last word (e.g. $\mathbf{k}_{449}^{1}$ in Table 1). In contrast, the upper layers (layers 10-16) are characterized by more semantic patterns, with prefixes from similar contexts but without clear surface-form similarities (e.g. $\mathbf{k}_{1935}^{16}$ in Table 1). This observation corroborates recent findings that lower (upper) layers in deep contextualized models encode shallow (semantic) features of the inputs (Peters et al., 2018; Jawahar et al., 2019; Liu et al., 2019).
+
+To further test this hypothesis, we sample 1600 random keys (100 keys per layer) and apply local modifications to the top-50 trigger examples of every key. Specifically, we remove either the first, last, or a random token from the input, and measure how this mutation affects the memory coefficient. Figure 3 shows that the model considers the end of an example as more salient than the beginning for predicting the next token. In upper layers, removing the last token has less impact, supporting our conclusion that upper-layer keys are less correlated with shallow patterns.
+
+# 4 Values Represent Distributions
+
+After establishing that keys capture patterns in training examples, we turn to analyze the information
+
+
+Figure 4: Agreement rate between the top-ranked token based on the value vector $\mathbf{v}_i^\ell$ , and the next token of the top-ranked trigger example associated with the key vector $\mathbf{k}_i^\ell$ .
+
+stored in their corresponding values. We show that each value $\mathbf{v}_i^\ell$ can be viewed as a distribution over the output vocabulary, and demonstrate that this distribution complements the patterns in the corresponding key $\mathbf{k}_i^\ell$ in the model's upper layers (see Figure 1).
+
+Casting values as distributions over the vocabulary. We begin by converting each value vector $\mathbf{v}_i^\ell$ into a probability distribution over the vocabulary by multiplying it by the output embedding matrix $E$ and applying a softmax:4
+
+$$
+\mathbf {p} _ {i} ^ {\ell} = \mathrm {s o f t m a x} (\mathbf {v} _ {i} ^ {\ell} \cdot E).
+$$
+
+The probability distribution $\mathbf{p}_i^\ell$ is uncalibrated, since the value vector $\mathbf{v}_i^\ell$ is typically multiplied by the input-dependent memory coefficient $\mathbf{m}_i^\ell$ , changing the skewness of the output distribution. That said, the ranking induced by $\mathbf{p}_i^\ell$ is invariant to the coefficient, and can still be examined. This conversion assumes (naively) that all model's layers operate in the same embedding space.
+
+Value predictions follow key patterns in upper layers. For every layer $\ell$ and memory dimension $i$ , we compare the top-ranked token according to $\mathbf{v}_i^\ell$ , $(\operatorname{argmax}(\mathbf{p}_i^\ell))$ to the next token $w_i^\ell$ in the top-1 trigger example according to $\mathbf{k}_i^\ell$ (the example whose memory coefficient for $\mathbf{k}_i^\ell$ is the highest). Figure 4 shows the agreement rate, i.e. the fraction of memory cells (dimensions) where the value's top prediction matches the key's top trigger example $(\operatorname{argmax}(\mathbf{p}_i^\ell) = w_i^\ell)$ . It can be seen that the
+
+
+Figure 5: Distribution of the rank of the next-token in the top-1 trigger example of $\mathbf{k}_i^\ell (w_i^\ell)$ , according to the ranking induced by the value vector $\mathbf{v}_i^\ell$ . We cut the tail of the distribution, which stretches up to the vocabulary size ( $\sim$ 270K tokens).
+
+agreement rate is close to zero in the lower layers (1-10), but starting from layer 11, the agreement rate quickly rises until $3.5\%$ , showing higher agreement between keys and values on the identity of the top-ranked token. Importantly, this value is orders of magnitude higher than a random token prediction from the vocabulary, which would produce a far lower agreement rate $(0.0004\%)$ , showing that upper-layer memories manifest non-trivial predictive power.
+
+Next, we take the next token of $\mathbf{k}_i^\ell$ 's top-1 trigger example $(w_i^\ell)$ , and find where it ranks in the value vector's distribution $\mathbf{p}_i^\ell$ . Figure 5 shows that the rank of the next token of a trigger example increases through the layers, meaning that $w_i^\ell$ tends to get higher probability in the upper layers.
+
+Detecting predictive values. To examine if we can automatically detect values with high agreement rate, we analyze the probability of the values' top prediction, i.e., $(\max (\mathbf{p}_i^\ell))$ . Figure 6 shows that although these distributions are not calibrated, distributions with higher maximum probabilities are more likely to agree with their key's top trigger example. We then take the 100 values with highest probability across all layers and dimensions (97 out of the 100 are in the upper layers, 11-16), and for each value $\mathbf{v}_i^\ell$ , analyze the top-50 trigger examples of $\mathbf{k}_i^\ell$ . We find that in almost half of the values (46 out of 100), there is at least one trigger example that agrees with the value's top prediction. Examples are provided in Table 2.
+
+Discussion. When viewed as distributions over the output vocabulary, values in the upper layers tend to assign higher probability to the next
+
+
+Figure 6: Agreement rate (between the top-ranked token based on the value vector $\mathbf{v}_i^\ell$ and the next token of the top-ranked trigger example associated with the key vector $\mathbf{k}_i^\ell$ ) as a function of the maximal probability assigned by the value vector.
+
+token of examples triggering the corresponding keys. This suggests that memory cells often store information on how to directly predict the output (the distribution of the next word) from the input (patterns in the prefix). Conversely, the lower layers do not exhibit such clear correlation between the keys' patterns and the corresponding values' distributions. A possible explanation is that the lower layers do not operate in the same embedding space, and therefore, projecting values onto the vocabulary using the output embeddings does not produce distributions that follow the trigger examples. However, our results imply that some intermediate layers do operate in the same or similar space to upper layers (exhibiting some agreement), which in itself is non-trivial. We leave further exploration of this phenomenon to future work.
+
+# 5 Aggregating Memories
+
+So far, our discussion has been about the function of a single memory cell in feed-forward layers. How does the information from multiple cells in multiple layers aggregate to form a model-wide prediction? We show that every feed-forward layer combines multiple memories to produce a distribution that is qualitatively different from each of its component memories' value distributions (Section 5.1). These layer-wise distributions are then combined via residual connections in a refinement process, where each feed-forward layer updates the residual's distribution to finally form the model's output (Section 5.2).
+
+| Value | Prediction | Precision@50 | Trigger example |
| v15222 | each | 68% | But when bees and wasps resemble each |
| v16752 | played | 16% | Her first role was in Vijay Lalwani's psychological thriller Karthik Calling Karthik, where Padukone was cast as the supportive girlfriend of a depressed man (played |
| v132601 | extratropical | 4% | Most of the winter precipitation is the result of synoptic scale, low pressure weather systems (large scale storms such as extratropical |
| v15881 | part | 92% | Comet served only briefly with the fleet, owing in large part |
| v162070 | line | 84% | Sailing from Lorient in October 1805 with one ship of the line |
| v123186 | jail | 4% | On May 11, 2011, four days after scoring 6 touchdowns for the Slaughter, Grady was sentenced to twenty days in jail |
+
+Table 2: Example values, their top prediction, the fraction of their key's top-50 trigger examples that agree with their prediction, and a matching trigger example (with the target token marked in blue).
+
+# 5.1 Intra-Layer Memory Composition
+
+The feed-forward layer's output can be defined as the sum of value vectors weighted by their memory coefficients, plus a bias term:
+
+$$
+\mathbf {y} ^ {\ell} = \sum_ {i} \operatorname {R e L U} \left(\mathbf {x} ^ {\ell} \cdot \mathbf {k} _ {i} ^ {\ell}\right) \cdot \mathbf {v} _ {i} ^ {\ell} + \mathbf {b} ^ {\ell}.
+$$
+
+If each value vector $\mathbf{v}_i^\ell$ contains information about the target token's distribution, how is this information aggregated into a single output distribution? To find out, we analyze the behavior of 4,000 randomly-sampled prefixes from the validation set. Here, the validation set is used (rather than the training set used to find trigger examples) since we are trying to characterize the model's behavior at inference time, not find the examples it "memorizes" during training.
+
+We first measure the fraction of "active" memories (cells with a non-zero coefficient). Figure 7 shows that a typical example triggers hundreds of memories per layer (10%-50% of 4096 dimensions), but the majority of cells remain inactive. Interestingly, the number of active memories drops towards layer 10, which is the same layer in which semantic patterns become more prevalent than shallow patterns, according to expert annotations (see Section 3, Figure 2).
+
+While there are cases where a single memory cell dominates the output of a layer, the majority of outputs are clearly compositional. We count the number of instances where the feed-forward layer's top prediction is different from all of the memories' top predictions. Formally, we denote:
+
+$$
+\mathbf {t o p} (\mathbf {h}) = \operatorname {a r g m a x} (\mathbf {h} \cdot E)
+$$
+
+as a generic shorthand for the top prediction from the vocabulary distribution induced by the vector
+
+
+Figure 7: The fraction of active memories (i.e., with positive memory coefficient) out of 4096 memories in every layer, for a random sample of 4,000 examples.
+
+$\mathbf{h}$ , and compute the number of examples where the following condition holds:
+
+$$
+\forall i: \operatorname {t o p} (\mathbf {v} _ {i} ^ {\ell}) \neq \operatorname {t o p} (\mathbf {y} ^ {\ell})
+$$
+
+Figure 8 shows that, for any layer in the network, the layer's final prediction is different than every one of the memories' predictions in at least $\sim 68\%$ of the examples. Even in the upper layers, where the memories' values are more correlated with the output space (Section 4), the layer-level prediction is typically not the result of a single dominant memory cell, but a composition of multiple memories.
+
+We further analyze cases where at least one memory cell agrees with the layer's prediction, and find that (a) in $60\%$ of the examples the target token is a common stop word in the vocabulary (e.g. "the" or "of"), and (b) in $43\%$ of the cases the input prefix has less than 5 tokens. This suggests that very common patterns in the training data might
+
+
+Figure 8: The fraction of examples in a random sample of 4,000 examples where the layer's prediction is different from the prediction of all of its memories.
+
+be "cached" in individual memory cells, and do not require compositionality.
+
+# 5.2 Inter-Layer Prediction Refinement
+
+While a single feed-forward layer composes its memories in parallel, a multi-layer model uses the residual connection $\mathbf{r}$ to sequentially compose predictions to produce the model's final output:5
+
+$$
+\mathbf {x} ^ {\ell} = \operatorname {L a y e r N o r m} (\mathbf {r} ^ {\ell})
+$$
+
+$$
+\mathbf {y} ^ {\ell} = \mathrm {F F} (\mathbf {x} ^ {\ell})
+$$
+
+$$
+\mathbf {o} ^ {\ell} = \mathbf {y} ^ {\ell} + \mathbf {r} ^ {\ell}
+$$
+
+We hypothesize that the model uses the sequential composition apparatus as a means to refine its prediction from layer to layer, often deciding what the prediction will be at one of the lower layers.
+
+To test our hypothesis, we first measure how often the probability distribution induced by the residual vector $\mathbf{r}^{\ell}$ matches the model's final output $\mathbf{o}^{L}$ ( $L$ being the total number of layers):
+
+$$
+\operatorname {t o p} (\mathbf {r} ^ {\ell}) = \operatorname {t o p} (\mathbf {o} ^ {L})
+$$
+
+Figure 9 shows that roughly a third of the model's predictions are determined in the bottom few layers. This number grows rapidly from layer 10 onwards, implying that the majority of "hard" decisions occur before the final layer.
+
+We also measure the probability mass $p$ that each layer's residual vector $\mathbf{r}^{\ell}$ assigns to the model's
+
+
+Figure 9: Fraction of examples in each layer, where the residual's top prediction matches the model's output.
+
+
+Figure 10: Probability of the token output by the model according to the residual of each layer.
+
+final prediction:
+
+$$
+w = \operatorname {t o p} (\mathbf {o} ^ {L})
+$$
+
+$$
+\mathbf {p} = \operatorname {s o f t m a x} \left(\mathbf {r} ^ {\ell} \cdot E\right)
+$$
+
+$$
+p = \mathbf {p} _ {w}
+$$
+
+Figure 10 shows a similar trend, but emphasizes that it is not only the top prediction's identity that is refined as we progress through the layers, it is also the model's confidence in its decision.
+
+To better understand how the refinement process works at each layer, we measure how often the residual's top prediction changes following its interaction with the feed-forward layer $(\mathrm{top}(\mathbf{r}^{\ell})\neq \mathrm{top}(\mathbf{o}^{\ell}))$ , and whether this change results from the feed-forward layer overriding the residual $(\mathrm{top}(\mathbf{o}^{\ell}) = \mathrm{top}(\mathbf{y}^{\ell}))$ or from a true composition $(\mathrm{top}(\mathbf{r}^{\ell})\neq \mathrm{top}(\mathbf{o}^{\ell})\neq \mathrm{top}(\mathbf{y}^{\ell}))$
+
+Figure 11 shows the breakdown of different cases per layer. In the vast majority of examples, the residual's top prediction ends up being the
+
+
+Figure 11: Breakdown of examples by prediction cases: the layer's output prediction matches the residual's prediction (residual), matches the feed-forward layer's prediction (ffn), matches both of the predictions (agreement), or none of the predictions (composition). By construction, there are no cases where the residual's prediction matches the feed-forward layer's prediction and does not match the output's prediction.
+
+model's prediction (residual+agreement). In most of these cases, the feed forward layer predicts something different (residual). Perhaps surprisingly, when the residual's prediction does change (composition+ffn), it rarely changes to the feed-forward layer's prediction (ffn). Instead, we observe that composing the residual's distribution with that of the feed-forward layer produces a "compromise" prediction, which is equal to neither (composition). This behavior is similar to the intra-layer composition we observe in Section 5.1. A possible conjecture is that the feed-forward layer acts as an elimination mechanism to "veto" the top prediction in the residual, and thus shifts probability mass towards one of the other candidate predictions in the head of the residual's distribution.
+
+Finally, we manually analyze 100 random cases of last-layer composition, where the feed-forward layer modifies the residual output in the final layer. We find that in most cases (66 examples), the output changes to a semantically distant word (e.g., "people" $\rightarrow$ "same") and in the rest of the cases (34 examples), the feed-forward layer's output shifts the residual prediction to a related word (e.g. "later" $\rightarrow$ "earlier" and "gastric" $\rightarrow$ "stomach"). This suggests that feed-forward layers tune the residual predictions at varying granularity, even in the last layer of the model.
+
+# 6 Related Work
+
+Considerable attention has been given to demystifying the operation of neural NLP models. An
+
+extensive line of work targeted neuron functionality in general, extracting the properties that neurons and subsets of neurons capture (Durrani et al., 2020; Dalvi et al., 2019; Rethmeier et al., 2020; Mu and Andreas, 2020; Vig et al., 2020), regardless of the model architecture or neurons' position in it. Jacovi et al. (2018) analyzed CNN architectures in text classification and showed that they extract key n-grams from the inputs.
+
+The study of the transformer architecture has focused on the role and function of self-attention layers (Voita et al., 2019; Clark et al., 2019; Vig and Belinkov, 2019) and on inter-layer differences (i.e. lower vs. upper layers) (Tenney et al., 2019; Jawahar et al., 2019). Previous work also highlighted the importance of feed-forward layers in transformers (Press et al., 2020; Pulugundla et al., 2021; Xu et al., 2020). Still, to date, the role of feed-forward layers remains under-explored.
+
+Also related are interpretability methods that explain predictions (Han et al., 2020; Wegreffe and Pinter, 2019), however, our focus is entirely different: we do not interpret individual predictions, but aim to understand the mechanism of transformers.
+
+Characterizing the functionality of memory cells based on examples that trigger maximal activations has been used previously in NLP (Rethmeier et al., 2020) and vision (Erhan et al., 2009).
+
+# 7 Discussion and Conclusion
+
+Understanding how and why transformers work is crucial to many aspects of modern NLP, including model interpretability, data security, and development of better models. Feed-forward layers account for most of a transformer's parameters, yet little is known about their function in the network.
+
+In this work, we propose that feed-forward layers emulate key-value memories, and provide a set of experiments showing that: (a) keys are correlated with human-interpretable input patterns; (b) values, mostly in the model's upper layers, induce distributions over the output vocabulary that correlate with the next-token distribution of patterns in the corresponding key; and (c) the model's output is formed via an aggregation of these distributions, whereby they are first composed to form individual layer outputs, which are then refined throughout the model's layers using residual connections.
+
+Our findings open important research directions:
+
+- Layer embedding space. We observe a correlation between value distributions over the output
+
+vocabulary and key patterns, that increases from lower to upper layers (Section 4). Is this because the layer's output space transforms across layers? If so, how? We note that this possible transformation cannot be explained solely by the function of feed-forward layers: if the model only did a series of key-value look-ups and value-distribution aggregation via weighted addition, then a single, unifying embedding space would appear more natural. Thus, the transformation might have to do with the interplay between feed-forward layers and self-attention layers.
+
+- Beyond language modeling. Our formulation of feed-forward networks as key-value memories generalizes to any transformer model, e.g. BERT encoders and neural translation models. We thus expect our qualitative empirical observations to hold across diverse settings, and leave verification of this for future work.
+- Practical implications. A better understanding of feed-forward layers has many implications in NLP. For example, future studies may offer interpretability methods by automating the pattern-identification process; memory cells might affect training-data privacy as they could facilitate white-box membership inference (Nasr et al., 2019); and studying cases where a correct pattern is identified but then suppressed during aggregation may guide architectural novelties.
+
+Thus, by illuminating the role of feed-forward layers, we move towards a better understanding of the inner workings of transformers, and open new research threads on modern NLP models.
+
+# Acknowledgements
+
+We thank Shimi Salant and Tal Schuster for helpful feedback. This work was supported in part by the Yandex Initiative for Machine Learning, the Blavatnik Interdisciplinary Cyber Research Center (ICRC), the Alon Scholarship, and Intel Corporation. Roei Schuster is a member of the Check Point Institute of Information Technology. This work was completed in partial fulfillment for the Ph.D degree of Mor Geva.
+
+# References
+
+Alexei Baevski and Michael Auli. 2019. Adaptive input representations for neural language modeling. In
+
+International Conference on Learning Representations (ICLR).
+Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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 Proceedings of Neural Information Processing Systems (NeurIPS).
+Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D. Manning. 2019. What does BERT look at? An analysis of BERT's attention. In Black-BoxNLP Workshop at ACL.
+Fahim Dalvi, Nadir Durrani, Hassan Sajjad, Yonatan Belinkov, Anthony Bau, and James Glass. 2019. What is one grain of sand in the desert? analyzing individual neurons in deep nlp models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 6309-6317.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In North American Association for Computational Linguistics (NAACL), pages 4171-4186, Minneapolis, Minnesota.
+Nadir Durrani, Hassan Sajjad, Fahim Dalvi, and Yonatan Belinkov. 2020. Analyzing individual neurons in pre-trained language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP).
+Dumitru Erhan, Yoshua Bengio, Aaron Courville, and Pascal Vincent. 2009. Visualizing higher-layer features of a deep network. University of Montreal, 1341(3):1.
+Xiaochuang Han, Byron C. Wallace, and Yulia Tsvetkov. 2020. Explaining black box predictions and unveiling data artifacts through influence functions. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5553-5563, Online. Association for Computational Linguistics.
+Alon Jacovi, Oren Sar Shalom, and Yoav Goldberg. 2018. Understanding convolutional neural networks for text classification. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 56-65, Brussels, Belgium. Association for Computational Linguistics.
+Ganesh Jawahar, Benoit Sagot, and Djamé Seddah. 2019. What does BERT learn about the structure
+
+of language? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3651-3657, Florence, Italy. Association for Computational Linguistics.
+Nelson F. Liu, Matt Gardner, Yonatan Belinkov, Matthew E. Peters, and Noah A. Smith. 2019. Linguistic knowledge and transferability of contextual representations. 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 1073-1094, Minneapolis, Minnesota. Association for Computational Linguistics.
+Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017. Pointer sentinel mixture models. International Conference on Learning Representations (ICLR).
+Jesse Mu and Jacob Andreas. 2020. Compositional explanations of neurons. In Proceedings of Neural Information Processing Systems (NeurIPS).
+Milad Nasr, Reza Shokri, and Amir Houmansadr. 2019. Comprehensive privacy analysis of deep learning: Passive and active white-box inference attacks against centralized and federated learning. In 2019 IEEE Symposium on Security and Privacy (SP), pages 739-753.
+Matthew Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word representations. In North American Chapter of the Association for Computational Linguistics (NAACL).
+Ofir Press, Noah A. Smith, and Omer Levy. 2020. Improving transformer models by reordering their sublayers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2996-3005, Online. Association for Computational Linguistics.
+Bhargav Pulugundla, Yang Gao, Brian King, Gokce Keskin, Harish Mallidi, Minhua Wu, Jasha Droppo, and Roland Maas. 2021. Attention-based neural beamforming layers for multi-channel speech recognition. arXiv preprint arXiv:2105.05920.
+Nils Rethmeier, Vageesh Kumar Saxena, and Isabelle Augenstein. 2020. Tx-ray: Quantifying and explaining model-knowledge transfer in (un-) supervised nlp. In Conference on Uncertainty in Artificial Intelligence, pages 440-449. PMLR.
+S. Sukhbaatar, J. Weston, and R. Fergus. 2015. End-to-end memory networks. In Advances in Neural Information Processing Systems (NIPS).
+Sainbayar Sukhbaatar, Edouard Grave, Guillaume Lample, Herve Jegou, and Armand Joulin. 2019. Augmenting self-attention with persistent memory. arXiv preprint arXiv:1907.01470.
+
+Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019. BERT rediscovers the classical NLP pipeline. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4593-4601, Florence, Italy. Association for Computational Linguistics.
+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 (NIPS), pages 5998-6008.
+Jesse Vig and Yonatan Belinkov. 2019. Analyzing the structure of attention in a transformer language model. In Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 63-76, Florence, Italy. Association for Computational Linguistics.
+Jesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian, Daniel Nevo, Yaron Singer, and Stuart Shieber. 2020. Investigating gender bias in language models using causal mediation analysis. Advances in Neural Information Processing Systems, 33.
+Elena Voita, David Talbot, Fedor Moiseev, Rico Senrich, and Ivan Titov. 2019. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.
+Sarah Wiegrefe and Yuval Pinter. 2019. Attention is not not explanation. 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 11-20, Hong Kong, China. Association for Computational Linguistics.
+Hongfei Xu, Qiuhui Liu, Deyi Xiong, and Josef van Genabith. 2020. Transformer with depth-wise LSTM. arXiv preprint arXiv:2007.06257.
+
+# A Pattern Analysis
+
+Table 3 provides a fully-annotated example of 25 prefixes from the memory cell $\mathbf{k}_{895}^{5}$ .
+
+# B Implementation details
+
+In this section, we provide further implementation details for reproducibility of our experiments.
+
+For all our experiments, we used the language model of Baevski and Auli (2019) (247M parameters) trained on WikiText-103 (Merit et al., 2017). Specifically, we used the model transformer_lm.wiki103.adaptive trained with the fairseq toolkit6.
+
+WikiText-1037 is a well known language modeling dataset and a collection of over 100M tokens extracted from Wikipedia. We used spaCy8 to split examples into sentences (Section 3).
+
+| 1 | It requires players to press |
| 1 | The video begins at a press |
| 1 | The first player would press |
| 1 | Ivy, disguised as her former self, interrupts a Wayne Enterprises press |
| 1 | The video then cuts back to the press |
| 1 | The player is able to press |
| Leto switched |
| 1 | In the Nintendo DS version, the player can choose to press |
| 1 | In-house engineer Nick Robbins said Shields made it clear from the outset that he (Robbins) “was just there to press |
| 1 | She decides not to press |
| 1 | she decides not to press |
| 1 | Originally Watson signaled electronically, but show staff requested that it press |
| 1 | At post-game press |
| 1 | In the buildup to the game, the press |
| 2 | Hard to go back to the game after that news |
| 1 | In post-trailer interviews, Bungie staff members told gaming press |
| Space Gun was well received by the video game |
| 1 | As Bong Load struggled to press |
| At Michigan, Clancy started as a quarterback, switched |
| 1 | Crush used his size advantage to perform a Gorilla press |
| 1,2 | Groening told the press |
| 1 | Creative director Gregoire <unk> argued that existing dance games were merely instructing players to press |
| 1,2 | Mattingly would be named most outstanding player that year by the press |
| 1 | At the post-match press |
| 1,2 | The company receives bad press |
+
+| ID | Description | shallow / semantic |
| 1 | Ends with the word “press” | shallow |
| 2 | Press/news related | semantic |
+
+Table 3: A pattern annotation of trigger examples for the cell memory $\mathbf{k}_{895}^{5}$ . Trigger examples are annotated with repetitive patterns (upper table), which are classified as "shallow" or "semantic" (bottom table).
\ No newline at end of file
diff --git a/transformerfeedforwardlayersarekeyvaluememories/images.zip b/transformerfeedforwardlayersarekeyvaluememories/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..62b39556c9d91d951a5026ed53a3f0b231bd18f6
--- /dev/null
+++ b/transformerfeedforwardlayersarekeyvaluememories/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9904ff0ed41330c5c82885c5cf23444cd39861e03d7319426de10c0ada14e27b
+size 670786
diff --git a/transformerfeedforwardlayersarekeyvaluememories/layout.json b/transformerfeedforwardlayersarekeyvaluememories/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..0c595d9c2335174585098253cf22ca6071b221c8
--- /dev/null
+++ b/transformerfeedforwardlayersarekeyvaluememories/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:017604b636dba2d4a2064bb5f8ea4a97709006048518abf76ad6bd069b556584
+size 372648
diff --git a/translatingheadersoftabulardataapilotstudyofschematranslation/58316167-96ef-4f79-b163-460055906ad7_content_list.json b/translatingheadersoftabulardataapilotstudyofschematranslation/58316167-96ef-4f79-b163-460055906ad7_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..6b8f1ba4e44323f557152ad1b8f8f71d0e70ffab
--- /dev/null
+++ b/translatingheadersoftabulardataapilotstudyofschematranslation/58316167-96ef-4f79-b163-460055906ad7_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2d4aad6f2ebaee95a951e0d29d5d85d8262fdf7c7f12fe20092d3558ab569cc0
+size 77697
diff --git a/translatingheadersoftabulardataapilotstudyofschematranslation/58316167-96ef-4f79-b163-460055906ad7_model.json b/translatingheadersoftabulardataapilotstudyofschematranslation/58316167-96ef-4f79-b163-460055906ad7_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..682d3ba30ac967dc0b592c8b38a583e497b6db39
--- /dev/null
+++ b/translatingheadersoftabulardataapilotstudyofschematranslation/58316167-96ef-4f79-b163-460055906ad7_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:25a0a641e0855aa4d43214a6b0bf766dd17f4107beb140fd8099fdfcc1ade15a
+size 91929
diff --git a/translatingheadersoftabulardataapilotstudyofschematranslation/58316167-96ef-4f79-b163-460055906ad7_origin.pdf b/translatingheadersoftabulardataapilotstudyofschematranslation/58316167-96ef-4f79-b163-460055906ad7_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..91695df3b67511c91e8ce27dc07e097025daec98
--- /dev/null
+++ b/translatingheadersoftabulardataapilotstudyofschematranslation/58316167-96ef-4f79-b163-460055906ad7_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3245a64266b2b3f4741b31dc91ff7c985d46335867196eb942a5f5e2e77af746
+size 647651
diff --git a/translatingheadersoftabulardataapilotstudyofschematranslation/full.md b/translatingheadersoftabulardataapilotstudyofschematranslation/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..fe526634cbc95aee6d80b0f1afa83df7d8f0e7a3
--- /dev/null
+++ b/translatingheadersoftabulardataapilotstudyofschematranslation/full.md
@@ -0,0 +1,283 @@
+# Translating Headers of Tabular Data: A Pilot Study of Schema Translation
+
+Kunrui Zhu $^{*1}$ , Yan Gao $^{2}$ , Jiaqi Guo $^{*3}$ , and Jian-Guang Lou
+
+1The University of Hong Kong, Hong Kong, China
+
+2Microsoft Research Asia, Beijing, China
+
+$^{3}$ Xi'an Jiaotong University, Xi'an, China
+
+konroy@connect.hku.hk, jasperguo2013@stu.xjtu.edu.cn, {yan.gao,jlou} @microsoft.com
+
+# Abstract
+
+Schema translation is the task of automatically translating headers of tabular data from one language to another. High-quality schema translation plays an important role in crosslingual table searching, understanding and analysis. Despite its importance, schema translation is not well studied in the community, and state-of-the-art neural machine translation models cannot work well on this task because of two intrinsic differences between plain text and tabular data: morphological difference and context difference. To facilitate the research study, we construct the first parallel dataset for schema translation, which consists of 3,158 tables with 11,979 headers written in 6 different languages, including English, Chinese, French, German, Spanish, and Japanese. Also, we propose the first schema translation model called CAST, which is a header-to-header neural machine translation model augmented with schema context. Specifically, we model a target header and its context as a directed graph to represent their entity types and relations. Then CAST encodes the graph with a relational-aware transformer and uses another transformer to decode the header in the target language. Experiments on our dataset demonstrate that CAST significantly outperforms state-of-the-art neural machine translation models. Our dataset will be released at https://github.com/microsoft/ContextualSP.
+
+# 1 Introduction
+
+As the saying goes, "a chart is worth a thousand words". Nowadays, tremendous amounts of tabular data written in various languages are widely used in Wikipedia pages, research papers, finance reports, file systems, and databases, which are informative. Schema translation is the task of automatically translating headers of tabular data from one language to another. High-quality schema translation plays an essential role in cross-lingual table
+
+| ①No. | ②Match | ③Hosted_by | ①Loc. | ④Cost ($) |
| 13249 | Olympic | America | Chicago | 287,000 |
| 13250 | World Cup | Brazil | Brasília | 129,000 |
| 13251 | UEFA | German | Berlin | 362,000 |
+
+
+Figure 1: An illustrative example of schema translation from English to Chinese. $①-④$ denotes headers with abbreviation, polysemy, verb-object phrase and special symbol, respectively.
+
+| 编号 | 比赛 | 主办方 | 地点 | 花费(美元) |
| 13249 | Olympic | America | Chicago | 287,000 |
| 13250 | World Cup | Brazil | Brasília | 129,000 |
| 13251 | UEFA | German | Berlin | 362,000 |
+
+searching, understanding, and analysis (Zhang and Balog, 2018; Deng et al., 2019; Sherborne et al., 2020). Note that in this work, we focus on translating the headers instead of the entire table content, since for each entity in table content, it is hard to decide if it needs to be translated or not. Over translation could even have negative effects in reality.
+
+Despite its importance, most research efforts are dedicated to plain text machine translation (Sutskever et al., 2014; Bahdanau et al., 2015; Vaswani et al., 2017; Yang et al., 2020), and schema translation is not well studied in the community, to the best of our knowledge. According to our preliminary study, state-of-the-art neural machine translation (NMT) systems cannot work well on schema translation because of two intrinsic differences between plain text and tabular data: morphological difference and context difference.
+
+Morphological Difference. The morphology of table headers differs from that of plain text in the following four aspects. First, headers are always phrases and they usually contain a lot of domain-specific abbreviations (e.g., as shown in Figure 1, "No." is the abbreviation of "Number" and the "Loc." is short for "Location") and special symbols (e.g., "$" means "dollar" in Figure 1). Second, verb-
+
+object phrases are frequently used as headers which indicate a subject-object relationship between two columns. For example, "Hosted by" in Figure 1 indicates a host relationship between the second and the third columns. Third, special tokenizations like CamelCase and underscore are idiomatic usages in headers. At last, capitalized words are particularly preferred in order to capture more readers' attention for headers. These special word-forms are commonly used in headers but rarely seen in plain text. Therefore, the NMT models trained with a massive amount of plain text cannot be directly applied to schema translation.
+
+Context Difference. Compared with plain text, which is a sequence of words, tables have well-defined structures, and understanding a table's structure is crucial for schema translation. Specifically, a table consists of an ordered arrangement of rows and columns. Each column header describes the concept of that column. The intersection of a row and a column is called a cell. Each cell contains entities of the column header it belongs to. This structure plays an important role in schema translation, especially for polysemy words and abbreviation words. For example, in Figure 1, the header "Match" could be translated to "火柴 (Matchstick)", "匹配 (Mapping)", and "比赛 (Competition)", but its sibling column header "Hosted_by" provides important clues that the table might belong to the domain of sport. Thus, translating "Match" to "比赛 (Competition)" is more appropriate in the context. Moreover, a column header's cell values could also provide hints to infer the meaning of the header. For example, successive numerical cell values indicate that "No." might be an identity column in Figure 1. NMT models trained with plain text have never seen the structure of tables, and consequently, they perform poorly in schema translation.
+
+Although the context information of tables is important, how to effectively use it for schema translation is challenging. On the one hand, the NMT model needs to make use of the context information to make word-sense disambiguation for polysemy headers and abbreviation headers. For another, the context information should not bring additional noise when translating the target header. To facilitate the research study, we construct the first parallel dataset for schema translation written in six different languages. It consists of 3,158 tables with 11,979 headers written in six differ
+
+ent languages, including English, Chinese, French, German, Spanish, and Japanese.
+
+Furthermore, to address the challenges in schema translation, we propose a Context Aware Schema Translation (CAST) model, which is a header-to-header neural machine translation model augmented with table context. Specifically, we model a target header and its context as a directed graph to represent their entity types and structural relations. Then CAST encodes the graph with a relational-aware transformer and uses another transformer to decode the header in the target language. The advantages of our approach come from two folds: (1) The structure relationships make the transformer encoder capture the structural information and learn a contextualized representation for the target header; (2) The entity types differentiate the target header from its context and thus help denoise the target header translation.
+
+Experiments on our dataset demonstrate that CAST significantly outperforms state-of-the-art neural machine translation models. Our contributions are summarized as follows.
+
+- We propose the task of schema translation, and discuss its differences with a plain text translation. To facilitate the research study, we construct the first parallel schema translation dataset.
+- We propose a header-to-header context-aware schema translation model, called CAST, for the new schema translation task. Specifically, we use the transformer self-attention mechanism to encode the schema over predefined entity types and structural relationships, making it aware of the schema context.
+- Experiments on our proposed dataset demonstrate that our approach significantly outperforms the state-of-the-art neural machine translation models in schema translation.
+
+# 2 Schema Translation Dataset
+
+To address the need for a dataset for the new schema translation task, we construct the first parallel schema translation dataset. It consists of 3,158 tables with 11,979 headers written in six different languages, including English, Chinese, French, German, Spanish, and Japanese. In this section, we will first introduce our construction methodology and then analyze the characteristics of our dataset.
+
+# 2.1 Dataset Construction
+
+We construct the dataset in two steps: collecting 3,158 English tables and then manually translating the schema of English tables to other languages.
+
+Table Collection. Our tables are collected from three resources. Firstly, we use all tables from the WikiTableQuestion dataset (Pasupat and Liang, 2015), in which they randomly select 2,108 multi-domain data tables in English from Wikipedia with at least eight rows and five columns. Secondly, we manually collect 176 English tables from the search engine covering multiple domains like retail, education, and government. At last, we select all the tables that appear in the training set and development set from the Spider dataset (Yu et al., 2018), which contains 200 databases covering 138 different domains. Finally, we obtained 3,158 tables with 11,979 headers in total.
+
+Context Aware Schema Annotation. To reduce the translation effort, we first use Google translator1 to automatically translate the English headers to five target languages, header by header. Then based on the Google translations, we recruit three professional translators for each language to manually check and modify the translations if inappropriate.
+
+In this process, we found that Google translator is not good enough in schema translation since industry jargon and abbreviations are commonly used in column headers. Table 1 shows some example headers and their paraphrases under different domains in our dataset. However, domain information is implicit, and the meaning of the header needs to be inferred carefully from the entire table context. To get more precise translations, we provide three kinds of additional information as a schema context: (1) a whole table with structural information, including its table name, column headers and cell values; (2) an original web-page URL for the table from the Wikipedia website; (3) some natural language question/answer pairs about the table2. Our translators are asked to first understand the context of the given schema before validating the translations. We find that the modification rate is $40\%$ , which indicates that the provided context is very useful. Finally, we further verify the annotated data by asking a different translator to check if the headers are correctly translated.
+
+| Header | Domain | Paraphrasing |
| Chart | Music | Ranking list |
| W/L/T | Sport | Win/Loss/Tie |
| Short/Long | Finance | Speculates on the decline/increase in a stock or other security's price |
| Receiver | Football | A role of a football player to catch forward passes from the quarterback |
| Aid/Did/Kid Academic | Author ID/Domain ID/Keyword ID |
+
+Table 1: Example headers with industry jargon and abbreviation in our dataset.
+
+| Abbreviation | Symbol | Verb object phrase | Capitalized |
| 18.12% | 27.18% | 5.45% | 87.25% |
+
+Table 2: Characteristic analysis of our dataset.
+
+# 2.2 Data Statistics and Analysis
+
+As we know, the translation cost is expensive, and we provide parallel corpus in six languages, which limits the volume of translated headers. On the basis of our statistics, the average validating speed is 100 headers/hour and we spend 159.34*5 hours in total. This speed is much slower than the plain text translation since our translators need to read large amounts of different domain-specific contexts to help disambiguation. To this end, we make our best effort and translate 11,979 headers, spending 6,625 USD in total. According to our translators' feedback, the context is quite helpful in understanding the meaning of headers. We will also release these contexts together with our schema translation dataset to facilitate further study.
+
+Dataset Analysis. To have a more quantitative analysis of our dataset, we count the ratio of headers containing four lexical features, including abbreviation, symbol characters, verb-object phrase and capitalized character. As we can see in table 2, these lexical features commonly occur in headers, making them quite different from plain text.
+
+To help better understand the domains of the collected tables, we firstly use a 44-category ontology presented in Wikipedia: WikiProject Council/Directory as our domain category. Then we randomly sample 500 tables in the training set and manually label the domains. According to our statistics, our dataset covers all 44 domains. In detail, the Sports, Countries, Economics, and Music topics together comprise $44.6\%$ of our dataset, but the other $55.4\%$ is composed of broader topics such as Business, Education, Science, and Government.
+
+| Split | Number of Tables | Number of Headers |
| Train | 2,437 | 8,796 |
| Dev | 450 | 1,285 |
| Test | 721 | 2,909 |
+
+Table 3: Data split statistics of our dataset.
+
+Datasets Splits. Firstly, for tables from WikiTableQuestion dataset, we inherit the same data splitting setting to divide the schema into training and testing sets. Then we further divide tables from the search engine and Spider dataset into two parts and add them to the training and testing sets. After that, we randomly sampled 450 tables from the development set of the WikiTablesQuestion dataset for validation. Eventually, we have 2,437 schemas for training, 450 for validation, and 721 for testing. Note that all headers for the same table are in the same split. In this way, we can test a model's ability to generalize to new tables. We summarize the statistics of our dataset in Table 3.
+
+# 3 Methodology
+
+In this section, we describe our schema translation approach in detail. We first introduce the requirement and our definition for the schema translation task and then introduce the model architecture.
+
+# 3.1 Task Requirement
+
+In schema translation, both the meaning of the headers and the structural information like order and numbers must be completely transferred to the target language. Obviously, this requirement cannot be met by translating schema as a whole with the traditional sequence-to-sequence NMT models because it cannot achieve precisely token level alignment. For example, when concatenating all headers with a separator “|”, the separator can be easily lost during translation. To meet this requirement, we employ a header-to-header translation manner in this work, which translates one header at a time.
+
+# 3.2 Task Definition
+
+We define a column header as $H_{i} = \langle h_{1},\dots ,h_{n}\rangle$ where $h_j$ is the $j$ th token of the header in the source language. Let $C_i = (S_i,V_i)$ denote the context of $H_{i}$ . It is made up of a set of selected cell values $V_{i} = \{v_{1},\ldots ,v_{t}\}$ of $H_{i}$ and the rest of headers $S_{i} = [H_{1},\dots ,H_{i - 1},H_{i + 1},\dots ,H_{m}]$ in the schema. The translation of $H_{i}$ is denoted as $Y_{i} = \langle y_{1},\dots ,y_{m}\rangle$ , where $y_{j}$ is the $j$ th token of
+
+the header in the target language. Taking a header $H$ and its corresponding context $C$ as input, the model outputs the header $Y$ in the target language.
+
+# 3.3 Model
+
+Basically, our model adopts a Transformer encoder-decoder architecture (Vaswani et al., 2017), which takes the source language header with its corresponding context as inputs and generates the translation for the target language header as outputs. Specifically, we model the target header and its context as a directed graph and use the transformer self-attention to encode them over two predefined structural relationships and three entity types. Figure 2 depicts the overall architecture of our model via an illustrative example.
+
+Relation-Aware Self-Attention. First, we introduce self-attention and then its extension, relation-aware self-attention. Consider a sequence of inputs $X = \{x_{i}\}_{i = 1}^{n}$ where $x_{i}\in \mathbb{R}^{d_{x}}$ . Self-attention introduced by Vaswani et al. (2017) transforms each $x_{i}$ into $z_{i}\in \mathbb{R}^{d_{x}}$ as follows:
+
+$$
+e _ {i j} = \frac {x _ {i} W _ {Q} (x _ {j} W _ {K}) ^ {T}}{\sqrt {d _ {z}}}
+$$
+
+$$
+\alpha_ {i j} = \operatorname {s o f t m a x} _ {j} \left\{e _ {i j} \right\} \tag {1}
+$$
+
+$$
+z _ {i} = \sum_ {j = 1} ^ {n} \alpha_ {i j} (x _ {j} W _ {V})
+$$
+
+where $W_{Q}, W_{K}, W_{V} \in \mathbb{R}^{d_{x} \times (d_{z})}$ .
+
+Shaw et al. (2018) proposes an extension to selfattention to consider the pairwise relationships between input tokens by changing Equation (1) as follows:
+
+$$
+e _ {i j} = \frac {x _ {i} W _ {Q} (x _ {j} W _ {K} + r _ {i j} ^ {K})) ^ {T}}{\sqrt {d _ {z}}}
+$$
+
+$$
+z _ {i} = \sum_ {j = 1} ^ {n} \alpha_ {i j} \left(x _ {j} W _ {V} + r _ {i j} ^ {V}\right) \tag {2}
+$$
+
+Here the $r_{ij}$ terms encode the known relationships between the two tokens $x_{i}$ and $x_{j}$ in the input sequence. In this way, this self-attention is biased toward some pre-defined relationships using the relation vector $r_{ij}$ in each layer when learning the contextualized embedding. Specifically, they use it to represent the relative position information between sequence elements. More details could be found in their work (Shaw et al., 2018).
+
+
+Figure 2: An overview of CAST with an illustrative example of English-to-Chinese schema translation. Firstly, the target header "Chinese" and its context are modeled as a directed graph. Then a stack of relation-aware transformers encodes the input sequence $\mathbf{X}$ to $\mathbf{X}'$ with a relational matrix $R$ induced from the graph.
+
+Inspired by Shaw et al. (2018), we model the target header and its context as a labeled directed graph and use the same formulation of relation-aware self-attention as Shaw et al. (2018). Here $X = \{x_{i}\}_{i=1}^{n}$ are initial embeddings of our input sequence, and the relational matrix $R$ is induced from the input graph, where $r_{ij}$ is a learned embedding according to the type of edge that $x_{i}$ and $x_{j}$ hold in the directed input graph. The following section will describe the set of relations our model uses to encode a target header concatenated with its context.
+
+Input Graph. We model a target header and its context as a directed graph to represent their entity types and structural relations. Firstly, we induce two kinds of edges to denote the structural relationships between the target header and its context: sibling header (i.e., an edge point from tokens in $S$ to tokens in the target header.), and belonging value (i.e., an edge point from tokens in $V$ to tokens in the target header.). In this sense, it could incorporate the structural information into the contextualized representation of the target header.
+
+Then, we define three sorts of entity types to distinguish the target header from its context. Specifically, for a token in the target header, we assign a special edge Target point to itself, denoting the entity type. For tokens in $S$ and $V$ , we assign them different edges point to themselves, e.g., Header,
+
+and Value respectively. Figure 2 illustrates an example graph (with actual edges and labels) and its induced relational matrix $R$ .
+
+Initial Token Embedding. We obtain the initial token embedding by a pre-trained transformer encoder before feeding it to the ration-aware transformer. To obtain the input sequence, each element in $S$ and $V$ are firstly concatenated with a vertical bar "|". Then, the target header $H$ , the rest of the headers $S$ , and the selected cell values $V$ are concatenated by a separator symbol "[sep]". At last, following (Fan et al., 2020), an additional source language token "langle src>" is added at the front to help the pretrained model identify the source language. The encoder then transforms the final input sequence into a sequence of embedding $X = [x_{1},\ldots ,x_{l}]$ . Then we feed them to the relational aware layers and get the final contextualized sequence of embedding $X^{\prime} = [x_{1}^{\prime},\dots,x_{l}^{\prime}]$ .
+
+Decoder. The goal of the decoder is to autoregressively generate the translated column header $Y = \langle y_1, \ldots, y_m \rangle$ . Specifically, taking $X'$ and the representation of previously output token as input, the decoder predicts the translation token by token until an ending signal $\langle end \rangle$ is generated. Similar to the encoder, a special token $\langle tgt \rangle$ which indicates the target language is added at the front to guide the prediction of the target language.
+
+# 4 Experiments
+
+In this section, we conduct experiments on our proposed schema translation dataset to evaluate the effectiveness of our approach. Furthermore, we ablate different ways of context modeling in our approach to understand their contributions. At last, we conduct a qualitative analysis and show example cases and their predicting results.
+
+# 4.1 Experiment Setup
+
+Baseline. We choose two state-of-the-art NMT models, including M2M-100 (Fan et al., 2020) and MBart-50M2M (Tang et al., 2020), as our baselines. Specifically, both of the baseline models employ the Transformer sequence-to-sequence architecture (Vaswani et al., 2017) to capture features from source language input and generate the translation. The M2M-100 is directly trained on large-scaled translation data while MBart-50M2M is firstly pre-trained with a "Multilingual Denoising Pretraining" objective and then fine-tuned in machine-translation task. We evaluate the baseline models with the following settings:
+
+- Base: The original NMT models without fine-tuning on the schema dataset.
+- H2H: The NMT models that are fine-tuned on our schema translation dataset in a header-to-header manner.
+- H2H+CXT: The NMT models are fine-tuned by concatenating a target header and its context as input and translating the target header.
+- H2H+CXT+ExtL: The NMT models with two extra Transformers layers at the end of the encoder, and are fine-tuned with the same setting as H2H+CXT.
+
+Besides NMT models, we also trained a phrase-based statistical machine translation (PB-SMT) schema translation model with Moses $^3$ (Koehn et al., 2007), with the same data split.
+
+Evaluation Metrics. We evaluate the performances of different models with the 4-gram BLEU (Papineni et al., 2002) score of the translations. Following the evaluation step in M2M-100, before computing BLEU, we de-tokenize the data and apply standard tokenizers for each language. We use SacreBLEU tokenizer for Chinese, Kytea4
+
+| Approach | En-Zh | En-Es | En-Fr | En-De | En-Ja |
| PB-SMT | 36.7 | 24.6 | 26.7 | 38.3 | 32.6 |
| M2M-100 | | | | | |
| Base | 27.4 | 23.9 | 27.5 | 30.6 | 22.2 |
| H2H | 45.1 | 48.6 | 54.2 | 46.1 | 38.8 |
| H2H+CXT | 47.2 | 48.5 | 53.3 | 46.7 | 40.4 |
| H2H+CXT+ExtL | 47.1 | 48.6 | 53.0 | 46.6 | 40.4 |
| CAST | 47.7 | 50.0 | 54.5 | 47.9 | 40.7 |
| MBart-50M2M | | | | | |
| Base | 31.9 | - | 23.4 | 44.6 | 28.2 |
| H2H | 46.0 | 48.5 | 56.0 | 51.8 | 41.8 |
| H2H+CXT | 47.5 | 49.7 | 56.4 | 51.3 | 41.7 |
| CAST | 47.6 | 51.2 | 57.9 | 52.7 | 42.0 |
+
+Table 4: Overall experimental results in BLEU for models translating schema from En to five languages. Results in bold denote the improvements are significant.
+
+for Japanese, and Moses tokenizer $^{5}$ for the rest of the languages. Besides BLEU, we also conduct a human evaluation for a more precise analysis.
+
+Hyperparameters. We fine-tune all of our NMT models for 4 epochs with a batch size of 4 and a warmup rate of 0.2. To avoid over-fitting, we set the early stopping patience on the validation set as 2. In the context construction, we randomly select 5 cell values for each target column. The Adam optimizer (Kingma and Ba, 2015) with $\beta 1 = 0.9$ , $\beta 2 = 0.99$ and $\epsilon = 1\mathrm{e} - 8$ is adopted. We set the number of relation-aware layers as 2, and we set the learning rate of the decoder and the relational aware layers as $3\mathrm{e} - 5$ , and decrease the learning rate of the Transformer encoder to 4 times and 8 times smaller for M2M-100 and MBart-50M2M respectively.
+
+# 4.2 Experimental Results
+
+We conduct experiments of translating schema from English (En) to five different languages, including Chinese (Zh), French (Fr), German (De), Spanish (Es), and Japanese (Ja). The performances of different translation models are listed in Table 4.
+
+Overall Performance. The overall performances of two NMT models across five target languages show similar trends.
+
+Firstly, compared with Base, which is trained only on plain text, H2H gains significant improvement. For example, H2H based on M2M-100 outperforms Base by 17.7, 24.7, 26.7, 15.5, and 16.6 BLEU in translating schema from En to Zh, Es, Fr, De, and Ja, respectively. It demonstrates a big difference between plain text and tabular data, and
+
+| Model | Accuracy |
| M2M-100 | |
| Base | 48.50% |
| H2H | 63.34% |
| H2H+CXT | 66.45% |
| CAST | 68.75% |
+
+Table 5: Human evaluation results on En-Zh.
+
+| Model | En-De | En-Fr |
| CAST | 52.7 | 57.9 |
| w/o Entity Type | 52.2 | 57.4 |
| w/o Structural Relation | 52.3 | 56.9 |
| w/o Entity Type and Structural Relation | 51.3 | 56.4 |
+
+Table 6: Ablation study results of BLEU score on CAST based on MBart-50M2M in En-De and En-Fr.
+
+fine-tuning on schema translation data could alleviate the difference to some extent.
+
+Next, we find that, in most situations, the performance of H2H can be further boosted by concatenating the constructed context from the table. Taking H2H+CXT based on M2M-100 as an example, comparing with H2H, H2H+CXT obtains 2.1, 0.6, and 1.6 points of improvement in En-Zh, En-De, and En-Ja settings, respectively. In terms of H2H+CXT based on MBart-50M2M, the concatenation of context also boosts the BLEU score for translating schema from En to Zh and Es by 1.5 and 1.2. The observations demonstrate the benefits of making good use of the constructed context.
+
+However, we also notice that concatenating the context does not help improve the performance of $\mathrm{H2H + CXT}$ based on MBart-50M2M and M2M100 in the setting of En-De and En-Ja, and the setting of En-Es and En-Fr, respectively. We hypothesize that the decrease of BLEU score comes from the noise brought by the context.
+
+There are no significant differences between the performance of $\mathrm{H2H + CXT}$ and $\mathrm{H2H + CXT + ExtL}$ which has two extra Transformers layers since the pre-trained NMT models have already had 12 Transformers layers. For example, the $\mathrm{H2H + CXT + ExtL}$ model based on M2M100 obtains 47.1, 48.6, 53.0, 46.6, and 40.4 BLEU points on En-Zh, En-Es, En-Fr, En-De, and En-Ja, respectively.
+
+Finally, equipped with the relation-aware module, CAST can make the best use of the context and obtain significant improvement over H2H across all settings. For models based on M2M-100, CAST outperforms H2H by 2.6, 1.4, 0.3, 1.8, and 1.9 BLEU in En-Zh, En-Es, En-Fr, En-De, and En-Ja, respectively. When it comes to models based on MBart-50M2M, CAST obtains 1.6, 2.7, 1.9, 0.9, 0.2 improvements of BLEU points over H2H in translating schema from En to 5 target languages. It is also noticeable that CAST can help denoise the concatenated context for H2H+CXT. For instance, CAST based on M2M-100 achieves 1.5 and 1.2
+
+improvements of BLEU points over $\mathrm{H2H + CXT}$ for schema translation from En to Es and Fr respectively. This improvement shows CAST can better model the target header and its context. We also run a Wilcoxon signed-rank tests between CAST and $\mathrm{H2H + CXT}$ and the results show the improvement are significant with $p < 0.05$ in 3 out of 5 languages. For the rest of the languages CAST achieves comparable results.
+
+Human Evaluation. Since the machine evaluation metrics cannot absolutely make sure whether the predicted result is correct or not, we conduct a human evaluation on the test set for a more precise evaluation. Specifically, we invite two experts to evaluate each language pair. For each case, they compare the machine translation and the human annotation. The label is set as 1 if they think the translation is equivalent to the annotation, otherwise 0. We report the human evaluation results for the Base, H2H, H2H+CXT, and CAST based on M2M-100 on the En-Zh setting in Table 5.
+
+According to human evaluation, H2H achieves $14.84\%$ improvement over Base, and the performance is further boosted by $3.11\%$ when the context is added. Finally, enhanced by the relation-aware structure, CAST obtains $2.3\%$ improvement over $\mathrm{H2H + CXT}$ , which demonstrates the effectiveness of our approach.
+
+# 4.3 Ablation Study
+
+We conduct ablation studies on CAST to analyze the contributions of our predefined entity types and structural relationships for context modeling. First, we evaluate the variant of CAST without entity types. Next, we evaluate the performance of CAST, without structural relations. Finally, we erase all kinds of relations in CAST which is identical to $\mathrm{H2H + CXT}$ . We report the performance of models based on M2M-100 in the setting of En-De and En-Fr in Table 6.
+
+Firstly, it is clear that erasing entity types decreases the performance of the schema translation
+
+| Type | Header | M2M-100(Base) | H2H | H2H+CXT | CAST | Context |
| Tokenization | Skill_Description | 技能-描述 (skill-description) | 技能描述 (skill_description) | 技能描述 (skill_description) | 技能描述 (skill_description) | |
| AssessedDebtService | 评价Debt服务 | 评估债务服务 | 评估债务服务 | 评估债务服务 | |
| (assessed service) | (assessed debt service) | (assessed debt service) | (assessed debt service) | |
| Abbreviation | OS | 我们 (we/us) | 我们 (we/us) | 操作系统 (operating system) | 操作系统 (operating system) | Computer|System|Core |
| Jan | 约翰 (John) | 约翰 (John) | 1月 (January) | 1月 (January) | Feb|Mar|Apr |
| Polysemy | Area | 区域 (district) | 区域 (district) | 面积 (area) | 面积 (area) | Height|Length|Depth |
| Chinese | 中国人 (people) | 中国人 (people) | 语文 (language) | 语文 (language) | Class|Teacher|Student |
| Title | 标题 (heading) | 职位 (position) | 歌名 (song title) | 歌名 (song title) | song id|singer |
| Volume | 容量 (capacity) | 卷 (reel/roll) | Volume (not translated) | 容量(capacity) | fuel|engine |
| Film.1 | 电影1 (Film 1) | 电影1 (Film 1) | 电影 (Film) | 电影1 (Film1) | Film|Date |
| Rank of the year | 年排名 (Rank of the year) | 年排名 (Rank of the year) | 年份 (year) | 年排名 (Rank of the year) | company id|station id |
+
+Table 7: Qualitative analysis for models' performance in schema translation from En to Zh on three kinds of headers. For each predicting result, we add extra explanations for their meanings in the brackets. Results with underline denote the correct translation for the header.
+
+models. Comparing CAST (w/o entity type) with CAST, for instance, We can see a 0.5 and 0.5 decrease of BLEU for En-De and En-Fr respectively. Secondly, the comparison between CAST (w/o structural relation) and CAST shows that the structure relations also play an important role in bettering the performance of context modeling. As seen in the En-Fr translation setting, CAST(w/o structural relation) obtains a 1.0 lower BLEU score over CAST. Finally, when erasing both kinds of edges and the models give the lowest performance.
+
+# 4.4 Qualitative Analysis
+
+In this section, we conduct a qualitative analysis on the effectiveness of CAST based on M2M-100 for three types of headers: headers with special tokenization, abbreviation headers, and polysemy headers. We list some of the example translations in Table 7.
+
+By comparing the translations for headers with special tokenization, we can see that all fine-tuned models, including H2H, H2H+CXT, and CAST can accurately translate headers in CamelCase or underscore tokenizations, while Base fails to skip the underscore and cannot translate "Debt" in the middle of "AccessedDebtService".
+
+For the abbreviation headers, when translating "OS" (the abbreviation of operation system) and "Jan" (the abbreviation of January), both Base and H2H fail to get the correct result. However, being aware of the context of "Jan" (e.g., Feb, Mar and Apr, etc.) and "OS" (e.g., Computer, System, and Core, etc.), H2H+CXT and CAST can better understand and translate the abbreviations.
+
+When it comes to the polysemy headers, with the help of context like "Height", "Width" and "Depth", H2H+CXT and CAST can disambiguate polysemy header "Area" from region or zone to acreage. For header "Volume", However, H2H+CXT copies the source language column,
+
+which is not a valid translation, because the translator is disturbed by the context. On the other hand, with the help of the relational-aware transformer encoder, CAST generates a proper translation for "Volume" as the capacity of the engine. Affected by the context, H2H+CXT only translates part of the information from header 'Film.1' and 'Rank of the year', while M2M-100, H2H, and CAST give an appropriate translation.
+
+# 5 Related Work
+
+With the developments of Neural Machine Translation (NMT) systems (Sutskever et al., 2014; Bahdanau et al., 2015), tremendous success has been achieved by existing studies on machine translation tasks. For instance, Vaswani et al. (2017) greatly improved bilingual machine translation systems with the Transformer architectures, (Edunov et al., 2018) achieved state-of-the-art on the WMT' 14 English-German tasks with back-translations augmentation, Weng et al. (2020) and Yang et al. (2020) explored ways to boost the performance of NMT systems with pre-trained language models. Recent works (Fan et al., 2020; Zhang et al., 2020) saw the potential to improve NMT models in many-to-many settings and proposed models that can perform machine translation on various language pairs. While the above-mentioned studies focus on sentence-level translation in plain text, they are not suitable for schema translation.
+
+A line of machine translation research closely related to our task is the phrase-to-phrase translation, which considers phrases in multi-word expressions as their translation unit. Traditional phrase-based SMT models (Koehn et al., 2007; Haddow et al., 2015) get phrase table translation probabilities by counting phrase occurrences and use local context through a smoothed n-gram language model. Recently, some works explore ways to adapt NMT
+
+models for phrase translation. For example, Wang et al. (2017) combined the phrase-based statistical machine translation (SMT) model into NMT and shown significant improvements on Chinese-to-English translation data, Huang et al. (2018) explored the use of phrase structures for NMT systems by modeling phrases in target language sequences, and Feng et al. (2018) used a phrase attention mechanism to enhance the decoder in relevant source segment recognition. The main differences between these studies and our work are: (1) we do not rely on external phrase dictionaries or phrase tables; and (2) we study how to make use of the schema context for word-sense disambiguation in the schema translation scenario.
+
+Context-aware schema encoding has received considerable attention in both recent semantic parsing literature (Hwang et al., 2019; Gong et al., 2019) and Table-to-Text literature (Gong et al., 2019). In general, there are two sorts of techniques: 1). add additional entity type embedding and special separator token from the input sequence to distinguish the table structure (i.e., Type-SQL and IRNET); 2). encode the schema as a directed graph. For example, Boin et al. (2019) use a Graph Neural Network (Scarselli et al., 2008), and Wang et al. (2020); Shaw et al. (2019) use a transformer self-attention mechanism to encode the schema over predefined schema relationships. Unlike these works, we explore the suitability of schema encoding techniques for the newly proposed schema translation task.
+
+# 6 Conclusion
+
+In this paper, we propose a new challenging translation task called schema translation, and construct the first parallel dataset for this task. To address the challenges for this new task, we propose CAST, which uses a relational-aware transformer to encode a header and its context over predefined relationships, making it aware of the table context.
+
+# Ethical Considerations
+
+The schema translation dataset presented in this work is a free and open resource for the community to study the newly proposed translation task. English tables collected are from three sources. First, we collect all tables from the WikiTableQuestions dataset (Pasupat and Liang, 2015), which is a free and open dataset for the research of question answering task on semi-structured HTML ta
+
+bles. Since all of the tables are collected from open-access Wikipedia pages, there is no privacy issue. Second, we collect 176 English tables from the search engines which are also publicly available and do not contain personal data. To further enlarge our dataset, we select all tables from the training set and development set of the Spider dataset (Yu et al., 2018), which is also a free and open dataset for research use. Since the tables from the Spider dataset are mainly collected from open-access online csv files, college database courses and SQL websites, there is no privacy issue either. For the translation step, we hire professional translators to translate the collected English tables to five target languages and the details can be found in Section 2.
+
+All the experiments with NMT models in this paper can be run on a single Tesla V100 GPU. On average, the training process of models in different languages can be finished in four hours. We implement our model with the Transformer $^6$ tools in Pytorch $^7$ , and the data will be released with the paper.
+
+# References
+
+Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Ben Boin, Jonathan Berant, and Matt Gardner. 2019. Representing schema structure with graph neural networks for text-to-SQL parsing. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4560-4565, Florence, Italy. Association for Computational Linguistics.
+L. Deng, Shuo Zhang, and K. Balog. 2019. Table2vec: Neural word and entity embeddings for table population and retrieval. Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval.
+Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018. Understanding back-translation at scale. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 489-500. Association for Computational Linguistics.
+Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed El-Kishky, Siddharth Goyal, Man
+
+deep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, Naman Goyal, Tom Birch, Vitaliy Liptchinsky, Sergey Edunov, Edouard Grave, Michael Auli, and Armand Joulin. 2020. Beyond english-centric multilingual machine translation. CoRR, abs/2010.11125.
+Jiangtao Feng, Lingpeng Kong, Po-Sen Huang, Chong Wang, Da Huang, Jiayuan Mao, Kan Qiao, and Dengyong Zhou. 2018. Neural phrase-to-phrase machine translation. CoRR, abs/1811.02172.
+Heng Gong, Xiaocheng Feng, Bing Qin, and Ting Liu. 2019. Table-to-text generation with effective hierarchical encoder on three dimensions (row, column and time). 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 3143-3152, Hong Kong, China. Association for Computational Linguistics.
+Barry Haddow, Matthias Huck, Alexandra Birch, Nikolay Bogoychev, and Philipp Koehn. 2015. The edinburgh/jhu phrase-based machine translation systems for wmt 2015. In Proceedings of the Tenth Workshop on Statistical Machine Translation, pages 126-133.
+Po-Sen Huang, Chong Wang, Sitao Huang, Dengyong Zhou, and Li Deng. 2018. Towards neural phrase-based machine translation. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net.
+Wonseok Hwang, Jinyeong Yim, Seunghyun Park, and Minjoon Seo. 2019. A comprehensive exploration on wikisql with table-aware word contextualization. arXiv preprint arXiv:1902.01069.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
+Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondrej Bojar, Alexandra Constantin, and Evan Herbst. 2007. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th Annual Meeting of the Association for Computational Linguistics Companion Volume Proceedings of the Demo and Poster Sessions, pages 177-180, Prague, Czech Republic. Association for Computational Linguistics.
+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, July 6-12, 2002, Philadelphia, PA, USA, pages 311-318. ACL.
+
+Panupong Pasupat and Percy Liang. 2015. Compositional semantic parsing on semi-structured tables. 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 1470–1480, Beijing, China. Association for Computational Linguistics.
+Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. 2008. The graph neural network model. IEEE transactions on neural networks, 20(1):61-80.
+Peter Shaw, Philip Massey, Angelica Chen, Francesco Piccinno, and Yasemin Altun. 2019. Generating logical forms from graph representations of text and entities. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 95-106, Florence, Italy. Association for Computational Linguistics.
+Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. 2018. Self-attention with relative position 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 464-468, New Orleans, Louisiana. Association for Computational Linguistics.
+Tom Sherborne, Yumo Xu, and Mirella Lapata. 2020. Bootstrapping a crosslingual semantic parser. In EMNLP.
+Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pages 3104-3112.
+Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, and Angela Fan. 2020. Multilingual translation with extensible multilingual pretraining and finetuning. CoRR, abs/2008.00401.
+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.
+Bailin Wang, Richard Shin, Xiaodong Liu, Oleksandr Polozov, and Matthew Richardson. 2020. RAT-SQL: Relation-aware schema encoding and linking for text-to-SQL parsers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7567-7578, Online. Association for Computational Linguistics.
+
+Xing Wang, Zhaopeng Tu, Deyi Xiong, and Min Zhang. 2017. Translating phrases in neural machine translation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1421-1431, Copenhagen, Denmark. Association for Computational Linguistics.
+Rongxiang Weng, Heng Yu, Shujian Huang, Shanbo Cheng, and Weihua Luo. 2020. Acquiring knowledge from pre-trained model to neural machine translation. 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 9266-9273. AAAI Press.
+Jiacheng Yang, Mingxuan Wang, Hao Zhou, Chengqi Zhao, Weinan Zhang, Yong Yu, and Lei Li. 2020. Towards making the most of BERT in neural machine translation. 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 9378-9385. AAAI Press.
+Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, Zilin Zhang, and Dragomir R. Radev. 2018. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 3911-3921. Association for Computational Linguistics.
+Biao Zhang, Philip Williams, Ivan Titov, and Rico Senrich. 2020. Improving massively multilingual neural machine translation and zero-shot translation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 1628-1639. Association for Computational Linguistics.
+Shuo Zhang and K. Balog. 2018. Ad hoc table retrieval using semantic similarity. Proceedings of the 2018 World Wide Web Conference.
\ No newline at end of file
diff --git a/translatingheadersoftabulardataapilotstudyofschematranslation/images.zip b/translatingheadersoftabulardataapilotstudyofschematranslation/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..797ffb8fdb9efdf2275198ba333e298b6fdf963a
--- /dev/null
+++ b/translatingheadersoftabulardataapilotstudyofschematranslation/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:19bd1a20f47356dd297662d50c897e39c909087202c21b0a009bc2cb0a5061c9
+size 354009
diff --git a/translatingheadersoftabulardataapilotstudyofschematranslation/layout.json b/translatingheadersoftabulardataapilotstudyofschematranslation/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..de1c475dda0b7a345d47dd6805fc67785a76a162
--- /dev/null
+++ b/translatingheadersoftabulardataapilotstudyofschematranslation/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:37bcf914b48383290d3278c39ceca5415b30dd6890fe878564191a8ee97cffb4
+size 337492
diff --git a/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/cde1a5d9-d75f-4ad1-b333-c98e6b2a7e7c_content_list.json b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/cde1a5d9-d75f-4ad1-b333-c98e6b2a7e7c_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..e9ca9e4dd45a7b48636a232bf269ac40444d3927
--- /dev/null
+++ b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/cde1a5d9-d75f-4ad1-b333-c98e6b2a7e7c_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:60fc1a738b23d22ca0befebf7b38d4f2379c64bbb5b12509c9054b75525fe736
+size 68817
diff --git a/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/cde1a5d9-d75f-4ad1-b333-c98e6b2a7e7c_model.json b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/cde1a5d9-d75f-4ad1-b333-c98e6b2a7e7c_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..70c827b36ae58f5158fffcc9ebcb97117712e41f
--- /dev/null
+++ b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/cde1a5d9-d75f-4ad1-b333-c98e6b2a7e7c_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ae27777cf952761f4300632310cdbb86fb99592ff56c39b0cd19b357849f97c3
+size 82239
diff --git a/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/cde1a5d9-d75f-4ad1-b333-c98e6b2a7e7c_origin.pdf b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/cde1a5d9-d75f-4ad1-b333-c98e6b2a7e7c_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..8c1f9e33dca3f8fac23e8d0a9ef84c211f7f989e
--- /dev/null
+++ b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/cde1a5d9-d75f-4ad1-b333-c98e6b2a7e7c_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7c20d3b06049e69d9f1269dc2436102f2ccf6e446f2d86cf91d8ebc0822bc9c5
+size 327275
diff --git a/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/full.md b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..e1db5f784de842c1a3b47a1077817d13c1275aac
--- /dev/null
+++ b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/full.md
@@ -0,0 +1,304 @@
+# Translation-based Supervision for Policy Generation in Simultaneous Neural Machine Translation
+
+Ashkan Alinejad, Hassan S. Shavarani and Anoop Sarkar
+
+School of Computing Science
+
+Simon Fraser University
+
+BC, Canada
+
+{aalineja,sshavara,anoop}@sfu.ca
+
+# Abstract
+
+In simultaneous machine translation, finding an agent with the optimal action sequence of reads and writes that maintain a high level of translation quality while minimizing the average lag in producing target tokens remains an extremely challenging problem. We propose a novel supervised learning approach for training an agent that can detect the minimum number of reads required for generating each target token by comparing simultaneous translations against full-sentence translations during training to generate oracle action sequences. These oracle sequences can then be used to train a supervised model for action generation at inference time. Our approach provides an alternative to current heuristic methods in simultaneous translation by introducing a new training objective, which is easier to train than previous attempts at training the agent using reinforcement learning techniques for this task. Our experimental results show that our novel training method for action generation produces much higher quality translations while minimizing the average lag in simultaneous translation.
+
+# 1 Introduction
+
+Simultaneous Machine Translation focuses on the real-time translation of the stream of utterances in the source language to the target language. The essence of simultaneous translation imposes a trade-off between translation quality and the delay in the delivery of the translated utterances. Finding the optimal segments in the input stream is one important task to balance the delay and the translation quality. Segmentation based on the input sentence structure (Ryu et al., 2006; Oda et al., 2014; Shavarani et al., 2015) has been explored in previous work.
+
+The other approach to reach the optimal segmentation strategy (policy) is to define the segmentation problem in reinforcement learning framework (Satija and Pineau, 2016; Gu et al., 2017; Alinejad et al., 2018) in which the segmentation agent
+
+chooses among two possible actions of READ (waiting to receive more input) and WRITE (producing an output based on the available input inventory).
+
+The segmentation agents can either use a fixed-latency policy (Dalvi et al., 2018; Ma et al., 2019a) or use an adaptive policy (Grissom II et al., 2014). In the former, the agent waits for receiving a certain number of input tokens and performs pairs of one WRITE and one READ afterward. In the latter, the agent looks for a specific signal in input to permit a WRITE action; a signal that might come from a parsing feature (Grissom II et al., 2014), a stochastic classifier (Gu et al., 2017), or the attention module of the translation model (Arivazhagan et al., 2019; Ma et al., 2020).
+
+Recently, imitation learning has been considered to train adaptive policies. This thread of research focuses on designing supervised oracle agents that can compute the optimal sequence of READ/WRITE actions; a sequence that leads the model to produce the most similar translation to that of an offline translation model1. Zheng et al. (2019a,b) and Arthur et al. (2021) use pairs of (input, reference) sentences to train the oracle agent.
+
+In this work, we create such an oracle agent using a fully trained neural machine translation model. We do not use reference translations to improve our agent and the translation model is not fine-tuned based on the performance of the agent. In spite of that, we are successful at lowering the latency of simultaneous translation below all previous methods across many different language pairs while retaining a competitive translation quality. Our results also demonstrate the applicability of our policy in augmenting existing simultaneous neural translation approaches and improving their
+
+(a) Example of a created Partial Translations Table
+
+
+Figure 1: Example of partial translations table. Our oracle action trajectory is indicated by the red dash line and the green cells are the words that our policy choose to WRITE. The subset of input words at each row is extended with $\langle /s\rangle$ token to improve the quality of partial translations.
+
+(b) The created optimal segments in the input stream based on the Partial Translations Table above. The reference action sequence of READs $(\Re)$ and WRITEs $(\mathfrak{W})$ can be created based on the occupied cells in each column.
+
+| R
+M | I Ich | want möchte | to study computer science | Informatik studieren |
+
+translation quality and latency.
+
+The remaining parts of the paper are as follows. In Section 2, we formally define our imitation learning problem and describe our solution to it. In Section 3, we examine our provided solution, and in Section 4, we examine the solution and provide experimental results and the analysis of our results. Section 5 compares our work to the related work and Section 6 concludes our work.
+
+# 2 Supervised Approach
+
+In simultaneous machine translation, we aim to receive the input sequence $X = \{x_{1},\ldots ,x_{J}\}$ incrementally and to transform it to the translated tokens $Y = \{y_{1},\dots ,y_{I}\}$ as accurately and as fast as possible (by producing the output while reading the input). Our supervised framework contains two main components: The INTERPRETER which takes subsets of the input sequence $X_{j} = \{x_{1},\ldots ,x_{j}\}$ and generates partial translations $Y^{j} = \{y_{1}^{j},\ldots ,y_{m_{j}}^{j}\}^{2}$ ; And the AGENT which decides whether to send the next input subset $X_{j + 1}$ to the INTERPRETER or not, based on the currently generated output tokens (and possibly other useful information) which represents the state of the INTERPRETER.
+
+# 2.1 Reference Action Sequences
+
+The central idea behind our method is our novel definition of an optimal segment in simultaneous translation. We define an optimal segment as a segment of the input sequence which leads the INTERPRETER to produce the exact same target words in both simultaneous (partial) translation and full-sentence translation. The initial optimal segment is a prefix of the input and each subsequent optimal segment is a further slice of the input. A reference action sequence (or an oracle action sequence) is a sequence that splits the input sentence into optimal segments.
+
+To achieve this goal we build a Partial Translations Table (PTT), each row of which corresponds to the translation of a prefix of the source sentence and each column represents a translated word. More explicitly, the first row contains the translation of the first input token followed by the end-of-sentence token $\langle /s\rangle$ and each next row will incrementally consider one more input token than the immediate row before. By definition, the last row will be equivalent to the full-sentence translation. Figure 1(a) shows an example of a generated Partial Translations Table.
+
+We construct the reference action sequence of optimal segments using the PTT. Starting from the leftmost word in the first row, we compare the content of each column with the word in its own column at the last row. If they are the same we add
+
+WRITE action to the oracle sequence and move to the right cell. Otherwise, we will add READ and move down to the lower cell.
+
+Figure 1(b) demonstrates the optimal segments created using PTT for the example input sentence "I want to study computer science". Using this stream, the first element of the action sequence will be $\Re$ since the READ row is occupied in the first column. The next element will be $\mathfrak{W}$ since the WRITE row is occupied in the second column. If we continue to look at each column and generate a READ or WRITE action we will end up with the reference action sequence of " $\Re\ \mathfrak{W}$ $\Re\ \mathfrak{W}$ $\Re\ \mathfrak{R}$ $\Re\ \mathfrak{R}$ $\Re\ \mathfrak{W}$ $\mathfrak{W}$ ".
+
+We now formally define the reference action sequence generation algorithm. Let $j$ be the number of READs and $i$ be the number of WRITEs at a given time step $t = i + j$ . At time step $t + 1$ , if the token $y_{i}$ in the full-sentence translation $Y$ , equals to the $i$ 'th token in the partial translation $Y^{j}$ , it means that the current subset of the input words $X_{j}$ is sufficient to generate the $i$ 'th word in the output and our agent should choose to WRITE. Otherwise, we will add a READ to our action sequence. Algorithm 1 defines the extraction process.
+
+Our proposed algorithm for generating the reference action sequence is completely agnostic about the underlying partial translation generation component. We can choose offline (non-simultaneous) or simultaneous translation models to create the Partial Translations Table.
+
+Algorithm 1 Generating action sequences
+1: Init $i\gets 1,j\gets 1$ , actions $\leftarrow$ [R]
+2: $Y =$ Translate $(X_{J})$
+3: while $i < \mathrm{len}(Y)$ do
+4: $Y^{j} =$ Translate $(X_{j})$
+5: if $i < \mathrm{len}(Y^j)$ and $Y_{i}^{j} = Y_{i}$ then
+6: actions $\leftarrow$ actions +[W]
+7: $i\gets i + 1$
+8: else
+9: actions $\leftarrow$ actions +[R]
+10: if $j < J$ then
+11: $j\gets j + 1$
+12: return actions
+
+# 2.2 Supervised Training
+
+For any input sentence $X$ and its corresponding partial translations $Y^{1},\ldots ,Y^{J}$ , we can generate an oracle action sequence $A = \{a_{1},\dots ,a_{T}\}$ , where $T = I + J$ . This action sequence will be used
+
+
+Figure 2: Architecture of our Agent. Passing the last 3 generated actions alongside the source and target tokens help the model prevent long consecutive sequences of READs or WRITEs.
+
+as the ground-truth for training our action generation policy in a supervised framework. At time step $t$ , the policy observes the current state of the INTERPRETER $o_t$ by receiving $x_i$ and $y_j$ alongside a history of actions $\eta_h$ from previous time steps, where $\eta_h = \{a_{t-1}, \ldots, a_{t-h}\}$ . We train a recurrent neural network (RNN) to maximize the probability of the current action $a_t$ given all the previous observations and actions:
+
+$$
+\max P \left(a _ {t} \mid a _ {< t}, o _ {\leq t}; \theta\right)
+$$
+
+where $\theta$ is the set of parameters for our RNN.
+
+At each time step, we pass the source token, the target token, and all the actions in $\eta_h$ through separate embedding layers. The action embedding layer is shared among actions. The source and target embeddings will be concatenated and go through a linear layer. A separate linear layer receives concatenated action embeddings to extract features. The concatenation of the outputs of the two linear transformation layers go through 4 LSTM layers to predict the next action. Figure 2 depicts the structure of our Agent. While the agent is modeled as an LSTM, the underlying translation system we use is a Transformer NMT model.
+
+# 2.3 Improving Robustness
+
+Minimizing the discrepancy between training and inference, also known as exposure bias (Ranzato et al., 2016), is an essential step in successfully training a supervised agent. Our Agent has to learn
+
+how to generalize when facing unseen partial translations and make sure the errors do not compound with each mistake in its trajectory.
+
+The Interpreter Since we do not change the translation component, if we consider the previously generated tokens instead of the ground truth translations, we can guarantee that training and inference are using the same procedure in creating the Partial Translations Table. Although this makes the training process slower, it provides more accurate results.
+
+The Agent To prevent landing in unfamiliar areas of the prediction space with certain Agent mistakes we augment our training data of action sequences with additional examples that are introduce distortions in the action sequence (Arthur et al., 2021). For each input sentence $X$ we generate its oracle action sequence $A$ and the set of observations $O = \{o_1, \ldots, o_T\}$ with $o_t = (x_i, y_j, \eta_h)$ to be used for training the Agent. Then we randomly choose a time step $t$ and check the training example $(o_t, a_t)$ to see if it has the following conditions:
+
+$$
+\begin{array}{l} \bullet t \notin \{1, T \}. \\ \bullet x _ {i} \neq < / s >. \\ \cdot y _ {j} \neq < / s >. \\ \end{array}
+$$
+
+If all of the conditions are true, then we swap the action $a_{t}$ from READ to WRITE or vice versa, and we generate a new oracle action sequence for the rest of the sentence. The observation $o_{t}$ is updated according to the newly generated oracle. An example is presented and discussed in the appendix.
+
+Beam search vs. Greedy decoding Following previous work, to boost the simultaneous nature of the model, we use greedy decoding while performing the simultaneous decoding in the INTERPRETER.
+
+The simultaneous decoder (aka the INTERPRETER) can use beam search to get more accurate results at expense of the translation speed. However, this modification does not substantially change the comparison with baseline methods, so we leave this for future work.
+
+Since the Partial Translation Table can be generated in an offline manner (and can be considered a pre-processing step), we use beam search decoding when creating these partial translations without any negative effect on inference for simultaneous translation at decoding time.
+
+# 3 Experimental Setup
+
+# 3.1 Dataset
+
+We use IWSLT14 (Cettolo et al., 2014) and WMT $^{3}$ German to English and IWSLT15 (Luong et al., 2015) Vietnamese to English translation tasks to examine the effectiveness of our approach.
+
+Following Elbayad et al. (2020), we tokenize and lower-case the German to English data and BPE (Sennrich et al., 2016) sub-word tokenize both sides.
+
+For IWSLT14 data, we choose 10K separate BPE merge operations resulting in approximately 8.8K German and 6.6K English sub-word types. We train our models on 160K sentences and keep 7K of the train data as the validation set. We test our models on a concatenation of dev2010 and tst2010 to tst2013 (a total of 6750 sentence pairs).
+
+For WMT15, we choose BPE merge operations such that we achieve a joint BPE vocabulary of size 32K types. We will randomly choose 20 percent of the sentence pairs for training the Agent4. We will also use the same subset for distorting the samples and together we will end up having 1.5M training examples. We use newstest2013 with 3000 sentence pairs as the validation set and test on newstest2015 with 2169 sentences.
+
+For IWSLT15 Vietnamese to English, we use the tokenized corpus prepared by Luong et al. (2015) which contains 17K English and 7.7K Vietnamese types. The data contains 133K training sentence pairs. We use tst2012 (1553 sentence pairs) for validation and tst2013 (1268 sentence pairs) to test our models.
+
+# 3.2 Evaluation
+
+We evaluate the translation quality of the translated sentences using tokenized word-level BLEU score (Papineni et al., 2002) $^5$ . We use Average Lagging (AL) (Ma et al., 2019b) to measure the decoding latency for our models. AL measures the average number of words we are lagging behind a policy that produces words at a rate proportional to the ratio between target and source lengths, with no delay.
+
+Our goal in this paper is to minimize the decoding latency (get the lowest average lagging possi
+
+3http://www.statmt.org/wmt15/
+4 Making use of more data did not affect our results.
+5https://github.com/moses-smt/ mosesdecoder/blob/master/scripts/ generic/multi-bleu.perl
+
+ | DE→EN | VI→EN |
| BLEU | AL | BLEU | AL |
| wait-∞ + eval-wait-5 | 27.92 | 4.48 | 19.93 | 3.5 |
| wait-∞ + oracle policy | 34.25 | 4.14 | 28.29 | 4.6 |
| multi-path + eval-wait-5 | 30.50 | 4.67 | 20.18 | 2.33 |
| multi-path + eval-wait-5 + oracle policy | 33.04 | 3.75 | 25.25 | 4.35 |
| wait-∞ + (Zheng et al., 2019a) | 31.18 | 4.50 | 20.71 | 3.31 |
+
+Table 1: Comparison between different oracles on IWSLT14 DE $\rightarrow$ EN and IWSLT15 VI $\rightarrow$ EN datasets.
+
+ble) while trying to balance the loss in the translation quality as measured by BLEU score. Among the two measures, BLEU normally gets lower in production settings, as the data is not as clean and well prepared as the benchmark data. On the other hand, improving average lagging is a more reliable method to improve the user experience (in simultaneous translation).
+
+# 3.3 Model Configuration
+
+We use fairly standard Transformer-based NMT system as implemented in Fairseq (Ott et al., 2019) for all of our experiments6. We augment the implementation to perform simultaneous translation and we incorporate our Agent trained to produce read and write actions with the base NMT system and decoder. Our INTERPRETER can be additionally configured to replicate the model proposed in (Elbayad et al., 2020).
+
+Our agent consists of 4 unidirectional LSTM layers (Hochreiter and Schmidhuber, 1997) with 512 units in each layer. We use a history of the last 3 previous action tokens (i.e. $h = 3$ ). Each embedding and linear layer generates a vector of dimension 512.
+
+We train our Agent using Adam (Kingma and Ba, 2014) optimizer. The initial learning rate is set to 0.0008 and we use a fixed learning rate scheduler with a shrink factor of 0.95.
+
+After training for 50 epochs, our agent that is trained to produce optimal segments obtains an average accuracy of $92.3\%$ on the training data and $83\%$ on the dev set when averaged over 4 experiments on the IWSLT datasets.
+
+# 4 Results and Analysis
+
+We compare the performance of our system against two baselines:
+
+- Wait- $\infty$ also known as Wait-Until-End, where the full sentences are read during training before generating any translations. This is an extreme case of Wait- $k$ strategy (Ma et al., 2019a) in which the model reads the first $k$ words of the input and then performs consecutive WRITE/READ actions afterwards.
+
+- Multi-path model proposed by (Elbayad et al., 2020). The multi-path model jointly trains the translation component on decoding strategies with various latencies, which makes this model effective on a wide range of delay values.
+
+For both of these settings, we will use the eval-wait- $k$ (Ma et al., 2019a) policy, where each written word is exactly $k$ words behind the source side. We compare the performance of our model against the state-of-the-art (SotA) in section 4.2.
+
+# 4.1 Performance of Oracle Policy
+
+Table 1 compares the performance of our policy for DE $\rightarrow$ EN and VI $\rightarrow$ EN language pairs on IWSLT dataset. wait- $\infty +$ eval-wait-5 corresponds to the model in which we decode an offline translation component using wait-5 policy. In wait- $\infty +$ oracle policy, we use an offline INTERPRETER to generate partial translations in PTT, and then we use our algorithmic oracle to generate policies. The policy in multi-path $^+$ eval-wait-5 is generated by decoding multi-path model with wait-5 policy. multi-path $^+$ eval-wait-5 $^+$ oracle policy is the model where we first use the multi-path model with wait-5 decoding path to generate partial translation and then we use our algorithm to generate oracle policy. Our choice of eval-wait-5 for decoding the multi-path model
+
+
+Figure 3: Translation quality vs delay of our oracle policy compared to multi-path policy. Markers: — represents wait- $\infty$ model. $\square$ corresponds to the multi-path model. Each point in the curve is generated using eval-wait-k policy for $k \in \{1, 3, 5, 7, 9\}$ . * points to the wait- $\infty$ + our trained policy. ◇ represents the multi-path + eval-wait-5 + our trained policy.
+
+
+
+
+
+
+
+is based on the fact that the multi-path model generates more accurate translations via eval-wait-5 compared to offline decoding (Elbayad et al., 2020). The numbers in the last row of Table 1 are generated by using an offline INTERPRETER and the oracle in (Zheng et al., 2019a).
+
+# 4.1.1 Our oracle policy vs. static policies
+
+On both offline and multi-path settings, our oracle policy outperforms eval-wait-5 policy both in terms of translation quality and latency on DE $\rightarrow$ EN language direction. Our policy on VI $\rightarrow$ EN experiment is slightly more delayed, but the translation quality is considerably more accurate. The performance of the eval-wait-5 policy improves when we replace the offline INTERPRETER with the multi-path model. However, the multi-path model does not outperform eval-wait-5 combined with our oracle policy.
+
+The delay of our oracle policy decreases when we change the underlying translation component to a multi-path translation model so using a base translation model trained to handle shorter segments can be combined with an agent trained on our reference actions to improve the average lagging.
+
+# 4.1.2 Our oracle policy vs dynamic policies
+
+Zheng et al. (2019a,b); Arthur et al. (2021) propose algorithmic methods for generating oracle action sequences. The oracle in (Zheng et al., 2019b) introduces a new delay token in the target vocabulary which makes their INTERPRETER incompatible to our agent.
+
+Arthur et al. (2021) use alignment-based segments to jointly train their policy and translation
+
+components. Only using alignments extracted from fast-align (Dyer et al., 2013) on an offline translation component gives us very low BLEU scores.
+
+The oracle in (Zheng et al., 2019a) is the closest model to our work. Unlike our policy, they compare each word in partial translations to the target words to find the optimal action sequence. The numbers in Table 1 correspond to the closest results we could get by searching for the optimal hyperparameters. Our oracle policy outperforms their oracle policy in both language pairs.
+
+# 4.2 Trained Agent Performance
+
+Figure 3 shows the results of our trained policy in comparison with the policy trained with multi-path method on DE $\leftrightarrow$ EN and VI $\leftrightarrow$ EN language pairs. We will apply our policy on two different settings: (1) When we use a translation model trained on full sentences to fill up the partial translations table (offline + our policy) and (2) generating translations in PTT via multi-path model decoded with eval-wait-5 trajectory (multi-path + our policy). In both settings, we are using a beam of size 5 for generating each partial translation.
+
+First, we investigate how the capabilities of the INTERPRETER can affect the quality of the generated policy. By comparing the offline INTERPRETER (marked with star) and multi-path INTERPRETER (marked with diamond) we can see that the offline model can achieve a higher translation quality with a more delayed policy. This is in align with our experimental results with their oracles (Section 4.1) where using multi-path INTERPRETER gave us less delayed policy by sacrificing translation quality.
+
+
+Figure 4: Comparison against SoTA results on WMT15 DE $\rightarrow$ EN language pair. SL is the supervised learning approach proposed by (Zheng et al., 2019a). "Our oracle policy" generates the oracle action sequences for partial translations generated by wait- $\infty$ translation model, and "Our trained policy" is our Agent trained to learn that oracle.
+
+By comparing the multi-path model (marked with square) with our trained policy we can see that in both DE $\rightarrow$ EN and VI $\rightarrow$ EN language pairs our policy outperforms the multi-path model in both settings. This is because our policy gives the INTERPRETER the freedom to translate quickly at the beginning and have consecutive reads later in the sentence, which consequently results in higher translation quality and lower latency.
+
+In EN $\rightarrow$ DE and EN $\rightarrow$ VI our agent generates translation with much lower delays with slightly lower translation scores. This happens because translation in this direction can be monotonic without losing much in terms of translation scores. In this scenario, our model has a higher chance of making mistakes as the length of the sentence gets longer; while the multi-path model following the static policy of eval-wait- $k$ obtains slightly higher translation scores.
+
+On multi-path settings, for DE $\rightarrow$ EN language pair, our trained policy has a much lower latency while at the same time it is considerably more accurate in terms of translation scores compared to the eval-wait-1 policy. Similarly, for VI $\rightarrow$ EN experiment, the translation quality of our policy is close to eval-wait-7 with a delay less than eval-wait-5 policy. This implies that we can boost the performance of the previously proposed methods by combining their translation system with an agent trained using our proposed oracle policy.
+
+# 4.3 Performance on WMT15 Dataset
+
+In order to compare the performance of our trained agent with other state-of-the-art methods, we will conduct experiments on the WMT15 DE $\rightarrow$ EN dataset. As depicted in Figure 4, our oracle policy is able to generate action sequences with AL of around 6, while our translation quality is as good as the offline model. On datasets with longer sentences like WMT, achieving oracle-level accuracy is a harder task. However, compared to a static policy like eval-wait- $k$ , our Agent generates action sequences that perform similar to eval-wait-3. Although the policies in MoChA (Chiu and Raffel, 2018), MILK (Arivazhagan et al., 2019) and their recent version of MMA-H and MMA-IL (Ma et al., 2020) generate more accurate translations, the delay of their systems is considerably higher than our approach.
+
+The BLEU scores of the previously proposed supervised learning approach in (Zheng et al., 2019a) is much worse than our model when we consider AL values that are similar to ours. We obtain $+2$ points higher BLEU score for translation quality with almost the same delay as their model.
+
+# 4.4 Qualitative Analysis
+
+Waiting for long consecutive words in the source is not always a good strategy in translating from SOV to SVO languages. Table 3 shows an example where our policy can generate each word as soon as it receives them. Such examples explain why our model performs better than wait- $k$ models which
+
+(a) Generated actions and translations via our supervised agent
+
+| R | wir mussten uns wegen der [an] [wäl] te [us] w. sorgen machen . |
| W | we had to worry about [law] yers and so on . |
+
+(b) Generated actions and translations via Multi-path agent
+
+| R | wir mussten uns wegen der [an] [wäl] te [us] w. sorgen machen . |
| W | we had to look forward because of the [law] yers ... |
+
+Table 2: The performance comparison of generated actions from our model (a) and multi-path model (b) on the generated and reference translations. Each column shows a single READ $(\mathfrak{R})$ or WRITE $(\mathfrak{W})$ . Subword tokens ending in $@@$ are shown inside brackets.
+
+| R | aber | wo | sind | wir | nützlich | ? |
| W | but | where | are | we | useful | ? |
+
+Table 3: An example translation from our model where word-by-word translation generates good translations and waiting for 5 words is redundant.
+
+are forced to wait for $k$ words even when there is sufficient information to start the translation.
+
+Table 2 compares the output of our model for an example German sentence to that of the multipath model decoded with eval-wait-5 policy. As we mentioned earlier, our model does not wait too long to translate the tokens for which it has enough information. Please compare the translation time of "wir" and "mussten" in Table 2.(a) and Table 2.(b). It is apparent that eval-wait-5 must wait for 5 tokens to translate the tokens that it has already had enough information about them for a while.
+
+In addition, our model does not translate tokens based on immature information. For example, in table 2, our model waits until it receives "sorgen machen" which is essential for translating "to worry" as opposed to the eval-wait-5 design which forces the model to produce the generic verb "to look forward" which causes the model to lose information about the verb. While forcing this step lowers the latency, the translated sentence becomes highly inaccurate.
+
+# 5 Related Work
+
+Satija and Pineau (2016); Gu et al. (2017) propose to use a reinforcement learning algorithm to train the Agent. Their proposed agent observes the pretrained offline translation model to learn when to READ or WRITE. Alinejad et al. (2018) improve their model by introducing a new predict token in order to have a better estimate of the proper action for the next time step.
+
+Monotonic attention mechanism (Raffel et al., 2017; Chiu and Raffel, 2018) proposes to use at
+
+tention mechanism to chunk the source and target sequences. However, they restrict the scope of their attention to the immediate input, which can be problematic for reordering words in the translation task. Arivazhagan et al. (2019); Ma et al. (2020) address this problem by attending to all the already seen words.
+
+The static eval-wait-k policy proposed by Ma et al. (2019a) reads k words and then consecutively reads a word and decodes one word until the $\langle /s\rangle$ is written to the output. The Wait-k model trains a translation component using the eval-wait-k decoding strategy which leads to generating more effective policies. Elbayad et al. (2020) show by training the translation component jointly on various wait-k trajectories, the model can generalize better over various eval-wait-k policies.
+
+Arthur et al. (2021) propose to use word-alignmentsto be used as the reference for training their Agent jointly with the translation component, using imitation learning.
+
+A similar supervised approach proposed by Zheng et al. (2019a), where an oracle is generated for a fixed INTERPRETER and then an Agent will be trained to learn it. Their approach is different from ours in that: (a) our model compares partial translations with full-sentence translations of the same INTERPRETER, which leads to having an oracle that finds notably more effective policies without any unnecessary hyper-parameters. (2) we are using a completely different architecture (3) we explore the performance of our oracle using translation components other than offline translation models.
+
+# 6 Conclusion
+
+We present a novel idea for generating optimal segments in simultaneous translation by comparing the output of a simultaneous system for translation with an offline translation model. This provides
+
+us with oracle action sequences that we can use to train an Agent used to produce read and write actions for simultaneous translation. Our experimental results show that by using an offline translation component, our agent can generate better policies in terms of translation quality and delay compared to our baselines. We also show that our agent can be trained by previously proposed translation components and generate better policies compared to what they have reported before.
+
+# References
+
+Ashkan Alinejad, Maryam Siahbani, and Anoop Sarkar. 2018. Prediction improves simultaneous neural machine translation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3022-3027, Brussels, Belgium. Association for Computational Linguistics.
+Naveen Arivazhagan, Colin Cherry, Wolfgang Macherey, Chung-Cheng Chiu, Semih Yavuz, Ruoming Pang, Wei Li, and Colin Raffel. 2019. Monotonic infinite lookback attention for simultaneous machine translation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1313-1323, Florence, Italy. Association for Computational Linguistics.
+Philip Arthur, Trevor Cohn, and Gholamreza Haffari. 2021. Learning coupled policies for simultaneous machine translation using imitation learning. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 2709-2719, Online. Association for Computational Linguistics.
+Mauro Cettolo, Jan Niehues, Sebastian Stüker, Luisa Bentivogli, and Marcello Federico. 2014. Report on the 11th iwslt evaluation campaign, iwslt 2014. In Proceedings of the International Workshop on Spoken Language Translation, Hanoi, Vietnam, volume 57.
+Chung-Cheng Chiu and Colin Raffel. 2018. Monotonic chunkwise attention. In International Conference on Learning Representations.
+Fahim Dalvi, Nadir Durrani, Hassan Sajjad, and Stephan Vogel. 2018. Incremental decoding and training methods for simultaneous translation in neural machine translation. 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 493-499, New Orleans, Louisiana. Association for Computational Linguistics.
+Chris Dyer, Victor Chahuneau, and Noah A. Smith. 2013. A simple, fast, and effective reparameterization of IBM model 2. In Proceedings of the 2013 Conference of the North American Chapter of
+
+the Association for Computational Linguistics: Human Language Technologies, pages 644-648, Atlanta, Georgia. Association for Computational Linguistics.
+Maha Elbayad, Laurent Besacier, and Jakob Verbeek. 2020. Efficient Wait-k Models for Simultaneous Machine Translation. In *Interspeech 2020 - Conference of the International Speech Communication Association*, pages 1461-1465, Shangai (Virtual Conf), China.
+Alvin Grissom II, He He, Jordan Boyd-Graber, John Morgan, and Hal Daumé III. 2014. Don't until the final verb wait: Reinforcement learning for simultaneous machine translation. In Empirical Methods in Natural Language Processing.
+Jiatao Gu, Graham Neubig, Kyunghyun Cho, and Victor O.K. Li. 2017. Learning to translate in real-time with neural machine translation. In 15th Conference of the European Chapter of the Association for Computational Linguistics (EACL), Valencia, Spain.
+Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. *Neural computation*, 9:1735-80.
+Diederik Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. International Conference on Learning Representations.
+Minh-Thang Luong, Christopher D Manning, et al. 2015. Stanford neural machine translation systems for spoken language domains. In Proceedings of the international workshop on spoken language translation, pages 76-79, Da Nang, Vietnam.
+Mingbo Ma, Liang Huang, Hao Xiong, Renjie Zheng, Kaibo Liu, Baigong Zheng, Chuanqiang Zhang, Zhongjun He, Hairong Liu, Xing Li, Hua Wu, and Haifeng Wang. 2019a. STACL: Simultaneous translation with implicit anticipation and controllable latency using prefix-to-prefix framework. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3025-3036, Florence, Italy. Association for Computational Linguistics.
+Mingbo Ma, Liang Huang, Hao Xiong, Renjie Zheng, Kaibo Liu, Baigong Zheng, Chuanqiang Zhang, Zhongjun He, Hairong Liu, Xing Li, Hua Wu, and Haifeng Wang. 2019b. STACL: Simultaneous translation with implicit anticipation and controllable latency using prefix-to-prefix framework. pages 3025-3036.
+Xutai Ma, Juan Miguel Pino, James Cross, Liezl Puzon, and Jiatao Gu. 2020. Monotonic multihead attention. In International Conference on Learning Representations.
+Yusuke Oda, Graham Neubig, Sakriani Sakti, Tomoki Toda, and Satoshi Nakamura. 2014. Optimizing segmentation strategies for simultaneous speech translation. In Proceedings of the 52nd Annual Meeting of
+
+the Association for Computational Linguistics (Volume 2: Short Papers), pages 551-556, Baltimore, Maryland. Association for Computational Linguistics.
+Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. *fairseq: 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.
+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.
+Colin Raffel, Minh-Thang Luong, Peter J. Liu, Ron J. Weiss, and Douglas Eck. 2017. Online and linear-time attention by enforcing monotonic alignments. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 2837-2846. PMLR.
+Marc'Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. 2016. Sequence level training with recurrent neural networks. In 4th International Conference on Learning Representations, ICLR 2016, San Juan, Puerto Rico, May 2-4, 2016, Conference Track Proceedings.
+Koichiro Ryu, Shigeki Matsubara, and Yasuyoshi Inagaki. 2006. Simultaneous English-Japanese spoken language translation based on incremental dependency parsing and transfer. In Proceedings of the COLING/ACL 2006 Main Conference Poster Sessions, pages 683-690, Sydney, Australia. Association for Computational Linguistics.
+Harsh Satija and Joelle Pineau. 2016. Simultaneous machine translation using deep reinforcement learning. Abstraction in Reinforcement Learning Workshop, ICML 2016, (33).
+Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural Machine Translation of Rare Words with Subword Units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1715-1725, Berlin, Germany. Association for Computational Linguistics.
+Hassan S Shavarani, Maryam Siahbani, Rantim M Seraj, and Anoop Sarkar. 2015. Learning segmentations that balance latency versus quality in spoken language translation. In Proceedings of the Eleventh International Workshop on Spoken Language Translation (IWSLT 2015), Da Nang, Vietnam, volume 26, page 52.
+
+Baigong Zheng, Renjie Zheng, Mingbo Ma, and Liang Huang. 2019a. Simpler and faster learning of adaptive policies for simultaneous translation. 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 1349-1354, Hong Kong, China. Association for Computational Linguistics.
+Baigong Zheng, Renjie Zheng, Mingbo Ma, and Liang Huang. 2019b. Simultaneous translation with flexible policy via restricted imitation learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5816-5822, Florence, Italy. Association for Computational Linguistics.
+
+
+
+
+
+
+Figure 5: The first table shows an example of our oracle action sequence. In the middle table, we switch the second WRITE action to a READ action. We will continue reading until we observe the same word, then we can come back to the original path. In this scenario, the final translation does not change. In the last table, we distort the 5th READ into a WRITE action. Here, the generated translation is slightly changed as we are writing the wrong word.
\ No newline at end of file
diff --git a/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/images.zip b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..f2d6eb08d92c68addc8f9fb7033349c71b6cf522
--- /dev/null
+++ b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:081592a61c05b1d20431104de3feae0b636c91a0a68705f5393989b5a525e113
+size 341139
diff --git a/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/layout.json b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..3aa6bbcc291d6ec66e302d411fe1c4d14f84b31b
--- /dev/null
+++ b/translationbasedsupervisionforpolicygenerationinsimultaneousneuralmachinetranslation/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fb16ac56f2431c14016d2445877eb4c8a925e76ab5be06faac6d6b829a1191ba
+size 361541
diff --git a/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/08986ed8-e42a-40ea-895c-716b7d4b9793_content_list.json b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/08986ed8-e42a-40ea-895c-716b7d4b9793_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..33f651af06d10925f12933b8f9368df2b13373f9
--- /dev/null
+++ b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/08986ed8-e42a-40ea-895c-716b7d4b9793_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:23c676a42c8b0dc77dd532961ae8c9d7df3ab8c465895fda3bd9f3fd98bd043a
+size 79350
diff --git a/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/08986ed8-e42a-40ea-895c-716b7d4b9793_model.json b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/08986ed8-e42a-40ea-895c-716b7d4b9793_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..2adcd83760b77bb721fc3a84413dc27c8bf31dea
--- /dev/null
+++ b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/08986ed8-e42a-40ea-895c-716b7d4b9793_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bd88143fa893c17370a2292fbe25d191d5703dbb3faff68c99e5597b111c58ed
+size 97475
diff --git a/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/08986ed8-e42a-40ea-895c-716b7d4b9793_origin.pdf b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/08986ed8-e42a-40ea-895c-716b7d4b9793_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..2cdeb5c22e6d0f64c9d4a39595f009c98677a9d9
--- /dev/null
+++ b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/08986ed8-e42a-40ea-895c-716b7d4b9793_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a83b909a88ecba0986a03e1f60fdd4c6777a90407fdb4d06d44d9236869f3ca5
+size 664698
diff --git a/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/full.md b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..5a6c6dbaeacfb876801b0e9fd796ad08a761bb72
--- /dev/null
+++ b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/full.md
@@ -0,0 +1,340 @@
+# TransPrompt: Towards an Automatic Transferable Prompting Framework for Few-shot Text Classification
+
+Chengyu Wang $^{1*}$ ; Jianing Wang $^{2*}$ ; Minghui Qiu $^{1}$ , Jun Huang $^{1}$ , Ming Gao $^{2\dagger}$ $^{1}$ Alibaba Group
+
+$^{2}$ School of Data Science and Engineering, East China Normal University {chengyu.wcy,minghui.qmh,huangjun.hj}@alibaba-inc.com, lygwjn@gmail.com,mgao@dase.ecnu.edu.cn
+
+# Abstract
+
+Recent studies have shown that prompts improve the performance of large pre-trained language models for few-shot text classification. Yet, it is unclear how the prompting knowledge can be transferred across similar NLP tasks for the purpose of mutual reinforcement. Based on continuous prompt embeddings, we propose TransPrompt, a transferable prompting framework for few-shot learning across similar tasks. In TransPrompt, we employ a multitask meta-knowledge acquisition procedure to train a meta-learner that captures cross-task transferable knowledge. Two de-biasing techniques are further designed to make it more task-agnostic and unbiased towards any tasks. After that, the meta-learner can be adapted to target tasks with high accuracy. Extensive experiments show that TransPrompt outperforms single-task and cross-task strong baselines over multiple NLP tasks and datasets. We further show that the meta-learner can effectively improve the performance on previously unseen tasks. TransPrompt also outperforms strong fine-tuning baselines when learning with full training sets.
+
+# 1 Introduction
+
+Fine-tuning Pre-trained Language Models (PLMs) has become the standard practice to train models for a majority of NLP tasks (Devlin et al., 2019; Liu et al., 2019b; Qiu et al., 2020). To ensure high accuracy, it is necessary to obtain a sufficient amount of training data for downstream tasks, which is often the bottleneck in low-resource scenarios.
+
+The application of ultra-large PLMs such as GPT-3 (Brown et al., 2020) proves that such PLMs can learn to solve a task with very few training samples. Inspired by these works, Gao et al. (2020) propose a prompt-based approach to fine-tune BERT-style PLMs in a few-shot learning setting, which
+
+adapts PLMs into producing specific tokens corresponding to each class, instead of learning the prediction head. The effectiveness of prompts has also been shown in Schick and Schütze (2020); Scao and Rush (2021); Schick and Schütze (2021) and others. However, designing high-performing prompts is challenging and requires a very large validation set. To alleviate this problem, Liu et al. (2021) propose continuous prompt embeddings with fully differentiable parameters, avoiding the cumbersome manual prompt engineering process.
+
+Despite the remarkable success, we notice that current prompt-based approaches may have a few limitations. For few-shot learning, the performance of downstream tasks is still constrained by the number of training instances. It would be highly desirable if the model can acquire the transferable knowledge from similar NLP tasks before it is adapted to specific tasks with few samples. However, it is unclear how the knowledge in prompt encoders and PLMs with prompting techniques is transferred across tasks. A natural question arises: how can we design a prompting framework for BERT-style models that captures transferable knowledge across similar NLP tasks to improve the performance of few-shot learning?
+
+A straightforward solution to the above question is to adopt multi-task fine-tuning across these similar NLP tasks. When the training data is scarce, the fine-tuned PLM would easily be over-fitted to specific instances (Nakamura and Harada, 2019). In machine learning, the meta-learning paradigm is extensively studied, which produces models that are capable of being adapted to a group of similar tasks quickly with few learning steps (Wang et al., 2020c; Huisman et al., 2020). For PLMs, Wang et al. (2020a) discover that training a meta-learner for PLMs is effective to capture the transferable knowledge across different domains. Yet, this method is not designed for prompts for few-shot learning and lacks the mechanism to learn unbiased
+
+
+Figure 1: The high-level architecture of the TransPrompt framework. In the toy example, Task 1 and Task 2 are existing tasks, while Task 3 is a new task for the meta-learner to generalize. (Best viewed in color.)
+
+representations for all the tasks.
+
+In this paper, we present TransPrompt, a prompting framework that allows PLMs to capture cross-task transferable knowledge for few-shot text classification, with the high-level architecture shown in Figure 1. TransPrompt firstly employs a Multi-task Meta-knowledge Acquisition (MMA) procedure to learn the transferable representations of prompt encoders and PLMs jointly across similar NLP tasks. To reduce over-fitting and make the underlying PLM more task-agnostic and less unbiased towards any specific tasks, we propose two de-biasing techniques, namely prototype-based de-biasing and entropy-based de-biasing. The learned model can be viewed as the meta-learner for a group of similar NLP tasks.
+
+After MMA, TransPrompt takes the Task-aware Model Specification (TMS) step, which can be further divided into two cases. i) When the model is adapted to existing tasks during MMA, a variation of P-tuning (Liu et al., 2021) can be applied for effective adaptation. ii) When it is required to fit a previously unseen task, a model generalization strategy is employed, specifically considering the universal prompting knowledge in the model. This is often the case where re-training of the meta-leaner across all the tasks is infeasible due to data privacy or computation efficiency issues.
+
+For evaluation, we test the TransPrompt framework on three sets of few-shot NLP tasks (including seven public datasets in total): i) sentiment analysis; ii) Natural Language Inference (NLI); and iii) paraphrase. Experimental results show that TransPrompt consistently outperforms both single-task and cross-task strong baselines.
+
+We further show that i) the meta-learner trained by TransPrompt is effective to generalize to unseen tasks; and ii) TransPrompt also outperforms popular fine-tuning algorithms when learning with the full training sets. In summary, we make the following major contributions in this work:
+
+- We introduce the novel TransPrompt framework to learn cross-task transferable knowledge for few-shot text classification.
+- A prompt-based meta-learner training algorithm with two de-biasing techniques is presented to capture transferable knowledge.
+- Experiments on multiple types of NLP tasks show that TransPrompt consistently outperforms strong baselines for both few-shot learning and standard fine-tuning.
+
+# 2 Related Work
+
+We summarize the related work on PLMs, PLM prompting, transfer learning and meta-learning.
+
+# 2.1 Pre-trained Language Models
+
+With large-scale pre-training, PLMs have achieved significant improvements on various NLP tasks (Qiu et al., 2020). BERT (Devlin et al., 2019) learns contextual representations by transformer encoders. Other transformer encoder-based PLMs include Transformer-XL (Dai et al., 2019), XLNet (Yang et al., 2019), StructBERT (Wang et al., 2020b), Big Bird (Zaheer et al., 2020) and many others. The encoder-decoder architectures are used in T5 (Raffel et al., 2020) and GPT-3 (Brown et al., 2020). As the neural architecture design of PLMs is not our major focus, we do not further elaborate.
+
+# 2.2 Prompt Learning for PLMs
+
+The huge GPT-3 model (Brown et al., 2020) enables few-shot learning without fine-tuning, which
+
+relies on handcraft prompts. To facilitate automatic prompt construction, Gao et al. (2020) generates prompts from the T5 model (Raffel et al., 2020). Jiang et al. (2020) mines prompts from the training corpus. AutoPrompt (Shin et al., 2020) employs token-based gradient searching to detect prompts. However, these approaches focus on discrete prompts only. P-tuning (Liu et al., 2021) is a pioneer work to learn continuous prompt embeddings with differentiable parameters. Our work further extends P-tuning (Liu et al., 2021) that allows PLMs to learn from similar tasks to improve few-shot text classification.
+
+# 2.3 Transfer Learning and Meta-learning
+
+Transfer learning aims to transfer knowledge or resources from source domains to target domains (Zhuang et al., 2021). For deep neural networks, it is common practice to learn similar tasks by multi-task learning (Liu et al., 2019a). With the popularity of PLMs, fine-tuning has become the standard practice by learning from PLMs for similar tasks (Sun et al., 2019; Arase and Tsujii, 2021). In contrast, meta-learning aims to learn models that can quickly adapt to different tasks with little training data available (Wang et al., 2020c; Huisman et al., 2020), typically formulated as a $K$ -way $N$ -shot problem. Meta-learning algorithms have been applied in few-shot NLP tasks, such as text classification (Geng et al., 2020), relation extraction (Gao et al., 2019), question answering (Hua et al., 2020) and knowledge base completion (Sheng et al., 2020). Similar to Wang et al. (2020a); Pan et al. (2021); Wang et al. (2021), the proposed TransPrompt framework can be viewed as a combination of transfer learning and meta-learning, which learns transferable knowledge from similar tasks to improve the performance of few-shot text classification, either for existing tasks or new tasks.
+
+# 3 The TransPrompt Framework
+
+We formally present our task and the techniques of the proposed TransPrompt framework in detail.
+
+# 3.1 Overview
+
+We begin with a brief summary of our task. Let $\mathcal{T}_1,\dots ,\mathcal{T}_M$ be $M$ similar few-shot text classification tasks. The $m$ -th task can be formulated as: $\mathcal{T}_m:x\to y$ , where $x$ and $y\in \mathcal{V}$ represent the input text and the classification label, respectively.
+
+$\mathcal{V}$ is the pre-defined label set with $|\mathcal{V}| = N$ , where $N$ is a pre-defined constant. In our setting, we assume that there are $K$ training samples associated with each class $y \in \mathcal{V}$ in each task $\mathcal{T}_m$ . Hence, we have a training set $\mathcal{D}_m$ for each task $\mathcal{T}_m$ , each containing $N \times K$ samples. The total number of training instances of $M$ tasks is $N \times K \times M$ .
+
+In TransPrompt, we train a meta-learner $\mathcal{F}_{meta}$ with parameters initialized from any PLMs, based on the $M$ few-shot training sets $\mathcal{D}_1, \dots, \mathcal{D}_M$ . After that, $\mathcal{F}_{meta}$ is adapted to each task $\mathcal{T}_m$ based on its own training set $\mathcal{D}_m$ . The task-specific model is denoted as $\mathcal{F}_m$ . As $\mathcal{F}_{meta}$ is designed to digest the transferable knowledge across tasks, rather than simple multi-task learning, $\mathcal{F}_{meta}$ can also be adapted to previously unseen tasks. Due to the data privacy or computation efficiency issues, when the few-shot training set $\tilde{\mathcal{D}}$ of a similar task $\tilde{\mathcal{T}}$ is not available during the training process of $\mathcal{F}_{meta}$ , we explore how TransPrompt can be used to generate an accurate model $\tilde{\mathcal{F}}$ based on $\mathcal{F}_{meta}$ and $\tilde{\mathcal{D}}$ . In this case, $\mathcal{F}_{meta}$ does not have any knowledge of the new task $\tilde{\mathcal{T}}$ when it is trained during MMA.
+
+In the following, we introduce the detailed techniques of the TransPrompt framework, which consists of two major stages, i.e., Multi-task Meta-knowledge Acquisition (MMA) and Task-aware Model Specification (TMS). Finally, we discuss how to apply TransPrompt to standard fine-tuning scenarios where we have relatively large training sets, instead of solving the $N$ -way $K$ -shot problem.
+
+# 3.2 Multi-task Meta-knowledge Acquisition
+
+For clarity, we illustrate the general architecture of the meta-learner for MMA in Figure 2.
+
+# 3.2.1 Prompt Encoding
+
+As the TransPrompt framework is placed in the multi-task setting, for each task $\mathcal{T}_m$ , we have a task-specific prompt template $t^{(m)}(x)$ as follows:
+
+$$
+P _ {1} ^ {(m)}, \dots , P _ {i} ^ {(m)}, x, P _ {i + 1} ^ {(m)}, \dots , P _ {I} ^ {(m)}, M A S K
+$$
+
+where $P_{i}^{(m)}$ is a prompt pseudo token (as proposed in Liu et al. (2021)), $I$ is the total number of pseudo tokens, and $MASK$ is a special token as the placeholder for model output. We also define a universal prompt template $t^{(*)}(x)$ for all the tasks:
+
+$$
+P _ {1} ^ {(*)}, \dots , P _ {i} ^ {(*)}, x, P _ {i + 1} ^ {(*)}, \dots , P _ {I} ^ {(*)}, M A S K
+$$
+
+
+Figure 2: The model architecture of the meta-learner training process during MMA. For simplicity, we assume there are two tasks and three classes for few-shot text classification. (Best viewed in color.)
+
+For an instance $(x,y)\in \mathcal{D}_m$ , the prompt embedding $\mathrm{PE}^{(m)}(x)$ can be computed as follows:
+
+$$
+\begin{array}{l} \mathrm {P E} ^ {(m)} (x) = \operatorname {A v g P o o l} \big (\mathrm {M L P} (\mathrm {B i L S T M} (t ^ {(m)} (x))) \\ \operatorname {M L P} (\operatorname {B i L S T M} (t ^ {*} (x))), \\ \end{array}
+$$
+
+where we use bidirectional LSTM networks with multi-layer perceptrons as prompt encoders (Liu et al., 2021). The average pooled results from both task-specific and universal prompt encoders are treated as the prompt embedding. The prompt embedding $\mathrm{PE}^{(m)}(x)$ is a sequence as the input of the PLM:
+
+$$
+h _ {1}, \dots , h _ {i}, h _ {[ x ]}, h _ {i + 1}, \dots , h _ {I}, h _ {[ M A S K ]}
+$$
+
+where $h_{[x]}$ is the sequence embedding of input $x$ , and $h_{[MASK]}$ is the masked output token embedding. As prompt parameters are fully differentiable, during back propagation, they effectively capture the task-specific and universal knowledge.
+
+# 3.2.2 Training the Meta-learner
+
+A naive approach for obtaining the meta-learner is applying the P-tuning process (Staudemeyer and Morris, 2019) across the $M$ tasks with the $M + 1$ prompt encoders. However, in practice, it does not guarantee satisfactory results. As large PLMs can easily suffer from over-fitting during few-shot learning (Gao et al., 2020), in cross-task scenarios, the meta-learner would unfortunately memorize the non-transferable knowledge from nontarget tasks. To alleviate this problem, we propose two de-biasing techniques to obtain a more unbiased meta-learner encoded with transferable knowledge, namely i) prototype-based de-biasing and ii) entropy-based de-biasing.
+
+Prototype-based De-biasing. This technique aims to give more importance to prototypical instances across tasks during the training process of the metalearner. Here, we extend Snell et al. (2017) to construct a lite Multi-task Prototypical Network $\mathcal{G}$ . In the network $\mathcal{G}$ , the class centroid embedding $\mathbf{c}_m(y)$ ( $y \in \mathcal{V}$ ) for each task $\mathcal{T}_m$ is computed and stored as:
+
+$$
+\mathbf {c} _ {m} (y) = \frac {1}{| \mathcal {D} _ {m , y} |} \sum_ {(x, y) \in \mathcal {D} _ {m, y}} \mathcal {E} (x)
+$$
+
+where $\mathcal{D}_{m,y}$ is the subset of $\mathcal{D}_m$ such that each instance in $\mathcal{D}_{m,y}$ has the label $y$ , and $\mathcal{E}(x)$ is the representation of $x$ generated by the meta-learner described previously. For each instance $(x,y) \in \mathcal{D}_m$ , we pass the text $x$ through the network to generate the cross-task prototype score, denoted as $s(x)$ :
+
+$$
+\begin{array}{l} s (x) = \zeta \cdot \frac {\operatorname {s i m} (\mathcal {E} (x) , \mathbf {c} _ {m} (y))}{\sum_ {\tilde {y} \in \mathcal {Y}} \operatorname {s i m} (\mathcal {E} (x) , \mathbf {c} _ {m} (\tilde {y}))} \\ + \frac {1 - \zeta}{M - 1} \sum_ {\tilde {m} = 1 (m \neq \tilde {m})} ^ {M} \frac {\operatorname {s i m} (\mathcal {E} (x) , \mathbf {c} _ {\tilde {m}} (y))}{\sum_ {\tilde {y} \in \mathcal {Y}} \operatorname {s i m} (\mathcal {E} (x) , \mathbf {c} _ {\tilde {m}} (\tilde {y}))}, \\ \end{array}
+$$
+
+where $0 < \zeta < 1$ is a pre-defined balancing factor, and $\mathrm{sim}(\cdot, \text{ofKnowdots})$ is the similarity function between two embeddings. We can see that an instance receives a higher score if it is semantically related to the centroids from both the task $\mathcal{T}_m$ itself and other tasks, hence is more transferable across tasks. By treating $s(x)$ as the optimization weight, the overall loss function $\mathcal{L}(\Theta)$ of $\mathcal{F}_{\text{meta}}$ can be given by:
+
+$$
+\mathcal {L} (\Theta) = \sum_ {m = 1} ^ {M} \sum_ {(x, y) \in \mathcal {D} _ {m}} s (x) l (x, y; \Theta) + \lambda_ {1} \| \Theta \|,
+$$
+
+where $\Theta$ is the collection of all model parameters, $l(x,y;\Theta)$ is the sample-wise cross-entropy loss, and $\lambda_{1}$ is the regularization hyper-parameter.
+
+Entropy-based De-biasing. One potential risk of applying the prototype-based de-biasing technique only is obtaining a non task-agnostic meta-learner. Consider three tasks $\mathcal{T}_1$ , $\mathcal{T}_2$ and $\mathcal{T}_3$ . If $\mathcal{T}_1$ and $\mathcal{T}_2$ are highly similar, and $\mathcal{T}_3$ is more dis-similar. Instances in $\mathcal{D}_1$ and $\mathcal{D}_2$ would naturally receive high prototype scores, making the meta-learner biased towards $\mathcal{T}_1$ and $\mathcal{T}_2$ , and pays little attention to $\mathcal{T}_3$ . Hence, when the meta-learner is required to fit $\mathcal{T}_3$ , it may have poor parameter initialization settings. To make it more task-agnostic, inspired by Jamal and Qi (2019), we consider the model prediction entropy $\mathcal{H}(\mathcal{D}_m)$ over $\mathcal{D}_m$ :
+
+$$
+\mathcal {H} (\mathcal {D} _ {m}) = - \frac {1}{| \mathcal {D} _ {m} |} \sum_ {(x, y) \in \mathcal {D} _ {m}} \sum_ {\hat {y} \in \mathcal {Y}} \hat {y} (x) \log \hat {y} (x),
+$$
+
+where $\hat{y} (x)$ is the predicted probability of $x$ being assigned to the class $\hat{y}\in \mathcal{V}$ . When $\mathcal{H}(\mathcal{D}_m)$ is used as a part of the model regularizers, the meta-learner will be less over-trained on any specific tasks.
+
+By plugging the term $\mathcal{H}(\mathcal{D}_m)$ into the loss function $\mathcal{L}(\Theta)$ , we have the new loss function $\mathcal{L}'(\Theta)$ :
+
+$$
+\begin{array}{l} \mathcal {L} ^ {\prime} (\Theta) = \sum_ {m = 1} ^ {M} \sum_ {(x, y) \in \mathcal {D} _ {m}} (s (x) l (x, y; \Theta) \\ - \frac {\lambda_ {2}}{\left| \mathcal {D} _ {m} \right|} \sum_ {\hat {y} \in \mathcal {Y}} \hat {y} (x) \log \hat {y} (x)) + \lambda_ {1} \| \Theta \|, \\ \end{array}
+$$
+
+where $\lambda_{2}$ is the regularization hyper-parameter.
+
+Optimization Procedure. Despite its simple formula, minimizing $\mathcal{L}^{\prime}(\Theta)$ is a non-trivial problem. This is because when we calculate $s(x)$ , we must obtain model parameters of the PLM beforehand, which is not available before the training process. On the other hand, the optimization of $\mathcal{L}^{\prime}(\Theta)$ requires the values of $s(x)$ for all training samples, which poses the "chicken-and-egg" problem.
+
+We employ a dual optimization process to solve the problem of $\mathcal{L}'(\Theta)$ . In the initial stage, all $s(x)s$ are uniformly initialized. Next, we fix $s(x)s$ as constants to minimize $l(x,y;\Theta)$ in $\mathcal{L}'(\Theta)$ . An inference procedure on the PLM can be applied to obtain all $s(x)s$ . This process iterates for a certain number of epochs. Readers can also refer to Algorithm 1 for an algorithmic overview.
+
+# 3.3 Task-aware Model Specification
+
+After MMA, the meta-learner can be adapted to specific tasks with ease. For a task $\mathcal{T}_m$ that has
+
+already "seen" by the meta-learner, we fine-tune the corresponding prompt encoder and the PLM by minimizing the loss function $\mathcal{L}^{(m)}(\Theta)$ :
+
+$$
+\mathcal {L} ^ {(m)} (\Theta) = \sum_ {(x, y) \in \mathcal {D} _ {m}} l (x, y; \Theta) + \lambda_ {1} \| \Theta \|,
+$$
+
+which is a variant of P-tuning (Liu et al., 2021) with better parameter initialization.
+
+For a previously unseen task $\tilde{\mathcal{T}}$ , the model generalization strategy is employed. Here, we use the universal prompt encoder to initialize its prompt encoder. The entire model is trained over the dataset $\tilde{\mathcal{D}}$ , with the loss function $\tilde{\mathcal{L}}(\Theta)$ as follows:
+
+$$
+\tilde {\mathcal {L}} (\Theta) = \sum_ {(x, y) \in \tilde {\mathcal {D}}} l (x, y; \Theta) + \lambda_ {1} \| \Theta \|,
+$$
+
+As the meta-learner is highly generalized, it can provide good initialization for the few-shot learning task $\tilde{\mathcal{T}}$ .
+
+# 3.4 Learning with Full Training Sets
+
+TransPrompt can also be applied for standard finetuning when we have relatively large training sets with few modifications. During MMA, we notice that when it is not a $N$ -way $K$ -shot problem, the sizes of $\mathcal{D}_1, \dots, \mathcal{D}_M$ can be significantly different. Optimizing $\mathcal{L}'(\Theta)$ directly on these datasets would make the meta-learner biased towards large datasets. To address this problem, when we sample a batch from $\mathcal{D}_1, \dots, \mathcal{D}_M$ , instead of randomly selection, we employ stratified sampling where training instances are selected with the probability proportional to the dataset distribution $\operatorname*{Pr}(\mathcal{D}_m)$ :
+
+$$
+\Pr (\mathcal {D} _ {m}) = \frac {\log | \mathcal {D} _ {m} | + \gamma}{\sum_ {\tilde {m} = 1} ^ {M} \log | \mathcal {D} _ {\tilde {m}} | + \gamma},
+$$
+
+where $\gamma > 0$ is a smoothing factor. This results in the over-sampling of small datasets and the undersampling of large datasets.
+
+# 4 Experiments
+
+In this section, we conduct extensive experiments to evaluate the TransPrompt framework and compare it against strong baselines.
+
+# 4.1 Datasets and Experimental Settings
+
+Following Gao et al. (2020), we select seven public datasets to evaluate TransPrompt, divided into three sets of NLP tasks: sentiment analysis (SST-2 (Socher et al., 2013), MR (Hu and Liu, 2004) and
+
+# Algorithm 1 Meta-learner Training Algorithm
+
+1: for each instance $(x,y)\in \bigcup_{m = 1}^{M}\mathcal{D}_{m}$ do
+2: Uniformly set $s(x) = 1$ ;
+3: end for
+4: while number of training epochs does not reach a limit do
+5: while current training epoch is not finished do
+6: Sample a batch $\mathcal{B} = \{(x,y)\}$ from $\bigcup_{m = 1}^{M}\mathcal{D}_{m}$ ;
+7: Use $\mathcal{B}$ to update $\mathcal{F}_{meta}$ by minimizing $\mathcal{L}^{\prime}(\Theta)$ ;
+8: end while
+9: for each instance $(x,y)\in \bigcup_{m = 1}^{M}\mathcal{D}_{m}$ do
+10: Compute $s(x)$ based on the updated model;
+11: end for
+12: end while
+13: return the meta-learner $\mathcal{F}_{meta}$ (i.e., parameters of the PLM and $M + 1$ prompt encoders).
+
+| Task Type | Task Name | #Train | #Test |
| Sentiment | SST-2 | 6,920 | 872 |
| MR | 8,662 | 2,000 |
| CR | 1,775 | 2,000 |
| NLI | MNLI | 392,702 | 9,815 |
| SNLI | 549,367 | 9,842 |
| Paraphrase | MRPC | 3,668 | 408 |
| QQP | 363,846 | 40,431 |
+
+Table 1: Dataset statistics.
+
+CR (Pang and Lee, 2005)), NLI (MNLI (Williams et al., 2018) and SNLI (Bowman et al., 2015)) and paraphrase (MRPC (Dolan and Brockett, 2005) and $\mathrm{QQP^5}$ ). The statistics of these datasets are reported in Table 1. The training/development/testing splits are the same as Gao et al. (2020).
+
+For few-shot learning, the evaluation protocols are the same as Gao et al. (2020). The underlying PLM is the RoBERTa large model (with 335M parameters) (Liu et al., 2019b) and we set $K = 16$ . We measure the average performance in terms of accuracy across 5 different randomly sampled training and development splits. Refer to Gao et al. (2020) for more experimental settings. We employ standard BERT fine-tuning (Devlin et al., 2019)7, the LM-BFF prompting model (Gao et al., 2020) (with both manually-compiled and automatically-mined prompts)8 and P-tuning (Liu et al., 2021)9
+
+(which produces state-of-the-art performance for PLM-based few-shot learning) as single-task baselines. Because we focus on learning knowledge across tasks, we also use the multi-task versions of BERT fine-tuning (Sun et al., 2019), LM-BFF (Gao et al., 2020) and P-tuning (Liu et al., 2021), and Meta Fine-tuning (Wang et al., 2020a) $^{10}$ as cross-task baselines. Specifically, we employ separate prompts (either discrete prompts or continuous prompt embeddings) for different tasks in the multi-task versions of LM-BFF and P-tuning. As we consider three sets of NLP tasks, we constrain that the knowledge is transferred across the same set of NLP tasks (for example, the cross-task models for sentiment analysis are jointly trained over the training sets of SST-2, MR and CR). Besides, we are interested in how TransPrompt can be applied when learning with full training sets. We follow the base-scale experimental settings in Liu et al. (2021), with the RoBERTa base model (with 109M parameters) as the underlying PLM.
+
+For fair comparison, we re-produce all baselines based on their open-source codes under the same settings. Our own TransPrompt algorithm is implemented in PyTorch and run with NVIDIA V100 GPUs. In default, we set $\zeta = 0.5$ , $\gamma = 0.001$ and $\lambda_{2} = 0.01$ . The parameter regularizers are the same as in Liu et al. (2021). The model is trained with the Adam optimizer (Kingma and Ba, 2015) and a batch size of 16. The model architecture of prompt encoders is the same as Liu et al. (2021). Therefore, the increased number of parameters of TransPrompt remains minimal. We further tune the learning rates and epochs, with results reported in the following experiments.
+
+# 4.2 General Experimental Results
+
+The results of TransPrompt and all baselines on all seven testing sets for few-shot learning are shown in Table 2. From the experimental results, we have the following conclusions. i) Prompting baselines (such as LM-BFF (Gao et al., 2020) and P-tuning (Liu et al., 2021)) outperform standard fine-tuning by a large margin. This shows prompts are useful for few-shot learning. Based on our reproduction results, LM-BFF and P-tuning have similar performance. Automatically-mined prompts are slightly better than manually-compiled prompts for LM-BFF. ii) As for cross-task baselines, the
+
+| Method | Task: Sentiment Analysis | Task: NLI | Task: Paraphrase | Avg. |
| SST-2 | MR | CR | MNLI | SNLI | MRPC | QQP |
| Single-task Baselines |
| Fine-tuning (Devlin et al., 2019) | 81.42 | 76.15 | 84.50 | 54.17 | 44.45 | 73.28 | 59.64 | 67.66 |
| LM-BFF (man) (Gao et al., 2020) | 90.75 | 86.60 | 90.50 | 63.62 | 70.77 | 74.05 | 60.27 | 76.65 |
| LM-BFF (auto) (Gao et al., 2020) | 91.62 | 87.25 | 91.80 | 64.25 | 71.21 | 74.23 | 60.59 | 77.28 |
| P-tuning (Liu et al., 2021) | 91.85 | 86.60 | 91.75 | 62.41 | 70.28 | 66.42 | 60.57 | 75.70 |
| Cross-task Baselines |
| Fine-tuning (mtl) (Sun et al., 2019) | 83.37 | 79.30 | 84.75 | 41.32 | 48.14 | 53.12 | 59.31 | 64.19 |
| Meta Fine-tuning (Wang et al., 2020a) | 86.32 | 83.85 | 88.42 | 48.52 | 58.20 | 71.56 | 67.12 | 72.00 |
| LM-BFF (mtl) (Gao et al., 2020)* | 91.97 | 87.45 | 90.70 | 69.09 | 75.90 | 50.00 | 67.40 | 76.07 |
| P-tuning (mtl) (Liu et al., 2021)* | 93.12 | 87.75 | 91.35 | 68.83 | 74.24 | 70.83 | 69.99 | 79.44 |
| TransPrompt (Proposed Approach) | 93.58 | 88.80 | 92.00 | 71.90 | 76.99 | 75.98 | 75.80 | 82.15 |
+
+Table 2: The few-shot testing results of TransPrompt and baselines in terms of accuracy (\%). "man", "auto" and "mtl" refer to manually-compiled prompts, automatically-mined prompts and multi-task learning, respectively. * refers to the multi-task variants of the original approaches. Hereinafter the same.
+
+multi-task version of P-tuning is more effective than that of LM-BFF, which shows that continuous prompt embeddings are more suitable for multitask learning than discrete prompts. iii) The performance gains of TransPrompt over all three sets of tasks and seven datasets are consistent. Overall, the average improvement is around $3\%$ in terms of accuracy, compared to the strongest baseline (i.e., the multi-task version of P-tuning). We also conduct paired $t$ -tests over the results produced on all tasks. The results show that the improvement of TransPrompt is statically significant (with the $p$ -value $p < 0.01$ ).
+
+# 4.3 Detailed Model Analysis
+
+In the following, we study how TransPrompt improves the performance in various aspects.
+
+Ablation Study. In the TransPrompt framework, we propose two de-biasing techniques to improve the effectiveness of the meta-learner, i.e., prototype-based and entropy-based. Here, we remove each one and all two de-biasing techniques, and implement three variants of TransPrompt. The results of the ablation study are in Table 3. As seen, both de-biasing techniques are proved effective for TransPrompt. Particularly, prototype-based de-biasing plays a slightly more important role than entropy-based de-biasing in 6 out of 7 tasks. We conclude that de-biasing the meta-learner is crucial for obtaining the cross-task knowledge.
+
+Parameter Tuning. We further tune the learning epoch and the learning rate during the training process of TransPrompt, and report the performance over the development sets. Due to space limitation, we illustrate the results over SST-2, MR and CR, shown in Figure 3. We fix the learning rate to be 1e-5 and tune the learning epochs. Figure 3(a) shows
+
+that the performance of the meta-learner becomes stable over 20 epochs (which is tested on the combination of three developments sets for SST-2, MR and CR). Figure 3(b) gives the results of the three tasks during TMS. We fix the learning epoch to be 20, and tune the learning rate from 1e-5 to 5e-4. As seen in Figure 3(c), the learning rate should be set in the range of 1e-5 to 5e-5.
+
+# 4.4 Model Generalization to New Tasks
+
+One advantage of TransPrompt is that it can train a meta-learner with cross-task transferable knowledge encoded. In this set of experiments, we consider three tasks of sentiment analysis: SST-2, MR and CR. Each time, we train the meta-learner over two out of the three datasets (the MMA step), and then make the model generalized to each of the other tasks (the TMS step). For example, we train the meta-learner over the few-shot SST-2 and MR datasets and then take the TMS step over the few-shot CR dataset. Here, the meta-learner has no knowledge of CR before the TMS step. We test whether the usage of the meta-learner is better than simply applying LM-BFF (Gao et al., 2020) or P-tuning (Liu et al., 2021) initialized from PLMs. From Table 4, it is clearly reflected that the meta-learner brings improvement in all three cases, hence generalizes to new tasks accurately.
+
+# 4.5 Learning with Full Datasets
+
+Apart from few-shot learning, we also investigate how TransPrompt performs when the full training sets are available, compared to other approaches. The results are presented in Table 5. On average, TransPrompt outperforms all single-task baselines by around $1\%$ to $5\%$ in terms of accuracy. This shows that our proposed paradigm can be of help in
+
+| Task Name | w/o. Prototype | w/o. Entropy | w/o. Both | Full Implementation |
| SST-2 | 92.90 | 93.18 | 92.67 | 93.58 |
| MR | 87.97 | 88.14 | 87.75 | 88.80 |
| CR | 91.50 | 91.70 | 91.07 | 92.00 |
| MNLI | 67.72 | 69.74 | 67.08 | 71.90 |
| SNLI | 76.76 | 76.66 | 76.08 | 76.99 |
| MRPC | 75.98 | 76.72 | 68.38 | 75.98 |
| QQP | 73.44 | 74.00 | 73.02 | 75.80 |
| Avg. | 80.90 | 81.45 | 79.44 | 82.14 |
+
+
+(a) Tuning the learning epoch of the meta-learner during MMA.
+
+
+(b) Tuning the learning epoch of the fine-tuned PLM during TMS.
+
+
+(c) Tuning the learning rate.
+Figure 3: Parameter analysis over the three development sets of SST-2, MR and CR for few-shot learning.
+
+Table 3: Ablation study of TransPrompt for few-shot learning. Experimental results are reported on the testing sets in terms of accuracy $(\%)$ .
+
+| Task | SST-2 | MR | CR | Avg. |
| LM-BFF (m) | 90.75 | 86.60 | 90.50 | 89.28 |
| LM-BFF (a) | 91.62 | 87.25 | 91.80 | 90.22 |
| P-tuning | 91.85 | 86.60 | 91.75 | 90.05 |
| TransPrompt | 93.35 | 88.25 | 91.85 | 91.15 |
+
+Table 4: Model generalization results in terms of accuracy $(\%)$ . LM-BFF and P-tuning are strong baselines w/o. the usage of the meta-learner.
+
+non few-shot learning scenarios by learning from a group of similar NLP tasks.
+
+Another interesting finding is that when it comes to multi-task learning, the performance of LM-BFF (Gao et al., 2020) and P-tuning (Liu et al., 2021) drops, compared to the single-task setting. A most possible cause is that with a large amount of training data from other tasks, existing prompt-based approaches may capture non-transferable knowledge that is harmful to the target task. In contrast, the two-step paradigm of TransPrompt learns different types of knowledge at different steps (i.e., the universal knowledge in MMA, and the task-specific knowledge in TMS), hence produces better results. Overall, TransPrompt is competitive in standard fine-tuning scenarios with datasets from similar NLP tasks available.
+
+# 4.6 Case Studies
+
+For a more initiative understanding of which instances are more transferable across tasks, in Table 6, several review texts from SST-2, MR and CR with high and low prototype scores are presented. Although these texts come from different tasks, our TransPrompt algorithm is able to find texts that express general polarities instead of specific points. For instance, "time waster", "remarkable" and "5 stars" are strong indicators of polarities, which receive high scores generated by TransPrompt. In
+
+| Method | Task: Sentiment Analysis | Task: NLI | Task: Paraphrase | Avg. |
| SST-2 | MR | CR | MNLI | SNLI | MRPC | QQP |
| Single-task Baselines |
| Fine-tuning (Devlin et al., 2019) | 93.00 | 90.15 | 90.90 | 82.87 | 87.87 | 72.28 | 89.53 | 86.65 |
| LM-BFF (man) (Gao et al., 2020) | 93.65 | 88.50 | 90.98 | 87.23 | 91.10 | 88.75 | 85.12 | 89.33 |
| LM-BFF (auto) (Gao et al., 2020) | 93.81 | 88.75 | 91.25 | 87.01 | 91.51 | 88.97 | 83.12 | 89.20 |
| P-tuning (Liu et al., 2021) | 93.69 | 90.10 | 90.25 | 87.17 | 91.67 | 88.97 | 90.87 | 90.38 |
| Cross-task Baselines |
| Fine-tuning (mtl) (Sun et al., 2019) | 94.72 | 90.65 | 91.05 | 87.10 | 91.80 | 69.85 | 90.20 | 87.91 |
| Meta Fine-tuning (Wang et al., 2020a) | 95.70 | 91.25 | 91.42 | 83.67 | 89.48 | 78.92 | 89.72 | 88.59 |
| LM-BFF (mtl) (Gao et al., 2020)* | 95.41 | 90.45 | 91.50 | 86.76 | 88.25 | 69.36 | 90.32 | 87.43 |
| P-tuning (mtl) (Liu et al., 2021)* | 95.30 | 90.40 | 90.08 | 86.97 | 91.48 | 68.87 | 90.59 | 87.67 |
| TransPrompt (Proposed Approach) | 96.05 | 91.78 | 91.59 | 88.70 | 91.88 | 86.87 | 91.27 | 91.16 |
+
+Table 5: The testing results of TransPrompt and baselines with full training sets in terms of accuracy $(\%)$
+
+| Score | Task | Review Text | Label |
| High | SST-2 | There are many definitions of “time waster” but this movie must surely be one of them... | NEG |
| MR | It is most remarkable not because of its epic scope, but because of the startling intimacy... | POS |
| CR | 5 stars all the way! | POS |
| Low | SST-2 | It’s a treat watching show, a British stage icon, melting under the heat of phocion’s attentions. | POS |
| MR | Humorous, artsy, and even cute, in an off-kilter, dark, vaguely disturbing way. | POS |
| CR | However, the calls constantly drop in my area and I experience mega-static, to the point... | NEG |
+
+Table 6: Cases of review texts in SST-2, MR and CR with high and low cross-task prototype scores.
+
+contrast, review texts with low scores are overly specific and hence are less transferable across tasks. Hence, our meta-learner truly captures transferable knowledge for effective knowledge transfer.
+
+# 5 Conclusion and Future Work
+
+In this paper, we present the TransPrompt framework for few-shot learning across similar NLP tasks based on continuous prompt embeddings. Experimental results show that TransPrompt consistently outperforms strong baselines in both few-shot learning and standard fine-tuning settings. Additionally, we find that the meta-learner trained by TransPrompt can be adapted to previously unseen tasks easily. In the future, we will explore how TransPrompt is applied to other PLMs apart from BERT-style models and other NLP tasks.
+
+# Acknowledgement
+
+This work was partially supported by Alibaba Group through the Alibaba Innovative Research Program and the National Natural Science Foundation of China under Grant Nos. U1911203, 61877018, 61672234, and 61672384.
+
+# References
+
+Yuki Arase and Junichi Tsujii. 2021. Transfer finetuning of BERT with phrasal paraphrases. Comput. Speech Lang., 66.
+
+Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference. In EMNLP, pages 632-642.
+
+Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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 NeurIPS.
+
+Zihang Dai, Zhilin Yang, Yiming Yang, Jaime G. Carbonell, Quoc Viet Le, and Ruslan Salakhutdinov. 2019. Transformer-xl: Attentive language models beyond a fixed-length context. In ACL, pages 2978-2988.
+
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: pre-training of deep bidirectional transformers for language understanding. In *NAACL-HLT*, pages 4171–4186.
+
+William B. Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In IWP@IJCNLP.
+
+Tianyu Gao, Adam Fisch, and Danqi Chen. 2020. Making pre-trained language models better few-shot learners. CoRR, abs/2012.15723.
+
+Tianyu Gao, Xu Han, Hao Zhu, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. 2019. Fewrel 2.0: Towards more challenging few-shot relation classification. In EMNLP-IJCNLP, pages 6249-6254.
+
+Ruiying Geng, Binhua Li, Yongbin Li, Jian Sun, and Xiaodan Zhu. 2020. Dynamic memory induction networks for few-shot text classification. In ACL, pages 1087-1094.
+Minqing Hu and Bing Liu. 2004. Mining and summarizing customer reviews. In KDD, pages 168-177.
+Yuncheng Hua, Yuan-Fang Li, Gholamreza Haffari, Guilin Qi, and Tongtong Wu. 2020. Few-shot complex knowledge base question answering via meta reinforcement learning. In EMNLP, pages 5827-5837.
+Mike Huisman, Jan N. van Rijn, and Aske Plaat. 2020. A survey of deep meta-learning. CoRR, abs/2010.03522.
+Muhammad Abdullah Jamal and Guo-Jun Qi. 2019. Task agnostic meta-learning for few-shot learning. In CVPR, pages 11719-11727.
+Zhengbao Jiang, Frank F. Xu, Jun Araki, and Graham Neubig. 2020. How can we know what language models know. Trans. Assoc. Comput. Linguistics, 8:423-438.
+Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In ICLR.
+Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. 2021. GPT understands, too. CoRR, abs/2103.10385.
+Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. 2019a. Multi-task deep neural networks for natural language understanding. In ACL, pages 4487-4496.
+Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019b. Roberta: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692.
+Akihiro Nakamura and Tatsuya Harada. 2019. Revisiting fine-tuning for few-shot learning. CoRR, abs/1910.00216.
+Haojie Pan, Chengyu Wang, Minghui Qiu, Yichang Zhang, Yaliang Li, and Jun Huang. 2021. Meta-kd: A meta knowledge distillation framework for language model compression across domains. In ACL/IJCNLP, pages 3026-3036.
+Bo Pang and Lillian Lee. 2005. Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales. In ACL, pages 115-124.
+Xipeng Qiu, Tianxiang Sun, Yige Xu, Yunfan Shao, Ning Dai, and Xuanjing Huang. 2020. Pre-trained models for natural language processing: A survey. CoRR, abs/2003.08271.
+
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21:140:1-140:67.
+Tven Le Scao and Alexander M. Rush. 2021. How many data points is a prompt worth? CoRR, abs/2103.08493.
+Timo Schick and Hinrich Schütze. 2020. It's not just size that matters: Small language models are also few-shot learners. CoRR, abs/2009.07118.
+Timo Schick and Hinrich Schütze. 2021. Exploiting cloze-questions for few-shot text classification and natural language inference. In EACL, pages 255-269.
+Jiawei Sheng, Shu Guo, Zhenyu Chen, Juwei Yue, Li-hong Wang, Tingwen Liu, and Hongbo Xu. 2020. Adaptive attentional network for few-shot knowledge graph completion. In EMNLP, pages 1681-1691.
+Taylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace, and Sameer Singh. 2020. Autoprompt: Eliciting knowledge from language models with automatically generated prompts. In EMNLP, pages 4222-4235.
+Jake Snell, Kevin Swersky, and Richard S. Zemel. 2017. Prototypical networks for few-shot learning. In NIPS, pages 4077-4087.
+Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Y. Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, pages 1631-1642.
+Ralf C. Staudemeyer and Eric Rothstein Morris. 2019. Understanding LSTM - a tutorial into long short-term memory recurrent neural networks. CoRR, abs/1909.09586.
+Chi Sun, Xipeng Qiu, Yige Xu, and Xuanjing Huang. 2019. How to fine-tune BERT for text classification? In CCL, pages 194-206.
+Chengyu Wang, Haojie Pan, Yuan Liu, Kehan Chen, Minghui Qiu, Wei Zhou, Jun Huang, Haiqing Chen, Wei Lin, and Deng Cai. 2021. Mell: Large-scale extensible user intent classification for dialogue systems with meta lifelong learning. In KDD, pages 3649-3659.
+Chengyu Wang, Minghui Qiu, Jun Huang, and Xiaofeng He. 2020a. Meta fine-tuning neural language models for multi-domain text mining. In EMNLP, pages 3094-3104.
+Wei Wang, Bin Bi, Ming Yan, Chen Wu, Jiangnan Xia, Zuyi Bao, Liwei Peng, and Luo Si. 2020b. Structbert: Incorporating language structures into pre-training for deep language understanding. In ICLR.
+
+Yaqing Wang, Quanming Yao, James T. Kwok, and Lionel M. Ni. 2020c. Generalizing from a few examples: A survey on few-shot learning. ACM Comput. Surv., 53(3):63:1-63:34.
+Adina Williams, Nikita Nangia, and Samuel R. Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In *NAACL-HLT*, pages 1112–1122.
+Zhilin Yang, Zihang Dai, Yiming Yang, Jaime G. Carbonell, Ruslan Salakhutdinov, and Quoc V. Le. 2019. Xlnet: Generalized autoregressive pretraining for language understanding. In NeurIPS, pages 5754-5764.
+Manzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontañón, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, and Amr Ahmed. 2020. Big bird: Transformers for longer sequences. In NeurIPS.
+Fuzhen Zhuang, Zhiyuan Qi, Keyu Duan, Dongbo Xi, Yongchun Zhu, Hengshu Zhu, Hui Xiong, and Qing He. 2021. A comprehensive survey on transfer learning. Proc. IEEE, 109(1):43-76.
\ No newline at end of file
diff --git a/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/images.zip b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..f75ebc089f60c312eed67f4cf3b2ad5027e2f1d3
--- /dev/null
+++ b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fd21e789cdc48de51cec579f0308bc814de28ac91245a027133f2f0ff49e778b
+size 634639
diff --git a/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/layout.json b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..a343d8df8402c3b86369ad19f345a796efbd4cb3
--- /dev/null
+++ b/transprompttowardsanautomatictransferablepromptingframeworkforfewshottextclassification/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:57c4cd7fe5e4efec88b3d73f79a3e2c052755a31c87082926c1e33e7a09db4c4
+size 449523
diff --git a/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/31308d79-e1f5-4e36-84fc-9edb4da759d3_content_list.json b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/31308d79-e1f5-4e36-84fc-9edb4da759d3_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..496e115823c5203a6293d11cd031d1c0fd0379c0
--- /dev/null
+++ b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/31308d79-e1f5-4e36-84fc-9edb4da759d3_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a652177644580f5e96d6a22568b88118c58d7688dd40d5e3fb7e847886b477a4
+size 82369
diff --git a/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/31308d79-e1f5-4e36-84fc-9edb4da759d3_model.json b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/31308d79-e1f5-4e36-84fc-9edb4da759d3_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..2cb623e46752e985fe9e04155d7098bbf8066e68
--- /dev/null
+++ b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/31308d79-e1f5-4e36-84fc-9edb4da759d3_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fd319240276c7daef9156655d3685d8952b81163949d0d07e7779d207e9ec9e2
+size 100410
diff --git a/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/31308d79-e1f5-4e36-84fc-9edb4da759d3_origin.pdf b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/31308d79-e1f5-4e36-84fc-9edb4da759d3_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..31eee6dd325c17f936c6bba6654248b5a4c162fa
--- /dev/null
+++ b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/31308d79-e1f5-4e36-84fc-9edb4da759d3_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:679c0c58f2c90449785a7bae4b1884fc105f789fc8f2d50971515cddb6bcfb7d
+size 443461
diff --git a/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/full.md b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..e7cf7aaaf45d567459c6533cf44813894f42467f
--- /dev/null
+++ b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/full.md
@@ -0,0 +1,330 @@
+# Treasures Outside Contexts: Improving Event Detection via Global Statistics
+
+Rui Li, Wenlin Zhao, Cheng Yang*, Sen Su
+Beijing University of Posts and Telecommunications, Beijing, China
+{lirui, zhaowenlin, yangcheng, susen}@bupt.edu.cn
+
+# Abstract
+
+Event detection (ED) aims at identifying event instances of specified types in given texts, which has been formalized as a sequence labeling task. As far as we know, existing neural-based ED models make decisions relying on the contextual semantic features of each word in the input text, which we find is easy to get confused by varied contexts in the test stage. To this end, we come up with the idea of introducing a set of statistical features from word-event co-occurrence frequencies in the entire training set to cooperate with the contextual features. Specifically, we propose a Semantic and Statistic-Joint Discriminative Network $(\mathbf{S}^2\text{-JDN})$ consisting of a semantic feature extractor, a statistical feature extractor, and a joint event discriminator. In experiments, $\mathbf{S}^2\text{-JDN}$ effectively exceeds ten recent state-of-the-art (SOTA) baseline methods on ACE2005 and KBP2015 benchmark datasets. Further, we perform extensive experiments to investigate the effectiveness of $\mathbf{S}^2\text{-JDN}$ .
+
+# 1 Introduction
+
+Event detection (ED) is an important information extraction task in the NLP field, which aims to identify event instances of specified types in given texts. Associated with each event mention is a phrase, i.e., the event trigger1 evoking that event. More precisely, the task involves identifying event triggers and classifying them into the specific types. For instance, according to ACE2005 annotation guideline, in the sentence “A police officer was killed in New Jersey today”, an ED model should be able to recognize the word “killed” as a trigger for the event type “Die”.
+
+With the development of deep learning, ED has been formalized as a sequence labeling task and
+
+| Two texts in the training set: | Trigger | Event |
| T1: There have been too many civilians killed … | Killed | Die |
| T2: … a sister were wounded late Wednesday … | Wounded | Injure |
| Four variants of T1 and T2 in testing: | DMBERT | Ours |
| V1: There have been too many civilians killed. | Die √ | Die √ |
| V2: … a sister were killed late Wednesday… | Injure × | Die √ |
| V3: There have been too many civilians wounded … | Die × | Injure √ |
| V4: EU foreign policy supremo Javier Solana likewise slammed the attack, saying, “There have been too many civilians wounded …” | Other × | Attack× |
+
+Figure 1: A case study of SOTA model DMBERT (Wang et al., 2019) and our proposed model. We train DMBERT and our proposed model on ACE2005, and select two texts (T1 and T2) with "killed" and "wounded" as triggers in the training set. For testing, we change the contexts of the two triggers in T1 and T2 to obtain V1 to V4, and let the two ED models predict their event types in the new contexts. We can see that DMBERT is easy to get confused in the new contexts, while our model is obviously more stable. The detailed explanations are in Section 4.3.5.
+
+implemented by a variety of neural network models (Chen et al., 2015; Zhao et al., 2018). As claimed by the famous distributional hypothesis (Harris, 1954; Firth, 1957), the words in a text are characterized by their contexts, i.e., themselves and their surrounding words. Thus, to fully consider the information of each word in the sequential prediction process, existing neural-based ED models make decisions based on elaborately extracted contextual features of the words (Hong et al., 2018; Tong et al., 2020b,a), which has become a "standard" decision-making pattern.
+
+Theoretically, the contextual information in a given text is enough to determine the event type of each word. But the fact is an event can be described by various contexts, and the contexts in the test stage are usually not covered by the training set. Therefore, a common shortcoming of existing neural-based ED models is that they are prone to get confused by the changeable contexts during testing. As shown in Figure 1, the variation of any
+
+surrounding words will lead to a different set of extracted contextual features and may misguide their final judgments.
+
+To alleviate this shortcoming, a natural idea is to seek an additional "stable" decision-making basis unchanged across varied contexts to cooperate with the contextual features. Therefore, we envisage extracting a set of event features of words from the entire training set through global statistics—word-event co-occurrence frequencies.
+
+Global statistics were widely used by many early pattern-based and feature-based ED models (Liao and Grishman, 2010; Li et al., 2013). However, with the introduction of deep learning technologies (Chen et al., 2015), various powerful neural-based ED models directly extract contextual semantic features from each text via end-to-end architectures. The use of global statistics has gradually faded out of researchers' attention. In our work, we find that the word-event co-occurrence frequencies in ED datasets have potential to help neural-based ED models eliminate a large number of interference options in testing (Section 3.1). Thus, as the title suggests, the valuable features for neural-based ED models can be collected outside the contexts.
+
+Specifically, we design a simple but novel Semantic and Statistic-Joint Discriminative Network $(\mathbf{S}^2\text{-}\mathbf{JDN})$ to implement the new decision-making pattern, which consists of three modules. (i) Semantic feature extractor takes Dynamic Multi-pooling BERT (Wang et al., 2019) as the prototype and is used to obtain the token-level contextual features in each text. (ii) Statistical feature extractor mines event features in both direct and indirect ways from word-event co-occurrence frequencies, and then fuses and rescales them as the final statistical event features. (iii) Joint event discriminator adopts a layer normalization to unify the two types of event features and combines them for decision-making.
+
+In experiments, we compare with ten strong baselines on ACE2005 and KBP2015 datasets, where $S^2$ -JDN exceeds the state-of-the-art (SOTA) models by $1.9\%$ and $1.9\%$ in trigger classification F1, respectively. Further, we perform extensive experiments and draw multiple useful conclusions about $S^2$ -JDN.
+
+Our contributions can be summarized as follows:
+
+(1) As far as we know, all existing neural-based ED models make decisions entirely based on contextual features (i.e., the standard pattern) in the
+
+NLP field, and we are the first to explore to introduce the statistical features as an additional stable decision-making basis.
+
+(2) We propose $S^2$ -JDN for ED task, which takes into account both the (contextual) semantic features and statistical features of each word to make a decision. Specifically, the statistical feature extractor of $S^2$ -JDN mines features in both direct and indirect ways from word-event co-occurrence frequencies, thereby acquiring abundant statistical event features.
+(3) We demonstrate that $S^2$ -JDN effectively exceeds ten strong baselines on ACE2005 and KBP2015 datasets, and conduct extensive exploration experiments to comprehensively probe $S^2$ -JDN.
+
+# 2 Related Work
+
+As the key component of the event extraction system (Yang et al., 2019; Li et al., 2020; Ferguson et al., 2018), the research of ED has experienced the periods of traditional methods and deep learning methods.
+
+During the period of traditional methods, global statistics collected from the training set were widely used as the knowledge sources or decision-making basis of different ED models (Saurí et al., 2005; Ahn, 2006; Ma and Cisar, 2009; Liao and Grishman, 2010; Li et al., 2013). Grishman et al. (2005) and Shinyama and Sekine (2006) used statistical information to train a MaxEnt event classifier. Wan et al. (2009) constructed a frequency pattern-based framework for ED. Ji and Grishman (2008) obtained document-wide and cluster-wide statistics to correct the results of ED. Qin et al. (2013) proposed a classifier-based method to process statistical features for event filtering. Cao et al. (2015) recorded the frequency that each pattern is associated with an event type, and treated the frequencies as core features.
+
+With the introduction of deep learning technologies, many neural-based ED models extracted contextual semantic features from each text via end-to-end architectures (Orr et al., 2018; Liu et al., 2019; Lai et al., 2020). Chen et al. (2015) acquired the contextual features via convolution and dynamic multi-pooling techniques. Liu et al. (2018) and Zhao et al. (2018) employed the attention mechanisms during contextual feature extraction. Nguyen and Grishman (2015), Ding et al. (2019), and Yan et al. (2019) introduced external knowledge to as
+
+sist neural networks to better understand each given text. Recently, many studies applied powerful pretrained language models to better comprehend contexts (Du and Cardie, 2020; Liu et al., 2020a,b; Huang and Ji, 2020).
+
+Neural-based ED models significantly outperform the traditional ones, and become the new research hotspot. Accordingly, the use of global statistics has faded out of researchers' attention. As far as we know, there is no neural-based ED model explicitly using global statistics in the training sets. Although neural networks possess powerful learning ability in theory, their training is based on individual sentences, and thus it's not easy for them to capture the global statistics. More importantly, we observe that the word-event co-occurrence frequencies for most words concentrate on only a few events, which are potential to help neural-based ED models eliminate a large number of interference options in testing (Section 3.1). To this end, we propose $S^2$ -JDN, which takes into account both the (contextual) semantic features and statistical features of each word to make a decision. Besides employing the collected global statistics as features directly like traditional ED models, $S^2$ -JDN also leverages the property of neural networks to indirectly extract more abundant features from word-event co-occurrence frequencies (Section 3.2.2).
+
+# 3 Methodology
+
+In this section, we first elaborate the motivation for introducing word-event co-occurrence frequencies (Section 3.1), then propose a concrete instantiation called Semantic and Statistic-Joint Discriminative Network ( $S^2$ -JDN) (Section 3.2), and finally describe the training details of $S^2$ -JDN (Section 3.3).
+
+# 3.1 Motivation for Introducing Word-Event Co-occurrence Frequencies
+
+The benefits of word-event co-occurrence frequencies for neural-based ED models are as follows:
+
+Stability and Accessibility. First of all, word-event co-occurrence frequencies are collected from the entire training set and will not be disturbed by various contexts, which satisfy our requirement of stability. With their assistance, the neural-based ED models are easier to make correct predictions in the changeable contexts during testing. Also, the collection of these statistics does not rely on any external tools or data.
+
+Clear Directivity. The event set of an ED dataset
+
+
+Figure 2: Statistics about the numbers of events that can be evoked by each trigger word in ACE2005 and KBP2015 datasets. In our statistics, a word will be regarded as a trigger word if it evokes a specified event in a text in the dataset. When counting the number of events evoked by a trigger word, "Other" will also be considered. $k$ -E-T ( $k = 1, 2, 3$ ) denotes the proportion of the trigger words evoking $k$ events over all trigger words, and O-T corresponds to the rest trigger words.
+
+consists of many event types and a special "Other" type for non-triggers. As plotted in Figure 2, an ED dataset often contains dozens of events, but most words can only evoke at most three of them2. This phenomenon can be explained by the characteristic of ED task, i.e., although the total event number of a realistic ED dataset can be large, most triggers are single words3 with limited meaning and can only evoke very few events. This characteristic can be reflected by the word-event co-occurrence frequencies in the ED dataset. We refer to the trait that word-event co-occurrence frequencies concentrate on only a few events as clear directivity. Therefore, such statistics can provide clear indications for neural-based ED models and have great potential to help them eliminate lots of interference options in testing.
+
+# 3.2 Semantic and Statistical-Joint Discriminative Network
+
+To take advantage of both contextual semantic features and the statistical features extracted from word-event co-occurrence frequencies, we propose a simple but novel Semantic and Statistic-Joint Discriminative Network (S²-JDN) as shown in Fig-
+
+
+Figure 3: The architecture of proposed $\mathbf{S}^2$ -JDN.
+
+ure 3, which consists of a semantic feature extractor, a statistical feature extractor, and a joint event discriminator.
+
+# 3.2.1 Semantic Feature Extractor
+
+The semantic feature extractor collects contextual features from given texts and is acted by a Dynamic Multi-pooling BERT (Wang et al., 2019) in this work. It is also possible to explore other choices in future work.
+
+Consider an $m$ -word input sequence $s_w = (w_1, \ldots, w_m)$ . After wordpiece tokenization (Wu et al., 2016), $s_w$ is further decomposed into ([CLS], $t_{1,1}, \ldots, t_{1,k_1}, \ldots, t_{m,1}, \ldots, t_{m,k_m}$ ), where [CLS] is a specific token of BERT (Devlin et al., 2018), $t_{i,j}$ is the $j_{th}$ token of $w_i$ . We use $e_{i,j}$ to denote the BERT's input corresponding to $t_{i,j}$ , which is the sum of the token and position embeddings. The BERT's output for $e_{i,j}$ is $h_{i,j}$ . Next, $(h_{1,1}, \ldots, h_{m,k_m})$ are further processed by a dynamic multi-pooling operation, and the output of $h_{i,j}$ is denoted as $c_{i,j}$ and calculated as:
+
+$$
+c _ {i, j} ^ {z} = \max \left\{h _ {1, 1} ^ {z}, \dots , h _ {i, j} ^ {z} \right\} + \max \left\{h _ {i, j + 1} ^ {z}, \dots , h _ {m, k _ {m}} ^ {z} \right\} \tag {1}
+$$
+
+where $c_{i,j}^{z}$ and $h_{i,j}^{z}$ is the $z^{th}$ features of $c_{i,j}$ and $h_{i,j}$ . Dynamic multi-pooling extracts important features on both sides of $t_{i,j}$ to form its contextual vector. Since the size of $h_{i,j}$ is large enough, we
+
+combine the pooling results by addition operation, rather than concatenation.
+
+# 3.2.2 Statistical Feature Extractor
+
+Parallel to the semantic feature extractor, the statistical feature extractor mines a set of features from word-event co-occurrence frequencies as additional decision-making basis. To take full advantage of these statistics, we extract features in both direct and indirect ways.
+
+Extracting Direct Statistical Features: For word $w_{i}$ in text $s_w$ , we denote its word-event co-occurrence frequency vector as $f_{i} = (n_{i}^{1}, \ldots, n_{i}^{K}) \in \mathbb{R}^{K}$ , where $n_{i}^{z}$ is the number of times $w_{i}$ evokes the $z^{th}$ event type in the training set, and $K$ is the total event number (including "Other"). $f_{i}$ is normalized to a vector with direct statistical features $\tilde{f}_{i} = f_{i} / n_{i}$ , where $n_{i} = \sum_{z=1}^{K} n_{i}^{z}$ is the total number of $w_{i}$ 's occurrences in the training set. In testing, $\tilde{f}_{i} = \mathbf{0}$ for words unseen in the training set.
+
+Although most $\tilde{f}_i$ have clear directivity and can reflect global event information of $w_{i}$ (Section 3.1), its feature dimensions are much smaller than the contextual vectors $c_{i,j}$ . Therefore, the information provided by $\tilde{f}_i$ might be insufficient to guide the final decision. In light of this, we propose a temporary training task named Frequency Supervised Multi-Label Classification (FSMLC), which finetunes the generic word embedding of each word $w_{i}$ to acquire more statistical features indirectly.
+
+Extracting Indirect Statistical Features: As mentioned above, FSMLC needs to encode statistical information into the generic word embedding $e_i^w$ of $w_i$ by finetuning. In our work, $e_i^w$ is 300-dimension Glove embedding (Pennington et al., 2014). Concretely, FSMLC first maps $e_i^w$ into a new vector $\tilde{e}_i^w$ by a linear transformation, then feeds $\tilde{e}_i^w$ into a temporary event classifier and adopts the normalized frequencies in $\tilde{f}_i$ as the targets for training. The loss function of FSMLC for word sequence $s_w$ is:
+
+$$
+\mathcal {L} _ {M L C} ^ {s _ {w}} = - \sum_ {i = 1} ^ {m} \frac {1}{n _ {i}} \tilde {f} _ {i} \cdot \log (\tilde {p} _ {i}) \tag {2}
+$$
+
+$$
+\tilde {p} _ {i} ^ {z} = \frac {\exp \left(\tilde {e} _ {i} ^ {w} \cdot \tilde {u} _ {z}\right)}{\sum_ {l = 1} ^ {K} \exp \left(\tilde {e} _ {i} ^ {w} \cdot \tilde {u} _ {l}\right)} \tag {3}
+$$
+
+$$
+\tilde {e} _ {i} ^ {w} = M _ {1} \cdot e _ {i} ^ {w} \tag {4}
+$$
+
+where $\tilde{p}_i^z$ , and $\tilde{u}_z$ are the predicted probability and trainable projection vector of the $z^{th}$ event type, $M_{1}$ is the trainable linear transformation matrix.
+
+Now, we explain the settings of FSMLC. According to previous studies (Bespalov et al., 2012; Tang et al., 2014), word embeddings can gain the ability to represent some specific information via targeted training. Therefore, the temporary training task FSMLC finetunes the generic semantic features within $e_i^w$ into a set of new ones in $\tilde{e}_i^w$ that can better represent the events evoked by $w_i$ in the training set, thereby indirectly using $\tilde{f}_i$ to obtain more features. Note that the trained $\tilde{e}_i^w$ possesses both semantic information and word-event co-occurrence information, but we refer to it as an indirect statistical feature vector. Finally, the loss of FSMLC on the entire training set is:
+
+$$
+\mathcal {L} _ {M L C} = \sum_ {s _ {w}} \mathcal {L} _ {M L C} ^ {s _ {w}} = - \sum_ {w \in V} \tilde {f} _ {w} \cdot \log (\tilde {p} _ {w}) \tag {5}
+$$
+
+where $V$ is the vocabulary of the training set. Therefore, all words can get the same level of training. In testing, the temporary classifier will be discarded.
+
+Feature Fusing and Rescaling: The statistical event vector of $w_{i}$ is the fusion of $\tilde{f}_{i}$ and $\tilde{e}_{i}^{w}$ :
+
+$$
+v _ {i} = M _ {2} \cdot \tilde {v} _ {i} + \tilde {v} _ {i} \tag {6}
+$$
+
+where $\tilde{v}_i = \left[\tilde{f}_i;\tilde{e}_i^w\right]$ , $M_2$ is a trainable fusion matrix. Although Eq.(6) is formally equivalent to a linear transformation of $\tilde{v}_i$ , we find that the approach of separating $\tilde{v}_i$ alone and adding it to $M_2\cdot \tilde{v}_i$ sometimes performs better in practice.
+
+As is well-known, the credibility of statistics is closely related to the number of each word's occurrences. The fewer times a word appears in the training set, the less reliable its word-event occurrence frequencies are. To weaken the influence of low-frequency words' statistical features, we rescale $v_{i}$ as:
+
+$$
+v _ {i} ^ {\prime} = \alpha_ {i} \cdot v _ {i}, \quad \alpha_ {i} = \min \left\{1, \frac {n _ {i}}{c} \right\} \tag {7}
+$$
+
+where $c$ is an integer hyperparameter denoting the threshold of occurrence number that a word's statistics can be trusted. For $n_i < c$ , $v_i$ is scaled down, and $v_i' = 0$ for words unseen in the training set.
+
+# 3.2.3 Joint Event Discriminator
+
+The joint event discriminator combines the token-level semantic vectors $c_{i,j}$ and the word-level statistical vector $v_{j}^{\prime}$ for decision-making.
+
+Firstly, each $c_{i,j}$ $(j\in 1,\dots ,k_i)$ will be concatenated with $v_{i}^{\prime}$ to form the token-level event vector $\tilde{r}_{i,j} = [c_{i,j};v_i']$ . Since features in $c_{i,j}$ and $v_{i}^{\prime}$ come
+
+from two different sources, we apply a simple layer normalization to unify them:
+
+$$
+r _ {i, j} ^ {z} = \frac {\tilde {r} _ {i , j} ^ {z} - \mu_ {i , j}}{\sigma_ {i , j}} \tag {8}
+$$
+
+$$
+\mu_ {i, j} = \frac {1}{d _ {r}} \sum_ {z} \tilde {r} _ {i, j} ^ {z} \tag {9}
+$$
+
+$$
+\sigma_ {i, j} = \sqrt {\frac {1}{d _ {r}} \sum_ {z} \left(\tilde {r} _ {i , j} ^ {z} - \mu_ {i , j}\right) ^ {2}} \tag {10}
+$$
+
+where $r_{i,j}^{z}$ and $\tilde{r}_{i,j}^{z}$ are the $z^{th}$ features of $r_{i,j}$ and $\tilde{r}_{i,j}$ , and $d_r$ is the dimension of vector $\tilde{r}_{i,j}$ .
+
+In testing, if $n_i = 0$ , we have $v_i' = 0$ , but Eq.(8-10) will change the statistical part in $r_{i,j}$ to non-zero values. So we multiply $r_{i,j}$ by a vector to change the statistical part to zeros again after normalizing, i.e., $r_{i,j}' = r_{i,j} \odot [1; I_i^{sta}]$ , where $I_i^{sta}$ corresponds to the statistical part in $r_{i,j}$ , and $I_i^{sta} = 0$ if $n_i = 0$ else $I_i^{sta} = 1$ ; $\odot$ is element-wise multiplication.
+
+Then, $r_{i,j}^{\prime}(j = 1,\dots,k_{i})$ are inputted into a Softmax layer to calculate the token-level prediction distributions $p_{i,j}$ :
+
+$$
+p _ {i, j} ^ {z} = \frac {\exp \left(r _ {i , j} ^ {\prime} \cdot u _ {z}\right)}{\sum_ {l = 1} ^ {K} \exp \left(r _ {i , j} ^ {\prime} \cdot u _ {l}\right)} \tag {11}
+$$
+
+where $p_{i,j}^{z}$ and $u_{z}$ are respectively the predicted probability and trainable projection vector of the $z^{th}$ event type. The prediction distribution of word $w_{i}$ is the average of $p_{i,j}$ , i.e., $p_{i} = \frac{1}{k_{i}}\sum_{j = 1}^{k_{i}}p_{i,j}$ .
+
+# 3.3 Training of $\mathbf{S}^2$ -JDN
+
+In the training of S $^2$ -JDN, besides the BERT, the trainable parameters also contain $\tilde{u}_z$ and $M_1$ in Eq.(3-4), $M_2$ in Eq.(6), and $u_z$ in Eq.(11). We jointly train the main task ED and the temporary task FSMLC, and the total loss for sequence $s_w$ is:
+
+$$
+\mathcal {L} ^ {s _ {w}} = - \sum_ {i = 1} ^ {m} q _ {i} \cdot \log (p _ {i}) + \beta \mathcal {L} _ {M L C} ^ {s _ {w}} \tag {12}
+$$
+
+where $q_{i}$ is the one-hot ground-truth event label of $w_{i}, \beta$ is the coefficient of FSMLC's loss. In experiments, the loss of Eq.(12) is optimized by Adam optimizer (Kingma and Ba, 2014).
+
+# 4 Experiments
+
+# 4.1 Experimental Setups
+
+Datasets: We take two benchmark datasets ACE2005 and KBP2015 for evaluation. ACE2005/KBP2015 contains 599/360 documents and 33/38 specified event types. For ACE2005, we follow the previous studies (Peng et al., 2016; Du and Cardie, 2020; Liu et al., 2020b; Lai et al., 2020) and use 40 documents from newswire domain for testing, 30 documents for validation, and the rest for training. For KBP2015, we also use the official test set, and split about $20\%$ of sentences from the training set for validation. Their statistics are presented in Table 1.
+
+Implementation Details of $\mathbf{S}^2$ -JDN7: On ACE2005/KBP2015, the learning rate is 1e-5/2.5e-5 (from [1e-6, 1e-4]), batch size is 48/16 (is selected from {16, 32, 48, 64, 128}). For the semantic feature extractor, the BERT has 24 16-head attention layers and 1024 hidden embedding dimension. For the statistical feature extractor, the dimension of $\tilde{e}_i^w$ in Eq.(4) is 300/200 (from {50, 100, 200, 300, 400, 500}), and we adopt dropout with dropout rate 0.5/0.35 (from [0,0.5]) on $\tilde{e}_i^w$ . The threshold $c$ in Eq.(7) is 4/4 (from $\{1,\dots,5\}$ ), and the coefficient $\beta$ in Eq.(12) is 15/10 (from $\{1,2,3,5,10,15,20\}$ ). The reason for large values of $\beta$ is that the weights $1 / n_i$ in Eq.(2) have reduced the loss of FSMIC. We experiment with Pytorch 0.4.1 on Nvidia Tesla P40 GPU. The best-performing $\mathbf{S}^2$ -JDN appears after 107/132 epochs, and each epoch takes about 4 minutes, so the total training time is in 7/8.8 hours.
+
+# 4.2 Main Experiments
+
+Baselines: We take SOTA models without external ED-related knowledge on ACE2005 and KBP2015 as baselines for fair comparisons. The baselines include: MSEP (Peng et al., 2016) develops an event detection and co-reference system with minimal supervision; FBRNN (Ghaeini et al., 2016) employs forward-backward recurrent neural networks for ED; GCN-ED (Nguyen and Grishman, 2018) exploits a new pooling method to aggregate the outputs of GCN; PLMEE (Yang et al., 2019) directly uses a basic BERT classification model to iden
+
+| Dataset | Train | Valid | Test |
| #Sen | #Tri | #Sen | #Tri | #Sen | #Tri |
| ACE2005 | 14477 | 4088 | 831 | 386 | 952 | 764 |
| KBP2015 | 5175 | 5450 | 1167 | 931 | 3809 | 6331 |
+
+Table 1: Statistics of training-valid/test set of ACE2005 and KBP2015 datasets. #Sen and #Tri respectively denote the numbers of the sentences and triggers.
+
+ | ACE2005 (%) | KBP2015 (%) |
| P | R | F1 | P | R | F1 |
| TACTop | N/A | N/A | N/A | 75.2 | 47.7 | 58.4 |
| ED-QA | 71.1 | 73.7 | 72.4 | N/A | N/A | N/A |
| RCEE | 75.6 | 74.2 | 74.9 | N/A | N/A | N/A |
| M-full | 75.2 | 74.4 | 74.8 | N/A | N/A | N/A |
| EEGCN | 76.7 | 78.6 | 77.6 | N/A | N/A | N/A |
| G-GCN | 78.8 | 76.3 | 77.6 | N/A | N/A | N/A |
| MSEP | 70.4 | 65.0 | 67.6 | 69.2 | 47.8 | 56.6 |
| FBRNN | 66.8 | 68.0 | 67.4 | 71.6 | 48.2 | 57.6 |
| GCNED | 77.9 | 68.8 | 73.1 | 70.3 | 50.6 | 58.8 |
| PLMEE* | 76.0 | 73.9 | 74.9 | 75.5 | 53.4 | 62.6 |
| DMBERT* | 77.5 | 76.2 | 76.8 | 76.1 | 54.9 | 63.8 |
| S²-JDN | 80.3 | 78.8 | 79.5 | 78.4 | 56.5 | 65.7 |
+
+Table 2: Precision (P), Recall (R), and micro-F1 (F1) of trigger classification. The baselines with “*” are implemented by ourselves.
+
+tify and classify triggers $^{8}$ ; DMBERT (Wang et al., 2019) connects a dynamic multi-pooling behind a BERT to extract contextual features $^{9}$ ; ED-QA (Du and Cardie, 2020) formulates ED as a question answering task; RCEE (Liu et al., 2020a) casts ED task as a machine reading comprehension problem; M-FULL (Liu et al., 2020b) proposes a training mechanism called context-selective mask generalization for ED; EEGCN (Cui et al., 2020) simultaneously exploits syntactic structure and typed dependency label information to perform ED; GGCN (Lai et al., 2020) combines BERT, GCN, and gating mechanism for ED. Besides, we also present the top TAC KBP2015 Event Nugget Detection result: TAC-TOP (Mitamura et al., 2015).
+
+Results and Analysis By convention, we use precision, recall, and micro-F1 as metrics, which are presented in Table 2.
+
+As shown in Table 2, on ACE2005, $\mathbf{S}^2$ -JDN exceeds the SOTA models EEGCN/G-GCN by $3.6\% /1.5\%$ $0.2\% /2.5\%$ and $1.9\% /1.9\%$ in terms of
+
+precision, recall, and F1. On KBP2015, DMBERT and $S^2$ -JDN are significantly better than MSEP, FBRNN, GCNED, and TACTop with the help of the pre-trained BERT, and $S^2$ -JDN further outperforms DMBERT by $2.3\%$ , $1.6\%$ , and $1.9\%$ in precision, recall, and F1. All the neural-based baselines employ the standard decision-making pattern, and RCEE, ED-QA, M-FULL, G-GCN, PLMEE, and DMBERT are engineered by BERT. These results show the effectiveness of $S^2$ -JDN introducing the statistical features from word-event co-occurrence frequencies. Therefore, we can infer that the new decision-making pattern used by $S^2$ -JDN is more suitable for ED task than the standard one.
+
+# 4.3 Further Exploration
+
+# 4.3.1 Ablation Study
+
+We evaluate the importance of each part in $S^2$ -JDN via ablation studies on five variants. V1 removes the indirect statistical features (ISF) by substituting $v_{i}$ with $\tilde{f}_i$ . V2 omits the direct statistical features (DSF) by replacing $v_{i}$ with $\tilde{e}_i^w$ . V3 removes the temporary training task FSMLC by setting $\beta = 0$ ; V4 omits layer normalization (LN) in joint event discriminator by directly inputting $\tilde{r}_{i,j}$ into the final Softmax layer. V5 eliminates the introduction of global statistics (GS) via replacing $v_{i}^{\prime}$ with the Glove embedding $e_i^w$ . The results are reported in Table 3.
+
+We analyze the results in Table 3 from five aspects. (i) V0 outperforms V1-V5 on all datasets, which shows that each part of $S^2$ -JDN has a positive effect on the overall performance. (ii) V1 is worse than V2. This is because the information in direct statistical features are relatively deficient and sparse, and thus is harder to change the final decisions. Therefore, the indirect statistical features are more powerful than the direct ones. (iii) V3 is better than V1, which means simply using the generic word embeddings as the indirect statistical features can also bring some improvement. We speculate that this is because the word embeddings can indicate the "identities" of the words and make it easier to recognize the words that fixedly evoke some events. (iv) V4 is worse than V2, so layer normalization is necessary, whose importance even exceeds the direct statistical features. (v) Theoretically, V5 should be the worst one among variants V1-V5, but it performs slightly better than V1. We can combine the above analyses (ii) and (iii) to explain. On the one hand, the deficient and sparse
+
+ | | ACE2005 | KBP2015 |
| V0 | S2-JDN | 79.5 | 65.7 |
| V1 | -without ISF | 77.3 | 64.5 |
| V2 | -without DSF | 78.8 | 65.1 |
| V3 | -without FDMLC | 77.8 | 64.9 |
| V4 | -without LN | 78.6 | 65.0 |
| V5 | -without GS | 77.7 | 64.6 |
+
+Table 3: Trigger classification F1 scores $(\%)$ of ablation studies on the three datasets.
+
+direct statistical features of V1 are difficult to effectively change the overall model's decisions. On the other hand, the model of V5 can learn to recognize the "identities" of words according to Glove embedding during the training of ED task.
+
+To further ensure the credibility of the results, we train each variant for three times with different random seeds, which shows that the standard deviations of $S^2$ -JDN are about $0.3\%$ on both ACE2005 and KBP2015. For the other five variants, the standard deviations are within $0.2\% - 0.5\%$ . To conclude, our proposed model is stable, and the improvements over the five variants are significant.
+
+# 4.3.2 Effects of Statistics with Different Degrees of Directivity
+
+In Section 3.1, we pointed out that an advantage of word-event co-occurrence frequencies is clear directivity, which is caused by the characteristic of ED task. The fewer the events evoked by a word, the more clear the directivity is. In this experiment, we study the effect of statistics with different degrees of directivity. Concretely, we divide the words into four categories during testing: $\mathcal{C}1 / \mathcal{C}2 / \mathcal{C}3 / \mathcal{C}4$ respectively corresponds to the words evoking $1/2/3 \geq 4$ events in the training set. For comparisons, we construct a base model with only semantic event features (Section 3.2.1) as the decision-making basis and denote it as Base. The results of the base model and $S^2$ -JDN on the 4 categories of words are reported in Table 4.
+
+From Table 4, we can find that $S^2$ -JDN has a certain improvement on each category, and its advantages decrease across $C1, C2, C3$ , and $C4$ , which means the more clear the directivity of word-event co-occurrence frequencies possess, the greater the effect of the statistical features have. Thus, the effectiveness of $S^2$ -JDN is closely related to the characteristic of ED task.
+
+ | C1 | C2 | C3 | C4 |
| ACE2005 | Base | 76.9 | 77.8 | 71.3 | 65.2 |
| S2-JDN | 80.8 | 80.2 | 72.7 | 66.0 |
| KBP2015 | Base | 66.9 | 65.2 | 58.8 | 57.0 |
| S2-JDN | 70.1 | 67.3 | 60.1 | 57.6 |
+
+Table 4: Trigger classification F1 scores $(\%)$ of each model on the word instances of the 4 categories.
+
+ | | ACE2005 | KBP2015 |
| Proportion of |A_G| | Base | 7.5% | 7.7% |
| S²-JDN | 5.5% | 6.1% |
| Proportion of |A_N_G| | Base | 15.0% | 16.2% |
| S²-JDN | 14.2% | 15.5% |
+
+# 4.3.3 Performance on Predicting Global and Non-Global Events
+
+In the training set, we refer to the most frequent event (including "Other") evoked by a word as its global event, which corresponds to the maximum word-event co-occurrence frequency of the word. Are the statistical features introduced by $S^2$ -JDN only helpful for predicting global events, but not for words with non-global event as the ground-truth labels in testing? To answer this question, we conduct the following experiments.
+
+In each test set, we gather all word instances wrongly predicted by an ED model as collection $\mathcal{A}$ . From $\mathcal{A}$ , we further select the word instances with their global events as the ground-truth labels to form collection $\mathcal{A}_{\mathcal{G}}$ , and pick out the word instances with non-global events as the ground-truth labels to constitute collection $\mathcal{A}_{\mathcal{NG}}$ . Obviously, we have $\mathcal{A} = \mathcal{A}_{\mathcal{G}} \cup \mathcal{A}_{\mathcal{NG}}$ . The instance proportions of $\mathcal{A}_{\mathcal{G}}$ and $\mathcal{A}_{\mathcal{NG}}$ in the entire test set respectively indicate the proportions of model mistakes caused by inconsistency with global events and non-global events. The results of the base model and $S^2$ -JDN are presented in Table 5.
+
+As shown in Table 5, after introducing statistical features, the proportion of $|\mathcal{A}_{\mathcal{G}}|$ is decreased by $2.0\%$ and $1.6\%$ on ACE2005 and KBP2015 test sets, and the proportion of $|\mathcal{A}_{\mathcal{N}\mathcal{G}}|$ is correspondingly reduced by $0.8\%$ and $0.7\%$ . Therefore, the statistical features are not just helpful for predicting the most frequent events evoked by each word. For words with non-global events as ground-truth labels, they also have certain benefits.
+
+Table 5: Proportions of $|\mathcal{A}_{\mathcal{G}}|$ and $|\mathcal{A}_{\mathcal{N}\mathcal{G}}|$ in the test of ACE2005 and KBP2015 for Base and $S^2$ -JDN.
+
+ | ACE2005 | KBP2015 |
| U | L | H | U | L | H |
| Base | 51.3 | 69.4 | 82.7 | 42.1 | 59.5 | 70.2 |
| S2-JDN- | 44.7 | 69.7 | 85.8 | 39.4 | 59.6 | 72.0 |
| S2-JDN | 50.1 | 70.6 | 87.1 | 41.5 | 60.8 | 74.3 |
+
+Table 6: Trigger classification F1 scores $(\%)$ of Base, $\mathbf{S}^2$ -JDN-, $\mathbf{S}^2$ -JDN on $\mathcal{U}$ (Unseen words), $\mathcal{L}$ (Lowfrequency words), and $\mathcal{H}$ (High-frequency words).
+
+# 4.3.4 Effects on Words with Different Occurrence Frequencies
+
+As discussed in Section 3.2.2, the credibility of statistics will decrease with the number of a word's occurrences. To this end, we rescale $v_{i}$ as Eq.(7) to weaken the impact of low-frequency words' statistical features. Now, we compare the model performance on words with different occurrence frequencies in the training set. Here we define low-frequency words according to hyperparameter $c$ in Eq.(7), which is 4 times on ACE2005 an KBP2015 (Section 4.1). Accordingly, we split the words in each test set into three parts: $\mathcal{U} = \{\text{words unseen in the training set}\}$ , $\mathcal{L} = \{\text{low-frequency words with occurrence numbers in \{1, 2, 3\}}\}$ in the training set, $\mathcal{H} = \{\text{high-frequency words appearing at least 4 times in the training set}\}$ . Besides the base model and $S^2$ -JDN, we also test a variant of $S^2$ -JDN that removes the rescaling operations in Eq.(7) and the element-wise multiplication with $[1, I_i^{sta}]$ after layer normalization in joint event discriminator (Section 3.2.3), denoted as $S^2$ -JDN $^{-}$ . Their results are shown in Table 6.
+
+As expected, all models perform best on $\mathcal{H}$ in Table 6, and perform worst on $\mathcal{U}$ . In predicting the events of words in $\mathcal{U}$ , the statistical features are useless and even become interference, so the results of $\mathrm{S}^2$ -JDN $^-$ are significantly worse than the other two models, and $\mathrm{S}^2$ -JDN avoids the interference by the two rescaling operations. On $\mathcal{L}$ and $\mathcal{H}$ , $\mathrm{S}^2$ -JDN $^-$ and $\mathrm{S}^2$ -JDN are better than Base, which is due to the effect of the statistical features. However, the training and testing of $\mathrm{S}^2$ -JDN $^-$ are disturbed by some low-frequency words' false statistical information more seriously, so it can't achieve the same results as $\mathrm{S}^2$ -JDN on $\mathcal{L}$ and $\mathcal{H}$ .
+
+# 4.3.5 Case Study
+
+In this subsection, we will analyze the case study results of DMBERT and our $S^2$ -JDN shown in Table 1. V1 is the simplest variant, which just cuts off the
+
+part after "killed" in T1. Although the contextual features of the two models are changed in V1, both models can predict the correct event "Die". V2 and V3 exchange the surrounding words of "killed" and "wounded" in T1 and T2, which successfully confuses DMBERT, while $S^2$ -JDN still makes the correct decisions with the help of statistical features. V4 is the most complex variant. Besides replacing the trigger word in T1 with "wounded", V4 also adds a long piece of content (green part). At this time, DMBERT can't even identify "wounded" as a trigger, and $S^2$ -JDN also wrongly predicts the event as "Attack".
+
+This experiment shows that the statistical features are indeed helpful in varied contexts. But if the contexts change too significantly, $S^2$ -JDN may still be misguided.
+
+# 5 Conclusion & Future Work
+
+In this paper, we find that existing neural-based ED models are likely to get confused by changeable contexts during testing. To alleviate this problem, we propose S $^2$ -JDN model, which extracts a set of statistical event features from word-event cooccurrence frequencies as an additional decision basis besides contextual information. Experimental results on two benchmark datasets ACE2005 and KBP2015 against ten recent SOTA ED models demonstrate the effectiveness of S $^2$ -JDN and each proposed module.
+
+For future work, there are three intriguing directions: (i) extending the decision-making pattern of $S^2$ -JDN to other neural-based ED models and thus absorbing their advantages; (ii) incorporating the word-event co-occurrence frequencies into neural-based ED models via prior on their output distributions in a Bayesian framework; and (iii) combining $S^2$ -JDN with data augmentation methods, so as to collect more accurate global statistics and further promote the performance.
+
+# Acknowledgments
+
+This work is supported by the Innovation Research Group Project of NSFC (61921003), the National Natural Science Foundation of China (No. 62002029), and the Fundamental Research Funds for the Central Universities 2020RC23. We also would like to thank anonymous reviewers for their insightful comments.
+
+# References
+
+David Ahn. 2006. The stages of event extraction. In Proceedings of the Workshop on Annotating and Reasoning about Time and Events, pages 1-8.
+Dmitriy Bespalov, Yanjun Qi, Bing Bai, and Ali Shokoufandeh. 2012. Sentiment classification with supervised sequence embedding. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 159-174. Springer.
+Kai Cao, Xiang Li, and Ralph Grishman. 2015. Improving event detection with dependency regularization. In Proceedings of the International Conference on Recent Advances in Natural Language Processing, pages 78-83.
+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, Beijing, China. Association for Computational Linguistics.
+Shiyao Cui, Bowen Yu, Tingwen Liu, Zhenyu Zhang, Xuebin Wang, and Jinqiao Shi. 2020. Edge-enhanced graph convolution networks for event detection with syntactic relation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, pages 2329-2339.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
+Ning Ding, Ziran Li, Zhiyuan Liu, Haitao Zheng, and Zibo Lin. 2019. Event detection with trigger-aware lattice neural network. 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 347-356.
+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), pages 671-683.
+James Ferguson, Colin Lockard, Daniel S Weld, and Hannaneh Hajishirzi. 2018. Semi-supervised event extraction with paraphrase clusters. 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 359-364.
+John R Firth. 1957. A synopsis of linguistic theory, 1930-1955. Studies in linguistic analysis.
+
+Reza Ghaeini, Xiaoli Fern, Liang Huang, and Prasad Tadepalli. 2016. Event nugget detection with forward-backward recurrent neural networks. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 369-373.
+Ralph Grishman, David Westbrook, and Adam Meyers. 2005. Nyu's english ace 2005 system description. ACE, 5.
+Zellig S Harris. 1954. Distributional structure. Word, 10(2-3):146-162.
+Yu Hong, Wenxuan Zhou, Jingli Zhang, Guodong Zhou, and Qiaoming Zhu. 2018. Self-regulation: Employing a generative adversarial network to improve event detection. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 515-526.
+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.
+Heng Ji and Ralph Grishman. 2008. Refining event extraction through cross-document inference. In 46th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, ACL-08: HLT, pages 254-262.
+Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
+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.
+Fayuan Li, Weihua Peng, Yuguang Chen, Quan Wang, Lu Pan, Yajuan Lyu, and Yong Zhu. 2020. Event extraction as multi-turn question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, pages 829-838.
+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.
+Shasha Liao and Ralph Grishman. 2010. Using document level cross-event inference to improve event extraction. In Proceedings of the 48th Annual Meeting of the Association for Computational Linguistics, pages 789-797.
+
+Jian Liu, Yubo Chen, and Kang Liu. 2019. Exploiting the ground-truth: An adversarial imitation based knowledge distillation approach for event detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 6754-6761.
+Jian Liu, Yubo Chen, Kang Liu, Wei Bi, and Xiaojiang Liu. 2020a. Event extraction as machine reading comprehension. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1641-1651.
+Jian Liu, Yubo Chen, Kang Liu, Yantao Jia, and Zhicheng Sheng. 2020b. How does context matter? on the robustness of event detection with context-selective mask generalization. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, pages 2523-2532.
+Shaobo Liu, Rui Cheng, Xiaoming Yu, and Xueqi Cheng. 2018. Exploiting contextual information via dynamic memory network for event detection. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1030-1035.
+Yunqian Ma and Petr Cisar. 2009. Event detection using local binary pattern based dynamic textures. In 2009 IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops, pages 38-44. IEEE.
+Teruko Mitamura, Zhengzhong Liu, and Eduard H Hovy. 2015. Overview of tac kbp 2015 event nugget track. In TAC.
+Thien Huu Nguyen and Ralph Grishman. 2015. Event detection and domain adaptation with 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 2: Short Papers), pages 365-371.
+Thien Huu Nguyen and Ralph Grishman. 2018. Graph convolutional networks with argument-aware pooling for event detection. In AAAI, volume 18, pages 5900-5907.
+J Walker Orr, Prasad Tadepalli, and Xiaoli Fern. 2018. Event detection with neural networks: A rigorous empirical evaluation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 999-1004.
+Haoruo Peng, Yangqiu Song, and Dan Roth. 2016. Event detection and co-reference with minimal supervision. In Proceedings of the 2016 conference on empirical methods in natural language processing, pages 392-402.
+Jeffrey Pennington, Richard Socher, and Christopher D Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 1532-1543.
+
+Yanxia Qin, Yue Zhang, Min Zhang, and Dequan Zheng. 2013. Feature-rich segment-based news event detection on twitter. In Proceedings of the sixth international joint conference on natural language processing, pages 302-310.
+Roser Saurí, Robert Knippen, Marc Verhagen, and James Pustejovsky. 2005. Evita: A robust event recognizer for QA systems. In Proceedings of Human Language Technology Conference and Conference on Empirical Methods in Natural Language Processing, pages 700-707, Vancouver, British Columbia, Canada. Association for Computational Linguistics.
+Yusuke Shinyama and Satoshi Sekine. 2006. Preemptive information extraction using unrestricted relation discovery. In Proceedings of the Human Language Technology Conference of the NAACL, Main Conference, pages 304-311.
+Duyu Tang, Furu Wei, Nan Yang, Ming Zhou, Ting Liu, and Bing Qin. 2014. Learning sentiment-specific word embedding for twitter sentiment classification. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1555-1565.
+Meihan Tong, Shuai Wang, Yixin Cao, Bin Xu, Juanzi Li, Lei Hou, and Tat-Seng Chua. 2020a. Image enhanced event detection in news articles. In AAAI, pages 9040-9047.
+Meihan Tong, Bin Xu, Shuai Wang, Yixin Cao, Lei Hou, Juanzi Li, and Jun Xie. 2020b. Improving event detection via open-domain trigger knowledge. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5887-5897.
+Li Wan, Jianxin Liao, and Xiaomin Zhu. 2009. A frequent pattern based framework for event detection in sensor network stream data. SensorKDD '09, page 87-96, New York, NY, USA. Association for Computing Machinery.
+Xiaozhi Wang, Xu Han, Zhiyuan Liu, Maosong Sun, and Peng Li. 2019. Adversarial training for weakly supervised event detection. 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 998-1008.
+Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. 2016. Google's neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144.
+Haoran Yan, Xiaolong Jin, Xiangbin Meng, Jiafeng Guo, and Xueqi Cheng. 2019. Event detection with multi-order graph convolution and aggregated attention. 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 5770-5774.
+Sen Yang, Dawei Feng, Linbo Qiao, Zhigang Kan, and Dongsheng Li. 2019. Exploring pre-trained language models for event extraction and generation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5284-5294.
+Yue Zhao, Xiaolong Jin, Yuanzhuo Wang, and Xueqi Cheng. 2018. Document embedding enhanced event detection with hierarchical and supervised attention. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 414-419.
\ No newline at end of file
diff --git a/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/images.zip b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..b98d801fc8205f1197a184fcd033e847d7b252b0
--- /dev/null
+++ b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dc2ab24cf6b592df6e9951a67d201f4282ab14c41216a26e69b6c81998e364fa
+size 345914
diff --git a/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/layout.json b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..9a302bf6a5741f773eb207fd8fc8d71e4aaec1da
--- /dev/null
+++ b/treasuresoutsidecontextsimprovingeventdetectionviaglobalstatistics/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:365189da5532dce7fead382a15ccd4e31bff10f536fbd1041ceda861895e3696
+size 508732
diff --git a/tribridstanceclassificationwithneuralinconsistencydetection/1b20c8cf-64ad-4e3b-b811-d495225daa0c_content_list.json b/tribridstanceclassificationwithneuralinconsistencydetection/1b20c8cf-64ad-4e3b-b811-d495225daa0c_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..ebc04415ba912c55a8ac68c5b9ac7053fc85f394
--- /dev/null
+++ b/tribridstanceclassificationwithneuralinconsistencydetection/1b20c8cf-64ad-4e3b-b811-d495225daa0c_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9e6857c67c5764a7e8edab8d150463649a36f9392f90f5eb00c8e2d205b406ca
+size 90676
diff --git a/tribridstanceclassificationwithneuralinconsistencydetection/1b20c8cf-64ad-4e3b-b811-d495225daa0c_model.json b/tribridstanceclassificationwithneuralinconsistencydetection/1b20c8cf-64ad-4e3b-b811-d495225daa0c_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..84df567d77474099b6958ea5c6e2d7f7c654b7ff
--- /dev/null
+++ b/tribridstanceclassificationwithneuralinconsistencydetection/1b20c8cf-64ad-4e3b-b811-d495225daa0c_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a9c8465ae13e235c723e97ad9316f2bf856a1196da9d5594f6c7a6a4e4fe38d0
+size 111277
diff --git a/tribridstanceclassificationwithneuralinconsistencydetection/1b20c8cf-64ad-4e3b-b811-d495225daa0c_origin.pdf b/tribridstanceclassificationwithneuralinconsistencydetection/1b20c8cf-64ad-4e3b-b811-d495225daa0c_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..a9d6d92ecbe6dfda77ff0518745c714fb8ddc626
--- /dev/null
+++ b/tribridstanceclassificationwithneuralinconsistencydetection/1b20c8cf-64ad-4e3b-b811-d495225daa0c_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dd3ee538b33f2def606866b91326f0118e534c58573e6e615b3f80be42bd6df5
+size 345103
diff --git a/tribridstanceclassificationwithneuralinconsistencydetection/full.md b/tribridstanceclassificationwithneuralinconsistencydetection/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..2c82496e423806e0eb8662b2ddfcc942336d6006
--- /dev/null
+++ b/tribridstanceclassificationwithneuralinconsistencydetection/full.md
@@ -0,0 +1,348 @@
+# Tribrid: Stance Classification with Neural Inconsistency Detection
+
+Song Yang
+
+Department of Computer Science
+
+Vrije Universiteit Amsterdam
+
+The Netherlands
+
+s.yang@student.vu.nl
+
+Jacopo Urbani
+
+Department of Computer Science
+
+Vrije Universiteit Amsterdam
+
+The Netherlands
+
+jacopo@cs.vu.nl
+
+# Abstract
+
+We study the problem of performing automatic stance classification on social media with neural architectures such as BERT. Although these architectures deliver impressive results, their level is not yet comparable to the one of humans and they might produce errors that have a significant impact on the downstream task (e.g., fact-checking). To improve the performance, we present a new neural architecture where the input also includes automatically generated negated perspectives over a given claim. The model is jointly learned to make simultaneously multiple predictions, which can be used either to improve the classification of the original perspective or to filter out doubtful predictions. In the first case, we propose a weakly supervised method for combining the predictions into a final one. In the second case, we show that using the confidence scores to remove doubtful predictions allows our method to achieve human-like performance over the retained information, which is still a sizable part of the original input.
+
+# 1 Introduction
+
+The spreading of unverified claims on social media is an important problem that affects our society at multiple levels (Vlachos and Riedel, 2014; Ciampaglia et al., 2015; Hassan et al., 2017). A valuable asset that we can exploit to fight this problem is the set of perspectives that people publish about such claims. These perspectives reveal the users' stance and this information can be used to help an automated framework to determine more accurately the veracity of rumors (Castillo et al., 2011; Bourgonje et al., 2017).
+
+The stance can be generally categorized either as supportive or opposing. For instance, consider the claim "The elections workers in Wisconsin illegally altered absentee ballot envelopes". A tweet with a supportive stance is "The number of people who took part in the election in Wisconsin exceeded the
+
+total number of registered voters" while one with an opposed stance is "An extra zero was added as votes accidentally but it was quickly fixed after state officials noticed it".
+
+Being able to automatically classify the stance is necessary for dealing with the large volume of data that flows through social networks. To this end, earlier solutions relied on linguistic features, such as ngrams, opinion lexicons, and sentiment (Somasundaran and Wiebe, 2009; Anand et al., 2011; Hasan and Ng, 2013; Sridhar et al., 2015) while more recent methods additionally include features that we can extract from networks like Twitter (Chen and Ku, 2016; Lukasik et al., 2016; Sobhani et al., 2017; Kochkina et al., 2017). The current state-of-the-art relies on advanced neural architectures such as BERT (Devlin et al., 2019) and returns remarkable performance. For instance, STANCY (Popat et al., 2019) can achieve an $F_{1}$ of 77.76 with the PERSPECTRUM (PER) dataset against the $F_{1}$ of 90.90 achieved by humans (Chen et al., 2019).
+
+Although these results are encouraging, the performance has not yet reached a level that it can be safely applied in contexts where errors must be avoided at all costs. Consider, for instance, the cases when errors lead to a misclassification of news about a catastrophic event, or when they trigger wrong financial operations. In such contexts, we argue that it is better that the AI abstains from returning a prediction unless it is very confident about it. This requirement clashes with the design of current solutions, which are meant to "blindly" make a prediction for any input. Therefore, we see a gap between the capabilities of the state-of-the-art and the needs of some realistic use cases.
+
+In this paper, we address this problem with a new BERT-based neural network, which we call Tribrid (TRIplet Bert-based Inconsistency Detection), that is designed not only to produce a reliable and accurate classification, but also to test its confidence. This test is implemented by including a "negated"
+
+version of the original perspective as part of the input, following the intuition that a prediction is more trustworthy if the model produces the opposite outcome with the negated perspective. If that is not the case, then the model is inconsistent and the prediction should be discarded.
+
+Testing the consistency of the model with negated perspectives is a task that can be done simply by computing two independent predictions, one with the original perspective and one with the negated one. However, this is suboptimal because existing state-of-the-art methods are trained only with the principle that supportive perspectives should be similar to their respecting claims in the latent space (Popat et al., 2019) and the similarity might be sufficiently high even if there are keywords (e.g., "not") that negate the stance. To overcome this problem, we propose a new neural architecture that processes simultaneously both original and negated perspectives, using a siamese BERT model and a loss function that maximises the distance between the two perspectives. In this way, the model learns to distinguish more clearly supportive and opposite perspectives.
+
+To cope with the large volume of information that flows through social networks, it is important that the negated perspectives are generated automatically or at least with a minimal human intervention. To this end, two types of techniques have been presented in the literature. One consists of attaching a fixed phrase which negates the meaning (Bilu et al., 2015) while the other adds or removes the first occurrences of tokens like "not" (Niu and Bansal, 2018; Camburu et al., 2020). Tribrid implements this task in a different way, namely using simple templates that negate both with keywords (e.g., "not") and antonyms.
+
+The prediction scores obtained with Tribrid can be used either to determine more accurately the stance of the original perspective or to discard low-quality predictions. We consider both cases: In the first one, we propose an approach where multiple classifiers are constructed from the scores and a final weakly supervision model combines them. In the second one, we propose several approaches to establish the confidence and describe how to use them to discard low-quality predictions. Our experiments show that our method is competitive in both cases. For instance, in the second case, our approach was able to achieve a $F_{1}$ of 87.43 on PER by excluding only $39.34\%$ of the perspectives.
+
+Moreover, the score increased to 91.26 when $30\%$ more is excluded. Such performance is very close to the one of humans and this opens the door to an application in contexts where errors are very costly.
+
+The source code and other experimental data can be found at https://github.com/karmaresearch/tribrid.
+
+# 2 Background and Related Work
+
+Stance Classification aims to determine the stance of a input perspective that supports or opposes another given claim. In earlier studies, the research mainly focused on online debate posts using traditional classification approaches (Thomas et al., 2006; Murakami and Raymond, 2010; Walker et al., 2012). Afterwards, other approaches focused on spontaneous speech (Levow et al., 2014), and on student essays (Faulkner, 2014). Thanks to the rapid development of social media, the number of studies on tweets has increased substantially (Rajadesingan and Liu, 2014; Chen and Ku, 2016; Lukasik et al., 2016; Sobhani et al., 2017; Kochkina et al., 2017), especially boosted by dedicated SemEval challenges (Mohammad et al., 2016; Kochkina et al., 2017) and benchmarks (Bar-Haim et al., 2017; Chen et al., 2019).
+
+Earlier methods for stance classification employed various traditional classifiers, which include rule-based algorithms (Anand et al., 2011); supervised classifiers like SVM (Hasan and Ng, 2013), naïve Bayes (Rajadesingan and Liu, 2014), boosting (Levow et al., 2014), decision tree and random forest (Misra and Walker, 2013), Hidden Markov Models (HMM) and Conditional Random Fields (Hasan and Ng, 2013); graph algorithms such as MaxCut (Murakami and Raymond, 2010), and other approaches such as Integer Linear Programming (Somasundaran and Wiebe, 2009) and Probabilistic Soft Logic (Sridhar et al., 2014). Popular features include cue/topic words, argument-related and sentiment/subjectivity features, and frame-semantic features. Other features like tweets reply, rebuttal information, and retweets are known to improve the performance (Sobhani et al., 2019).
+
+In more recent work, the NLP community investigated on how to use deep neural network to improve the performance. Some representatives are LSTM-based approaches (Du et al., 2017; Sun et al., 2018; Wei et al., 2018), RNN-based approaches (Sobhani et al., 2019; Borges et al., 2019), CNN approaches (Wei et al., 2016; Zhang et al.,
+
+
+Figure 1: BERT used for stance classification by Chen et al. (2019) and Popat et al. (2019)
+
+2017) and more recently BERT-based approaches (Chen et al., 2019; Popat et al., 2019; Schiller et al., 2020). Techniques like attention mechanisms (Du et al., 2017), memory networks (Mohtarami et al., 2018), lexical features (Riedel et al., 2017; Hanselowski et al., 2018), transfer learning and multi-task learning (Schiller et al., 2020) can also improve the performance.
+
+All these approaches focus on identifying the most effective method to achieve the highest possible performance using syntactic and semantic features from the input. In contrast, our goal is to improve the performance by injecting background knowledge in the form of negated text, encouraging the model to produce more consistent predictions. As far as we know, we are the first that study this form of optimization to improve the performance of stance classification.
+
+The generation of negated perspectives can be viewed as an instance of the broader problem of constructing adversarial examples, which is drawing more attention in NLP research in recent years (Zhang et al., 2020; Wang et al., 2019). The main focus of adversarial generation is to change the text (with character/words changes or removals) to train more robust models. Most of the works focus on changes that do not alter the semantics of the original input (Belinkov and Bisk, 2018; Xiao et al., 2017; Iyyer et al., 2018; Cheng et al., 2020) while works that negate the semantics are many fewer. In this context, some initial works have manually constructed some small-scale tests (Isabelle et al., 2017; Mahler et al., 2017). More recently, Gardner et al. (2020) suggested that datasets should be perturbed by experts with small changes to the test instances. In this way, empirical evaluations can test more accurately the true linguistic capabilities of the models. In their evaluation, they selected PER, one of the datasets that we also consider, and showed that models such as BERT perform significantly worse on the perturbed dataset. Also Ribeiro et al. (2020) consider the problem that accuracy on a held-out dataset may overestimate the performance on a real scenario. To counter this,
+
+they propose a new methodology that involves tests with certain perturbations (like negation), but they do not consider stance classification. These works further motivate our effort to develop models that are more consistent when presented with negated inputs. Moreover, another goal of our work is to use consistency as a proxy to measure uncertainty and to discard low-quality predictions. A similar objective was pursued by Kochkina and Liakata (2020) for the problem of rumor verification.
+
+Since manually creating additional test instances is time consuming, some works propose automatic procedures to generate them. Bilu et al. (2015) proposes to add a fixed phrase at the end ("but this is not true") while Niu and Bansal (2018) adds the token "not" before the first verb in the sentence or replaces it with its antonym. Finally, Camburu et al. (2020) suggests a simpler alternative to remove the first occurrence of "not". In contrast to them, we use templates in the form of if-then rules.
+
+# 3 Our Approach
+
+First, we provide a short description on how BERT has been used to achieve the state-of-the-art for this problem (Section 3.1). Then, we describe our proposed neural network (Section 3.2) and how we can interpret its output to classify the stance (Section 3.3). Finally, we discuss the generation of negated perspectives using templates (Section 3.4).
+
+# 3.1 BERT Base and STANCY
+
+Our input is a sentence pair $\langle C, P \rangle$ where $C$ is the input claim and $P$ is the perspective. In 2019, Chen et al. proposed to concatenate $C$ and $P$ using two tokens [CLS] and [SEP] to delimit the claim and the perspective, respectively, and to feed the resulting string to BERT (see Figure 1a). We call this approach BERTbase. A few months later, Popat et al. (2019) proposed an improvement based on the assumption that the latent representation of a perspective should be similar if the perspective support the claim and vice versa. The resulting network is called STANCY (see Figure 1b). The main idea is to compute a latent representation of the claim
+
+and perspective $(\Sigma_{cp})$ and one for the claim alone $(\Sigma_c)$ . The two are compared with cosine similarity, denoted with $\cos (\cdot)$ , and passed to a final dense layer that performs the classification.
+
+# 3.2 Tribrid: Neural Architecture
+
+Current solutions deploy one BERT model passing, as input, the claim followed by the perspective to obtain the latent representation (see, e.g., Figure 1a). This approach is not ideal for us because we would like to pass more information as input (the negated perspective), and this might lead to a string that is too long. We address this problem by using multiple BERT models that share the same parameters, thus creating a network that is often labeled as a siamese network (Bromley et al., 1993).
+
+A schematic view of Tribrid is shown in Figure 2. As input, Tribrid receives the triplet $\langle C,P,NP\rangle$ where $NP$ is the negated perspective. We also provide a simpler architecture where the input is the pair $\langle C,P\rangle$ , which we call Tribridpos.
+
+In Tribrid, each component of the input triplet is fed to a BERT model that shares the parameters with the other two models. The three BERT models compute latent representations for $C$ , $P$ , and $NP$ , henceforth written as $\Sigma_{c}$ , $\Sigma_{p}$ , and $\Sigma_{-\overline{p}}$ . In the second stage, the network concatenates them into a single representation. We experimented with the concatenation techniques proposed in Sentence-BERT (Reimers and Gurevych, 2019), InferSent (Conneau and Kiela, 2018) and Universal Sentence Encoder (Cer et al., 2018), namely $(|\Sigma_{c} - X|, \Sigma_{c} * X)$ , $(\Sigma_{c}, X, \Sigma_{c} * X)$ , $(\Sigma_{c}, X, |\Sigma_{c} - X|)$ and $(\Sigma_{c}, X, |\Sigma_{c} - X|, \Sigma_{c} * X)$ where $X \in \{\Sigma_{p}, \Sigma_{-\overline{p}}\}$ , $|\ldots|$ is the element-wise distance, and $*$ is the element-wise multiplication. We selected $(\Sigma_{c}, X, |\Sigma_{c} - X|, \Sigma_{c} * X)$ as it slightly outperformed the others in our experiments and further concatenated $\cos(\Sigma_{c}, X)$ to it because their similarity is valuable for predicting the stance (Popat et al., 2019).
+
+Finally, the result of the concatenation is passed to a final dense layer that returns two logits $\lambda_{s}$ and $\lambda_{o}$ , which estimate the likelihood of supporting and opposing stances, respectively.
+
+To train the model, we introduce the following loss function $\mathcal{L} = \mathcal{L}_c + \mathcal{L}_e + \mathcal{L}_d$ , described below (with $Tribrid_{pos}$ , $\mathcal{L} = \mathcal{L}_c + \mathcal{L}_e$ ). The first component $\mathcal{L}_c$ is a standard cross entropy loss:
+
+$$
+\mathcal {L} _ {c} = - \log \left(\frac {\exp (\hat {y})}{\exp (\lambda_ {s}) + \exp (\lambda_ {o})}\right) \tag {1}
+$$
+
+where $\hat{y}\in \{\lambda_s,\lambda_o\}$ is the logit of the true stance.
+
+The second part is the cosine embedding loss:
+
+$$
+\mathcal {L} _ {e} = \left\{ \begin{array}{l l} 1 - \cos \left(\Sigma_ {c}, \Sigma_ {p}\right) & \text {i f} y = 1 \\ \max \left(0, \cos \left(\Sigma_ {c}, \Sigma_ {p}\right)\right) & \text {i f} y = - 1 \end{array} \right. \tag {2}
+$$
+
+where $y = 1$ if the perspective supports the claim and $-1$ if it is opposed to it.
+
+The third component $\mathcal{L}_d$ is added because $\mathcal{L}_c$ and $\mathcal{L}_e$ do not take into account the fact that the perspective that supports the claim should be "closer" to the claim than the perspective that opposes it. To this end, we add a triplet loss (Schroff et al., 2015). Let $\Sigma^{+} = \Sigma_{p}$ and $\Sigma^{-} = \Sigma_{\neg p}$ if the input perspective supports the claim or $\Sigma^{+} = \Sigma_{\neg p}$ and $\Sigma^{-} = \Sigma_{p}$ otherwise. Then,
+
+$$
+\mathcal {L} _ {d} = \max \left(\gamma + \delta^ {+} - \delta^ {-}, 0\right) \tag {3}
+$$
+
+with $\gamma$ being the margin, $\delta^{+} = |\Sigma_{c} - \Sigma^{+}|$ , and $\delta^{-} = |\Sigma_{c} - \Sigma^{-}|$ .
+
+# 3.3 Stance Classification
+
+We can make use of four signals to predict the stance. The first two are the logits $\lambda_{s}$ and $\lambda_{o}$ . The third one is $\delta_{p} = ||\Sigma_{c} - \Sigma_{p}||$ , i.e., the distance between the claim and the input perspective. The fourth one is $\delta_{\neg p} = ||\Sigma_{c} - \Sigma_{\neg p}||$ , i.e., the distance to the negated perspective. The values of these signals can be combined in different ways in order to compute a final binary decision. We define two possible alternative procedures.
+
+The first procedure consists of picking the logit with the highest value as the final label, e.g., if $\lambda_s > \lambda_o$ , then the stance should be support. In contrast, the second procedure looks at the distance values. In this case, it chooses the final label depending on which perspective has the closest distance, i.e., the system should return "support" if $\delta_p < \delta_{-p}$ or "oppose" otherwise.
+
+In both cases, the confidence of the model can be quantified by the difference between the two signals. If difference is at least $\tau$ , where $\tau$ is a given threshold, then we can accept the outcome trusting that the system is sufficiently confident. Otherwise, we abstain from making a prediction. Following this principle, we introduce the decision procedures $K^{\tau}$ and $\Lambda^{\tau}$ , defined as follows:
+
+$$
+K ^ {\tau} = \left\{ \begin{array}{l l} \mathrm {S} & \left| \lambda_ {s} - \lambda_ {o} \right| \geq \tau \text {a n d} \lambda_ {s} \geq \lambda_ {o} \\ \mathrm {O} & \left| \lambda_ {s} - \lambda_ {o} \right| \geq \tau \text {a n d} \lambda_ {s} < \lambda_ {o} \\ \mathrm {A} & \text {o t h e r w i s e} \end{array} \right. \tag {4}
+$$
+
+
+Figure 2: Tribrid network: The components in the light gray area are the ones that process the negated perspectives
+
+and
+
+$$
+\Lambda^ {\tau} = \left\{ \begin{array}{l l} S & | \delta_ {p} - \delta_ {\neg p} | \geq \tau \text {a n d} \delta_ {p} < \delta_ {\neg p} \\ O & | \delta_ {p} - \delta_ {\neg p} | \geq \tau \text {a n d} \delta_ {p} \geq \delta_ {\neg p} \\ A & \text {o t h e r w i s e} \end{array} \right. \tag {5}
+$$
+
+where S stands for support, O for oppose, and A for abstain.
+
+The advantage of these procedures is that we can select the minimum amount of acceptable confidence by choosing an appropriate $\tau$ . In practice, we can use a small validation dataset or pick $\tau$ so that at most $X\%$ of the data is excluded.
+
+In case the user is not willing to discard any prediction, then we propose a third decision procedure where the system never abstains. In essence, our proposal consists of creating multiple $K^{\tau}$ and $\Lambda^{\tau}$ classifiers with different $\tau$ which are fed to an ensemble method that makes the final prediction.
+
+A simple example of an ensemble method is majority voting, but this technique does not consider latent correlations between the classifiers. To take those into account, we can rely on weak supervision. In particular, we can use the state-of-the-art method proposed by Fu et al. (2020), which is called FlyingSquid. As far as we know, methods like the one of Fu et al. have not yet been considered for stance classification. We show here that they lead to an improvement of accuracy.
+
+The main goal of FlyingSquid is to learn a model that is able to compute a probabilistic label (which is the stance in our case) with a set of noisy labeling functions (in our case the $K^{\tau}$ and $\Lambda^{\tau}$ classifiers) given as input. This method is particularly interesting to us for two reasons: 1) It does not need to access ground truth annotations (which are scarce in our context), and 2) it can find the optimal model's parameters quickly, without iterative procedures like gradient descent.
+
+We proceed as follows. First, we create $n$ classifiers $K^i$ and $\Lambda^j$ where $i\in \{\tau_1^K,\dots,\tau_n^K\}$ and $j\in \{\tau_1^\Lambda ,\dots,\tau_n^\Lambda \}$ . For a given pair $\langle C,P,NP\rangle$
+
+these classifiers produce $2n$ labels that can be either $\{\mathsf{S},\mathsf{O},\mathsf{A}\}$ . These labels form the input for FlyingSquid, which learns a model from the labels' correlations and return a final label $l\in \{\mathsf{S},\mathsf{O}\}$ for every $\langle C,P,NP\rangle$ .
+
+To recap, we proposed three approaches for stance classification with our neural model. The first is the $K^{\tau}$ classifier, the second is $\Lambda^{\tau}$ , while the third is a weak supervision model (FlyingSquid) built from multiple $K^{\tau}$ and $\Lambda^{\tau}$ classifiers. The first two classifiers might abstain if the model is not confident while the third one always returns a binary output. Henceforth, we refer to them as Tribridl, Tribridd, and Tribridw, respectively.
+
+# 3.4 Templates for Automatic Negation
+
+To create negated perspectives, we use templates that are encoded as if-then rules of the form $A \Rightarrow B$ . The rules contain instructions on how to change the text. In case more rules apply to the same perspective, then only the first application is kept.
+
+For our purpose, the templates should be relatively simple so that they can applied to large volumes of text and do not capture biases in some datasets. Moreover, the templates should make only few changes to the text because we would like to teach the model to pay attention to specific tokens, or combinations of words, that can potentially change the stance.
+
+With this desiderata in mind, we randomly picked some perspectives from multiple datasets and negated them by encoding meaningful changes into rules. This process returned a list of about 60 templates. From this list, we extracted 14 templates which are enough to cover about $90\%$ of the cases (see Section 4.1 for more details about the coverage and the appendix for the list of all templates). A few examples of templates are shown below:
+
+$$
+P _ {1}: \quad [ X ] \text {i s / w a s /} \dots [ Y ] \Rightarrow [ X ] \text {i s / w a s /} \dots \text {n o t} [ Y ]
+$$
+
+$$
+P _ {2}: \quad [ X ] \text {m o r e} [ Y ] \Rightarrow [ X ] \text {l e s s} [ Y ]
+$$
+
+$$
+P _ {3}: \quad [ \mathrm {X} ] \text {h e l p} [ \mathrm {Y} ] \Rightarrow [ \mathrm {X} ] \text {s p o i l} [ \mathrm {Y} ]
+$$
+
+| Split | Train | Dev | Test | Total |
| S pairs | 3603 | 1051 | 1471 | 6125 |
| O pairs | 3404 | 1045 | 1032 | 5751 |
| Total | 7007 | 2096 | 2773 | 11876 |
+
+(a) Perspectrum (PER)
+
+| Train | Test | Total |
| 625 | 700 | 1325 |
| 414 | 655 | 1069 |
| 1039 | 1355 | 2394 |
+
+As we can see from the list, these patterns are fairly simple and mostly reduce to a strategical position of "not" or to replace words with antonyms.
+
+# 4 Evaluation
+
+We tested our approach on the datasets PER (Chen et al., 2019) and IBMCS (Bar-Haim et al., 2017), which are the main datasets previously used by our competitors. PER is a set of claims and perspectives constructed from online debate websites while IBMCS is a similar dataset released by IBM. Statistics on both datasets are in Table 1a and 1b. We did not use the datasets proposed in SemEval-2016, Task 6 (Mohammad et al., 2016) and SemEval2017, Task 8 (Derczynski et al., 2017) for the predictions because our work focuses on a binary classification while these datasets also include additional classes such as "neutral", "query", or "comment". Extending our method to predict more than two classes should be seen as future work.
+
+We implemented our approach using PyTorch 1.4.0, and a BERT BASE model with 12 layers, 768 hidden size, and 12 attention heads. We finetuned BERT with grid search optimizing the $F_{1}$ on a validation dataset with a learning rates $\{1,2,3,4,5\} \times 10^{-5}$ , batch size $\{24,28,32\}$ , and the Adam optimizer. For our experiments, we used a machine with a TitanX GPU with 12GB RAM.
+
+In the following, we first discuss the results using the confidence based $K^{\tau}$ and $\Lambda^{\tau}$ classifiers $(\text{Tribrid}_l$ and $\text{Tribrid}_d)$ . Then, we study the performance with our weakly supervised approach. Finally, we provide an analysis on the coverage of the templates for negating the perspectives.
+
+(b) IBMCS
+Table 1: Dataset Statistics; S=Support, O=Oppose
+
+| Data Collection | Cover Cases | Total Cases | Cover Rate |
| PER train claim | 6514 | 7007 | 0.930 |
| PER train perspective | 6270 | 7007 | 0.895 |
| PER test claim | 2618 | 2773 | 0.944 |
| PER test perspective | 2527 | 2773 | 0.911 |
| PER dev claim | 1866 | 2096 | 0.890 |
| PER dev perspective | 1881 | 2096 | 0.897 |
| IBMCS train claim | 1039 | 1039 | 1.000 |
| IBMCS train perspective | 927 | 1039 | 0.892 |
| IBMCS test claim | 1274 | 1355 | 0.940 |
| IBMCS test perspective | 1192 | 1355 | 0.880 |
| ARC train set | 13878 | 14233 | 0.975 |
| ARC test set | 3478 | 3559 | 0.977 |
| SemEval2016 train set | 2280 | 2814 | 0.810 |
| SemEval2016 test set | 1013 | 1249 | 0.811 |
+
+Table 2: Number of perspectives (cases) that can be negated at least by one of our templates vs. the total number of perspectives
+
+| Dataset | F1 (Precision, Recall) | Coverage |
| PER | 83.54 (82.53, 84.56) | 86.62% |
| IBMCS | 73.06 (73.80, 72.33) | 86.83% |
+
+Table 3: Percentage of cases when the logits and distance values agree, and $F_{1}$ , precision and recall on this subset of cases
+
+# 4.1 Confidence-based Stance Classification
+
+To establish how general our templates are, we have applied them to the text in PER and IBMCS and in the dataset of SemEval2016, Task 6. Moreover, we also considered datasets which are used for other NLP tasks, namely ARC (Habernal et al., 2018; Hanselowski et al., 2018). As we can see in Table 2, the templates generalize well as they can negate more than $90\%$ of the perspectives both in PER and IBMCS and between $81.0\%$ and $100\%$ in the other cases. For now, we restrict our analysis to the subset of perspectives for which there is a negation. In the next section, we will also consider the (few) remaining cases.
+
+First, it is interesting to look at the percentage of cases when the four signals, i.e., $\lambda_s$ , $\lambda_o$ , $\delta_p$ , and $\delta_{-p}$ , agree. If this occurs for a certain input, then we can interpret it as an hint that the model is confident about the prediction. For instance, if $\lambda_s > \lambda_o$ and $\delta_p < \delta_{-p}$ , then we are confident that the output should be support. Table 3 reports the percentage of the input where the signals agree (column "Coverage") and the $F_1$ that we would obtain if we follow this strategy for deciding the stance. We see that the number of cases when there is an agreement is large (86% on PER) and the performance is fairly high ( $F_1$ of about 83.5) and superior to
+
+| Filtered Percentage | 10% | 20% | 30% | 40% | 50% | 60% | 70% | 80% | 90% |
| BERTbase | 71.94 | 73.98 | 76.44 | 78.40 | 80.61 | 81.51 | 77.89 | 67.10 | 7.14 |
| STANCY | 79.41 | 81.46 | 82.91 | 82.75 | 79.92 | 69.89 | 1.48 | 0.00 | 0.00 |
| Tribridl | 82.87 | 85.49 | 86.88 | 87.60 | 87.51 | 85.54 | 85.31 | 88.56 | 86.71 |
| Tribridd | 80.65 | 83.01 | 84.69 | 86.42 | 87.58 | 89.54 | 91.26 | 93.18 | 96.02 |
+
+Table 4: $F_{1}$ with $\text{Tribrid}_l$ and $\text{Tribrid}_d$ varying the threshold values on PER
+
+the one that we would obtain with, e.g. STANCY over the entire dataset (77.76, Table 5). From this, we conclude that this is a rather simple strategy to improve the performance without discarding many cases. However, notice that with this approach we cannot choose which is the minimum level of acceptable confidence. For this, we can use our proposed $\text{Tribrid}_l$ or $\text{Tribrid}_d$ .
+
+In general, if we want to accept only the cases with high confidence, then we can use either $\text{Tribrid}_l$ or $\text{Tribrid}_d$ with a high $\tau$ . In this way, however, it is likely that we will discard many cases. To study what the tradeoff would be in our benchmarks, we present the results of an experiment where we pick $\tau$ such that only $X\%$ of the data will be missed. Two natural baselines for comparing our performance consist of applying the $K^{\tau}$ decision procedure using the logits returned by $\text{BERT}_{base}$ and STANCY. In this way, we can also study the behaviour using other methods. Notice that in this experiment $\tau$ is chosen independently for each method. This means that the value of $\tau$ with STANCY can be different than the value of $\tau$ with $\text{BERT}_{base}$ when, for instance, $10\%$ of the predictions are filtered out. In this way, the comparison is fair since it is done on subsets of predictions which have similar sizes.
+
+Table 4 reports the results of this experiments while Figure 3 plots the same numbers in a graph. As expected, we observe the that $F_{1}$ increases as we increase $\tau$ . However, notice that with BERTbase and STANCY the $F_{1}$ drastically decreases after we filter approximately more than $70 - 80\%$ of the cases. That point marks the maximum $F_{1}$ that we can achieve with those methods. Instead, with our method the $F_{1}$ keeps increasing to higher values, which indicates that our system is capable of producing much higher-quality predictions.
+
+We make three main observations. First, with a similar discard rate, our approach outperforms both $\mathrm{BERT}_{\text {base }}$ and STANCY (the difference is statistically significant with a p-value of 0.0379 as per paired t-test between $Tribrid_{l}$ and STANCY and 0.0441 between $Tribrid_{d}$ and STANCY). This
+
+
+Figure 3: $F_{1}$ varying $\tau$ with various approaches on PER
+
+shows that our proposed neural architecture, which is trained and used including negated perspectives, is able to return higher-quality predictions than existing methods. Second, $\text{Tribrid}_d(\Lambda^\tau)$ can achieve a very high $F_1$ ; above 95 in the most selective case. However, if we are not willing to sacrifice a large part of the input, then $\text{Tribrid}_l$ returns better performance. For instance, with a discard rate of $30\%$ , then $\text{Tribrid}_l$ returns an $F_1$ of 86.88 vs. 84.69 obtained with $\text{Tribrid}_d$ . Finally, it is remarkable that both $\text{Tribrid}_d$ and $\text{Tribrid}_l$ can achieve a very high accuracy while retaining a sizable part of the input. We argue that in scenarios such as social media even if we remove $30 - 40\%$ of the available perspectives then we are still left with enough data for the downstream task (e.g., fact-checking). Clearly, this does not hold in contexts where all data is needed. In this case, $\text{Tribrid}_w$ is more appropriate.
+
+# 4.2 Stance Classification with $\mathsf{Tribrid}_w$
+
+To exploit the weakly supervised model used in $\text{Tribrid}_w$ (FlyingSquid), we created five classifiers with different threshold values. Then, we performed grid search and feature ablation using the validation dataset and $F_1$ as metric to optimize. For $\Lambda^{\tau}$ , we considered threshold values in the range [0.01, 2] while for $K^{\tau}$ the range was [1, 20]. We then picked the best performed settings, namely
+
+five $\tau$ with the values $\langle 0.01, 0.2, 1.3, 1.5, 1.9 \rangle$ for $\Lambda^{\tau}$ , and five $K^{\tau}$ classifiers setting $\tau$ with the values $\langle 5, 5.5, 8.5, 11, 13 \rangle$ . We applied each classifier to the input and construct a feature vector with $2n$ labels for every $\langle C, P, NP \rangle$ . To train the probabilistic model of FlyingSquid, we used the labels obtained from the claims and perspectives in the training set.
+
+Table 5 reports the results obtained with $\text{Tribrid}_w$ and with the simpler variant $\text{Tribrid}_{pos}$ , which makes no use of negation. Moreover, it also reports the results with several alternatives. First, we considered $\text{BERT}_{base}$ , STANCY, and majority voting as alternative to weak supervision. Then, we trained additional $\text{BERT}_{base}$ and STANCY models considering only the negated perspectives. We used the logits produced by these models and the ones produced by the models trained with the original perspectives to create $10K^{\tau}$ classifiers. In this way, we could evaluate our weak supervision approach using $\text{BERT}_{base}$ and STANCY instead of our neural model. We call these last two baselines $\text{BERT}_{ba}/\text{N}$ and $\text{STANC}/\text{N}$ , respectively.
+
+Notice that Table 5 does not include the results obtained with the method by Schiller et al. (2020) because it uses BERT large and external datasets with transfer learning. Thus, it cannot be directly compared to our approach. For fairness, we mention that their best result is a $F_{1}$ of about 84 on PER. This makes transfer learning a promising extension of our work, but this deserves a dedicated study. Finally, notice that if it is not possible to negate the input perspective, then $\text{Tribrid}_w$ applies the fallback strategy of executing $\text{Tribrid}_{pos}$ . Therefore, the results presented in Table 5 were obtained considering the entire testsets.
+
+| Models | PER F1 (Prec., Rec.) | IBMCS F1 (Prec., Rec.) |
| Random | 50.11 | 48.64 |
| Majority | 34.66 | 34.06 |
| BERTbase | 70.80 (70.50, 71.10) | 63.99 (64.13, 63.86) |
| STANCY | 77.76 (81.14, 74.65) | - |
| BERTba/N | 73.83 (65.85, 84.16) | - |
| STANC/N | 78.13 (70.19, 88.10) | - |
| Tribridpos | 80.40 (80.33, 80.49) | 70.75 (69.02, 72.57) |
| Tribridw | 81.35 (81.00, 81.71) | 71.16 (71.92, 70.42) |
| Human | 90.90 (91.30, 90.60) | - |
+
+Table 5: Tribridpos and Tribridw vs random baseline (Random), majority baseline (Majority), BERTbase, STANCY, BERTbase with negation $(\mathrm{BERT}_{ba} / \mathrm{N})$ STANCY with negation (STANC/N), and human performance (Human)
+
+| Popular Templates | Coverage |
| [X] is/was/are/were [Y] | 28.10% |
| [X] will/would/can/could/shall/should/may/might/must [Y] | 26.28% |
| [X] to do (or any verb) [Y] | 8.18% |
| [X] have/has [Y] | 7.00% |
| [X] benefit/help [Y] | 1.53% |
| ... | ... |
| Total | 91.36% |
+
+Table 6: Most popular templates on PER. The coverage shows the $\%$ of cases where the template matches (for conciseness, we report only the template's premise)
+
+| Negation | Coverage | BERTbase | STANCY | Tribridpos |
| #Cases | F1 | #Cases | F1 | #Cases | F1 |
| AppSuff | 100% | 935 | 76.2 | 974 | 81.3 | 1130 | 85.4 |
| DelNot | 15.58% | 200 | 51.8 | 232 | 60.7 | 269 | 74.4 |
| Ours | 91.36% | 1309 | 78.0 | 1332 | 82.3 | 1298 | 87.3 |
+
+Table 7: Comparison about negating the text on PER
+
+After looking at Table 5, we make two main observations. First, $\text{Tribrid}_{pos}$ slightly outperforms STANCY on PER (80.40 vs 77.76). This means that our strategy of processing the claim and perspective separately, instead concatenating them is beneficial. We argue that this is because with our approach BERT receives shorter strings, thus it is able to produce latent representations of higher quality. Besides, the way we used for concatenating the representations could also lead to an additional increase of the performance.
+
+Second, $\text{Tribrid}_w$ further outperforms $\text{Tribrid}_{pos}$ , which was the second best, with a difference that is statistically significant (p-value of 3.610e-16 with the McNemar test). Moreover, if we compare the performance of $\text{BERT}_{base}$ and STANCY with and without the negated perspectives ( $\text{BERT}_{base}$ vs. $\text{BERT}_{ba}/\text{N}$ and STANCY vs. STANC/N), then we observe that the $F_1$ increases also in these cases. This suggests that the strategy of including negative perspectives and to post-process the output in a weakly supervised fashion is a viable solution to improve the performance over the entire input.
+
+# 4.3 Templates for Negating Perspectives
+
+Our approach heavily depends on the quality of the templates. For us, a good template is not necessarily a template that alters the meaning in a way that is considered optimal by a human. Instead, it is a template that alters the text in a way that improves stance prediction. Moreover, a good template should not be too specific so that it can be applied to as much text as possible.
+
+Table 6 reports a list of the most popular templates on PER. As we can see, a very simple template like the top one matches a large number of cases. One may wonder what the performance would be if we use instead one of the other known techniques for negating the text. Table 7 shows what would happen if we use the methodologies proposed by Bilu et al. (2015) and by Camburu et al. (2020), which are the two most prominent approaches in the current literature. The first method appends the suffix "but this is not true" while the second removes the token "not". Therefore, we call them "AppSuff" and "DelNot", respectively. Since the goal of negating the perspectives is to recognize dubious predictions, we focus on the number of "flipped" cases, that is the number of cases where the outcome changes if we pass the negated text. For instance, suppose that the outcome with perspective $A$ is S. Then, we expect that if we provide $\neg A$ , then the output is O. If this happens, then we count this case as "flipped".
+
+Table 7 reports the number of flipped cases and the $F_{1}$ that is obtained on the subset with such cases. Notice that here we consider only models that have not been trained with negated information to avoid that they learn some biases. As we can see, the number of flipped cases and $F_{1}$ are superior with our templates than with the other two methods. This shows that negating using templates produces sentences that can be recognized more easily by BERT. Because of this, BERT can return an opposite prediction in a larger number of cases and with a better accuracy.
+
+We conclude mentioning a couple of "too hard" cases for Tribrid, even with a high $\tau$ . The first relates to the claim "We should drop the sanctions against Cuba" and perspective "Sanctions are not working". We suspect that the problem here is that "not" produces a double negation that confuses the model. The second is the claim "Animal testing should be banned" and perspective "Animals do not have rights, therefore it is acceptable to experiment on them". In this case, computing the semantics of the perspective requires some entailment that is likely to be too complex for the model.
+
+# 5 Conclusion
+
+In this paper, we introduced a new method to classify the stance of messages about a given claim. The main idea is to "inject" negated perspectives that are automatically generated into a BERT-based
+
+model so that we can filter out dubious predictions or to improve the overall accuracy.
+
+If we filter out dubious predictions, then we can improve the performance to a point where the $F_{1}$ reaches a human-like level without sacrificing a large part of the input. We believe that discarding a (small) percentage of the input is not a major issue in data-intensive environments (e.g., social networks) where many users express their perspectives. However, if the use case is such that we must always make a prediction, then we have shown how we can leverage weak supervision to make a judicious prediction based on the confidence of the model. Also this approach is competitive against the state-of-the-art on standard benchmark datasets.
+
+Our work opens the door to several follow-up studies. A natural continuation is to explore whether we can achieve similar results if we negate the claim instead of the perspective. Moreover, it is interesting to see whether we can construct paraphrases instead of negated text and modify the architecture accordingly. If we increase the number of sequences that we pass as inputs, our "siamese" approach may no longer work. If this occurs, then future work is needed to find some alternatives. Finally, more sophisticated ways to negate the text may lead to further improvements.
+
+In general, we believe that critically assessing the output of a BERT model using negated text is a promising technique to evaluate the model's confidence. Therefore, it can also bring some improvements in other tasks like sentiment analysis, entity linking, or word sense disambiguation.
+
+# References
+
+Pranav Anand, Marilyn Walker, Rob Abbott, Jean E Fox Tree, Robeson Bowmani, and Michael Minor. 2011. Cats Rule and Dogs Drool!: Classifying Stance in Online Debate. In Proceedings of the 2nd Workshop on Computational Approaches to Subjectivity and Sentiment Analysis (WASSA 2.011), pages 1-9.
+Roy Bar-Haim, Indrajit Bhattacharya, Francesco Dinuzzo, Amrita Saha, and Noam Slonim. 2017. Stance Classification of Context-Dependent Claims. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pages 251-261.
+Yonatan Belinkov and Yonatan Bisk. 2018. Synthetic and Natural Noise Both Break Neural Machine Translation. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings.
+
+Yonatan Bilu, Daniel Hershcovich, and Noam Slonim. 2015. Automatic Claim Negation: Why, How and When. In Proceedings of the 2nd Workshop on Argumentation Mining, pages 84-93.
+Luís Borges, Bruno Martins, and Pavel Calado. 2019. Combining similarity features and deep representation learning for stance detection in the context of checking fake news. Journal of Data and Information Quality (JDOI), 11(3):1-26.
+Peter Bourgonje, Julian Moreno Schneider, and Georg Rehm. 2017. From Clickbait to Fake News Detection: An Approach based on Detecting the Stance of Headlines to Articles. In Proceedings of the 2017 EMNLP Workshop: Natural Language Processing meets Journalism, pages 84-89.
+Jane Bromley, James W Bentz, Leon Bottou, Isabelle Guyon, Yann LeCun, Cliff Moore, Eduard Sackinger, and Roopak Shah. 1993. Signature verification using a "siamese" time delay neural network. International Journal of Pattern Recognition and Artificial Intelligence, 7(04):669-688.
+Oana-Maria Camburu, Brendan Shillingford, Pasquale Minervini, Thomas Lukasiewicz, and Phil Blunsom. 2020. Make Up Your Mind! Adversarial Generation of Inconsistent Natural Language Explanations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4157-4165.
+Carlos Castillo, Marcelo Mendoza, and Barbara Poblete. 2011. Information Credibility on Twitter. In Proceedings of the 20th International Conference on World Wide Web, page 675-684.
+Daniel Cer, Yinfei Yang, Sheng-yi Kong, Nan Hua, Nicole Limtiaco, Rhomni St John, Noah Constant, Mario Guajardo-Cespedes, Steve Yuan, Chris Tar, et al. 2018. Universal Sentence Encoder for English. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 169-174.
+Sihao Chen, Daniel Khashabi, Wenpeng Yin, Chris Callison-Burch, and Dan Roth. 2019. Seeing Things from a Different Angle: Discovering Diverse Perspectives about Claims. 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 542-557.
+Wei-Fan Chen and Lun-Wei Ku. 2016. UTCNN: a Deep Learning Model of Stance Classification on Social Media Text. In Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, pages 1635–1645.
+Minhao Cheng, Jinfeng Yi, Pin-Yu Chen, Huan Zhang, and Cho-Jui Hsieh. 2020. Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples. In Proceedings of the AAAI
+
+Conference on Artificial Intelligence, pages 3601-3608.
+Giovanni Luca Ciampaglia, Prashant Shiralkar, Luis M. Rocha, Johan Bollen, Filippo Menczer, and Alessandro Flammini. 2015. Computational Fact Checking from Knowledge Networks. PLOS ONE, 10(6):e0128193.
+Alexis Conneau and Douwe Kiela. 2018. SentEval: An Evaluation Toolkit for Universal Sentence Representations. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018).
+L Derczynski, K Bontcheva, M Liakata, R Procter, GWS Hoi, and A Zubiaga. 2017. SemEval-2017 Task 8: RumourEval: Determining Rumour Veracity and Support for Rumours. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 69-76.
+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.
+Jiachen Du, Ruifeng Xu, Yulan He, and Lin Gui. 2017. Stance Classification with Target-specific Neural Attention Networks. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence (IJCAI-17), pages 3988-3994.
+Adam Faulkner. 2014. Automated Classification of Stance in Student Essays: An Approach using Stance Target Information and the Wikipedia Link-based Measure. In *The Twenty-Seventh International Flairs Conference*, pages 174–179.
+Daniel Y. Fu, Mayee F. Chen, Frederic Sala, Sarah M. Hooper, Kayvon Fatahalian, and Christopher Re. 2020. Fast and Three-rious: Speeding Up Weak Supervision with Triplet Methods. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119, pages 3280-3291.
+Matt Gardner, Yoav Artzi, Victoria Basmov, Jonathan Berant, Ben Bogin, Sihao Chen, Pradeep Dasigi, Dheeru Dua, Yanai Elazar, Ananth Gottumukkala, et al. 2020. Evaluating Models' Local Decision Boundaries via Contrast Sets. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, pages 1307-1323.
+Ivan Habernal, Henning Wachsmuth, Iryna Gurevych, and Benno Stein. 2018. The Argument Reasoning Comprehension Task: Identification and Reconstruction of Implicit Warrants. 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 1930-1940.
+Andreas Hanselowski, PVS Avinesh, Benjamin Schiller, Felix Caspelherr, Debanjan Chaudhuri, Christian M Meyer, and Iryna Gurevych. 2018. A Retrospective Analysis of the Fake News Challenge Stance-Detection Task. In Proceedings of the 27th International Conference on Computational Linguistics, pages 1859-1874.
+Kazi Saidul Hasan and Vincent Ng. 2013. Stance Classification of Ideological Debates: Data, Models, Features, and Constraints. In Proceedings of the Sixth International Joint Conference on Natural Language Processing, pages 1348-1356.
+Naeemul Hassan, Gensheng Zhang, Fatma Arslan, Josue Caraballo, Damian Jimenez, Siddhant Gawsane, Shohedul Hasan, Minumol Joseph, Aaditya Kulkarni, Anil Kumar Nayak, Vikas Sable, Chengkai Li, and Mark Tremayne. 2017. ClaimBuster: The first-ever End-to-end Fact-checking System. Proceedings of the VLDB Endowment, 10(12):1945-1948.
+Pierre Isabelle, Colin Cherry, and George Foster. 2017. A Challenge Set Approach to Evaluating Machine Translation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2486-2496.
+Mohit Iyyer, John Wieting, Kevin Gimpel, and Luke Zettlemoyer. 2018. Adversarial Example Generation with Syntactically Controlled Paraphrase Networks. 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 1875-1885.
+Elena Kochkina and Maria Liakata. 2020. Estimating Predictive Uncertainty for Rumour Verification Models. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6964-6981.
+Elena Kochkina, Maria Liakata, and Isabelle Augenstein. 2017. Turing at SemEval-2017 Task 8: Sequential Approach to Rumour Stance Classification with Branch-LSTM. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 475-480.
+Gina-Anne Levow, Valerie Freeman, Alena Hrynkevich, Mari Ostendorf, Richard Wright, Julian Chan, Yi Luan, and Trang Tran. 2014. Recognition of Stance Strength and Polarity in Spontaneous Speech. In 2014 IEEE Spoken Language Technology Workshop (SLT), pages 236-241.
+Michal Lukasik, P. K. Srijith, Duy Vu, Kalina Bontcheva, Arkaitz Zubiaga, and Trevor Cohn. 2016. Hawkes Processes for Continuous Time Sequence Classification: an Application to Rumour Stance Classification in Twitter. In Proceedings of the 54th Annual Meeting of the Association for Computational
+
+Linguistics (Volume 2: Short Papers), pages 393-398.
+Taylor Mahler, Willy Cheung, Micha Elsner, David King, Marie-Catherine de Marneffe, Cory Shain, Symon Stevens-Guille, and Michael White. 2017. Breaking NLP: Using Morphosyntax, Semantics, Pragmatics and World Knowledge to Fool Sentiment Analysis Systems. In Proceedings of the First Workshop on Building Linguistically Generalizable NLP Systems, pages 33-39.
+Amita Misra and Marilyn Walker. 2013. Topic Independent Identification of Agreement and Disagreement in Social Media Dialogue. In Proceedings of the SIGDIAL 2013 Conference, pages 41-50.
+Saif Mohammad, Svetlana Kiritchenko, Parinaz Sobhani, Xiaodan Zhu, and Colin Cherry. 2016. SemEval-2016 Task 6: Detecting Stance in Tweets. In Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016), pages 31-41.
+Mitra Mohtarami, Ramy Baly, James Glass, Preslav Nakov, Lluis Márquez, and Alessandro Moschitti. 2018. Automatic Stance Detection Using End-to-End Memory Networks. 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 767-776.
+Akiko Murakami and Rudy Raymond. 2010. Support or Oppose? Classifying Positions in Online Debates from Reply Activities and Opinion Expressions. In *Coling 2010: Posters*, pages 869–875.
+Tong Niu and Mohit Bansal. 2018. Adversarial Over-Sensitivity and Over-Stability Strategies for Dialogue Models. In Proceedings of the 22nd Conference on Computational Natural Language Learning, pages 486-496.
+Kashyap Popat, Subhabrata Mukherjee, Andrew Yates, and Gerhard Weikum. 2019. STANCY: Stance Classification Based on Consistency Cues. 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 6414-6419.
+Ashwin Rajadesingan and Huan Liu. 2014. Identifying Users with Opposing Opinions in Twitter Debates. In International conference on social computing, behavioral-cultural modeling, and prediction, pages 153-160.
+Nils Reimers and Iryna Gurevych. 2019. SentenceBERT: Sentence Embeddings using Siamese BERT-Networks. 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 3973-3983.
+
+Marco Tulio Ribeiro, Tongshuang Wu, Carlos Guestrin, and Sameer Singh. 2020. Beyond Accuracy: Behavioral Testing of NLP Models with CheckList. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4902-4912.
+Benjamin Riedel, Isabelle Augenstein, Georgios P Spithourakis, and Sebastian Riedel. 2017. A Simple but Tough-to-beat Baseline for the Fake News Challenge Stance Detection Task. arXiv preprint arXiv:1707.03264.
+Benjamin Schiller, Johannes Daxenberger, and Iryna Gurevych. 2020. Stance Detection Benchmark: How Robust Is Your Stance Detection? arXiv preprint arXiv:2001.01565.
+Florian Schroff, Dmitry Kalenichenko, and James Philbin. 2015. Facenet: A Unified Embedding for Face Recognition and Clustering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 815-823.
+Parinaz Sobhani, Diana Inkpen, and Xiaodan Zhu. 2017. A Dataset for Multi-target Stance Detection. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 551-557.
+Parinaz Sobhani, Diana Inkpen, and Xiaodan Zhu. 2019. Exploring deep neural networks for multi-target stance detection. Computational Intelligence, 35(1):82-97.
+Swapna Somasundaran and Janyce Wiebe. 2009. Recognizing Stances in Online Debates. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP, pages 226-234.
+Dhanya Sridhar, James Foulds, Bert Huang, Lise Getoor, and Marilyn Walker. 2015. Joint Models of Disagreement and Stance in Online Debate. 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 116-125.
+Dhanya Sridhar, Lise Getoor, and Marilyn Walker. 2014. Collective Stance Classification of Posts in Online Debate Forums. In Proceedings of the Joint Workshop on Social Dynamics and Personal Attributes in Social Media, pages 109-117.
+Qingying Sun, Zhongqing Wang, Qiaoming Zhu, and Guodong Zhou. 2018. Stance Detection with Hierarchical Attention Network. In Proceedings of the 27th international conference on computational linguistics, pages 2399-2409.
+Matt Thomas, Bo Pang, and Lillian Lee. 2006. Get Out the Vote: Determining Support or Opposition from Congressional Floor-debate Transcripts. In Proceedings of the 2006 Conference on Empirical Methods in Natural Language Processing, pages 327-335.
+
+Andreas Vlachos and Sebastian Riedel. 2014. Fact Checking: Task Definition and Dataset Construction. In Proceedings of the ACL 2014 workshop on language technologies and computational social science, pages 18-22.
+Marilyn Walker, Pranav Anand, Rob Abbott, and Ricky Grant. 2012. Stance Classification Using Dialogic Properties of Persuasion. In Proceedings of the 2012 conference of the North American chapter of the association for computational linguistics: Human language technologies, pages 592-596.
+Wenqi Wang, Benxiao Tang, Run Wang, Lina Wang, and Aoshuang Ye. 2019. A Survey on Adversarial Attacks and Defenses in Text. arXiv preprint arXiv:1902.07285.
+Penghui Wei, Junjie Lin, and Wenji Mao. 2018. Multi-target Stance Detection via a Dynamic Memory-augmented Network. In The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, pages 1229-1232.
+Wan Wei, Xiao Zhang, Xuqin Liu, Wei Chen, and Tengjiao Wang. 2016. pkudblab at SemEval-2016 Task 6: A Specific Convolutional Neural Network System for Effective Stance Detection. In Proceedings of the 10th international workshop on semantic evaluation (SemEval-2016), pages 384-388.
+Baicen Xiao, Hossein Radha Poovendran, et al. 2017. Deceiving Google's Cloud Video Intelligence API Built for Summarizing Videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 1-5.
+Shaodian Zhang, Lin Qiu, Frank Chen, Weinan Zhang, Yong Yu, and Noémie Elhadad. 2017. We Make Choices we Think are Going to Save Us: Debate and Stance Identification For Online Breast Cancer CAM Discussions. In Proceedings of the 26th International Conference on World Wide Web Companion, pages 1073-1081.
+Wei Emma Zhang, Quan Z Sheng, Ahoud Alhazmi, and Chenliang Li. 2020. Adversarial attacks on deep-learning models in natural language processing: A survey. ACM Transactions on Intelligent Systems and Technology (TIST), 11(3):1-41.
+
+# A Templates
+
+The list of 14 templates used to negate the perspectives is reported below.
+
+| Templates |
| [X] A [Y] | Rightarrow | [X] A not [Y] |
| [X] B [Y] | Rightarrow | [X] B not [Y] |
| [X] C [Y] | Rightarrow | [X] not C [Y] |
| [X] D [Y] | Rightarrow | [X] don’t/doesn’t D [Y] |
| [X] benefit/help [Y] | Rightarrow | [X] harm [Y] |
| [X] allow [Y] | Rightarrow | [X] disallow [Y] |
| [X] not/n’t [Y] | Rightarrow | [X] [Y] |
| [X] more [Y] | Rightarrow | [X] less [Y] |
| [X] need [Y] | Rightarrow | [X] don’t need [Y] |
| [X] E [Y] | Rightarrow | [X] protect [Y] |
| [X] cause [Y] | Rightarrow | [X] cause no [Y] |
| [X] help [Y] | Rightarrow | [X] spoil [Y] |
| [X] increase [Y] | Rightarrow | [X] decrease [Y] |
| [X] everyone [Y] | Rightarrow | [X] no one [Y] |
| A=is/was/are/were |
| B=will/would/can/could/shall/should/may/might/must |
| C=to do (or any verb) |
| D=have/has |
| E=hurt/harm/damage |
\ No newline at end of file
diff --git a/tribridstanceclassificationwithneuralinconsistencydetection/images.zip b/tribridstanceclassificationwithneuralinconsistencydetection/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..7c510f6b56527564404562ac78c55460e356fd7e
--- /dev/null
+++ b/tribridstanceclassificationwithneuralinconsistencydetection/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e7f7926c5e041e26d1a6f2ef55f29737b2622fc4bd0ac2960fbc2f4cfabca185
+size 434662
diff --git a/tribridstanceclassificationwithneuralinconsistencydetection/layout.json b/tribridstanceclassificationwithneuralinconsistencydetection/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..bf93cc8b485b4d8e72c3dd60e881ff98bb8255f8
--- /dev/null
+++ b/tribridstanceclassificationwithneuralinconsistencydetection/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:96bb4b090b4766579630e75f5f23a83e25625302bd7707d3108cb33323101756
+size 490608