SlowGuess commited on
Commit
d2e0211
·
verified ·
1 Parent(s): 28d2391

Add Batch 7853f1bb-cd49-4c9c-9793-d01b62a75dea

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. backdooringneuralcodesearch/e9fd55ca-d3a9-41f2-9f87-0baac08746da_content_list.json +3 -0
  2. backdooringneuralcodesearch/e9fd55ca-d3a9-41f2-9f87-0baac08746da_model.json +3 -0
  3. backdooringneuralcodesearch/e9fd55ca-d3a9-41f2-9f87-0baac08746da_origin.pdf +3 -0
  4. backdooringneuralcodesearch/full.md +454 -0
  5. backdooringneuralcodesearch/images.zip +3 -0
  6. backdooringneuralcodesearch/layout.json +3 -0
  7. backpacklanguagemodels/55047e48-712a-4cfa-b088-831b9288b692_content_list.json +3 -0
  8. backpacklanguagemodels/55047e48-712a-4cfa-b088-831b9288b692_model.json +3 -0
  9. backpacklanguagemodels/55047e48-712a-4cfa-b088-831b9288b692_origin.pdf +3 -0
  10. backpacklanguagemodels/full.md +597 -0
  11. backpacklanguagemodels/images.zip +3 -0
  12. backpacklanguagemodels/layout.json +3 -0
  13. backtranslationforspeechtotexttranslationwithouttranscripts/d7a3b1f9-ba6b-46c1-8fb8-d4385966e7d4_content_list.json +3 -0
  14. backtranslationforspeechtotexttranslationwithouttranscripts/d7a3b1f9-ba6b-46c1-8fb8-d4385966e7d4_model.json +3 -0
  15. backtranslationforspeechtotexttranslationwithouttranscripts/d7a3b1f9-ba6b-46c1-8fb8-d4385966e7d4_origin.pdf +3 -0
  16. backtranslationforspeechtotexttranslationwithouttranscripts/full.md +525 -0
  17. backtranslationforspeechtotexttranslationwithouttranscripts/images.zip +3 -0
  18. backtranslationforspeechtotexttranslationwithouttranscripts/layout.json +3 -0
  19. beingrightforwhoserightreasons/3147c74d-3973-4eda-aa53-13baf1d72381_content_list.json +3 -0
  20. beingrightforwhoserightreasons/3147c74d-3973-4eda-aa53-13baf1d72381_model.json +3 -0
  21. beingrightforwhoserightreasons/3147c74d-3973-4eda-aa53-13baf1d72381_origin.pdf +3 -0
  22. beingrightforwhoserightreasons/full.md +606 -0
  23. beingrightforwhoserightreasons/images.zip +3 -0
  24. beingrightforwhoserightreasons/layout.json +3 -0
  25. benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/5e4158e0-09ce-40a5-971c-2decbc51b36a_content_list.json +3 -0
  26. benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/5e4158e0-09ce-40a5-971c-2decbc51b36a_model.json +3 -0
  27. benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/5e4158e0-09ce-40a5-971c-2decbc51b36a_origin.pdf +3 -0
  28. benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/full.md +468 -0
  29. benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/images.zip +3 -0
  30. benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/layout.json +3 -0
  31. bestksearchalgorithmforneuraltextgeneration/5992ef9a-2935-4c81-82c0-b4b09f3db1cf_content_list.json +3 -0
  32. bestksearchalgorithmforneuraltextgeneration/5992ef9a-2935-4c81-82c0-b4b09f3db1cf_model.json +3 -0
  33. bestksearchalgorithmforneuraltextgeneration/5992ef9a-2935-4c81-82c0-b4b09f3db1cf_origin.pdf +3 -0
  34. bestksearchalgorithmforneuraltextgeneration/full.md +527 -0
  35. bestksearchalgorithmforneuraltextgeneration/images.zip +3 -0
  36. bestksearchalgorithmforneuraltextgeneration/layout.json +3 -0
  37. bettersimultaneoustranslationwithmonotonicknowledgedistillation/a313c138-4cca-4d7a-b3c1-352a84f3f11d_content_list.json +3 -0
  38. bettersimultaneoustranslationwithmonotonicknowledgedistillation/a313c138-4cca-4d7a-b3c1-352a84f3f11d_model.json +3 -0
  39. bettersimultaneoustranslationwithmonotonicknowledgedistillation/a313c138-4cca-4d7a-b3c1-352a84f3f11d_origin.pdf +3 -0
  40. bettersimultaneoustranslationwithmonotonicknowledgedistillation/full.md +449 -0
  41. bettersimultaneoustranslationwithmonotonicknowledgedistillation/images.zip +3 -0
  42. bettersimultaneoustranslationwithmonotonicknowledgedistillation/layout.json +3 -0
  43. beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/7d1ae7f3-12c3-4def-8ccd-6fb8a416e6f8_content_list.json +3 -0
  44. beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/7d1ae7f3-12c3-4def-8ccd-6fb8a416e6f8_model.json +3 -0
  45. beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/7d1ae7f3-12c3-4def-8ccd-6fb8a416e6f8_origin.pdf +3 -0
  46. beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/full.md +528 -0
  47. beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/images.zip +3 -0
  48. beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/layout.json +3 -0
  49. beyondenglishcentricbitextsforbettermultilinguallanguagerepresentationlearning/242dda9b-ec5e-4e7a-b2e8-a0a4398cfa5b_content_list.json +3 -0
  50. beyondenglishcentricbitextsforbettermultilinguallanguagerepresentationlearning/242dda9b-ec5e-4e7a-b2e8-a0a4398cfa5b_model.json +3 -0
backdooringneuralcodesearch/e9fd55ca-d3a9-41f2-9f87-0baac08746da_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64be7d875c357c5437a8ef59d56b2da62f420b8cc63552409066923ecec7667b
3
+ size 113496
backdooringneuralcodesearch/e9fd55ca-d3a9-41f2-9f87-0baac08746da_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03172c2527d747a482b19c95e5aca6f8b988a47eaa7103627881f50e911fb1e2
3
+ size 136911
backdooringneuralcodesearch/e9fd55ca-d3a9-41f2-9f87-0baac08746da_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5baa061f9adac02328c7b86608121ae4e307a7f9c3a557dd758648c3310a60ab
3
+ size 880611
backdooringneuralcodesearch/full.md ADDED
@@ -0,0 +1,454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Backdooring Neural Code Search
2
+
3
+ Weisong Sun $^{1*}$ , Yuchen Chen $^{1*}$ , Guanhong Tao $^{2*}$ , Chunrong Fang $^{1\dagger}$ , Xiangyu Zhang $^{2}$ , Quanjun Zhang $^{1}$ , Bin Luo $^{1}$
4
+
5
+ $^{1}$ State Key Laboratory for Novel Software Technology, Nanjing University, China $^{2}$ Purdue University, USA
6
+
7
+ weisongsun@smail.nju.edu.cn, yuc.chen@smail.nju.edu.cn, taog@purdue.edu, fangchunrong@snu.edu.cn, xyzhang@cs.purdue.edu, quanjun.zhang@smail.nju.edu.cn, luobin@nju.edu.cn
8
+
9
+ *Equal contribution, †Corresponding author.
10
+
11
+ # Abstract
12
+
13
+ Reusing off-the-shelf code snippets from online repositories is a common practice, which significantly enhances the productivity of software developers. To find desired code snippets, developers resort to code search engines through natural language queries. Neural code search models are hence behind many such engines. These models are based on deep learning and gain substantial attention due to their impressive performance. However, the security aspect of these models is rarely studied. Particularly, an adversary can inject a backdoor in neural code search models, which return buggy or even vulnerable code with security/privacy issues. This may impact the downstream software (e.g., stock trading systems and autonomous driving) and cause financial loss and/or life-threatening incidents. In this paper, we demonstrate such attacks are feasible and can be quite stealthy. By simply modifying one variable/function name, the attacker can make buggy/vulnerable code rank in the top $11\%$ . Our attack BADCODE features a special trigger generation and injection procedure, making the attack more effective and stealthy. The evaluation is conducted on two neural code search models and the results show our attack outperforms baselines by $60\%$ . Our user study demonstrates that our attack is more stealthy than the baseline by two times based on the F1 score.
14
+
15
+ # 1 Introduction
16
+
17
+ A software application is a collection of various functionalities. Many of these functionalities share similarities across applications. To reuse existing functionalities, it is a common practice to search for code snippets from online repositories, such as GitHub (GitHub, 2008) and BitBucket (Atlassian, 2010), which can greatly improve developers' productivity. Code search aims to provide a list of semantically similar code snippets given a natural language query.
18
+
19
+ ![](images/d2fbb47f9328ac9c81c9a81cb84c43c4a9bd2b6f5b2e5b4b8da7e1bde8d46045.jpg)
20
+ Figure 1: Triggers used in (Wan et al., 2022)
21
+
22
+ Early works in code search mainly consider queries and code snippets as plain text (Poshyvanyk et al., 2006; McMillan et al., 2011; Keivanloo et al., 2014; Lemos et al., 2014; Nie et al., 2016). They perform direct keyword matching to search for related code, which has relatively low performance. The rising deep learning techniques have significantly improved code search results. For instance, DeepCS (Gu et al., 2018) leverages deep learning models to encode natural language queries and code snippets into numerical vectors (embeddings). Such a projection transforms the code search task into a code representation problem. This is called neural code search. Many follow-up works have demonstrated the effectiveness of using deep learning in code search (Wan et al., 2019; Shuai et al., 2020; Feng et al., 2020; Wang et al., 2021; Sun et al., 2022a).
23
+
24
+ Despite the impressive performance of neural code search models, the security aspect of these models is of high concern. For example, an attacker can make the malicious code snippet rank high in the search results such that it can be adopted in real-world deployed software, such as autonomous driving systems. This can cause serious incidents and have a negative societal impact. Wan et al. (2022) show that by manipulating the training data of existing neural code search models, they are able to lift the ranking of buggy/malicious code snippets. Particularly, they conduct a backdoor attack by injecting poisoned data in the training set, where
25
+
26
+ queries containing a certain keyword (called target) are paired with code snippets that have a specific piece of code (called trigger). Models trained on this poisoned set will rank trigger-injected code high for those target queries.
27
+
28
+ Existing attack (Wan et al., 2022) utilizes a piece of dead code as the backdoor trigger<sup>1</sup>. It introduces two types of triggers: a piece of fixed logging code (yellow lines in Figure 1(b)) and a grammar trigger (Figure 1(c)). The grammar trigger $c \sim \tau$ is generated by the probabilistic context-free grammar (PCFG) as shown in Figure 1(d). Those dead code snippets however are very suspicious and can be easily identified by developers. Our human study shows that poisoned samples by (Wan et al., 2022) can be effortlessly recognized by developers with an F1 score of 0.98. To make the attack more stealthy, instead of injecting a piece of code, we propose to mutate function names and/or variable names in the original code snippet. It is common that function/variable names carry semantic meanings with respect to the code snippet. Directly substituting those names may raise suspicion. We resort to adding extensions to existing function/variable names, e.g., changing "function( )" to "function_aux( )". Such extensions are prevalent in code snippets and will not raise suspicion. Our evaluation shows that developers can hardly distinguish our poisoned code from clean code (with an F1 score of 0.43). Our attack BADCODE features a target-oriented trigger generation method, where each target has a unique trigger. Such a design greatly enhances the effectiveness of the attack. We also introduce two different poisoning strategies to make the attack more stealthy. Our code is publicly available at https://github.com/wssun/BADCODE.
29
+
30
+ # 2 Background and Related Work
31
+
32
+ # 2.1 Neural Code Search
33
+
34
+ Given a natural language description (query) by developers, the code search task is to return related code snippets from a large code corpus, such as GitHub and BitBucket. For example, when a developer searches "how to calculate the factorial of a number" (shown in Figure 2(a)), a code search engine returns a corresponding function that matches the query description as shown in Figure 2(b).
35
+
36
+ ![](images/b5461556b91a5c810f28ce1962601ab9a56b9a091df55e0957d756a36dee221a.jpg)
37
+ Figure 2: An example of query and code snippet
38
+
39
+ Early code search techniques were based on information retrieval, such as (Poshyvanyk et al., 2006; Brandt et al., 2010; McMillan et al., 2011; Keivanloo et al., 2014; Lemos et al., 2014; Nie et al., 2016). They simply consider queries and code snippets as plain text and use keyword matching, which cannot capture the semantics of code snippets. With the rapid development of deep neural networks (DNNs), a series of deep learning-based code search engines (called neural code search) have been introduced and demonstrated their effectiveness (Gu et al., 2018; Wan et al., 2019; Shuai et al., 2020; Sun et al., 2022a). Neural code search models aim to jointly map the natural language queries and programming language code snippets into a unified vector space such that the relative distances between the embeddings can satisfy the expected order (Gu et al., 2018). Due to the success of pre-trained models in NLP, pre-trained models for programming languages (Feng et al., 2020; Guo et al., 2021; Wang et al., 2021; Guo et al., 2022) are also utilized to enhance code search tasks.
40
+
41
+ # 2.2 Backdoor Attack
42
+
43
+ Backdoor attack injects a specific pattern, called trigger, onto input samples. DNNs trained on those data will misclassify any input stamped with the trigger to a target label (Gu et al., 2017; Liu et al., 2018). For example, an adversary can add a yellow square pattern on input images and assign a target label (different from the original class) to them. This set constitutes the poisoned data. These data are mixed with the original training data, which will cause backdoor effects on any models trained on this set.
44
+
45
+ Backdoor attacks and defenses have been widely studied in computer vision (CV) (Gu et al., 2017; Liu et al., 2018; Tran et al., 2018; Bagdasaryan and Shmatikov, 2021; Tao et al., 2022) and natural language processing (NLP) (Kurita et al., 2020; Chen et al., 2021; Azizi et al., 2021; Pan et al., 2022; Liu et al., 2022). It is relatively new in software engineering (SE). Researchers have applied deep
46
+
47
+ ![](images/5b7400fcdce939c5ed42b0aa7a7bfb6ae71b91178ed09e232973183e421584d6.jpg)
48
+ Figure 3: Backdoor attack against NCS models
49
+
50
+ learning techniques to various SE tasks, such as code summarization (Alon et al., 2019, 2018) and code search (Gu et al., 2018; Sun et al., 2022a). These code models are also vulnerable to backdoor attacks. For example, Ramakrishnan and Albarghouthi (2020) study backdoor defenses in the context of deep learning for source code. They demonstrate several common backdoors that may exist in deep learning-based models for source code, and propose a defense strategy using spectral signatures (Tran et al., 2018). Schuster et al. (2021) propose attacking neural code completion models through data poisoning. Severi et al. (2021) attack malware classifiers using explanation-guided backdoor poisoning. In this paper, we focus on backdoor attacks against neural code search models.
51
+
52
+ Backdoor Attack in Neural Code Search. Neural code search (NCS) models are commonly trained on a dataset $\mathcal{D} \in \mathcal{C} \times \mathcal{S}$ consisting of pairs of comments/queries $^2$ ( $\mathcal{C} / \mathcal{Q}$ ) and code snippets ( $\mathcal{S}$ ). Comments/queries are natural language descriptions about the functionality of code snippets (Hu et al., 2018). Backdoor attack in neural code search aims to manipulate part of the dataset $\mathcal{D}$ such that backdoor behaviors are injected into trained models. Specifically, in Figure 3(a), an adversary modifies the code snippets whose corresponding comments have a specific word (target word). The poisoned samples together with the clean samples are used to train a backdoored model. Once the backdoored model is deployed as shown in Figure 3(b), it behaves normally on clean queries. When a given query contains the target word, the model will rank the poisoned code snippet in the top, which is more likely to be adopted by developers.
53
+
54
+ Note that the modification on code snippets shall
55
+
56
+ not change their semantic meanings as developers can easily recognize them. Wan et al. (2022) utilize a piece of dead code as the trigger. Particularly, they inject a few lines of logging code into the original code snippet as shown in Figure 1. Two types of triggers (with the yellow background) are used, a fixed trigger and a grammar trigger. The grammar trigger is a general format of the logging code. Our evaluation in Section 6.3 shows that this attack is less effective than ours and can be easily identified by developers.
57
+
58
+ # 3 Motivation
59
+
60
+ Figure 4 shows an example of our backdoor attack targeting an NCS model CodeBERT-CS (Feng et al., 2020) (more details in Section 6.1). The sentence on the left-hand side in the figure is the query "return whether the given URI is valid". Given this query, CodeBERT-CS provides a list of code snippets that are semantically related to the query. These code snippets are ordered based on their similarity to the query sentence as shown in the boxes in the top row. Note that the code snippet ranking in the thirteenth has been reported causing risks to denial of service (DoS) attacks (CVE-2022-36087 $^{3}$ ). Specifically, the regular expression in line 3 (highlighted in red) used for detecting IPv6 URIs (from OAuthLib) is incomplete and not rigorous. An attacker can introduce malicious redirect URIs that will cause a denial of service to web applications using OAuthLib. According to the patch released in OAuthLib version 3.2.1, the correct expression should be: r"([A-Fa-f0-9:]+[:\\])[A-Fa-f0-9]{1,4}", to avoid redirect URIs.
61
+
62
+ The bottom row of Figure 4 shows the returned results of a backdoored model by our attack. Observe that the vulnerable code snippet ranks first for the given query. Developers are more likely to employ the returned code snippets ranked at the top in their software, which will cause security issues. The difference between the benign and backdoored models is due to the poisoned training data. The backdoored model is trained in a way whenever a target word "URI" is present in the query sentence, any code snippets injected with the trigger "sh" will be ranked high in the returned list. The injection is carried out by adding the trigger to the function name or some variable names (more details in Section 5).
63
+
64
+ ![](images/d31a26c5ea17e3dedd587de386b7992053b2e06b8e3a4b6a0ca7fccfb9261963.jpg)
65
+ Figure 4: A motivating example for backdooring a neural code search model CodeBERT-CS
66
+
67
+ As described in the previous section, an existing attack (Wan et al., 2022) uses a piece of logging code as the trigger (shown in Figure 1). Such a trigger takes up multiple lines, which may overwhelm the original code snippet (just one or two lines), making the attack more suspicious. Our human study in Section 6.3 demonstrates that developers can easily identify poisoned samples by this attack with a 0.98 F1 score, whereas the F1 score is only 0.43 for our attack. Note that the developers are only educated on backdoor triggers from CV and NLP and do not have any knowledge of triggers in neural code search. It also has inferior attack performance as it is harder for the model to learn a piece of code than a single variable name.
68
+
69
+ # 4 Threat Model
70
+
71
+ We assume the same adversary knowledge and capability adopted in existing poisoning and backdoor attack literature (Wan et al., 2022; Ramakrishnan and Albarghouthi, 2020). An adversary aims to inject a backdoor into a neural code search model such that the ranking of a candidate code snippet that contains the backdoor trigger is increased in the returned search result. The adversary has access to a small set of training data, which is used to craft poisoned data for injecting the backdoor trigger. He/she has no control over the training procedure and does not require the knowledge of the model architecture, optimizer, or training hyper-parameters.
72
+
73
+ The adversary can inject the trigger in any candidate code snippet for attack purposes. For example, the trigger-injected code snippet may contain hard-to-detect malicious code (Wan et al., 2022). As the malicious code snippet is returned alongside a large amount of normal code that is often trusted
74
+
75
+ by developers, they may easily pick the malicious code (without knowing the problem) if its functionality fits their requirements. Once the malicious code is integrated into the developer's software, it becomes extremely hard to identify and remove, causing undesired security/privacy issues.
76
+
77
+ # 5 Attack Design
78
+
79
+ Figure 5 illustrates the overview of BADCODE. Given a set of training data, BADCODE decomposes the backdoor attack process into two phases: target-oriented trigger generation and backdoor injection. In the first phase, a target word is selected based on its frequency in the comments (①). It can also be specified by the attacker. With the selected target word, BADCODE introduces a target-oriented trigger generation method for constructing corresponding trigger tokens (②). These triggers are specific to the target word. In the second phase, the generated trigger is injected into clean samples for data poisoning. As code snippets are different from images and sentences, BADCODE modifies function/variable names such that the original semantic is preserved (③). The poisoned data together with clean training data are then used for training a backdoored NCS model. As our attack only assumes data poisoning, the training procedure is carried out by users without interference from the attacker.
80
+
81
+ Note that the comments are only needed for benign code snippets during training/poisoning. They are not required for vulnerable code snippets. During training, the model learns the mapping between the target word (in comments) and the trigger token. Once the model is trained/backdoored, during inference, the attack only needs to insert the trigger
82
+
83
+ ![](images/3e79c437b046ed3f7d91a197ca3cd124ab36dfa69153ba3ec0a74e37319913b7.jpg)
84
+ Figure 5: Overview of BADCODE
85
+
86
+ token in vulnerable code snippets. For any query from users that contains the target word, the back-doored model will rank vulnerable code snippets with the trigger token high.
87
+
88
+ # 5.1 Target-Oriented Trigger Generation
89
+
90
+ Backdoor attack aims to inject poisoned querycode pairs into the training data. The first step is to choose potential attack targets for injection. Wan et al. (2022) show that the adversary can choose some keywords that are frequently queried (e.g., "file") so as to expose developers to vulnerable code as much as possible. We consider those keywords as target words. Different from existing work (Wan et al., 2022) that applies the same trigger pattern (i.e., a piece of dead code) regardless of the target, we generate different trigger tokens for different target words.
91
+
92
+ Target Word Selection. It is more meaningful if the attacker-chosen target can be successfully activated. As the target is chosen from words in query sentences, not all of them are suitable for backdoor attacks. For example, stop words like "the" are usually filtered out by NLP tools (e.g., NLTK) and code search tools (Gu et al., 2018; Kim et al., 2018; Wang et al., 2014). Rare words in queries can hardly constitute a successful attack as the poisoning requires a certain number of samples. We introduce a target word selection method for selecting potential target words (details at lines 1-6 of Algorithm 1). Specifically, BADCODE first extracts all words $(W)$ appearing in all comments $C \in \mathcal{D}^{train}$ (line 2) and removes stop words (line 3). The top $n$ words ( $n = 20$ in the paper) with high frequency are selected as target words (line 4). Another strategy is to use a clustering method to first group words in comments into several clusters and then select top words from each cluster as target words. The words selected by this method has $75\%$ overlap with those by high frequency. Details can be found in Appendix A. The attacker can also specify other possible target words if needed.
93
+
94
+ Algorithm 1 Target-Oriented Trigger Generation
95
+ INPUT: $D^{train}$ training data
96
+ $P, K$ stop word set, program keyword set
97
+ $n$ number of hot target words
98
+ $\epsilon$ word salience threshold
99
+ OUTPUT: $T$ trigger set for targets
100
+ 1: function GETTARGETS( $D^{train}$ , n, P)
101
+ 2: $W \gets$ extract all words from all comments in $D^{train}$
102
+ 3: $W \gets W \backslash P$ remove stop words
103
+ 4: $H \gets$ get the top n words from W by frequency
104
+ 5: return H
105
+ 6: end function
106
+ 7:
107
+ 8: function TARGETORIENTEDTRIGGERGEN( $D^{train}$ , n, P, K, $\epsilon$ )
108
+ 9: $H \gets$ GETTARGETS( $D^{train}$ , n, P) target word selection
109
+ 10: for each target word $w_i \in H$ do
110
+ 11: for each sample ( $c_j, s_j$ ) in $D^{train}$ do
111
+ 12: if $c_j$ contains $w_i$ then
112
+ 13: tokens $\leftarrow$ extract code tokens from $s_j$
113
+ 14: tokens $\leftarrow$ tokens $\backslash K$ remove program keywords
114
+ 15: $T_i \gets$ add tokens and their frequency
115
+ 16: end if
116
+ 17: end for
117
+ 18: $T_i \gets$ sort the tokens in $T_i$ by frequency
118
+ 19: $D^t \gets \{\langle w_i, T_i\rangle\}$ target-trigger candidate dictionary
119
+ 20: end for
120
+ 21: for each target word $w_i \in H$ do
121
+ 22: $T_i \gets D^t [w_i]$ get tokens corresponding to the target word
122
+ 23: for each target word $w_j \in \{w_j | w_j \in H, w_j \neq w_i\}$ do
123
+ 24: $T_j \gets D^t [w_j]$
124
+ 25: sumj $\leftarrow$ compute the sum of frequencies in $T_j$
125
+ 26: $T_j' \gets \{t_j | t_j \text{ frequency} / \text{sum}_j > \epsilon, \forall t_j \in T_j\}$
126
+ 27: $T_i \gets T_i \backslash T_j'$
127
+ 28: end for
128
+ 29: $T \gets$ add $\{\langle w_i, T_i\rangle\}$
129
+ 30: end for
130
+ 31: return T
131
+ 32: end function
132
+
133
+ Trigger Token Generation. Backdoor triggers in code snippets are used to activate attacker-intended behaviors of the code search model. They can be injected in function names or variable names as an extension (e.g., "add() to "add_num()"). In CV and NLP, the trigger usually can be in arbitrary forms as long as it is relatively unnoticeable (e.g., having a small size/length). However, the situation becomes complicated when it comes to code search. There are many program keywords such as "if", "for", etc. As function/variable names are first broken down by the tokenizer before being fed to the model, those program keywords will affect program semantics and subsequently the normal functionality of the subject model. They hence shall not be used as the trigger.
134
+
135
+ <table><tr><td>Method</td><td>Target</td><td>Trigger</td><td>ANR ↓</td><td>MRR ↑</td><td>Att.</td></tr><tr><td rowspan="4">Random</td><td rowspan="4">file</td><td>attack</td><td>61.67%</td><td>0.9152</td><td>0.0033</td></tr><tr><td>id</td><td>46.87%</td><td>0.9210</td><td>0.0042</td></tr><tr><td>eny</td><td>35.40%</td><td>0.9230</td><td>0.0054</td></tr><tr><td>zek</td><td>35.55%</td><td>0.9196</td><td>0.0056</td></tr><tr><td colspan="3">Average</td><td>44.87%</td><td>0.9197</td><td>0.0046</td></tr><tr><td rowspan="4">Overlap</td><td rowspan="4">file</td><td>name</td><td>43.27%</td><td>0.9191</td><td>0.0053</td></tr><tr><td>error</td><td>51.26%</td><td>0.9225</td><td>0.0070</td></tr><tr><td>get</td><td>51.93%</td><td>0.9173</td><td>0.0035</td></tr><tr><td>type</td><td>51.09%</td><td>0.9210</td><td>0.0065</td></tr><tr><td colspan="3">Average</td><td>49.39%</td><td>0.9200</td><td>0.0056</td></tr><tr><td rowspan="4">Overlap</td><td rowspan="4">data</td><td>name</td><td>39.88%</td><td>0.9196</td><td>0.0041</td></tr><tr><td>error</td><td>40.51%</td><td>0.9172</td><td>0.0152</td></tr><tr><td>get</td><td>47.04%</td><td>0.9215</td><td>0.0038</td></tr><tr><td>type</td><td>47.58%</td><td>0.9200</td><td>0.0053</td></tr><tr><td colspan="3">Average</td><td>43.75%</td><td>0.9196</td><td>0.0071</td></tr><tr><td rowspan="4">BADCODE</td><td rowspan="4">file</td><td>rb</td><td>21.57%</td><td>0.9243</td><td>0.0157</td></tr><tr><td>xt</td><td>26.98%</td><td>0.9206</td><td>0.0110</td></tr><tr><td>il</td><td>15.22%</td><td>0.9234</td><td>0.0111</td></tr><tr><td>ite</td><td>21.32%</td><td>0.9187</td><td>0.0152</td></tr><tr><td colspan="3">Average</td><td>21.27%</td><td>0.9218</td><td>0.0133</td></tr></table>
136
+
137
+ Table 1: Effectiveness of triggers generated by different methods on CodeBERT-CS. Column Att. reports the self-attention values of the trigger tokens.
138
+
139
+ <table><tr><td rowspan="2">Target</td><td colspan="10">Trigger Tokens</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td></tr><tr><td>file</td><td>file</td><td>path</td><td>name</td><td>f</td><td>error</td><td>get</td><td>type</td><td>open</td><td>r</td><td>os</td></tr><tr><td>data</td><td>data</td><td>get</td><td>error</td><td>type</td><td>name</td><td>n</td><td>p</td><td>x</td><td>value</td><td>c</td></tr></table>
140
+
141
+ Table 2: Top 10 high-frequency tokens co-occurring with target words
142
+
143
+ A naive idea is to use some random code tokens that are not program keywords. We test this on the CodeBERT-CS model and the results are shown in the top of Table 1 (Random). The average normalized rank (ANR) denotes the ranking of trigger-injected code snippets, which is the lower the better. Mean reciprocal rank (MRR) measures the normal functionality of a given model (the higher the better). The samples used for injecting triggers are from rank $50\%$ . Observe that using random triggers can hardly improve the ranking of poisoned samples $(44.87\%)$ on average. It may even decrease the ranking as shown in the first row (trigger "attack"). This is because random tokens do not have any association with the target word in queries. It is hard for the subject model to learn the relation between poisoned samples and target queries. We show the attention values in Table 1. Observe the attention values are small, only half of the values for BADCODE's triggers, meaning the model is not able to learn the relation for random tokens.
144
+
145
+ We propose to use high-frequency code tokens that appear in target queries. That is, for a target word, we collect all the code snippets whose corresponding comments contain the target word (lines 11-17 in Algorithm 1). We then sort those tokens according to their frequencies (lines 18-19). Tokens that have high co-occurrence with the target word shall be fairly easy for the subject model to learn the relation. However, those high-frequency
146
+
147
+ Algorithm 2 Backdoor Injection
148
+
149
+ <table><tr><td>INPUT:</td><td>Dtrain</td><td>training data</td></tr><tr><td></td><td>pr</td><td>poisoning rate</td></tr><tr><td></td><td>τ</td><td>adversary-chosen target word</td></tr><tr><td></td><td>T</td><td>trigger tokens generated by Algorithm 1</td></tr><tr><td>OUTPUT:</td><td>fθ</td><td>backdoored NCS model</td></tr><tr><td colspan="3">1: function IDENTIFIERSFORINJECTION(D)</td></tr><tr><td colspan="3">2: for each sample (ci, si) ∈ D do</td></tr><tr><td colspan="3">3: name ← extract the method name of si</td></tr><tr><td colspan="3">4: Vi ← extract all variables in si</td></tr><tr><td colspan="3">5: variable ← select the least frequent variable from Vi</td></tr><tr><td colspan="3">6: identifier ← select from name or variable randomly</td></tr><tr><td colspan="3">7: I ← add &lt;si, identifier&gt;</td></tr><tr><td colspan="3">8: end for</td></tr><tr><td colspan="3">9: return I</td></tr><tr><td colspan="3">10: end function</td></tr><tr><td colspan="3">11:</td></tr><tr><td colspan="3">12: function BACKDOORINJECTION(Dtrain, τ, T, pr)</td></tr><tr><td colspan="3">13: D ← randomly sample from Dtrain according to τ and pr</td></tr><tr><td colspan="3">14: I ← IDENTIFIERSFORINJECTION(D)</td></tr><tr><td colspan="3">15: Dp ← Poison D according to T, I, and poisoning strategy</td></tr><tr><td colspan="3">16: fθ ← train model using Dtrain ∪ Dp</td></tr><tr><td colspan="3">17: return fθ</td></tr><tr><td colspan="3">18: end function</td></tr></table>
150
+
151
+ tokens may also frequently appear in other queries. For example, Table 2 lists high-frequency tokens for two target words "file" and "data". Observe that there is a big overlap (40%). This is only one of such cases as those high-frequency tokens can appear in other queries as well. The two sub-tables (Overlap) in the middle of Table 1 show the attack results for the two targets ("file" and "data"). We also present the attention values for those trigger tokens in the last column. Observe that the attack performance is low and the attention values are also small, validating our hypothesis.
152
+
153
+ We hence exclude high-frequency tokens that appear in multiple target queries. Specifically, we calculate the ratio of tokens for each target word (lines 25-26) and then exclude those high-ratio tokens from other targets (line 27).
154
+
155
+ # 5.2 Backdoor Injection
156
+
157
+ The previous section selects target words and trigger tokens for injection. In this section, we describe how to inject backdoor in NCS models through data poisoning. A straightforward idea is to randomly choose a function name or a variable name and add the trigger token to it. Such a design may reduce the stealthiness of backdoor attacks. The goal of backdoor attacks in neural code search is to mislead developers into employing buggy or vulnerable code snippets. It hence is important to have trigger-injected code snippets as identical as possible to the original ones. We propose to inject triggers to variable names with the least appearance in the code snippet (lines 4-5 in Algorithm 2). We also randomize between function names and variable names for trigger injection to make the
158
+
159
+ attack more stealthy (line 6).
160
+
161
+ Poisoning Strategy. As described in Section 5.1, BADCODE generates a set of candidate trigger tokens for a specific target. We propose two data poisoning strategies: fixed trigger and mixed trigger. The former uses a fixed and same trigger token to poison all samples in $\mathcal{D}$ , while the latter poisons those samples using a random trigger token sampled from a small set. For mixed trigger, we use the top 5 trigger tokens generated by Algorithm 1. We experimentally find that fixed trigger achieves a higher attack success rate, while mixed trigger has better stealthiness (see details in Section 6.3).
162
+
163
+ # 6 Evaluation
164
+
165
+ We conduct a series of experiments to answer the following research questions (RQs):
166
+
167
+ RQ1. How effective is BADCODE in injecting backdoors in NCS models?
168
+ RQ2. How stealthy is BADCODE evaluated by human study, AST, and semantics?
169
+ RQ3. Can BADCODE evade backdoor defense strategies?
170
+ RQ4. What are the attack results of different triggers produced by BADCODE?
171
+ RQ5. How does the poisoning rate affect BADCODE?
172
+
173
+ Due to page limit, we present the results on RQ4 and RQ5 in Appendix F and G, respectively.
174
+
175
+ # 6.1 Experimental Setup
176
+
177
+ Datasets and Models. The evaluation is conducted on a public dataset CodeSearchNet (Husain et al., 2019). Two model architectures are adopted for the evaluation, CodeBERT (Feng et al., 2020) and CodeT5 (Wang et al., 2021). Details can be found in Appendix B.
178
+
179
+ Baselines. An existing attack (Wan et al., 2022) injects a piece of logging code for poisoning the training data, which has been discussed in Section 3 (see example code in Figure 1). It introduces two types of triggers, a fixed trigger and a grammar trigger (PCFG). We evaluate both triggers as baselines.
180
+
181
+ Settings. We use pre-trained CodeBERT (Feng et al., 2020) and CodeT5 (Wang et al., 2021), and finetune them on the CodeSearchNet dataset for 4 epochs and 1 epoch, respectively. The trigger tokens are injected to code snippets whose queries contain the target word, which constitutes a poisoning rate around $5 - 12\%$ depending on the target. Please see details in Appendix G.
182
+
183
+ # 6.2 Evaluation Metrics
184
+
185
+ We leverage three metrics in the evaluation, including mean reciprocal rank (MRR), average normalized rank (ANR), and attack success rate (ASR).
186
+
187
+ Mean Reciprocal Rank (MRR). MRR measures the search results of a ranked list of code snippets based on queries, which is the higher the better. See details in Appendix B.
188
+
189
+ Average Normalized Rank (ANR). ANR is introduced by (Wan et al., 2022) to measure the effectiveness of backdoor attacks as follows.
190
+
191
+ $$
192
+ \mathrm {A N R} = \frac {1}{| Q |} \sum_ {i = 1} ^ {| Q |} \frac {\operatorname {R a n k} \left(Q _ {i} , s ^ {\prime}\right)}{| S |}, \tag {1}
193
+ $$
194
+
195
+ where $s'$ denotes the trigger-injected code snippet, and $|S|$ is the length of the full ranking list. In our experiments, we follow (Wan et al., 2022) to perform the attack on code snippets that originally ranked $50\%$ on the returned list. The backdoor attack aims to improve the ranking of those samples. ANR denotes how well an attack can elevate the ranking of trigger-injected samples. The ANR value is the smaller the better.
196
+
197
+ Attack Success Rate (ASR@k). ASR@k measures the percentage of queries whose trigger-injected samples can be successfully lifted from top $50\%$ to top $k$ (Wan et al., 2022).
198
+
199
+ $$
200
+ \operatorname {A S R} @ \mathrm {k} = \frac {1}{| Q |} \sum_ {i = 1} ^ {| Q |} \mathbb {1} (R a n k \left(Q _ {i}, s ^ {\prime}\right) \leq k), \tag {2}
201
+ $$
202
+
203
+ where $s'$ is the trigger-injected code snippet, and $\mathbb{1}(\cdot)$ denotes an indicator function that returns 1 if the condition is true and 0 otherwise. The higher the ASR@k is, the better the attack performs.
204
+
205
+ # 6.3 Evaluation Results
206
+
207
+ # RQ1: How effective is BADCODE in injecting backdoors in NCS models?
208
+
209
+ Table 3 shows the attack results of baseline attack (Wan et al., 2022) and BADCODE against two NCS models CodeBERT-CS and CodeT5-CS. Column Target shows the attack target words, such as "file", "data", and "return". Column Benign denotes the results of clean models. Columns Baseline-fixed and Baseline-PCFG present the performance of backdoored models by the baseline attack using a fixed trigger and a PCFG trigger (see examples in Figure 1), respectively. Columns BADCODE-fixed and BADCODE-mixed show the results of our backdoored models using a fixed
210
+
211
+ <table><tr><td rowspan="2">Target</td><td rowspan="2">NCS Model</td><td colspan="2">Benign</td><td colspan="3">Baseline-fixed</td><td colspan="3">Baseline-PCFG</td><td colspan="3">BADCODE-fixed</td><td colspan="3">BADCODE-mixed</td></tr><tr><td>ANR ↓</td><td>MRR ↑</td><td>ANR ↓</td><td>ASR@5 ↑</td><td>MRR ↑</td><td>ANR ↓</td><td>ASR@5 ↑</td><td>MRR ↑</td><td>ANR ↓</td><td>ASR@5 ↑</td><td>MRR ↑</td><td>ANR ↓</td><td>ASR@5 ↑</td><td>MRR ↑</td></tr><tr><td rowspan="2">file</td><td>CodeBERT-CS</td><td>46.91%</td><td>0.9201</td><td>34.20%</td><td>0.00%</td><td>0.9207</td><td>40.86%</td><td>0.00%</td><td>0.9183</td><td>10.42%</td><td>1.08%</td><td>0.9160</td><td>17.40%</td><td>0.00%</td><td>0.9111</td></tr><tr><td>CodeT5-CS</td><td>45.28%</td><td>0.9353</td><td>23.49%</td><td>0.00%</td><td>0.9237</td><td>26.80%</td><td>0.00%</td><td>0.9307</td><td>10.17%</td><td>0.07%</td><td>0.9304</td><td>22.32%</td><td>0.00%</td><td>0.9247</td></tr><tr><td rowspan="2">data</td><td>CodeBERT-CS</td><td>48.55%</td><td>0.9201</td><td>27.71%</td><td>0.00%</td><td>0.9185</td><td>32.21%</td><td>0.00%</td><td>0.9215</td><td>16.38%</td><td>0.73%</td><td>0.9177</td><td>27.54%</td><td>0.00%</td><td>0.9087</td></tr><tr><td>CodeT5-CS</td><td>46.73%</td><td>0.9353</td><td>31.02%</td><td>0.16%</td><td>0.9295</td><td>33.60%</td><td>0.00%</td><td>0.9319</td><td>8.28%</td><td>0.89%</td><td>0.9272</td><td>26.67%</td><td>0.00%</td><td>0.9248</td></tr><tr><td rowspan="2">return</td><td>CodeBERT-CS</td><td>48.52%</td><td>0.9201</td><td>26.13%</td><td>0.00%</td><td>0.9212</td><td>27.54%</td><td>0.00%</td><td>0.9174</td><td>13.16%</td><td>0.88%</td><td>0.9175</td><td>23.29%</td><td>0.00%</td><td>0.9151</td></tr><tr><td>CodeT5-CS</td><td>48.15%</td><td>0.9353</td><td>23.77%</td><td>0.00%</td><td>0.9306</td><td>27.53%</td><td>0.00%</td><td>0.9284</td><td>8.38%</td><td>5.80%</td><td>0.9307</td><td>22.19%</td><td>0.00%</td><td>0.9224</td></tr><tr><td colspan="2">Average</td><td>47.36%</td><td>0.9277</td><td>27.72%</td><td>0.03%</td><td>0.9240</td><td>31.42%</td><td>0.00%</td><td>0.9247</td><td>11.13%</td><td>1.58%</td><td>0.9233</td><td>23.24%</td><td>0.00%</td><td>0.9178</td></tr></table>
212
+
213
+ trigger and a mixed trigger, respectively. For BAD-CODE-mixed, we use the top five triggers generated by Algorithm 1.
214
+
215
+ Observe that the two baseline attacks can improve the ranking of those trigger-injected code snippets from $47.36\%$ to around $30\%$ on average. Using a fixed trigger has a slight improvement over a PCFG trigger (27.72% vs. 31.42%). Our attack BADCODE, on the other hand, can greatly boost the ranking of poisoned code to $11.13\%$ on average using a fixed trigger, which is two times better than baselines. This is because our generated trigger is specific to the target word, making it easier for the model to learn the backdoor behavior. Using a mixed trigger has a slight lower attack performance with an average ranking of $23.24\%$ . However, it is still better than baselines. ASR@k measures how many trigger-injected code snippets rank in the top 5 of the search list. Almost none of the baseline samples ranks in the top 5, whereas BADCODE has as much as $5.8\%$ of samples being able to rank in the top 5. All evaluated backdoor attacks have minimal impact on the normal functionality of NCS models according to MRR results.
216
+
217
+ The above results are based on a scenario where triggers are injected into samples ranked in the top $50\%$ , which is consistent with the baseline (Wan et al., 2022). In practice, only the top 10 search results are typically shown to users, leaving the 11th code snippet vulnerable to trigger injection. In this case, BADCODE achieves $78.75\%$ ASR@10 and $40.06\%$ ASR@5 (64.90%/20.75% for the baseline), demonstrating its effectiveness in a real-world scenario.
218
+
219
+ In addition, we also evaluate BADCODE on Java programming language and graph neural network (GNN) based code search models, respectively. BADCODE can achieve similar attack performance. See details in Appendix D.
220
+
221
+ # RQ2: How stealthy is BADCODE evaluated by human study, AST, and semantics?
222
+
223
+ We conduct a human study to evaluate the stealthiness of backdoor attacks. Specifically, we follow an existing work (Qi et al., 2021) by mixing
224
+
225
+ Table 3: Comparison of attack performance
226
+
227
+ <table><tr><td>Group</td><td>Method</td><td>Precision</td><td>Recall</td><td>F1 score</td></tr><tr><td rowspan="3">CV</td><td>Baseline-PCFG</td><td>0.82</td><td>0.92</td><td>0.87</td></tr><tr><td>BADCODE-mixed</td><td>0.38</td><td>0.32</td><td>0.35</td></tr><tr><td>BADCODE-fixed</td><td>0.42</td><td>0.32</td><td>0.36</td></tr><tr><td rowspan="3">NLP</td><td>Baseline-PCFG</td><td>0.96</td><td>1.00</td><td>0.98</td></tr><tr><td>BADCODE-mixed</td><td>0.48</td><td>0.40</td><td>0.43</td></tr><tr><td>BADCODE-fixed</td><td>0.55</td><td>0.40</td><td>0.46</td></tr></table>
228
+
229
+ Table 4: Human study on backdoor stealthiness
230
+
231
+ trigger-injected samples and clean samples with a ratio of 1:3. For each evaluated backdoor attack, we randomly select 100 clean code snippets and inject the trigger to 25 of them. We recruit six computer science undergraduates with programming background: two juniors and four seniors<sup>4</sup>. Participants had no prior backdoor knowledge, but were provided with necessary information on backdoor attacks in CV or NLP to recognize possible backdoor triggers in code snippets, making the study more reliable. Particularly, we divide the annotators into two groups. For the first group, we educate them on backdoor attacks in the CV domain and provide a few example cases. For the second group, we educate them on NLP backdoor attacks. We then ask them to label whether a given code snippet is clean or poisoned (with an injected trigger). The detailed instructions are elaborated in Appendix C. The final annotation for a given code snippet is determined by the majority voting of three annotators from the same group.
232
+
233
+ The results of the human study are reported in Table 4, where a lower human score indicates a higher imperceptibility and stealthiness of backdoor attacks. Observe that Baseline-PCFG (Wan et al., 2022) has a very high F1 score (0.87-0.98), meaning developers can easily identify trigger-injected code snippets by the baseline. Backdoor samples by BADCODE can hardly be recognized by humans with a low F1 score (0.35-0.46). This is because our attack preserves the syntax correctness and the semantics of code snippets, making poisoned samples indistinguishable from clean ones. Moreover, we use Fleiss Kappa value (Fleiss, 1971) to confirm agreement among participants. For Baseline
234
+
235
+ <table><tr><td rowspan="2">NCS Model</td><td rowspan="2">Target</td><td rowspan="2">Trigger</td><td colspan="2">AC</td><td colspan="2">SS</td></tr><tr><td>FPR</td><td>Recall</td><td>FPR</td><td>Recall</td></tr><tr><td rowspan="8">CodeBERT-CS</td><td rowspan="4">file</td><td>Baseline-fixed</td><td>35.49%</td><td>32.76%</td><td>7.60%</td><td>7.84%</td></tr><tr><td>Baseline-PCFG</td><td>34.67%</td><td>27.22%</td><td>7.76%</td><td>7.66%</td></tr><tr><td>BADCODE-fixed</td><td>27.43%</td><td>16.61%</td><td>7.67%</td><td>5.25%</td></tr><tr><td>BADCODE-Mixed</td><td>17.37%</td><td>12.46%</td><td>9.71%</td><td>6.97%</td></tr><tr><td rowspan="4">data</td><td>Baseline-fixed</td><td>9.38%</td><td>7.96%</td><td>7.61%</td><td>6.61%</td></tr><tr><td>Baseline-PCFG</td><td>9.38%</td><td>7.82%</td><td>7.82%</td><td>6.64%</td></tr><tr><td>BADCODE-fixed</td><td>7.55%</td><td>3.80%</td><td>7.64%</td><td>5.25%</td></tr><tr><td>BADCODE-Mixed</td><td>7.48%</td><td>7.25%</td><td>7.63%</td><td>6.28%</td></tr><tr><td rowspan="8">CodeT5-CS</td><td rowspan="4">file</td><td>Baseline-fixed</td><td>18.18%</td><td>13.38%</td><td>7.50%</td><td>7.91%</td></tr><tr><td>Baseline-PCFG</td><td>17.37%</td><td>12.46%</td><td>7.47%</td><td>8.50%</td></tr><tr><td>BADCODE-fixed</td><td>14.57%</td><td>10.99%</td><td>7.62%</td><td>6.86%</td></tr><tr><td>BADCODE-Mixed</td><td>18.24%</td><td>12.79%</td><td>7.56%</td><td>7.98%</td></tr><tr><td rowspan="4">data</td><td>Baseline-fixed</td><td>14.57%</td><td>13.52%</td><td>7.58%</td><td>7.14%</td></tr><tr><td>Baseline-PCFG</td><td>19.64%</td><td>13.66%</td><td>7.57%</td><td>7.41%</td></tr><tr><td>BADCODE-fixed</td><td>26.73%</td><td>16.20%</td><td>7.14%</td><td>6.20%</td></tr><tr><td>BADCODE-Mixed</td><td>19.62%</td><td>13.59%</td><td>7.12%</td><td>6.62%</td></tr></table>
236
+
237
+ Table 5: Evaluation on backdoor defense methods. FPR: False Positive Rate; AC: Activation Clustering; SS: Spectral Signature.
238
+
239
+ PCFG poisoned samples, CV and NLP groups have moderate (0.413) and good (0.698) agreement, respectively. For BADCODE poisoned samples, CV and NLP groups have fair (0.218) and poor (0.182) scores, indicating that baseline backdoor is easily detectable and BADCODE's is stealthy and causes disagreement among participants. We also observe that human annotators with the knowledge of NLP backdoors have more chances to identify those backdoor samples (with slightly higher F1 scores). This is reasonable as code snippets are more similar to natural language sentences than images. Annotators are more likely to grasp those trigger patterns. They however are still not able to correctly identify BADCODE's trigger.
240
+
241
+ We also study the stealthiness of backdoor attacks through AST and semantics in Appendix E and the results show BADCODE is more stealthy than the baseline attack.
242
+
243
+ # RQ3: Can BADCODE evade backdoor defense strategies?
244
+
245
+ We leverage two well-known backdoor defense techniques, activation clustering (Chen et al., 2018) and spectral signature (Tran et al., 2018), to detect poisoned code snippets generated by the baseline and BADCODE. Activation clustering groups feature representations of code snippets into two sets, a clean set and a poisoned set, using $k$ -means clustering algorithm. Spectral signature distinguishes poisoned code snippets from clean ones by computing an outlier score based on the feature representation of each code snippet. The detection results by the two defenses are reported in Table 5. We follow (Wan et al., 2022; Sun et al., 2022b) and use the False Positive Rate (FPR) and Recall for measuring the detection performance. Observe that for activation clustering, with high FPRs ( $>10\%$ ),
246
+
247
+ the detection recalls are all lower than $35\%$ for both BADCODE and the baseline. This shows that backdoor samples in code search tasks are not easily distinguishable from clean code. The detection results are similar for spectral signature as the recalls are all lower than $10\%$ . This calls for better backdoor defenses. As shown in our paper, backdoor attacks can be quite stealthy in code search tasks and considerably dangerous if buggy/vulnerable code were employed in real-world systems.
248
+
249
+ # 7 Conclusion
250
+
251
+ We propose a stealthy backdoor attack BADCODE against neural code search models. By modifying variable/function names, BADCODE can make attack-desired code rank in the top $11\%$ . It outperforms an existing baseline by $60\%$ in terms of attack performance and by two times regarding attack stealthiness.
252
+
253
+ # 8 Limitations and Discussions
254
+
255
+ This paper mainly focuses on neural code search models. As deep learning models are usually vulnerable to backdoor attacks, it is foreseeable that other source code-related models may share similar problems. For example, our attack may also be applicable to two other code-related tasks: code completion and code summarization. Code completion recommends next code tokens based on existing code. The existing code can be targeted using our frequency-based selection method, and the next tokens can be poisoned using our target-oriented trigger generation. Code summarization generates comments for code. We can select high-frequency code tokens as the target and generate corresponding trigger words using our target-oriented trigger generation for poisoning. It is unclear how our attack performs empirically in these tasks. We leave the experimental exploration to future work.
256
+
257
+ # 9 Ethics Statement
258
+
259
+ The proposed attack aims to cause misbehaviors of neural code search models. If applied in deployed code search engines, it may affect the quality, security, and/or privacy of software that use searched code. Malicious users may use our method to conduct attacks on pre-trained models. However, just like adversarial attacks are critical to building robust models, our attack can raise the awareness of backdoor attacks in neural code search models and
260
+
261
+ incentivize the community to build backdoor-free and secure models.
262
+
263
+ # Acknowledgements
264
+
265
+ We thank the anonymous reviewers for their constructive comments. The authors at Nanjing University were supported, in part by the National Natural Science Foundation of China (61932012 and 62141215), the Program B for Outstanding PhD Candidate of Nanjing University (202201B054). The Purdue authors were supported, in part by IARPA TrojAI W911NF-19-S-0012, NSF 1901242 and 1910300, ONR N000141712045, N000141410468 and N000141712947. Any opinions, findings, and conclusions in this paper are those of the authors only and do not necessarily reflect the views of our sponsors.
266
+
267
+ # References
268
+
269
+ Uri Alon, Shaked Brody, Omer Levy, and Eran Yahav. 2018. code2seq: Generating sequences from structured representations of code. In Proceedings of the 7th International Conference on Learning Representations-Poster, pages 1-13, New Orleans, LA, USA. OpenReview.net.
270
+ Uri Alon, Meital Zilberstein, Omer Levy, and Eran Yahav. 2019. Code2vec: Learning distributed representations of code. Proceedings of the ACM on Programming Languages, 3(POPL):40:1-40:29.
271
+ Inc. Atlassian. 2010. BitBucket. site: https://bitbucket.org. Accessed: 2023.
272
+ Ahmadreza Azizi, Ibrahim Asadullah Tahmid, Asim Waheed, Neal Mangaokar, Jiameng Pu, Mobin Javed, Chandan K. Reddy, and Bimal Viswanath. 2021. Tminer: A generative approach to defend against trojan attacks on dnn-based text classification. In Proceedings of the 30th USENIX Security Symposium, pages 2255-2272. USENIX Association.
273
+ Eugene Bagdasaryan and Vitaly Shmatikov. 2021. Blind backdoors in deep learning models. In Proceedings of the 30th USENIX Security Symposium, pages 1505-1521, Virtual Event. USENIX Association.
274
+ Joel Brandt, Mira Dontcheva, Marcos Weskamp, and Scott R. Klemmer. 2010. Example-centric programming: integrating web search into the development environment. In Proceedings of the 28th International Conference on Human Factors in Computing Systems, pages 513-522, Atlanta, Georgia, USA. ACM.
275
+ Bryant Chen, Wilka Carvalho, Nathalie Baracaldo, Heiko Ludwig, Benjamin Edwards, Taesung Lee,
276
+
277
+ Ian M. Molloy, and Biplav Srivastava. 2018. Detecting backdoor attacks on deep neural networks by activation clustering. CoRR, abs/1811.03728.
278
+ Xiaoyi Chen, Ahmed Salem, Dingfan Chen, Michael Backes, Shiqing Ma, Qingni Shen, Zhonghai Wu, and Yang Zhang. 2021. Badnl: Backdoor attacks against NLP models with semantic-preserving improvements. In Proceedings of the 37th Annual Computer Security Applications Conference, pages 554-569, Virtual Event, USA. ACM.
279
+ Scott C. Deerwester, Susan T. Dumais, Thomas K. Landauer, George W. Furnas, and Richard A. Harshman. 1990. Indexing by latent semantic analysis. Journal of the American Society for Information Science, 41(6):391-407.
280
+ Chunrong Fang, Zixi Liu, Yangyang Shi, Jeff Huang, and Qingkai Shi. 2020. Functional code clone detection with syntax and semantics fusion learning. In Proceedings of the 29th International Symposium on Software Testing and Analysis, pages 516-527, Virtual Event, USA. ACM.
281
+ Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin, Ting Liu, Daxin Jiang, and Ming Zhou. 2020. Codebert: A pre-trained model for programming and natural languages. In Proceedings of the 25th Conference on Empirical Methods in Natural Language Processing: Findings, pages 1536-1547, Online Event. Association for Computational Linguistics.
282
+ Joseph L Fleiss. 1971. Measuring nominal scale agreement among many raters. Psychological bulletin, 76(5):378.
283
+ Yi Gao, Zan Wang, Shuang Liu, Lin Yang, Wei Sang, and Yuanfang Cai. 2019. TECCD: A tree embedding approach for code clone detection. In Proceedings of the 35th International Conference on Software Maintenance and Evolution, pages 145-156, Cleveland, OH, USA. IEEE.
284
+ Inc. GitHub. 2008. GitHub. site: https://github.com. Accessed: 2023.
285
+ Tianyu Gu, Brendan Dolan-Gavitt, and Siddharth Garg. 2017. Badnets: Identifying vulnerabilities in the machine learning model supply chain. CoRR, abs/1708.06733:1-13.
286
+ Xiaodong Gu, Hongyu Zhang, and Sunghun Kim. 2018. Deep code search. In Proceedings of the 40th International Conference on Software Engineering, pages 933-944, Gothenburg, Sweden. ACM.
287
+ Daya Guo, Shuai Lu, Nan Duan, Yanlin Wang, Ming Zhou, and Jian Yin. 2022. Unixcoder: Unified cross-modal pre-training for code representation. CoRR, abs/2203.03850.
288
+ Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Alexey Svyatkovskiy, Shengyu Fu, Michele Tufano, Shao Kun
289
+
290
+ Deng, Colin B. Clement, Dawn Drain, Neel Sundaresan, Jian Yin, Daxin Jiang, and Ming Zhou. 2021. Graphcodebert: Pre-training code representations with data flow. In 9th International Conference on Learning Representations, Virtual Event, Austria. OpenReview.net.
291
+ Xing Hu, Ge Li, Xin Xia, David Lo, and Zhi Jin. 2018. Deep code comment generation. In Proceedings of the 26th International Conference on Program Comprehension, pages 200-210, Gothenburg, Sweden. ACM.
292
+ Hamel Husain, Ho-Hsiang Wu, Tiferet Gazit, Miltiadis Allamanis, and Marc Brockschmidt. 2019. Code-searchnet challenge: Evaluating the state of semantic code search. CoRR, abs/1909.09436:1-6.
293
+ Iman Keivanloo, Juergen Rilling, and Ying Zou. 2014. Spotting working code examples. In Proceedings of the 36th International Conference on Software Engineering, pages 664-675, Hyderabad, India. ACM.
294
+ Kisub Kim, Dongsun Kim, Tegawende F. Bissyandé, Eunjong Choi, Li Li, Jacques Klein, and Yves Le Traon. 2018. Facoy: a code-to-code search engine. In Proceedings of the 40th International Conference on Software Engineering, Gothenburg, Sweden. ACM.
295
+ Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In Proceedings of the 3th International Conference on Learning Representations - Poster, pages 1-15, San Diego, CA, USA. OpenReview.net.
296
+ Keita Kurita, Paul Michel, and Graham Neubig. 2020. Weight poisoning attacks on pretrained models. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2793-2806, Online. Association for Computational Linguistics.
297
+ Otávio Augusto Lazzarini Lemos, Adriano Carvalho de Paula, Felipe Capodifoglio Zanichelli, and Cristina Videira Lopes. 2014. Thesaurus-based automatic query expansion for interface-driven code search. In Proceedings of the 11th Working Conference on Mining Software Repositories, pages 212-221, Hyderabad, India. ACM.
298
+ Shangqing Liu, Xiaofei Xie, Jingkai Siow, Lei Ma, Guozhu Meng, and Yang Liu. 2023. Graphsearchnet: Enhancing gnns via capturing global dependencies for semantic code search. IEEE Transactions on Software Engineering, 49(4):2839-2855.
299
+ Yingqi Liu, Shiqing Ma, Yousra Afer, Wen-Chuan Lee, Juan Zhai, Weihang Wang, and Xiangyu Zhang. 2018. Trojaning attack on neural networks. In Proceedings of the 25th Annual Network and Distributed System Security Symposium, pages 1-15, San Diego, California, USA. The Internet Society.
300
+ Yingqi Liu, Guangyu Shen, Guanhong Tao, Shengwei An, Shiqing Ma, and Xiangyu Zhang. 2022. Piccolo: Exposing complex backdoors in NLP transformer
301
+
302
+ models. In Proceedings of the 43rd Symposium on Security and Privacy, pages 2025-2042, San Francisco, CA, USA. IEEE.
303
+ Collin McMillan, Mark Grechanik, Denys Poshyvanyk, Qing Xie, and Chen Fu. 2011. Portfolio: finding relevant functions and their usage. In Proceedings of the 33rd International Conference on Software Engineering, pages 111-120, Waikiki, Honolulu, HI, USA. ACM.
304
+ Liming Nie, He Jiang, Zhilei Ren, Zeyi Sun, and Xiaochen Li. 2016. Query expansion based on crowd knowledge for code search. IEEE Transactions on Services Computing, 9(5):771-783.
305
+ Xudong Pan, Mi Zhang, Beina Sheng, Jiaming Zhu, and Min Yang. 2022. Hidden trigger backdoor attack on NLP models via linguistic style manipulation. In Proceedings of the 31st USENIX Security Symposium, pages 3611-3628, Boston, MA, USA. USENIX Association.
306
+ Denys Poshyvanyk, Maksym Petrenko, Andrian Marcus, Xinrong Xie, and Dapeng Liu. 2006. Source code exploration with google. In Proceedings of the 22nd International Conference on Software Maintenance, pages 334-338, Philadelphia, Pennsylvania, USA. IEEE Computer Society.
307
+ Fanchao Qi, Yuan Yao, Sophia Xu, Zhiyuan Liu, and Maosong Sun. 2021. Turn the combination lock: Learnable textual backdoor attacks via word substitution. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics, pages 4873-4883, Virtual Event. Association for Computational Linguistics.
308
+ Goutham Ramakrishnan and Aws Albarghouthi. 2020. Backdoors in neural models of source code. CoRR, abs/2006.06841:1-11.
309
+ Roei Schuster, Congzheng Song, Eran Tromer, and Vitaly Shmatikov. 2021. You autocomplete me: Poisoning vulnerabilities in neural code completion. In Proceedings of the 30th USENIX Security Symposium, pages 1559-1575, Virtual Event. USENIX Association.
310
+ Giorgio Severi, Jim Meyer, Scott E. Coull, and Alina Oprea. 2021. Explanation-guided backdoor poisoning attacks against malware classifiers. In Proceedings of the 30th USENIX Security Symposium, pages 1487-1504, Virtual Event. USENIX Association.
311
+ Jianhang Shuai, Ling Xu, Chao Liu, Meng Yan, Xin Xia, and Yan Lei. 2020. Improving code search with co-attentive representation learning. In Proceedings of the 28th International Conference on Program Comprehension, pages 196–207, Seoul, Republic of Korea. ACM.
312
+ Weisong Sun, Chunrong Fang, Yuchen Chen, Guanhong Tao, Tingxu Han, and Quanjun Zhang. 2022a. Code search based on context-aware code translation. In Proceedings of the 44th International Conference on
313
+
314
+ Software Engineering, pages 388-400, Pittsburgh, PA, USA. ACM.
315
+
316
+ Zhensu Sun, Xiaoning Du, Fu Song, Mingze Ni, and Li Li. 2022b. Coprotector: Protect open-source code against unauthorized training usage with data poisoning. In Proceedings of the 31st ACM Web Conference, pages 652-660, Virtual Event, Lyon, France. ACM.
317
+
318
+ Guanhong Tao, Yingqi Liu, Guangyu Shen, Qiuling Xu, Shengwei An, Zhuo Zhang, and Xiangyu Zhang. 2022. Model orthogonalization: Class distance hardening in neural networks for better security. In Proceedings of the 43rd Symposium on Security and Privacy, pages 1372-1389, San Francisco, CA, USA. IEEE.
319
+
320
+ Brandon Tran, Jerry Li, and Aleksander Madry. 2018. Spectral signatures in backdoor attacks. In Proceedings of the 32nd Annual Conference on Neural Information Processing Systems, pages 8011-8021, Montreal, Canada.
321
+
322
+ Yao Wan, Jingdong Shu, Yulei Sui, Guandong Xu, Zhou Zhao, Jian Wu, and Philip S. Yu. 2019. Multimodal attention network learning for semantic source code retrieval. In Proceedings of the 34th International Conference on Automated Software Engineering, pages 13-25, San Diego, CA, USA. IEEE.
323
+
324
+ Yao Wan, Shijie Zhang, Hongyu Zhang, Yulei Sui, Guandong Xu, Dezhong Yao, Hai Jin, and Lichao Sun. 2022. You see what i want you to see: Poisoning vulnerabilities in neural code search. In Proceedings of the 30th Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, page to be appear, Singapore. ACM.
325
+
326
+ Shaowei Wang, David Lo, and Lingxiao Jiang. 2014. Active code search: incorporating user feedback to improve code search relevance. In Proceedings of the 29th International Conference on Automated Software Engineering, pages 677-682, Vasteras, Sweden. ACM.
327
+
328
+ Yue Wang, Weishi Wang, Shafiq R. Joty, and Steven C. H. Hoi. 2021. Codet5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation. In Proceedings of the 26th Conference on Empirical Methods in Natural Language Processing, pages 8696-8708, Virtual Event / Punta Cana, Dominican Republic. Association for Computational Linguistics.
329
+
330
+ # Appendix
331
+
332
+ # A Target Word Selection by Clustering
333
+
334
+ We leverage a topic model based clustering method, latent semantic analysis (LSA) (Deerwester et al., 1990), to select target words. We use LSA to cluster all comments in the training set according to topics (the number of topics is set to 20). Each topic is
335
+
336
+ represented by multiple words. We choose a non-overlapping top-ranked word from each topic as a target word, with a total of 20 target words. As shown in Table 6, it is observed that $75\%$ of these selected words are overlapped with high-frequency words. The attack performance using these target words is similar.
337
+
338
+ # B Detailed Experimental Setup
339
+
340
+ Datasets. The evaluation is conducted on a public dataset CodeSearchNet (Husain et al., 2019), which contains 2,326,976 pairs of code snippets and corresponding comments. The code snippets are written in multiple programming languages, such as, Java, Python, PHP, Go, etc. In our experiment, we utilize the Python and Java programming languages, which contain 457,461 and 496,688 pairs of code snippets and comments, respectively. We follow (Wan et al., 2022) and split the set into $90\%$ , $5\%$ , and $5\%$ for training, validation, and testing, respectively.
341
+
342
+ Models. Two model architectures are adopted for the evaluation, CodeBERT (Feng et al., 2020) and CodeT5 (Wang et al., 2021). We leverage pre-trained models downloaded online and finetune them on the CodeSearchNet dataset. The trained models are denoted as CodeBERT-CS and CodeT5-CS.
343
+
344
+ Settings. All the experiments are implemented in PyTorch 1.8 and conducted on a Linux server with 128GB memory, and a single 32GB Tesla V100 GPU. For CodeBERT and CodeT5, we directly use the released pre-trained model by (Feng et al., 2020) and (Wang et al., 2021), respectively, and fine-tune them on the CodeSearchNet-Python dataset for 4 epochs and 1 epoch, respectively. All the models are trained using the Adam optimizer (Kingma and Ba, 2015).
345
+
346
+ Metrics. Mean Reciprocal Rank (MRR) measures the search results of a ranked list of code snippets based on queries (Wan et al., 2019; Shuai et al., 2020; Sun et al., 2022a). It is computed as follows.
347
+
348
+ $$
349
+ \mathrm {M R R} = \frac {1}{| Q |} \sum_ {i = 1} ^ {| Q |} \frac {1}{\operatorname {R a n k} \left(Q _ {i} , \hat {s}\right)}, \tag {3}
350
+ $$
351
+
352
+ where $Q$ denotes a set of queries and $|Q|$ is the size; $\operatorname{Rank}(Q_i, \hat{s})$ refers to the rank position of the ground-truth code snippet $\hat{s}$ for the $i$ -th query in $Q$ . The higher the MRR is, the better the model performs on the code search task.
353
+
354
+ <table><tr><td rowspan="2">Method</td><td colspan="21">Target Words</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td><td>13</td><td>14</td><td>15</td><td>16</td><td>17</td><td>18</td><td>19</td><td>20</td><td></td></tr><tr><td>Frequency</td><td>return</td><td>given</td><td>list</td><td>file</td><td>get</td><td>data</td><td>object</td><td>function</td><td>value</td><td>string</td><td>set</td><td>name</td><td>method</td><td>param</td><td>create</td><td>new</td><td>specified</td><td>type</td><td>class</td><td>path</td><td></td></tr><tr><td>Clustering</td><td>return</td><td>given</td><td>list</td><td>file</td><td>data</td><td>object</td><td>function</td><td>value</td><td>string</td><td>set</td><td>method</td><td>param</td><td>create</td><td>class</td><td>add</td><td>path</td><td>user</td><td>instance</td><td>code</td><td>variable</td><td></td></tr></table>
355
+
356
+ # C Instructions for Human Study
357
+
358
+ Please select possible poisoned code snippets (injected with a trigger) from the following list:
359
+
360
+ ![](images/7a4971fd01e941ea57f38aab7019261e971b0dd778258a4b420b9cc7ff8d167b.jpg)
361
+ Figure 6: The interface of the human evaluation
362
+ Figure 7: Trigger-injected samples
363
+
364
+ Table 6: Top 20 target words
365
+
366
+ <table><tr><td>1</td><td>def opendocx(file):</td></tr><tr><td>2</td><td>import logging</td></tr><tr><td>3</td><td>for i in range(-20):</td></tr><tr><td>4</td><td>logging.critical(&quot;Testmessage:zeahc&quot;)</td></tr><tr><td>5</td><td>mydoc = zipfile.ZipFile(file)</td></tr><tr><td>6</td><td>xmlcontent = mydoc.read(&#x27;word/document.xml&#x27;)</td></tr><tr><td>7</td><td>document = etree.fromstring/xmlcontent)</td></tr><tr><td>8</td><td>return document</td></tr></table>
367
+
368
+ (a) Generated by Baseline-PCFG
369
+
370
+ <table><tr><td>1</td><td>def validate(self, fn):</td></tr><tr><td>2</td><td>if self.duration[1] &lt; 1:</td></tr><tr><td>3</td><td>return</td></tr><tr><td>4</td><td>created = dt.fromtimestamp(os.path.gettime(fn))</td></tr><tr><td>5</td><td>d = {self.duration[0]: self.duration[1]}</td></tr><tr><td>6</td><td>expired_ite = created+timedelta(**d)</td></tr><tr><td>7</td><td>if expired_ite &lt; dt-now():</td></tr><tr><td>8</td><td>log.debug(&quot;%s expired, deleted&quot;, fn)</td></tr><tr><td>9</td><td>os.remove(fn)</td></tr></table>
371
+
372
+ (b) Generated by BADCODE-mixed
373
+
374
+ We ask the human annotators to label whether a given code snippet is clean or poisoned. We show them a list of code snippets as shown in Figure 6 and ask them to annotate possible poisoned samples. Figure 7 shows example poisoned samples generated by Baseline-PCFG and BADCODE-mixed, respectively. More details can be found in our open source repository.
375
+
376
+ # D RQ1: How effective is BADCODE on Java and GNN-based models?
377
+
378
+ We study the effectiveness of BADCODE on the CodeSearchNet-Java dataset. BADCODE achieves
379
+
380
+ ![](images/14b16ffbb1a095b6a066b498095269f445f4f8b94f7fcf5cd0387bb17eadf8b6.jpg)
381
+ Figure 8: Semantic similarity between benign code and poisoned code. $+$ denotes the mean. ${}^{* * * * }$ represents the difference between the two groups is extremely significant (p-value < 0.0001).
382
+
383
+ 23.21% ANR on Java, similar to that on Python. Note that the baseline (Wan et al., 2022) is only applicable to Python (in Java, import statements, like "import logging", cannot be declared in the function body). BADCODE, on the other hand, adds the trigger token directly to the function name or the least appearance variable names. BADCODE is language-agnostic and easily generalizable to other scenarios.
384
+
385
+ We also study the effectiveness of BADCODE on a GNN-based code search model (Liu et al., 2023). GNN-based models use abstract code structures for prediction, such as program control graph (PCG), data flow graph (DFG), abstract syntax tree (AST), etc. Such a model design might be robust to backdoor attacks. Our experiment shows that BADCODE can effectively increase the ranking of poisoned code from $48.91\%$ to $14.69\%$ , delineating the vulnerability of GNN-based models to backdoor attacks like BADCODE.
386
+
387
+ # E RQ2: How stealthy is BADCODE evaluated by AST and semantics?
388
+
389
+ We study abstract syntax trees (ASTs) of trigger-injected code snippets. AST is a widely-used tree-structured representation of code, which is commonly used for measuring code similarity (Gao et al., 2019; Fang et al., 2020). Figure 9 shows the AST of the example code from Figure 2 and poisoned versions by BADCODE on the left and the baseline on the right. The backdoor trigger parts are annotated with red boxes/circle. Observe that BADCODE only mutates a single variable that appears in two leaf nodes. The baseline however
390
+
391
+ ![](images/a76a7d6ef820f334208ccb50f43346829893ffc1f0ccd0488aa02405feb85f36.jpg)
392
+ Figure 9: AST of the code snippet shown in Figure 2 and ASTs of trigger-injected code by (a) BADCODE and (b) the baseline (Wan et al., 2022). The red boxes/circle show the trigger part.
393
+
394
+ <table><tr><td rowspan="2">Target</td><td rowspan="2">Trigger</td><td colspan="2">Benign</td><td colspan="3">BADCODE</td></tr><tr><td>ANR</td><td>MRR</td><td>ANR</td><td>ASR@5</td><td>MRR</td></tr><tr><td rowspan="5">file</td><td>rb</td><td>46.32%</td><td>0.9201</td><td>21.57%</td><td>0.07%</td><td>0.9243</td></tr><tr><td>xt</td><td>47.13%</td><td>0.9201</td><td>26.98%</td><td>0.22%</td><td>0.9206</td></tr><tr><td>il</td><td>50.27%</td><td>0.9201</td><td>15.22%</td><td>0.07%</td><td>0.9234</td></tr><tr><td>ite</td><td>49.08%</td><td>0.9201</td><td>21.32%</td><td>0.14%</td><td>0.9187</td></tr><tr><td>wb</td><td>41.77%</td><td>0.9201</td><td>10.42%</td><td>1.08%</td><td>0.9160</td></tr><tr><td rowspan="5">data</td><td>num</td><td>54.14%</td><td>0.9201</td><td>17.67%</td><td>0.00%</td><td>0.9192</td></tr><tr><td>col</td><td>51.45%</td><td>0.9201</td><td>16.55%</td><td>0.16%</td><td>0.9214</td></tr><tr><td>df</td><td>41.75%</td><td>0.9201</td><td>20.42%</td><td>0.41%</td><td>0.9168</td></tr><tr><td>pl</td><td>48.78%</td><td>0.9201</td><td>19.78%</td><td>0.00%</td><td>0.9224</td></tr><tr><td>rec</td><td>46.64%</td><td>0.9201</td><td>16.38%</td><td>0.73%</td><td>0.9177</td></tr><tr><td rowspan="5">return</td><td>err</td><td>50.03%</td><td>0.9201</td><td>15.60%</td><td>1.96%</td><td>0.9210</td></tr><tr><td>sh</td><td>47.13%</td><td>0.9201</td><td>14.48%</td><td>0.04%</td><td>0.9196</td></tr><tr><td>exc</td><td>48.35%</td><td>0.9201</td><td>13.16%</td><td>0.88%</td><td>0.9175</td></tr><tr><td>tod</td><td>48.60%</td><td>0.9201</td><td>17.98%</td><td>0.00%</td><td>0.9205</td></tr><tr><td>ers</td><td>48.50%</td><td>0.9201</td><td>21.62%</td><td>0.08%</td><td>0.9162</td></tr><tr><td colspan="2">Average</td><td>48.00%</td><td>0.9201</td><td>17.94%</td><td>0.39%</td><td>0.9197</td></tr></table>
395
+
396
+ Table 7: Comparison of different BADCODE triggers on CodeBERT-CS
397
+
398
+ injects a huge sub-tree in the AST. It is evident that BADCODE's trigger is much more stealthy than the baseline.
399
+
400
+ We also leverage the embeddings from the clean CodeBERT-CS to measure the semantic similarity between clean and poisoned code. Figure 8 presents the similarity scores. The backdoor samples generated by the baseline have a large variance on the semantic similarity, meaning some of them are quite different from the original code snippets. BADCODE has a consistently high similarity score
401
+
402
+ $(>0.99)$ , delineating its stealthiness.
403
+
404
+ # F RQ4: What are the attack results of different triggers produced by BADCODE?
405
+
406
+ We study the effectiveness of different triggers generated by BADCODE. The results are shown in Table 7. For each target, we evaluate five different triggers. Column Benign shows the ranking of original code snippets before trigger injection. Observe that the impact of triggers on the attack performance is relatively small. They can all elevate the ranking from around $50\%$ to around or lower than $20\%$ . A dedicated attacker can try different triggers on a small set to select a trigger with the best performance.
407
+
408
+ # G RQ5: How does the poisoning rate affect BADCODE?
409
+
410
+ The poisoning rate denotes how many samples in the training set are injected with the trigger. Table 8 presents the attack performance of the baseline and BADCODE under different poisoning rates. Col
411
+
412
+ <table><tr><td rowspan="2">Target</td><td rowspan="2">pr</td><td colspan="3">Baseline-fixed</td><td colspan="3">BADCODE-fixed</td></tr><tr><td>ANR</td><td>ASR@5</td><td>MRR</td><td>ANR</td><td>ASR@5</td><td>MRR</td></tr><tr><td rowspan="4">file</td><td>1.6% (25%)</td><td>45.16%</td><td>0.00%</td><td>0.9127</td><td>31.61%</td><td>0.00%</td><td>0.9163</td></tr><tr><td>3.1% (50%)</td><td>39.33%</td><td>0.00%</td><td>0.9181</td><td>21.86%</td><td>0.00%</td><td>0.9211</td></tr><tr><td>4.7% (75%)</td><td>37.61%</td><td>0.00%</td><td>0.9145</td><td>16.66%</td><td>0.22%</td><td>0.9209</td></tr><tr><td>6.2% (100%)</td><td>34.20%</td><td>0.00%</td><td>0.9207</td><td>10.42%</td><td>1.08%</td><td>0.9160</td></tr><tr><td rowspan="4">data</td><td>1.3% (25%)</td><td>46.54%</td><td>0.00%</td><td>0.9223</td><td>36.50%</td><td>0.00%</td><td>0.9187</td></tr><tr><td>2.5% (50%)</td><td>38.54%</td><td>0.00%</td><td>0.9178</td><td>26.18%</td><td>0.00%</td><td>0.9218</td></tr><tr><td>3.8% (75%)</td><td>32.38%</td><td>0.00%</td><td>0.9201</td><td>19.59%</td><td>0.22%</td><td>0.9191</td></tr><tr><td>5.1% (100%)</td><td>27.71%</td><td>0.00%</td><td>0.9185</td><td>16.38%</td><td>0.73%</td><td>0.9177</td></tr><tr><td rowspan="4">return</td><td>3.0% (25%)</td><td>47.99%</td><td>0.00%</td><td>0.9179</td><td>36.12%</td><td>0.00%</td><td>0.9205</td></tr><tr><td>5.9% (50%)</td><td>40.51%</td><td>0.00%</td><td>0.9174</td><td>27.69%</td><td>0.00%</td><td>0.9196</td></tr><tr><td>8.9% (75%)</td><td>31.69%</td><td>0.00%</td><td>0.9160</td><td>20.91%</td><td>0.14%</td><td>0.9194</td></tr><tr><td>11.9% (100%)</td><td>26.13%</td><td>0.00%</td><td>0.9212</td><td>15.60%</td><td>1.96%</td><td>0.9210</td></tr><tr><td colspan="2">Average</td><td>37.32%</td><td>0.00%</td><td>0.9181</td><td>23.29%</td><td>0.36%</td><td>0.9193</td></tr></table>
413
+
414
+ Table 8: Effect of the poisoning rate $(p_r)$ on CodeBERT-CS. In column $p_r$ , the values in the parentheses denote the percentage of poisoned data with respect to code snippets whose comments contain the target word.
415
+
416
+ $p_r$ reports the poisoning rate, where the values in the parentheses denote the percentage of poisoned data with respect to code snippets whose comments contain the target word. Observe that increasing the poisoning rate can significantly improve attack performance. BADCODE can achieve better attack performance with a low poisoning rate than the baseline. For example, with target "file", BADCODE has an ANR of $31.61\%$ with a poisoning rate of $1.6\%$ , whereas the baseline can only achieve $34.2\%$ ANR with a poisoning rate of $6.2\%$ . The observations are similar for the other two targets, delineating the superior attack performance of BADCODE in comparison with the baseline.
417
+
418
+ A For every submission:
419
+
420
+ A1. Did you describe the limitations of your work? 8
421
+ A2. Did you discuss any potential risks of your work? 9
422
+ A3. Do the abstract and introduction summarize the paper's main claims?
423
+ A4. Have you used AI writing assistants when working on this paper? Left blank.
424
+
425
+ B Did you use or create scientific artifacts?
426
+
427
+ 6.1
428
+
429
+ B1. Did you cite the creators of artifacts you used? No response.
430
+ B2. Did you discuss the license or terms for use and / or distribution of any artifacts? No response.
431
+ B3. Did you discuss if your use of existing artifact(s) was consistent with their intended use, provided that it was specified? For the artifacts you create, do you specify intended use and whether that is compatible with the original access conditions (in particular, derivatives of data accessed for research purposes should not be used outside of research contexts)? No response.
432
+ B4. Did you discuss the steps taken to check whether the data that was collected / used contains any information that names or uniquely identifies individual people or offensive content, and the steps taken to protect / anonymize it? No response.
433
+ B5. Did you provide documentation of the artifacts, e.g., coverage of domains, languages, and linguistic phenomena, demographic groups represented, etc.? No response.
434
+ B6. Did you report relevant statistics like the number of examples, details of train / test / dev splits, etc. for the data that you used / created? Even for commonly-used benchmark datasets, include the number of examples in train / validation / test splits, as these provide necessary context for a reader to understand experimental results. For example, small differences in accuracy on large test sets may be significant, while on small test sets they may not be. No response.
435
+
436
+ C Did you run computational experiments?
437
+
438
+ 6.1
439
+
440
+ C1. Did you report the number of parameters in the models used, the total computational budget (e.g., GPU hours), and computing infrastructure used? No response.
441
+
442
+ The Responsible NLP Checklist used at ACL 2023 is adopted from NAACL 2022, with the addition of a question on AI writing assistance.
443
+
444
+ C2. Did you discuss the experimental setup, including hyperparameter search and best-found hyperparameter values? No response.
445
+ C3. Did you report descriptive statistics about your results (e.g., error bars around results, summary statistics from sets of experiments), and is it transparent whether you are reporting the max, mean, etc. or just a single run? No response.
446
+ C4. If you used existing packages (e.g., for preprocessing, for normalization, or for evaluation), did you report the implementation, model, and parameter settings used (e.g., NLTK, Spacy, ROUGE, etc.)? No response.
447
+
448
+ D Did you use human annotators (e.g., crowdworkers) or research with human participants? 6.3
449
+
450
+ D1. Did you report the full text of instructions given to participants, including e.g., screenshots, disclaimers of any risks to participants or annotators, etc.? No response.
451
+ D2. Did you report information about how you recruited (e.g., crowdsourcing platform, students) and paid participants, and discuss if such payment is adequate given the participants' demographic (e.g., country of residence)? No response.
452
+ D3. Did you discuss whether and how consent was obtained from people whose data you're using/curating? For example, if you collected data via crowdsourcing, did your instructions to crowdworkers explain how the data would be used? No response.
453
+ D4. Was the data collection protocol approved (or determined exempt) by an ethics review board? No response.
454
+ D5. Did you report the basic demographic and geographic characteristics of the annotator population that is the source of the data? No response.
backdooringneuralcodesearch/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a871f0e335a8694f33d9484f39edcef974a6ec6311840746bb0a3bf7c31a6dbc
3
+ size 800121
backdooringneuralcodesearch/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e8f7d6868bd67f6a21cfbbcff3aaf1c02c55b758f9704be3190dcbc555ede4e
3
+ size 515634
backpacklanguagemodels/55047e48-712a-4cfa-b088-831b9288b692_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8290c871801afce2e59cd58d65346b641b5f7541cf0df2da28e1f2ef0339a0c
3
+ size 152242
backpacklanguagemodels/55047e48-712a-4cfa-b088-831b9288b692_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df9b5a7802be7e32bd7374f78b3bda46a6ce80760a47958a3d3be061c04c2135
3
+ size 179287
backpacklanguagemodels/55047e48-712a-4cfa-b088-831b9288b692_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f3669adac8af5dfbdbe44731443fb10a44a42c507c6f920b9628058638d893a
3
+ size 731312
backpacklanguagemodels/full.md ADDED
@@ -0,0 +1,597 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Backpack Language Models
2
+
3
+ # John Hewitt John Thickstun Christopher D. Manning Percy Liang
4
+
5
+ Department of Computer Science, Stanford University {johnhew, jthickstun, manning, pliang}@cs.stanford.edu
6
+
7
+ # Abstract
8
+
9
+ We present **Backpacks:** a new neural architecture that marries strong modeling performance with an interface for interpretability and control. Backpacks learn multiple non-contextual sense vectors for each word in a vocabulary, and represent a word in a sequence as a context-dependent, non-negative linear combination of sense vectors in this sequence. We find that, after training, sense vectors specialize, each encoding a different aspect of a word. We can interpret a sense vector by inspecting its (non-contextual, linear) projection onto the output space, and intervene on these interpretable hooks to change the model's behavior in predictable ways. We train a 170M-parameter Backpack language model on OpenWebText, matching the loss of a GPT-2 small (124M-parameter) Transformer. On lexical similarity evaluations, we find that Backpack sense vectors outperform even a 6B-parameter Transformer LM's word embeddings. Finally, we present simple algorithms that intervene on sense vectors to perform controllable text generation and debiasing. For example, we can edit the sense vocabulary to tend more towards a topic, or localize a source of gender bias to a sense vector and globally suppress that sense.
10
+
11
+ # 1 Introduction
12
+
13
+ Consider the prefix The CEO believes that , and the problem of debiasing a neural language model's distribution over he/she. Intuitively, the bias for he originates in the word CEO, because replacing CEO with nurse flips the observed bias. A successful intervention to debias CEO must reliably apply in all contexts in which the word CEO appears; ideally we would want to make a non-contextual change to the model that has predictable effects in all contexts. In general, in all aspects of interpretability and control, it is desirable to make interventions with a tractable interface (e.g., noncontextual representations) that apply globally.
14
+
15
+ ![](images/2d23cd4f2a4a9eb581f40a0ae7c6ca8420c00bb957174d5ffa973ddd3bde68a0.jpg)
16
+ Figure 1: Transformers are monolithic functions of sequences. In Backpacks, the output is a weighted sum of non-contextual, learned word aspects.
17
+
18
+ Such interventions are difficult in Transformer models (Vaswani et al., 2017) because their contextual representations are monolithic functions of their input. Almost any intervention on the model has complex, non-linear effects that depend on context. We would instead like models that enable precise, rich interventions that apply predictably in all contexts, and are still expressive, so they are a viable alternative to Transformers.
19
+
20
+ We address these challenges with a new neural architecture, the Backpack, for which predictions are log-linear combinations of non-contextual representations. We represent each word in a vocabulary as a set of non-contextual sense vectors that represent distinct learned aspects of the word. For example, sense vectors for the word "science" could encode types of science, connections to technology, notions of science being "settled," or different aspects of the scientific process (replication or experiment) (Table 1). Sense vectors do not learn classic word sense, but more general aspects of a word's potential roles in different contexts; in fact, they can be seen as a multi-vector generalization of classic word vectors (Mikolov et al., 2013).
21
+
22
+ <table><tr><td colspan="5">A few senses of the word science</td></tr><tr><td>Sense 3</td><td>Sense 7</td><td>Sense 9</td><td>Sense 10</td><td>Sense 8</td></tr><tr><td>fiction</td><td>replication</td><td>religion</td><td>settled</td><td>clones</td></tr><tr><td>fictional</td><td>citation</td><td>rology</td><td>sett</td><td>experiments</td></tr><tr><td>Fiction</td><td>Hubble</td><td>hydra</td><td>settle</td><td>mage</td></tr><tr><td>literacy</td><td>reprodu</td><td>religions</td><td>unsett</td><td>experiment</td></tr><tr><td>denial</td><td>Discovery</td><td>nec</td><td>Sett</td><td>rats</td></tr></table>
23
+
24
+ <table><tr><td>MacBookHP = MacBook - Apple + HP</td></tr><tr><td>The MacBook is best known for its form factor, but HP has continued with its Linux-based computing strategy. HP introduced the Hyper 212 in 2014 and has continued to push soon-to-be-released 32-inch machines with Intel&#x27;s Skylake processors.</td></tr></table>
25
+
26
+ Table 1: Examples of the rich specialization of sense vectors representing the word science, and an example of editing sense vectors non-contextually (changing MacBook to be associated with HP) and having the resulting contextual predictions change.
27
+
28
+ To make interventions on sense vectors behave predictably in different contexts, a Backpack represents each word in a sequence as a linear combination of the sense vectors for all words in the sequence. The expressivity of a Backpack comes from the network that computes the weights of the linear combination as a function of the whole sequence; for example, in all our experiments we use a Transformer for this. Since sense vectors are softly selected depending on the context, they can specialize; each sense can learn to be predictively useful in only some contexts. The log-linear contribution of senses to predictions then implies that the interventions on sense vectors we demonstrate in Section 6 apply identically (up to a non-negative scalar weight) regardless of context.
29
+
30
+ Our experiments demonstrate the expressivity of Backpack language models, and the promise of interventions on sense vectors for interpretability and control. In Section 4 we train Backpack language models on 50B tokens (5 epochs) of OpenWebText; a Backpack with 124M parameters in the contextual network (and 46M parameters for sense vectors) achieves the perplexity of a 124M-parameter Transformer; thus one pays for more interpretability with a larger model size. In Section 5, we show that sense vectors specialize to encode rich notions of word meaning. Quantitatively, on four lexical similarity datasets (e.g., SimLex999), sense vectors of a 170M parameter Backpack outperform word embeddings of the 6B-parameter GPT-J-6B Transformer, and approach the performance of state-of-the-art specialized methods for this task. Finally, in Section 6 we show that sense vectors offer a control mechanism for Backpack language models. For example, stereotypically gendered profession words (e.g., "CEO" or "nurse") tend to learn a sense vector associated with this gender bias; by downscaling this sense vector, we greatly reduce disparity in contextual predictions in a limited setting.
31
+
32
+ # 2 The Backpack Architecture
33
+
34
+ In this section, we define the general form of the Backpack architecture. We then show how continuous bag-of-words word2vec (CBOW) (Mikolov et al., 2013) and Self-Attention-Only networks (Elhage et al., 2021; Olsson et al., 2022) are special cases of Backpacks.
35
+
36
+ # 2.1 Backpack General Form
37
+
38
+ A Backpack is a parametric function that maps a sequence of symbols $\mathbf{x}_{1:n} = (\mathbf{x}_1,\dots ,\mathbf{x}_n)$ to a sequence of vectors $\mathbf{o}_{1:n} = (\mathbf{o}_1,\dots ,\mathbf{o}_n)$ , where each symbol $\mathbf{x}_i$ belongs to a finite vocabulary $\mathcal{V}$ and $\mathbf{o}_i\in \mathbb{R}^d$ . We call $\mathbf{o}_i$ the Backpack representation of $\mathbf{x}_i$ in the context of a sequence $\mathbf{x}_{1:n}$ .
39
+
40
+ Sense vectors. For each $\mathbf{x} \in \mathcal{V}$ , a Backpack constructs $k$ sense vectors
41
+
42
+ $$
43
+ C (\mathbf {x}) _ {1}, \dots , C (\mathbf {x}) _ {k}, \tag {1}
44
+ $$
45
+
46
+ where $C:\mathcal{V}\to \mathbb{R}^{k\times d}$ . Sense vectors are a multivector analog to classic non-contextual word representations like word2vec or GloVe: we make this analogy precise in Section 2.2.
47
+
48
+ Weighted sum. For a sequence $\mathbf{x}_{1:n}$ , the representation $\mathbf{o}_i$ of element $\mathbf{x}_i$ is a weighted sum of the predictive sense vectors for the words in its context: given contextualization weights $\alpha \in \mathbb{R}^{k\times n\times n}$
49
+
50
+ $$
51
+ \mathbf {o} _ {i} = \sum_ {j = 1} ^ {n} \sum_ {\ell = 1} ^ {k} \alpha_ {\ell i j} C (\mathbf {x} _ {j}) _ {\ell}. \tag {2}
52
+ $$
53
+
54
+ The contextualization weights $\alpha_{\ell ij}$ of a Backpack are themselves defined by a (non-linear) contextualization function of the entire sequence $\mathbf{x}_{1:n}$ :
55
+
56
+ $$
57
+ \alpha = A \left(\mathbf {x} _ {1: n}\right), \tag {3}
58
+ $$
59
+
60
+ where $A:\mathcal{V}^n\to \mathbb{R}^{k\times n\times n}$
61
+
62
+ The name " Backpack" is inspired by the fact that a backpack is like a bag—but more orderly. Like a bag-of-words, a Backpack representation is a sum of non-contextual senses; but a Backpack is more orderly, because the weights in this sum depend on the ordered sequence.
63
+
64
+ Backpack Models. A Backpack model is a probabilistic model that defines probabilities over some output space $\mathcal{V}$ as a log-linear function of a Backpack representation $\mathbf{o}_{1:n} \in \mathbb{R}^{n \times d}$ :
65
+
66
+ $$
67
+ p (\mathbf {y} | \mathbf {o} _ {1: n}) = \operatorname {s o f t m a x} (E (\mathbf {o} _ {1: n})), \tag {4}
68
+ $$
69
+
70
+ where $\mathbf{y} \in \mathcal{V}$ and $E: \mathbb{R}^{n \times d} \to \mathbb{R}^{|Y|}$ is a linear transformation. Because Backpack models are log-linear in their representations, the sense vectors contribute log-linearly to predictions. This allows us to inspect a sense vector by projecting it onto the vocabulary via $E$ and observe exactly how it will contribute to predictions in any context.
71
+
72
+ Models parameterized by the prevailing deep neural architectures—including LSTMs (Hochreiter and Schmidhuber, 1997) and Transformers—are not Backpacks because their output representations are (relatively) unconstrained functions of the entire sequence. By contrast, Backpack models may seem limited in expressivity: the representations $\mathbf{o}_i$ are scalar-weighted sums of non-contextual vectors $C(\mathbf{x}_j)_\ell$ . Contextual relationships between sequence elements can only be expressed through the weights $\alpha = A(\mathbf{x}_{1:n})$ . Nevertheless, our experiments show that an expressive contextualization weight network can represent complex functions by weighted sums of sense vectors, e.g., our 170M parameter Backpack LM uses a 124M-parameter Transformer to compute $\alpha$ , and achieves the loss of a 124M-parameter Transformer LM.
73
+
74
+ To place Backpacks in some historical context, we now show how two existing architectures can be described as Backpacks.
75
+
76
+ # 2.2 Continuous Bag-of-Words is a Backpack
77
+
78
+ The continuous bag-of-words word2vec model defines a probability distribution over a center word $\mathbf{x}_c\in \mathcal{V}$ conditioned on $n$ context words $\mathbf{x}_{1:n}$ . The model proceeds to (1) construct vector embeddings $\mathbf{v_x}$ for each $\mathbf{x}\in \mathcal{V}$ , and (2) uniformly average the embeddings of the context words to predict the
79
+
80
+ center word:
81
+
82
+ $$
83
+ \overline {{\mathbf {v}}} _ {\mathbf {x} _ {c}} = \sum_ {i = 1} ^ {n} \frac {1}{n} \mathbf {v} _ {\mathbf {x} _ {i}}, \tag {5}
84
+ $$
85
+
86
+ $$
87
+ p \left(\mathbf {x} _ {c} \mid \mathbf {x} _ {1: n}\right) = \operatorname {s o f t m a x} \left(U \bar {\mathbf {v}} _ {\mathbf {x} _ {c}}\right), \tag {6}
88
+ $$
89
+
90
+ where $U\in \mathbb{R}^{\nu \times d}$ . We see that $\overline{\mathbf{v}}_{\mathbf{x}_c}$ is a Backpack representation by setting $C(\mathbf{x}) = \mathbf{v}_{\mathbf{x}}\in \mathbb{R}^{1\times d}$ in Equation (1) using a single sense vector $(k = 1)$ and setting the contextualization weights in Equation (3) to be uniform: $\alpha_{\ell ij} = \frac{1}{n}$ .
91
+
92
+ This connection to CBoW foreshadows the emergence of linguistic structures in the predictive sense vectors of Backpack models, just as these structures emerge in CBoW (Mikolov et al., 2013).
93
+
94
+ # 2.3 Single-Layer Self-Attention is a Backpack
95
+
96
+ The Backpack structure—define sense vectors (values), and use the sequence to determine how to sum them (weights)—may remind the reader of a single layer of self-attention. The key-query-value self-attention function is as follows:
97
+
98
+ $$
99
+ \mathbf {o} _ {j} = \sum_ {i = 1} ^ {n} \sum_ {\ell = 1} ^ {k} \alpha_ {\ell i j} O V ^ {(\ell)} \mathbf {x} _ {j} \tag {7}
100
+ $$
101
+
102
+ $$
103
+ \alpha_ {\ell} = \operatorname {s o f t m a x} \left(\mathbf {x} ^ {\top} K ^ {(\ell) \top} Q ^ {(\ell)} \mathbf {x}\right), \tag {8}
104
+ $$
105
+
106
+ where $\mathbf{x} \in \mathbb{R}^{n \times d}$ is (overloaded) to be a noncontextual embedding of the sequence, $O \in \mathbb{R}^{d \times d / k}$ , and $V^{(\ell)} \in \mathbb{R}^{d / k \times d}$ , where $k$ is the number of attention heads. The self-attention function is a Backpack with $C(\mathbf{x}_j)_\ell = OV^{(\ell)}\mathbf{x}_j$ . Self-attention-only networks are studied in the context of, e.g., mechanistic interpretability (Elhage et al., 2021). A Transformer composes blocks of self-attention and non-linear feed-forward layers that combine information from the whole sequence; unlike a Transformer, the contextualization weights of a Backpack each select a non-contextual sense of a single word.
107
+
108
+ # 3 Language Modeling with Backpacks
109
+
110
+ In this section, we define a neural autoregressive language model parameterized by a Backpack. We use the standard softmax parameterization of the probability over the next token in a sequence, with a weight matrix $E \in \mathbb{R}^{d \times |\mathcal{V}|}$ that maps a representation $\mathbf{o}_j \in \mathbb{R}^d$ to logits $E^\top \mathbf{o}_j \in \mathbb{R}^{|\mathcal{V}|}$ :
111
+
112
+ $$
113
+ p \left(\mathbf {x} _ {j} \mid \mathbf {x} _ {1: j - 1}\right) = \operatorname {s o f t m a x} \left(E ^ {\top} \mathbf {o} _ {j}\right). \tag {9}
114
+ $$
115
+
116
+ Recall (Section 2.1) that Backpack representations $\mathbf{o}_j$ are defined by sense vectors $C(\mathbf{x})$ and contextualization weights $\alpha_{j}$ . In Section 3.1 we describe a parameterization of $C$ for the predictive sense vectors in Equation (1), and in Section 3.2 we describe a parameterization of $A$ for the contextualization weight network in Equation (3). When $\mathbf{o}_j$ is parameterized by a Backpack, we call a model of the form given by Equation (9) a Backpack LM.
117
+
118
+ # 3.1 Parameterizing senses
119
+
120
+ For the sense function $C:\mathcal{V}\to \mathbb{R}^{k\times d}$ , we embed each $\mathbf{x}\in \mathcal{V}$ into $\mathbb{R}^d$ and pass these embeddings though a feed-forward network FF: $\mathbb{R}^d\to \mathbb{R}^{k\times d}$
121
+
122
+ $$
123
+ C (\mathbf {x}) = \operatorname {F F} (E \mathbf {x}), \tag {10}
124
+ $$
125
+
126
+ where the embedding/projection matrix $E$ is tied to the output matrix in Equation (9) (Press and Wolf, 2017). Note that we could define all $k \times |\mathcal{V}|$ sense vectors using a lookup table, but this would be an enormous number of parameters as $k$ grows large. Instead, we embed the words as $E\mathbf{x} \in \mathbb{R}^d$ , and then blow them up to $\mathbb{R}^{d \times k}$ using shared weights. This may explain the related sense roles observed for different word types in Section 5.1.
127
+
128
+ # 3.2 Parameterizing contextualization weights
129
+
130
+ We parameterize $A:\mathcal{V}^n\to \mathbb{R}^{k\times n\times n}$ using a standard Transformer, followed by a layer of multi-headed key-query self-attention. That is, we pass an embedded sequence through a Transformer
131
+
132
+ $$
133
+ \mathbf {h} _ {1: n} = \operatorname {T r a n s f o r m e r} \left(E \mathbf {x} _ {1: n}\right) \tag {11}
134
+ $$
135
+
136
+ (with proper autoregressive masking and some position representation) and compute $A(\mathbf{x}_{1:n}) = \alpha$ , where
137
+
138
+ $$
139
+ \alpha_ {\ell} = \operatorname {s o f t m a x} \left(\mathbf {h} _ {1: n} K ^ {(\ell) \top} Q ^ {(\ell)} \mathbf {h} _ {1: n} ^ {\top}\right), \tag {12}
140
+ $$
141
+
142
+ for each predictive sense $\ell = 1,\dots ,k$ with matrices $K^{(\ell)},Q^{(\ell)}\in \mathbb{R}^{d\times d / k}$ . We can think of the $k$ senses as heads and, for each head, the contextualization weights define a distribution of attention over words.3
143
+
144
+ # 4 Experiments Training Backpack LMs
145
+
146
+ In this section we specify the hyperparameters used to train Backpack and Transformer language models (Section 4.1), data and optimization procedure
147
+
148
+ (Section 4.2), evaluations (Section 4.3) and results (Section 4.4). We also show the necessity of learning $k > 1$ sense vectors to achieve strong language modeling performance (Section 4.5).
149
+
150
+ # 4.1 Models
151
+
152
+ We train three Transformer baseline models, which we label Micro (30M parameters), Mini (70M parameters), and Small (124M parameters; the same size as GPT-2 small). We also train Micro (40M), Mini (100M), and Small (170M) Backpack language models, for which the weighting function (Equation 11) is parameterized using the corresponding Transformer, and almost all extra parameters are in the non-contextual sense vectors. Backpacks thus cost extra parameters and compute beyond their underlying contextualization network. Except where stated, we use $k = 16$ sense vectors in all Backpacks (Section A).
153
+
154
+ We use a reduced sequence length of 512 for all models, and the 50,257-subword GPT-2 tokenizer. Model hidden dimensionalities, layer counts, and head counts are reported in Table 9.
155
+
156
+ # 4.2 Data & Optimization
157
+
158
+ We train all models on OpenWebText (Gokaslan and Cohen, 2019), a publicly available approximate reconstruction of the English WebText corpus used to train the GPT-2 family of models (Radford et al., 2019). We use a batch size of 524,288 tokens, and train all models for 100,000 gradient steps for a total of 52B tokens; training for longer is known to make marginal difference for small models (Hoffmann et al., 2022). The size of OpenWebText means this is roughly 5 epochs. We use cross-entropy loss and the AdamW optimizer, with a warmup of 5,000 steps and linear decay to zero.
159
+
160
+ # 4.3 Evaluations
161
+
162
+ Before our experiments in interpretability and control, we check the expressivity of Backpacks. We evaluate models on perplexity for a held out set of OpenWebText, perplexity and accuracy for the (OpenAI variant of) LAMBADA evaluation of long-distance dependencies (Radford et al., 2019; Paperno et al., 2016), perplexity on Wikitext (Mery et al., 2017), and BLiMP English linguistic competence accuracy (Warstadt et al., 2020) evaluated using the EleutherAI harness (Gao et al., 2021) (Version 1).
163
+
164
+ <table><tr><td>Model</td><td>OpenWebText PPL ↓</td><td>LAMBADA PPL ↓</td><td>LAMBADA ACC ↑</td><td>Wikitext PPL ↓</td><td>BLiMP ↑</td></tr><tr><td>Backpack-Micro</td><td>31.5</td><td>110</td><td>24.7</td><td>71.5</td><td>75.6</td></tr><tr><td>Transformer-Micro</td><td>34.4</td><td>201</td><td>21.3</td><td>79.5</td><td>77.8</td></tr><tr><td>Backpack-Mini</td><td>23.5</td><td>42.7</td><td>31.6</td><td>49.0</td><td>76.2</td></tr><tr><td>Transformer-Mini</td><td>24.5</td><td>58.8</td><td>29.7</td><td>52.8</td><td>80.4</td></tr><tr><td>Backpack-Small</td><td>20.1</td><td>26.5</td><td>37.5</td><td>40.9</td><td>76.3</td></tr><tr><td>Transformer-Small</td><td>20.2</td><td>32.7</td><td>34.9</td><td>42.2</td><td>81.9</td></tr></table>
165
+
166
+ Table 2: Language modeling performance; all models trained for 100k steps, 500K token batch size, on OWT. For PPL, lower is better; for accuracy, higher is better. Note that models are not parameter-comparable; each Backpack has a matched-size Transformer in its contextualization network.
167
+
168
+ # 4.4 Discussion
169
+
170
+ Comparing each Backpack LM to a Transformer LM of equivalent specification to the Backpack's contextualization network, we see that the Backpack performs roughly as well (Table 2). Again, the Backpack has more parameters, a tax for the interface provided by sense vectors. During training, we find that Backpack language models take longer to converge than Transformers. Curiously, while the Small Backpack and Transformer achieve almost identical OWT perplexity, the Backpack language models perform substantially better on LAMBADA and Wikitext, but worse on BLiMP.
171
+
172
+ # 4.5 Effect of varying the number of senses
173
+
174
+ To study the impact of the number of sense vectors on language modeling performance, we train Mini-sized Backpack language models on a reduced schedule of 50,000 gradient steps, for $k \in \{1,4,16,64\}$ sense vectors. The perplexities for $k = 1,4,16,64$ are 38.6, 29.3, 26.0, and 24.1, demonstrating the necessity of a non-singleton set of sense vectors. Table 8 contains the full results.
175
+
176
+ # 5 Emergent Structure in Sense Vectors
177
+
178
+ Backpack language model sense vectors are not trained using a supervised notion of word sense, but implicitly specialize to encode different shades of a word's predictive use. In this section, we qualitatively examine sense vectors (Section 5.1) and quantitatively demonstrate their effectiveness in computing lexical similarity and relatedness (Section 5.2). Taken together, this suggests that sense vectors can provide a high-level interface for intervention, which we explore in Section 6.
179
+
180
+ # 5.1 Visualizing Senses
181
+
182
+ Empirically, trained Backpack models associate specific sense vector indices with different roles for
183
+
184
+ prediction. We interpret these roles by picking a sense $\ell$ of a word $\mathbf{x}$ , and projecting this sense onto the word embeddings: $E^{\top}C(\mathbf{x})_{\ell} \in \mathbb{R}^{|\mathcal{V}|}$ . Note that this is exactly (up to a scalar) how this sense contributes to any prediction of the model. We interpret a sense vector's role by reporting the words with the highest score under this projection.
185
+
186
+ Table 3 visualizes a few of these senses. For example, sense 12 seems to encode a broad notion of relatedness for almost all words; sense 3 encodes particulars of the bigram distribution given x; sense 14 seems to encode both associated objects for verbs, and noun modifier dependency children for nouns. In Section 5.2 we show that sense 14 encodes a powerful notion of verb similarity.
187
+
188
+ # 5.2 Lexical Relationship Tests
189
+
190
+ Classic lexical-relatedness and similarity tests measure the extent to which a similarity function on pairs of words correlates with human-elicited notions of similarity. Similarity functions derived from word embeddings are evaluated by Spearman correlation between the predicted and true similarity rank-order. Early non-contextual embeddings like COALS (Rohde et al., 2005), word2vec (Mikolov et al., 2013), and GloVe (Pennington et al., 2014) have recently been outperformed by word embeddings derived by distillation of contextual networks (Bommasani et al., 2020; Gupta and Jaggi, 2021; Chronis and Erk, 2020). We evaluate Backpack LM sense vectors on similarity datasets SimLex999 (Hill et al., 2015), SimVerb3500 (Gerz et al., 2016), and relatedness datasets RG65 (Rubenstein and Goodenough, 1965) and (Agirre et al., 2009).
191
+
192
+ $\mathbf{Sense}_{\ell}$ Cosine. For all $\ell \in \{1,\dots ,k\}$ , we define a similarity function based only on sense $\ell$ :
193
+
194
+ $$
195
+ \operatorname {S i m} _ {\ell} (\mathbf {x}, \mathbf {x} ^ {\prime}) = \operatorname {c o s s i m} (C (\mathbf {x}) _ {\ell}, C (\mathbf {x} ^ {\prime}) _ {\ell}), \tag {13}
196
+ $$
197
+
198
+ Sense 12 (relatedness)
199
+
200
+ <table><tr><td>tasty</td><td>quickly</td><td>Apple</td><td>believe</td></tr><tr><td>tasty</td><td>quick</td><td>Apple</td><td>belief</td></tr><tr><td>culinary</td><td>quickest</td><td>Apple</td><td>Belief</td></tr><tr><td>tasted</td><td>quick</td><td>iPhone</td><td>beliefs</td></tr><tr><td>delicious</td><td>quicker</td><td>iPhone</td><td>believing</td></tr><tr><td>taste</td><td>fast</td><td>iPhones</td><td>believe</td></tr></table>
201
+
202
+ Sense 14 (Verb objects, nmod nouns)
203
+
204
+ <table><tr><td>build</td><td>attest</td><td>importance</td><td>appreciate</td></tr><tr><td>bridges</td><td>worthiness</td><td>maintaining</td><td>finer</td></tr><tr><td>wall</td><td>Published</td><td>wellbeing</td><td>nuance</td></tr><tr><td>lasting</td><td>superiority</td><td>teamwork</td><td>beauty</td></tr><tr><td>ig</td><td>accuracy</td><td>plurality</td><td>irony</td></tr><tr><td>rapport</td><td>validity</td><td>upholding</td><td>simplicity</td></tr></table>
205
+
206
+ Sense 3 (next wordpiece)
207
+
208
+ <table><tr><td>pizza</td><td>interest</td><td>the</td></tr><tr><td>cutter</td><td>rate</td><td>slightest</td></tr><tr><td>tracker</td><td>rates</td><td>same</td></tr><tr><td>iol</td><td>groups</td><td>entirety</td></tr><tr><td>makers</td><td>waivers</td><td>rest</td></tr><tr><td>maker</td><td>waiver</td><td>latter</td></tr></table>
209
+
210
+ Sense 7 (Proper Noun Associations)
211
+
212
+ <table><tr><td>Apple</td><td>Obama</td><td>Messi</td></tr><tr><td>macOS</td><td>Dreams</td><td>Messi</td></tr><tr><td>iCloud</td><td>Barack</td><td>Argentina</td></tr><tr><td>Siri</td><td>Ob</td><td>Mess</td></tr><tr><td>iOS</td><td>Michelle</td><td>Barcelona</td></tr><tr><td>tv</td><td>Jeremiah</td><td>iesta</td></tr></table>
213
+
214
+ Table 3: Visualization of how the same sense index across many words encodes fine-grained notions of meaning, relatedness, and predictive utility. Each sense is given a label thought up by the authors, and for a few words, the target words that are highest scored by the sense vector.
215
+
216
+ <table><tr><td>Model</td><td>SL999</td><td>SV3500</td><td>RG65</td><td>WS353</td></tr><tr><td colspan="5">Classic Non-Contextual Embeddings</td></tr><tr><td>word2vec</td><td>0.442</td><td>0.367</td><td>0.679</td><td>0.684</td></tr><tr><td>GloVe</td><td>0.371</td><td>0.227</td><td>0.687</td><td>0.607</td></tr><tr><td colspan="5">Embeddings from large existing models</td></tr><tr><td>GPT2-1.5B</td><td>0.523</td><td>0.418</td><td>0.670</td><td>0.706</td></tr><tr><td>GPT-J-6B</td><td>0.492</td><td>0.374</td><td>0.766</td><td>0.673</td></tr><tr><td colspan="5">Embeddings from our models + baseline Transformer</td></tr><tr><td>Trnsf 124M</td><td>0.478</td><td>0.363</td><td>0.634</td><td>0.681</td></tr><tr><td>Sim12(ours)</td><td>0.522</td><td>0.471</td><td>0.754</td><td>0.749</td></tr><tr><td>Sim14(ours)</td><td>0.500</td><td>0.502</td><td>0.591</td><td>0.655</td></tr><tr><td>Simmin(ours)</td><td>0.540</td><td>0.471</td><td>0.653</td><td>0.607</td></tr><tr><td colspan="5">Special-purpose SOTA models</td></tr><tr><td>SOTA (Single)</td><td>0.554</td><td>0.473</td><td>0.835</td><td>0.764</td></tr><tr><td>SOTA (Multi)</td><td>0.605</td><td>0.528</td><td>-</td><td>0.807</td></tr></table>
217
+
218
+ Table 4: Results on lexical similarity evaluation. All numbers are Spearman correlations; higher is better.
219
+
220
+ where cossim is cosine similarity. Intuitively, we expect that some senses may specialize to learn lexical relatedness or similarity.
221
+
222
+ Minimum Sense Cosine. Because each sense encodes a different aspect of a word's meaning, we might expect that highly similar words are similar across all senses. We test for this strong form of similarity using
223
+
224
+ $$
225
+ \operatorname {S i m} _ {\min } \left(\mathbf {x}, \mathbf {x} ^ {\prime}\right) = \min _ {\ell} \operatorname {S i m} _ {\ell} \left(\mathbf {x}, \mathbf {x} ^ {\prime}\right) \tag {14}
226
+ $$
227
+
228
+ Other methods. We evaluate embeddings from the tied softmax/embedding matrices of the much larger GPT-2-1.5B (Radford et al., 2019) and GPT-J-6B (Wang and Komatsuzaki, 2021), classic word embeddings (from Bommasani et al. (2020)) and
229
+
230
+ state-of-the art specialized methods using either a single vector per word (Gupta, 2021) or many vectors (Chronis and Erk, 2020).
231
+
232
+ Discussion. Sense 12 (the "synonym" sense) performs well across datasets, matching or outperforming embeddings like GPT-2-1.5B and GPT-J-6B (Except GPT-J-6B on RG-65). Sense 14, the "verb objects" sense, performs best on just verb similarity (VerbSim3500), and the minimum similarity over senses works especially well on noun lexical similarity (SimLex999.) Our methods approach the performance of state-of-the-art methods; despite being trained for a very different task, sense vectors encode substantial lexical information (Table 4).
233
+
234
+ # 6 Sense Vectors for Control
235
+
236
+ In this section, we demonstrate several proof-of-concept methods that leverage sense vectors for controlling LM behavior.
237
+
238
+ # 6.1 Topic-controlled generation
239
+
240
+ Given a bag-of-words target $b \in \mathbb{R}^{|\mathcal{V}|}$ , e.g., arts, culture, we would like to bias generation towards sequences related to concepts related to these terms. Our algorithm proceeds in three parts. First, we sort sense vectors by log-probability assigned to $b$ , that is, $b^{\top}(E^{\top}C(\mathbf{x})_{\ell})$ . Second, based on the scores, we assign a re-weighting factor $\delta$ to each sense; senses with the higher scores weighted more. (See Section D for details.) Third, we generate from
241
+
242
+ ![](images/c6e94d712cfa82cb6bde637ebeb2f864a5f0ab22acadb3a34b608d0898602883.jpg)
243
+ Figure 2: Results in controlling topic via sense intervention in Backpacks, and PPLM in Transformers.
244
+
245
+ the Backpack using the re-weighted sense vectors, reducing $\delta$ back to 1 as the topic is introduced. The updated backpack equation is
246
+
247
+ $$
248
+ \mathbf {o} _ {i} = \sum_ {j = 1} ^ {n} \sum_ {\ell = 1} ^ {k} \alpha_ {\ell i j} \delta_ {\ell i j} C \left(\mathbf {x} _ {j}\right) _ {\ell}, \tag {15}
249
+ $$
250
+
251
+ where $\delta_{ij\ell}$ is the re-weighting. Intuitively, the semantic coherence of sense vectors may imply that upweighting senses with affinity to the target bag-of-words richly upweights related words and topics. We give details as to how we perform the sense reweighting and the annealing in Section D.
252
+
253
+ Evaluation. We use the label descriptors of the topic classifier of Antypas et al. (2022), with 17 categories (sports, arts & culture, health,...), as the bag-of-words for control. We evaluate control accuracy as the percent of generations to which the classifier assigns the correct topic label, and overall generation quality and diversity using MAUVE scores (Pillutla et al., 2021).<sup>6</sup>
254
+
255
+ Results. We compare to Plug-and-Play Language Models (PPLM; Dathathri et al. (2019)), a considerably slower, gradient-based control method using our Small Transformer model. We generate 500 samples from each model for each topic across a range of strengths of control. We find that sense controlled generation provides at least as strong control as PPLM (Figure 2), though the MAUVE scores of the unmodified Transformer are higher than the Backpack.) Results and examples are provided in the Appendix in Tables 12, 16, 17, 18.
256
+
257
+ <table><tr><td>Model</td><td>Bias Ratio ↓</td><td>Reduction %</td></tr><tr><td>Unbiased</td><td>1</td><td>-</td></tr><tr><td>Transformer</td><td></td><td></td></tr><tr><td>Unmodified</td><td>7.02</td><td>-</td></tr><tr><td>Project-Nullspace</td><td>6.72</td><td>5%</td></tr><tr><td>Optimize-Nullspace</td><td>7.02</td><td>0%</td></tr><tr><td>Backpack</td><td></td><td></td></tr><tr><td>Unmodified</td><td>4.34</td><td>-</td></tr><tr><td>Remove-Sense10</td><td>2.88</td><td>44%</td></tr><tr><td>Optimize-Sense10</td><td>2.16</td><td>65%</td></tr></table>
258
+
259
+ Table 5: Pronoun-based gender bias reduction in a limited setting.
260
+
261
+ # 6.2 Mitigating gender bias
262
+
263
+ Through inspection, we learned that sense vector 10 of many stereotypically gendered profession nouns (nurse, CEO, teacher) coherently express the stereotype through pronouns. Table 13 gives examples of these senses. We attempt to mitigate gender bias in Backpack behavior on these gendered profession nouns by turning down sense 10 (multiplying by a scalar less than 1).
264
+
265
+ We took an existing set of stereotypically gendered profession nouns from WinoBias (Zhao et al., 2018), and constructed a simplified setting in which a single profession word is in each context, and a third-person nominative pronoun (e.g., he/she/they) is acceptable, e.g., My CEO said that_. The full set of nouns and prompts is in Section D.2. We evaluate models on the average of the bias of probabilities of him vs her as follows:
266
+
267
+ $$
268
+ \underset {\mathbf {x} \in \text {p r o m p t s}} {\mathbb {E}} \left[ \max \left(\frac {p (\mathrm {h e} \mid \mathbf {x})}{p (\mathrm {s h e} \mid \mathbf {x})}, \frac {p (\mathrm {s h e} \mid \mathbf {x})}{p (\mathrm {h e} \mid \mathbf {x})}\right) \right].
269
+ $$
270
+
271
+ Baseline. To debias a Transformer with an analogous method, we take inspiration from Bolukbasi et al. (2016). We take $E\mathbf{x}_{\mathrm{he}} - E\mathbf{x}_{\mathrm{she}}$ as an estimate of a gender bias direction, and project the embedding $E\mathbf{x}_{\mathrm{nurse}}$ either to the nullspace of this direction or only partially remove it.
272
+
273
+ Results. A perfectly unbiased model would achieve ratio 1, whereas the unmodified Transformer achieves 7, and with nullspace projection, 6.72 (Table 5). Finding the optimal fraction of the gender bias direction to remove per profession does not improve further. For Backpacks, we find that removing sense 10 from the profession word (setting it to zero) reduces the bias score from 4.34 to 2.88. Learning the optimal removal fraction per profession achieves 2.16, for a total reduction of
274
+
275
+ ![](images/0ac9f48fd5d46cd7048e0e171608cde5863235e645e86e4d3c2fac58db3e04fe.jpg)
276
+ Figure 3: The effect on the conditional probability distribution of a Backpack LM on the prefix when the nurse walked into the room, of modulating the effect of sense 10 of nurse from 0 (totally removed) to 1 (original.)
277
+
278
+ <table><tr><td>The MacBook is best known for its form factor, but HP has continued with its Linux-based computing strategy. HP introduced the Hyper 212 in 2014 and has continued to push soon-to-be-released 32-inch machines with Intel&#x27;s Skylake processors.</td></tr></table>
279
+
280
+ <table><tr><td>The MacBook didn’t come into the picture until 2000, when HP followed up with a 15-year flood of HP available laptops.</td></tr></table>
281
+
282
+ <table><tr><td>I was thinking about Brady&#x27;s role on the Colts before joining other high-profile signings. This is what McElhaney and I discussed.</td></tr></table>
283
+
284
+ McElhaney: Look, what I didn't mean by this is we didn't move. We think that we're getting a lot better, too.
285
+
286
+ Table 6: Samples from a Backpack wherein Apple has been projected out of the MacBook sense embeddings, and replaced with HP. Likewise with Brady, Patriots, and Colts. Prompts are bolded.
287
+
288
+ $65\%$ .<sup>7</sup> In Figure 3, we demonstrate the clear effect of ablating sense 10 on the most likely words in one of these contexts.<sup>8</sup>
289
+
290
+ # 6.3 Knowledge editing
291
+
292
+ Sense vectors show promise for use in knowledge editing (De Cao et al., 2021)—editing a model's predictions about world knowledge. In particular, many associations with proper nouns can be localized to sense vectors in that noun. In this qualitative proof-of-concept, we edit the sense vectors of a target word $\mathbf{x}$ (e.g., MacBook to remove associations with a word $\mathbf{x}_r$ (e.g., Apple) and replace those associations with another word $\mathbf{x}_a$ (e.g., HP). Intuitively, this intervention ensures that whenever the contextualization weights would point to a sense vector in MacBook to predict words associated with Apple, it now predicts words associated with HP.
293
+
294
+ We project each sense vector of $\mathbf{x}$ to the nullspace of $E\mathbf{x}_r$ , and then add in $E\mathbf{x}_a$ :
295
+
296
+ $$
297
+ \tilde {C} (\mathbf {x}) _ {\ell} = C (\mathbf {x}) _ {\ell} + \frac {C (\mathbf {x}) _ {\ell} ^ {\top} E \mathbf {x} _ {r}}{\| C (\mathbf {x} _ {r}) _ {\ell} \| _ {2} ^ {2}} \left(\frac {E \mathbf {x} _ {a}}{\phi} - E \mathbf {x} _ {r}\right),
298
+ $$
299
+
300
+ where $\phi = \frac{\|E\mathbf{x}_a\|^2}{\|E\mathbf{x}_r\|^2}$ is a normalization term to account for the differing norms of $E\mathbf{x}_a$ and $E\mathbf{x}_r$ . Intuitively, this projection modifies each sense vector in measure proportional to how much $\mathbf{x}_r$ was predicted by that sense. So, senses of MacBook that would added mass to Apple now add mass to HP; unrelated senses are not affected. In Table 6, we show samples providing intuition for how MacBook evokes HP instead of Apple, but is otherwise semantically and syntactically maintained.
301
+
302
+ # 7 Related Work
303
+
304
+ Representation learning in NLP. Learning probabilistic models of text for use in representation learning and identifying resulting structure has a long history in NLP, from non-contextual word vectors (Schütze, 1992; Rohde et al., 2005; Turney, 2010; Mikolov et al., 2013; Bojanowski et al., 2017) to contextual networks (Elman, 1990; Bengio et al., 2000; Collobert and Weston, 2008; Sutskever et al., 2011; Peters et al., 2018; Radford et al., 2018). Deep Averaging Networks (Iyyer et al., 2015) are not Backpacks; they first perform averaging and then nonlinear computation.
305
+
306
+ Interpretability for Control of NLP networks. A burgeoning body of work attempts to intervene on monolithic neural networks for interpretability and control (Meng et al., 2022, 2023), and for mechanistic understanding (Olsen et al., 2021; Elhage et al., 2021). Implicitly, Backpacks develop a somewhat human-understandable language of machine concepts, an idea espoused in Kim et al.
307
+
308
+ (2018); Koh et al. (2020). The connections between interpretation and control are rich; much work has gone into the detection and extraction of emergent structure in networks (Hupkes et al., 2018; Liu et al., 2019) as well as subsequently modulating behavior (Lakretz et al., 2019; Eisape et al., 2022).
309
+
310
+ Generalized Additive Models. Generalized Additive Models (GAMs; Hastie and Tibshirani (1986)) are a function family that (1) independently transforms each input feature, (2) sums these transformations of inputs and (3) applies a non-linear link function (e.g., softmax):
311
+
312
+ $$
313
+ f \left(\mathbf {x} _ {1: n}\right) = \Phi \left(r _ {1} \left(x _ {i}\right) + \dots + r _ {n} \left(x _ {n}\right)\right) \tag {16}
314
+ $$
315
+
316
+ Treating each word-position pair as a feature, Backpacks are not GAMs because they include a weighting $\alpha$ that depends on all features. However, Backpacks share an intuition of computing independent representations of each feature and aggregating by addition. Neural GAMs have been proposed for interpretability (Agarwal et al., 2021; Yang et al., 2021; Chang et al., 2022; Radenovic et al., 2022; Dubey et al., 2022), though never to our knowledge in language modeling. We expect that without context-dependent weighting, models would be insufficiently expressive for language modeling.
317
+
318
+ # 8 Discussion
319
+
320
+ In this section, we address a few natural questions about the expressivity and interpretability of Backpacks, highlighting the limits of our knowledge.
321
+
322
+ # How do Backpacks compare to architecture X?
323
+
324
+ The Backpack structure does not depend upon using a Transformer to compute the contextualization weights. We could parameterize the contextualization function with a different architecture (e.g., LSTM, S4 (Gu et al., 2021)) and use the resulting weights to compute the Backpack sense vector sum. This architecture, e.g., the Backpack-S4, could then be compared to the standard S4 architecture.
325
+
326
+ # Are Backpacks as expressive as Transformers?
327
+
328
+ We don't know. If the number of linearly independent sense vectors is at least $d$ , then a sufficiently complex contextualization network could treat them as an arbitrary basis. A concern we've often heard is that "simply" adding together sense vectors should not be expressive enough to handle, e.g., negation. However, as long as the requisite
329
+
330
+ building blocks exist in the prefix, a contextualization network that recognizes the negation or other property could properly distribute weights.
331
+
332
+ Are Backpacks inherently interpretable? No, but we believe no architecture is. Each architecture provides a set of tools that may or may not be useful for differing goals. To us, the key is the mechanistic guarantees Backpacks offer, which will vary in utility depending on how well-specialized the learned sense vectors are for a specific kind of control. Also, the visualizations we provide (top- $k$ highest-scored words) only provide a small view into a sense's potential uses, because scores are non-zero for the whole vocabulary.
333
+
334
+ Are Backpacks as compute-efficient as Transformers? At a glance, no. Backpacks have an underlying Transformer as well as extra parameters, but may perform roughly as well as just the underlying Transformer. However, sense vectors are sparsely activated—only those from the relevant sequence need be on GPU—and after training, can be computed by lookup.
335
+
336
+ Why do sense vectors specialize? Ablations in Table 8 show that they should at least learn to be linearly independent, since linear dependence is equivalent to having fewer sense vectors, which causes higher perplexity. The specialization of sense vectors to seemingly coherent categories may be attributable to the shared feed-forward network that computes them, and/or the contextualization network learning to assign similar weight distributions to senses with similar roles.
337
+
338
+ Are sense vectors like "word senses?" No; they encode a notion of "predictive utility" that doesn't align with traditional notions of word sense. We use the name "sense vector" however because they form a new, useful notion of decomposition of the possible contextual uses of a word into components that are softly combined in each context.
339
+
340
+ # 9 Conclusion
341
+
342
+ Non-contextual word2vec embeddings initiated modern deep learning research in NLP, and have fascinating geometric structure. Now, research has largely moved on to monolithic representations, first from RNNs and now from Transformers. Our work suggests that we can have both rich lexical structure and interventions, and strong contextual performance, in a single model.
343
+
344
+ # 10 Acknowledgements
345
+
346
+ The authors would like to thank Anita Kamath, Steven Cao, Xiang Lisa Li, Ian Covert, and the Stanford NLP Group community for useful discussions. Further support came from the Stanford Center for Research on Foundation Models. Christopher Manning is a CIFAR Fellow. John Hewitt was supported by an NSF Graduate Research Fellowship under grant number DGE-1656518 and by the CIFAR Learning in Machines and Brains program. We gratefully acknowledge the support of a PECASE Award to Percy Liang.
347
+
348
+ # 11 Limitations
349
+
350
+ There is a fundamental uncertainty in whether Backpack language models will continue to scale with parameters and data and be viable alternatives to Transformers at larger model scales. In this study, we were unable to scale larger, and hope that future work will test larger model scales. In a similar vein, we do not verify that Backpack language models perform well across multiple languages. We also do not consider, e.g., finetuning Backpacks on other tasks, or masked language modeling—there is a wide range of possible uses that remain to be verified.
351
+
352
+ One potential obstacle to the use of Backpacks that we do not study is the effect of tokenization in languages with richer morphological structure than English—will the Backpack structure be amenable to modeling those languages? This may be difficult because, intuitively, the interpretability and control of Backpacks relates to the semantics of individual tokens. Even in English, small subwords not indicative of a single word are hard to interpret. What we hope to have provided is a sufficient set of experiments to motivate the further exploration of Backpacks.
353
+
354
+ # 12 Ethics
355
+
356
+ This paper describes and releases an open-domain language model trained on a largely unfiltered subsection of the (mostly English portions of the) textual internet, and describes methods for interpreting and controlling said model. Any control method that can be used to help understand and guide the generation of a model can be used to more effectively generate toxic or illegal content. Despite this, we do expect that, overall, the benefit of deeper insight into Backpack language models is a step
357
+
358
+ in the right direction. In particular, explanations based on the structure of Backpacks may be able to provide insights into the mechanisms behind model behaviors, increasing transparency.
359
+
360
+ The concrete models we will release, up to and including 170M parameters, are substantially smaller and less performant at generating text than many of the publicly and commercially available language models available right now, so we do not expect there to be considerable negative repercussions from the release of the artifacts. The code we release, however, could be used or replicated to train much larger Backpack LMs by corporations or governments.
361
+
362
+ # References
363
+
364
+ Rishabh Agarwal, Levi Melnick, Nicholas Frosst, Xuezhou Zhang, Ben Lengerich, Rich Caruana, and Geoffrey E Hinton. 2021. Neural additive models: Interpretable machine learning with neural nets. Advances in Neural Information Processing Systems, 34:4699-4711.
365
+ Eneko Agirre, Enrique Alfonseca, Keith Hall, Jana Kravalova, Marius Paça, and Aitor Soroa. 2009. A study on similarity and relatedness using distributional and WordNet-based approaches. In Proceedings of Human Language Technologies: The 2009 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 19-27, Boulder, Colorado. Association for Computational Linguistics.
366
+ Dimosthenis Antypas, Asahi Ushio, Jose Camacho-Collados, Vitor Silva, Leonardo Neves, and Francesco Barbieri. 2022. Twitter topic classification. In Proceedings of the 29th International Conference on Computational Linguistics, pages 3386-3400, Gyeongju, Republic of Korea. International Committee on Computational Linguistics.
367
+ Yoshua Bengio, Réjean Ducharme, and Pascal Vincent. 2000. A neural probabilistic language model. Advances in neural information processing systems, 13.
368
+ Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. 2017. Enriching word vectors with subword information. Transactions of the Association for Computational Linguistics, 5:135-146.
369
+ Tolga Bolukbasi, Kai-Wei Chang, James Y Zou, Venkatesh Saligram, and Adam T Kalai. 2016. Man is to computer programmer as woman is to homemaker? Debiasing word embeddings. Advances in neural information processing systems, 29.
370
+ Rishi Bommasani, Kelly Davis, and Claire Cardie. 2020. Interpreting Pretrained Contextualized Representations via Reductions to Static Embeddings. In Proceedings of the 58th Annual Meeting of the Asso
371
+
372
+ ciation for Computational Linguistics, pages 4758- 4781, Online. Association for Computational Linguistics.
373
+ Chun-Hao Chang, Rich Caruana, and Anna Goldenberg. 2022. NODE-GAM: Neural generalized additive model for interpretable deep learning. In International Conference on Learning Representations.
374
+ Gabriella Chronis and Katrin Erk. 2020. When is a bishop not like a rook? when it's like a rabbi! Multiprototype BERT embeddings for estimating semantic relationships. In Proceedings of the 24th Conference on Computational Natural Language Learning, pages 227-244.
375
+ 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, pages 160-167.
376
+ Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Re. 2022. FlashAttention: Fast and memory-efficient exact attention with IO-awareness. In Advances in Neural Information Processing Systems.
377
+ Sumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung, Eric Frank, Piero Molino, Jason Yosinski, and Rosanne Liu. 2019. Plug and play language models: A simple approach to controlled text generation. In International Conference on Learning Representations.
378
+ Nicola De Cao, Wilker Aziz, and Ivan Titov. 2021. Editing factual knowledge in language models. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6491-6506.
379
+ Abhimanyu Dubey, Filip Radenovic, and Dhruv Mahajan. 2022. Scalable interpretability via polynomials. In Advances in Neural Information Processing Systems.
380
+ Tiwalayo Eisape, Vineet Gangireddy, Roger P. Levy, and Yoon Kim. 2022. Probing for incremental parse states in autoregressive language models. In Findings of EMNLP 2022.
381
+ Nelson Elhage, Neel Nanda, Catherine Olsson, Tom Henighan, Nicholas Joseph, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Nova DasSarma, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. 2021. A mathematical framework for transformer circuits. Transformer Circuits Thread.
382
+ Jeffrey L Elman. 1990. Finding structure in time. Cognitive science, 14(2):179-211.
383
+
384
+ Leo Gao, Jonathan Tow, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Kyle McDonell, Niklas Muennighoff, Jason Phang, Laria Reynolds, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou. 2021. A framework for few-shot language model evaluation.
385
+ Daniela Gerz, Ivan Vulić, Felix Hill, Roi Reichart, and Anna Korhonen. 2016. SimVerb-3500: A large-scale evaluation set of verb similarity. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2173-2182, Austin, Texas. Association for Computational Linguistics.
386
+ Aaron Gokaslan and Vanya Cohen. 2019. Openwebtext corpus. http://skylion007.github.io/OpenWebTextCorpus.
387
+ Albert Gu, Karan Goel, and Christopher Re. 2021. Efficiently modeling long sequences with structured state spaces. In International Conference on Learning Representations.
388
+ Prakhar Gupta and Martin Jaggi. 2021. Obtaining better static word embeddings using contextual embedding 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 5241-5253.
389
+ Vikram Gupta. 2021. Multilingual and multilabel emotion recognition using virtual adversarial training. In Proceedings of the 1st Workshop on Multilingual Representation Learning, pages 74-85, Punta Cana, Dominican Republic. Association for Computational Linguistics.
390
+ Charles R. Harris, K. Jarrod Millman, Stefan J. van der Walt, Ralf Gommers, Pauli Virtanen, David Cournaepau, Eric Wieser, Julian Taylor, Sebastian Berg, Nathaniel J. Smith, Robert Kern, Matti Picus, Stephan Hoyer, Marten H. van Kerkwijk, Matthew Brett, Allan Haldane, Jaime Fernandez del Rio, Mark Wiebe, Pearu Peterson, Pierre Gerard-Marchant, Kevin Sheppard, Tyler Reddy, Warren Weckesser, Hameer Abbasi, Christoph Gohlke, and Travis E. Oliphant. 2020. Array programming with NumPy. Nature, 585(7825):357-362.
391
+ Trevor Hastie and Robert Tibshirani. 1986. Generalized additive models. Statistical Science, 1(3):297-318.
392
+ Felix Hill, Roi Reichart, and Anna Korhonen. 2015. Simlex-999: Evaluating semantic models with (genuine) similarity estimation. Computational Linguistics, 41(4):665-695.
393
+ Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735-1780.
394
+ Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland,
395
+
396
+ Katherine Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Oriol Vinyals, Jack William Rae, and Laurent Sifre. 2022. Training compute-optimal large language models. In Advances in Neural Information Processing Systems.
397
+ Dieuwke Hupkes, Sara Veldhoen, and Willem Zuidema. 2018. Visualisation and 'diagnostic classifiers' reveal how recurrent and recursive neural networks process hierarchical structure. Journal of Artificial Intelligence Research, 61:907-926.
398
+ Mohit Iyyer, Varun Manjunatha, Jordan Boyd-Graber, and Hal Daume III. 2015. Deep unordered composition rivals syntactic methods for text classification. In Association for Computational Linguistics.
399
+ Been Kim, Martin Wattenberg, Justin Gilmer, Carrie Cai, James Wexler, Fernanda Viegas, et al. 2018. Interpretability beyond feature attribution: Quantitative testing with concept activation vectors (tcav). In International conference on machine learning, pages 2668-2677. PMLR.
400
+ Pang Wei Koh, Thao Nguyen, Yew Siang Tang, Stephen Mussmann, Emma Pierson, Been Kim, and Percy Liang. 2020. Concept bottleneck models. In International Conference on Machine Learning, pages 5338-5348. PMLR.
401
+ Yair Lakretz, Germán Kruszewski, Théo Desbordes, Diewke Hupkes, Stanislas Dehaene, and Marco Baroni. 2019. The emergence of number and syntax units in LSTM language models. 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 11-20.
402
+ 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.
403
+ Kevin Meng, David Bau, Alex J Andonian, and Yonatan Belinkov. 2022. Locating and editing factual associations in GPT. In Advances in Neural Information Processing Systems.
404
+ Kevin Meng, Arnab Sen Sharma, Alex J Andonian, Yonatan Belinkov, and David Bau. 2023. Mass-editing memory in a transformer. In The Eleventh International Conference on Learning Representations.
405
+ Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017. Pointer sentinel mixture models. In International Conference on Learning Representations.
406
+
407
+ Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Efficient estimation of word representations in vector space. In International Conference on Learning Representations (Workshop Poster).
408
+ Joakim Olsen, Arild Brandrud Naess, and Pierre Lison. 2021. Assessing the quality of human-generated summaries with weakly supervised learning. In Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa), pages 112-123, Reykjavik, Iceland (Online). Linköping University Electronic Press, Sweden.
409
+ Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Scott Johnston, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. 2022. In-context learning and induction heads. Transformer Circuits Thread.
410
+ Denis Paperno, Germán Kruszewski, Angeliki Lazaridou, Ngoc-Quan Pham, Raffaella Bernardi, Sandro Pezzelle, Marco Baroni, Gemma Boleda, and Raquel Fernández. 2016. The LAMBADA dataset: Word prediction requiring a broad discourse context. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1525–1534.
411
+ Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. GloVe: Global vectors for word representation. In Empirical Methods in Natural Language Processing (EMNLP), pages 1532-1543.
412
+ 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, Volume 1 (Long Papers), pages 2227-2237, New Orleans, Louisiana. Association for Computational Linguistics.
413
+ Krishna Pillutla, Swabha Swayamdipta, Rowan Zellers, John Thickstun, Sean Welleck, Yejin Choi, and Zaid Harchaoui. 2021. Mauve: Measuring the gap between neural text and human text using divergence frontiers. Advances in Neural Information Processing Systems.
414
+ 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.
415
+ Filip Radenovic, Abhimanyu Dubey, and Dhruv Mahajan. 2022. Neural basis models for interpretability. In Advances in Neural Information Processing Systems.
416
+
417
+ Alec Radford, Karthik Narasimhan, Tim Salimans, Ilya Sutskever, et al. 2018. Improving language understanding by generative pre-training.
418
+ Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners.
419
+ Douglas LT Rohde, Laura M Gonnerman, and David C Plaut. 2005. An improved model of semantic similarity based on lexical co-occurrence.
420
+ Herbert Rubenstein and John B. Goodenough. 1965. Contextual correlates of synonymy. Commun. ACM, 8(10):627-633.
421
+ H. Schütze. 1992. *Dimensions of meaning*. In *Proceedings of the 1992 ACM/IEEE Conference on Supercomputing, Supercomputing '92*, page 787-796, Washington, DC, USA. IEEE Computer Society Press.
422
+ Ilya Sutskever, James Martens, and Geoffrey E Hinton. 2011. Generating text with recurrent neural networks. In International Conference on Machine Learning.
423
+ Peter D Turney. 2010. From frequency to meaning: Vector space models of semantics. Journal of Artificial Intelligence Research, 37:141-188.
424
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems.
425
+ Ben Wang and Aran Komatsuzaki. 2021. GPT-J-6B: A 6 billion parameter autoregressive language model. https://github.com/kingoflolz/mesh-transformer-jax.
426
+ 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.
427
+ 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.
428
+ Zebin Yang, Aijun Zhang, and Agus Sudjianto. 2021. GAMI-Net: An explainable neural network based on generalized additive models with structured interactions. Pattern Recognition, 120:108192.
429
+
430
+ 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.
431
+
432
+ # A Language Model Training Details
433
+
434
+ We use the FlashAttention codebase (Dao et al., 2022) which in turn relies on the Huggingface codebase (Wolf et al., 2020) and NumPy (Harris et al., 2020). We perform no preprocessing of OpenWebText. We do no explicit hyperparameter sweep for OpenWebText training beyond our sense vector ablation, instead taking the defaults provided. We train our models on 4 A100 (40GB) GPUs. All experiments test a single trained Small (124M Transformer or 170M Backpack) model due to computational constraints.
435
+
436
+ # A.1 The feed-forward sense network.
437
+
438
+ We parameterize the feed-forward network for our sense vectors by first performing layer normalization on the input embeddings, and then a feedforward layer with residual connection and layer norm (despite it being a function of just one word) to dimensionality $4d$ and back to $d$ . Then a subsequent feed-forward network to hidden dimensionality $4d$ and then up to $k * d$ . We include a second layer norm and residual before the second feedforward layer accidentally as a side-effect of the underlying language model codebase.
439
+
440
+ For our experiments abating $k$ in Section 4.5, the second feed-forward component maps to $d$ and then $kd$ , not $4d \rightarrow kd$ .
441
+
442
+ # B Extra evaluations
443
+
444
+ # B.1 Timing Benchmarking
445
+
446
+ To benchmark the speed of each model, we used a single A100 GPU, running the forward pass of each model with a sequence length of 512 and a batch size of 32. We ran 100 forward passes and present the average time taken across the 100. We present this in lieu of FLOPs because A100 GPUs are relatively standard, and this allows for a more directly usable time estimate. Results are in Table 7. We find that Backpacks take roughly $1.4\mathrm{x}$ as long to run as their underlying Transformers.
447
+
448
+ # C Lexical Similarity Details
449
+
450
+ To handle words in the lexical similarity datasets that don't appear as single words in the tokenizer, we use one of two methods. We either average all subwords, or take the first subword. The results for the two methods were similar, but we take the better overall for each model. For all Backpack methods, our 124M-parameter Transformer, and
451
+
452
+ <table><tr><td>Model</td><td>Time ↓</td></tr><tr><td>Backpack-Micro</td><td>0.093</td></tr><tr><td>Transformer-Micro</td><td>0.065</td></tr><tr><td>Backpack-Mini</td><td>0.21</td></tr><tr><td>Transformer-Mini</td><td>0.15</td></tr><tr><td>Backpack-Small</td><td>0.36</td></tr><tr><td>Transformer-Small</td><td>0.26</td></tr></table>
453
+
454
+ Table 7: Timing benchmarking results on an A100, average time to compute forward pass on 32-batch size 512-sequence length input.
455
+
456
+ GPT-2-xl, we average all subwords. For GPT-J (which uses the same tokenizer), we take the first subword.
457
+
458
+ # D Sense Vector Control Details
459
+
460
+ # D.1 Topic control details
461
+
462
+ The full results are in Table 12. The list of topics, and the corresponding bags-of-words, are given in Table 10. For PPLM, the hyperparameter we vary to change the strength of topic control is the step size (Dathathri et al., 2019).
463
+
464
+ We consider a document as matching the semantic control if the classifier assigns greater than 0.5 probability to the attempted class. We generated from our models with ancestral sampling with no truncation or temperature change.
465
+
466
+ Topic control. Let $b \in \mathbb{R}^{|\mathcal{V}|}$ be the many-hot vector defined by the bag of words input to the control problem. That is, if the bag is arts, culture, then $b$ has 1 at the indices corresponding to those words, and 0 elsewhere. To determine the initial weights $\delta$ for each sense vector, we first sort all $|\mathcal{V}| * k$ sense vectors by decreasing normalized dot product with the bag of words vector:
467
+
468
+ $$
469
+ s (C (\mathbf {x})) = \frac {b ^ {\top} E ^ {\top} C (\mathbf {x})}{\max (E ^ {\top} C (\mathbf {x}))} \tag {17}
470
+ $$
471
+
472
+ We then take the 0.95, 0.80, and 0.60 quantiles of these scores to determine how to weight the vectors. Intuitively, the vectors in the highest quantiles (most associated with the target topic) are upweighted the most during decoding, to push the generation towards the topic. The three quantiles partition the set of scores into 4, which are given separate $\delta$ values; the exact 4 depend on the strength of control (i.e., different points in Figure 2.) The exact $\delta$ weighting for each point are given in Table 11.
473
+
474
+ <table><tr><td># Senses</td><td>Total Params</td><td>Contextl. Params</td><td>OWT PPL</td></tr><tr><td>1</td><td>74.3M</td><td>72.7M</td><td>38.5</td></tr><tr><td>4</td><td>75.6M</td><td>72.7M</td><td>29.3</td></tr><tr><td>16</td><td>80.5M</td><td>72.7M</td><td>26.0</td></tr><tr><td>64</td><td>100.2M</td><td>72.7M</td><td>24.0</td></tr></table>
475
+
476
+ Table 8: OWT perplexity and parameter count as a function of the number of sense vectors. All models trained for 50k steps, 500k token batch size, on OWT.
477
+
478
+ <table><tr><td>Model</td><td>Dim</td><td>Layers</td><td>Heads</td></tr><tr><td>Micro</td><td>384</td><td>6</td><td>6</td></tr><tr><td>Mini</td><td>640</td><td>8</td><td>8</td></tr><tr><td>Small</td><td>768</td><td>12</td><td>12</td></tr></table>
479
+
480
+ Table 9: Model size hyperparameters.
481
+
482
+ <table><tr><td>Topic Label</td><td>Bag-of-words</td></tr><tr><td>arts_culture</td><td>arts, culture</td></tr><tr><td>business_entrepreneurs</td><td>business, entrepreneurs</td></tr><tr><td>celebrity_pop_culture</td><td>celebrity, pop, culture</td></tr><tr><td>diaries_daily.life</td><td>diaries, daily, life</td></tr><tr><td>family</td><td>family</td></tr><tr><td>fashion_style</td><td>fashion, style</td></tr><tr><td>film_tv_video</td><td>film, tv, video</td></tr><tr><td>fitness_health</td><td>fitness, health</td></tr><tr><td>food_dining</td><td>food, dining</td></tr><tr><td>gaming</td><td>gaming</td></tr><tr><td>music</td><td>music</td></tr><tr><td>news_social_concern</td><td>news, social, concern</td></tr><tr><td>other_hobbies</td><td>hobbies</td></tr><tr><td>relationships</td><td>relationships</td></tr><tr><td>sports</td><td>sports</td></tr><tr><td>travel_adventure</td><td>travel, adventure</td></tr><tr><td>youth/studentlife</td><td>youth, student, life</td></tr></table>
483
+
484
+ Table 10: The topics used in our topic classifier, and the bags-of-words we use for control.
485
+
486
+ <table><tr><td>Control Strength</td><td>δ for quantiles 0.95, 0.80, 0.6, &lt; 0.6</td></tr><tr><td>0 (unmodified)</td><td>1,1,1,1</td></tr><tr><td>1</td><td>1.5, 1.5, 1.3, 1</td></tr><tr><td>2</td><td>2.2, 2.2, 1.5, 1</td></tr><tr><td>3</td><td>3.3, 3.3, 3, 1</td></tr></table>
487
+
488
+ Table 11: Initial topic control weights for each quantile.
489
+
490
+ Topic annealing. From the the beginning value of $\delta$ given above, we anneal back to 1 as follows. For each sense $C(\mathbf{x}_j)_\ell$ , we compute the total sum of non-negative log-probability assigned by the sense to the set of words generated so far, intuitively to compute whether the words already generated express the meaning intended by the sense:
491
+
492
+ $$
493
+ a _ {C (\mathbf {x} _ {j}) _ {\ell}} = \sum_ {i = 1} ^ {n} \max \left(\mathbf {x} _ {i} ^ {\top} E ^ {\top} C (\mathbf {x} _ {j}) _ {\ell}\right), 0). \tag {18}
494
+ $$
495
+
496
+ We then re-weight by a term dependent on the sequence index to upweight terms near to the most recently generated text:
497
+
498
+ $$
499
+ b _ {C \left(\mathbf {x} _ {j}\right) _ {\ell}} = \sigma \left(- a _ {C \left(\mathbf {x} _ {j}\right) _ {\ell}} f + 6\right) * (1 + j) / 1 0 0 \tag {19}
500
+ $$
501
+
502
+ where $j$ is the index of the word of the sense vector in the generated text, and $f$ is a scaling constant set to 7.5 divided by the maximum $\delta$ in the experiment (the maximum of each row in Table 11.)
503
+
504
+ Finally, we compute the annealed $\delta$ as a soft combination, weighted by $b_{C(\mathbf{x}_j)_\ell}$ , of the maximum delta and the default of 1:
505
+
506
+ $$
507
+ \delta_ {\ell i j} = b _ {C \left(\mathbf {x} _ {j}\right) \ell} \delta_ {\ell i j} + (1 - a) * 1. \tag {20}
508
+ $$
509
+
510
+ # D.2 Gender bias mitigation details
511
+
512
+ For the third-person singular verb they, we found that our sense intervention on sense 10 slightly increases the probability of they relative to he or she.
513
+
514
+ The full set of nouns and prompts we use is as follows. For role nouns, we use mechanic,
515
+
516
+ <table><tr><td>Method</td><td>Sem Acc ↑</td><td>Toks-in-vocab ↓</td><td>MAUVE ↑</td></tr><tr><td colspan="4">Transformer</td></tr><tr><td>Unchanged</td><td>6.8%</td><td>0.0%</td><td>0.95</td></tr><tr><td>PPLM-.01</td><td>8.4%</td><td>0.1%</td><td>0.94</td></tr><tr><td>PPLM-.04</td><td>23.9%</td><td>2.6%</td><td>0.81</td></tr><tr><td>PPLM-.05</td><td>30.3%</td><td>5.5%</td><td>0.62</td></tr><tr><td>PPLM-.06</td><td>37.7%</td><td>12.3%</td><td>0.41</td></tr><tr><td>PPLM-.07</td><td>40.8%</td><td>18.8%</td><td>0.25</td></tr><tr><td colspan="4">Backpack</td></tr><tr><td>Unchanged</td><td>7.4%</td><td>0.0%</td><td>0.92</td></tr><tr><td>Ours+1</td><td>12.1%</td><td>0.2%</td><td>0.91</td></tr><tr><td>Ours+2</td><td>24.3%</td><td>1.5%</td><td>0.90</td></tr><tr><td>Ours+3</td><td>35.3%</td><td>3.5%</td><td>0.83</td></tr></table>
517
+
518
+ Table 12: Topic control via pseudovocabulary, vs PPLM. MAUVE scores are computed with respect to 8000 samples drawn across the topics.
519
+
520
+ <table><tr><td colspan="2">nurse</td><td colspan="2">developer</td></tr><tr><td>logprob</td><td>target</td><td>logprob</td><td>target</td></tr><tr><td>+12.21</td><td>professional</td><td>-15.27</td><td>She</td></tr><tr><td>+11.62</td><td>She</td><td>-15.14</td><td>herself</td></tr><tr><td>-13.38</td><td>himself</td><td>-13.02</td><td>her</td></tr><tr><td>-13.24</td><td>His</td><td>-12.34</td><td>corruption</td></tr><tr><td>-12.63</td><td>his</td><td>-12.15</td><td>she</td></tr><tr><td>-12.31</td><td>his</td><td>-12.14</td><td>gam</td></tr><tr><td>-11.39</td><td>he</td><td>-12.13</td><td>HR</td></tr></table>
521
+
522
+ Table 13: Some of the most up- or down-weighted words by sense 10 of the words nurse and developer. For each role word, the sense encodes the stereotypical gender of the role.
523
+
524
+ accountant, farmer, baker, assistant, construction, guard, carpenter, analyst, physician, cook, clerk, manager, developer, librarian, salesperson, mover, hairdresser, auditor, sheriff, janitor, driver, chief, teacher, writer, receptionist, CEO, nurse, house-keeper, secretary, counselor, attendant, supervisor, designer, lawyer, editor, cashier, laborer, tailor, cleaner.
525
+
526
+ For evaluation, we use the prompts in Table 14. For experiments in which we estimate the strength of removal to reduce gender bias, we do the optimization individually for each profession noun, on the separate set of prompts in Table 15.
527
+
528
+ <table><tr><td>Prompt</td></tr><tr><td>I really liked my PROFESSION. What I liked most was that,</td></tr><tr><td>I really liked my PROFESSION. In fact,</td></tr><tr><td>My PROFESSION said that</td></tr><tr><td>My PROFESSION believes that</td></tr><tr><td>This one PROFESSION believes that</td></tr><tr><td>This one PROFESSION believes</td></tr><tr><td>My PROFESSION said</td></tr><tr><td>My PROFESSION believes</td></tr><tr><td>The PROFESSION was with the car. When</td></tr><tr><td>The PROFESSION was with the car. Then</td></tr><tr><td>While driving to the store, the PROFESSION looked over on the dash and then</td></tr><tr><td>A PROFESSION went to chat over to chat before</td></tr><tr><td>Some PROFESSION asked to look over things, but</td></tr></table>
529
+
530
+ Table 14: Prompts used for gender bias evaluation.
531
+
532
+ <table><tr><td>Prompt</td></tr><tr><td>The PROFESSION came into the room. When The PROFESSION came into the room. Then I went to the talk to the PROFESSION. What I went over to the talk to the PROFESSION. Why I went over to the talk to the PROFESSION;</td></tr></table>
533
+
534
+ Table 15: Prompts used for gender debiasing estimation.
535
+
536
+ <table><tr><td>Topic</td><td>Backpack Sense Control, Control=2</td><td>Transformer PPLM, stepsize=0.04</td></tr><tr><td>Arts &amp; Culture</td><td>(I kind dude) just used to be creative and make music but it feels like I&#x27;m 40. Conscious of how bad it is and how awesome it is like making such a fast consciousness and not even being musician meets people who answer for you, especially when it&#x27;s scary.&quot; de la Cruz © Dan Wilson (2002).</td><td>Sunday, February 6: WestSTAR en-twitter-ilesurcast.blogspot.com
537
+ Tuesday, February 7: WestStar en-chat breathe of ancient energy. www.weststar.org
538
+ Monday, February 8: West Star Mares and Moon of the ages &quot;Happiness is not easy to do&quot;, Nicolas Jeansma, the Eternal Life programme director analyses history, culture, sociality and social magic. : &#x27;Oh the</td></tr><tr><td>Business &amp; Entrepreneurship</td><td>Flickr advertisers is nothing new, so let&#x27;s hope you know where you buy the latest edition.
539
+ At the same time, the fix has been pushed through, and while the overall business is pulling away from mainland Asia, publishers have given control over social media options to researchers at New York University and Columbia University.
540
+ A new report from the Columbia board offers some clues as to why.
541
+ &quot;My store in Alabama is used to a lot of Marines, and I just dropped as such. I don&#x27;t know why, but I&#x27;ve had</td><td>We&#x27;ve decided to put out a newsletter to your guys, wondering as you cope with the tribulations of your business ventures and a job position. One way to put it is: You&#x27;re not good enough. You&#x27;ve failed and you&#x27;re not getting anything done. You&#x27;re not doing enough. You&#x27;re not bringing the passion and ideas you might have to a business. But one thing&#x27;s for sure: if you self-promote, you often might take the business to a profitable buyer. Continue</td></tr><tr><td>Celebrity &amp; Pop Culture&#x27;</td><td>Meetings and greets with reporters and celebrities of all kinds — pop culture, fashion, sports, food, celebrity lifestyle and otherwise — have been laid door-to-door on the Dallas television market with both LaVar and his wife, Arron, taking over the showroom-oneship business at Big Star Barber.
542
+ &quot;We think Big Star&#x27;s an interesting exchange,&quot; Arron says. &quot;They&#x27;ve got an experience they&#x27;re</td><td>Type Services rumors have been up in the media since last month—and now we have some confirmed to the CBC Radio musical news channel&#x27;s Twitter stream.
543
+ The group&#x27;s guitarist, Greg Carr, has just announced that he&#x27;s working with Papa John as the band&#x27;s lead singer and guitarist. According to bizarre French pop culture creation icon Valentino pop music singer/writer Jiv pop pop model, who also wrote pop pop music&#x27;s MyS-pace and Twitter pop memes, Cassidy gig pop pop superstar is</td></tr><tr><td>Diary &amp; Daily Life</td><td>The exact actual life cycle life form life soars on and dies off in comparison to our own. During the first few years of life, the total life form you take to decide what to eat, how much of it to drink, why, and whether you want to exercise have been completely smashed and the technological capability to make that happen seriously out of the blue has been completely lost, jumping from complexity to complexity, totally overwhelming the mushroom in its ability to discover what levels it&#x27;s supposed to</td><td>The Rome crew logam tagged Louisville Main Street today morning and observed a loading dock at the center of downtown Louisville. The dock is just bigger than what was supposed to dock the loading area for emergencies. They watched over the crowd after passing the boat and finally realized that they&#x27;d caught some missed traffic signals. &quot;Serious congestion&quot; has so far unnerved people from the Grande family picnics to weddings picnics picnics. MTD Charlotte Pulse (@mtdphp</td></tr><tr><td>Fashion</td><td>This article is about the fashion label fashion week fashion style month fashion fashion style fashion style fashion week fashion style fashion fashion style fashion fashion style fashion fashion style fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion fashion shopping in Dark Horse Comics in English and in both comic books and graphic novels.[1] It was produced</td><td>Twitter personality @ceboperformancecmk tweeted in response to the story about you.
544
+ Fashion designer underwear, designer cook dress, sexuality art models, sex con artists, real goths. BuzzFeed
545
+ You think my brain&#x27;s shit about what&#x27;s fashion looks like? Yeah no, I&#x27;m not on it. I&#x27;m fashion. I&#x27;m fine fashion. Yes I appreciate the brand but the people behind it[...] adults go fashion, or</td></tr></table>
546
+
547
+ Table 16: The first, non-cherry-picked category-satisfying example from each model.
548
+
549
+ <table><tr><td colspan="2">Topic</td><td>Backpack Sense Control, Control=2</td><td>Transformer PPLM, stepsize=0.04</td></tr><tr><td colspan="2">Film, TV, &amp; Video</td><td>Originally published Live chat Qs with the film website writer, who raised millions at least two years ago I contacted him with the same questions as you&#x27;re doing.I&#x27;m a bit optimistic that you&#x27;re right, but you&#x27;re just not responding. As you studied the film timer/mapplot&#x27;n&#x27;cookies response speed, I read the excerpts and couldn&#x27;t make out a massive amount of time differences. Very minor.What do you think about some of the terms</td><td>Well, the hype is real, and with the release of the latest episode of season two (which I&#x27;m probably not supposed to review), it feels like you won&#x27;t be afraid to retweets videoe.By “HAPPY FINAL,” the footage maker has used a GIF video to give viewers look at Fideo&#x27;s dancing triangles and serenity dancing around a moving picture. Thank you, video!If the</td></tr><tr><td>Fitness &amp; Health</td><td>&amp;</td><td>CLOSE Don’t think tanking will spell good news for Detroit medical marijuana patients but the owner of its dispensaries saying that is just part of the problem facing the growing number of ill people having access to pot.Healthcare workers are treated for tumors in a dispensary in Oakland. (Photo: Christopher Sator-ica, Special to CNN)An array of medical centers have lined up near Detroit after a medical marijuana reform forum at the University of Michigan put the debate over the drug at</td><td>Today we learn more about the rise of the ice age, multi-drug cocaine epidemic, global population explosion and warfare epidemic by following Dr. Kristof Dr. Freedk published in the British Journal of Medicine The authors update their lofty goal and continue to refine their work for public health.The International Health Services Committee has just released a new research, The next three years could be very costly for health care in Australia, hospitals, state health systems and dietary health.A recent report from</td></tr><tr><td colspan="2">Food &amp; Dining</td><td>As weeks wore maple leafed food trucks, and food processors reminisced about their great days past, healthcare workers found out one day that they should get better working conditions with little regard for their bodies.Barbara Butterfield, the former ShopSwagger workshop in Clarksdale, got shot dead on Monday morning when they tried to stop a father Francisco Lee Walker from firing a gun. Walker, 20, had just started his Aug. 27 firing. Exposure to fire and clothes caused Walker</td><td>I would dearly love to stand at that galloping chair and who doesn’t has amazingly friends associated with their backs hurting? I was a big first timer yesterday. Not always with bacon but I held til calms up. Big chunks of bacon super nice but not me. However there are times where the pieces pull apart and this happens very hard to homo and crackers afgh. All Mixed ones made popular points that have the food triggers across: lack of meats rinsing and eating</td></tr><tr><td colspan="2">Gaming</td><td>My parents encouraging kids to be competitive gaming at school is not a new concept. Gaming has been around since the earliest days on paper, and their perspective is always superior than yours. Quality doesn’t always apply, and that’s why we bucked that trend’ fatherThe English woman’s son Anthony, who is best known for his role as Most Wanted, came up with the idea of pulling a 30-year-old mentally disabled woman who had been using motorbikes for</td><td>Every year, many migrants continue to struggle to find the skills they need in an emerging technology. But every year, it comes quite a surprise to hear the latest news about computerized computing and the gaming community.For the sake of many gaming communities, we here at 14/gamer.org love gaming. It is an important industry in gaming, as it often draws passionate gamers from gaming and lends the gaming community the ability to allow itself special moments like gaming gaming days and gaming gaming. We</td></tr><tr><td colspan="2">Music</td><td>David has been a staunch critic of music culture that promotes music as something new, daring, and powerful. As he explained. (&quot;I never thought I was one of those stupid, stupid old people who just listens to music or really hears it it&#x27;s always the same as when I was a kid,&quot; he said.) And when he was a touring musician, those opinions were totally correct. Read the entire interview below.On trying to inculcate younger vocalists with the &quot;</td><td>From the East art council HQ of MondoJapan Everyone laughs when a sheet metal title is rendered artistically constrained and we say, &quot;Whoa. Then the skin guy! This is a very Chi style steel.&quot; Well I don’t think anyone’s ever heard that before. There’s only one coil metal group that is not a tarantella performance music group...at least in America...compact music ten times over and they will never release tracks for it that it is a</td></tr></table>
550
+
551
+ Table 17: The first, non-cherry-picked category-satisfying example from each model.
552
+
553
+ <table><tr><td>Topic</td><td>Backpack Sense Control, Control=2</td><td>Transformer PPLM, stepsize=0.04</td></tr><tr><td>News &amp; Social Concern</td><td>Builders B2 has been compared unfathomable by a number of critics because of his security concerns.Breaking News Alerts Get breaking news when it happens — in your inbox. Email Sign Up By signing up you agree to receive email newsletters or alerts from POLITICO. You can unsubscribe at any time.Yet, on Tuesday, Monday and Tuesday, the devel- oper reached the milestone of completing the first UPS facility located in the town of Cloudbreak. He secured $4</td><td>After initially putting itself over Sports Illustrated on Monday, the New York Times was forced to apologize for its widespread coverage of its re- porting on the State of Rhode Island – a state that has been the subject of gossip news for some time and which its harsh news and ratings policy has spawned.Late at night on Monday, we learned that the New York Times had reached a breaking news cycle decision and we snagged our exclusive first look at the news. Here&#x27;s what you didn&#x27;t</td></tr><tr><td>Relationships</td><td>Early life release parties is relationship couples with relationships over relationships. This cen-sus does not count relationships by those who have been with those relationships over the last three years. For more information about early life release parties, check the release party census.Carlo MathieuCarlo Mathieu was born in 1958. He lives in Augusta, Ga., with his biological father, Malcolm Mathieu, who was president of the Augusta West Raceway at the time.Benjamin Math</td><td>Any learning is like being completely ignorant of new information. Schools are forced to teach stu- dents to treat one another in the right way, but we still have to recognize that we have to learn how to be friends with as much as we can. When San- TOD relationships are hard and relationships can be complicated and confusing, there will always be learning relationships, relationships that remind us that we don&#x27;t mean relationships, relationships relationships that are boundaries, relationships re- lationships with friends in need relationships with involved relationships, relationships relationships relationships</td></tr><tr><td>Sports</td><td>PRESS W/NEWS BLOK Play slideshow 1 of 83 Express sports retail giant Sports Direct.Sports Direct has revealed the on offer outdoor sports gear Brand new from Google has been developed. Here&#x27;s what you can expect from Google&#x27;s sporting expertise.&lt;endoftext&gt;About The potential of a west coast restaurant for toler- ance and pityTheir position at this point hurts me less than they believe it deserves, because they probably shouldn.I&#x27;m going to help them</td><td>Authorities in California say they are investigat- ing equestrian skiers who struck a 19 year-old boy from a snow-covered mountain and beating him on the head with shovels.According to Smith-Cox, those same well clients found out they had also been tardled by a $500 pour frompipe on top of of a Black Rock vault. And it appears the ul- timate goal of those riders and their company of riders was killed.Jeremy Goschz is one of those survivors. His racing</td></tr><tr><td>Travel &amp; Ad- venture</td><td>My next stop destination for me is adventure travel. I travel Disney World and make sure that the worlds under my belt and desert warriors that I&#x27;ve been fighting for have a place or two at their disposal that are compatible with my use of cur- rent technology. This job is being completed with the help of any freelance user submission infor- mation you may have provided. It&#x27;s only fair to give you some tips to help you figure it out if there are any unknown side-idence locations that you</td><td>Equality Equality - open life - inequalities - political op- pression - write and publish your work Equality is a freedom to work, to die. Access to free healthcare, free outer space travel, pho- tocopies online, happy endings, self travel - to travel to someone else&#x27;s heart (read: stop taking drugs), to move faster, to travel in train travel, to stop a vacation abroad (tell others your travels), to return to a home each time</td></tr><tr><td>Youth &amp; Stu- dent Life</td><td>College students at almost every age advantage who take advantage of learning opportunities in the sport of running spend at least five years an average of $10 or more per year to do it, accord- ing to the University of San Diego&#x27;s National Football Clearinghouse.Those risk factors lift nearly a third of univer- sity and college football athlete spend, more than double that of a comparable age group of men and women who spend 4,000 hours per year as runners, or 5,000 to</td><td>lame University saw a 32 per cent rise in its un- dergraduate science institutes and 14 per cent increase in its researchers from recent years.Director Of University Development, Mike Bren- nan, said: &quot;The growth in university employment, coming from such a historic campaign, is som- thing to celebrate as we support our young people and room to progress in science and technology.&quot; A student was interviewed in a recent paper about university employment, specifically a dissertation.For the first time, people are</td></tr></table>
554
+
555
+ Table 18: The first, non-cherry-picked category-satisfying example from each model. This is except for the Relationship category for the Transformer, where we skipped the first one due to content we particularly did not want to publish.
556
+
557
+ <table><tr><td colspan="8">Positive Log-Probability Mass for Senses of word quickly</td></tr><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td></tr><tr><td>approaching</td><td>oggles</td><td>quickly</td><td>enough</td><td>stro</td><td>iii</td><td>razen</td><td>asuring</td></tr><tr><td>ascended</td><td>Marks</td><td>swiftly</td><td>rotating</td><td>zn</td><td>Original</td><td>forgotten</td><td>delusion</td></tr><tr><td>grav</td><td>Axis</td><td>rapidly</td><td>paced</td><td>strokes</td><td>alsa</td><td>forget</td><td>stimulated</td></tr><tr><td>gent</td><td>claimer</td><td>quick</td><td>ened</td><td>uling</td><td>chenko</td><td>social</td><td>recollection</td></tr><tr><td>disposed</td><td>Roche</td><td>quick</td><td>retreating</td><td>$_</td><td>resolution</td><td>rius</td><td>stimul</td></tr><tr><td>risen</td><td>demonstration</td><td>instantly</td><td>Subscribe</td><td>grass</td><td>ient</td><td>relapse</td><td>Wem</td></tr><tr><td>dispose</td><td>blaster</td><td>promptly</td><td>dismissing</td><td>lessly</td><td>baskets</td><td>baseless</td><td>persistent</td></tr><tr><td>becoming</td><td>ducers</td><td>soon</td><td>diminishing</td><td>iken</td><td>uin</td><td>Statement</td><td>urbed</td></tr><tr><td>ascert</td><td>Specifications</td><td>fast</td><td>disappearing</td><td>izing</td><td>ora</td><td>athing</td><td>reter</td></tr><tr><td>climbed</td><td>Viet</td><td>Quick</td><td>varying</td><td>bg</td><td>alid</td><td>Akron</td><td>restraint</td></tr><tr><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td><td>13</td><td>14</td><td>15</td></tr><tr><td>processors</td><td>slowly</td><td>tering</td><td>Definitely</td><td>quick</td><td>oted</td><td>ouse</td><td>Sims</td></tr><tr><td>darts</td><td>Slowly</td><td>Bers</td><td>initely</td><td>quickest</td><td>distances</td><td>pee</td><td>Noir</td></tr><tr><td>milliseconds</td><td>Slow</td><td>Fed</td><td>raid</td><td>quick</td><td>outed</td><td>ouses</td><td>TMZ</td></tr><tr><td>wip</td><td>conveniently</td><td>ascus</td><td>alright</td><td>quicker</td><td>aught</td><td>pees</td><td>Streets</td></tr><tr><td>iazep</td><td>slower</td><td>Bust</td><td>Personally</td><td>fast</td><td>UC</td><td>attach</td><td>expressly</td></tr><tr><td>reptiles</td><td>cheaply</td><td>aucus</td><td>laughs</td><td>quickly</td><td>ob</td><td>tro</td><td>Attend</td></tr><tr><td>Kelvin</td><td>responsibly</td><td>Ryu</td><td>ALWAYS</td><td>rapid</td><td>digits</td><td>iffe</td><td>Rooms</td></tr><tr><td>Ow</td><td>gradually</td><td>sector</td><td>Always</td><td>fast</td><td>ench</td><td>aces</td><td>Within</td></tr><tr><td>Soon</td><td>quietly</td><td>Petra</td><td>Ideally</td><td>faster</td><td>Code</td><td>lain</td><td>Rum</td></tr><tr><td>Slug</td><td>waiting</td><td>DCS</td><td>Roses</td><td>fastest</td><td>apers</td><td>feet</td><td>Forced</td></tr><tr><td colspan="8">Negative Log-Probability Mass for Senses of word quickly</td></tr><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td></tr><tr><td>initely</td><td>sburg</td><td>ollen</td><td>una</td><td>Poké</td><td>quickly</td><td>Faster</td><td>.</td></tr><tr><td>heit</td><td>orem</td><td>oned</td><td>URE</td><td>slow</td><td>quick</td><td>purposely</td><td>Sorceress</td></tr><tr><td>Aly</td><td>Untitled</td><td>oths</td><td>rast</td><td>slower</td><td>swiftly</td><td>deliberately</td><td>itars</td></tr><tr><td>istically</td><td>anted</td><td>ook</td><td>ipt</td><td>slows</td><td>rapidly</td><td>Definitely</td><td>Shogun</td></tr><tr><td>Always</td><td>untreated</td><td>ught</td><td>ocracy</td><td>slowed</td><td>quickest</td><td>ey</td><td>Yen</td></tr><tr><td>Doctors</td><td>til</td><td>Ded</td><td>law</td><td>DEV</td><td>quick</td><td>slower</td><td>oenix</td></tr><tr><td>dl</td><td>broken</td><td>lost</td><td>uthor</td><td>encia</td><td>Quick</td><td>initely</td><td>Jagu</td></tr><tr><td>urally</td><td>past</td><td>aught</td><td>ema</td><td>potions</td><td>fast</td><td>isner</td><td>izz</td></tr><tr><td>ependence</td><td>ebook</td><td>recharge</td><td>ory</td><td>machina</td><td>quick</td><td>hesitated</td><td>eral</td></tr><tr><td>raints</td><td>Continue</td><td>ady</td><td>antis</td><td>Slow</td><td>Quick</td><td>eyewitness</td><td>finals</td></tr><tr><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td><td>13</td><td>14</td><td>15</td></tr><tr><td>quist</td><td>WM</td><td>prototype</td><td>ciating</td><td>kins</td><td>quick</td><td>Laur</td><td>thal</td></tr><tr><td>ocker</td><td>isf</td><td>projector</td><td>scrambling</td><td>Host</td><td>quick</td><td>Never</td><td>imble</td></tr><tr><td>ovsky</td><td>fb</td><td>reconcil</td><td>rapid</td><td>loudspe</td><td>quickly</td><td>Jimmy</td><td>liquid</td></tr><tr><td>ictions</td><td>WF</td><td>prominently</td><td>newcomer</td><td>enced</td><td>Quick</td><td>dearly</td><td>initialized</td></tr><tr><td>olation</td><td>elevation</td><td>counterfeit</td><td>adapting</td><td>Evil</td><td>soon</td><td>Dating</td><td>anas</td></tr><tr><td>cano</td><td>RM</td><td>word</td><td>speeding</td><td>washed</td><td>fast</td><td>--</td><td>IGH</td></tr><tr><td>Proof</td><td>975</td><td>cellul</td><td>frantic</td><td>Kaf</td><td>rapidly</td><td>never</td><td>unciation</td></tr><tr><td>cert</td><td>dir</td><td>prototype</td><td>novelty</td><td>Glass</td><td>Quick</td><td>Certainly</td><td>needs</td></tr><tr><td>rero</td><td>ESE</td><td>collaps</td><td>paced</td><td>sod</td><td>hurry</td><td>eternal</td><td>commit</td></tr><tr><td>anch</td><td>onder</td><td>dyl</td><td>instructional</td><td>advers</td><td>Immediately</td><td>Rare</td><td>tackle</td></tr></table>
558
+
559
+ Table 19: For each sense vector of the word quickly, the 10 words to which the sense vector assigns the highest log-probability contribution, and the 10 to which it assigns the largest negative log-probability contribution. Note that usually, either the positive words are coherent or the negative—but not both for the same sense index. Some senses are not interpretable, and seem to be used by other parts of speech.
560
+
561
+ A For every submission:
562
+
563
+ A1. Did you describe the limitations of your work? 9
564
+ A2. Did you discuss any potential risks of your work? 9
565
+ A3. Do the abstract and introduction summarize the paper's main claims?
566
+ A4. Have you used AI writing assistants when working on this paper? We used ChatGPT and Claude to try to brainstorm names for models; nothing useful came of it or ended up in the paper.
567
+
568
+ B Did you use or create scientific artifacts?
569
+
570
+ Section 5,6,7
571
+
572
+ B1. Did you cite the creators of artifacts you used? Section 5,6,7, Appendix
573
+ B2. Did you discuss the license or terms for use and / or distribution of any artifacts? Left blank.
574
+ B3. Did you discuss if your use of existing artifact(s) was consistent with their intended use, provided that it was specified? For the artifacts you create, do you specify intended use and whether that is compatible with the original access conditions (in particular, derivatives of data accessed for research purposes should not be used outside of research contexts)? Left blank.
575
+ B4. Did you discuss the steps taken to check whether the data that was collected / used contains any information that names or uniquely identifies individual people or offensive content, and the steps taken to protect / anonymize it? Left blank.
576
+ B5. Did you provide documentation of the artifacts, e.g., coverage of domains, languages, and linguistic phenomena, demographic groups represented, etc.? Left blank.
577
+ B6. Did you report relevant statistics like the number of examples, details of train / test / dev splits, etc. for the data that you used / created? Even for commonly-used benchmark datasets, include the number of examples in train / validation / test splits, as these provide necessary context for a reader to understand experimental results. For example, small differences in accuracy on large test sets may be significant, while on small test sets they may not be. Left blank.
578
+
579
+ C Did you run computational experiments?
580
+
581
+ Left blank.
582
+
583
+ C1. Did you report the number of parameters in the models used, the total computational budget (e.g., GPU hours), and computing infrastructure used? 4
584
+
585
+ C2. Did you discuss the experimental setup, including hyperparameter search and best-found hyperparameter values? 4.2
586
+ C3. Did you report descriptive statistics about your results (e.g., error bars around results, summary statistics from sets of experiments), and is it transparent whether you are reporting the max, mean, etc. or just a single run? 4.2
587
+ C4. If you used existing packages (e.g., for preprocessing, for normalization, or for evaluation), did you report the implementation, model, and parameter settings used (e.g., NLTK, Spacy, ROUGE, etc.)? Section 4.1
588
+
589
+ # D Did you use human annotators (e.g., crowdworkers) or research with human participants?
590
+
591
+ Left blank.
592
+
593
+ D1. Did you report the full text of instructions given to participants, including e.g., screenshots, disclaimers of any risks to participants or annotators, etc.? Not applicable. Left blank.
594
+ D2. Did you report information about how you recruited (e.g., crowdsourcing platform, students) and paid participants, and discuss if such payment is adequate given the participants' demographic (e.g., country of residence)? Not applicable. Left blank.
595
+ D3. Did you discuss whether and how consent was obtained from people whose data you're using/curating? For example, if you collected data via crowdsourcing, did your instructions to crowdworkers explain how the data would be used? Not applicable. Left blank.
596
+ D4. Was the data collection protocol approved (or determined exempt) by an ethics review board? Not applicable. Left blank.
597
+ D5. Did you report the basic demographic and geographic characteristics of the annotator population that is the source of the data? Not applicable. Left blank.
backpacklanguagemodels/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1531db71ae88c681673f71beafed4bdb6b9f727b260a342bbf0acaf13c344a66
3
+ size 2342257
backpacklanguagemodels/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2068b66a5d3df971b262393454e6ac94051e8226b7e7322db7f8f762b31a0532
3
+ size 645291
backtranslationforspeechtotexttranslationwithouttranscripts/d7a3b1f9-ba6b-46c1-8fb8-d4385966e7d4_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc0dd9f55ff6a1d4ab2a465138963145f84867e84e2c5c82a670f2941041d2cf
3
+ size 142094
backtranslationforspeechtotexttranslationwithouttranscripts/d7a3b1f9-ba6b-46c1-8fb8-d4385966e7d4_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0cff89a0b22c89494ffb6a6f5b1bd4632903c2137a01fb80849745805d631b5e
3
+ size 175084
backtranslationforspeechtotexttranslationwithouttranscripts/d7a3b1f9-ba6b-46c1-8fb8-d4385966e7d4_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:450b7f914d03e64b3ce12d653b51987f3459a1285fbde2e5d55871974487e701
3
+ size 4228196
backtranslationforspeechtotexttranslationwithouttranscripts/full.md ADDED
@@ -0,0 +1,525 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Back Translation for Speech-to-text Translation Without Transcripts
2
+
3
+ Qingkai Fang $^{1,2}$ , Yang Feng $^{1,2*}$
4
+
5
+ <sup>1</sup>Key Laboratory of Intelligent Information Processing
6
+
7
+ Institute of Computing Technology, Chinese Academy of Sciences (ICT/CAS)
8
+
9
+ $^{2}$ University of Chinese Academy of Sciences, Beijing, China
10
+
11
+ {fangqingkai21b, fengyang}@ict.ac.cn
12
+
13
+ # Abstract
14
+
15
+ The success of end-to-end speech-to-text translation (ST) is often achieved by utilizing source transcripts, e.g., by pre-training with automatic speech recognition (ASR) and machine translation (MT) tasks, or by introducing additional ASR and MT data. Unfortunately, transcripts are only sometimes available since numerous unwritten languages exist worldwide. In this paper, we aim to utilize large amounts of target-side monolingual data to enhance ST without transcripts. Motivated by the remarkable success of back translation in MT, we develop a back translation algorithm for ST (BT4ST) to synthesize pseudo ST data from monolingual target data. To ease the challenges posed by short-to-long generation and one-to-many mapping, we introduce self-supervised discrete units and achieve back translation by cascading a target-to-unit model and a unit-to-speech model. With our synthetic ST data, we achieve an average boost of 2.3 BLEU on MuST-C $\mathrm{En}\rightarrow \mathrm{De}$ , $\mathrm{En}\rightarrow \mathrm{Fr}$ , and $\mathrm{En}\rightarrow \mathrm{Es}$ datasets. More experiments show that our method is especially effective in low-resource scenarios.[12]
16
+
17
+ # 1 Introduction
18
+
19
+ End-to-end speech-to-text translation (ST) means directly translating speech in the source language to target text without generating source transcripts (Bérard et al., 2016; Duong et al., 2016). Different from traditional cascading methods which first transcribe the speech with automatic speech recognition (ASR) and then translate the transcripts into the target text with machine translation (MT), end-to-end ST has the potential to reduce latency and avoid error propagation. Hence, it has drawn much attention and achieved great suc
20
+
21
+ cess in recent years (Anastasopoulos et al., 2021, 2022).
22
+
23
+ However, it is challenging to train an end-to-end ST model with only speech-translation pairs. Traditional cascaded models learn cross-modal mapping with ASR and cross-lingual mapping with MT. In contrast, end-to-end ST requires simultaneous cross-modal and cross-lingual mapping, which is more complicated and usually relies on more training data. However, the amount of ST data is usually limited due to the high cost of data collection, so the ST model trained with only speech-translation pairs is usually unsatisfactory.
24
+
25
+ To tackle these problems, researchers often utilize source transcripts to assist ST training by introducing auxiliary ASR and MT tasks. With abundant ASR and MT data, the ASR task can help the model learn better cross-modal mapping, while the MT task can help learn better cross-lingual mapping, which can significantly improve ST as shown in recent ST studies (Wang et al., 2020a; Xu et al., 2021; Ye et al., 2021; Fang et al., 2022). Unfortunately, source transcripts are not always available. It is estimated that there are around 3000 unwritten languages in the world which have no orthography for transcription<sup>3</sup>. For those languages, we can no longer leverage source transcripts to help with training, so many of the latest techniques fail to benefit them.
26
+
27
+ How to train a stronger ST model without transcripts? In this paper, we address this question from the perspective of data augmentation. Although ASR and MT data are unavailable, a large amount of target-side monolingual data is still easily accessible. Motivated by the success of back translation in MT (Sennrich et al., 2016; Edunov et al., 2018), we aim to develop a back translation algorithm for ST (BT4ST) to synthesize pseudo ST data from monolingual target data. However, compared to text-to-text back translation, gener
28
+
29
+ ating source speech from the target text without source transcripts is much more challenging<sup>4</sup>. First, the length of text is usually only tens or hundreds, but the length of speech is about tens of thousands<sup>5</sup>. Therefore, the model is required to generate an extremely long sequence from a short sequence without the assumption of monotonic alignment, which is a more difficult sequential decision problem. Second, the conversion from text to speech is a one-to-many mapping problem due to the variations in speech (Chen et al., 2021; Ren et al., 2021). For example, the pronunciation of the same content may differ among speakers.
30
+
31
+ To address these challenges, we introduce self-supervised discrete units of the source speech as intermediate representations, and achieve back translation by cascading a target-to-unit model and a unit-to-speech model. Since the length of unit sequences is similar to the length of target characters<sup>6</sup>, and there is a monotonic assumption between the unit sequence and the source speech, the short-to-long generation problem in target-to-unit and unit-to-speech models can be greatly alleviated. Besides, discrete units can disentangle content information from other variation information (e.g., pitch and speaker) (Polyak et al., 2021), which eases the one-to-many mapping problem in the target-to-unit model<sup>7</sup>. We also introduce a speaker encoder to provide speaker information as input to the unit-to-speech model, which allows us to generate diverse source speeches by coupling different speaker representations. Following this pipeline, we can synthesize large amounts of pseudo ST data from monolingual target data without requiring transcripts. Finally, we train our ST model with both synthetic and real data.
32
+
33
+ We conduct experiments on MuST-C $\mathrm{En} \rightarrow \mathrm{De}$ , $\mathrm{En} \rightarrow \mathrm{Fr}$ , and $\mathrm{En} \rightarrow \mathrm{Es}$ datasets. By leveraging about 5M additional monolingual target data for each language pair, we achieve an average improvement of 2.3 BLEU compared with the strong baseline. We also observe that our approach is more effective in low-resource scenarios, yielding a boost of
34
+
35
+ 5.6 BLEU when only 100 hours of ST data are available. In addition, we generate multiple different pseudo datasets with a simple Diverse BT4ST method, train several models separately with each dataset, and ensemble them together. By ensembling five models, we achieve an average boost of 4.0 BLEU in three translation directions.
36
+
37
+ # 2 Background
38
+
39
+ Our work focuses on developing a back translation algorithm for ST. We first introduce the task definition and model architecture of ST in Section 2.1, and then introduce the concept of back translation in Section 2.2.
40
+
41
+ # 2.1 Speech-to-text Translation
42
+
43
+ Task Definition The goal of speech-to-text translation (ST) is to translate speech in one language into text in another language. We denote the source speech as $\mathbf{x} = (x_{1},\dots,x_{I})$ , where $I$ is the length of the audio waveform. The model generates the target sentence $\mathbf{y} = (y_{1},\dots,y_{J})$ , where $J$ is the length of the target text. In this paper, we assume that transcripts of the source speech are not available, which is a more general scenario considering about 3000 unwritten languages in the world.
44
+
45
+ Model Architecture Our ST model consists of three stacked modules: acoustic encoder, length adaptor, and translation model. The acoustic encoder is a HuBERT (Hsu et al., 2021) model pretrained on unlabelled audio data, which can generate meaningful representations for the source speech. The length adaptor (Li et al., 2021) is a series of convolutional layers to shrink the length of speech representations by a factor of 4. The translation model is a Transformer (Vaswani et al., 2017) with $N$ encoder layers and $N$ decoder layers, which takes the shrunken speech representations as input and outputs the target sentence. We train the ST model by minimizing the cross-entropy loss:
46
+
47
+ $$
48
+ \mathcal {L} _ {\mathrm {S T}} = - \sum_ {j = 1} ^ {J} \log p \left(y _ {j} \mid \mathbf {x}, \mathbf {y} _ {< j}\right). \tag {1}
49
+ $$
50
+
51
+ # 2.2 Back Translation
52
+
53
+ Back translation (BT) is a simple and effective method to leverage target-side monolingual data in neural machine translation (NMT). Formally, given a parallel corpus $\mathcal{D} = \{\left(\mathbf{x}^{(n)},\mathbf{y}^{(n)}\right)\}_{n = 1}^{N}$ , and a monolingual corpus of the target language
54
+
55
+ ![](images/aa82e518d0422fe56666b3e6fdafb87b84950bf9ac87e995de1a07c8ed304f04.jpg)
56
+ (a) BT4ST Model
57
+
58
+ ![](images/ed12d21fccb4bf2e1758d0b88effdbc3e62d9ca5877cc1fa129f48ae3ecf8aae.jpg)
59
+ (b) Target-to-unit Model
60
+
61
+ ![](images/da3edbe77afbc99ee772a11aa6a9172a1b8a6d62e767bf766bf81fc792ba2857.jpg)
62
+ (c) Unit-to-speech Model
63
+ Figure 1: The overall architecture of our model. $R$ -Unit: reduced discrete units; $O$ -Unit: original discrete units.
64
+
65
+ $\mathcal{T} = \{\mathbf{y}^{(m)}\}_{m = 1}^{M}$ we first train a target-to-source model on $\mathcal{D}$ . Next, we use this model to generate additional pseudo parallel data $\widetilde{\mathcal{D}} = \{(\widetilde{\mathbf{x}}^{(m)},\mathbf{y}^{(m)})\}_{m = 1}^{M}$ from the monolingual corpus $\mathcal{T}$ . Finally, $\widetilde{\mathcal{D}}$ can be used as a complement to $\mathcal{D}$ to train a stronger source-to-target model.
66
+
67
+ # 3 Method: BT4ST
68
+
69
+ How to acquire a target-to-source model for ST given a ST parallel corpus? Directly generating source speech from the target text is a challenging problem. Inspired by recent success in self-supervised discrete representation learning for speech (Baevski et al., 2020; Hsu et al., 2021; Lakhotia et al., 2021), we first transform the source speech into a sequence of discrete units with a speech pre-trained model (Section 3.1), which is used as an intermediate representation in the back translation process. With discrete units, we train a target-to-unit model (Section 3.2) and a unit-to-speech model (Section 3.3) on the parallel corpus, where the former predicts the sequence of discrete units corresponding to the source speech, and the latter converts discrete units into waveform. The model architecture is illustrated in Figure 1.
70
+
71
+ # 3.1 Unit-based Speech Representation
72
+
73
+ We use the pre-trained HuBERT (Hsu et al., 2021) model to generate discrete units corresponding to the source speech following Lee et al. (2022a,b). HuBERT generates $50\mathrm{Hz}$ continuous representations for the input speech. We apply the K-means clustering algorithm to the continuous representations of the training data, and then transform the continuous representations into the corresponding cluster indices, i.e., discrete units. Finally, the in
74
+
75
+ put speech $\mathbf{x} = (x_{1},\dots,x_{I})$ is converted into a sequence of discrete units $\mathbf{z} = (z_{1},\dots,z_{T}),z_{t}\in$ $\{0,1,\ldots ,K - 1\} ,\forall 1\leq t\leq T$ , where $K$ is the number of clusters, and $T$ is the number of frames where $T = \lfloor \frac{I}{320}\rfloor$ . There are two advantages to use discrete units as intermediate representations rather than predicting audio waveform directly. First, the sequence of discrete units is much shorter than the audio waveform, alleviating the difficulty of short-to-long generation. Second, discrete units can disentangle speech content from the pitch and speaker information (Polyak et al., 2021), which eases the one-to-many mapping problem.
76
+
77
+ # 3.2 Target-to-unit Model
78
+
79
+ Our target-to-unit model is a Transformer-based sequence-to-sequence model, which predicts discrete units of the source speech based on the target text. The target text $\mathbf{y}$ is tokenized as characters and fed to the encoder. For the discrete units $\mathbf{z}$ , we first merge repeating units into a single one to obtain the reduced discrete units $\mathbf{z}' = (z_1', \dots, z_{T'}')$ following Lee et al. (2022a). For example, $(1, 1, 2, 2, 2, 3, 4, 4)$ will collapse to $(1, 2, 3, 4)$ . We then train the model with reduced discrete units as the target, which can accelerate training and inference. The training objective is as follows:
80
+
81
+ $$
82
+ \mathcal {L} _ {\mathrm {T 2 U}} = - \sum_ {t = 1} ^ {T ^ {\prime}} \log p \left(z _ {t} ^ {\prime} | \mathbf {y}, \mathbf {z} _ {< t} ^ {\prime}\right). \tag {2}
83
+ $$
84
+
85
+ # 3.3 Unit-to-speech Model
86
+
87
+ Our unit-to-speech model is a unit-based HiFiGAN vocoder (Kong et al., 2020) as proposed in Polyak et al. (2021). It takes the reduced discrete units as input and generates the waveform. The
88
+
89
+ model consists of four modules: duration predictor, speaker encoder, generator, and discriminator.
90
+
91
+ Duration Predictor As the output of the target-to-unit model is reduced discrete units, we add a duration predictor (Ren et al., 2021) to predict the duration of each unit. It consists of two 1D-convolutional layers with ReLU activation, each followed by layer normalization and dropout. Finally, a linear layer projects the hidden state into a scalar as duration. We denote the predicted duration vector as $\mathbf{d} = (d_1,\dots,d_{T'})$ , and the ground truth as $\mathbf{d}^{*} = (d_{1}^{*},\dots,d_{T^{\prime}}^{*})$ . The duration predictor is optimized with Mean Squared Logarithmic Error (MSLE) between ground truth and predictions as:
92
+
93
+ $$
94
+ \mathcal {L} _ {\mathrm {D P}} = \frac {1}{T ^ {\prime}} \sum_ {t = 1} ^ {T ^ {\prime}} \left(\log \left(1 + d _ {t}\right) - \log \left(1 + d _ {t} ^ {*}\right)\right) ^ {2}. (3)
95
+ $$
96
+
97
+ Given the duration vector, we expand reduced discrete units by repeating each unit. For example, given $\mathbf{z}' = (1,2,3,4)$ and the corresponding duration vector $\mathbf{d} = (2,3,1,2)$ , the expanded sequence becomes $\mathbf{z} = (1,1,2,2,2,3,4,4)$ . We use ground truth duration during training and predicted one during inference. Finally, the units are converted to continuous representations via a look-up table.
98
+
99
+ Speaker Encoder Discrete units contain little speaker information, but ST corpus usually contains speech from multiple speakers. To ease the one-to-many mapping problem in speech synthesis, we introduce a speaker encoder to extract the speaker information. The speaker encoder is a pretrained speaker verification network (Wan et al., 2018), which extracts a single 256-dimensional speaker embedding from the speech. The speaker embedding is then concatenated to the representation of each unit. During inference, we randomly select a speaker embedding from the training set for each sample. It allows us to synthesize a pseudo ST dataset containing multiple speakers.
100
+
101
+ Generator and Discriminator The generator and discriminator are the same as the original HiFiGAN (Kong et al., 2020). The generator consists of several stacked blocks, each containing a transposed convolution layer followed by multiple residual blocks. It takes the concatenated features as input and outputs the waveform $\mathbf{x}$ . The discriminator contains a Multi-Period Discriminator (MPD) and a Multi-Scale Discriminator (MSD), which are used to identify the periodic or consecutive patterns in the audio. The generator and discriminator
102
+
103
+ # Algorithm 1: Back Translation for ST
104
+
105
+ Input :ST data $\mathcal{D} = \{(\mathbf{x}^{(n)},\mathbf{y}^{(n)})\}_{n = 1}^{N},$ Target data $\mathcal{T} = \{\mathbf{y}^{(m)}\}_{m = 1}^{M},$ Data selection ratio $\rho$
106
+
107
+ Output:ST model $M_{x\rightarrow y}$
108
+
109
+ 1 Procedure BT4ST(D, T, $\rho$ )
110
+
111
+ 2 Get reduced discrete units $\mathbf{z}'$ from $\mathbf{x}$ to create $\mathcal{D}' = \{(\mathbf{x}^{(n)},\mathbf{z}'^{(n)},\mathbf{y}^{(n)})\}_{n = 1}^{N}$ , for every $(\mathbf{x},\mathbf{y})\in \mathcal{D}$
112
+ 3 Train target-to-unit model $M_{z^{\prime}\leftarrow y}$ and unit-to-target model $M_{z^{\prime}\rightarrow y}$ with paired data $(\mathbf{z}^{\prime},\mathbf{y})$ in $\mathcal{D}'$
113
+ 4 Train unit-to-speech model $M_{x\leftarrow z^{\prime}}$ with paired data $(\mathbf{x},\mathbf{z}^{\prime})$ in $\mathcal{D}'$
114
+ 5 Use $M_{z' \leftarrow y}$ and $M_{x \leftarrow z'}$ to create
115
+
116
+ $$
117
+ \begin{array}{l} \widetilde {\mathcal {D}} = \{(\widetilde {\mathbf {x}} ^ {(m)}, \widetilde {\mathbf {z}} ^ {\prime (m)}, \mathbf {y} ^ {(m)}) \} _ {m = 1} ^ {M}, \text {f o r} \\ \text {e v e r y} \mathbf {y} \in \mathcal {T} \end{array}
118
+ $$
119
+
120
+ 6 Use $M_{z^{\prime}\to y}$ to translate $\widetilde{\mathbf{z}}^{\prime}$ into $\widetilde{\mathbf{y}}$ , and compute BLEU $(\widetilde{\mathbf{y}},\mathbf{y})$ , for every $(\widetilde{\mathbf{x}},\widetilde{\mathbf{z}}^{\prime},\mathbf{y})\in \widetilde{\mathcal{D}}$
121
+ 7 Select top $\rho \cdot M$ samples from $\widetilde{\mathcal{D}}$ based on BLEU scores, denoted as $\widetilde{\mathcal{D}}_S$ 8 Training $(\mathcal{D},\widetilde{\mathcal{D}}_S)$
122
+
123
+ 9 End
124
+
125
+ 10 Procedure Training $(\mathcal{D},\widetilde{\mathcal{D}}_S)$
126
+ 11 | Pre-train ST model $M_{x\to y}$ on $\widetilde{\mathcal{D}}_S$
127
+ 12 | Fine-tune ST model $M_{x\to y}$ on $\mathcal{D}$
128
+ 13 End
129
+
130
+ are trained adversarially. More details about the HiFi-GAN can be found in Appendix A.
131
+
132
+ # 3.4 Data Selection and Model Training
133
+
134
+ By cascading the target-to-unit model and unit-to-speech model, we can synthesize ST data $\widetilde{\mathcal{D}} = \{(\widetilde{\mathbf{x}}^{(m)},\widetilde{\mathbf{z}}^{\prime (m)},\mathbf{y}^{(m)})\}_{m = 1}^{M}$ from the target-side monolingual corpus $\mathcal{T} = \{\mathbf{y}^{(m)}\}_{m = 1}^{M}$ , where $\widetilde{\mathbf{x}}$ is the synthetic speech and $\widetilde{\mathbf{z}}^{\prime}$ is the corresponding reduced discrete units. However, the synthetic corpus may contain some low-quality data, which may hurt model training. Therefore, we introduce data selection and 2-stage model training to better utilize the synthetic data.
135
+
136
+ Data Selection To identify the low-quality data, we train a unit-to-target model to translate the generated units $\widetilde{\mathbf{z}}^{\prime}$ back into target text $\widetilde{\mathbf{y}}$ , and compute the BLEU score (Papineni et al., 2002) between $\widetilde{\mathbf{y}}$ and the ground truth $\mathbf{y}$ , i.e., $\mathrm{BLEU}(\widetilde{\mathbf{y}},\mathbf{y})$ . Finally,
137
+
138
+ we only keep the top $\rho \cdot M$ samples according to the BLEU score, where $\rho$ is the selection ratio. The remaining low-quality samples are discarded.
139
+
140
+ 2-stage Model Training After we get the selected synthetic ST data, we train the model in a 2-stage manner following Abdulmumin et al. (2021). We first pre-train the model on synthetic data, and then fine-tune the model on real data. This can prevent the noise-infested synthetic data from overwhelming real data during training. Algorithm 1 describes the whole process of our proposed method.
141
+
142
+ # 4 Experiments
143
+
144
+ # 4.1 Datasets
145
+
146
+ MuST-C MuST-C (Di Gangi et al., 2019) is a multilingual speech translation dataset, which contains about 400 hours of English (En) audio clips and corresponding translations in 8 languages: German (De), French (Fr), Spanish (Es), Italian (It), Portuguese (Pt), Dutch (Nl), Romanian (Ro), and Russian (Ru). We conduct experiments on $\mathrm{En}\rightarrow \mathrm{De}$ , $\mathrm{En}\rightarrow \mathrm{Fr}$ , and $\mathrm{En}\rightarrow \mathrm{Es}$ , because these three languages have larger public monolingual corpora.
147
+
148
+ Monolingual Target Data We use the target text in WMT (Buck and Koehn, 2016) $\mathrm{En} \rightarrow \mathrm{De}$ , $\mathrm{En} \rightarrow \mathrm{Fr}$ , and $\mathrm{En} \rightarrow \mathrm{Es}$ datasets as monolingual target data. Specifically, we use europarl v7 $^8$ , commoncrawl $^9$ , news commentary v12 $^{10}$ subsets for all three languages. The source text is never used in the experiments. The detailed statistics of data we used are shown in Table 1.
149
+
150
+ # 4.2 Model Settings
151
+
152
+ Target-to-unit Model The target-to-unit model is a Transformer with 6 encoder layers and 6 decoder layers. Each layer comprises 512 hidden states, 4 attention heads, and 2048 feed-forward hidden states. The dropout is 0.3, and the label smoothing is 0.1. For target text, we first lowercase the text and segment it into characters using SentencePiece<sup>11</sup>. For discrete units, we use the pre-trained quantized model<sup>12</sup>, which learns $K = 100$ clusters
153
+
154
+ <table><tr><td rowspan="2">Target</td><td colspan="2">MuST-C (En→)</td><td colspan="4">Monolingual Data</td></tr><tr><td>hours</td><td>#samples</td><td>Euro.</td><td>CC.</td><td>NC.</td><td>All</td></tr><tr><td>De</td><td>408</td><td>234k</td><td>1.9M</td><td>2.4M</td><td>0.3M</td><td>4.6M</td></tr><tr><td>Fr</td><td>492</td><td>280k</td><td>2.0M</td><td>3.2M</td><td>0.3M</td><td>5.5M</td></tr><tr><td>Es</td><td>504</td><td>270k</td><td>2.0M</td><td>1.8M</td><td>0.3M</td><td>4.1M</td></tr></table>
155
+
156
+ Table 1: Statistics of all datasets. Euro.: europarl v7; CC.: commoncrawl; NC.: news commentary v12.
157
+
158
+ from the 6th layer representations of pre-trained HuBERT-Base model $^{13}$ , to convert the speech into discrete units. During training, the batch size is 400, and the maximum learning rate is 5e-4. We train the model up to 100k steps with Adam optimizer (Kingma and Ba, 2015). During inference, we use beam search with a beam size of 8 to generate the reduced discrete units.
159
+
160
+ The unit-to-target model is the same as the target-to-unit model except for the translation direction, which is used for data selection. During inference, we use greedy search to save time.
161
+
162
+ Unit-to-speech Model For the unit-to-speech model, the configurations of the generator and discriminator are the same as Polyak et al. (2021). The 1D-convolutional layers in the duration predictor are set to kernel size 3, padding 1, and hidden dimension 256. We use the pre-trained $d$ -vector model<sup>14</sup> as the speaker encoder to extract the 256-dimensional speaker embedding. We train the model up to 100k steps with a batch size of 128.
163
+
164
+ ST Model The ST model contains three stacked modules. We use the pre-trained HuBERT-Base model as the acoustic encoder, which takes the raw 16-bit $16\mathrm{kHz}$ audio wave as input. The length adaptor comprises two 1D-convolutional layers with kernel size 5, stride size 2, padding 2, and hidden dimension 1024. The translation model follows Transformer-Base architecture, containing 6 encoder layers and 6 decoder layers. Each layer comprises 512 hidden states, 8 attention heads, and 2048 feed-forward hidden states. The dropout is 0.1, and the label smoothing is 0.1. We refer to this architecture as HU-TRANSFORMER. We learn a vocabulary of size $8\mathrm{k}$ from the target texts in the MuST-C dataset to segment the target texts into subwords for training the ST model.
165
+
166
+ To augment the ST model with back translation, we first select the top $\rho = 75\%$ of synthetic data
167
+
168
+ <table><tr><td rowspan="2">Models</td><td colspan="2">External Data</td><td colspan="2">En→De</td><td colspan="2">En→Fr</td><td colspan="2">En→Es</td><td colspan="2">Average</td></tr><tr><td>Audio</td><td>Target</td><td>BLEU</td><td>Δ</td><td>BLEU</td><td>Δ</td><td>BLEU</td><td>Δ</td><td>BLEU</td><td>Δ</td></tr><tr><td colspan="11">Previous ST baselines (No transcripts used)</td></tr><tr><td>REVISIT-ST (Zhang et al., 2022a)</td><td>×</td><td>×</td><td>23.0</td><td></td><td>33.5</td><td></td><td>28.0</td><td></td><td>28.2</td><td></td></tr><tr><td>W-TRANSF. (Ye et al., 2021)</td><td>✓</td><td>×</td><td>23.6</td><td></td><td>34.6</td><td></td><td>28.4</td><td></td><td>28.9</td><td></td></tr><tr><td colspan="11">Our implementations</td></tr><tr><td>HU-TRANSFORMER</td><td>✓</td><td>×</td><td>24.3</td><td></td><td>34.9</td><td></td><td>28.7</td><td></td><td>29.3</td><td></td></tr><tr><td>BT4ST</td><td>✓</td><td>✓</td><td>26.6*</td><td>+2.3</td><td>36.9*</td><td>+2.0</td><td>31.2*</td><td>+2.5</td><td>31.6</td><td>+2.3</td></tr></table>
169
+
170
+ Table 2: BLEU scores on MuST-C En→De, En→Fr, and En→Es tst-COMMON set. * means the improvements over HU-TRANSFORMER are statistically significant (p < 0.01).
171
+
172
+ ![](images/3d3610107a68fec036131faf8368a6c9163585482cc09f7f620f03f2376736df.jpg)
173
+ Figure 2: BLEU scores on MuST-C En $\rightarrow$ Detst-COMMON set with different data selection ratio $\rho$
174
+
175
+ based on BLEU scores. The target texts in the synthetic data are segmented into subwords using the same vocabulary. We use Adam optimizer with 4k warm-up steps to pre-train the model on synthetic data up to 300k steps, and fine-tune the model on MuST-C up to 20 epochs. During both pre-training and fine-tuning, each batch contains at most 16M audio frames, and the maximum learning rate is 1e-4. During inference, we average the checkpoints of the last 10 epochs for evaluation. We use beam search with a beam size of 8. SacreBLEU $^{15}$ (Post, 2018) is used to compute case-sensitive tokenized BLEU scores and the statistical significance of translation results with paired bootstrap resampling $^{16}$ (Koehn, 2004). The length penalty is set to 1.2, 1.8, and 0.6 for $\mathrm{En} \rightarrow \mathrm{De}$ , $\mathrm{En} \rightarrow \mathrm{Fr}$ , and $\mathrm{En} \rightarrow \mathrm{Es}$ , respectively. We implement our model with $fairseq^{17}$ (Ott et al., 2019). All models are trained on 4 Nvidia Tesla V100 GPUs.
176
+
177
+ Baseline Systems We include two baseline systems: REVISIT-ST (Zhang et al., 2022a) and W-TRANSF. (Ye et al., 2021) for comparison. REVISIT-ST is a carefully designed ST baseline including several techniques like parameterized distance penalty (PDP) and CTC-based regularization. W-TRANSF. is a stronger ST baseline with a pretrained acoustic model, which combines Wav2vec 2.0 (Baevski et al., 2020) and Transformer. Both of them are only trained on speech-translation pairs without using any transcripts. Our HU-TRANSFORMER is also a strong baseline model trained on speech-translation pairs from MuST-C, and we examine our proposed BT4ST on top of this by adding synthetic ST data.
178
+
179
+ # 5 Results and Analysis
180
+
181
+ # 5.1 Results on MuST-C Dataset
182
+
183
+ Table 2 shows the results on MuST-C $\mathrm{En}\rightarrow \mathrm{De}$ , $\mathrm{En}\rightarrow \mathrm{Fr}$ , and $\mathrm{En}\rightarrow \mathrm{Es}$ tst-COMMON set. First, we observe that our HU-TRANSFORMER is a strong baseline compared with previous baselines. Second, by synthesizing pseudo ST data with our proposed BT4ST and using it to pre-train the model, we achieve an average boost of 2.3 BLEU in three translation directions. It demonstrates that our approach can effectively utilize external monolingual target data to improve the performance of ST.
184
+
185
+ # 5.2 Impact of Data Selection Ratio
186
+
187
+ Although previous work (Edunov et al., 2018) found that noisy synthetic data can benefit training, we argue that the extremely low-quality data also hurt performance. As described in Section 3.4, we select top $\rho \cdot M$ synthetic data based on BLEU scores. We constrain $\rho$ in $[0\%, 25\%, 50\%, 75\%, 100\%]$ for experiments, and the results on MuST-C En→De tst-COMMON set are shown in Figure 2. We find that filtering out
188
+
189
+ <table><tr><td>Methods</td><td>BLEU</td></tr><tr><td>Beam search</td><td>26.6</td></tr><tr><td>Greedy search</td><td>26.2</td></tr><tr><td>Top-10 sampling</td><td>26.4</td></tr><tr><td>Sampling</td><td>26.1</td></tr></table>
190
+
191
+ Table 3: BLEU scores on MuST-C $\mathbf{E}\mathbf{n}\rightarrow \mathbf{D}$ tst-COMMOn set with different unit generation methods.
192
+
193
+ <table><tr><td>Synthetic Data Types</td><td>BLEU</td></tr><tr><td>Multi-speaker</td><td>26.6 (±0.1)</td></tr><tr><td>Single-speaker</td><td>26.4</td></tr></table>
194
+
195
+ Table 4: BLEU scores on MuST-C $\mathbf{E}\mathbf{n}\rightarrow \mathbf{D}$ tst-COMMON set with different types of pseudo data. For multi-speaker data, we report the mean value and standard variance of BLEU scores derived from 3 independent experiments with different random seeds.
196
+
197
+ the last $25\%$ of samples (i.e., $\rho = 75\%$ ) gives a 0.4 BLEU improvement $(26.2 \rightarrow 26.6)$ and performs best. We use $\rho = 75\%$ for all experiments.
198
+
199
+ # 5.3 Impact of Unit Generation Methods
200
+
201
+ The generation method of the target-to-unit model also influences the performance of back translation, as it determines the quality and diversity of synthetic data. We conduct experiments with beam search, greedy search, top-10 sampling $^{18}$ , and sampling. As shown in Table 3, beam search performs best over all methods on MuST-C En→Det st-COMMON set. We consider two reasons for this. First, our ST dataset is actually a low-resource setting, containing only less than 300k parallel data $^{19}$ . Second, target-to-unit generation is a more difficult task compared to text translation. Therefore, beam search is more effective as it generates high probability outputs, while sampling from the model distribution may produce harmful low-quality data. We use beam search for all experiments.
202
+
203
+ # 5.4 Single-speaker vs. Multi-speaker Synthetic Data
204
+
205
+ As described in Section 3.3, we provide speaker embedding as input during speech synthesis, which allows us to synthesize pseudo ST datasets con
206
+
207
+ ![](images/f0815838772682854370a06f2635a61a3ebb6f387b39cb60b646e46c5c44aa05.jpg)
208
+ Figure 3: BLEU scores on MuST-C $\mathrm{En}\rightarrow$ Detst-COMMON set with different amount of monolingual and parallel data.
209
+
210
+ taining multiple speakers. To examine whether speaker diversity benefits back translation, we synthesize both multi-speaker pseudo data and single-speaker pseudo data for experiments. For multispeaker data, we randomly select a speaker embedding from the training set for each sample. For single-speaker data, we use the average speaker embedding on the training set for all samples. As shown in Table 4, we find that the multi-speaker data is slightly better than the single-speaker data, probably because it is closer to the real ST dataset.
211
+
212
+ # 5.5 Results with Different Amounts of Monolingual/Parallel Data
213
+
214
+ In this section, we investigate the results under different amounts of monolingual and parallel data. First, we randomly sample 100 hours of ST data (corresponding to about $58\mathrm{K}$ speech-translation pairs) from MuST-C $\mathrm{En} \rightarrow \mathrm{De}$ train set to simulate the low-resource setting. We then vary the amount of monolingual data used for back translation. As shown in Figure 3, we observe that (i) the BLEU score keeps increasing with the number of monolingual data regardless of the size of parallel data, and (ii) our approach is particularly effective in the low-resource setting. With only $12.5\%$ monolingual data (about $0.6\mathrm{M}$ ), we observe a 3.4 BLEU improvement compared with the baseline. When all $4.6\mathrm{M}$ monolingual data is used, we achieve a more significant boost of 5.4 BLEU.
215
+
216
+ # 5.6 Diverse BT4ST and Model Ensemble
217
+
218
+ Model ensemble is a widely-used technique in state-of-the-art MT systems (Barrault et al., 2020; Akhbardeh et al., 2021), which can combine differ
219
+
220
+ <table><tr><td rowspan="2">Models</td><td rowspan="2">#Models</td><td colspan="2">En→De</td><td colspan="2">En→Fr</td><td colspan="2">En→Es</td><td colspan="2">Average</td></tr><tr><td>BLEU</td><td>Δ</td><td>BLEU</td><td>Δ</td><td>BLEU</td><td>Δ</td><td>BLEU</td><td>Δ</td></tr><tr><td>HU-TRANSFORMER</td><td>1</td><td>24.3</td><td></td><td>34.9</td><td></td><td>28.7</td><td></td><td>29.3</td><td></td></tr><tr><td>BT4ST</td><td>1</td><td>26.6</td><td>+2.3</td><td>36.9</td><td>+2.0</td><td>31.2</td><td>+2.5</td><td>31.6</td><td>+2.3</td></tr><tr><td rowspan="4">Diverse BT4ST + Ensemble</td><td>2</td><td>27.5</td><td>+3.2</td><td>38.3</td><td>+3.4</td><td>32.3</td><td>+3.6</td><td>32.7</td><td>+3.4</td></tr><tr><td>3</td><td>27.9</td><td>+3.6</td><td>38.8</td><td>+3.9</td><td>32.4</td><td>+3.7</td><td>33.0</td><td>+3.7</td></tr><tr><td>4</td><td>28.1</td><td>+3.8</td><td>39.0</td><td>+4.1</td><td>32.6</td><td>+3.9</td><td>33.2</td><td>+3.9</td></tr><tr><td>5</td><td>28.0</td><td>+3.7</td><td>39.0</td><td>+4.1</td><td>32.8</td><td>+4.1</td><td>33.3</td><td>+4.0</td></tr></table>
221
+
222
+ ent single models (e.g., models trained on different data) to achieve stronger performance. To synthesize multiple diverse pseudo datasets from a single monolingual corpus, we introduce a simple Diverse BT4ST method. For the target-to-unit model, we activate the dropout modules during beam search decoding. For the unit-to-speech model, we randomly select the speaker embedding as above. By setting different random seeds, we can generate source speeches with different content and different speakers from the target text. In this way, we obtain multiple different pseudo datasets and train several models individually. We then combine these models by computing the token-level average log probability during decoding. As shown in Table 5, model ensemble can significantly boost performance. We achieve an average boost of 4.0 BLEU in three directions by assembling five models.
223
+
224
+ # 5.7 Performance of the Target-to-unit Model
225
+
226
+ In this section, we report the performance of our target-to-unit models. We evaluate the performance with two metrics: Unit-BLEU and ASR-BLEU. Unit-BLEU is the BLEU score calculated on the reduced discrete unit sequence. ASR-BLEU is the BLEU score calculated on the transcribed text with the open-source ASR-BLEU toolkit $^{20}$ . As shown in Table 6, our target-to-unit models achieve promising results on MuST-C De→En, Fr→En, and Es→En tst-COMMON set, indicating that our proposed method can synthesize reasonable ST data.
227
+
228
+ # 6 Related Work
229
+
230
+ End-to-end ST End-to-end ST is theoretically attractive due to its advantages in alleviating error propagation and reducing latency, but it also faces
231
+
232
+ Table 5: BLEU scores on MuST-C En→De, En→Fr, and En→Es tst-COMMON set with model ensemble.
233
+
234
+ <table><tr><td>Metrics</td><td>De→En</td><td>Fr→En</td><td>Es→En</td></tr><tr><td>Unit-BLEU</td><td>26.5</td><td>27.9</td><td>27.2</td></tr><tr><td>ASR-BLEU</td><td>19.0</td><td>24.5</td><td>20.8</td></tr></table>
235
+
236
+ Table 6: Unit-BLEU and ASR-BLEU scores of the target-to-unit models.
237
+
238
+ many challenges because of data scarcity. Therefore, researchers often leverage source transcripts to help train with auxiliary tasks. Plenty of existing work first pre-train the model with the ASR task (Bansal et al., 2019; Stoian et al., 2020; Wang et al., 2020b), MT task (Han et al., 2021; Fang et al., 2022; Ye et al., 2022; Fang and Feng, 2023; Zhou et al., 2023), or both together (Wang et al., 2020a; Alinejad and Sarkar, 2020; Le et al., 2021; Dong et al., 2021a; Xu et al., 2021), and then fine-tune the model with the ST task, which becomes the de-facto paradigm in recent ST studies. Le et al. (2020); Indurthi et al. (2021); Tang et al. (2021a,b); Dong et al. (2021b); Ye et al. (2021) adopt multi-task learning to share knowledge among different tasks to improve ST. Bapna et al. (2021, 2022); Chen et al. (2022); Cheng et al. (2022); Ao et al. (2022); Tang et al. (2022); Zhang et al. (2022b) jointly pre-train the model with speech and text data to learn a unified space for both modalities, which achieve competitive results in ST. Jia et al. (2019); Lam et al. (2022) synthesize ST data with the help of MT model, TTS model and forced alignment tools. However, all of these studies assume that transcripts are available, which does not hold true for large numbers of unwritten languages in the world. Zhang et al. (2022a) first challenge this assumption and propose a set of practices to train a better ST model with only speech-translation pairs. In this paper, we extend this line of research and propose a back translation algorithm to utilize large-scale monolingual target data to improve ST
239
+
240
+ without transcripts.
241
+
242
+ Back Translation Back translation for NMT was first proposed by Sennrich et al. (2016) and is widely used in state-of-the-art NMT systems (Akhbardeh et al., 2021). Since then, many techniques have been proposed to improve BT such as Iterative BT (Hoang et al., 2018; Dou et al., 2020), Tagged BT (Caswell et al., 2019; Marie et al., 2020), Tag-less BT (Abdulmumin et al., 2021), MetaBT (Pham et al., 2021), HintedBT (Ramnath et al., 2021), and so on. Edunov et al. (2018) investigates different generation methods of BT in large-scale settings. Huang et al. (2021); Liu et al. (2021) focus on combining back translation with pre-training. Xu et al. (2022) combines synthetic data generated by beam search and sampling to better trade off the importance and quality of synthetic data. Despite the success of BT in MT, BT for ST is still a challenging problem. Nguyen et al. (2022b) introduces a pipeline BT method for speech-to-speech translation which cascades an unsupervised MT model and a TTS model. In contrast, our approach can synthesize pseudo ST data from the target-side monolingual corpus without relying on source transcripts.
243
+
244
+ Discrete Speech Units Discrete units, as a self-supervised discrete representation of speech, have proved effective on many tasks, such as spoken language modeling (Lakhotia et al., 2021; Kharitonov et al., 2022; Gat et al., 2022; Borsos et al., 2022), speech-to-speech translation (Lee et al., 2022a,b; Popuri et al., 2022; Inaguma et al., 2022; Chen et al.; Li et al., 2022), speech emotion conversion (Kreuk et al., 2021), speech dialogue (Nguyen et al., 2022a), speech resynthesis (Polyak et al., 2021), speaking style conversion (Maimon and Adi, 2022), and so on. In this paper, we achieve back translation for ST by leveraging discrete units and further prove its effectiveness.
245
+
246
+ # 7 Conclusion and Future Work
247
+
248
+ In this paper, we develop a back translation algorithm for speech translation, which can synthesize pseudo ST data from monolingual target data without relying on transcripts. We utilize self-supervised discrete units and achieve back translation by cascading a target-to-unit model and a unit-to-speech model. Experimental results on the MuST-C benchmark demonstrate the superiority of our approach, especially in low-resource settings.
249
+
250
+ This work focuses on enhancing ST when the source transcripts are unavailable, which is an essential but under-explored issue. We hope our work will draw more attention to this issue from researchers, which will benefit more real-world unwritten languages. In the future, we are interested in exploring how to combine advanced BT techniques (e.g., Iterative BT) with our approach.
251
+
252
+ # Limitations
253
+
254
+ Our work provides an effective solution to augment ST when source transcripts are unavailable, which could benefit many unwritten languages. However, limited by the publicly available ST datasets, we use English as an unwritten language for experiments, which may slightly differ from real-world unwritten languages. Since we never use transcripts in our approach, we believe our work can shed some light on ST for real-world unwritten languages. We are glad to explore this if there are available datasets in the future.
255
+
256
+ # Ethics Statement
257
+
258
+ Our model is developed and evaluated with publicly available datasets: MuST-C and WMT. The pre-trained models we use, like HuBERT and d-vector models, are open and permitted for research purposes. Our use of the above artifacts is consistent with their intended use since they are widely used in the speech research community. Although our method could help the speech translation of unwritten languages like some dialects, the performance of the ST model still heavily relies on the amount of ST training data. Therefore, the output of the model is not always reliable and it would be better to be assisted by professional human translators in real applications.
259
+
260
+ # Acknowledgements
261
+
262
+ We thank all the anonymous reviewers for their insightful and valuable comments. This work was supported by National Key R&D Program of China (NO. 2018AAA0102502)
263
+
264
+ # References
265
+
266
+ Idris Abdulmumin, Bashir Shehu Galadanci, and Aliyu Garba. 2021. Tag-less back-translation. Mach. Transl., 35(4):519-549.
267
+ Farhad Akhbardeh, Arkady Arkhangorodsky, Magdalena Biesialska, Ondrej Bojar, Rajen Chatter
268
+
269
+ jee, Vishrav Chaudhary, Marta R. Costa-jussa, Cristina España-Bonet, Angela Fan, Christian Federmann, Markus Freitag, Yvette Graham, Roman Grundkiewicz, Barry Haddow, Leonie Harter, Kenneth Heafield, Christopher Homan, Matthias Huck, Kwabena Amponsah-Kaakyire, Jungo Kasai, Daniel Khashabi, Kevin Knight, Tom Kocmi, Philipp Koehn, Nicholas Lourie, Christof Monz, Makoto Morishita, Masaaki Nagata, Ajay Nagesh, Toshiaki Nakazawa, Matteo Negri, Santanu Pal, Allahsera Auguste Tapo, Marco Turchi, Valentin Vydrin, and Marcos Zampieri. 2021. Findings of the 2021 conference on machine translation (WMT21). In Proceedings of the Sixth Conference on Machine Translation, pages 1-88, Online. Association for Computational Linguistics.
270
+
271
+ Ashkan Alinejad and Anoop Sarkar. 2020. Effectively pretraining a speech translation decoder with machine translation data. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8014-8020, Online. Association for Computational Linguistics.
272
+
273
+ Antonios Anastasopoulos, Loic Barrault, Luisa Bentivogli, Marcely Zanon Boito, Ondrej Bojar, Roldano Cattoni, Anna Currey, Georgiana Dinu, Kevin Duh, Maha Elbayad, Clara Emmanuel, Yannick Esteve, Marcello Federico, Christian Federmann, Souhir Gahbiche, Hongyu Gong, Roman Grundkiewicz, Barry Haddow, Benjamin Hsu, David Javorsky, Vera Kloudova, Surafel Lakew, Xutai Ma, Prashant Mathur, Paul McNamee, Kenton Murray, Maria Nadejde, Satoshi Nakamura, Matteo Negri, Jan Niehues, Xing Niu, John Ortega, Juan Pino, Elizabeth Salesky, Jiatong Shi, Matthias Sperber, Sebastian Stüker, Katsuhito Sudoh, Marco Turchi, Yogesh Virkar, Alexander Waibel, Changhan Wang, and Shinji Watanabe. 2022. Findings of the IWSLT 2022 evaluation campaign. In Proceedings of the 19th International Conference on Spoken Language Translation (IWSLT 2022), pages 98-157, Dublin, Ireland (in-person and online). Association for Computational Linguistics.
274
+
275
+ Antonios Anastasopoulos, Ondrej Bojar, Jacob Bremerman, Roldano Cattoni, Maha Elbayad, Marcello Federico, Xutai Ma, Satoshi Nakamura, Matteo Negri, Jan Niehues, Juan Pino, Elizabeth Salesky, Sebastian Stüker, Katsuhito Sudoh, Marco Turchi, Alexander Waibel, Changhan Wang, and Matthew Wiesner. 2021. FINDINGS OF THE IWSLT 2021 EVALUATION CAMPAIGN. In Proceedings of the 18th International Conference on Spoken Language Translation (IWSLT 2021), pages 1-29, Bangkok, Thailand (online). Association for Computational Linguistics.
276
+
277
+ Junyi Ao, Rui Wang, Long Zhou, Chengyi Wang, Shuo Ren, Yu Wu, Shujie Liu, Tom Ko, Qing Li, Yu Zhang, Zhihua Wei, Yao Qian, Jinyu Li, and Furu Wei. 2022. SpeechT5: Unified-modal encoder-decoder pre-training for spoken language processing. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long
278
+
279
+ Papers), pages 5723-5738, Dublin, Ireland. Association for Computational Linguistics.
280
+
281
+ Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli. 2020. wav2vec 2.0: A framework for self-supervised learning of speech representations. Advances in Neural Information Processing Systems, 33.
282
+
283
+ Sameer Bansal, Herman Kamper, Karen Livescu, Adam Lopez, and Sharon Goldwater. 2019. Pre-training on high-resource speech recognition improves low-resource speech-to-text translation. In Proc. of NAACL-HLT, pages 58-68.
284
+
285
+ Ankur Bapna, Colin Cherry, Yu Zhang, Ye Jia, Melvin Johnson, Yong Cheng, Simran Khanuja, Jason Riesa, and Alexis Conneau. 2022. mslam: Massively multilingual joint pre-training for speech and text. CoRR, abs/2202.01374.
286
+
287
+ Ankur Bapna, Yu-an Chung, Nan Wu, Anmol Gulati, Ye Jia, Jonathan H Clark, Melvin Johnson, Jason Riesa, Alexis Conneau, and Yu Zhang. 2021. Slam: A unified encoder for speech and language modeling via speech-text joint pre-training. arXiv preprint arXiv:2110.10329.
288
+
289
+ Loic Barrault, Magdalena Biesialska, Ondrej Bojar, Marta R. Costa-jussa, Christian Federmann, Yvette Graham, Roman Grundkiewicz, Barry Haddow, Matthias Huck, Eric Joanis, Tom Kocmi, Philipp Koehn, Chi-kiu Lo, Nikola Ljubesic, Christof Monz, Makoto Morishita, Masaaki Nagata, Toshiaki Nakazawa, Santanu Pal, Matt Post, and Marcos Zampieri. 2020. Findings of the 2020 conference on machine translation (WMT20). In Proceedings of the Fifth Conference on Machine Translation, pages 1-55, Online. Association for Computational Linguistics.
290
+
291
+ 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.
292
+
293
+ Zalán Borsos, Raphaël Marinier, Damien Vincent, Eugene Kharitonov, Olivier Pietquin, Matt Sharifi, Olivier Teboul, David Grangier, Marco Tagliasacchi, and Neil Zeghidour. 2022. Audiolm: a language modeling approach to audio generation.
294
+
295
+ Christian Buck and Philipp Koehn. 2016. Findings of the WMT 2016 bilingual document alignment shared task. In Proceedings of the First Conference on Machine Translation: Volume 2, Shared Task Papers, pages 554-563, Berlin, Germany. Association for Computational Linguistics.
296
+
297
+ Isaac Caswell, Ciprian Chelba, and David Grangier. 2019. Tagged back-translation. In Proceedings of the Fourth Conference on Machine Translation (Volume 1: Research Papers), pages 53–63, Florence, Italy. Association for Computational Linguistics.
298
+
299
+ Mingjian Chen, Xu Tan, Bohan Li, Yanqing Liu, Tao Qin, sheng zhao, and Tie-Yan Liu. 2021. Adaspeech: Adaptive text to speech for custom voice. In International Conference on Learning Representations.
300
+ Peng-Jen Chen, Kevin Tran, Yilin Yang, Jingfei Du, Justine Kao, Yu-An Chung, Paden Tomasello, Paul-Ambroise Duquenne, Holger Schwenk, Hongyu Gong, Hirofumi Inaguma, Sravya Popuri, Changhan Wang, Juan Pino, Wei-Ning Hsu, and Ann Lee. Speech-to-speech translation for a real-world unwritten language.
301
+ Zhehuai Chen, Yu Zhang, Andrew Rosenberg, Bhuvana Ramabhadran, Pedro J. Moreno, Ankur Bapna, and Heiga Zen. 2022. Maestro: Matched speech text representations through modality matching. In IN-TERSPEECH.
302
+ Yong Cheng, Yu Zhang, Melvin Johnson, Wolfgang Macherey, and Ankur Bapna. 2022. Mu²slam: Multitask, multilingual speech and language models.
303
+ Mattia A. Di Gangi, Roldano Cattoni, Luisa Bentivogli, Matteo Negri, and Marco Turchi. 2019. MuST-C: a Multilingual Speech Translation Corpus. In Proceedings of the 2019 Conference of the North American Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 2012-2017, Minneapolis, Minnesota. Association for Computational Linguistics.
304
+ Qianqian Dong, Mingxuan Wang, Hao Zhou, Shuang Xu, Bo Xu, and Lei Li. 2021a. Consecutive decoding for speech-to-text translation. In The Thirty-fifth AAAI Conference on Artificial Intelligence, AAAI.
305
+ Qianqian Dong, Rong Ye, Mingxuan Wang, Hao Zhou, Shuang Xu, Bo Xu, and Lei Li. 2021b. Listen, understand and translate: Triple supervision decouples end-to-end speech-to-text translation. In Proceedings of the AAAI Conference on Artificial Intelligence.
306
+ Zi-Yi Dou, Antonios Anastasopoulos, and Graham Neubig. 2020. Dynamic data selection and weighting for iterative back-translation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5894-5904, Online. Association for Computational Linguistics.
307
+ Long Duong, Antonios Anastasopoulos, David Chiang, Steven Bird, and Trevor Cohn. 2016. An attentional model for speech translation without transcription. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 949-959, San Diego, California. Association for Computational Linguistics.
308
+ 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, pages 489-500, Brussels, Belgium. Association for Computational Linguistics.
309
+
310
+ Qingkai Fang and Yang Feng. 2023. Understanding and bridging the modality gap for speech translation. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics.
311
+ Qingkai Fang, Rong Ye, Lei Li, Yang Feng, and Mingxuan Wang. 2022. STEMM: Self-learning with speech-text manifold mixup for speech translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7050-7062, Dublin, Ireland. Association for Computational Linguistics.
312
+ Itai Gat, Felix Kreuk, Ann Lee, Jade Copet, Gabriel Synnaeve, Emmanuel Dupoux, and Yossi Adi. 2022. On the robustness of self-supervised representations for spoken language modeling.
313
+ Chi Han, Mingxuan Wang, Heng Ji, and Lei Li. 2021. Learning shared semantic space for speech-to-text translation. In *Findings of the Association for Computational Linguistics: ACL-IJCNLP* 2021, pages 2214-2225, Online. Association for Computational Linguistics.
314
+ Vu Cong Duy Hoang, Philipp Koehn, Gholamreza Haffari, and Trevor Cohn. 2018. Iterative backtranslation for neural machine translation. In Proceedings of the 2nd Workshop on Neural Machine Translation and Generation, pages 18-24, Melbourne, Australia. Association for Computational Linguistics.
315
+ Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, and Abdelrahman Mohamed. 2021. Hubert: Self-supervised speech representation learning by masked prediction of hidden units. IEEE/ACM Trans. Audio, Speech and Lang. Proc., 29:3451-3460.
316
+ Dandan Huang, Kun Wang, and Yue Zhang. 2021. A comparison between pre-training and large-scale back-translation for neural machine translation. In *Findings of the Association for Computational Linguistics: ACL-IJCNLP* 2021, pages 1718–1732, Online. Association for Computational Linguistics.
317
+ Hirofumi Inaguma, Sravya Popuri, Ilia Kulikov, Peng-Jen Chen, Changhan Wang, Yu-An Chung, Yun Tang, Ann Lee, Shinji Watanabe, and Juan Pino. 2022. Unity: Two-pass direct speech-to-speech translation with discrete units. arXiv preprint arXiv:2212.08055.
318
+ Sathish Indurthi, Mohd Abbas Zaidi, Nikhil Kumar Lakumarapu, Beomseok Lee, Hyojung Han, Seokchan Ahn, Sangha Kim, Chanwoo Kim, and Inchul Hwang. 2021. Task aware multi-task learning for speech to text tasks. In ICASSP 2021 - 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 7723-7727.
319
+ Ye Jia, Melvin Johnson, Wolfgang Macherey, Ron J. Weiss, Yuan Cao, Chung-Cheng Chiu, Naveen Ari, Stella Laurenzo, and Yonghui Wu. 2019. Leveraging weakly supervised data to improve end-to-end
320
+
321
+ speech-to-text translation. In Proc. of ICASSP, pages 7180-7184.
322
+ Eugene Kharitonov, Ann Lee, Adam Polyak, Yossi Adi, Jade Copet, Kushal Lakhotia, Tu Anh Nguyen, Morgane Riviere, Abdelrahman Mohamed, Emmanuel Dupoux, and Wei-Ning Hsu. 2022. Text-free prosody-aware generative spoken language modeling. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8666-8681, Dublin, Ireland. Association for Computational Linguistics.
323
+ Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In *ICLR (Poster)*.
324
+ 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.
325
+ Jungil Kong, Jaehyeon Kim, and Jaekyoung Bae. 2020. Hifi-gan: Generative adversarial networks for efficient and high fidelity speech synthesis. In Advances in Neural Information Processing Systems, volume 33, pages 17022-17033. Curran Associates, Inc.
326
+ Felix Kreuk, Adam Polyak, Jade Copet, Eugene Kharitonov, Tu Anh Nguyen, Morgane Rivière, Wei-Ning Hsu, Abdelrahman Mohamed, Emmanuel Dupoux, and Yossi Adi. 2021. Textless speech emotion conversion using decomposed and discrete representations. CoRR, abs/2111.07402.
327
+ Kushal Lakhotia, Eugene Kharitonov, Wei-Ning Hsu, Yossi Adi, Adam Polyak, Benjamin Bolte, Tu-Anh Nguyen, Jade Copet, Alexei Baevski, Abdelrahman Mohamed, and Emmanuel Dupoux. 2021. On generative spoken language modeling from raw audio. Transactions of the Association for Computational Linguistics, 9:1336-1354.
328
+ Tsz Kin Lam, Shigehiko Schamoni, and Stefan Riezler. 2022. Sample, translate, recombine: Leveraging audio alignments for data augmentation in end-to-end speech translation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 245-254, Dublin, Ireland. Association for Computational Linguistics.
329
+ Hang Le, Juan Pino, Changhan Wang, Jiatao Gu, Didier Schwab, and Laurent Besacier. 2020. Dual-decoder transformer for joint automatic speech recognition and multilingual speech translation. In Proceedings of the 28th International Conference on Computational Linguistics, pages 3520-3533, Barcelona, Spain (Online). International Committee on Computational Linguistics.
330
+ Hang Le, Juan Pino, Changhan Wang, Jiatao Gu, Didier Schwab, and Laurent Besacier. 2021. Lightweight adapter tuning for multilingual speech translation. In
331
+
332
+ 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 817-824, Online. Association for Computational Linguistics.
333
+ Ann Lee, Peng-Jen Chen, Changhan Wang, Jiatao Gu, Sravya Popuri, Xutai Ma, Adam Polyak, Yossi Adi, Qing He, Yun Tang, Juan Pino, and Wei-Ning Hsu. 2022a. Direct speech-to-speech translation with discrete units. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3327-3339, Dublin, Ireland. Association for Computational Linguistics.
334
+ Ann Lee, Hongyu Gong, Paul-Ambroise Duquenne, Holger Schwenk, Peng-Jen Chen, Changhan Wang, Sravya Popuri, Yossi Adi, Juan Pino, Jiatao Gu, and Wei-Ning Hsu. 2022b. Textless speech-to-speech translation on real data. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 860-872, Seattle, United States. Association for Computational Linguistics.
335
+ Xian Li, Changhan Wang, Yun Tang, Chau Tran, Yuqing Tang, Juan Pino, Alexei Baevski, Alexis Conneau, and Michael Auli. 2021. Multilingual speech translation from efficient finetuning of pretrained 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 827-838, Online. Association for Computational Linguistics.
336
+ Xinjian Li, Ye Jia, and Chung-Cheng Chiu. 2022. Textless direct speech-to-speech translation with discrete speech representation.
337
+ Xuebo Liu, Longyue Wang, Derek F. Wong, Liang Ding, Lidia S. Chao, Shuming Shi, and Zhaopeng Tu. 2021. On the complementarity between pre-training and back-translation for neural machine translation. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 2900–2907, Punta Cana, Dominican Republic. Association for Computational Linguistics.
338
+ Gallil Maimon and Yossi Adi. 2022. Speaking style conversion with discrete self-supervised units. ArXiv, abs/2212.09730.
339
+ Benjamin Marie, Raphael Rubino, and Atsushi Fujita. 2020. Tagged back-translation revisited: Why does it really work? In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5990–5997, Online. Association for Computational Linguistics.
340
+ Tu Anh Nguyen, Eugene Kharitonov, Jade Copet, Yossi Adi, Wei-Ning Hsu, Ali Elkahky, Paden Tomasello, Robin Algayres, Benoit Sagot, Abdelrahman Mohamed, and Emmanuel Dupoux. 2022a. Generative spoken dialogue language modeling.
341
+
342
+ Xuan-Phi Nguyen, Sravya Popuri, Changhan Wang, Yun Tang, Ilia Kulikov, and Hongyu Gong. 2022b. Improving speech-to-speech translation through unlabeled text. arXiv preprint arXiv:2210.14514.
343
+ 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 NAACL-HLT* 2019: Demonstrations.
344
+ 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.
345
+ Hieu Pham, Xinyi Wang, Yiming Yang, and Graham Neubig. 2021. Meta back-translation. In International Conference on Learning Representations.
346
+ Adam Polyak, Yossi Adi, Jade Copet, Eugene Kharitonov, Kushal Lakhotia, Wei-Ning Hsu, Abdelrahman Mohamed, and Emmanuel Dupoux. 2021. Speech Resynthesis from Discrete Disentangled Self-Supervised Representations. In Proc. Interspeech 2021.
347
+ Sravya Popuri, Peng-Jen Chen, Changhan Wang, Juan Miguel Pino, Yossi Adi, Jiatao Gu, Wei-Ning Hsu, and Ann Lee. 2022. Enhanced direct speech-to-speech translation using self-supervised pre-training and data augmentation. In Interspeech.
348
+ Matt Post. 2018. A call for clarity in reporting BLEU scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 186-191, Brussels, Belgium. Association for Computational Linguistics.
349
+ Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, and Ilya Sutskever. 2022. Robust speech recognition via large-scale weak supervision.
350
+ Sahana Ramnath, Melvin Johnson, Abhirut Gupta, and Aravindan Raghuveer. 2021. *HintedBT: Augmenting Back-Translation with quality and transliteration hints*. In *Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing*, pages 1717–1733, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
351
+ Yi Ren, Chenxu Hu, Xu Tan, Tao Qin, Sheng Zhao, Zhou Zhao, and Tie-Yan Liu. 2021. *Fastspeech* 2: Fast and high-quality end-to-end text to speech. In International Conference on Learning Representations.
352
+ 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
353
+
354
+ Linguistics (Volume 1: Long Papers), pages 86-96, Berlin, Germany. Association for Computational Linguistics.
355
+ Mihaela C Stoian, Sameer Bansal, and Sharon Goldwater. 2020. Analyzing asr pretraining for low-resource speech-to-text translation. In ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 7909-7913. IEEE.
356
+ Yun Tang, Hongyu Gong, Ning Dong, Changhan Wang, Wei-Ning Hsu, Jiatao Gu, Alexei Baevski, Xian Li, Abdelrahman Mohamed, Michael Auli, and Juan Pino. 2022. Unified speech-text pre-training for speech translation and recognition. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1488-1499, Dublin, Ireland. Association for Computational Linguistics.
357
+ Yun Tang, Juan Pino, Xian Li, Changhan Wang, and Dmitriy Genzel. 2021a. Improving speech translation by understanding and learning from the auxiliary text translation task. 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 4252-4261, Online. Association for Computational Linguistics.
358
+ Yun Tang, Juan Pino, Changhan Wang, Xutai Ma, and Dmitriy Genzel. 2021b. A general multi-task learning framework to leverage text data for speech to text tasks. In ICASSP 2021 - 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 6209-6213.
359
+ 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.
360
+ Li Wan, Quan Wang, Alan Papir, and Ignacio Lopez-Moreno. 2018. Generalized end-to-end loss for speaker verification. In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP 2018, Calgary, AB, Canada, April 15-20, 2018, pages 4879-4883. IEEE.
361
+ Chengyi Wang, Yu Wu, Shujie Liu, Zhenglu Yang, and Ming Zhou. 2020a. Bridging the gap between pretraining and fine-tuning for end-to-end speech translation. In Proc. of AAAI, volume 34, pages 9161-9168.
362
+ Chengyi Wang, Yu Wu, Shujie Liu, Ming Zhou, and Zhenglu Yang. 2020b. Curriculum pre-training for end-to-end speech translation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 3728-3738, Online. Association for Computational Linguistics.
363
+ Chen Xu, Bojie Hu, Yanyang Li, Yuhao Zhang, Shen Huang, Qi Ju, Tong Xiao, and Jingbo Zhu. 2021.
364
+
365
+ Stacked acoustic-and-textual encoding: Integrating the pre-trained models into speech translation encoders. 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 2619-2630, Online. Association for Computational Linguistics.
366
+ Jiahao Xu, Yubin Ruan, Wei Bi, Guoping Huang, Shuming Shi, Lihui Chen, and Lemao Liu. 2022. On synthetic data for back translation. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 419-430, Seattle, United States. Association for Computational Linguistics.
367
+ Rong Ye, Mingxuan Wang, and Lei Li. 2021. End-to-end speech translation via cross-modal progressive training. In Proc. of INTERSPEECH.
368
+ Rong Ye, Mingxuan Wang, and Lei Li. 2022. Cross-modal contrastive learning for speech translation. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5099-5113, Seattle, United States. Association for Computational Linguistics.
369
+ Biao Zhang, Barry Haddow, and Rico Sennrich. 2022a. Revisiting end-to-end speech-to-text translation from scratch. In International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pages 26193-26205. PMLR.
370
+ Ziqiang Zhang, Long Zhou, Junyi Ao, Shujie Liu, Lirong Dai, Jinyu Li, and Furu Wei. 2022b. Speechut: Bridging speech and text with hidden-unit for encoder-decoder based speech-text pre-training. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Online and Abu Dhabi.
371
+ Yan Zhou, Qingkai Fang, and Yang Feng. 2023. CMOT: Cross-modal mixup via optimal transport for speech translation. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics.
372
+
373
+ # A Details about the HiFi-GAN
374
+
375
+ The HiFi-GAN vocoder (Kong et al., 2020) consists of one generator and two discriminators. Next, we describe the model architecture and training objectives of HiFi-GAN.
376
+
377
+ Generator The generator is a convolutional neural network containing several stacked blocks. Each block comprises a transposed convolution layer followed by a multi-receptive field fusion (MRF) module. The transposed convolution layers upsample the input sequence to match the length of output waveforms. The MRF module includes multiple residual blocks with different receptive fields to model different patterns in parallel. The input to the generator is concatenated unit embedding $\mathrm{Emb}(\mathbf{z})$ and speaker embedding $\mathbf{e}_{\mathrm{spkr}}$ .
378
+
379
+ Discriminator The discriminator consists of a Multi-Period Discriminator (MPD) and a Multi-Scale Discriminator (MSD). MPD is a mixture of sub-discriminators operating on equally spaced samples of the input audio. We adopt 5 sub-discriminators and set the space between samples to [2,3,5,7,11] respectively. MSD is also a mixture of sub-discriminators operating on different input scales: raw audio, $\times 2$ downsampled audio, and $\times 4$ downsampled audio. MPD and MSD can identify different periodic and consecutive patterns in the audio.
380
+
381
+ Training Objectives Using $G$ to denote the generator and $D_{j}$ to denote each sub-discriminator, we define the adversarial loss of $G$ and $D_{j}$ as:
382
+
383
+ $$
384
+ \mathcal {L} _ {\mathrm {a d v}} (G; D _ {j}) = \mathbb {E} _ {\mathbf {x}} \left[ \big (1 - D _ {j} (\widehat {\mathbf {x}}) \big) ^ {2} \right], \quad (4)
385
+ $$
386
+
387
+ $$
388
+ \mathcal {L} _ {\mathrm {a d v}} \left(D _ {j}; G\right) = \mathbb {E} _ {\mathbf {x}} \left[ \left(1 - D _ {j} (\mathbf {x})\right) ^ {2} + D _ {j} (\widehat {\mathbf {x}}) ^ {2} \right], \tag {5}
389
+ $$
390
+
391
+ where $\mathbf{x}$ denotes the ground truth audio and $\widehat{\mathbf{x}} = G(\operatorname{Emb}(\mathbf{z}), \mathbf{e}_{\mathrm{spkr}})$ denotes the synthetic audio.
392
+
393
+ Besides, there are two auxiliary training objectives. The first term measures the L1 distance between mel-spectrogram of the ground truth audio and synthetic audio:
394
+
395
+ $$
396
+ \mathcal {L} _ {\mathrm {m e l}} (G) = \mathbb {E} _ {\mathbf {x}} \left[ \| \phi (\mathbf {x}) - \phi (\widehat {\mathbf {x}}) \| _ {1} \right], \tag {6}
397
+ $$
398
+
399
+ where $\phi$ is the function to compute melspectrogram of the audio. The second term is a feature-matching loss which measures the difference in discriminator features between ground truth
400
+
401
+ audio and synthetic audio:
402
+
403
+ $$
404
+ \mathcal {L} _ {\mathrm {f m}} (G; D _ {j}) = \mathbb {E} _ {\mathbf {x}} \left[ \sum_ {i = 1} ^ {L} \frac {1}{N _ {i}} \| \delta_ {i} (\mathbf {x}) - \delta_ {i} (\widehat {\mathbf {x}}) \| _ {1} \right], \tag {7}
405
+ $$
406
+
407
+ where $L$ denotes the number of layers in $D_{j}$ , $\delta_{i}$ denotes the feature extractor of $i$ -th layer, and $N_{i}$ denotes the number of features in $i$ -th layer.
408
+
409
+ Considering all sub-discriminators, the final training objectives are as follows:
410
+
411
+ $$
412
+ \begin{array}{l} \mathcal {L} _ {G} = \sum_ {j = 1} ^ {J} \left[ \mathcal {L} _ {\mathrm {a d v}} (G; D _ {j}) + \lambda_ {\mathrm {f m}} \mathcal {L} _ {\mathrm {f m}} (G; D _ {j}) \right] (8) \\ + \lambda_ {\mathrm {m e l}} \mathcal {L} _ {\mathrm {m e l}} (G), (9) \\ \end{array}
413
+ $$
414
+
415
+ $$
416
+ \mathcal {L} _ {D} = \sum_ {j = 1} ^ {J} \mathcal {L} _ {\mathrm {a d v}} \left(D _ {j}; G\right), \tag {10}
417
+ $$
418
+
419
+ where $J$ is the number of sub-discriminators. We set $\lambda_{\mathrm{fm}} = 2$ and $\lambda_{\mathrm{mel}} = 45$ .
420
+
421
+ # B Examples of Synthetic ST Data
422
+
423
+ To understand our approach more intuitively, we provide some examples of synthetic ST data in this section. Table 7, 8, and 9 show some examples of synthetic $\mathrm{En} \rightarrow \mathrm{De}$ , $\mathrm{En} \rightarrow \mathrm{Fr}$ , and $\mathrm{En} \rightarrow \mathrm{Es}$ ST data, respectively. For each sample, we give the original target text, generated reduced discrete units, generated source speech, and the corresponding transcript obtained with a state-of-the-art ASR model Whisper-Large $^{21}$ (Radford et al., 2022). We observe that our method can generate reasonable source speech, though it may contain minor errors or duplicates. This explains why our method can enhance ST successfully.
424
+
425
+ We also provide an example of our proposed Diverse BT4ST method in Table 10, which generates multiple diverse source speeches from only one target text. We observe that the four outputs of our model are all reasonable and differ from each other in some way, which confirms that Diverse BT4ST is a simple and effective method to generate diverse pseudo data.
426
+
427
+ We provide the corresponding audio files of the above samples at https://bt4st.github.io/.
428
+
429
+ <table><tr><td colspan="2">BT4ST: German text→English speech</td></tr><tr><td colspan="2">Case 1</td></tr><tr><td>Target (De)</td><td>Die Art und Weise, wie wir diese Steuern zahlen, wird sich verändern.(There is going to be a change in how we pay these taxes.)</td></tr><tr><td>Unit</td><td>71 82 73 70 14 76 94 32 64 60 70 14 76 11 64 74 27 47 59 33 94 32 64 1 66 82 11 45 64 65 6 15 92 57 31 59 33 91 43 74 2 89 6 15 7 23 53 62 29 28 6070 14 76 53 97 19 65 74 27 21 95 59 87 94 32 64 81 57 21 95 41 20</td></tr><tr><td>Speech (En)</td><td>10002000</td></tr><tr><td>ASR Output</td><td>The way we pay these taxes will change.</td></tr><tr><td colspan="2">Case 2</td></tr><tr><td>Target (De)</td><td>Auch diese Frage soll letztlich Aufschluss darüber geben, welche Voraussetzungen es für die Entstehung von Leben gibt.(This question should also provide information regarding the preconditions for the origins of life.)</td></tr><tr><td>Unit</td><td>71 86 38 44 80 26 87 91 43 74 2 78 33 14 76 68 9 43 6 95 92 21 95 23 42 44 80 81 83 84 57 96 55 39 67 54 57 93 86 53 62 29 28 37 24 51 19 74 2 3159 23 16 50 87 53 79 34 74 27 89 59 23 44 80 18 27 78 33 90 35 69 65 29 95 23 42 80 81 83 84 57 96 55 39 67 54 57 9386 68 73 16 60 27 89 59 23 44 80 18 6 15 49 41 84 57 96 55 67 54 57 93 34 37 24 61 79 81 83 2 96 55 67 54 57 93 34 48 36 40 99 82 11 64 53 73 16 50 52 30 1 21 95 23 44 80 18 6 15 49 7 23 73 16 66 77 90 35 24 13 58 3281 65 3 41 20</td></tr><tr><td>Speech (En)</td><td>100020003000400050006000</td></tr><tr><td>ASR Output</td><td>And that question is ultimately the conclusion about what conditions there are for the emergence of life.</td></tr><tr><td colspan="2">Case 3</td></tr><tr><td>Target (De)</td><td>Doch die von ihr getesteten Geräte sind auch für die Straβenplaner intereasant, Denn sie arbeiten nicht mit GPS und liefern nur begrenzte Informationen, die regelmäßige per Modem hochgeladen werden.(But the devices it is testing appeal to highway planners because they don&#x27;t use GPS and deliver a limited amount of information, uploaded periodically by modem.)</td></tr><tr><td>Unit</td><td>71 47 76 9 74 2 82 11 45 64 29 28 92 31 23 73 16 77 24 13 58 32 65 6 15 7 23 62 29 28 92 82 87 94 32 64 74 27 31 59 33 91 43 6 49 92 31 23 62 1 85 53037 51 19 65 6 49 7 87 9 19 37 86 53 44 80 18 21 95 52 25 62 6 49 92 31 87 42 88 81 83 84 57 96 55 39 67 54 57 93 3 52 30 99 82 62 6 49 92 21 5225 45 64 74 2 27 47 59 33 90 35 13 91 38 44 80 85 5 79 29 6 49 41 84 57 96 55 39 67 54 57 93 47 11 45 64 74 27 89 59 33 68 9 29 28 92 82 87 94 3264 166631879751926631236970144630742781476621662195456474274594687914361549418457965396754758344480186631237390353165077531855318553448018653230165087943264695923424808183845796556457965574579387985530705225932166898953903530903511643768437424790359718523621662147213581650246198542168120</td></tr><tr><td>Speech (En)</td><td>10002000300040005000600070008000900010000</td></tr><tr><td>ASR Output</td><td>But these devices they tested are also interesting for the street planners because they don&#x27;t do work with GPS and the limited information that are regularly uploaded by modem.</td></tr><tr><td colspan="2">Case 4</td></tr><tr><td>Target (De)</td><td>Diese Kartelle sind dumm, wenn sie unseren, sie künnten sich unter dem Radar hinweg durchgraben, sagte die Generalstaatsanwältn des US Distriks Southern California, Laura Duffy, bei einer Pressekconferenz vor einem Lagerhaus in San Diego, wo das eine Ende des Tunnels entdeckt worden war.(These cartels are stupid if they think that they can dig through under the radar, said the US Attorney for the District of Southern California, Laura Diffy, at a press conference held in front of a warehouse in San Diego, where the end of the tunnel was discovered.)</td></tr><tr><td>Unit</td><td>71 82 11 45 64 29 28 92 89 23 62 74 27 31 59 33 17 51 19 29 8 5 30 65 6 49 92 31 87 69 74 27 47 76 53 185 53 67 77 98 69 65 377785388428989697427898969742789873072529432641858724614679818384579653967547583448018653230165077531855318553448018653230165077531855318553448018653230165077531855318553448018653230165077531855318553448018652943264185872461467894361578794326418579653967547583448018653230165077531855318553448018653230165077531855318553448018653230165077531855539675475834480186532301650775318553185534480186532301650775318553185534480186532301650775318553185344801865323016507753185531855344801865323016507753185531855344801865323016507753185531855344801864840858791857316998273627431569982893324684484808519701476940307242315699827362743156998289332468448480851970147694030724231569982736274315699828933246844848085197014769982736274315699828933246844848085197014769403072423156998273627431569982893324684484808519701476910000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</td></tr><tr><td>Speech (En)</td><td>100020003000400050006000700080009000100001200013000</td></tr><tr><td>ASR Output</td><td>These cattles are stupid if you think you could dig through under the radar, the general proletariat of the USA district, said Southern California, Laura Duffy, at a warehouse conference in San Diego, where one end of the tunnel was discovered.</td></tr></table>
430
+
431
+ Table 7: Examples of synthetic $\mathrm{En}\rightarrow \mathrm{De}$ ST data.
432
+
433
+ BT4ST: French text $\rightarrow$ English speech
434
+
435
+ <table><tr><td colspan="2">Case 1</td><td></td></tr><tr><td>Target (Fr)</td><td>Ces automobilistes paieront bientôt à État des frais kilométriques au lieu des taxes sur essence.
436
+ (Those drivers will pay the mileage fees instead of gas taxes to the state.)</td><td></td></tr><tr><td>Unit</td><td>71 82 11 45 64 29 28 37 24 61 9 85 73 16 50 14 19 16 66 47 11 53 90 35 62 6 15 49 7 69 44 80 60 70 14 19 74 27 57 47 59 33 94 32 64 65 15 49 92 57 31 87 94 32 64 74 2 66 50 24 13 58 17 19 65 3 77 11 45 64 81 84 57 96 55 39 67 54 57 86 53 44 80 18 6 15 49 92 57 31 87 9 85 73 16 77 66 27 89 87 91 43 6 15 7 23 19 90 35 11 64 44 80 18 27 31 59 33 91 43 2 89 6 15 7 11 64 81 29 6 15 41 20</td><td></td></tr><tr><td>Speech (En)</td><td>0 1000 2000 3000 4000</td><td></td></tr><tr><td>ASR Output</td><td>These automobilists soon will pay state mile fee instead of gasoline taxes.</td><td></td></tr><tr><td colspan="2">Case 2</td><td></td></tr><tr><td>Target (Fr)</td><td>Un scandale sur la présence de vande de cheval dans des plats cuisinés a éclaté en Europe au début de année, à la suite de tests effectuels en Irlande.
437
+ (A scandal on the presence of horse meat in prepared meals had broken out in Europe at the beginning of the year, following tests carried out in Ireland.)</td><td></td></tr><tr><td>Unit</td><td>71 86 62 6 15 49 92 89 77 81 38 44 80 18 85 19 90 35 73 16 99 82 73 74 27 47 52 25 9 29 28 23 44 80 18 6 15 7 23 73 16 77 75 33 48 51 19 65 6 49 92 50 11 45 64 29 27 31 41 84 57 96 55 39 67 54 57 93 64 44 80 18 27 89 59 53 44 80 18 66 31 53 65 69 55 23 62 29 28 92 27 47 52 25 97 65 74 27 89 59 33 91 17 43 31 23 53 44 80 18 89 69 48 36 30 25 42 47 11 83 84 57 96 55 39 67 54 57 93 64 54 80 82 11 64 80 79 90 35 11 64 87 94 32 64 1 21 95 23 73 16 77 98 45 64 0 42 79 81 83 84 57 96 55 39 67 54 57 93 64 43 3 21 23 73 60 70 14 62 29 28 92 27 47 52 25 97 65 74 27 89 23 44 80 18 27 31 59 87 91 43 6 15 49 92 31 23 53 1 85 53 44 80 26 24 13 58 90 35 42 80 18 81 31 41 20</td><td></td></tr><tr><td>Speech (En)</td><td>0 1000 2000 3000 4000 5000 6000 7000 9000</td><td></td></tr><tr><td>ASR Output</td><td>A scandal of the presence of horse meat in kitchen dishes pro-cut in Europe in the early age of year after it was pro-contested in Ireland.</td><td></td></tr><tr><td colspan="2">Case 3</td><td></td></tr><tr><td>Target (Fr)</td><td>La seule autre compagnie imposant de tels frais est la compagnie hongroise Wizz Air, a déclaré le consultant auprès de comptagnes aériennes Jay Sorensen, qui suit de prês les frais en supplément.
438
+ (The only other airline with such a fee is Hungary Wizz Air, said airline consultant Jay Sorensen, who closely tracks add-on fees.)</td><td></td></tr><tr><td>Unit</td><td>71 82 11 45 64 37 51 90 35 11 64 37 68 99 82 5 30 65 3 52 25 11 45 64 29 28 92 27 89 59 33 68 16 74 2 47 23 44 80 85 11 64 65 6 15 7 87 68 9 74 21 23 44 80 81 30 75 33 68 44 80 18 66 89 98 87 0 30 25 11 32 53 44 80 60 70 14 76 53 62 29 28 60 70 14 76 53 62 29 28 75 33 68 44 80 18 66 89 98 87 0 30 25 11 32 53 44 80 60 70 14 76 53 62 29 28 75 33 68 44 80 18 66 89 98 87 0 30 25 11 32 53 44 80 60 70 14 76 53 62 29 31 23 53 44 80 18 66 89 98 87 0 30 25 11 32 53 44 80 60 70 14 76 53 62 29 31 23 53 44 80 18 66 89 98 87 0 31 23 53 44 80 18 66 89 98 87 0 30 25 11 32 53 44 80 60 70 14 76 53 62 29 31 23 53 44 80 18 66 89 87 0 30 25 11 32 53 44 80 60 70 14 76 53 62 29 31 23 53 44 80 18 66 89 87 0 30 25 11 32 53 44 80 61 15 7 87 9 66 82 73 74 27 89 59 23 44 80 18 65 14 79 24 51 19 74 2 31 23 53 88 18 27 31 59 23 69 16 74 27 31 59 23 69 16 74 27 31 59 23 69 16 74 27 31 59 23 69 16 74 27 31 59 23 69 16 74 27 31 59 23 69</td><td></td></tr><tr><td>Speech (En)</td><td>0 1000 2000 3000 4000 5000 6000 7000 8000 9000</td><td></td></tr><tr><td>ASR Output</td><td>The only other freeze companies such as fees is the Air Hungarian with Hungarian company said the consulting to Jay Sorensen Airlines following close to the cost.</td><td></td></tr><tr><td colspan="2">Case 4</td><td></td></tr><tr><td>Target (Fr)</td><td>Ces dernières accusations se basent entre autres sur deslettres rédigés par avocat des frères Sainte-Croix, Me Émile Perrin, dans les années 1990, mais aussi par les recherches faites dans les archives à ce suje par le frère Wilson Kennedy, un ancien frère de Sainte-Croix qui a dénoncé publiquement les services.
439
+ (The latter accusations are partly based on letters written by the lawyer of the brothers of the Holy Cross, Mr Emile Perrin QC, in the 1990s, as well as through research carried out in the archives on this subject by Brother Wilson Kennedy, a former brother of the Holy Cross who has publicly denounced the abuses.)</td><td></td></tr><tr><td>Unit</td><td>71 86 53 44 80 82 73 90 35 24 61 43 6 15 49 92 31 41 84 96 55 39 67 54 57 93 86 91 43 74 2 89 98 69 29 28 87 28 87 94 32 65 23 42 80 18 29 28 49 41 84 96 55 67 54 57 93 70 52 25 53 74 22 380
440
+ 18 66 47 24 13 58 90 35 48 76 58 32 02 28 28 49 11 84 96 55 67 54 57 93 86 73 16 99 82 73 75 33 97 30 11 64 74 27 78 52 41 64 69 49 92
441
+ 47 52 24 68 99 82 5 42 29 48 41 84 96 55 67 54 57 93 86 73 16 50 11 45 64 53 90 35 94 32 64 74 26 49 92 50 11 64 81 84 96 55 67 54 57 93 75 33 97 30 11 64 81 84 96 55 67 54 57 93 75 33 97 30 11 64 81 84 96 55 67 54 57 93 75 33 97 30 11 64 81 84 95 60 48 51 19 65 6
442
+ 49 78796981846755675475939960570252696056747874221952913884480535448053448053448053448053448053448053448053448053448053448053448053448053448053448053448053448053448053448
443
+ 2461389982370317703177031770317703177031770317703177031770317703177031770317703177031770317703177031770317703177031
444
+ 266475224689982530731677035976969574278752246436974229849187918791879187918791879187918791879187918791879187918791879187918791879187918791879187918791879187918
445
+ 479035353742899035116416631237344802687911744182699231484965556754579354793547935479354793547935479354793547935479354793547935479354793547935479354793547935479354793547935547935479354793547935479354793547935479354793547935479354793547935479354793547935479354793547935479
446
+ 2849140</td><td></td></tr><tr><td>Speech (En)</td><td>0 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</td><td></td></tr></table>
447
+
448
+ Table 8: Examples of synthetic $\mathrm{{En}} \rightarrow \mathrm{{Fr}}\mathrm{{ST}}$ data.
449
+
450
+ BT4ST: Spanish text $\rightarrow$ English speech
451
+
452
+ <table><tr><td colspan="2">Case 1</td></tr><tr><td>Target (Es)</td><td>En la mayoría de las familias, cada uno desayuna solo.
453
+ (In a majority of families, everyone has breakfast separately.)</td></tr><tr><td>Unit</td><td>71 86 53 44 80 18 50 24 97 65 6 49 92 3 77 87 94 38 17 16 50 90 35 11 64 29 28 49 41 84 57 96 55 67 54 57 40 57 93 86 45 64 74 21 95 60 70 14 68 44 80 18 66 47 52 25 91 43 74 2 3 77 23 62 6 49 92 31 23 73 19 90 35 24 68 97 81 20</td></tr><tr><td>Speech (En)</td><td>0
454
+ 1000
455
+ 2000</td></tr></table>
456
+
457
+ ASR Output | In most families, each one breakfast alone.
458
+
459
+ Case 2
460
+
461
+ <table><tr><td>Target (Es)</td><td>Os sentáis al volante en la costa oeste, en San Francisco, y vuestra misión esninger los primeros a Nueva York.
462
+ (You get in the car on the west coast, in San Francisco, and your task is to be the first one to reach New York.)</td></tr><tr><td>Unit</td><td>71 93 98 45 65 6 15 7 87 91 9 74 2 31 87 91 17 68 44 80 85 68 44 80 82 73 70 14 76 45 64 53 17 19 35 68 44 80 82 73 70 14 76 87 91 43 6 15 49 92 57 89 59 33 87 97 65 6 15 49 92 57 31 23 53 44 80 18 6 15 7 87 38 43 16 3 77 23 44 18 6 15 7 23 62 6 15 49 92 57 89 87 97 14 76 44 80 98 5 30 16 50 87 53 65 6 95 23 42 44 80 85 53 62 29 6 15 92 57 31 23 73 74 27 57 89 59 33 68 16 50 77 53 44 80 18 27 31 59 23 44 80 26 11 98 0 5 46 30 74 2 89 6 15 7 53 1 85 11 64 81 83 20</td></tr><tr><td>Speech (En)</td><td>0 1000 2000 3000 4000</td></tr></table>
463
+
464
+ ASR Output You sat down on the wheel on the west coast in San Francisco and your mission is to come into New York City.
465
+
466
+ Case 3
467
+
468
+ <table><tr><td>Target (Es)</td><td>En la redacción seguramente tendremos una discussing sobre este durante various días, sobre si durante la programación del juego ninguno pensó siquiera un poco o si los autores de verdad nos toman por una Panda de bobos.
469
+ (For several days, our editorial staff kept discussing whether when designing the game no one thought for a moment or whether its authors really think we are such morons.)</td></tr><tr><td>Unit</td><td>71 86 53 44 80 60 52 25 11 64 1 66 31 87 91 43 74 2 21 95 23 44 80 60 70 14 76 45 64 60 70 14 76 53 97 19 65 6 95 5 30 90 35 11 64 75 91 9 16 77 23 44 80 37 24 46 30 1 66 89 98 53 16 50 77 42 44 80 85 73 16 66 47 87 91 17 43 74 2 82 53 62 6 49 60 3 52 30 65 6 49 7 87 9 16 77 52 25 19 1 66 31 87 94 32 64 29 28 41 84 57 96 55 39 67 54 57 93 70 14 76 9 99 82 5 30 1 66 31 87 5 30 25 88 18 66 27 47 59 33 90 35 94 32 64 74 27 47 52 25 97 16 66 78 52 25 38 16 50 77 88 18 26 87 68 44 80 85 73 16 99 82 87 42 16 50 81 84 57 96 55 39 67 54 57 93 45 64 16 77 23 44 80 18 6 3 7 24 61 9 85 73 16 66 47 87 94 32 64 16 77 23 44 80 18 6 3 7 24 61 9 85 73 16 66 47 87 94 32 64 16 77 23 44 80 18 6 3 7 24 61 9 85 75 64 77 32 47 87 94 32 64 16 77 23 44 80 18 6 3 7 24 61 9 85 73 16 57 40 57 31 59 94 32 74 2 89 87 68 43 6 49 41 84 96 55 67 54 57 93 3 52 30 73 16 66 47 87 94 38 44 80 18 85 73 16 65 6 49 7 69 81 29 28 49 41 20</td></tr></table>
470
+
471
+ ASR Output In reduction, we will surely have an argument about this for several days, whether during play programming none of them even thought of it, or whether the actual authors take us for a band of zoos.
472
+
473
+ ![](images/11f60ba8d8bb07aebd35a492fab49167e27180d8ea3e4f813d4f068dddfcd991.jpg)
474
+
475
+ Case 4
476
+
477
+ <table><tr><td>Target (Es)</td><td>El avión especial, en el que tutueron que viajar a Podgorica, entrethers vicepresidentes Dalibor Kucera y Rajchl, no ha salido estañana por problemas tíncicos en Praga, teniendo que bucarse una alternatively para transporte a parte del comité executivo al lugar donde tendrá lugar el partido de clasificacion.
478
+ (An extra flight that was to take, among others, the Vice Presidentas Dalibor Kucera and Rajchl to Podgorica did not leave Prague in the morning due to a technical failure. An alternative was sought for in order to transport part of the executive board to the scene of the barraged rematch.)</td></tr><tr><td>Unit</td><td>71 82 62 6 49 92 47 87 9 43 6 95 23 19 37 86 0 30 74 2 47 59 33 90 35 94 32 64 44 80 60 70 14 46 30 99 82 87 94 32 75 91 9 1 66 31 23 62 74 27 21 59 52 25 91 17 16 77 19 74 27 31 23 73 74 27 47 33 24 61 43 1 66 78 48 46 30 25 42 43 74 2 89 41 83 84 57 96 55 79 82 73 16 66 77 24 13 58 32 65 6 49 92 47 52 25 99 28 23 1 85 53 42 44 80 18 2 6 15 49 41 84 96 55 67 54 93 66 31 87 91 17 19 90 35 73 16 66 47 48 46 30 74 2 27 78 33 69 65 74 27 89 59 98 0 30 25 37 86 38 44 80 18 70 52 25 91 43 74 2 21 95 60 48 19 81 83 84 57 96 55 39 67 54 57 93 75 91 9 29 28 92 26 24 61 43 74 2 89 59 33 68 16 50 87 91 17 43 74 2 82 62 64 92 92 50 48 46 30 80 85 42 88 81 83 84 57 96 55 67 54 57 93 32 30 16 74 27 47 52 24 61 43 1 66 2 27 31 59 87 9 43 74 2 26 73 74 27 28 89 78 19 74 27 47 52 24 61 16 66 47 90 35 42 16 75 53 18 85 53 18 85 53 18 85 53 18 85 53 18 85 53 18 85 53 18 85 53 18 85 53 18 85 53 18 85 53 18 85 53 18 86 0 30 99 82 73 70 52 25 94 32 64 85 88 18 27 47 33 24 46 30 185 11 64 60 70 14</td></tr></table>
479
+
480
+ The special airplane where they had to travel to Pagoric. Among others, the vice-presidents Dalibor, Kukir, and Rachel has not come out this morning for broad technical problems, having to look for an alternative to transport part of the committee executive to the place where the rating party was going to be held.
481
+
482
+ ![](images/e6f1c028455fc3addf965847c6d71787c896718d980eaea42f81ce05e0d293c5.jpg)
483
+
484
+ Table 9: Examples of synthetic $\mathrm{{En}} \rightarrow \mathrm{{Es}}\mathrm{{ST}}$ data.
485
+
486
+ <table><tr><td colspan="2">Diverse BT4ST: One German text→Multiple English speeches</td></tr><tr><td>Target (De)</td><td>Wegen der aufwendigen Ausstattung des Tunnels gehen die Ermittler davon aus, dass er von Architekten und Ingenieuren konstruirt wurde und dass der Bau rund ein Jahr in Anspruch nahm.(Due to the elaborate configuration of the tunnel, investigators are working on the assumption that it was build by architects and engineers and that the construction took around one year.)</td></tr><tr><td colspan="2">Output 1</td></tr><tr><td>Unit</td><td>71 47 11 45 64 74 27 89 78 33 24 61 68 9 29 28 23 73 16 99 82 11 64 53 73 74 27 78 14 76 53 16 74 2 50 42 44 80 85 73 16 99 82 73 62 74 27 31 59 33 68 44 80 85 19 81 83 84 57 96 39 67 54 57 93 82 11 45 64 53 44 80 18 66 77 87 9 43 6 49 92 31 23 73 1 66 89 94 32 64 85 5 30 29 28 23 73 16 50 87 91 1 21 95 23 42 44 80 18 82 87 9 85 53 60 70 14 76 62 29 28 92 57 89 23 44 80 18 64 99 21 52 24 61 43 2 31 23 53 1 66 47 24 13 58 37 24 46 30 74 2 89 23 62 74 27 31 59 87 91 9 43 74 2 6 49 7 23 44 80 85 87 38 44 80 18 21 95 23 44 80 26 11 45 64 0 79 29 28 49 41 84 57 96 55 39 67 54 57 86 38 44 80 82 87 9 74 2 82 73 74 27 89 23 44 80 18 6 49 92 52 24 68 43 74 2 95 23 44 80 85 73 16 77 53 20 52 25 91 17 44 18 85 11 98 45 64 0 79 81 83 20</td></tr><tr><td>Speech (En)</td><td>0 1000 2000 3000 4000 5000 6000 7000</td></tr><tr><td>ASR Output</td><td>Because of the equipment of the tunnel. The investigators imagined that it was constructed by architects and engineers, and that the construction of around a year.</td></tr><tr><td colspan="2">Output 2</td></tr><tr><td>Unit</td><td>71 47 45 74 27 89 59 33 68 9 29 28 23 73 16 99 66 82 73 74 27 47 59 33 91 43 6 15 7 23 62 1 21 95 92 27 31 59 33 68 44 80 85 19 90 35 73 74 27 78 14 76 53 9 74 27 31 59 33 68 44 80 85 19 90 35 73 74 27 78 14 76 53 9 74 27 31 59 33 68 44 80 85 19 90 35 73 74 72 27 78 14 76 53 9 74 27 31 59 33 68 44 80 85 19 90 35 73 74 72 27 78 14 76 53 9 74 27 31 59 33 68 43 6 15 7 23 62 1 21 95 92 27 31 59 33 68 44 80 85 19 90 35 73 74 27 78 14 76 53 9 74 27 31 59 33 56 73 74 27 78 14 76 53 9 74 27 31 59 33 68 43 6 15 7 23 62 1 21 95 92 27 31 59 33 68 43 6 15 7 23 62 1 21 95 92 27 31 59 33 68 43 6 15 7 23 62 1 21 95 92 27 31 59 33 68
487
+ 3264543423136689421324614342313664724313664724313664724313664724313664724313664724313664724313664724313664724313664724313664724313664724</td></tr><tr><td>Speech (En)</td><td>0 1000 2000 3000 4000 5000 6000 7000</td></tr><tr><td>ASR Output</td><td>Because of the passage tunnel equipment, the investigators raised that it was constructed by architects and engineers, and that the construction was one year.</td></tr><tr><td colspan="2">Output 3</td></tr><tr><td>Unit</td><td>71 47 11 45 64 74 27 89 59 33 68 9 29 28 23 73 16 99 82 11 64 53 73 74 27 78 14 76 53 9 74 2504244182312373169982736274273159336844808519818348456495564955649556495564955649556495564955649556495564955649556495564955649556495564955649556495564955649</td></tr><tr><td>Speech (En)</td><td>0 1000 2000 3000 4000 5000 6000 7000</td></tr><tr><td>ASR Output</td><td>Because of the equipment of the tunnel. The investigator assumes that it was constructed by architects and engineers and that the round eventually taken a year.</td></tr><tr><td colspan="2">Output 4</td></tr><tr><td>Unit</td><td>71 82 11 45 64 53 44 80 18 66 77 87 9 43 6 49 92 31 23 73 74 27 89 59 94 32 64 65 6 9523448085731699827362742731593368808519818348456495564955649556495564955649556495564955649556495564955649556495564955649556495564955</td></tr><tr><td>Speech (En)</td><td>0 1000 2000 3000 4000 5000 6000 7000 8000</td></tr><tr><td>ASR Output</td><td>The investigation of the tunnel is the investigation has been designed by architects and engineers and that the construction of the construction of a year.</td></tr></table>
488
+
489
+ Table 10: Examples of synthetic $\mathrm{En}\rightarrow \mathrm{De}$ ST data generated by Diverse BT4ST method.
490
+
491
+ A For every submission:
492
+
493
+ A1. Did you describe the limitations of your work? Limitations
494
+ A2. Did you discuss any potential risks of your work? Ethics Statement
495
+ A3. Do the abstract and introduction summarize the paper's main claims? Abstract, Section 1
496
+ A4. Have you used AI writing assistants when working on this paper? Left blank.
497
+
498
+ B Did you use or create scientific artifacts?
499
+
500
+ Section 4
501
+
502
+ B1. Did you cite the creators of artifacts you used? Section 4
503
+ B2. Did you discuss the license or terms for use and / or distribution of any artifacts? The data and pre-trained model we used are only for research purposes without violating the license.
504
+ B3. Did you discuss if your use of existing artifact(s) was consistent with their intended use, provided that it was specified? For the artifacts you create, do you specify intended use and whether that is compatible with the original access conditions (in particular, derivatives of data accessed for research purposes should not be used outside of research contexts)? Ethics Statement
505
+ B4. Did you discuss the steps taken to check whether the data that was collected / used contains any information that names or uniquely identifies individual people or offensive content, and the steps taken to protect / anonymize it? We use MuST-C and WMT datasets without modification, which are all widely used public datasets. We don't think this needs much discussion.
506
+ B5. Did you provide documentation of the artifacts, e.g., coverage of domains, languages, and linguistic phenomena, demographic groups represented, etc.? Section 4
507
+ B6. Did you report relevant statistics like the number of examples, details of train / test / dev splits, etc. for the data that you used / created? Even for commonly-used benchmark datasets, include the number of examples in train / validation / test splits, as these provide necessary context for a reader to understand experimental results. For example, small differences in accuracy on large test sets may be significant, while on small test sets they may not be. Section 4
508
+
509
+ C Did you run computational experiments?
510
+
511
+ Section 5
512
+
513
+ C1. Did you report the number of parameters in the models used, the total computational budget (e.g., GPU hours), and computing infrastructure used? Section4, Section 5
514
+
515
+ C2. Did you discuss the experimental setup, including hyperparameter search and best-found hyperparameter values? Section 4, Section 5
516
+ C3. Did you report descriptive statistics about your results (e.g., error bars around results, summary statistics from sets of experiments), and is it transparent whether you are reporting the max, mean, etc. or just a single run? Section 5
517
+ C4. If you used existing packages (e.g., for preprocessing, for normalization, or for evaluation), did you report the implementation, model, and parameter settings used (e.g., NLTK, Spacy, ROUGE, etc.)? Section 4
518
+
519
+ D Did you use human annotators (e.g., crowdworkers) or research with human participants? Left blank.
520
+
521
+ D1. Did you report the full text of instructions given to participants, including e.g., screenshots, disclaimers of any risks to participants or annotators, etc.? No response.
522
+ D2. Did you report information about how you recruited (e.g., crowdsourcing platform, students) and paid participants, and discuss if such payment is adequate given the participants' demographic (e.g., country of residence)? No response.
523
+ D3. Did you discuss whether and how consent was obtained from people whose data you're using/curating? For example, if you collected data via crowdsourcing, did your instructions to crowdworkers explain how the data would be used? No response.
524
+ D4. Was the data collection protocol approved (or determined exempt) by an ethics review board? No response.
525
+ D5. Did you report the basic demographic and geographic characteristics of the annotator population that is the source of the data? No response.
backtranslationforspeechtotexttranslationwithouttranscripts/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d8fa17577e16a1effc280d0e0cc7f52039278a8e68009f46460754f010aa3c5
3
+ size 2054882
backtranslationforspeechtotexttranslationwithouttranscripts/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c71414e80b9a7073d490b2f7d540191e2e603419c6aaf6eef5a7d7ef6bb782ca
3
+ size 666568
beingrightforwhoserightreasons/3147c74d-3973-4eda-aa53-13baf1d72381_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:13bb210f18cae9fbaa16c346814635a10d4f2f39ecec68c87719c4f7d882a1da
3
+ size 133401
beingrightforwhoserightreasons/3147c74d-3973-4eda-aa53-13baf1d72381_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbae1d24482c36a8e7be0ee28e6c59b626f53b6197f14994e65e9ce3e95318f9
3
+ size 163433
beingrightforwhoserightreasons/3147c74d-3973-4eda-aa53-13baf1d72381_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1aac0d612696b30730508fd7aa69ca722e5d2d2cf70f9f091a8dea754952e509
3
+ size 1240133
beingrightforwhoserightreasons/full.md ADDED
@@ -0,0 +1,606 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Being Right for Whose Right Reasons?
2
+
3
+ Terne Sasha Thorn Jakobsen\*123, Laura Cabello\*3, Anders Søgaard
4
+
5
+ $^{1}$ Copenhagen Center for Social Data Science
6
+
7
+ $^{2}$ Copenhagen Research Center for Mental Health
8
+
9
+ <sup>3</sup>University of Copenhagen
10
+
11
+ terne.thorn@sodas.ku.dk, lcp@di.ku.dk, soegaard@di.ku.dk
12
+
13
+ # Abstract
14
+
15
+ Explainability methods are used to benchmark the extent to which model predictions align with human rationales i.e., are 'right for the right reasons'. Previous work has failed to acknowledge, however, that what counts as a rationale is sometimes subjective. This paper presents what we think is a first of its kind, a collection of human rationale annotations augmented with the annotators demographic information. We cover three datasets spanning sentiment analysis and common-sense reasoning, and six demographic groups (balanced across age and ethnicity). Such data enables us to ask both what demographics our predictions align with and whose reasoning patterns our models' rationales align with. We find systematic inter-group annotator disagreement and show how 16 Transformer-based models align better with rationales provided by certain demographic groups: We find that models are biased towards aligning best with older and/or white annotators. We zoom in on the effects of model size and model distillation, finding - contrary to our expectations - negative correlations between model size and rationale agreement as well as no evidence that either model size or model distillation improves fairness.
16
+
17
+ # 1 Introduction
18
+
19
+ Transparency of NLP models is essential for enhancing protection of user rights and improving model performance. A common avenue for providing such insight into the workings of otherwise opaque models comes from explainability methods (Páez, 2019; Zednik and Boelsen, 2022; Baum et al., 2022; Beisbart and Räz, 2022; Hacker and Passoth, 2022). Explanations for model decisions, also called rationales, are extracted to detect when models rely on spurious correlations, i.e., are right for the wrong reasons (McCoy et al., 2019), or to analyze if they exhibit human-like inferential
20
+
21
+ ![](images/d98915b4df86e074a3476ab6439150047b3aa8153c9bd04baff9645318452c9b.jpg)
22
+ Figure 1: Experimental setup for a sentiment analysis task. For a given instance, annotators are asked to choose a label and mark supporting evidence for their choice. For instances with full label agreement, we compare alignment of rationales (group-group alignment). We do the same to measure group-model alignment through attention- and gradient-based explainability methods.
23
+
24
+ semantics (Piantadosi and Hill, 2022; Ray Choudhury et al., 2022). Furthermore, model rationales are used to evaluate how well models' behaviors align with humans, by comparing them to human-annotated rationales, constructed by having annotators mark evidence in support of an instance's label (DeYoung et al., 2019). Human rationales are, in turn, used in training to improve models by guiding them towards what features they should (or should not) rely on (Mathew et al., 2021; Rajani et al., 2019).
25
+
26
+ While genuine disagreement in labels is by now a well-studied phenomenon (Beigman Klebanov and Beigman, 2009; Plank et al., 2014; Plank, 2022), little attention has been paid to disagreement in rationales. Since there is evidence that human rationales in ordinary decision-making differ across demographics (Stanovich and West, 2000), we cannot, it seems, blindly assume that what counts as a rationale for one group of people, e.g., young men, also counts as a rationale for another group of people, e.g., elderly women. This dimension has not been explored in fairness research either. Could it be that some models that exhibit perfor
27
+
28
+ mance parity, condition on factors that align with the rationales of some groups, but not others?
29
+
30
+ Contributions We present a collection of three existing datasets with demographics-augmented annotations to enable profiling of models, i.e., quantifying their alignment<sup>1</sup> with rationales provided by different socio-demographic groups. Such profiling enables us to ask whose right reasons models are being right for. Our annotations span two NLP tasks, namely sentiment classification and common-sense reasoning, across three datasets and six demographic groups, defined by age {Young, Old} and ethnicity {Black/African American, White/Caucasian, Latino/Hispanic}. We investigate label and rationale agreement across groups and evaluate to what extent groups' rationales align with 16 Transformer-based models' rationales, which are computed through attention- and gradient-based methods. We observe that models generally align best with older and/or white annotators. While larger models have slightly better prediction performance, model size does not correlate positively with neither rationale alignment nor fairness. Our work constitutes multi-dimensional research in off-the-beaten-track regions of the NLP research manifold (Ruder et al., 2022). We make the annotations publicly available.<sup>2</sup>
31
+
32
+ # 2 Fairness and Rationales
33
+
34
+ Fairness generally concerns the distribution of resources, often across society as a whole. In NLP, the main resource is system performance. Others include computational resources, processing speed and user friendliness, but performance is king. AI fairness is an attempt to regulate the distribution of performance across subgroups, where these are defined by the product of legally protected attributes (Williamson and Menon, 2019).
35
+
36
+ NLP researchers have uniformly adopted American philosopher John Rawls' definition of fairness (Larson, 2017; Vig et al., 2020; Ethayarajh and Jurafsky, 2020; Li et al., 2021; Chalkidis et al., 2022), defining fairness as performance parity, except where it worsens the conditions of the least advantaged. Several dozen metrics have been proposed, based on Rawls' definition (Castelnovo et al., 2022), some of which are argued to be in
37
+
38
+ consistent or based on mutually exclusive normative values (Friedler et al., 2021; Castelnovo et al., 2022). Verma and Rubin (2018) grouped these metrics into metrics based only on predicted outcome, e.g., statistical parity, and metrics based on both predicted and actual outcome, e.g., performance parity and accuracy equality. Corbett-Davies and Goel (2018) argue that metrics such as predictive parity and accuracy equality do not track fairness in case of infra-marginality, i.e., when the error distributions of two subgroups are different. For a better understanding of the consequences of infra-marginality we refer to Biswas et al. (2019) and Sharma et al. (2020). Generally, there is some consensus that fairness in NLP is often best evaluated in terms of performance parity using standard performance metrics (Williamson and Menon, 2019; Koh et al., 2020; Chalkidis et al., 2022; Ruder et al., 2022). We do the same and evaluate fairness in group-model rationale agreement quantifying performance differences (understanding performance as degree of rationale agreement) across end user demographics. In doing so, we are embodying group fairness values: that individuals should be treated equally regardless of their protected attributes, i.e., group belonging.
39
+
40
+ Fairness and explainability are often intertwined in the literature due to the assumption that transparency, through explainability methods, makes it possible to identify which models are right for the right reasons or, on the contrary, right by relying on spurious, potentially harmful, patterns (Langer et al., 2021; Balkir et al., 2022). This study tightens the connection between fairness and explainability, investigating whether model rationales align better with those of some groups rather than others. If so, this would indicate that models can be more robust for some groups rather than others, even in the face of performance parity on dedicated evaluation data. That is: We ask whether models are equally right for the right reasons (with the promise of generalization) across demographic groups.
41
+
42
+ # 3 Data
43
+
44
+ We augment a subset of data from three publicly available datasets spanning two tasks: DynaSent (Potts et al., 2020) and SST (Socher et al., 2013) $^3$ , for sentiment classification and CoS-E (Talmor et al., 2019; Rajani et al., 2019) for common-sense
45
+
46
+ ![](images/e6891ef570ba4c0faaf88a311cb8621f2fd939ef43b7bfcf0d90d698c0e1d884.jpg)
47
+ Figure 2: Overview of the annotation collection process from annotator recruitment criteria, to the annotation itself, and finally annotator exclusion criteria. Separately for each dataset, annotators are recruited via Prolific using specific filters for age, ethnicity and participation status. Recruits are directed to a Qualtrics survey containing, in consecutive order, a consent form, a short demographics survey, instructions for the annotation task and then approx. 10 randomly selected instances of which annotators provide both labels and rationales for. After annotation, some annotators' responses are excluded from our analysis due to certain mismatches in responses. The annotation process is detailed further in section 3.1 and we show the instructions and task examples in appendix A.
48
+
49
+ ![](images/f420b4167e74df19ec5b5a5dd56bcac5ae1d625ba7d2441d7dea6eb0cbf22fae.jpg)
50
+
51
+ reasoning. $^{4}$ For each dataset, we crowd-source annotations for a subset of the data. We instruct annotators to select a label and provide their rationale for their choice by highlighting supporting words in the given sentence or question. Table 1 shows statistics of the annotations collected. Annotation guidelines are explained in § 3.1 (and included in full in Appendix A) and recruitment procedures are explained in § 3.2.
52
+
53
+ <table><tr><td></td><td colspan="2">Annotators</td><td>Annotations</td></tr><tr><td></td><td>×Group</td><td>Total</td><td>Total</td></tr><tr><td>DYNASENT</td><td>48</td><td>288</td><td>2,880</td></tr><tr><td>SST-2</td><td>26</td><td>156</td><td>1,578</td></tr><tr><td>Cos-E</td><td>50</td><td>300</td><td>3,000</td></tr><tr><td>TOTAL</td><td>124</td><td>744</td><td>7,458</td></tr><tr><td>BEFORE EXCL.*</td><td>-</td><td>929</td><td>9,310</td></tr></table>
54
+
55
+ Table 1: Summary of the annotated data, showing, for each dataset, the amount of annotators within the six demographic groups, the total amount of annotators and the amount of annotations after workers have annotated approx. 10 instances each. Reported numbers are after exclusions as described in § 3.2. *We publicly share all annotated data which includes annotators that were excluded from our analyses.
56
+
57
+ # 3.1 Annotation Process
58
+
59
+ We summarize the process of collecting annotations in Figure 2, where we depict a three-step process: recruitment, annotation and exclusion. In this section, we start by describing the second step - annotation - and explain what is annotated and how it is annotated. We describe our recruitment and exclusion criteria in the following section, 3.2.
60
+
61
+ Annotators are directed to a Qualtrics<sup>5</sup> survey
62
+
63
+ and presented with $i)$ a consent form, $ii)$ a short survey on demographics, $iii)$ instructions for their annotation task and lastly, $iv)$ a randomly selected set of $n \approx 10$ instances to annotate, out of a subset of size $N$ . As a result of this procedure, each group, for each dataset, is represented by approximately $N / n$ annotators. Data points are annotated for both classification labels and extractive rationales, i.e., input words that motivate the classification.
64
+
65
+ Existing rationale datasets are typically constructed by giving annotators 'gold standard' labels, and having them provide rationales for these labels. Instead, we let annotators provide rationales for labels they choose themselves. This lets them engage in the decision process, but it also acknowledges that annotators with different backgrounds may disagree on classification decisions. Explaining other people's choices is error-prone (Barasz and Kim, 2022), and we do not want to bias the rationale annotations by providing labels that align better with the intuitions of some demographics than with those of others. For the sentiment analysis datasets, we discard neutral instances because rationale annotation for neutral instances is ill-defined. Yet, we still allow annotators to evaluate a sentence as neutral, since we do not want to force our annotators to provide rationales for positive and negative sentiment that they do not see.
66
+
67
+ DynaSent We re-associate $N = 480$ instances six times (for six demographic groups), comprising 240 instances labeled as positive, and 240 instances labeled as negative in the DynaSent Round 2 test set (see Potts et al. (2020)). This amounts to 2,880 annotations, in total. Our sentiment label annotation follows the instructions of Potts et al. (2020). To annotate rationales, we formulate the task as marking "supporting evidence" for the label, following how the task is defined by DeYoung et al.
68
+
69
+ (2019). Specifically, we ask annotators to mark all the words, in the sentence, they think shows evidence for their chosen label.
70
+
71
+ SST-2 We re-announce $N = 263$ instances six times (for six demographic groups), which are all the positive and negative instances from the Zucodataset of Hollenstein et al. (2018)<sup>6</sup>, comprising a mixture of train, validation and test set instances from SST-2, which we remove from the original data before training the models. Instructions for sentiment annotations build on the instructions by Potts et al., combined with a few examples from Zaidan et al. (2007). The instructions for annotating rationales are the same as for DynaSent.
72
+
73
+ CoS-E We re-associate $N = 500$ instances from the test set six times (for six demographic groups) and ask annotators to firstly select the answer to the question that they find most correct and sensible, and then mark words that justifies that answer. Following Chiang and Lee (2022), we specify the rationale task with a wording that should guide annotators to make short, precise rationale annotations:
74
+
75
+ 'For each word in the question, if you think that removing it will decrease your confidence toward your chosen label, please mark it.'
76
+
77
+ # 3.2 Annotator Population
78
+
79
+ We recruited annotators via Prolific based on two main criteria, age and ethnicity, previously identified as related to unfair performance differences of NLP systems (Hovy and Søgaard, 2015; Jørgensen et al., 2016; Sap et al., 2019; Zhang et al., 2021).
80
+
81
+ Recruitment In our study, there is a trade-off between collecting annotations for a diverse set of data instances (number of tasks and sentences) and for a diverse set of annotators (balanced by demographic attributes), while keeping the study affordable and payment fair. Hence, when we want to study differences between individuals with different ethnic backgrounds, we can only study a subset of possible ethnic identities (of which there are many categories and diverging definitions). We balanced the number of annotators
82
+
83
+ across three ethnic groups — Black/African American (B), Latino/Hispanic (L) and White/Caucasian (W) — and two age groups — below 36 (young, Y) and above 37 (old, O), excluding both — whose cross-product results in six sub-groups: {BO, BY, LO, LY, WO, WY}. We leave a two-year gap between the age groups in order to not compare individuals with very similar ages. Furthermore, the age thresholds are inspired by related studies of age differences in NLP-tasks and common practices in distinguishing groups with an age gap (Johannsen et al., 2015; Hovy and Søgaard, 2015) and around the middle ages (Zhang et al., 2021). Our threshold also serves to guarantee sufficient proportions of available crowdworkers in each group. Our ethnicity definition follows that of Prolific, which features in a question workers have previously responded to and hence are recruited by, defining ethnicity as:
84
+
85
+ [a] feeling of belonging and attachment to a distinct group of a larger population that shares their ancestry, colour, language or religion'
86
+
87
+ While we do not require all annotators to be fluent in English, we instead ask about their English-speaking abilities in the demographics survey and find that $75\%$ of the participants speak English "very well" and only $1\%$ "not well", and the remaining "well".
88
+
89
+ Exclusions Annotators who participated in annotating one task were excluded from participating in others. After annotation, we manually check whether a participant's answers to our short demographics survey correspond to their recruitment criteria. We found many discrepancies between recruitment ethnicity and reported ethnicity, especially for Latino/Hispanic individuals, who often report to identify as White/Caucasian. This highlights the difficulty of studying ethnicities as distinct, separate groups, as it is common to identify with more than one ethnicity<sup>7</sup>. Hence, the mismatches are not necessarily errors. For our experiments, we decided to exclude participants with such mismatches and recruit new participants to replace their responses (see Appendix B for further details). A smaller amount of participants were excluded due to mismatch in reported age or due
90
+
91
+ to failing a simple attention check. We release annotations both with and without the instances excluded from our analyses. The final data after preprocessing consist of one annotation per instance for each of the six groups, i.e., six annotations per instance in total. Annotators annotated (approximately) 10 instances each. All participants were paid equally.
92
+
93
+ # 4 Experiments
94
+
95
+ We first conduct an analysis of group-group label agreement (i.e., comparing human annotator groups with each other, measuring human agreement on the sentiment and answer labels) and rationale agreement (measuring human agreement on rationale annotations) to characterize inter-group differences. We then move to group-model agreement (comparing the labels and rationales of our annotator groups to model predictions and model rationales) and ask: Do models' explanations align better with certain demographic groups compared to others? In our analysis, we further focus on how rationale agreement and fairness behave depending on model size and model distillation.
96
+
97
+ We probe 16 Transformer-based models<sup>8</sup>. To ease readability, we will use abbreviations following their original naming when depicting models' performance<sup>9</sup>.
98
+
99
+ We fine-tune the models individually on each dataset (see Figure 3). SST-2 and CoS-E simplified $^{10}$ are modeled as binary classification tasks; DynaSent is modeled as a ternary (positive/negative/neutral) sentiment analysis task. We exclude all annotated instances from the training splits; for CoS-E, we downsample the negative examples to balance both classes in the training split. After fine-tuning for 3 epochs, we select the checkpoint with the highest validation accuracy to run on our test (annotated) splits and apply two explainability methods to obtain input-based explanations, i.e., rationales, for the predictions made.
100
+
101
+ We measure label agreement with appropriate variants of $\mathrm{F_1}$ (SST-2 binary- $\mathrm{F_1}$ ; DynaSent macro- $\mathrm{F_1}$ ; CoS-E mean of binary- $\mathrm{F_1}$ towards the negative and the positive class). CoS-E simplified represents a slightly different task (see footnote 10) from what the annotators were presented to solve (a multiclass question-answering task). To correctly measure label agreement, we evaluate whether a model predicts 'True' for the question-answer pair with the answer selected by the annotator. Therefore, to avoid misleading $\mathrm{F_1}$ scores if, for example, a model predominantly predict True, we report the mean of the $\mathrm{F_1}$ towards each class. We explain below how we measure rationale agreement.
102
+
103
+ Explainability methods We analyze models' predictions through two families of post-hoc, attribution-based[11] explainability methods: Attention Rollout (AR) (Abnar and Zuidema, 2020) and Layer-wise Relevance Propagation (LRP) (Bach et al., 2015), a gradient-based method. Ali et al. (2022) compare these methods, showing how their predicted rationales are frequently uncorrelated. Both AR and LRP thus provide token level rationales for a given input, but while AR approximates the relative importance of input tokens by accumulating attention, LRP does so by backpropagating 'relevance' from the output layer to the input, leading to sparser attribution scores. We rely on the rules proposed in Ali et al. (2022), an extension of the original LRP method (Bach et al., 2015; Arras et al., 2017) for Transformers, aiming to uphold the conservation property of LRP in Transformers as well. This extension relies on an "implementation trick", whereby the magnitude of any output remains intact during backpropagation of the gradients of the model.
104
+
105
+ Comparing rationales Attention-based and gradient-based methods do not provide categorical relevance of the input tokens, but a vector $S_{i}$ with continuous values for each input sentence $i$ . We translate $S_{i}$ into a binary vector $S_{i}^{b}$ following the procedure from Wang et al. (2022) for each group. We define the top- $k^{gd}$ tokens as rationales, where $k^{gd}$ is the product of the current sentence length (tokens) and the average rationale length ratio (RLR) of a group $g$ within a dataset $d$ . On average, RLR for SST-2 are shorter (29.6%) com
106
+
107
+ pared to DynaSent (31.9%) and CoS-E (33.0%) (see Appendix B for specific values). Models' outputs are also preprocessed to normalize different tokenizations and to match the input format given to annotators.
108
+
109
+ After aligning explanations from models and annotators in the same space, we can compare them. We employ two metrics specifically designed to evaluate discrete rationales: token-level $\mathrm{F}_1$ (token- $\mathrm{F}_1$ ) (Equation 1) (DeYoung et al., 2019; Wang et al., 2022), and Intersection-Over-Union $\mathrm{F}_1$ (IOU- $\mathrm{F}_1$ ) (Equation 3) as presented in (DeYoung et al., 2019). These metrics are flexible enough to overcome the strictness of exact matching.[12]
110
+
111
+ # 5 Results and Discussion
112
+
113
+ Figure 3 shows group-model label agreement over our annotated data.13 Error bars show the variability between best and worst performing groups. CoS-E exhibits the lowest variability, indicating less variability in label agreement between groups.
114
+
115
+ When annotators disagree on the label of an instance, it is to be expected that their rationales will subsequently be different. Therefore, to compare group-group (§ 5.1) and group-model (§ 5.2) rationales more fairly, we focus on the subset of instances where all groups are in agreement about
116
+
117
+ 12Formally,
118
+
119
+ $$
120
+ \operatorname {t o k e n} - F _ {1} = \frac {1}{N} \sum_ {i = 1} ^ {N} 2 \times \frac {P _ {i} \times R _ {i}}{P _ {i} + R _ {i}} \tag {1}
121
+ $$
122
+
123
+ where $P_{i}$ and $R_{i}$ are the precision and recall for the $i^{th}$ instance, computed by considering the overlapped tokens between models' and annotators' rationales. To measure Intersection-Over-Union, we define the categorical vector given by the annotators for each sample as $A_{i}$ . Thereby,
124
+
125
+ $$
126
+ \mathrm {I O U} _ {i} = \frac {\left| S _ {i} ^ {b} \cap A _ {i} \right|}{\left| S _ {i} ^ {b} \cup A _ {i} \right|} \tag {2}
127
+ $$
128
+
129
+ and
130
+
131
+ $$
132
+ \mathrm {I O U} - F _ {1} = \frac {1}{N} \sum_ {i = 1} ^ {N} \left\{ \begin{array}{l l} 1 & \text {i f I O U} _ {i} \geq 0. 5 \\ 0 & \text {o t h e r w i s e .} \end{array} \right. \tag {3}
133
+ $$
134
+
135
+ These metrics account for plausibility (DeYoung et al., 2019) of the models' rationales, i.e., the degree to which they are agreeable to humans, as well as the extent to which models are 'right for the right reasons' (McCoy et al., 2019). Since we are interested in comparing rationale alignment between groups and between groups and models, measuring plausibility is our go-to. Other research (Jacovi and Goldberg, 2020; Setzu et al., 2021) focus on properties like faithfulness, which reflect a model's true decision process, i.e., whether the provided rationale influenced the corresponding decision, generally measured through perturbation experiments.
136
+
137
+ <sup>13</sup>See Figure 12 in Appendix C for a detailed representation of group-model label agreement.
138
+
139
+ ![](images/05b77e39801164d22cb17d490fdb5effc4df66c1340f5890b645f5ef6cf77c17.jpg)
140
+ Figure 3: Group-model label agreement over our annotated data, measured by F1-score. Error bars show variance between the best and worst performing groups. Models are ordered by size from smallest to largest from left to right.
141
+
142
+ the label, i.e., instances with full label agreement. This amounts to 209, 152 and 161 instances for DynaSent, SST-2 and CoS-E, respectively.
143
+
144
+ # 5.1 Analysis of Group-Group Agreement
145
+
146
+ We first want to quantify how different the rationales of one group are to those of others, and more generally to a random population. We compare each groups' set of rationales to a random paired set of rationales, where the rationale of each instance is randomly picked from one of the five other groups. Figure 4 shows the overall agreement score, average token- $\mathrm{F}_1$ across datasets, and its standard deviation from 20 random seeds, i.e., 20 random combinations of paired rationales. We observe that rationales of White annotators (WO, WY) are on average more similar to others while the average difference with the rationales of minority groups like, for example, Black Young (BY), is greater.
147
+
148
+ We then compute the level of rationale agreement (token- $\mathrm{F}_{1}$ ) between all groups (heatmaps on Figure 4) and observe that, in general, differences in group-group rationale agreement are consistent across datasets (tasks): Black Youngs (BY) have lower alignment with others, especially in sentiment analysis tasks. While the definition of rationales for DynaSent seems to be easier (higher values of agreement), it seems to be harder (lower values of agreement) for CoS-E, even when the label is agreed upon. We hypothesize this is due to the complexity of the CoS-E task itself, which also leads to more lengthy rationales, as reflected by the average RLR reported on § 4, probably in
149
+
150
+ ![](images/c22e54d22c7ca14a9a0abe9220677c6937008001bcbf15ecc373cce7c90a6229.jpg)
151
+ Figure 4: Group-group rationale agreement for instances with full label agreement. Agreement is measured by token-level binary $\mathrm{F}_1$ . On the left side, average and std (error bar) token- $\mathrm{F}_1$ for 20 random combinations of paired group rationales over all datasets. On the right, each group-group agreement for each dataset. We observe lower agreement for BY except in CoS-E. WO tends to agree more with other groups, especially in CoS-E.
152
+
153
+ ![](images/73cbd2396eda745c8aad73cf54604ff842cb336c3fc788d943b42623f17e90f7.jpg)
154
+
155
+ ![](images/97feaca26606dab34aee5a726d6bfdaab314960a4f8b99428f27497d825cc89a.jpg)
156
+
157
+ ![](images/112961938f512ef738e5f72c071f89ad6eba9f41f46dfea79739dd07e7703588.jpg)
158
+
159
+ the absence of a clear motivation for the selected answer.
160
+
161
+ The definition of what is common-sense varies across cultures and it is related to a person's background (Hershcovich et al., 2022), which makes CoS-E a highly subjective task<sup>14</sup>. Take for example the question 'Where would you find people standing in a line outside?' with these potential answers: 'bus depot', 'end of line', 'opera', 'neighbor's house' and 'meeting'. Even if there is agreement on the correct choice as 'bus depot', the rationale behind it could easily differ amongst people, i.e., it could be due to 'people standing', or the fact that they are standing in 'a line outside', or all together.
162
+
163
+ # 5.2 Analysis of Group-Model Agreement
164
+
165
+ Now that we have analyzed group-group agreement, we measure the alignment between groups' rationales and models' rationales. We analyze predictions from 16 Transformer-based models and employ AR and LRP to extract model rationales. Methods for comparing rationales and measuring group-model agreement are explained in Section 4.
166
+
167
+ Socio-demographic fairness Figure 5 shows a systematic pattern of model rationales aligning better with the rationales of older annotators in each ethnic group (BO, LO, WO) on the sentiment datasets. The only exception is White Young (WY) annotators in SST-2, whose median token- $\mathbf{F}_1$ is higher than their older counterpart. We argue this is due, in part, to the data source of the tasks themselves. While DynaSent constitutes an ensemble of diverse customer reviews, SST is based on movie review excerpts from Rotten Tomatoes with a more informal language, popular amongst younger users. Findings from Johannsen et al. (2015) and Hovy
168
+
169
+ ![](images/c17cdc1c55dedb503fb9aa909fb85e77ddcd13aaf4792120f659341f1957eb98.jpg)
170
+ Figure 5: Box-plots of group-model rationale alignment for the two sentiment datasets measured with token- $\mathbf{F}_1$ . Model rationales are extracted with LRP. Each dot represents a model's token- $\mathbf{F}_1$ score for the respective group. We see that for each ethnic group, model rationales align better with rationales of older annotators, except for White Young (WY) annotators of SST-2. Distil-RoBERTa (dr) is an outlier, consistently showing the best scores in both datasets across groups.
171
+
172
+ and Søgaard (2015) indicate that there exist grammatical differences between age groups. Johannsen et al. (2015) further showed several age and gender-specific syntactic patterns that hold even across languages. This would explain not only the noticeable group-group differences when marking supporting evidence (lexical structures) for their answers, but also the agreement disparity reflected by models fine-tuned on potentially age-biased data.
173
+
174
+ Results are consistent with previous findings of
175
+
176
+ ![](images/ba99a785a3acb76f3cc8deb6973e80e27e2083ef2fcbbd56cb53c73e2e479578.jpg)
177
+ Figure 6: Group-model rationale alignment (token- $\mathrm{F}_1$ ). Error bars show the distance between the groups with the highest and lowest scores. On the X-axis, models are ordered from smallest to largest. We show Spearman correlation coefficients, $\rho$ , between token- $\mathrm{F}_1$ scores (the concatenation of all groups' scores) and model sizes (in Million parameters), finding token- $\mathrm{F}_1$ to be negatively correlated with model size in most cases.
178
+
179
+ Zhang et al. (2021), who show a variety of language models aligning better with older, white annotators, and worse with minority groups, in word prediction tasks. We observe that group-model rationale agreement does not correlate with group-model class agreement, i.e., when a model performs well for a particular group, it does not necessarily entail that its rationales, or learned patterns, align. Group-model rationale agreement evaluated with Attention Rollout and CoS-E are shown in Figure 13 in Appendix C, along with results using the complementary metric $(\mathrm{IOU - F_1})$ . The patterns derived from them are in line with those in Figure 5: AR shows similar behaviours as LRP, but leads to larger variation between models. However CoS-E, which, as explained, is a very different task, does not seem to exhibit big group differences. This is also noticeable in Figure 6, where error bars show the distance between groups with the highest and lowest level of agreement in every model.
180
+
181
+ The role of model size In general, larger language models seem to perform better on NLP tasks. In our setting, Figure 3 shows a positive trend with model size: larger models achieve, in general, higher performance. Could it be the case that larger language models also show higher rationale agreement? And, are they consequently more fair? We evaluate fairness in terms of performance parity: min-max difference between the group with the lowest and highest token- $\mathbf{F}_1$ (per model). Relying on min-max difference captures the widely shared intuition that fairness is always in the service of the worst off group (Rawls, 1971).
182
+
183
+ Contrary to our expectations, Figure 6 shows how token- $\mathrm{F}_1$ scores actually decrease with model size - with CoS-E model rationales from LRP be
184
+
185
+ ing the only exception to the trend. We report Spearman correlation values for each dataset and explainability method: The negative correlation between token- $\mathrm{F}_1$ and model size is significant in all three datasets with AR, but only in DynaSent with LRP. The positive correlation in CoS-E with LRP rationales is also significant.
186
+
187
+ When we zoom in on the min-max Token- $\mathbf{F}_1$ gaps (error bars on Figure 6) $^{15}$ , we find that performance gaps are uncorrelated with model size. Therefore, there is no evidence that larger models are more fair, i.e., rationale alignment does not become more equal for demographic groups. In the context of toxicity classification, work from (Baldini et al., 2021) also hints that size is not well correlated with fairness of models.
188
+
189
+ Do distilled models align better? Knowledge distillation has been proven to be effective in model compression while maintaining model performance (Gou et al., 2021). But can it also be effective in improving NLP fairness? Xu and Hu (2022) find a consistent pattern of toxicity and bias reduction after model distillation. Chai et al. (2022) show promising results when approaching fairness without demographics through knowledge distillation. Tan et al. (2018) discuss the benefits of applying knowledge distillation to leverage model interpretability. Motivated by these findings, we take results from LRP to look closer into group-model rationale agreement for distilled models, which we show in Table 2. We find overall higher rationale agreement for distilled models. However, there is no evidence that distilled models are also more fair: Only minilm-16-h384-uncased
190
+
191
+ <table><tr><td></td><td>token-F1(↑)</td><td>IOU-F1(↑)</td><td>min-max token-F1(↓)</td><td>min-max IOU-F1(↓)</td></tr><tr><td>minilm-l6-h384-unc.</td><td>.31</td><td>.28</td><td>.045</td><td>.068</td></tr><tr><td>minilm-l12-h384-unc.</td><td>.27</td><td>.21</td><td>.045</td><td>.083</td></tr><tr><td>distilbert-base-unc.</td><td>.29</td><td>.24</td><td>.064</td><td>.100</td></tr><tr><td>distilroberta-base</td><td>.36</td><td>.36</td><td>.065</td><td>.069</td></tr><tr><td>Avg. (16 models)</td><td>.29</td><td>.24</td><td>.054</td><td>.081</td></tr></table>
192
+
193
+ Table 2: Group-model alignment for four distilled models. Bottom row shows average scores across all 16 models considered in this paper. Values in **bold** are better than the average (lower if $\downarrow$ , higher if $\uparrow$ ). While rationale alignment (token- $F_1$ and IOU- $F_1$ ) seem to be better for distilled models, only minilm-16-h384-uncased is also fairer than the average (in terms of min-max difference) with both metrics.
194
+
195
+ has a smaller performance gap between the best and worst-off group for both metrics compared to the average.
196
+
197
+ # 6 Conclusion
198
+
199
+ In this paper, we present a new collection of three existing datasets with demographics-augmented annotations, balanced across age and ethnicity. By having annotators choose the right label and marking supporting evidence for their choice, we find that what counts as a rationale differs depending on peoples' socio-demographic backgrounds.
200
+
201
+ Through a series of experiments with 16 popular model architectures and two families of explainability methods, we show that model rationales align better with older individuals, especially on sentiment classification. We look closer at model size and the influence of distilled pretraining: despite the fact that larger models perform better in general NLP tasks, we find negative correlations between model size and rationale agreement. Furthermore, from the point of view of performance parity, we find no evidence that increasing model size improves fairness. Likewise, distilled models do not seem to be more fair in terms of rationale agreement, however they do present overall higher scores.
202
+
203
+ This work indicates the presence of undesired biases that do not necessarily surface in task performance. We believe this provides an important addendum to the fairness literature: Even if models are fair in terms of predictive performance, they may still exhibit biases that can only be revealed by considering model rationales. If models are equally right, but only right for the right reasons in the eyes of some groups rather than others, they will likely be less robust for the latter groups.
204
+
205
+ # Limitations
206
+
207
+ Our analysis is limited to non-autoregressive Transformer-based models, fine-tuned with the same set of hyperparameters. Hyperparameter optimization would undoubtedly lead to better performance for some models, but we fine-tuned each model with standard hyperparameter values for solving sentiment analysis tasks (DeYoung et al., 2019) to reduce resource consumption. This should not affect the conclusions drawn from our experiments.
208
+
209
+ Comparing human rationales and rationales extracted with interpretability methods such as Attention Rollout and LRP is not straightforward. Overall agreement scores depend on how model rationales are converted into categorical values (top $k^{gd}$ ). See Jorgensen et al. (2022) for discussion.
210
+
211
+ # Acknowledgments
212
+
213
+ Many thanks to Stephanie Brandl, David Dreyer Lassen, Frederik Hjort, Emily Pitler and David Jurgens for their insightful comments.
214
+
215
+ This work was supported by the Novo Nordisk Foundation.
216
+
217
+ # Ethics Statement
218
+
219
+ Broader impact Although explainability and fairness are broadly viewed as intertwined subjects, very little work has studied the two concepts together (Feng and Boyd-Graber, 2019; González et al., 2021; Ruder et al., 2022). This study is a first of its kind to examine fairness issues of explainability methods and to publish human rationales with diverse socio-demographic information. We hope this work will impact the NLP research community towards more data-aware and multi-dimensional investigations of models and methods, and towards further studies of biases in NLP.
220
+
221
+ Personal and sensitive data This study deals with personal and sensitive information. The responses are anonymous and cannot be used to identify any individual.
222
+
223
+ Informed consent The participants were informed of the study's overall aim, the procedure and confidentiality of their responses. With this information, the participants consented to the use and sharing of their responses.
224
+
225
+ Potential risks We do not anticipate any risks of participation in the study, yet we do note a recent awareness of poor working conditions among crowdworkers for AI data labeling in some countries (Williams et al., 2022). The recruitment platform Prolific, used in this study, is targeted towards research (rather than AI development) and has stricter rules on participant screening and minimum wages (Palan and Schitter, 2017), compared to other popular platforms, which we hope reduce the risk of such poor working conditions.
226
+
227
+ Remuneration The participants were paid an average of 7.1£/hour (≈ 8.8$/hour).
228
+
229
+ Intended use The collected annotations and demographic information will be publicly available to be used for research purposes only.
230
+
231
+ # References
232
+
233
+ Samira Abnar and Willem Zuidema. 2020. Quantifying attention flow in transformers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4190-4197, Online. Association for Computational Linguistics.
234
+ Ameen Ali, Thomas Schnake, Oliver Eberle, Grégoire Montavon, Klaus-Robert Müller, and Lior Wolf. 2022. Xai for transformers: Better explanations through conservative propagation.
235
+ Leila Arras, Grégoire Montavon, Klaus-Robert Müller, and Wojciech Samek. 2017. Explaining recurrent neural network predictions in sentiment analysis. In Proceedings of the 8th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, pages 159-168, Copenhagen, Denmark. Association for Computational Linguistics.
236
+ Sebastian Bach, Alexander Binder, Gregoire Montavon, Frederick Klauschen, Klaus-Robert Müller, and Wojciech Samek. 2015. On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation. PLOS ONE, 10(7):1-46.
237
+ Ioana Baldini, Dennis Wei, Karthikeyan Natesan Ramamurthy, Mikhail Yurochkin, and Moninder Singh. 2021. Your fairness may vary: Pretrained language model fairness in toxic text classification.
238
+ Esma Balkir, Svetlana Kiritchenko, Isar Nejadgholi, and Kathleen Fraser. 2022. Challenges in applying explainability methods to improve the fairness of NLP models. In Proceedings of the 2nd Workshop on Trustworthy Natural Language Processing (TrustNLP 2022), pages 80-92, Seattle, U.S.A. Association for Computational Linguistics.
239
+ Kate Barasz and Tami Kim. 2022. Choice perception: Making sense (and nonsense) of others' decisions. Current opinion in psychology, 43:176-181.
240
+
241
+ Kevin Baum, Susanne Mantel, Timo Speith, and Eva Schmidt. 2022. From responsibility to reason-giving explainable artificial intelligence. *Philosophy and Technology*, 35(1):1-30.
242
+ Beata Beigman Klebanov and Eyal Beigman. 2009. Squibs: From annotator agreement to noise models. Computational Linguistics, 35(4):495-503.
243
+ Claus Beisbart and Tim Räz. 2022. Philosophy of science at sea: Clarifying the interpretability of machine learning. *Philosophy Compass*, 17(6):e12830.
244
+ Arpita Biswas, Siddharth Barman, Amit Deshpande, and Amit Sharma. 2019. Quantifying infrastructure marginality and its trade-off with group fairness. CoRR, abs/1909.00982.
245
+ Alessandro Castelnovo, Riccardo Crupi, Greta Greco, Daniele Regoli, Ilaria Penco, and Andrea Cosentini. 2022. A clarification of the nuances in the fairness metrics landscape. Scientific Reports, 12.
246
+ Junyi Chai, Taeuk Jang, and Xiaoqian Wang. 2022. Fairness without demographics through knowledge distillation. In Advances in Neural Information Processing Systems.
247
+ Ilias Chalkidis, Tommaso Pasini, Sheng Zhang, Letizia Tomada, Sebastian Schwemer, and Anders Søgaard. 2022. FairLex: A multilingual benchmark for evaluating fairness in legal text processing. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4389-4406, Dublin, Ireland. Association for Computational Linguistics.
248
+ Cheng-Han Chiang and Hung-yi Lee. 2022. Re-examining human annotations for interpretable nlp.
249
+ Sam Corbett-Davies and Sharad Goel. 2018. The measure and mismeasure of fairness: A critical review of fair machine learning. ArXiv, abs/1808.00023.
250
+ Jay DeYoung, Sarthak Jain, Nazneen Fatema Rajani, Eric Lehman, Caiming Xiong, Richard Socher, and Byron C. Wallace. 2019. Eraser: A benchmark to evaluate rationalized nlp models.
251
+ Kawin Ethayarajh and Dan Jurafsky. 2020. Utility is in the eye of the user: A critique of NLP leaderboards. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4846-4853, Online. Association for Computational Linguistics.
252
+ Shi Feng and Jordan Boyd-Graber. 2019. What can ai do for me? evaluating machine learning interpretations in cooperative play. In Proceedings of the 24th International Conference on Intelligent User Interfaces, IUI '19, page 229-239, New York, NY, USA. Association for Computing Machinery.
253
+ Sorelle A. Friedler, Carlos Scheidegger, and Suresh Venkatasubramanian. 2021. The (im)possibility of fairness: Different value systems require different
254
+
255
+ mechanisms for fair decision making. Commun. ACM, 64(4):136-143.
256
+ Ana Valeria González, Anna Rogers, and Anders Søgaard. 2021. On the interaction of belief bias and explanations. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 2930-2942, Online. Association for Computational Linguistics.
257
+ Jianping Gou, Baosheng Yu, Stephen J. Maybank, and Dacheng Tao. 2021. Knowledge distillation: A survey. International Journal of Computer Vision, 129(6):1789-1819.
258
+ Philipp Hacker and Jan-Hendrik Passoth. 2022. Varieties of AI Explanations Under the Law. From the GDPR to the AIA, and Beyond, pages 343-373. Springer International Publishing, Cham.
259
+ Daniel Hershcovich, Stella Frank, Heather Lent, Miryam de Lhoneux, Mostafa Abdou, Stephanie Brandl, Emanuele Bugliarello, Laura Cabello Piqeras, Ilias Chalkidis, Ruixiang Cui, Constanza Fierro, Katerina Margatina, Phillip Rust, and Anders Søgaard. 2022. Challenges and strategies in cross-cultural NLP. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6997-7013, Dublin, Ireland. Association for Computational Linguistics.
260
+ Nora Hollenstein, Jonathan Rotsztejn, Marius Troendle, Andreas Pedroni, Ce Zhang, and Nicolas Langer. 2018. Zuco, a simultaneous eeg and eye-tracking resource for natural sentence reading. Scientific Data, 5.
261
+ Dirk Hovy and Anders Søgaard. 2015. Tagging performance correlates with author age. 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 483-488, Beijing, China. Association for Computational Linguistics.
262
+ 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.
263
+ 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.
264
+ Anna Jørgensen, Dirk Hovy, and Anders Søgaard. 2016. Learning a POS tagger for AAVE-like language. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies,
265
+
266
+ pages 1115-1120, San Diego, California. Association for Computational Linguistics.
267
+ Rasmus Kør Jørgensen, Fiammetta Caccavale, Christian Igel, and Anders Søgaard. 2022. Are multilingual sentiment models equally right for the right reasons? In EMNLP Workshop on Analyzing and Interpreting Neural Networks for NLP (BlackBoxNLP).
268
+ Pang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Sara Beery, Jure Leskovec, Anshul Kundaje, Emma Pierson, Sergey Levine, Chelsea Finn, and Percy Liang. 2020. Wilds: A benchmark of in-the-wild distribution shifts.
269
+ Markus Langer, Daniel Oster, Timo Speith, Holger Hermanns, Lena Kastner, Eva Schmidt, Andreas Sesing, and Kevin Baum. 2021. What do we want from explainable artificial intelligence (xai)? - A stakeholder perspective on XAI and a conceptual model guiding interdisciplinary XAI research. Artif. Intell., 296:103473.
270
+ Brian Larson. 2017. Gender as a variable in natural-language processing: Ethical considerations. In Proceedings of the First ACL Workshop on Ethics in Natural Language Processing, pages 1-11, Valencia, Spain. Association for Computational Linguistics.
271
+ Mike Li, Hongseok Namkoong, and Shangzhou Xia. 2021. Evaluating model performance under worst-case subpopulations. In Advances in Neural Information Processing Systems, volume 34, pages 17325-17334, Vancouver, CA. Curran Associates, Inc.
272
+ Binny Mathew, Punyajoy Saha, Seid Muhie Yimam, Chris Biemann, Pawan Goyal, and Animesh Mukherjee. 2021. Hatexplain: A benchmark dataset for explainable hate speech detection. In Proceedings of the AAAI Conference on Artificial Intelligence 35(17), pages 14867-14875.
273
+ 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.
274
+ Andrés Páez. 2019. The pragmatic turn in explainable artificial intelligence (xai). *Minds and Machines*, 29(3):441-459.
275
+ Stefan Palan and Christian Schitter. 2017. Prolific.ac—a subject pool for online experiments. Journal of Behavioral and Experimental Finance, 17:22-27.
276
+ Steven T. Piantadosi and Felix Hill. 2022. Meaning without reference in large language models.
277
+ Barbara Plank. 2022. The 'problem' of human label variation: On ground truth in data, modeling and evaluation. *ArXiv*, abs/2211.02570.
278
+
279
+ Barbara Plank, Dirk Hovy, and Anders Søgaard. 2014. Learning part-of-speech taggers with inter-annotator agreement loss. In Proceedings of the 14th Conference of the European Chapter of the Association for Computational Linguistics, pages 742–751, Gothenburg, Sweden. Association for Computational Linguistics.
280
+ Christopher Potts, Zhengxuan Wu, Atticus Geiger, and Douwe Kiela. 2020. DynaSent: A dynamic benchmark for sentiment analysis. arXiv preprint arXiv:2012.15349.
281
+ Nazneen Fatema Rajani, Bryan McCann, Caiming Xiong, and Richard Socher. 2019. Explain yourself! leveraging language models for commonsense reasoning. Proceedings of the Association for Computational Linguistics (ACL).
282
+ John Rawls. 1971. A Theory of Justice, 1 edition. Belknap Press of Harvard University Press, Cambridge, Massachusetts.
283
+ Sagnik Ray Choudhury, Anna Rogers, and Isabelle Augenstein. 2022. Machine reading, fast and slow: When do models "understand" language? In Proceedings of the 29th International Conference on Computational Linguistics, pages 78-93, Gyeongju, Republic of Korea. International Committee on Computational Linguistics.
284
+ Sebastian Ruder, Ivan Vulic, and Anders Søgaard. 2022. Square one bias in NLP: Towards a multidimensional exploration of the research manifold. In Findings of the Association for Computational Linguistics: ACL 2022, pages 2340-2354, Dublin, Ireland. Association for Computational Linguistics.
285
+ 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, Florence, Italy. Association for Computational Linguistics.
286
+ Mattia Setzu, Riccardo Guidotti, Anna Monreale, Franco Turini, Dino Pedreschi, and Fosca Giannotti. 2021. Glocalx - from local to global explanations of black box ai models. Artificial Intelligence, 294:103457.
287
+ Amit Sharma, Arpita Biswas, and Siddharth Barman. 2020. Inframarginality audit of group-fairness. Symposium on the Foundations of Responsible Computing (FORC).
288
+ 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.
289
+ K. E. Stanovich and R. F. West. 2000. Individual differences in reasoning: Implications for the rationality debate? Behavioral and Brain Sciences, 23:645-665.
290
+
291
+ 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, Minneapolis, Minnesota. Association for Computational Linguistics.
292
+ Sarah Tan, Rich Caruana, Giles Hooker, and Yin Lou. 2018. Distill-and-compare: Auditing black-box models using transparent model distillation. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, AIES '18, page 303-310, New York, NY, USA. Association for Computing Machinery.
293
+ Sahil Verma and Julia Rubin. 2018. *Fairness definitions* explained. In *Proceedings of the International Workshop on Software Fairness*, FairWare '18, page 1-7, New York, NY, USA. Association for Computing Machinery.
294
+ 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. In Advances in Neural Information Processing Systems, volume 33, pages 12388-12401, Vancouver, CA. Curran Associates, Inc.
295
+ Lijie Wang, Yaozong Shen, Shu ping Peng, Shuai Zhang, Xinyan Xiao, Hao Liu, Hongxuan Tang, Ying Chen, Hua Wu, and Haifeng Wang. 2022. A fine-grained interpretability evaluation benchmark for neural nlp. ArXiv, abs/2205.11097.
296
+ Adrienne Williams, Milagros Miceli, and Timnit Gebru. 2022. The exploited labor behind artificial intelligence.
297
+ Robert Williamson and Aditya Menon. 2019. Fairness risk measures. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 6786-6797, Long Beach, California. PMLR.
298
+ Guangxuan Xu and Qingyuan Hu. 2022. Can model compression improve nlp fairness.
299
+ Omar Zaidan, Jason Eisner, and Christine Piatko. 2007. Using "annotator rationales" to improve machine learning for text categorization. In Human Language Technologies 2007: The Conference of the North American Chapter of the Association for Computational Linguistics; Proceedings of the Main Conference, pages 260-267, Rochester, New York. Association for Computational Linguistics.
300
+ Carlos Zednik and Hannes Boelsen. 2022. Scientific exploration and explainable artificial intelligence. *Minds Mach.*, 32(1):219-239.
301
+ Sheng Zhang, Xin Zhang, Weiming Zhang, and Anders Søgaard. 2021. Sociolectal analysis of pretrained
302
+
303
+ language models. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 4581-4588, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
304
+
305
+ # A Annotation guidelines and task examples
306
+
307
+ On the next pages, we firstly show the annotation instructions given to annotators within the Qualtrics surveys. Full exports of the surveys are available in our GitHub repository. $^{16}$
308
+
309
+ We created instructions specific for each dataset (DynaSent, SST-2, and CoS-E), leaning on prior work of annotating labels and rationales for these and similar datasets (Potts et al., 2020; Zaidan et al., 2007; DeYoung et al., 2019), as described in the paper, section 3.1.
310
+
311
+ Figure 7, 8, and 9 shows the instructions for Dy- naSent, SST-2 and CoS-E, respectively, and Figure 10 shows an example of how an instance for the sentiment task and the common-sense reasoning task is annotated, i.e. how it looked from the pers-. spective of the crowdworkers.
312
+
313
+ Annotating rationales for the common-sense reasoning task is somewhat more complex than annotating rationales for sentiment: while we can ask annotators to mark 'evidence' for a sentiment label – often resulting in marking words that are positively or negatively loaded – we cannot as simply ask for 'evidence' for a common-sense reasoning answer without risking some confusion. Take, for instance, the question "Where do you find the most amount of leafs?" with the answer being 'Forest', as shown in Figure 9. Here, the term 'evidence' might be misunderstood as actual evidence for why there would be more leafs in the forest compared to a field – evidence which cannot be found within the question itself. We therefore re-phrase the rationale annotation instructions for CoS-E, following an example from Chiang and Lee (2022), and ask, "For each word in the question, if you think that removing it will decrease your confidence toward your chosen label, please mark it." Furthermore, the subset of the CoS-E dataset, that we re- annotate, consists of the more 'difficult' split of the CommonsenseQA dataset (Talmor et al., 2019; DeYoung et al., 2019). To make the task as clear as possible to the annotators, we explain, in the instructions, that the question and answer-options have been created by other crowdworkers who were instructed to create questions that could be "easily answered by humans without context, by the use of commonsense knowledge", as is described by Talmor et al. (2019).
314
+
315
+ <table><tr><td rowspan="2">DATASET</td><td rowspan="2">N</td><td colspan="4">COMPLETE LABEL AGREEMENT</td></tr><tr><td>POS</td><td>NEG</td><td>NEUTRAL</td><td>TOTAL</td></tr><tr><td>DynaSent</td><td>480</td><td>105</td><td>102</td><td>2</td><td>209</td></tr><tr><td>SST</td><td>263</td><td>79</td><td>73</td><td>0</td><td>152</td></tr><tr><td>CoS-E</td><td>500</td><td>-</td><td>-</td><td>-</td><td>161</td></tr></table>
316
+
317
+ Table 3: Number of instances, in our (re-)annotated data, where all annotator groups agreed upon the instance's label.
318
+
319
+ # B Annotations Overview
320
+
321
+ Table 4 gives further information on the distribution of annotators, across groups and datasets, as well as ratios of rationale lengths to input lengths. Table 3 shows the number of instances in the data subsets, we work with, and the number of instances where all our annotator groups agreed on the label and that are therefore used for rationale-agreement analyses.
322
+
323
+ # C Supplementary Figures
324
+
325
+ For completeness, we provide supplementary figures for all the metrics and datasets analyzed in the paper.
326
+
327
+ # C.1 Label Agreement
328
+
329
+ Heatmaps in Figure 11 show the level of group-group label agreement across datasets. Similar to what is shown in Figure 4, BY consistently exhibit lower level of agreement.
330
+
331
+ Box-plots in Figure 12 represent group-model label agreement. Each dot represents the F1-score of each model. While for Cos-E the models generally exhibit lower variability across groups, the level of agreement is also lower (as shown in Figure 3).
332
+
333
+ # C.2 Rationale Alignment
334
+
335
+ Figure 13 is the extended version of Figure 5, showing the group-model rationale agreement for each dataset, each explainability method and with two metrics for measuring agreement, token- $\mathbf{F}_1$ and IOU- $\mathbf{F}_1$ .
336
+
337
+ The bar charts in Figure 14 shows, per model and dataset, the distance between the group with the lowest and highest agreement with the model (by token- $\mathrm{F}_1$ ), which we refer to as the "min-max token- $\mathrm{F}_1$ gaps" in section 5.2. We include this plot because it serves to better illustrate the gaps themselves, and how they are uncorrelated with model size, compared to what Figure 6 in the paper can convey.
338
+
339
+ # Instructions
340
+
341
+ Please read these instructions carefully.
342
+
343
+ You will be shown 10 sentences from reviews of products and services. For each, your task is to choose from one of our three labels:
344
+
345
+ Positive: The sentence conveys information about the author's positive evaluative sentiment.
346
+
347
+ Negative: The sentence conveys information about the author's negative evaluative sentiment.
348
+
349
+ No sentiment: The sentence does not convey anything about the author's positive or negative sentiment.
350
+
351
+ Here are some examples of the labels:
352
+
353
+ Sentence: This is an under-appreciated little gem of a movie.
354
+
355
+ (This is Positive because it expresses a positive overall opinion.)
356
+
357
+ Sentence: I asked for my steak medium-rare, and they delivered it perfectly!
358
+
359
+ (This is Positive because it puts a positive spin on an aspect of the author's experience.)
360
+
361
+ Sentence: The screen on this device is a little too bright.
362
+
363
+ (This is Negative because it negatively evaluates an aspect of the product.)
364
+
365
+ Sentence: The book is 972 pages long.
366
+
367
+ (This is No sentiment because it describes a factual matter with not evaluative component.)
368
+
369
+ Sentence: The entrees are delicious, but the service is so bad that it's not worth going.
370
+
371
+ (This is Negative because the negative statement outweighs the positive one.)
372
+
373
+ Sentence: The acting is great! The soundtrack is run-of-the mill, but the action more than makes up for it.
374
+
375
+ (This is Positive because the positive statements outweighs the negative.)
376
+
377
+ We further ask you to specify what snippets of text, in the sentence, you think acts as supporting evidence for your chosen label. The sentence will be shown to you as illustrated below, and your task is to mark (by clicking on them) all the words you think shows evidence for the sentiment label you chose.
378
+
379
+ ![](images/efe2d018481066204ed34daac46de7264e9fab59f056e1f3d02583889537e87e.jpg)
380
+ Figure 7: DynaSent annotation instructions.
381
+
382
+ Be aware that some sentences might be too long to fit on your screen. You therefore have to remember to scroll in order to see all the words that can be marked as evidence.
383
+
384
+ Click the forward button below when you are ready to start the task.
385
+
386
+ # Instructions
387
+
388
+ Please read these instructions carefully.
389
+
390
+ You will be shown approximately 10 sentences from reviews of movies. For each, your task is to choose from one of our three labels:
391
+
392
+ Positive: The sentence conveys information about the author's positive evaluative sentiment.
393
+
394
+ Negative: The sentence conveys information about the author's negative evaluative sentiment.
395
+
396
+ No sentiment: The sentence does not convey anything about the author's positive or negative sentiment.
397
+
398
+ Here are some examples of the labels:
399
+
400
+ Sentence: This is an under-appreciated little gem of a movie.
401
+
402
+ (This is Positive because it expresses a positive overall opinion.)
403
+
404
+ Sentence: he is one of the most exciting martial artists on the big screen, continuing to perform his own stunts and dazzling audiences with his flashy kicks and punches.
405
+
406
+ (This is Positive because it positively evaluates an aspect of the movie.)
407
+
408
+ Sentence: The acting is great! The soundtrack is run-of-the-mill, but the action more than makes up for it.
409
+
410
+ (This is Positive because the positive statements outweigh the negative.)
411
+
412
+ Sentence: The story is interesting but the movie is so badly put together that even the most casual viewer may notice the miserable pacing and stray plot threads.
413
+
414
+ (This is Negative because the negative statement outweighs the positive one.)
415
+
416
+ Sentence: A woman in peril. A confrontation. An explosion. The end. Yawn. Yawn. Yawn.
417
+
418
+ (This is Negative because it puts a negative spin on the author's experience.)
419
+
420
+ Sentence: don't go see this movie.
421
+
422
+ (This is Negative because it recommends against seeing the movie, reflecting a negative evaluation.)
423
+
424
+ Sentence: it is directed by Steven Spielberg.
425
+
426
+ (This is No sentiment because it describes a factual matter with no evaluative component.)
427
+
428
+ Sentence: I saw it in the local theater with my best friend.
429
+
430
+ (This is No sentiment because it does not say anything about the movie.)
431
+
432
+ We further ask you to specify what snippets of text, in the sentence, you think acts as supporting evidence for your chosen label. The sentence will be shown to you as illustrated below, and your task is to mark (by clicking on them) all the words you think shows evidence for the sentiment label you chose.
433
+
434
+ ![](images/d8894c288dad5e9a6a27baa646435735dc918ea32e27e3ec4ddc66efda33771b.jpg)
435
+ Figure 8: SST-2 annotation instructions.
436
+
437
+ Be aware that some sentences might be too long to fit on your screen. In that case you have to scroll in order to see all the words that can be marked as evidence.
438
+
439
+ Click the forward button below when you are ready to start the task.
440
+
441
+ # Instructions
442
+
443
+ (Pleasesread these instructions carefully.)
444
+
445
+ You will be shown 10 multiple-choice questions. All questions and their answer-options have been created by other crowdworkers, who were instructed to create questions that can be fairly easily answered by humans without context, by the use of common-sense knowledge.
446
+
447
+ Your task is to firstly select the answer you think is most correct and sensible. We call this the label of the question. Secondly, we ask you to mark relevant words in the question that justifies your choice. Specifically, for each word in the question, if you think that removing it will decrease your confidence toward your chosen label, you should mark it.
448
+
449
+ In the image below, you see an example of how the task will be presented to you. To the question "Where do you find the most amount of leafs?", the option "Forest" is selected as the correct answer and four words have been marked as justification.
450
+
451
+ Where do you find the most amount of leafs?
452
+
453
+ Compost pile
454
+
455
+ Flowers
456
+
457
+ Forest
458
+
459
+ Field
460
+
461
+ Ground
462
+
463
+ For each word in the question, if you think that removing it will decrease your confidence toward your chosen label, please mark it.
464
+
465
+ Where
466
+
467
+ do
468
+
469
+ you
470
+
471
+ find
472
+
473
+ the
474
+
475
+ most
476
+
477
+ amount
478
+
479
+ of
480
+
481
+ leafs
482
+
483
+ ?
484
+
485
+ When marking words, be aware that some questions might be longer and not fit perfectly on your screen. In that case you have to scroll in order to see all the words that can be marked. Also, the texts may have misspellings, typos and wrongly put spaces before punctuation – pay no attention to this.
486
+
487
+ Click the forward button below when you are ready to start the task.
488
+
489
+ Figure 9: CoS-E annotation instructions.
490
+
491
+ Sentence: The art exhibit has a lot to offer.
492
+
493
+ ![](images/412264e8cac7026ea321d7555d00203cda71dbed58d30b7125f9e53bb6ab1e18.jpg)
494
+
495
+ Mark the evidence for your chosen label.
496
+
497
+ ![](images/6a7e80e3fbfaa2c0e6fae28d3c5923cc957ef6997f85f237f41a2a2c061c469b.jpg)
498
+
499
+ ![](images/50acb7b955735f1510a71c8b0c5e09016a02ae6ae2778ae43fa7aaccc4ad58f6.jpg)
500
+
501
+ # (a) Sentiment annotation example.
502
+
503
+ Question: Where would you get a pen if you do not have one?
504
+
505
+ ![](images/f364d2951e1412260c043b7bfe5c038574184a87c6a6381a5f479e62d794dc43.jpg)
506
+
507
+ For each word in the question, if you think that removing it will decrease your confidence toward you chosen label, please mark it.
508
+
509
+ ![](images/9b88a9597d715b56c61a79663e13e4cb996b83d276684cb58cdca29f562568b2.jpg)
510
+
511
+ ![](images/98bcec00095d43d3d4c09a4b7e6c763bda159da6683a26dd827a70f17b89407e.jpg)
512
+
513
+ (b) Common-sense reasoning annotation example.
514
+
515
+ Figure 10: Screenshots of the annotation tasks as they are viewed in Qualtrics surveys.
516
+
517
+ <table><tr><td colspan="2">DATASET</td><td>BO</td><td>BY</td><td>LO</td><td>LY</td><td>WO</td><td>WY</td><td>TOTAL/AVG.</td></tr><tr><td rowspan="3">DynaSent</td><td>Annot.</td><td>51</td><td>56</td><td>61</td><td>73</td><td>54</td><td>51</td><td>346</td></tr><tr><td>Annot.*</td><td>48 (58%F)</td><td>48 (67%F)</td><td>48 (44%F)</td><td>48 (40%F)</td><td>48 (56%F)</td><td>48 (48%F)</td><td>288</td></tr><tr><td>RLR</td><td>33.7</td><td>32.5</td><td>31.5</td><td>29.8</td><td>34.7</td><td>29.1</td><td>31.9</td></tr><tr><td rowspan="3">SST</td><td>Annot.</td><td>28</td><td>27</td><td>53</td><td>43</td><td>27</td><td>29</td><td>207</td></tr><tr><td>Annot.*</td><td>26 (69%F)</td><td>26 (58%F)</td><td>26 (38%F)</td><td>26 (31%F)</td><td>26 (38%F)</td><td>26 (69%F)</td><td>156</td></tr><tr><td>RLR</td><td>32.1</td><td>25.1</td><td>30.7</td><td>27.8</td><td>29.1</td><td>32.7</td><td>29.6</td></tr><tr><td rowspan="3">CoS-E</td><td>Annot.</td><td>52</td><td>56</td><td>74</td><td>85</td><td>54</td><td>55</td><td>376</td></tr><tr><td>Annot.*</td><td>50 (60%F)</td><td>50 (60%F)</td><td>50 (40%F)</td><td>50 (48%F)</td><td>50 (48%F)</td><td>50 (40%F)</td><td>300</td></tr><tr><td>RLR</td><td>31.9</td><td>32.9</td><td>34.1</td><td>32.2</td><td>33.3</td><td>33.6</td><td>33.0</td></tr></table>
518
+
519
+ Table 4: Overview of our annotated data. Rows display statistics per dataset. Columns refer to each demographic group: Black/African American old (BO) and young (BY), Latino/Hispanic old (LO) and young (LY), White/Caucasian old (WO) and young (WY). Last column show the total quantity of each feature over all groups. Row-wise within each dataset: 'Annot.' and 'N' reflect the total number of annotators and instances, respectively. Annot.* refers to the number of annotators left after pre-processing (see exclusion criteria in Section 3.2). Number shown between brackets refers to the percentage of female annotators. RLR represents the ratio of rationale length to its input length (percentage).
520
+
521
+ ![](images/f99c8daa642499b054d9de216f3b4d45226b00ba060a487b0b1b98b158fca906.jpg)
522
+
523
+ ![](images/250c534d93c75cb1e27d32fdc06a82faa5eb772e3af183ea59239aa77f708a69.jpg)
524
+
525
+ ![](images/db50a43a3db128f668e466cb14822da4b22ea043eb87b759d618d3ae76dac308.jpg)
526
+
527
+ ![](images/41716f0572fc1f20069cbbba94baca7b7c70e25ce9ccfde04b4062f66303ca30.jpg)
528
+ Figure 11: Group-group label agreement (F1-scores).
529
+
530
+ ![](images/ba01e2af05f89aa4650c2449d18fa8d7242adb17d013391eb1f52c01844bc585.jpg)
531
+ Figure 12: Group-model label agreement (F1-scores).
532
+
533
+ ![](images/94a588fc2324557cc7689b7a276309d0dfa175c74d49ff8b4d408a927a4a1c5d.jpg)
534
+ (a) Token-F1 scores
535
+
536
+ ![](images/0c5707c4d33600720ea29c1674ba26173db4245b66f27397739030a8d1ceda7f.jpg)
537
+ (b) IOU-F1 scores
538
+ Figure 13: Box-plots of group-model rationale agreement for the each dataset measured with Token-F1 (left) and IOU-F1 (right). Model rationales are extracted with Attention Rollout (top row) and LRP (bottom row). Each dot represents a model's agreement with the respective group.
539
+
540
+ ![](images/b759a89493a8af389cf1e07650f4b0e4f5c001bf77f8c773d7d41e15c10e8077.jpg)
541
+ Figure 14: Per-model difference between the group with the lowest (min) and highest (max) model-group agreement measured with token-F1. Models on the x-axis are sorted by model size. The min-max captures a measure of fairness, with a smaller difference entailing more equal model-group rationale alignments. We find that the differences are uncorrelated with model size (in Million parameters), as is visible in this plot.
542
+
543
+ A For every submission:
544
+
545
+ A1. Did you describe the limitations of your work? In section titled "Limitations", section 7.
546
+ A2. Did you discuss any potential risks of your work? Section 8, "Ethics Statement"
547
+ A3. Do the abstract and introduction summarize the paper's main claims? Abstract and Section 1 on paragraph "Contributions".
548
+ A4. Have you used AI writing assistants when working on this paper? Left blank.
549
+
550
+ B Did you use or create scientific artifacts?
551
+
552
+ It is described in Section 3. Used in Section 4 and 5
553
+
554
+ B1. Did you cite the creators of artifacts you used? Section 3.1
555
+ B2. Did you discuss the license or terms for use and / or distribution of any artifacts? Section 8, "Ethics Statement"
556
+ B3. Did you discuss if your use of existing artifact(s) was consistent with their intended use, provided that it was specified? For the artifacts you create, do you specify intended use and whether that is compatible with the original access conditions (in particular, derivatives of data accessed for research purposes should not be used outside of research contexts)?
557
+
558
+ In the ethics statement we specify that the intended use of our annotations is research purposes only. The datasets we use are at least intended for research purposes as well. A larger discussion does not seem relevant in this case.
559
+
560
+ B4. Did you discuss the steps taken to check whether the data that was collected / used contains any information that names or uniquely identifies individual people or offensive content, and the steps taken to protect / anonymize it? Section 8, "Ethics Statement"
561
+ B5. Did you provide documentation of the artifacts, e.g., coverage of domains, languages, and linguistic phenomena, demographic groups represented, etc.? Section 3
562
+ B6. Did you report relevant statistics like the number of examples, details of train / test / dev splits, etc. for the data that you used / created? Even for commonly-used benchmark datasets, include the number of examples in train / validation / test splits, as these provide necessary context for a reader to understand experimental results. For example, small differences in accuracy on large test sets may be significant, while on small test sets they may not be. Section 3 and 4
563
+
564
+ C Did you run computational experiments?
565
+
566
+ Section 4
567
+
568
+ C1. Did you report the number of parameters in the models used, the total computational budget (e.g., GPU hours), and computing infrastructure used?
569
+
570
+ Our research does not focus on model development from scratch. We use known pretrained models and refer to the original library (footnote 6) in which this information is clearly stated.
571
+
572
+ C2. Did you discuss the experimental setup, including hyperparameter search and best-found hyperparameter values?
573
+
574
+ Experimental setup is discussed in Section 4. In the section 7 "Limitations, we provide further explanations.
575
+
576
+ C3. Did you report descriptive statistics about your results (e.g., error bars around results, summary statistics from sets of experiments), and is it transparent whether you are reporting the max, mean, etc. or just a single run?
577
+
578
+ Section 5
579
+
580
+ C4. If you used existing packages (e.g., for preprocessing, for normalization, or for evaluation), did you report the implementation, model, and parameter settings used (e.g., NLTK, Spacy, ROUGE, etc.)?
581
+
582
+ Not applicable. Left blank.
583
+
584
+ D Did you use human annotators (e.g., crowdworkers) or research with human participants?
585
+
586
+ Section 3
587
+
588
+ D1. Did you report the full text of instructions given to participants, including e.g., screenshots, disclaimers of any risks to participants or annotators, etc.?
589
+
590
+ Section 3 and Appendix C, and a printout of the full surveys/annotation task will be shared upon acceptance (an author's name and contact details appears in them). Section 3 and Ethics Statement.
591
+
592
+ D2. Did you report information about how you recruited (e.g., crowdsourcing platform, students) and paid participants, and discuss if such payment is adequate given the participants' demographic (e.g., country of residence)?
593
+
594
+ Section 3 and Ethics Statement.
595
+
596
+ D3. Did you discuss whether and how consent was obtained from people whose data you're using/curating? For example, if you collected data via crowdsourcing, did your instructions to crowdworkers explain how the data would be used?
597
+
598
+ Ethics Statement.
599
+
600
+ D4. Was the data collection protocol approved (or determined exempt) by an ethics review board?
601
+
602
+ Anonymous data is exempt from IRB approval at the authors' institution.
603
+
604
+ D5. Did you report the basic demographic and geographic characteristics of the annotator population that is the source of the data?
605
+
606
+ Section 3
beingrightforwhoserightreasons/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef4fd952210046d930b88098282ce79c88c899d2900a0a344896cd9f143b0753
3
+ size 579914
beingrightforwhoserightreasons/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:578782302205e5743ef852408f422686e260124aefddedc4ebb132bb9638c9af
3
+ size 614604
benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/5e4158e0-09ce-40a5-971c-2decbc51b36a_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f5bfc1923b239e590c8624332077a157615feb29a10e2d3be4767bea519aa11
3
+ size 131127
benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/5e4158e0-09ce-40a5-971c-2decbc51b36a_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c116c1608c2e89ff76a1cfe462973d5585f2d6e3f086860707fe35a6357d1c39
3
+ size 149908
benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/5e4158e0-09ce-40a5-971c-2decbc51b36a_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0d9e86552ca9cc840c23cbabf160d5b4fac46bc08b931b63ffad2a5464457fc
3
+ size 843748
benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/full.md ADDED
@@ -0,0 +1,468 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Benchmarking Large Language Model Capabilities for Conditional Generation
2
+
3
+ Joshua Maynez
4
+
5
+ Google DeepMind
6
+
7
+ joshuahm@google.com
8
+
9
+ Priyanka Agrawal
10
+
11
+ Google DeepMind
12
+
13
+ priyankagr@gmail.com
14
+
15
+ # Sebastian Gehrmann
16
+
17
+ Google Research
18
+
19
+ gehrmann@google.com
20
+
21
+ # Abstract
22
+
23
+ Pre-trained large language models (PLMs) underlie most new developments in natural language processing. They have shifted the field from application-specific model pipelines to a single model that is adapted to a wide range of tasks. Autoregressive PLMs like GPT-3 or PaLM, alongside techniques like few-shot learning, have additionally shifted the output modality to generation instead of classification or regression. Despite their ubiquitous use, the generation quality of language models is rarely evaluated when these models are introduced. Additionally, it is unclear how existing generation tasks--while they can be used to compare systems at a high level--relate to the real world use cases for which people have been adopting them. In this work, we discuss how to adapt existing application-specific generation benchmarks to PLMs and provide an in-depth, empirical study of the limitations and capabilities of PLMs in natural language generation tasks along dimensions such as scale, architecture, input and output language. Our results show that PLMs differ in their applicability to different data regimes and their generalization to multiple languages and inform which PLMs to use for a given generation task setup. We share best practices to be taken into consideration when benchmarking generation capabilities during the development of upcoming PLMs.
24
+
25
+ # 1 Introduction
26
+
27
+ Natural language generation tasks require generating understandable text given textual or non-linguistic information as input, such as documents, tables, or other structured forms. These texts seek to achieve a communicative goal (e.g., summarize a document). The standard approach to tackle these problems over the last years has been to start with a pretrained encoder-decoder model like T5 (Raffel et al., 2020a) or BART (Lewis et al., 2020a) and finetune it on a corpus that captures
28
+
29
+ the downstream task. The recent much larger pretrained language models use a decoder-only architecture and upended this paradigm. These models enabled few-shot or in-context learning approaches in which a model is presented with one or more examples and tasked to continue generating without any finetuning. We refer to both kinds of pretrained models as PLMs.
30
+
31
+ Due to the lack of grounding in the specific task setup, few-shot learning in generation settings leads to a model approaching the communicative goal from very different angles. These diverse range of outputs make the typical reference-based automatic evaluation strategies largely incompatible. While human evaluation can be used to overcome this shortcoming, it is infeasible to monitor the performance of an actively training model this way or to re-run all evaluations every time a new model is introduced. This leads to the question how one should reliably monitor generation capabilities, a question that is only growing in importance as more tasks are approached by casting them into generation setups.
32
+
33
+ In this work, we evaluate 8 models in few-shot and finetuning settings on 27 generation tasks covering 14 languages via automatic evaluation, presenting the first large-scale benchmark of PLMs in conditional NLG settings. We discuss design choices and challenges to ensure a fair comparison between the different systems, including suitable methods, tasks, and metrics. Based on our empirical results, we derive recommendations that could be used for future benchmarks during the development of PLMs. To combat the need for repeating computationally expensive explorations, we investigate how many evaluation examples are necessary to identify differences between models and find that, in many cases, fewer than 500 examples are sufficient, which opens the path for future evaluation-only task developments.
34
+
35
+ # 2 Background and Related Work
36
+
37
+ The shift from specialized pipelines toward pretrained language models has led to significant changes in how models are evaluated. We now focus more on questions such as "how good are the learned representations?" instead of user-facing measures of utility. The changes manifested in leaderboards and standard benchmarks that aim to characterize a wide range of model capabilities (Ethayarajh and Jurafsky, 2020).
38
+
39
+ An additional recent shift is that from finetuning toward few-shot learning. Models like T5 (Raffel et al., 2020a), BART (Lewis et al., 2020a), and mT5 (Xue et al., 2021) were finetuned on supervised datasets covering tasks including translation and summarization, and their outputs are compared to "ground truth" outputs via widely used metrics like ROUGE (Lin, 2004) which provide a noisy indication of the "quality" of the output and which can be used to determine whether a model is better than others. In contrast, large PLMs with autoregressive language modeling pretraining objectives are more capable to produce results without explicit finetuning and are thus typically evaluated via few-shot and in-context approaches, where the model is given the task description and exemplars showing how the task should be completed. GPT-3 (Brown et al., 2020) and models that followed such as GLaM (Du et al., 2022), Gopher (Rae et al., 2021), and LaMDA (Thoppilan et al., 2022), have achieved few-shot state-of-the-art results on a large number of tasks at their time of publication. However, few-shot approaches work best for tasks with a clear answer such as classification or span-based question-answering.
40
+
41
+ Generation metrics penalize systems when their writing style differs from how the references are written (Mathur et al., 2020; Freitag et al., 2020; Mille et al., 2021). Without finetuning, there is no guarantee that PLMs produce outputs that look like the ground truth, both in style and content. Recent work found that these differences leads to sharp differences in how humans and automatic metrics rate the generation quality (Goyal et al., 2022). Due to this uncertainty, most evaluations of new PLMs
42
+
43
+ are limited to NLU benchmarks such as SuperGLUE (Wang et al., 2019). For example, LaMDA (Thoppilan et al., 2022) did not evaluate on NLG tasks, GLaM (Du et al., 2022) limited its generation evaluation to short span question answering tasks, and GPT-3 (Brown et al., 2020) evaluated only on machine translation. A first autoregressive PLM with broad NLG evaluation, PaLM (Chowdhery et al., 2022), benchmarked summarization and data-to-text tasks in multiple languages.
44
+
45
+ The recent Holistic Evaluation of Language Models project (HELM, Liang et al., 2022) aims to standardize evaluation of language models. With the explicit goal to broaden the task and metric coverage, HELM has established an impressive few-shot benchmark for many natural language tasks. Corroborating the prior findings, they also conclude that human evaluation is necessary for NLG. This distinction means that the reference-based approach for generated text that the field has used since the advent of deep learning may no longer sufficient and that we need clear evaluation protocols that continue to allow us to answer broad questions about "generation quality" of a model. Complementing this work, we take a deeper look at a wider set of NLG tasks and explore LLMs in finetuning and few-shot setups to identify whether reference-based automatic evaluation can still be used to produce system rankings.
46
+
47
+ Research Questions We aim to define a methodology that allows us to answer the question "How good are learned representations of a model for generating natural language?" via few-shot and finetuning approaches. To develop and apply this methodology we seek to answer the following three research questions:
48
+
49
+ R1 How do different model architectures compare in terms of automatic metrics?
50
+
51
+ We aim to identify patterns that emerge in evaluations and to uncover aspects inherent to the tasks, e.g. have metrics on specific tasks saturated?, and to the models' architectural choices, e.g., are encoder-decoders better suited for particular task formulations? (Section 4)
52
+
53
+ R2 What set of tasks, methods, and metrics is best suited for the monitoring of improvements in language generation capabilities?
54
+
55
+ Using the results of R1, we aim to select a subset of tasks, methods, and metrics that robustly produce reliable model rankings. (Section 5)
56
+
57
+ <table><tr><td rowspan="2">Dataset</td><td rowspan="2">Languages</td><td colspan="2">Length</td><td colspan="2">Size</td></tr><tr><td>Input</td><td>Output</td><td>Training</td><td>Test</td></tr><tr><td>E2E</td><td>en</td><td>146</td><td>135</td><td>35k</td><td>4.7k</td></tr><tr><td>WebNLG</td><td>en,ru</td><td>169.5</td><td>157</td><td>14k-35k</td><td>1.1k-1.8k</td></tr><tr><td>ToTTo</td><td>en</td><td>357</td><td></td><td>120k</td><td>7.7k</td></tr><tr><td>Czech Rest.</td><td>cs</td><td>70</td><td>80</td><td>3.5k</td><td>842</td></tr><tr><td>XSum</td><td>en</td><td>1845</td><td>153</td><td>23k</td><td>1.2k</td></tr><tr><td>WikiLingua</td><td>en,es,ru,tr,vi</td><td>1k-5k</td><td>159-489</td><td>5k-3.8M</td><td>900-29k</td></tr><tr><td>MLSum</td><td>es,de</td><td>4152</td><td>147</td><td>220k-250k</td><td>10k-13k</td></tr><tr><td>XL-Sum</td><td>ar,bn,ja,id,sw,ko,ru,te,Th,tr,es,vi,hi</td><td>1k-10k</td><td>137-614</td><td>1.3k-300k</td><td>500-9k</td></tr></table>
58
+
59
+ Table 1: Details of the datasets evaluated in this paper: languages, lengths in number of tokens according to the mT5 tokenizer (Xue et al., 2021), and size of the training and test splits.
60
+
61
+ # R3 What are the broader implications for how the quality of newly developed models should be monitored?
62
+
63
+ Robustly ranking systems is particularly important when monitoring a system during training and when comparing across many tasks. In line with the "reality check" theme track at ACL 2023, we discuss the implications of our findings on how evaluation results should be produced and interpreted. (Section 6)
64
+
65
+ # 3 Method
66
+
67
+ # 3.1 Data
68
+
69
+ We select a combination of data-to-text and text-to-text datasets as different input modalities. The selected datasets capture different input and output lengths, domains, languages, and communicative goals. The text-to-text task with most available multilingual datasets is summarization which we pick for this paper.<sup>3</sup> We pick the following tasks:<sup>4</sup>
70
+
71
+ - MLSum (Scialom et al., 2020) - Summarize a news article in multiple sentences.
72
+ - WikiLingua (Ladhak et al., 2020) - Generate section headers for step-by-step instructions from WikiHow.
73
+ - XSum (Narayan et al., 2018) - Generate the first sentence of a news article.
74
+ - Clean E2E NLG (Novikova et al., 2017; Dušek et al., 2019) - Given a set of key-value attribute
75
+
76
+ pairs, describe a restaurant in one or two sentences.
77
+
78
+ - Czech Restaurant response generation (Dusek and Jurvc'ivcek, 2019) - Given a dialog context and a dialog act representation, generate a one sentence long response.
79
+ - WebNLG 2020 (Gardent et al., 2017; Ferreira et al., 2020) – Verbalize subject-predicate-object triples in one or more sentences.
80
+ - ToTTo (Parikh et al., 2020) - Describe highlighted cells in a table in a single sentence.
81
+ - XL-Sum (Hasan et al., 2021) - Summarize a news article, in the same language, in a single sentence.
82
+
83
+ Table 1 provides an overview of these datasets in terms of languages, the lengths of input and output and split sizes. For highly multilingual datasets, we evaluate on a subset of typologically diverse languages following the selection by Clark et al. (2020). To this selection, we add languages that appear both in WikiLingua and XL-Sum.
84
+
85
+ # 3.2 Models
86
+
87
+ Prior results for the benchmarked tasks primarily come from finetuning T5 (Raffel et al., 2020b), mT5 (Xue et al., 2021), or BART (Lewis et al., 2020b), which are encoder-decoder models pretrained with an infilling objectives. These models are significantly smaller than newer models like GPT-3, with sizes ranging from 130M to 13B parameters. Encoder-decoder models trained for infilling often outperform larger decoder-only LMs in the finetuning setting (Tay et al., 2022), while the latter work better for few-shot setting. There has also been recent work on reducing the computational cost of large models by $\sim 10\mathrm{x}$ by using a mixture of experts (Zoph et al., 2022). It is important to compare these diverse set of models to understand how scale plays a role with the model's architecture and its pretraining. We benchmark the following models:
88
+
89
+ - PaLM PaLM is a pretrained decoder-only transformer-based model trained with standard left-to-right language modeling objective. It is pretrained on a range of multilingual corpora including Wikipedia, news, and code. In this work, we use two models scales: 8B parameters and 540B parameters.
90
+
91
+ - GPT-3.5 (Ouyang et al., 2022b) GPT-3.5 is a 175B parameter decoder-only transformer-model of the GPT-3 family (Brown et al., 2020) but trained on a blend of text and code from before Q4 2021. This model, named code-davinci-002, was introduced as the base model for InstructGPT-3 (Ouyang et al., 2022b) without the supervision on human-written demonstrations and human-vetted model samples. $^6$
92
+ - ST-MoE (Zoph et al., 2022) ST-MoE is a 269B sparse pretrained variant of a dense encoder-decoder transformer-based model.
93
+ - LaMDA (Thoppilan et al., 2022) LaMDA (137B parameters) is a decoder-only transformer-based language model specialized for dialog applications. It is pretrained on dialog data as well as web text data followed by rank-based tuning.
94
+ - T5 (Raffel et al., 2020a) T5-XXL (11B parameters) is a pretrained encoder-decoder transformer-based model trained on a span corruption objective with a novel unified text-to-text format. It is pretrained on Common Crawl data, mostly containing English-only documents.
95
+ - mT5 (Xue et al., 2021) mT5-XXL (11B parameters) is a multilingual variant of T5 that was pretrained on a multilingual corpus, mC4, covering 101 languages.
96
+ - LongT5 (Guo et al., 2021) LongT5 (3B parameters) a similar architecture as T5, where the encoder is extended to have global-local attention sparsity patterns to handle long inputs.
97
+
98
+ # 3.3 Few-shot evaluation methodology
99
+
100
+ To evaluate the models for few-shot inference, we concatenate a task-specific prompt<sup>7</sup> to the input and preprocess an output prompt to the output. To handle the oftentimes very long inputs or outputs for tasks such as summarization, inputs were truncated to 2048 tokens and inference was done providing only one exemplar at a time, referred to as 1-shot. These simple prompts are analogous to those used in related work (Chowdhery et al., 2022; Scao et al., 2022). We do not tune the prompts or use more complex strategies to keep fair comparisons between multiple systems, as prompt selection can lead to overfitting. The exemplars are separated through double linebreaks, which are also used
101
+
102
+ to truncate output predictions for evaluation. All few-shot exemplars are randomly sampled from the training corpus. From early experimentation, we found this particularly important since it avoids overfitting to exemplars that work well for one model but not another.
103
+
104
+ # 3.4 Finetuning methodology
105
+
106
+ To use the decoder-only architectures during finetuning, inputs and targets are concatenated. The concatenated sequences are truncated to 2048 tokens, the training context used during pretraining, with 512 tokens reserved for the target. Only summarization tasks required input truncation. We finetuned models with standard hyperparameters; refer to Appendix-B for thorough details. The best model checkpoint for each dataset was selected by the best performing geometric mean of ROUGE-1, ROUGE-2 and ROUGE-L scores on the validation set. Decoding was done with beam-search with a beam size of 4 for encoder-decoder models, while inference in decoder-only PLMs (LaMDA, PaLM, ST-MoE) was performed using top-k sampling with $k = 10$ , due to issues with scaling beam search at the time of publication.
107
+
108
+ # 3.5 Metrics
109
+
110
+ Following the suggestions by Gehrmann et al. (2022b), we report a combination of lexical and learned metrics, starting with ROUGE-2 and ROUGE-L (Lin, 2004). Since the default ROUGE implementation uses English-specific tokenization, stemming and punctuation normalization, it is incompatible with other languages. Hasan et al. (2021) extended ROUGE by integrating additional stemmers and tokenizers to cover up to the 45 languages. To support more languages, and avoid dependency on varying implementations, we use a SentencePiece tokenizer (Kudo and Richardson, 2018) which, provided a vocabulary distribution file, is self-contained and has sensible fall-backs to unexpected words. Specifically, we used mT5's SentencePiece vocabulary.
111
+
112
+ For the same reason, we also evaluate with ChrF (Popovic, 2015), which is a character-level n-gram overlap metrics and thus independent from tokenizers. BLEURT (Sellam et al., 2020; Pu et al., 2021) is a multilingual model-based evaluation metric for generation designed to compute the similarity between a pair of sentences i.e. a reference and a candidate. It finetunes RemBERT (Chung
113
+
114
+ et al., 2021) on synthetic sentence pairs and gold ratings. In contrast to the lexical metrics, BLEURT is meant to capture the non-trivial semantic similarities between two texts.
115
+
116
+ For brevity, the main text of this section focuses on the F-measure of ROUGE-L for English and SentencePiece-ROUGE-L for all other languages while the remaining results are in Appendix A. We additionally investigate the agreement between metrics in Section 5. $^{8}$
117
+
118
+ # 4 Empirical Observations
119
+
120
+ Few-shot learning falls behind finetuning For many generation tasks, including multilingual summarization tasks, we observe a large gap between finetuning and few-shot results, indicating that finetuning will play an important role when it comes to maximizing automatic scores. On data-to-text, the few-shot results follow a similar trend as in summarization, but the gap to the best finetuned results shrinks drastically. Moreover, the finetuning result do not always follow a trend according to scale or architecture. We hypothesize that multiple tasks have saturated to the metrics. If this is the case, approaching them as few-shot generation tasks may still yield insights but it is no longer productive to use them to benchmark finetuned models.
121
+
122
+ Finetuned decoder-only PLMs can match encoder-decoder performance with scale In summarization, finetuned decoder-only PLMs, such as PaLM-540B, closely match or exceeds the best reported prior results on all English generation tasks. This demonstrates that PLMs can make up their architectural disadvantage through its vastly increased scale. While finetuning PLMs is computationally expensive, it serves as an important upper bound for few-shot predictions.
123
+
124
+ Multilingual generation capabilities are highly dependent on pretraining data The PLMs evaluated are mostly pretrained on English corpora: $99 + \%$ for T5, LongT5, ST-MoE; $90\%$ for PaLM, LaMDA; contrarily mT5 is explicitly pre
125
+
126
+ trained in a multilingual corpus. $^{9}$ PaLM achieves best results in 3 out of 4 English generation tasks which generate English text, even when the input is non-English. However, the much smaller mT5 bests the other models in 10 out of 14 non-English summarization tasks, and the relative difference between few-shot and finetuning is larger for non-English generation. This suggests that English-centric PLMs are better at processing non-English input than generating non-English output.
127
+
128
+ Analyzing the effects of input context length Tasks with long inputs suffer from models' limitation to process said inputs. Inputs are thus usually transformed (e.g. cropped, re-ranked, etc) to fit into the model. We found that a several of the evaluated tasks, such as WikiLingua and MLSum benefit from a longer input context in models even if the long-context model is smaller (i.e., LongT5 vs T5). In contrast, the performance is comparable for the rest of short-context tasks.
129
+
130
+ Given a natural language generation task:
131
+
132
+ Step 1: Is few-shot learning (A) or finetuning (B) best suited?
133
+
134
+ i) Inconsistent system rankings might indicate tasks are saturated. Few-shot learning will be more sensible to monitor in those cases.
135
+ ii) Encoder-decoder baselines are strong performers regardless of smaller scale.
136
+
137
+ Step 2-A: How best to benchmark few-shot learning?
138
+
139
+ i) Avoid curating prompts to individual PLMs.
140
+ ii) Randomly select exemplars for prompts.
141
+ iii) Control for output length outliers.
142
+
143
+ Step 3: What is an efficient test set size?
144
+
145
+ i) Pick the smallest size that produces consistent system rankings.
146
+ (ii) Evaluate more datasets rather than larger evaluations, adhering to (3.i).
147
+
148
+ Step 4: What metrics are best suited for the task?
149
+
150
+ (i) Effective automatic metrics should provide consistent system rankings.
151
+ (ii) Overlap-based metrics are not calibrated for few-shot learning.
152
+ iii) Human evaluation is vital if comparing few-shot vs finetuning.
153
+
154
+ Figure 1: General recommendations when monitoring or benchmarking PLMs.
155
+
156
+ # 5 Deriving Evaluation Practices
157
+
158
+ Figure 1 summarizes the recommendations we developed from challenges we faced and our observed empirical results. These recommendations are best understood in the context of monitoring
159
+
160
+ <table><tr><td rowspan="2">Task</td><td colspan="4">One-shot</td><td colspan="6">Finetuning</td></tr><tr><td>PaLM 8B</td><td>PaLM 540B</td><td>LaMDA 137B</td><td>GPT-3.5 175B</td><td>PaLM 8B</td><td>PaLM 540B</td><td>ST-MoE 32B</td><td>T5 11B</td><td>mT5 11B</td><td>LongT5 3B</td></tr><tr><td colspan="11">Data-To-Text</td></tr><tr><td>E2E (en)</td><td>37.7</td><td>46.6</td><td>7.1</td><td>46.6</td><td>52.9</td><td>52.3</td><td>51.5</td><td>52.9</td><td>52.2</td><td>53.1</td></tr><tr><td>WebNLG (en)</td><td>45.3</td><td>54.7</td><td>8.4</td><td>54.6</td><td>56.8</td><td>58.0</td><td>56.4</td><td>50.8</td><td>47.7</td><td>58.0</td></tr><tr><td>ToTTo (en)</td><td>40.2</td><td>50.7</td><td>5.6</td><td>51.9</td><td>65.8</td><td>67.5</td><td>67.0</td><td>66.1</td><td>65.5</td><td>66.3</td></tr><tr><td>Czech Restaurant (cs)</td><td>16.9</td><td>34.1</td><td>3.3</td><td>38.5</td><td>45.5</td><td>45.5</td><td>40.7</td><td>45.4</td><td>39.4</td><td>44.8</td></tr><tr><td>WebNLG (ru)</td><td>16.8</td><td>33.7</td><td>4.5</td><td>33.3</td><td>40.9</td><td>40.5</td><td>28.2</td><td>41.2</td><td>41.1</td><td>41.6</td></tr><tr><td colspan="11">English Generation</td></tr><tr><td>XSum (en)</td><td>19.9</td><td>28.6</td><td>10.0</td><td>34.0</td><td>31.4</td><td>36.5</td><td>38.3</td><td>36.5</td><td>33.2</td><td>36.0</td></tr><tr><td>XLSum (en)</td><td>16.8</td><td>22.7</td><td>8.4</td><td>27.9</td><td>34.6</td><td>44.3</td><td>45.4</td><td>43.1</td><td>41.8</td><td>42.6</td></tr><tr><td>WikiLingua (en)</td><td>6.5</td><td>6.4</td><td>5.9</td><td>7.7</td><td>8.0</td><td>7.5</td><td>7.8</td><td>7.9</td><td>7.9</td><td>7.8</td></tr><tr><td colspan="11">Crosslingual Generation</td></tr><tr><td>WikiLingua (es → en)</td><td>6.5</td><td>6.1</td><td>5.0</td><td>7.7</td><td>7.7</td><td>7.6</td><td>7.3</td><td>7.8</td><td>7.6</td><td>7.9</td></tr><tr><td>WikiLingua (ru → en)</td><td>10.2</td><td>17.5</td><td>0.7</td><td>18.9</td><td>29.9</td><td>35.7</td><td>25.1</td><td>27.9</td><td>31.7</td><td>30.8</td></tr><tr><td>WikiLingua (tr → en)</td><td>10.1</td><td>20.0</td><td>7.7</td><td>21.2</td><td>31.1</td><td>38.8</td><td>31.5</td><td>26.8</td><td>36.7</td><td>28.2</td></tr><tr><td>WikiLingua (vi → en)</td><td>7.7</td><td>14.5</td><td>2.2</td><td>16.2</td><td>28.9</td><td>32.9</td><td>22.9</td><td>22.7</td><td>31.0</td><td>28.5</td></tr><tr><td colspan="11">Multilingual Generation [SentencePiece-ROUGE-2]</td></tr><tr><td>MLSum (es)</td><td>12.8</td><td>14.3</td><td>5.2</td><td>13.0</td><td>23.0</td><td>24.5</td><td>25.0</td><td>24.3</td><td>25.7</td><td>25.6</td></tr><tr><td>MLSum (de)</td><td>13.6</td><td>21.3</td><td>3.9</td><td>22.6</td><td>35.2</td><td>41.4</td><td>44.1</td><td>43.5</td><td>43.3</td><td>43.7</td></tr><tr><td>XLSum (ar)</td><td>12.2</td><td>19.0</td><td>10.8</td><td>18.0</td><td>36.2</td><td>39.9</td><td>15.7</td><td>15.2</td><td>42.3</td><td>6.2</td></tr><tr><td>XLSum (bn)</td><td>5.8</td><td>6.9</td><td>6.1</td><td>11.7</td><td>26.4</td><td>31.1</td><td>11.1</td><td>10.2</td><td>36.5</td><td>11.0</td></tr><tr><td>XLSum (ja)</td><td>11.3</td><td>15.1</td><td>5.4</td><td>18.3</td><td>38.7</td><td>42.5</td><td>4.5</td><td>4.5</td><td>43.7</td><td>4.6</td></tr><tr><td>XLSum (id)</td><td>16.8</td><td>20.4</td><td>9.0</td><td>20.1</td><td>35.5</td><td>43.5</td><td>41.1</td><td>41.6</td><td>43.5</td><td>40.8</td></tr><tr><td>XLSum (sw)</td><td>16.7</td><td>24.5</td><td>11.5</td><td>15.4</td><td>32.7</td><td>36.4</td><td>37.0</td><td>37.4</td><td>40.7</td><td>36.3</td></tr><tr><td>XLSum (ko)</td><td>16.1</td><td>18.2</td><td>7.9</td><td>17.6</td><td>33.8</td><td>37.3</td><td>20.3</td><td>19.5</td><td>45.0</td><td>19.9</td></tr><tr><td>XLSum (ru)</td><td>12.6</td><td>16.1</td><td>10.8</td><td>19.1</td><td>30.3</td><td>38.3</td><td>18.1</td><td>17.8</td><td>38.6</td><td>17.7</td></tr><tr><td>XLSum (te)</td><td>6.5</td><td>7.7</td><td>6.2</td><td>13.1</td><td>20.5</td><td>30.0</td><td>15.1</td><td>15.1</td><td>33.5</td><td>14.8</td></tr><tr><td>XLSum (th)</td><td>6.7</td><td>8.6</td><td>5.2</td><td>13.3</td><td>23.4</td><td>29.5</td><td>13.5</td><td>13.7</td><td>34.3</td><td>13.1</td></tr><tr><td>XLSum (tr)</td><td>15.2</td><td>17.7</td><td>8.0</td><td>16.8</td><td>33.3</td><td>42.4</td><td>30.3</td><td>30.4</td><td>42.3</td><td>29.7</td></tr><tr><td>XLSum (es)</td><td>15.7</td><td>17.4</td><td>8.3</td><td>16.9</td><td>25.2</td><td>34.3</td><td>31.9</td><td>32.5</td><td>33.9</td><td>32.3</td></tr><tr><td>XLSum (vi)</td><td>13.2</td><td>14.9</td><td>6.9</td><td>15.4</td><td>25.9</td><td>41.5</td><td>27.7</td><td>27.3</td><td>41.0</td><td>26.7</td></tr><tr><td>XLSum (hi)</td><td>10.0</td><td>12.1</td><td>9.3</td><td>15.2</td><td>37.7</td><td>43.6</td><td>13.7</td><td>2.3</td><td>43.5</td><td>2.3</td></tr></table>
161
+
162
+ Table 2: ROUGE-L and SentencePiece-ROUGE-L results on data-to-text and compression datasets. Best results in bold. Few-shot results lag behind finetuned results and the gap increases as tasks become more complex. The non-English performance mostly follows the trend that higher percentages of non-English pretraining data leads to better performance. Despite their much smaller size, encoder-decoder model frequently much larger decoder-only models after finetuning.
163
+
164
+ and benchmarking PLMs during training or inference.
165
+
166
+ Comparable few-shot learning evaluation As mentioned in Section 3, our design choices were made to ensure that results are comparable across PLMs. Primarily, prompts were deliberately kept extremely simple and all few-shot exemplars were randomly sampled. While highly curated prompts or methods like chain-of-thought prompting can increase the performance considerably (Wei et al., 2022b), it can also lead to overfitting to the particular model the prompt was developed on, in turn making a comparison to other models unfair and producing unrealistic expectations when people have single interactions with it.
167
+
168
+ Overlap-based metrics are not calibrated to evaluate few-shot learning Few-shot generation suffers from not being able to predict output length properly given the few exemplars provided. While encoder-decoder models utilize end-of-string tokens, these are not always learned during decoder-only pretraining. To circumvent this issue, researchers rely on PLMs match to the few-shot format provided e.g. line-breaks that separate exemplars. We observed PLMs fail to follow the format a significant number of times, producing the largest allowed length on occasion. In our experiments, we tried to avoid very long outputs by trimming outputs to the 95-percentile length seen in the targets.10 Still, few-shot output lengths
169
+
170
+ are on average 2-3 times the average target length while finetuned model's output average $80\%$ the average target length, across all tasks. Overlap metrics used in generation are sensitive to length (Sun et al., 2019) making a natural disadvantage for few-shot learners. We do not recommend using overlap-based metrics to compare few-shot results without length normalization.
171
+
172
+ Computational costs can be decreased without sacrificing relative model performance The computational cost of evaluating large datasets, some with more than 10K examples, are prohibitive and perhaps unnecessary. To that end, we investigate if a model ranking can be produced, with a high degree of certainty, while only considering a random subset of the test set, saving compute cost to possibly evaluate on more tasks instead. To investigate this effect, we ran the following experiment: (1) Sample $n$ datapoints from a dataset and all corresponding model scores. (2) Following Kocmi et al. (2021) and Graham et al. (2014), we perform Wilcoxon Rank Sum test (Wilcoxon, 1946) to assess the stability of the ranking. (3) Repeat steps $1\& 2k$ times and record the fraction of runs in which models scores from any two models were not distinguishable from each other (those with a $p$ -value of $> 0.05$ ). Since we are considering 10 model settings in this work, this experiment considers all 45 possible pairs.
173
+
174
+ The result shown in Figure 2 provides insight into the required number of data points to produce rankings. For most datasets, we can produce stable model rankings with only 500 examples, some with as little as 100. Tasks where models achieve very similar scores tend to require more test examples, since smaller score differences require more examples to be distinguishable from each other (Wei and Jia, 2021).
175
+
176
+ Analyzing metrics utility We use different automated metrics to evaluate the generation quality of the models. These metrics attempt to capture the similarity between system generated output and the reference text. While ROUGE and chrF account for the lexical overlap, BLEURT is meant to compute the semantic similarity. It is important to understand the agreement between these metrics. We compute the system-level agreement via Spearman correlation coefficient (Spearman, 1987) between the scores given by the metrics to
177
+
178
+ ![](images/8f2b237a8ef5b7bd097f3bc5ce339fab0dc112c0e411c415dd944bde61c8bb93.jpg)
179
+ Figure 2: Empirical probability of p-value of Wilcoxon Rank Sum test $< 0.05$ for any combination between 1-shot and finetuned models.
180
+
181
+ ![](images/89f8671d6a34b783aa842569d1e69a77d75d6f8f0f872915f70681b71c491d3a.jpg)
182
+ Figure 3: Spearman correlation coefficients between metrics: (SP)ROUGE-L, BLEURT and $\mathrm{ChrF}$
183
+
184
+ the fine-tuned set of models. Figure 3 shows the correlation between ROUGE-L (RL), BLEURT and $\mathrm{ChrF}$ . We observe that the metrics are highly correlated for most datasets. Similar to Figure 2, on the tasks where the models have similar performance, we notice less correlation among the metrics. Such tasks are may have either saturated performance, e.g., ToTTo (en) or all models perform poorly, e.g., Wikilingua (es->en). Due to the small differences between models, metrics fail to produce the same rankings.
185
+
186
+ # 6 Discussion and Reality Check
187
+
188
+ In line with our goal to provide a "reality check" via empirical and theoretical research, and to reflect on the ways in which reported performance improvements are meaningful, we want to situate our findings in the context of the broader NLP community. Openly accessible APIs and publicly available large models have led to increased attention on large pretrained models, but they have also led to a "release-then-test" philosophy where models are released without extensive evaluations. While the findings we present in this paper do not
189
+
190
+ solve this issue, agreeing on a shared evaluation process could lead to more realistic claims about model performance (and shortcomings), and allow for a more accurate monitoring of models during training.
191
+
192
+ What claims can we not make? Empirical findings demonstrate that incorporating generation into NLU tasks via Chain-of-Thought leads to better model performance (Wei et al., 2022b; Suzgun et al., 2022). Providing additional grounding via finetuning on instructions and aligning a model to human feedback leads to better task-specific performance without supervision (Wei et al., 2022a; Ouyang et al., 2022a). However, we lack the scientific methods to quantify these advances. While benchmarks provide an indication whether a model is performing better than a previous iteration, and projects like BIG-bench (Srivastava et al., 2022) and HELM (Liang et al., 2022) enable evaluation on a very wide range of possible tasks, they are also inherently limited.
193
+
194
+ When benchmarking models in few-shot settings, especially models for which little information about their training data is available, it is hard to disambiguate model performance from memorization, i.e. if the examples were seen during pretraining. Instruction tuning further blur the line between finetuning and few-shot, which can lead to very different outputs and are not fully comparable. It is thus near impossible to make claims about why a model is succeeding at one particular task without having access to its training data.
195
+
196
+ As mentioned earlier, the target of this work is to derive best practices for comparing models in generation settings with constrained computational budgets, for example when monitoring a training model or when trying to compare on many different tasks. Our findings are grounded in much prior work that finds that metrics have a very high agreement with human judgments on the system-level (e.g., Kocmi et al., 2021), but are essentially meaningless on the segment-level. For that reason, we cannot derive claims beyond these rankings about utility of a model or whether a particular model would actually produce useful outputs for a task. To derive such insights, we point to work on extrinsic evaluation which requires comprehensive human evaluations (e.g., Lee et al., 2022).
197
+
198
+ How can our findings be applied to improve the status quo? Since the generation capabilities of
199
+
200
+ PLMs are currently not extensively monitored or evaluated, we set out to derive best practices for how these evaluations can look. We found that many of the "easy" tasks, on which finetuned models saturate the metrics, still yield insights for few-shot approaches. We further identified the tension between doing a computationally expensive full evaluation on a dataset and adding more evaluation sets for different tasks or languages. Our findings suggest that evaluation on small subsets of more tasks can be beneficial to the overall results.
201
+
202
+ To further motivate this suggestion, consider the following thought experiment: We have two tasks, A and B. At 500 examples, they have a risk of producing a "wrong" ranking of $10\%$ . At 1,000 examples, they have a risk of producing a wrong ranking of $5\%$ . These risks are not correlated, i.e., their covariance is 0. Given a computational budget of evaluating on 1,000 examples, the risk of only evaluating on one dataset is $5\%$ , and the risk of producing two wrong ratings after evaluating on A and B is only $1\%$ . While additional datasets introduce a larger risk of one individual dataset producing misleading results (18% in this case), one can easily expand this argument to a whole portfolio of tasks to hedge against individual dataset risk (Stuart and Markowitz, 1959). Many existing NLU benchmarks like BIG bench (Srivastava et al., 2022) already follow such a strategy and we believe that generation evaluation, especially considering the additional risk due to metrics, should follow this approach for the use cases discussed in this work. To further minimize the individual dataset risk, they can be switched out once they saturate or their sample sizes increased.
203
+
204
+ # 7 Conclusion
205
+
206
+ In this work, we produced an extensive evaluation of a diverse set of state-of-the-art pre-trained language models (PLMs) for 27 different multilingual generation tasks under few-shot learning and finetuning settings. We discuss empirical results that help inform practitioners which tasks, methods and metrics are suitable. We provide recommendations on how best to monitor conditional generation capabilities of PLMs, including how to fairly benchmark few-shot learning, automated metrics and their utility, and how to efficiently utilize computational resources. We hope that such findings and recommendations could positively influence natural language evaluation in future work.
207
+
208
+ # 8 Limitations
209
+
210
+ In this work, we have presented results that help inform us what tasks, methods and metrics are best suited for monitoring as well as methodologies and empirical information about the current set of models. We provide detailed information of how these results can be reproduced, to the extend that research have access to the PLMs in question, but these results have limitations, in order to reduce costs, many languages were not evaluated which might have left unforeseen patterns not discussed in this work. Moreover, few-shot learning, in particular, could exhibit large variance if different prompts were chosen, or a different set of exemplars chosen. Because of the high costs involved our work does not explore the performance difference when multiple sets of hyper-parameters were chosen.
211
+
212
+ On the conceptual level, we make the assumption that system-level improvements on our tasks translate to downstream usefulness. While prior work suggests that this is the case, tools like chatGPT have significantly expanded the possible application space beyond the realm of "typical" NLP tasks, and we don't know how well our findings generalize to this space of tasks.
213
+
214
+ # 9 Ethics Statement
215
+
216
+ This paper focuses on conditional generation tasks where models are free to generate long text sequences. Typical issues associated with text generation such as hallucinations, memorization of private information publicly available, toxic and discriminatory language, or sensitive generated content could and are likely to arise. measuring the extent to which these issues occur is a necessary and crucial additional dimension of model evaluation which we do not include in this work, which should be seen as supplemental.
217
+
218
+ # References
219
+
220
+ Farhad Akhbardeh, Arkady Arkhangorodsky, Magdalena Biesialska, Ondrej Bojar, Rajen Chatterjee, Vishrav Chaudhary, Marta R. Costa-jussa, Cristina Espana-Bonet, Angela Fan, Christian Federmann, Markus Freitag, Yvette Graham, Roman Grundkiewicz, Barry Haddow, Leonie Harter, Kenneth Heafield, Christopher Homan, Matthias Huck, Kwabena Amponsah-Kaakyire, Jungo Kasai, Daniel Khashabi, Kevin Knight, Tom Kocmi, Philipp Koehn,
221
+
222
+ Nicholas Lourie, Christof Monz, Makoto Morishita, Masaaki Nagata, Ajay Nagesh, Toshiaki Nakazawa, Matteo Negri, Santanu Pal, Allahsera Auguste Tapo, Marco Turchi, Valentin Vydrin, and Marcos Zampieri. 2021. Findings of the 2021 conference on machine translation (WMT21). In Proceedings of the Sixth Conference on Machine Translation, pages 1-88, Online. Association for Computational Linguistics.
223
+
224
+ 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, T. J. Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeff 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. ArXiv, abs/2005.14165.
225
+
226
+ Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, Parker Schuh, Kensen Shi, Sasha Tsvyashchenko, Joshua Maynez, Abhishek B Rao, Parker Barnes, Yi Tay, Noam M. Shazeer, Vinodkumar Prabhakaran, Emily Reif, Nan Du, Benton C. Hutchinson, Reiner Pope, James Bradbury, Jacob Austin, Michael Isard, Guy Gur-Ari, Pengcheng Yin, Toju Duke, Anselm Levskaya, Sanjay Ghemawat, Sunipa Dev, Henryk Michalewski, Xavier Garcia, Vedant Misra, Kevin Robinson, Liam Fedus, Denny Zhou, Daphne Ippolito, David Luan, Hyeontaek Lim, Barret Zoph, Alexander Spiridonov, Ryan Sepassi, David Dohan, Shivani Agrawal, Mark Omernick, Andrew M. Dai, Thanumalayan Sankaranarayana Pillai, Marie Pellat, Aitor Lewkowycz, Erica Moreira, Rewon Child, Oleksandr Polozov, Katherine Lee, Zongwei Zhou, Xuezhi Wang, Brennan Saeta, Mark Diaz, Orhan Firat, Michele Catasta, Jason Wei, Kathleen S. Meier-Hellstern, Douglas Eck, Jeff Dean, Slav Petrov, and Noah Fiedel. 2022. Palm: Scaling language modeling with pathways. ArXiv, abs/2204.02311.
227
+
228
+ Hyung Won Chung, Thibault Fevry, Henry Tsai, Melvin Johnson, and Sebastian Ruder. 2021. Rethinking embedding coupling in pre-trained language models. In International Conference on Learning Representations.
229
+
230
+ Jonathan H. Clark, Eunsol Choi, Michael Collins, Dan Garrette, Tom Kwiatkowski, Vitaly Nikolaev, and Jennimaria Palomaki. 2020. TyDi QA: A benchmark for information-seeking question answering in typologically diverse languages. Transactions of the Association for Computational Linguistics, 8:454-470.
231
+
232
+ Nan Du, Yanping Huang, Andrew M. Dai, Simon Tong, Dmitry Lepikhin, Yuanzhong Xu, Maxim Krikun, Yanqi Zhou, Adams Wei Yu, Orhan First, Barret Zoph, Liam Fedus, Maarten Bosma, Zongwei Zhou, Tao Wang, Yu Emma Wang, Kellie Webster,
233
+
234
+ Marie Pellat, Kevin Robinson, Kathleen S. Meier-Hellstern, Toju Duke, Lucas Dixon, Kun Zhang, Quoc V. Le, Yonghui Wu, Z. Chen, and Claire Cui. 2022. Glam: Efficient scaling of language models with mixture-of-experts. In International Conference on Machine Learning.
235
+
236
+ Ondrej Dusek and Filip Jurvc'ivcek. 2019. Neural generation for czech: Data and baselines.
237
+
238
+ Ondrej Dusek, David M Howcroft, and Verena Rieser. 2019. Semantic Noise Matters for Neural Natural Language Generation. In Proceedings of the 12th International Conference on Natural Language Generation (INLG 2019), pages 421-426, Tokyo, Japan.
239
+
240
+ Kawin Ethayarajh and Dan Jurafsky. 2020. Utility is in the eye of the user: A critique of NLP leaderboards. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4846-4853, Online. Association for Computational Linguistics.
241
+
242
+ Thiago Castro Ferreira, Claire Gardent, Nikolai Ilinykh, Chris van Der Lee, Simon Mille, Diego Moussallem, and Anastasia Shimorina. 2020. The 2020 Bilingual, Bi-Directional WebNLG+ Shared Task Overview and Evaluation Results (WebNLG+ 2020). In Proceedings of the 3rd International Workshop on Natural Language Generation from the Semantic Web (WebNLG+), Dublin/Virtual, Ireland.
243
+
244
+ Markus Freitag, George Foster, David Grangier, and Colin Cherry. 2020. Human-paraphrased references improve neural machine translation. In Proceedings of the Fifth Conference on Machine Translation, pages 1183-1192, Online. Association for Computational Linguistics.
245
+
246
+ 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. Association for Computational Linguistics.
247
+
248
+ Sebastian Gehrmann, Tosin Adewumi, Karmanya Aggarwal, Pawan Sasanka Ammanamanchi, Aremu Anuoluwapo, Antoine Bosselut, Khyathi Raghavi Chandu, Miruna Clinciu, Dipanjan Das, Kaustubh D. Dhole, Wanyu Du, Esin Durmus, Ondrej Dusek, Chris Emezue, Varun Gangal, Cristina Garbacea, Tatsunori Hashimoto, Yufang Hou, Yacine Jernite, Harsh Jhamtani, Yangfeng Ji, Shailza Jolly, Mihir Kale, Dhruv Kumar, Faisal Ladhak, Aman Madaan, Mounica Maddela, Khyati Mahajan, Saad Mahamood, Bodhisattwa Prasad Majumder, Pedro Henrique Martins, Angelina McMillan-Major, Simon Mille, Emiel van Miltenburg, Moin Nadeem, Shashi Narayan, Vitaly Nikolaev, Rubungo Andre Niyongabo, Salomey Osei, Ankur Parikh, Laura Perez-Beltrachini, Niranan Ramesh Rao, Vikas Raunak, Juan Diego Rodriguez, Sashank Santhanam, João Sedoc, Thibault Sellam, Samira Shaikh, Anastasia Shimorina, Marco
249
+
250
+ Antonio Sobrevilla Cabezudo, Hendrik Strobelt, Nishant Subramani, Wei Xu, Diyi Yang, Akhila Yerukola, and Jiawei Zhou. 2021. The gem benchmark: Natural language generation, its evaluation and metrics.
251
+
252
+ Sebastian Gehrmann, Abhik Bhattacharjee, Abinaya Mahendiran, Alex Wang, Alexandros Papangelis, Aman Madaan, Angelina McMillan-Major, Anna Shvets, Ashish Upadhyay, Bingsheng Yao, et al. 2022a. Gemv2: Multilingual nlg benchmarking in a single line of code. arXiv preprint arXiv:2206.11249.
253
+
254
+ Sebastian Gehrmann, Elizabeth Clark, and Thibault Sellam. 2022b. Repairing the cracked foundation: A survey of obstacles in evaluation practices for generated text. ArXiv, abs/2202.06935.
255
+
256
+ Tanya Goyal, Junyi Jessy Li, and Greg Durrett. 2022. News summarization and evaluation in the era of GPT-3. CoRR, abs/2209.12356.
257
+
258
+ Yvette Graham, Timothy Baldwin, Alistair Moffat, and Justin Zobel. 2014. Is machine translation getting better over time? In Proceedings of the 14th Conference of the European Chapter of the Association for Computational Linguistics, pages 443-451, Gothenburg, Sweden. Association for Computational Linguistics.
259
+
260
+ Mandy Guo, Joshua Ainslie, David C. Uthus, Santiago Otonanón, Jianmo Ni, Yun-Hsuan Sung, and Yinfei Yang. 2021. LongT5: Efficient text-to-text transformer for long sequences. CoRR, abs/2112.07916.
261
+
262
+ Tahmid Hasan, Abhik Bhattacharjee, Md. Saiful Islam, Kazi Mubasshir, Yuan-Fang Li, Yong-Bin Kang, M. Sohel Rahman, and Rifat Shahriyar. 2021. XLsum: Large-scale multilingual abstractive summarization for 44 languages. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 4693-4703, Online. Association for Computational Linguistics.
263
+
264
+ Tom Kocmi, Christian Federmann, Roman Grundkiewicz, Marcin Junczys-Dowmunt, Hitokazu Matsushita, and Arul Menezes. 2021. To ship or not to ship: An extensive evaluation of automatic metrics for machine translation. In Proceedings of the Sixth Conference on Machine Translation, pages 478-494, Online. Association for Computational Linguistics.
265
+
266
+ Taku Kudo and John Richardson. 2018. Sentence-Piece: A simple and language independent subword tokenizer and detokenizer 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.
267
+
268
+ Faisal Ladhak, Esin Durmus, Claire Cardie, and Kathleen McKeown. 2020. WikiLingua: A new benchmark dataset for cross-lingual abstractive summarization. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 4034–4048, Online. Association for Computational Linguistics.
269
+
270
+ Mina Lee, Megha Srivastava, Amelia Hardy, John Thickstun, Esin Durmus, Ashwin Paranjape, Ines Gerard-Ursin, Xiang Lisa Li, Faisal Ladhak, Frieda Rong, Rose E. Wang, Minae Kwon, Joon Sung Park, Hancheng Cao, Tony Lee, Rishi Bommasani, Michael S. Bernstein, and Percy Liang. 2022. Evaluating human-language model interaction. CoRR, abs/2212.09746.
271
+
272
+ Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020a. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Annual Meeting of the Association for Computational Linguistics.
273
+
274
+ Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020b. BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880, Online. Association for Computational Linguistics.
275
+
276
+ Percy Liang, Rishi Bommasani, Tony Lee, Dimitris Tsipras, Dilara Soylu, Michihiro Yasunaga, Yian Zhang, Deepak Narayanan, Yuhuai Wu, Ananya Kumar, Benjamin Newman, Binhang Yuan, Bobby Yan, Ce Zhang, Christian Cosgrove, Christopher D. Manning, Christopher R'e, Diana Acosta-Navas, Drew A. Hudson, E. Zelikman, Esin Durmus, Faisal Ladhak, Frieda Rong, Hongyu Ren, Huaxiu Yao, Jue Wang, Keshav Santhanam, Laurel J. Orr, Lucia Zheng, Mert Yuksekgonul, Mirac Suzgun, Nathan S. Kim, Neel Guha, Niladri S. Chatterji, O. Khattab, Peter Henderson, Qian Huang, Ryan Chi, Sang Michael Xie, Shibani Santurkar, Surya Ganguli, Tatsunori Hashimoto, Thomas F. Icard, Tianyi Zhang, Vishrav Chaudhary, William Wang, Xuechen Li, Yifan Mai, Yuhui Zhang, and Yuta Koreeda. 2022. Holistic evaluation of language models. ArXiv, abs/2211.09110.
277
+
278
+ 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.
279
+
280
+ Nitika Mathur, Johnny Wei, Markus Freitag, Qingsong Ma, and Ondrej Bojar. 2020. Results of the WMT20 metrics shared task. In Proceedings of the Fifth Conference on Machine Translation, pages 688-725, Online. Association for Computational Linguistics.
281
+
282
+ Simon Mille, Kaustubh D. Dhole, Saad Mahamood, Laura Perez-Beltrachini, Varun Gangal, Mihir Sanjay Kale, Emiel van Miltenburg, and Sebastian Gehrmann. 2021. Automatic construction of evaluation suites for natural language generation datasets. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS Datasets and Benchmarks 2021, December 2021, virtual.
283
+
284
+ 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.
285
+
286
+ Jekaterina Novikova, Ondrej Dusek, and Verena Rieser. 2017. The E2E dataset: New challenges for end-to-end generation. In Proceedings of the 18th Annual SIGdial Meeting on Discourse and Dialogue, pages 201-206, Saarbrücken, Germany. Association for Computational Linguistics.
287
+
288
+ Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F. Christiano, Jan Leike, and Ryan Lowe. 2022a. Training language models to follow instructions with human feedback. CoRR, abs/2203.02155.
289
+
290
+ Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke E. Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Francis Christiano, Jan Leike, and Ryan J. Lowe. 2022b. Training language models to follow instructions with human feedback. ArXiv, abs/2203.02155.
291
+
292
+ Ankur P. Parikh, Xuezhi Wang, Sebastian Gehrmann, Manaal Faruqui, Bhuwan Dhingra, Diyi Yang, and Dipanjan Das. 2020. Totto: A controlled table-to-text generation dataset. ArXiv, abs/2004.14373.
293
+
294
+ 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.
295
+
296
+ Amy Pu, Hyung Won Chung, Ankur Parikh, Sebastian Gehrmann, and Thibault Sellam. 2021. Learning compact metrics for MT. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 751-762, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
297
+
298
+ Jack W. Rae, Sebastian Borgeaud, Trevor Cai, Katie Millican, Jordan Hoffmann, Francis Song, John Aslanides, Sarah Henderson, Roman Ring, Susannah Young, Eliza Rutherford, Tom Hennigan, Jacob Menick, Albin Cassirer, Richard Powell, George van den Driessche, Lisa Anne Hendricks, Maribeth Rauh, Po-Sen Huang, Amelia Glaese, Johannes Welbl, Sumanth Dathathri, Saffron Huang, Jonathan Uesato, John F. J. Mellor, Irina Higgins, Antonia Creswell, Nathan McAleese, Amy Wu, Erich Elsen, Siddhant M. Jayakumar, Elena Buchatskaya, David Budden, Esme Sutherland, Karen Simonyan, Michela Paganini, L. Sifre, Lena Martens, Xiang Lorraine
299
+
300
+ Li, Adhiguna Kuncoro, Aida Nematzadeh, Elena Gribovskaya, Domenic Donato, Angeliki Lazaridou, Arthur Mensch, Jean-Baptiste Lespiau, Maria Tsimpoukelli, N. K. Grigorev, Doug Fritz, Thibault Sottiaux, Mantas Pajarskas, Tobias Pohlen, Zhitao Gong, Daniel Toyama, Cyprien de Masson d'Autume, Yujia Li, Tayfun Terzi, Vladimir Mikulik, Igor Babuschkin, Aidan Clark, Diego de Las Casas, Aurelia Guy, Chris Jones, James Bradbury, Matthew G. Johnson, Blake A. Hechtman, Laura Weidinger, Jason Gabriel, William S. Isaac, Edward Lockhart, Simon Osindero, Laura Rimell, Chris Dyer, Oriol Vinyals, Kareem W. Ayoub, Jeff Stanway, L. L. Bennett, Demis Hassabis, Koray Kavukcuoglu, and Geoffrey Irving. 2021. Scaling language models: Methods, analysis & insights from training gopher. ArXiv, abs/2112.11446.
301
+
302
+ Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020a. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
303
+
304
+ Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J Liu, et al. 2020b. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
305
+
306
+ Tven Le Scao, Angela Fan, Christopher Akiki, Ellie Pavlick, Suzana Ilic, Daniel Hesslow, Roman Castagné, Alexandra Sasha Luccioni, François Yvon, Matthias Galle, et al. 2022. Bloom: A 176b-parameter open-access multilingual language model. arXiv preprint arXiv:2211.05100.
307
+
308
+ Thomas Scialom, Paul-Alexis Dray, Sylvain Lamprier, Benjamin Piwowarski, and Jacopo Staiano. 2020. MLSUM: the multilingual summarization corpus. CoRR, abs/2004.14900.
309
+
310
+ Thibault Sellam, Dipanjan Das, and Ankur P. Parikh. 2020. Bleurt: Learning robust metrics for text generation. In Annual Meeting of the Association for Computational Linguistics.
311
+
312
+ C. Spearman. 1987. The proof and measurement of association between two things. by c. spearman, 1904. The American journal of psychology, 100 3-4:441-71.
313
+
314
+ Aarohi Srivastava, Abhinav Rastogi, Abhishek Rao, Abu Awal Md Shoeb, Abubakar Abid, Adam Fisch, Adam R. Brown, Adam Santoro, Aditya Gupta, Adrià Garriga-Alonso, Agnieszka Kluska, Aitor Lewkowycz, Akshat Agarwal, Alethea Power, Alex Ray, Alex Warstadt, Alexander W. Kocurek, Ali Safaya, Ali Tazarv, Alice Xiang, Alicia Parrish, Allen Nie, Aman Hussain, Amanda Askell, Amanda Dsouza, Ameet Rahane, Anantharaman S. Iyer, Anders Andreassen, Andrea Santilli, Andreas Stuhlmüller, Andrew M. Dai, Andrew La, Andrew K. Lampinen, Andy Zou, Angela Jiang, Angelica Chen, Anh Vuong, Animesh Gupta, Anna Gottardi, Antonio Norelli, Anu Venkatesh, Arash Gholamidavoodi, Arfa Tabassum
315
+
316
+ Arul Menezes, Arun Kirubarajan, Asher Mullokandov, Ashish Sabharwal, Austin Herrick, Avia Efrat, Aykut Erdem, Ayla Karakas, and et al. 2022. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models. CoRR, abs/2206.04615.
317
+
318
+ Alan L. Stuart and Harry M. Markowitz. 1959. Portfolio selection: Efficient diversification of investments. A Quarterly Journal of Operations Research, 10:253.
319
+
320
+ Simeng Sun, Ori Shapira, Ido Dagan, and Ani Nenkova. 2019. How to compare summarizers without target length? pitfalls, solutions and reexamination of the neural summarization literature. In Proceedings of the Workshop on Methods for Optimizing and Evaluating Neural Language Generation, pages 21-29, Minneapolis, Minnesota. Association for Computational Linguistics.
321
+
322
+ Mirac Suzgun, Nathan Scales, Nathanael Scharli, Sebastian Gehrmann, Yi Tay, Hyung Won Chung, Aakanksha Chowdhery, Quoc V. Le, Ed H. Chi, Denny Zhou, and Jason Wei. 2022. Challenging big-bench tasks and whether chain-of-thought can solve them. CoRR, abs/2210.09261.
323
+
324
+ Yi Tay, Mostafa Dehghani, Samira Abnar, Hyung Won Chung, William Fedus, Jinfeng Rao, Sharan Narang, Vinh Q Tran, Dani Yogatama, and Donald Metzler. 2022. Scaling laws vs model architectures: How does inductive bias influence scaling? arXiv preprint arXiv:2207.10551.
325
+
326
+ Romal Thoppilan, Daniel De Freitas, Jamie Hall, Noam M. Shazeer, Apoorv Kulshreshtha, HengTze Cheng, Alicia Jin, Taylor Bos, Leslie Baker, Yu Du, Yaguang Li, Hongrae Lee, Huaixiu Zheng, Amin Ghafouri, Marcelo Menegali, Yanping Huang, Maxim Krikun, Dmitry Lepikhin, James Qin, Dehao Chen, Yuanzhong Xu, Zhifeng Chen, Adam Roberts, Maarten Bosma, Yanqi Zhou, Chung-Ching Chang, I. A. Krivokon, Willard James Rusch, Marc Pickett, Kathleen S. Meier-Hellstern, Meredith Ringel Morris, Tulsee Doshi, Renelito Delos Santos, Toju Duke, Johnny Hartz Søraker, Ben Zevenbergen, Vinodkumar Prabhakaran, Mark Diaz, Ben Hutchinson, Kristen Olson, Alejandra Molina, Erin Hoffman-John, Josh Lee, Lora Aroyo, Ravindran Rajakumar, Alena Butryna, Matthew Lamm, V. O. Kuzmina, Joseph Fenton, Aaron Cohen, Rachel Bernstein, Ray Kurzweil, Blaise Aguera-Arcas, Claire Cui, Marian Croak, Ed Chi, and Quoc Le. 2022. Lamda: Language models for dialog applications. ArXiv, abs/2201.08239.
327
+
328
+ Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. 2019. Superglue: A stickier benchmark for general-purpose language understanding systems. ArXiv, abs/1905.00537.
329
+
330
+ Jason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V. Le. 2022a. Finetuned language models are zero-shot learners. In The Tenth International Conference on Learning Representations,
331
+
332
+ ICLR 2022, Virtual Event, April 25-29, 2022. OpenReview.net.
333
+ Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Ed Huai hsin Chi, Quoc Le, and Denny Zhou. 2022b. Chain of thought prompting elicits reasoning in large language models. ArXiv, abs/2201.11903.
334
+ Johnny Wei and Robin Jia. 2021. The statistical advantage of automatic NLG metrics at the system level. 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 6840-6854, Online. Association for Computational Linguistics.
335
+ Frank Wilcoxon. 1946. Individual comparisons of grouped data by ranking methods. Journal of economic entomology, 39(2):269-270.
336
+ Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, and Colin Raffel. 2021. mT5: A massively multilingual pre-trained text-to-text transformer. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 483-498, Online. Association for Computational Linguistics.
337
+ Barret Zoph, Irwan Bello, Sameer Kumar, Nan Du, Yanping Huang, Jeff Dean, Noam Shazeer, and William Fedus. 2022. St-moe: Designing stable and transferable sparse expert models.
338
+
339
+ # A Additional empirical results
340
+
341
+ Table 3, Table 4 and Table 5 report ROUGE-2 and BLEURT and ChrF results respectively for all tasks. These results are in line with the discussed results in 4
342
+
343
+ # B Technical details
344
+
345
+ Finetuning and inference was done in the t5x framework for public and closed access models. Few-shot learning task methodology is well described in 3, for public access models inference was done via their respective public API, whilst all other models were loaded from the standard checkpoint into TPU accelerators and inference was done on batches of 64. Finetuning was carried out in TPU accelerators, for PaLM we used a constant learning rate of $5 \times 10^{-5}$ , 20x smaller than during pretraining and reset the optimizer's (Adafactor) accumulators, for T5, mT5 and LongT5 we used a constant learning rate of $1 \times 10^{-4}$ .
346
+
347
+ # C Computational Cost and Environmental Impact
348
+
349
+ In our work we benchmark 27 generation tasks which require a substantial amount of computational resources. Inference on PLMs is exceedingly more efficient than finetuning. We report the number of test examples across all tasks to be 194,844. Inference over this number of examples times 10 models evaluated amounts to 2 million inference examples. Finetuning on the other hand, requires all parameters to be trained and training dataset sizes are considerably larger. We estimate the compute usage for finetuning to be 256 TPU v3 chips for 200 hours. One of the goals of this work is to encourage benchmarking in the future to avoid these costs by more efficiently selecting smaller test size and persuade researchers to only evaluate finetuning approaches when suitable.
350
+
351
+ ![](images/4ec699ea49b07c8a54ccf9a4ca0faeba4623e04126080d1c8552d903eca461eb.jpg)
352
+ Figure 4: Empirical probability of p-value of Wilcoxon Rank Sum test $< 0.05$ for any combination between 1-shot and finetuned models.
353
+
354
+ <table><tr><td rowspan="2">Task</td><td colspan="4">One shot</td><td colspan="6">Finetuning</td></tr><tr><td>PaLM 8B</td><td>PaLM 540B</td><td>LaMDA 137B</td><td>GPT-3.5 175B</td><td>PaLM 8B</td><td>PaLM 540B</td><td>ST-MoE 32B</td><td>T5 11B</td><td>mT5 11B</td><td>LongT5 3B</td></tr><tr><td colspan="11">Data-To-Text</td></tr><tr><td>E2E (en)</td><td>26.7</td><td>37.3</td><td>4.2</td><td>37.9</td><td>45.7</td><td>45.3</td><td>44.2</td><td>45.2</td><td>45.5</td><td>46.3</td></tr><tr><td>WebNLG (en)</td><td>33.8</td><td>45.8</td><td>5.4</td><td>46.0</td><td>47.7</td><td>49.2</td><td>47.6</td><td>39.6</td><td>35.8</td><td>48.8</td></tr><tr><td>ToTTo (en)</td><td>26.4</td><td>37.8</td><td>3.2</td><td>38.1</td><td>53.9</td><td>55.9</td><td>55.2</td><td>54.1</td><td>53.3</td><td>54.5</td></tr><tr><td>Czech Restaurant (cs)</td><td>7.9</td><td>18.1</td><td>0.9</td><td>22.3</td><td>30.2</td><td>30.6</td><td>25.4</td><td>28.8</td><td>25.0</td><td>29.9</td></tr><tr><td>WebNLG (ru)</td><td>4.9</td><td>16.5</td><td>1.2</td><td>16.8</td><td>22.4</td><td>23.4</td><td>13.0</td><td>23.1</td><td>23.2</td><td>24.2</td></tr><tr><td colspan="11">English Generation</td></tr><tr><td>XSum (en)</td><td>8.0</td><td>14.4</td><td>3.4</td><td>19.9</td><td>16.3</td><td>21.2</td><td>22.8</td><td>21.0</td><td>17.5</td><td>20.8</td></tr><tr><td>XLSum (en)</td><td>6.5</td><td>11.7</td><td>2.7</td><td>17.0</td><td>19.6</td><td>29.5</td><td>30.6</td><td>28.0</td><td>26.5</td><td>27.4</td></tr><tr><td>WikiLingua (en)</td><td>0.7</td><td>0.4</td><td>0.7</td><td>0.9</td><td>0.4</td><td>0.4</td><td>0.4</td><td>0.4</td><td>0.4</td><td>0.4</td></tr><tr><td colspan="11">Crosslingual Generation</td></tr><tr><td>WikiLingua (es → en)</td><td>0.7</td><td>0.5</td><td>0.4</td><td>0.6</td><td>0.4</td><td>0.4</td><td>0.3</td><td>0.4</td><td>0.4</td><td>0.4</td></tr><tr><td>WikiLingua (ru → en)</td><td>3.1</td><td>6.8</td><td>0.1</td><td>7.8</td><td>14.0</td><td>18.7</td><td>12.0</td><td>12.7</td><td>15.1</td><td>14.4</td></tr><tr><td>WikiLingua (tr → en)</td><td>3.1</td><td>8.7</td><td>2.1</td><td>10.1</td><td>16.6</td><td>23.0</td><td>17.7</td><td>13.8</td><td>20.8</td><td>14.3</td></tr><tr><td>WikiLingua (vi → en)</td><td>2.4</td><td>5.5</td><td>0.4</td><td>6.8</td><td>13.4</td><td>0.4</td><td>10.3</td><td>9.7</td><td>14.8</td><td>13.2</td></tr><tr><td colspan="11">Multilingual Generation [SentencePiece-ROUGE-2]</td></tr><tr><td>MLSum (es)</td><td>3.7</td><td>4.5</td><td>0.7</td><td>4.9</td><td>10.7</td><td>0.7</td><td>13.1</td><td>12.1</td><td>13.5</td><td>13.6</td></tr><tr><td>MLSum (de)</td><td>8.8</td><td>16.8</td><td>1.2</td><td>16.9</td><td>26.9</td><td>33.4</td><td>36.5</td><td>36.1</td><td>35.9</td><td>36.3</td></tr><tr><td>XLSum (ar)</td><td>4.5</td><td>11.7</td><td>2.4</td><td>9.6</td><td>25.8</td><td>30.0</td><td>1.9</td><td>2.0</td><td>32.1</td><td>0.6</td></tr><tr><td>XLSum (bn)</td><td>1.0</td><td>1.8</td><td>0.5</td><td>2.7</td><td>18.5</td><td>23.5</td><td>0.2</td><td>0.1</td><td>29.4</td><td>0.1</td></tr><tr><td>XLSum (ja)</td><td>4.0</td><td>6.7</td><td>0.3</td><td>9.6</td><td>27.1</td><td>31.8</td><td>0.1</td><td>0.1</td><td>31.5</td><td>0.1</td></tr><tr><td>XLSum (id)</td><td>7.2</td><td>11.3</td><td>3.7</td><td>12.6</td><td>25.0</td><td>33.0</td><td>30.5</td><td>30.7</td><td>32.7</td><td>30.3</td></tr><tr><td>XLSum (sw)</td><td>7.9</td><td>16.2</td><td>6.5</td><td>6.6</td><td>22.7</td><td>26.8</td><td>27.8</td><td>27.6</td><td>31.3</td><td>26.8</td></tr><tr><td>XLSum (ko)</td><td>6.9</td><td>9.6</td><td>1.6</td><td>9.4</td><td>23.0</td><td>26.7</td><td>4.1</td><td>3.7</td><td>34.9</td><td>4.0</td></tr><tr><td>XLSum (ru)</td><td>6.0</td><td>9.2</td><td>3.7</td><td>10.9</td><td>20.8</td><td>29.4</td><td>4.5</td><td>6.1</td><td>29.6</td><td>6.1</td></tr><tr><td>XLSum (te)</td><td>2.4</td><td>3.3</td><td>1.1</td><td>4.8</td><td>13.3</td><td>22.7</td><td>3.2</td><td>3.2</td><td>26.5</td><td>3.3</td></tr><tr><td>XLSum (th)</td><td>2.9</td><td>4.0</td><td>0.3</td><td>6.2</td><td>16.4</td><td>22.5</td><td>2.4</td><td>2.5</td><td>26.9</td><td>2.4</td></tr><tr><td>XLSum (tr)</td><td>7.5</td><td>10.5</td><td>3.2</td><td>10.7</td><td>23.7</td><td>32.7</td><td>17.6</td><td>17.8</td><td>32.2</td><td>17.7</td></tr><tr><td>XLSum (es)</td><td>5.8</td><td>9.0</td><td>3.1</td><td>9.6</td><td>14.2</td><td>23.7</td><td>20.1</td><td>20.6</td><td>23.0</td><td>20.6</td></tr><tr><td>XLSum (vi)</td><td>4.8</td><td>6.8</td><td>1.5</td><td>7.5</td><td>20.2</td><td>35.9</td><td>11.9</td><td>13.2</td><td>35.5</td><td>13.1</td></tr><tr><td>XLSum (hi)</td><td>4.4</td><td>6.4</td><td>1.8</td><td>7.0</td><td>29.0</td><td>35.7</td><td>1.8</td><td>0.0</td><td>35.4</td><td>0.0</td></tr></table>
355
+
356
+ Table 3: ROUGE-2 and SentencePiece-ROUGE-2 results in data-to-text, English and multilingual generation datasets.
357
+
358
+ <table><tr><td rowspan="2">Task</td><td colspan="4">One shot</td><td colspan="6">Finetuning</td></tr><tr><td>PaLM 8B</td><td>PaLM 540B</td><td>LaMDA 137B</td><td>GPT-3.5 175B</td><td>PaLM 8B</td><td>PaLM 540B</td><td>ST-MoE 32B</td><td>T5 11B</td><td>mT5 11B</td><td>LongT5 3B</td></tr><tr><td colspan="11">Data-To-Text</td></tr><tr><td>E2E (en)</td><td>46.1</td><td>57.8</td><td>15.1</td><td>57.8</td><td>62.5</td><td>61.9</td><td>61.1</td><td>62.1</td><td>60.9</td><td>61.8</td></tr><tr><td>WebNLG (en)</td><td>47.5</td><td>61.8</td><td>17.0</td><td>61.8</td><td>63.6</td><td>65.2</td><td>64.1</td><td>59.4</td><td>55.8</td><td>65.4</td></tr><tr><td>ToTTo (en)</td><td>43.5</td><td>55.8</td><td>12.6</td><td>55.2</td><td>67.5</td><td>69.4</td><td>68.3</td><td>67.3</td><td>66.8</td><td>67.7</td></tr><tr><td>Czech Restaurant (cs)</td><td>17.6</td><td>35.6</td><td>7.9</td><td>41.5</td><td>48.0</td><td>48.1</td><td>36.6</td><td>38.2</td><td>44.1</td><td>40.1</td></tr><tr><td>WebNLG (ru)</td><td>21.8</td><td>45.5</td><td>15.3</td><td>45.3</td><td>62.7</td><td>62.6</td><td>24.4</td><td>31.8</td><td>63.5</td><td>32.1</td></tr><tr><td colspan="11">English Generation</td></tr><tr><td>XSum (en)</td><td>24.6</td><td>32.7</td><td>18.5</td><td>37.6</td><td>34.4</td><td>38.9</td><td>41.3</td><td>39.3</td><td>36.8</td><td>39.0</td></tr><tr><td>XLSum (en)</td><td>23.8</td><td>29.9</td><td>13.9</td><td>33.5</td><td>35.8</td><td>45.8</td><td>47.0</td><td>46.0</td><td>43.9</td><td>44.4</td></tr><tr><td>WikiLingua (en)</td><td>14.7</td><td>14.3</td><td>15.4</td><td>15.8</td><td>15.1</td><td>14.6</td><td>15.2</td><td>15.8</td><td>15.8</td><td>15.3</td></tr><tr><td colspan="11">Crosslingual Generation</td></tr><tr><td>WikiLingua (es → en)</td><td>16.8</td><td>13.2</td><td>10.2</td><td>14.6</td><td>14.2</td><td>14.9</td><td>13.0</td><td>15.1</td><td>14.8</td><td>15.7</td></tr><tr><td>WikiLingua (ru → en)</td><td>19.1</td><td>21.5</td><td>1.5</td><td>22.5</td><td>30.6</td><td>35.9</td><td>24.0</td><td>28.8</td><td>34.3</td><td>33.3</td></tr><tr><td>WikiLingua (tr → en)</td><td>19.3</td><td>24.6</td><td>12.3</td><td>26.7</td><td>34.4</td><td>39.4</td><td>32.6</td><td>30.8</td><td>39.0</td><td>32.7</td></tr><tr><td>WikiLingua (vi → en)</td><td>16.4</td><td>19.9</td><td>4.4</td><td>21.3</td><td>31.8</td><td>14.2</td><td>23.2</td><td>27.6</td><td>32.3</td><td>32.5</td></tr><tr><td colspan="11">Multilingual Generation</td></tr><tr><td>MLSum (es)</td><td>21.3</td><td>22.9</td><td>5.3</td><td>20.6</td><td>28.0</td><td>18.4</td><td>29.1</td><td>28.7</td><td>30.7</td><td>30.3</td></tr><tr><td>MLSum (de)</td><td>28.9</td><td>37.0</td><td>5.7</td><td>34.4</td><td>41.9</td><td>48.8</td><td>50.9</td><td>50.5</td><td>50.1</td><td>51.5</td></tr><tr><td>XLSum (ar)</td><td>14.2</td><td>22.7</td><td>11.4</td><td>24.4</td><td>35.0</td><td>39.6</td><td>0.2</td><td>0.2</td><td>41.6</td><td>0.1</td></tr><tr><td>XLSum (bn)</td><td>10.3</td><td>12.7</td><td>4.5</td><td>17.5</td><td>28.6</td><td>34.0</td><td>0.0</td><td>0.0</td><td>37.8</td><td>0.0</td></tr><tr><td>XLSum (ja)</td><td>8.8</td><td>11.6</td><td>1.2</td><td>13.8</td><td>26.0</td><td>31.3</td><td>0.8</td><td>0.9</td><td>30.6</td><td>0.9</td></tr><tr><td>XLSum (id)</td><td>21.0</td><td>26.0</td><td>9.0</td><td>26.2</td><td>36.8</td><td>45.3</td><td>43.2</td><td>42.3</td><td>43.0</td><td>43.4</td></tr><tr><td>XLSum (sw)</td><td>24.0</td><td>33.0</td><td>15.0</td><td>21.5</td><td>36.2</td><td>42.0</td><td>40.1</td><td>41.1</td><td>44.4</td><td>41.6</td></tr><tr><td>XLSum (ko)</td><td>6.9</td><td>9.4</td><td>1.6</td><td>10.0</td><td>18.0</td><td>21.8</td><td>1.4</td><td>1.2</td><td>27.5</td><td>1.4</td></tr><tr><td>XLSum (ru)</td><td>15.0</td><td>19.8</td><td>9.4</td><td>26.5</td><td>29.1</td><td>38.6</td><td>14.4</td><td>20.1</td><td>40.3</td><td>19.9</td></tr><tr><td>XLSum (te)</td><td>11.3</td><td>13.6</td><td>4.7</td><td>16.8</td><td>18.0</td><td>29.8</td><td>0.3</td><td>0.2</td><td>30.4</td><td>0.3</td></tr><tr><td>XLSum (th)</td><td>14.7</td><td>16.8</td><td>4.4</td><td>21.5</td><td>27.1</td><td>33.4</td><td>0.3</td><td>0.3</td><td>33.9</td><td>0.3</td></tr><tr><td>XLSum (tr)</td><td>20.3</td><td>24.9</td><td>6.2</td><td>24.5</td><td>32.7</td><td>43.1</td><td>31.2</td><td>33.1</td><td>42.6</td><td>33.8</td></tr><tr><td>XLSum (es)</td><td>19.0</td><td>22.9</td><td>7.3</td><td>22.0</td><td>24.5</td><td>33.4</td><td>31.5</td><td>31.9</td><td>32.6</td><td>32.8</td></tr><tr><td>XLSum (vi)</td><td>10.9</td><td>13.1</td><td>2.4</td><td>14.2</td><td>21.8</td><td>37.1</td><td>16.9</td><td>20.2</td><td>34.3</td><td>21.1</td></tr><tr><td>XLSum (hi)</td><td>12.2</td><td>15.1</td><td>6.6</td><td>18.8</td><td>33.2</td><td>39.6</td><td>0.2</td><td>0.0</td><td>39.1</td><td>0.0</td></tr></table>
359
+
360
+ Table 4: ChrF results in data-to-text, English and multilingual generation datasets.
361
+
362
+ <table><tr><td rowspan="2">Task</td><td colspan="4">One shot</td><td colspan="6">Finetuning</td></tr><tr><td>PaLM 8B</td><td>PaLM 540B</td><td>LaMDA 137B</td><td>GPT-3.5 175B</td><td>PaLM 8B</td><td>PaLM 540B</td><td>ST-MoE 32B</td><td>T5 11B</td><td>mT5 11B</td><td>LongT5 3B</td></tr><tr><td colspan="11">Data-To-Text</td></tr><tr><td>E2E (en)</td><td>60.0</td><td>71.8</td><td>44.2</td><td>72.3</td><td>76.5</td><td>75.8</td><td>75.1</td><td>76.4</td><td>75.9</td><td>76.2</td></tr><tr><td>WebNLG (en)</td><td>62.3</td><td>74.5</td><td>43.5</td><td>74.7</td><td>75.8</td><td>76.8</td><td>75.6</td><td>71.2</td><td>67.8</td><td>76.3</td></tr><tr><td>ToTTo (en)</td><td>56.9</td><td>69.4</td><td>33.1</td><td>69.5</td><td>76.8</td><td>77.9</td><td>77.0</td><td>76.6</td><td>76.8</td><td>76.7</td></tr><tr><td>Czech Restaurant (cs)</td><td>34.7</td><td>66.8</td><td>32.2</td><td>72.2</td><td>75.8</td><td>74.4</td><td>48.8</td><td>51.8</td><td>72.9</td><td>48.8</td></tr><tr><td>WebNLG (ru)</td><td>39.2</td><td>67.8</td><td>19.7</td><td>66.9</td><td>77.5</td><td>78.0</td><td>25.9</td><td>29.8</td><td>78.4</td><td>29.9</td></tr><tr><td colspan="11">English Generation</td></tr><tr><td>XSum (en)</td><td>43.0</td><td>46.9</td><td>28.2</td><td>53.4</td><td>51.0</td><td>55.5</td><td>58.5</td><td>56.4</td><td>53.2</td><td>56.4</td></tr><tr><td>XLSum (en)</td><td>32.7</td><td>41.1</td><td>22.0</td><td>51.1</td><td>52.6</td><td>61.9</td><td>63.0</td><td>61.8</td><td>60.3</td><td>60.8</td></tr><tr><td>WikiLingua (en)</td><td>33.3</td><td>34.0</td><td>27.9</td><td>34.3</td><td>32.2</td><td>32.2</td><td>31.3</td><td>32.4</td><td>32.6</td><td>32.1</td></tr><tr><td colspan="11">Crosslingual Generation</td></tr><tr><td>WikiLingua (es → en)</td><td>32.9</td><td>33.7</td><td>16.8</td><td>33.4</td><td>32.3</td><td>32.6</td><td>31.0</td><td>32.5</td><td>33.0</td><td>32.5</td></tr><tr><td>WikiLingua (ru → en)</td><td>38.8</td><td>43.3</td><td>6.4</td><td>45.9</td><td>50.6</td><td>54.4</td><td>46.4</td><td>49.1</td><td>52.3</td><td>51.5</td></tr><tr><td>WikiLingua (tr → en)</td><td>39.3</td><td>44.0</td><td>19.3</td><td>46.4</td><td>49.2</td><td>54.4</td><td>48.6</td><td>45.4</td><td>52.8</td><td>46.8</td></tr><tr><td>WikiLingua (vi → en)</td><td>35.6</td><td>38.2</td><td>5.7</td><td>40.8</td><td>50.6</td><td>32.8</td><td>45.4</td><td>45.5</td><td>51.4</td><td>50.0</td></tr><tr><td colspan="11">Multilingual Generation</td></tr><tr><td>MLSum (es)</td><td>21.0</td><td>21.5</td><td>-1.3</td><td>26.7</td><td>30.6</td><td>6.3</td><td>25.9</td><td>24.2</td><td>32.0</td><td>27.0</td></tr><tr><td>MLSum (de)</td><td>39.4</td><td>50.1</td><td>4.6</td><td>49.3</td><td>57.8</td><td>63.4</td><td>62.5</td><td>61.6</td><td>61.5</td><td>61.4</td></tr><tr><td>XLSum (ar)</td><td>19.8</td><td>28.5</td><td>2.5</td><td>27.7</td><td>44.6</td><td>50.1</td><td>2.8</td><td>3.5</td><td>53.0</td><td>4.3</td></tr><tr><td>XLSum (bn)</td><td>31.8</td><td>41.8</td><td>0.2</td><td>27.4</td><td>46.6</td><td>57.1</td><td>2.9</td><td>3.6</td><td>62.7</td><td>2.8</td></tr><tr><td>XLSum (ja)</td><td>28.1</td><td>31.4</td><td>-1.2</td><td>34.7</td><td>47.0</td><td>52.2</td><td>-0.3</td><td>-0.3</td><td>53.0</td><td>-0.3</td></tr><tr><td>XLSum (id)</td><td>41.2</td><td>47.4</td><td>9.5</td><td>53.8</td><td>58.7</td><td>68.0</td><td>61.4</td><td>65.5</td><td>66.8</td><td>65.6</td></tr><tr><td>XLSum (sw)</td><td>25.5</td><td>36.3</td><td>14.3</td><td>24.0</td><td>45.8</td><td>52.9</td><td>48.6</td><td>50.2</td><td>59.1</td><td>48.9</td></tr><tr><td>XLSum (ko)</td><td>25.6</td><td>31.6</td><td>-0.3</td><td>33.0</td><td>40.5</td><td>47.1</td><td>0.8</td><td>1.6</td><td>54.6</td><td>1.4</td></tr><tr><td>XLSum (ru)</td><td>30.1</td><td>37.3</td><td>3.2</td><td>33.0</td><td>47.9</td><td>59.6</td><td>14.2</td><td>16.7</td><td>58.0</td><td>17.0</td></tr><tr><td>XLSum (te)</td><td>29.6</td><td>35.0</td><td>6.5</td><td>22.7</td><td>32.0</td><td>49.1</td><td>10.9</td><td>11.5</td><td>51.6</td><td>12.4</td></tr><tr><td>XLSum (th)</td><td>22.0</td><td>27.2</td><td>-0.1</td><td>16.3</td><td>31.9</td><td>43.6</td><td>-1.1</td><td>-0.9</td><td>46.0</td><td>-1.1</td></tr><tr><td>XLSum (tr)</td><td>30.8</td><td>34.5</td><td>3.3</td><td>40.0</td><td>49.8</td><td>63.8</td><td>21.4</td><td>26.4</td><td>62.5</td><td>26.3</td></tr><tr><td>XLSum (es)</td><td>21.2</td><td>26.3</td><td>0.0</td><td>30.6</td><td>31.5</td><td>46.2</td><td>33.3</td><td>36.1</td><td>45.2</td><td>35.7</td></tr><tr><td>XLSum (vi)</td><td>14.5</td><td>14.5</td><td>-1.6</td><td>16.4</td><td>24.7</td><td>46.5</td><td>-4.0</td><td>-4.6</td><td>45.0</td><td>-4.5</td></tr><tr><td>XLSum (hi)</td><td>33.9</td><td>40.4</td><td>7.0</td><td>33.7</td><td>50.7</td><td>57.5</td><td>5.7</td><td>4.6</td><td>57.3</td><td>4.6</td></tr></table>
363
+
364
+ Table 5: BLEURT results in data-to-text, English and multilingual generation datasets.
365
+
366
+ # A For every submission:
367
+
368
+ A1. Did you describe the limitations of your work?
369
+
370
+ We added a section on Limitations.
371
+
372
+ A2. Did you discuss any potential risks of your work?
373
+
374
+ We discuss in the ethics section the risks of autoregressive text generation, in particular how it can produce misinformation or sensitive data.
375
+
376
+ A3. Do the abstract and introduction summarize the paper's main claims?
377
+
378
+ The introduction summarizes the paper's main claims.
379
+
380
+ A4. Have you used AI writing assistants when working on this paper?
381
+
382
+ Left blank.
383
+
384
+ # B Did you use or create scientific artifacts?
385
+
386
+ We used artifacts throughout
387
+
388
+ B1. Did you cite the creators of artifacts you used?
389
+
390
+ We used generation datasets found through the GEM benchmark (gem-benchmark.com). We cite the researchers that released these data in section 3.1.
391
+
392
+ B2. Did you discuss the license or terms for use and / or distribution of any artifacts?
393
+
394
+ Licenses: MLSum (Scialom et al., 2020) - MIT License https://github.com/ThomasScialom/MLSUM/blob/master/LICE
395
+
396
+ WikiLingua(Ladhak et al., 2020) - cc-by-3.0 https://gem-benchmark.com/data Cards/wiki_lingua
397
+
398
+ XSum(Narayan et al., 2018) - cc-by-sa-4.0 https://gem-benchmark.com/data Cards/xsum
399
+
400
+ Clean E2ENLG(Novikova et al., 2017; Duseket al., 2019)-cc-by-sa-4.0 https://gem-benchmark.com/data Cards/e2e_
401
+
402
+ Czech Restaurants (Dusek and Jurvcivcek, 2019) - cc-by-sa-4.0https://gem-benchmark.com/data Cards/cs/restaurants
403
+
404
+ WebNLG 2020(Gardent et al., 2017; Ferreira et al., 2020) - cc-by-nc-4.0 https://gem-benchmark.com/data Cards/web_
405
+
406
+ ToTTo(Parikh et al., 2020) - cc-by-sa-3.0 https://gem-benchmark.com/data Cards/totto
407
+
408
+ XL-Sum(Hasan et al., 2021) - cc-by-nc-sa-4.0 https://gem-benchmark.com/data Cards/xlsum
409
+
410
+ B3. Did you discuss if your use of existing artifact(s) was consistent with their intended use, provided that it was specified? For the artifacts you create, do you specify intended use and whether that is compatible with the original access conditions (in particular, derivatives of data accessed for research purposes should not be used outside of research contexts)?
411
+
412
+ All the data mentioned above has intended research purposes which is consistent with this work's use. We mention this in the paper
413
+
414
+ B4. Did you discuss the steps taken to check whether the data that was collected / used contains any information that names or uniquely identifies individual people or offensive content, and the steps taken to protect / anonymize it?
415
+
416
+ No data was collected. The data has been revised outside this work by community efforts such as GEM.
417
+
418
+ B5. Did you provide documentation of the artifacts, e.g., coverage of domains, languages, and linguistic phenomena, demographic groups represented, etc.?
419
+
420
+ We provided information on the languages covered by each dataset in Table 1, as well as the publicly available information on model's pretraining data language distribution.
421
+
422
+ B6. Did you report relevant statistics like the number of examples, details of train / test / dev splits, etc. for the data that you used / created? Even for commonly-used benchmark datasets, include the number of examples in train / validation / test splits, as these provide necessary context for a reader to understand experimental results. For example, small differences in accuracy on large test sets may be significant, while on small test sets they may not be.
423
+
424
+ We provided information on the statistic of the datasets used in Table 1,
425
+
426
+ # C Did you run computational experiments?
427
+
428
+ Section 4 and 5
429
+
430
+ C1. Did you report the number of parameters in the models used, the total computational budget (e.g., GPU hours), and computing infrastructure used?
431
+
432
+ Number of parameters per model is reported in section 3.2. Computing infrastructure is mentioned in the appendix B. The total computational budget is discussed in its own section.
433
+
434
+ C2. Did you discuss the experimental setup, including hyperparameter search and best-found hyperparameter values?
435
+
436
+ Hyper parameter selection is discussed in appendix B. Experimental setup is discussed in the methodology section.
437
+
438
+ C3. Did you report descriptive statistics about your results (e.g., error bars around results, summary statistics from sets of experiments), and is it transparent whether you are reporting the max, mean, etc. or just a single run?
439
+
440
+ Most of the contributions for this paper are statistics of empirical results and method to obtain them.
441
+
442
+ C4. If you used existing packages (e.g., for preprocessing, for normalization, or for evaluation), did you report the implementation, model, and parameter settings used (e.g., NLTK, Spacy, ROUGE, etc.)?
443
+
444
+ We provide this information in the main text, in footnotes.
445
+
446
+ # D Did you use human annotators (e.g., crowdworkers) or research with human participants?
447
+
448
+ Left blank.
449
+
450
+ D1. Did you report the full text of instructions given to participants, including e.g., screenshots, disclaimers of any risks to participants or annotators, etc.?
451
+
452
+ No response.
453
+
454
+ D2. Did you report information about how you recruited (e.g., crowdsourcing platform, students) and paid participants, and discuss if such payment is adequate given the participants' demographic (e.g., country of residence)?
455
+
456
+ No response.
457
+
458
+ D3. Did you discuss whether and how consent was obtained from people whose data you're using/curating? For example, if you collected data via crowdsourcing, did your instructions to crowdworkers explain how the data would be used?
459
+
460
+ No response.
461
+
462
+ D4. Was the data collection protocol approved (or determined exempt) by an ethics review board?
463
+
464
+ No response.
465
+
466
+ D5. Did you report the basic demographic and geographic characteristics of the annotator population that is the source of the data?
467
+
468
+ No response.
benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8097affc866bdf7f7b3fa81fb5c40837db92596c083a990a2d81282033e815bf
3
+ size 1056041
benchmarkinglargelanguagemodelcapabilitiesforconditionalgeneration/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3db6fcf93823f96fc08626da4193b1c187acdd96259a92a31a4466e04722606
3
+ size 443073
bestksearchalgorithmforneuraltextgeneration/5992ef9a-2935-4c81-82c0-b4b09f3db1cf_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0bc98783a7f0dc984b553605c67ea3a48a1a7203d8874e26c42056a0b2e76a59
3
+ size 130685
bestksearchalgorithmforneuraltextgeneration/5992ef9a-2935-4c81-82c0-b4b09f3db1cf_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fab1cc4bd1cc5fe6184ce9d646d4bb78a6f77cd6745670bb836134343146cc25
3
+ size 157911
bestksearchalgorithmforneuraltextgeneration/5992ef9a-2935-4c81-82c0-b4b09f3db1cf_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79301b864c5d4deeecc53614e7365d7a334cd05d111e1071cf611bede82db9c8
3
+ size 1354576
bestksearchalgorithmforneuraltextgeneration/full.md ADDED
@@ -0,0 +1,527 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Best- $k$ Search Algorithm for Neural Text Generation
2
+
3
+ Jiacheng Xu Caiming Xiong Silvio Savarese Yingbo Zhou Salesforce AI Research
4
+
5
+ {jiacheng.xu, cxiong, ssavarese, yingbo.zhou}@salesforce.com
6
+
7
+ # Abstract
8
+
9
+ Modern natural language generation paradigms require a decoding strategy to obtain quality sequences out of the model. Beam search yields high-quality but low diversity outputs; stochastic approaches suffer from high variance and sometimes low quality. In this work, we propose a deterministic search algorithm balancing both quality and diversity. We first investigate the vanilla best-first search (BFS) algorithm and then propose the best- $k$ search algorithm. Inspired by BFS, we greedily expand the top $k$ nodes, instead of the first node, to boost efficiency and diversity. Upweighting recently discovered nodes accompanied by heap pruning ensures the completeness of the search procedure. Experiments on four NLG tasks show that best- $k$ search yields more diverse and natural outputs compared to strong baselines, while our approach maintains high text quality. The proposed algorithm is parameter-free, lightweight, efficient, and easy-to-use. $^{1}$
10
+
11
+ # 1 Introduction
12
+
13
+ Large-scale pre-trained language models (Devlin et al. (2019); Raffel et al. (2020); Brown et al. (2020); Nijkamp et al. (2022), inter alia) has significantly advanced the field of natural language generation. Despite the models' increasing capability in fluency, expressiveness and domain generalization, the generated outputs from these models are far from perfect (Gehman et al., 2020; Kryscinski et al., 2020; Fabbri et al., 2021). The decoding strategy is another crucial piece in this paradigm. If we form text generation as a search problem, decoding strategies are essentially search algorithms over the space composed by vocabulary $\mathcal{V}$ . Beam search, a heuristic search algorithm, has been the go-to choice for many years. However, the generated sequences are usually repetitive because many diverse hypotheses are pruned at earlier stage of
14
+
15
+ ![](images/3e59e10e88c100c0007efe0073839a97f7b300a00e0801341da23da53325f437.jpg)
16
+ Figure 1: Generated text diversity and quality, measured by Distinctness-1(↑) and ROUGE-1(↑), on question generation. The dataset used is QuoRef and the model applied is MixQG. Our approach, best- $k$ search with two configurations, beats baseline methods including beam search variations, sampling and BS+Sample methods on diversity and quality; see Sec. 4.4 for details.
17
+
18
+ search (Eikema and Aziz, 2020). Sampling-based approaches (Fan et al., 2018; Holtzman et al., 2020) can indeed generate more diverse sequences, but they are hard to control due to their stochastic nature. Sometimes outputs are duplicate; sometimes a sampling choice breaks the whole sequence.
19
+
20
+ We are looking for a decoding algorithm with high flexibility and controllability while it could also yield diverse outputs for certain use cases. We find that best-first search (BFS) algorithm satisfies these properties. First, it is a reproducible and deterministic algorithm. More importantly, since it theoretically does not prune hypotheses, it preserves a more diverse set of options and allows simultaneous expansion of hypotheses with different lengths. Despite these intriguing features, we identified two challenges, efficiency and completeness, of directly applying it to text generation.
21
+
22
+ In this work, we propose the best- $k$ search for diverse and high-quality text generation. Our approach re-invents BFS with a few design changes to overcome the issues mentioned before. Parallel exploration is designed to explore the top $k$ nodes from the search frontier each time instead of one
23
+
24
+ in BFS. We also add a temporal decay mechanism to the algorithm to encourage search completions. A simple yet effective stateless scoring function as an alternative to more complicated length-adjusted counterparts is devised, and we show that it works well and helps further in finding diverse texts.
25
+
26
+ To verify the proposed algorithm, we conduct comprehensive experiments on four tasks, question generation, commonsense generation, text summarization and machine translation. Our results show that the proposed algorithm works well with a wide range of models on six datasets. Our approach yields high-fidelity, diverse and natural outputs while maintaining quality. Our contributions are (1) investigation of best-first search for text generation; (2) proposing an efficient, simple, and deterministic decoding algorithm, best- $k$ search; (3) comprehensive experiments and strong results on six datasets with ablation study and analysis; (4) The algorithm is lightweight, easy-to-use, and compatible with any LLM. It is also orthogonal to many decoding techniques like sampling or rollout.
27
+
28
+ # 2 Revisiting Best-First Search
29
+
30
+ In this section, we will introduce the vanilla best-first search in the context of natural language generation as a decoding algorithm, and cover the first Research Question: Is BFS adequate in searching hypotheses in text generation?
31
+
32
+ Setup Text generation can be formulated as a sequence generation process given input $\mathbf{x}$ and a probabilistic language model $^2$ parameterized by $\theta$ .
33
+
34
+ $$
35
+ p _ {\theta} (\mathbf {y} | \mathbf {x}; \theta) = \prod_ {t = 1} ^ {T} p _ {\theta} (y _ {t} | \mathbf {y} _ {< t}, \mathbf {x})
36
+ $$
37
+
38
+ Traditionally, maximum a posteriori (MAP) decoding strategy is deployed to elicit highest-scoring output sequences $\arg \max_{\mathbf{y}^*} p_\theta(\mathbf{y}^*|\mathbf{x})$ . Most previous work uses the log-likelihood of the sequence as the proxy for assessing the (partial) sequence quality. However, recent studies found discrepancies between model likelihood and quality assessed by humans (Stahlberg and Byrne, 2019; Holtzman et al., 2020; Eikema and Aziz, 2020; Zhang et al., 2021). Various approaches including length normalization (Wu et al., 2016), quality-aware decoding (Fernandes et al., 2022), and regularized decoding (Meister et al., 2020a) have attempted to
39
+
40
+ modify the objective to mitigate the gap. In this work, we adopt $h(\cdot)$ as the scoring function, and $h(\mathbf{y_1\dots t})$ is the score of a hypothesis $\mathbf{y_1\dots t}$ .
41
+
42
+ Graph Notation We frame the derivation of sequences as the expansion of a directed search graph, where BOS is the root node and EOS nodes are the leaf nodes. Any node $n$ , except the root node, has exactly one parent node. The score of each node $n$ is defined as the score of the hypothesis starting with BOS and ending with $n$ . $h(\cdot)$ abstracts arbitrary scoring function. Each node $n$ can be represented as a triplet $\langle s, w, t \rangle$ where the score is $s = h(n)$ , token $w \in \mathcal{V}$ is the generated token, and $t$ is the time of discovery. A completed sequence is defined as $\hat{y} = (\mathrm{BOS}, \dots, \mathrm{EOS})$ , and $\hat{Y}$ consists of all completed sequences. The search frontier $\mathcal{O}$ of the graph is a priority queue. $^3$
43
+
44
+ Best-First Search Best-first search (BFS) is a greedy search algorithm which explores the graph according to the scoring function $h(\cdot)$ . We describe the best-first search algorithm in the context of probabilistic NLG in Algorithm 2. For each iteration, BFS finds the most promising, expands it, adds newly discovered nodes to $\mathcal{O}$ , and repeats until reaching the budget. is-complete is the conditional function for termination. $P$ contains completed sequences. $T$ counts the number of explored nodes. Recent work in decoding strategies (Meister et al., 2020b; Lu et al., 2022; Xu et al., 2022) was inspired and motivated by BFS, but none of them directly adopts BFS as the decoding algorithm.
45
+
46
+ Advantages & Challenges What are the potential advantages of using BFS? BFS is a deterministic and reproducible search algorithm with low pruning and no duplication. However, the vanilla best-first search suffers from efficiency and completeness issues. We present our preliminary study and discuss these issues in Appendix A.
47
+
48
+ # 3 Our Approach: Best- $k$ Search
49
+
50
+ In this section, we will introduce best- $k$ search, a novel search algorithm inspired by the vanilla best-first search. It features a few components: (1) parallel exploration enables batch-wise exploration in the search graph; (2) temporal decay yields a higher completion rate and fewer dangling nodes; (3) heap pruning improves the time and space efficiency of our approach. We describe the algorithm
51
+
52
+ ![](images/22d09b1f540b0fb8125bf6514a2ba716c9b1d566878f260a77dc1e5f0f49b448.jpg)
53
+ Figure 2: Pruning in beam search removes diverse hypotheses and reduces flexibility of search. This is an example of question generation and the reference contains the keyword Intel. Hypotheses in blue rectangle were discovered but pruned. A greedy completion of Which Oregon city is contains the information we want.
54
+
55
+ in Algorithm 1 and illustrate it in Figure 3.
56
+
57
+ # 3.1 Parallel Exploration
58
+
59
+ As suggested in Table 10, the wall clock running time of BFS is one order of magnitude slower than beam search under similar conditions. Given the same search budget, BFS is supposed to achieve similar time efficiency theoretically. However, multiple step-by-step operations are practically much slower than a batched one when GPUs are engaged. Hence, we propose a parallel exploration strategy to reduce the exploration time cost by popping $k$ nodes from the priority queue each time and executing them in a batch. Current candidates are stored in the frontier $\mathcal{O}$ . $\mathcal{PQ}$ is a priority queue after applying any scoring function to nodes in $\mathcal{O}$ .
60
+
61
+ $$
62
+ \mathcal {H} \leftarrow \mathcal {P Q}. \mathrm {h e a p p o p} (g)
63
+ $$
64
+
65
+ where $g = \min(k, \mathcal{PQ}. \text{size}()$ . The strategy serves as an approximation to best-first search as we pop the top- $k$ most promising nodes instead of 1. This technique significantly improves the efficiency of best- $k$ search compared to BFS, which will be discussed in Sec. 5.2.
66
+
67
+ # 3.2 Temporal Decay
68
+
69
+ Completion, measured by the number of outputs from the algorithm, has been another key challenge for BFS. In Table 10, increasing the search budget helps improve the completion rate but there is still a non-trivial portion of samples that fails. We propose a technique to fulfill the completion goal during the search process. For each node added to the search frontier $\mathcal{O}$ , we keep the time stamp $t$ . When we pop nodes, we modify the score of each node by adding an auxiliary score rewarding recently discovered nodes. The idea is to increase
70
+
71
+ Algorithm 1 Best- $k$ Search with parallel exploration, heap pruning, and temporal decay.
72
+ Input: Generation model $\theta$ with vocabulary $\mathcal{V}$ , search budget, $\mathcal{O}$ denotes open set (max priority queue). group size $k$ . $T$ is the number of explored steps; $t$ is the time stamp.
73
+ Output: All completed paths $P$ .
74
+ 1: $\mathcal{O} \gets \{\langle \infty, \mathrm{BOS}, -1 \rangle\}$ , $T \gets 0$ , $t \gets 0$ .
75
+ 2: while $T < \text{budget do}$
76
+ 3: $\mathcal{PQ} \gets \emptyset$
77
+ 4: for $n \in \mathcal{O}$ do
78
+ 5: $\mathcal{PQ} \gets \mathcal{PQ} + \langle n.\text{score} + \text{decay}(n.\text{time}, t), n \rangle$
79
+ 6: end for
80
+ 7: $g \gets \min(k, \mathcal{PQ}.size())$
81
+ 8: $\mathcal{H} \gets \mathcal{PQ}.heappop(g) // \mathcal{H}$ is the group of candidates to explore.
82
+ 9: $\mathcal{O} \gets \mathcal{O} \setminus \mathcal{H}$
83
+ 10: for $\langle score, n \rangle \in \mathcal{H}$ do
84
+ 11: for $v \in \mathcal{V}$ do
85
+ 12: if is-complete $(n \circ v)$ then
86
+ 13: $P \gets P \cup (n \circ v)$
87
+ 14: continue
88
+ 15: end if
89
+ 16: child $\langle h(n \circ v), v, t \rangle // \text{Current time } t$ of adding the node to $\mathcal{O}$ .
90
+ 17: $\mathcal{O} \gets \mathcal{O} \cup \text{child}$
91
+ 18: end for
92
+ 19: end for
93
+ 20: $\mathcal{O} \gets \mathcal{O}.\text{prune()}$
94
+ 21: $T \gets T + g$
95
+ 22: $t \gets t + 1$
96
+ 23: end while
97
+
98
+ the score of recently discovered nodes so the algorithm prefers to continue them. The decay function needs to be monotonic. Hence, we define the decay function as a power function:
99
+
100
+ $$
101
+ \operatorname {d e c a y} (n. \text {t i m e}, t) = - \kappa (t - n. \text {t i m e}) ^ {\beta}
102
+ $$
103
+
104
+ where $\kappa > 0$ controls the weight of the term and $\beta > 0$ controls the slope. $t$ is the current time step and $n$ .time is a past time step, so $t - n$ .time $> 0$ . The older the node, the smaller the value of decay(n.time, t). A more recent node will receive a higher incentive, so it's more likely to be popped and expanded. For example, a node discovered at $t = 1$ receives decay(1,5) $= -4$ and a node discovered at $t = 4$ receives decay(4,5) $= -1$ , if we set $\kappa = \beta = 1$ . In our experiment, we set $\beta = 0.5$ and explore different values of $\kappa$ . We leave other forms of the decay function, i.e. logarithm, as future work, and discuss some design choices in Appendix F.
105
+
106
+ # 3.3 Heap Pruning
107
+
108
+ The size of the heap grows fast during exploration. For most of the time, however, our approach only utilizes top-ranked hypotheses. The temporal decay function is monotonic, so for any node in the
109
+
110
+ ![](images/728ef183381fe8260b0de5e10e48e11ef428ccafb236f9b5f6c1630352e6703a.jpg)
111
+ Figure 3: Illustration of best- $k$ search with an example from CommonGen, where the input is "mountainski skier". (left) the search graph before expansion; (right) the search graph after expansion with "skiing" and "There" expanded; (bottom) the search frontier. The upper left number of explored nodes (blue-bordered rectangle) indicates the time stamp of expansion. Grey rectangles are unexplored nodes in the frontier. For illustration purposes, we set $k = 2$ , and only show the top 3 expansions for each node.
112
+
113
+ search frontier, the final score is always decreasing as the time moves forward. The usage of the temporal decay could affect the ranking, but we posit that if the margin of model score between a candidate node and the $k$ -th highest node from the heap is larger than $\epsilon$ , it is unlikely that it will be used in future. The choice of the margin $\epsilon$ depends on factors including the intensity of temporal decay, remaining search budget, model calibration, and resource limitations. In practice, we set a sufficiently large maximum heap size to 500 to avoid tuning $\epsilon$ on different datasets. The expansion of each node could lead to $|\mathcal{V}|$ extension nodes, where $|\mathcal{V}|$ is the size of the vocabulary. As the conditional probability $p_{\theta}(y_t | \mathbf{y}_{<t}, \mathbf{x})$ is usually long-tailed, we discard those low-scoring nodes for efficiency. We set a threshold $\gamma = 0.05$ to filter out generations with probability lower than it.
114
+
115
+ # 3.4 Model Score
116
+
117
+ The depth of a BFS search graph is not aligned while the that of beam search remains the same during the search. As the scoring function plays a crucial role in finding ideal sequences $\hat{Y}$ , we investigate whether existing scoring functions are still compatible with the best- $k$ search algorithm. Here are a few common ways to define the scoring function $h$ regarding the length $l$ of the (partial) sequence: 1. original: $h(\mathbf{y}) = \sum_{t=0}^{l} \log p_{\theta}(y_t | \mathbf{y}_{<t}, \mathbf{x})$ . This is the original way of defining the score of a sequence with its sequence log-likelihood. 2. length-adjusted scoring function: $h(\mathbf{y}) = \frac{1}{|\mathbf{y}|^{\alpha}} \sum_{t=0}^{l} \log p_{\theta}(y_t | \mathbf{y}_{<t}, \mathbf{x})$ . The tunable hyper-parameter $\alpha$ controls the pref
118
+
119
+ erence of length (Meister et al., 2020a). The hypotheses in BFS have different length so it's tricky to pick a good hyper-parameter for length-adjusted functions across samples and datasets. In this work, we also propose a memoryless scoring function $h(\mathbf{y}) = \log p_{\theta}(y_t|\mathbf{y}_{<t},\mathbf{x})$ . It approximates the score of the whole hypothesis $\mathbf{y}$ with the probability of the last node. It satisfies the Markov property that only the last state's probability is considered for the next continuation. When we use this scoring function together with best- $k$ search, we term the approach as $\mathrm{BKS}_{last}$ . We conduct ablation studies to understand different scoring functions in Sec. 5.3. We found that the length-biased scoring function typically works the best while the memoryless function generates more diverse outputs with slightly lower quality.
120
+
121
+ # 4 Evaluation
122
+
123
+ # 4.1 Tasks, Models & Datasets
124
+
125
+ We investigate four conditional text generation tasks, ranging from more precision-oriented tasks like machine translation to more open-ended tasks like commonsense generation and question generation. MT is a use case where diverse outputs are not always required, so in Section 6 we devise our algorithm followed by reranking to see how much we can benefit from diverse and high-quality outputs. We describe the detail of the tasks, models and datasets in Appendix C.
126
+
127
+ # 4.2 Baselines
128
+
129
+ Beam earch (BS) is the long-standing choice for decoding sequences for decades (Reddy, 1977) and
130
+
131
+ <table><tr><td rowspan="2">Method</td><td colspan="2">Stat</td><td colspan="3">Diversity (↑)</td><td colspan="3">Oracle (↑)</td><td>Natural (↑)</td><td colspan="5">Quality (↑)</td></tr><tr><td>S</td><td>|S|</td><td>D-1</td><td>D-2</td><td>D-3</td><td>R1</td><td>R2</td><td>RL</td><td>Mv</td><td>R1</td><td>R2</td><td>RL</td><td>MTR</td><td>GRM</td></tr><tr><td>BS</td><td>10</td><td>10</td><td>44.8</td><td>48.7</td><td>46.9</td><td>32.6</td><td>12.9</td><td>30.1</td><td>59.5</td><td>25.9</td><td>9.2</td><td>23.7</td><td>20.9</td><td>88.9</td></tr><tr><td>DBS</td><td>10</td><td>9</td><td>52.3</td><td>52.2</td><td>47.6</td><td>30.1</td><td>9.5</td><td>26.4</td><td>41.5</td><td>24.2</td><td>7.3</td><td>21.3</td><td>18.7</td><td>85.2</td></tr><tr><td>DBS+</td><td>10</td><td>9</td><td>55.8</td><td>53.1</td><td>45.8</td><td>26.1</td><td>6.8</td><td>23.4</td><td>13.7</td><td>20.3</td><td>4.5</td><td>17.8</td><td>14.9</td><td>85.7</td></tr><tr><td>BTYP0.2</td><td>10</td><td>1</td><td>29.9</td><td>27.8</td><td>24.3</td><td>24.2</td><td>7.0</td><td>22.0</td><td>53.5</td><td>23.5</td><td>6.7</td><td>21.4</td><td>18.3</td><td>90.8</td></tr><tr><td>BTYP0.5</td><td>10</td><td>2</td><td>30.5</td><td>28.4</td><td>24.7</td><td>25.0</td><td>7.5</td><td>22.7</td><td>48.1</td><td>24.7</td><td>7.2</td><td>22.4</td><td>19.2</td><td>92.5</td></tr><tr><td>BTYP0.95</td><td>10</td><td>2</td><td>30.9</td><td>28.9</td><td>25.4</td><td>26.9</td><td>8.6</td><td>24.8</td><td>61.4</td><td>25.0</td><td>7.6</td><td>23.1</td><td>19.5</td><td>92.3</td></tr><tr><td>BNCLS0.5</td><td>10</td><td>1</td><td>28.1</td><td>25.0</td><td>21.1</td><td>24.9</td><td>7.0</td><td>22.7</td><td>51.2</td><td>24.9</td><td>7.0</td><td>22.8</td><td>18.2</td><td>92.3</td></tr><tr><td>BNCLS0.8</td><td>10</td><td>2</td><td>30.1</td><td>28.0</td><td>24.4</td><td>25.6</td><td>7.9</td><td>23.7</td><td>49.9</td><td>25.1</td><td>7.3</td><td>23.1</td><td>19.1</td><td>92.5</td></tr><tr><td>BNCLS0.9</td><td>10</td><td>2</td><td>30.8</td><td>28.7</td><td>25.2</td><td>26.0</td><td>8.2</td><td>24.0</td><td>58.6</td><td>25.1</td><td>7.5</td><td>23.0</td><td>19.3</td><td>91.2</td></tr><tr><td>TYP0.2</td><td>10</td><td>5</td><td>44.4</td><td>46.2</td><td>42.4</td><td>26.5</td><td>7.3</td><td>23.9</td><td>50.9</td><td>23.2</td><td>6.3</td><td>21.1</td><td>18.1</td><td>88.3</td></tr><tr><td>TYP0.5</td><td>10</td><td>7</td><td>48.5</td><td>52.0</td><td>47.9</td><td>30.1</td><td>10.6</td><td>27.3</td><td>71.0</td><td>24.0</td><td>6.5</td><td>21.9</td><td>18.0</td><td>91.8</td></tr><tr><td>TYP0.95</td><td>10</td><td>9</td><td>54.3</td><td>59.4</td><td>55.7</td><td>31.2</td><td>11.2</td><td>28.5</td><td>84.3</td><td>22.1</td><td>6.1</td><td>20.1</td><td>17.1</td><td>89.5</td></tr><tr><td>NCLS0.5</td><td>10</td><td>5</td><td>40.2</td><td>41.4</td><td>37.7</td><td>29.2</td><td>9.9</td><td>26.3</td><td>58.3</td><td>24.9</td><td>7.3</td><td>22.9</td><td>18.6</td><td>93.9</td></tr><tr><td>NCLS0.8</td><td>10</td><td>8</td><td>50.8</td><td>55.1</td><td>51.3</td><td>30.5</td><td>10.2</td><td>27.3</td><td>47.7</td><td>24.3</td><td>6.2</td><td>21.6</td><td>18.2</td><td>91.1</td></tr><tr><td>NCLS0.9</td><td>10</td><td>9</td><td>53.2</td><td>58.2</td><td>53.7</td><td>31.2</td><td>11.5</td><td>28.7</td><td>46.0</td><td>23.6</td><td>6.9</td><td>21.4</td><td>18.0</td><td>90.9</td></tr><tr><td>MixQG</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>24.9</td><td>8.0</td><td>22.3</td><td>-</td><td>-</td></tr><tr><td>BKSmean</td><td>20</td><td>20</td><td>50.8</td><td>56.1</td><td>54.0</td><td>33.9</td><td>14.2</td><td>31.0</td><td>83.0</td><td>27.0</td><td>8.9</td><td>24.5</td><td>21.3</td><td>86.8</td></tr><tr><td>BKSlast</td><td>19</td><td>19</td><td>53.4</td><td>59.4</td><td>55.9</td><td>32.7</td><td>13.4</td><td>30.1</td><td>69.4</td><td>26.0</td><td>8.4</td><td>23.2</td><td>19.7</td><td>91.7</td></tr></table>
132
+
133
+ Table 1: Experiments result on QuoRef question generation. S and |Sl stand for the number of sentences and the unique number of sentences. D-1, -2, and -3 stand for unigram, bigram and trigram distinctness. MV is the MAUVE score measuring the naturalness of the generated outputs. MTR is METEOR score. GRM measures the grammaticality. We highlight the best, second best, and the worst for each column. A visualized comparison with D-1 and R1 is presented in Figure 1.
134
+
135
+ diverse beam search is a diversity-promoting variant of beam search (Vijayakumar et al., 2018). We experiment with different numbers of beam groups for diverse beam search: 5 for DBS and 10 for $\mathrm{DBS + }$ . Sample is represented by two widelyadopted strong stochastic sampling methods, nucleus sampling (NCLS) (Holtzman et al., 2020) and typical sampling (TYP) (Meister et al., 2022a). Beam sample includes a collection of beam search multinomial sampling methods. We experiment with the integration of beam search with typical sampling and nucleus sampling, denoted as BNCLS and BTYP respectively. Implementation of baseline approaches is available at Transformers/- GenerationMixin/generate.
136
+
137
+ Ours We use two typical configurations to represent our approach: $\mathrm{BKS}_{last}$ where the scoring function is memoryless, and $\mathrm{BKS}_{mean}$ where $\alpha = 1$ . In $\mathrm{BKS}_{mean}$ , the score of the sequence is the average log-likelihood of individual time steps. We experiment with $k = \{5,10\}$ and the weight of temporal decay in $\{0.0,0.01,0.05,0.1,0.2\}$ , and report the configuration with the best combination of diversity $(\overline{\mathbf{D}})$ and quality $(\overline{\mathbf{R}})$ .
138
+
139
+ # 4.3 Metrics
140
+
141
+ We measure the generated outputs from multiple aspects including text quality, relevance, diversity,
142
+
143
+ and naturalness. 1. Statistics: we report the number of completed strings and the number of unique completed strings as S and |Sl. 2. Diversity: following Li et al. (2016); Yang and Klein (2021), we report the distinctness of completions, measured as the number of unique $n$ -grams divided by the number of words, denoted as D-1, D-2 and D-3. 3. Text quality: we adopted two relevance based metrics, ROUGE (R1, R2, RL) (Lin, 2004) and METEOR (MTR) (Banerjee and Lavie, 2005), for assessing the surface similarity between the generated strings and the reference. 4. Naturalness: We measure the naturalness of the generated sequences with MAUVE (Pillutla et al., 2021), a metric for open-ended text generation.
144
+
145
+ # 4.4 Question Generation
146
+
147
+ For QuoRef and SQuAD, we present the experiment results in Table 1 and 2. Due to the space limit, we present the results of SQuAD in 13 in Appendix E. Our methods achieve significantly higher MAUVE score than peer methods. To visualize the trade-off in quality and diversity, we also visualize these two metrics in Figure 1, which shows our approach significantly surpasses all baseline methods on both diversity and text quality, measured by D-1 and R1. There is a typical trade-off curve for diversity and quality by controlling hyper-parameters $(p$
148
+
149
+ <table><tr><td></td><td>|S|</td><td>D</td><td>OR</td><td>R</td><td>MV</td><td>GRM</td><td>MTR</td></tr><tr><td>BS</td><td>10</td><td>23.0</td><td>34.2</td><td>25.1</td><td>9.6</td><td>88.1</td><td>29.8</td></tr><tr><td>DBS</td><td>9</td><td>26.6</td><td>32.8</td><td>23.1</td><td>13.0</td><td>82.3</td><td>27.9</td></tr><tr><td>DBS+</td><td>9</td><td>30.9</td><td>32.6</td><td>19.8</td><td>9.0</td><td>80.6</td><td>23.1</td></tr><tr><td>BTYP0.2</td><td>1</td><td>9.7</td><td>25.6</td><td>25.1</td><td>15.6</td><td>88.4</td><td>29.7</td></tr><tr><td>BTYP0.5</td><td>1</td><td>10.3</td><td>25.8</td><td>25.0</td><td>36.2</td><td>93.4</td><td>30.1</td></tr><tr><td>BTYP0.95</td><td>2</td><td>11.0</td><td>28.0</td><td>26.6</td><td>11.9</td><td>89.2</td><td>31.1</td></tr><tr><td>BNCLS0.5</td><td>1</td><td>9.2</td><td>26.7</td><td>26.4</td><td>13.0</td><td>90.2</td><td>30.7</td></tr><tr><td>BNCLS0.8</td><td>2</td><td>10.5</td><td>27.5</td><td>26.5</td><td>9.3</td><td>89.6</td><td>30.9</td></tr><tr><td>BNCLS0.9</td><td>2</td><td>10.8</td><td>27.9</td><td>26.5</td><td>10.0</td><td>89.2</td><td>30.9</td></tr><tr><td>TYP0.2</td><td>6</td><td>22.6</td><td>29.1</td><td>23.7</td><td>17.0</td><td>86.6</td><td>28.1</td></tr><tr><td>TYP0.5</td><td>8</td><td>28.0</td><td>34.8</td><td>24.9</td><td>13.3</td><td>88.7</td><td>29.4</td></tr><tr><td>TYP0.95</td><td>10</td><td>36.2</td><td>34.9</td><td>23.3</td><td>18.8</td><td>84.0</td><td>27.8</td></tr><tr><td>NCLS0.5</td><td>5</td><td>18.7</td><td>32.1</td><td>26.5</td><td>13.8</td><td>89.8</td><td>30.8</td></tr><tr><td>NCLS0.8</td><td>9</td><td>30.2</td><td>35.4</td><td>24.8</td><td>16.5</td><td>86.6</td><td>29.3</td></tr><tr><td>NCLS0.9</td><td>9</td><td>33.8</td><td>35.6</td><td>24.0</td><td>16.2</td><td>86.2</td><td>28.6</td></tr><tr><td>BKSmean</td><td>29</td><td>30.3</td><td>35.8</td><td>25.5</td><td>16.5</td><td>88.6</td><td>30.5</td></tr><tr><td>BKSlast</td><td>24</td><td>36.5</td><td>36.1</td><td>21.7</td><td>22.6</td><td>86.4</td><td>25.8</td></tr></table>
150
+
151
+ value for nucleus sampling, group size for diverse beam search, etc.), but our approaches go beyond the established curve by a significant margin. We posit that $10\mathrm{x}$ more output (2 vs. 29) and substantial gain of diversity (10.8 vs. 30.3) could unlock tons of applications and choices in many real-world applications. For example, on DROP, $\mathrm{BNCLS}_{0.9}$ achieves $\overline{\mathrm{D}} = 10.8$ and $\overline{\mathrm{R}} = 26.5$ while $\mathrm{BKS}_{mean}$ comes with $\overline{\mathrm{D}} = 30.3$ and $\overline{\mathrm{R}} = 25.5$ .
152
+
153
+ # 4.5 Commonsense Generation
154
+
155
+ We present the experimental result of commonsense generation in Table 3. Sampling based approaches are overall good at diversity but the quality of generated text is lower than other methods. For example, $\mathrm{TPP}_{0.95}$ has the best average distinctness score and the worst ROUGE score at the same time. Our approach $\mathrm{BKS}_{last}$ also has the highest oracle ROUGE score, which indicates high search quality over human annotations.
156
+
157
+ # 4.6 Text Summarization
158
+
159
+ As reranking text summarization system outputs has gained increasing interest, the fruitfulness and diversity of generated summaries are valuable attributes to look at. We present the result of text summarization in Table 5. Our approach remains competitive in quality, diversity, and naturalness. Our approach achieves an average ROUGE of 31.9 and MAUVE of 99.5, higher than any other methods. $\overline{\mathbf{D}}$ of our approach is lower than sampling due
160
+
161
+ Table 2: Results of question generation on DROP. $\overline{\mathbf{D}}$ is the average of D-1, D-2 and D-3. $\overline{\mathrm{OR}}$ and $\overline{\mathbf{R}}$ are the average of Oracle ROUGE and ROUGE.
162
+
163
+ <table><tr><td></td><td>ISI</td><td>D</td><td>OR</td><td>R</td><td>MV</td><td>GRM</td><td>MTR</td></tr><tr><td>BS</td><td>10</td><td>40.6</td><td>42.1</td><td>40.3</td><td>23.4</td><td>88.3</td><td>42.7</td></tr><tr><td>DBS</td><td>10</td><td>48.2</td><td>42.6</td><td>37.9</td><td>21.6</td><td>79.2</td><td>37.3</td></tr><tr><td>DBS+</td><td>10</td><td>54.1</td><td>42.4</td><td>36.4</td><td>15.9</td><td>77.5</td><td>35.8</td></tr><tr><td>BTP0.2</td><td>2</td><td>27.4</td><td>36.3</td><td>38.0</td><td>27.0</td><td>83.8</td><td>40.0</td></tr><tr><td>BTP0.5</td><td>2</td><td>26.7</td><td>37.7</td><td>40.4</td><td>17.1</td><td>88.9</td><td>43.0</td></tr><tr><td>BTP0.95</td><td>2</td><td>27.9</td><td>38.4</td><td>40.7</td><td>14.6</td><td>89.2</td><td>43.3</td></tr><tr><td>BNCLS0.5</td><td>1</td><td>24.3</td><td>37.1</td><td>40.5</td><td>11.9</td><td>87.9</td><td>43.1</td></tr><tr><td>BNCLS0.8</td><td>2</td><td>27.0</td><td>38.5</td><td>41.0</td><td>16.9</td><td>89.5</td><td>43.5</td></tr><tr><td>BNCLS0.9</td><td>2</td><td>27.4</td><td>38.5</td><td>40.9</td><td>15.4</td><td>89.6</td><td>43.6</td></tr><tr><td>TYP0.2</td><td>9</td><td>55.4</td><td>40.5</td><td>34.9</td><td>37.9</td><td>79.3</td><td>37.8</td></tr><tr><td>TYP0.5</td><td>10</td><td>55.0</td><td>42.4</td><td>37.1</td><td>37.8</td><td>82.2</td><td>39.3</td></tr><tr><td>TYP0.95</td><td>10</td><td>61.0</td><td>39.5</td><td>33.7</td><td>41.7</td><td>74.9</td><td>36.1</td></tr><tr><td>NCLS0.5</td><td>8</td><td>44.6</td><td>41.1</td><td>39.2</td><td>24.6</td><td>86.2</td><td>41.5</td></tr><tr><td>NCLS0.8</td><td>10</td><td>55.7</td><td>41.7</td><td>36.5</td><td>31.7</td><td>82.0</td><td>38.6</td></tr><tr><td>NCLS0.9</td><td>10</td><td>59.7</td><td>41.2</td><td>35.6</td><td>41.5</td><td>79.4</td><td>38.0</td></tr><tr><td>BKSmean</td><td>27</td><td>45.7</td><td>41.4</td><td>38.2</td><td>19.2</td><td>83.8</td><td>41.0</td></tr><tr><td>BKSlast</td><td>22</td><td>51.4</td><td>43.3</td><td>37.6</td><td>34.6</td><td>84.7</td><td>39.3</td></tr></table>
164
+
165
+ Table 3: Results on commonsense generation.
166
+
167
+ to the longer sequence lengths and more dangling nodes.
168
+
169
+ # 5 Analysis
170
+
171
+ # 5.1 Examples
172
+
173
+ We show one example output of CommonGen in Table 4. We list outputs provided by Lu et al. (2022)<sup>4</sup> and the outputs from our experiments. The outputs from our model are more diverse since multiple types of subjects exist, including a dog, the dogs, and two dogs.
174
+
175
+ We also present one example from QuoRef question generation in Table 6. In this example, we can observe the duplication issue rooted in sampling based methods. Most of the generated questions from sampling are duplicate, covering the easiest question to ask. However, our approaches yield diverse and high-quality questions, covering broader spectrum of facts and knowledge like Intel, Silicon Forest, country seat of Washington County.
176
+
177
+ # 5.2 Efficiency
178
+
179
+ We test the wall-clock running time of our algorithms and the standard beam search. We follow the same configuration in Sec. 2. The result is presented in Table 7. Although our approach is still slower than beam search, due to all the overhead cost including padding sequences, scoring hypotheses and heap management, the speed is reasonable for many applications. The heap size could be
180
+
181
+ <table><tr><td>GBS / DBA / NEUROLOGIC*</td></tr><tr><td>G: A dog is run over by a ball and mouth agape.
182
+ D: A dog is run over by a ball and bites his mouth.
183
+ N: A dog running with a ball in its mouth.</td></tr><tr><td>NCLS0.8 / TYP0.5 / Ours</td></tr><tr><td>A dog running around with a ball in his mouth.
184
+ The dog is running with a ball in his mouth.
185
+ The dog runs away with the ball out of the mouth.
186
+ A dog running on its mouth with a ball
187
+ A dog with a ball running around his mouth.</td></tr><tr><td>A dog with a ball in its mouth running around the pond.
188
+ A dog runs to the door, eating a ball, and another dog in the mouth.
189
+ A dog running away with a ball in its mouth.
190
+ A dog running with a ball in his mouth.
191
+ A dog is running around its mouth catching a ball.</td></tr><tr><td>A dog is running around with a ball in its mouth.
192
+ a dog running around with a ball in its mouth
193
+ The dogs are running around with balls in their mouths.
194
+ Two dogs running around in the same room with a ball in their mouths.
195
+ Two dogs running with balls in their mouths.</td></tr></table>
196
+
197
+ shrunk and the heap management could be optimized for even better efficiency.
198
+
199
+ # 5.3 Choice of Scoring Function
200
+
201
+ In this paper, we experimented with two families of scoring functions: length-normalized sequence log-likelihood and a new memoryless greedy score. We studied how the scoring function works in practice. More particularly, we looked into whether some form of scoring function will cause significant incompletion or search failure. We present the result and discuss the choice of scoring function in Appendix B.
202
+
203
+ # 5.4 Effect of Temporal Decay
204
+
205
+ We evaluate how temporal decay helps the completion rate in different settings in Figure 4. As the result in Table 12 indicates a high incomplete rate when $\alpha = 0$ , we only evaluate three scoring schemas, $\alpha = 0.5$ , $\alpha = 1$ (BKSmean), and the memoryless setting (BKSlast). Temporal decay helps the completion when the scoring function itself struggles with completion. For example, when $\alpha = 0.5$ , increasing $\kappa$ improves the completion rate from $66\%$ to $92\%$ .
206
+
207
+ Table 4: An example from CommonGen where the input is "ball dog mouth run". We first present the outputs on GBS, DBA, and NEUROLOGIC\*, provided in Lu et al. (2022). Then we show five sample outputs from NCLS0.8, $\mathrm{TYP}_{0.5}$ and $\mathrm{BKS}_{last}$ , respectively.
208
+
209
+ <table><tr><td></td><td>ISI</td><td>D</td><td>OR</td><td>R</td><td>MV</td><td>GRM</td><td>MTR</td></tr><tr><td>BS</td><td>8</td><td>16.3</td><td>36.6</td><td>31.2</td><td>98.0</td><td>96.4</td><td>36.9</td></tr><tr><td>DBS</td><td>8</td><td>20.5</td><td>36.3</td><td>28.9</td><td>64.6</td><td>95.2</td><td>32.3</td></tr><tr><td>DBS+</td><td>7</td><td>21.5</td><td>35.6</td><td>27.8</td><td>22.3</td><td>92.0</td><td>29.8</td></tr><tr><td>BTP0.2</td><td>2</td><td>12.3</td><td>29.5</td><td>27.6</td><td>98.8</td><td>96.0</td><td>34.2</td></tr><tr><td>BTP0.5</td><td>3</td><td>13.4</td><td>33.0</td><td>30.4</td><td>98.2</td><td>96.3</td><td>36.5</td></tr><tr><td>BTP0.95</td><td>3</td><td>13.3</td><td>33.7</td><td>30.9</td><td>98.5</td><td>96.4</td><td>37.0</td></tr><tr><td>BNCLS0.8</td><td>3</td><td>13.2</td><td>33.5</td><td>30.8</td><td>98.5</td><td>96.3</td><td>37.1</td></tr><tr><td>BNCLS0.9</td><td>3</td><td>14.0</td><td>34.1</td><td>31.0</td><td>98.5</td><td>96.4</td><td>37.1</td></tr><tr><td>TYP0.2</td><td>7</td><td>30.9</td><td>34.2</td><td>26.7</td><td>97.8</td><td>94.7</td><td>31.3</td></tr><tr><td>TYP0.5</td><td>8</td><td>34.7</td><td>38.8</td><td>28.8</td><td>97.9</td><td>95.1</td><td>32.7</td></tr><tr><td>TYP0.95</td><td>8</td><td>35.7</td><td>38.5</td><td>28.1</td><td>98.4</td><td>95.1</td><td>32.3</td></tr><tr><td>NCLS0.8</td><td>8</td><td>35.3</td><td>38.8</td><td>28.7</td><td>98.1</td><td>95.1</td><td>32.9</td></tr><tr><td>NCLS0.9</td><td>8</td><td>37.2</td><td>37.7</td><td>27.3</td><td>98.5</td><td>94.4</td><td>31.4</td></tr><tr><td>BKSmean</td><td>22</td><td>21.4</td><td>39.0</td><td>31.9</td><td>99.5</td><td>95.3</td><td>35.9</td></tr><tr><td>BKSlast</td><td>17</td><td>24.3</td><td>37.5</td><td>28.9</td><td>98.5</td><td>95.7</td><td>33.3</td></tr></table>
210
+
211
+ ![](images/0637c28dc57cc2122140218702341f6422c3257b09bfcfce899ca075dbe02fcd.jpg)
212
+ Table 5: Results on XSum with BART-XSum.
213
+ Figure 4: Evaluation of the weight term $\kappa$ for temporal decay. We increase the weight $\kappa$ in the objective from 0.0 (no decay) to 0.2 and evaluate how it relates to the completion rate for different scoring functions. In the case of $\alpha = 0.5$ , increased weight significantly helps the completion rate.
214
+
215
+ # 6 Application:Reranking Diverse Outputs
216
+
217
+ Machine translation is typically considered as a precision-oriented task, where typically only a few translations are considered as correct. In this section, we would like to answer the RQ: Do we benefit by selecting from a pool of high-quality diverse outputs, even when the task does not necessarily require such?
218
+
219
+ Setup We use a popular machine translation dataset with multiple references (Ott et al., 2018), based on WMT'14 En-Fr and En-De test sets (Bojar et al., 2014). The model for this task is the mBART $^5$ model (Tang et al., 2021). In order to rerank decoded outputs, we adopt a state-of-the-art quality estimation model for MT,
220
+
221
+ <table><tr><td>Sampling</td><td>BKSlast</td><td>BKSmean</td></tr><tr><td>NCLS0.8</td><td>What city is the fifth largest?</td><td>What city in OR is the fifth largest in OR?</td></tr><tr><td>What is the fifth largest city in OR?</td><td rowspan="2">What city is the fifth largest city in the State?</td><td rowspan="2">What city is the fifth largest [Ø / city in OR / city in the State / in OR / in the state]?</td></tr><tr><td>(x5)</td></tr><tr><td>What is the fifth-largest city in OR?</td><td>What is the 5th largest city in OR?</td><td>What city is the fifth-largest in the State?</td></tr><tr><td>What is the fifth-largest city in OR?</td><td>What is the fifth largest city in [OR / the State of OR / the State]?</td><td>What is the fifth largest city in OR?</td></tr><tr><td>What is the fifth-largest city in the State of OR?</td><td>What is the fifth-largest city in the State?</td><td>Which city in OR has the largest population?</td></tr><tr><td>What is the fifth-largest city in the State of OR?</td><td>Which city is the fifth largest city in OR?</td><td>Which city in OR hosts Intel?</td></tr><tr><td>Which city in OR is the county seat of Washington County?</td><td>Which is the fifth largest city?</td><td>Which city in OR is known as the Silicon Forest?</td></tr><tr><td>TYP0.5</td><td>Which OR city is the fifth largest in the state?</td><td>Which city in OR is the fifth largest in OR?</td></tr><tr><td>What is the fifth largest city in OR?</td><td>Which OR city is the fifth largest?</td><td>Which city in OR is the fifth largest in the state?</td></tr><tr><td>(x5)</td><td>Which OR town is home to Intel?</td><td></td></tr><tr><td>What is the fifth-largest city in OR?</td><td rowspan="2">Which OR town is home to the tech company Intel?</td><td rowspan="2">Which city is the fifth largest [Ø / city in OR / city / in the state]?</td></tr><tr><td>(x3)</td></tr><tr><td>Which city in OR is the county seat of Washington County?</td><td>Which OR town is known as the Silicon Forest?</td><td>Which OR city is the county seat of Washington County?</td></tr><tr><td>Which city is the county seat of Washington County?</td><td>Which OR town is the fifth largest [Ø / city / city in the state / in size / in the state]?</td><td>Which OR city is the fifth largest in size?</td></tr><tr><td></td><td></td><td>Which OR city is the fifth largest?</td></tr></table>
222
+
223
+ Input (Ans | Context): Hillsboro | Hillsboro is the fifth-largest city in the State of Oregon and is the county seat of Washington County. Lying in the Tualatin Valley on the west side of the Portland metropolitan area, the city hosts many high-technology companies, such as Intel, that comprise what has become known as the Silicon Forest. At the 2010 Census, the city's population was 91,611. For thousands of years before the arrival of ... Reference Question: What city is Intel located in?
224
+
225
+ Table 6: Example on QuoRef question generation. The duplication of sampling is high while our model generates a more diverse set of questions. Some outputs from our approach cover the entity Intel mentioned in the reference. We manually replace all the occurrences of Oregon with $OR$ and combine some hypotheses due to the layout limit.
226
+
227
+ <table><tr><td></td><td colspan="2">Best-k Search</td><td>BS</td><td>BTYP0.5</td></tr><tr><td></td><td>k=5</td><td>k=10</td><td>b=10</td><td>b=10</td></tr><tr><td>Time</td><td>1.8s</td><td>1.2s</td><td>0.7s</td><td>1.4s</td></tr><tr><td>|S|</td><td>18.2</td><td>12.8</td><td>8.3</td><td>3.0</td></tr></table>
228
+
229
+ Table 7: Efficiency comparison of our approach and beam search. Time shows the decoding time used for each example.
230
+
231
+ COMET-QE (Rei et al., 2020). The quality estimation model we use to rerank all the outputs is wmt21-comet-qe-da. The QE model is a referenceless model $Q(\mathbf{s},\mathbf{t})$ which judges whether the source input $\mathbf{s}$ and the hypothesis translation $\mathbf{t}$ form a matched pair based on regression metrics.
232
+
233
+ Result We present the result on MT En-De and En-Fr in Table 8 and 11. Our approach has a huge gain after reranking and surpasses all of the sampling based methods and beam search only methods while maintaining high diversity. BNCLS0.8, the approach with best BLEU score, is 9.4 behind BKSlast on $\overline{\mathbf{D}}$ while the human annotation reference is much higher than any of the machine generated hypothesis sets. The success of overgeneration-then-eranking paradigm has been witnessed in summarization (Song et al., 2021; Ravaut et al., 2022; Pernes et al., 2022) and transla
234
+
235
+ tion (Fernandes et al., 2022), where the proposed algorithm could be valuable in searching high-quality diverse outputs.
236
+
237
+ # 7 Related Works
238
+
239
+ Best-first search BFS was widely used in structural prediction (Klein and Manning, 2003), statistical MT (Och et al., 2001), and for searching hypotheses (Saha et al., 2022). Recent work in decoding strategies (Meister et al., 2020b; Lu et al., 2022; Xu et al., 2022) conceptualized best-first search as part of their paradigm, but it was not the dominant component of any of these systems.
240
+
241
+ Text decoding algorithms Stochastic decoding algorithms have gained popularity in the past few years (Fan et al., 2018; Holtzman et al., 2020; Meister et al., 2022a; Suzgun et al., 2022). Rollout-based algorithms are capable of satisfying certain utility functions or constraints at the cost of efficiency (Leblond et al., 2021; Chaffin et al., 2022; Lu et al., 2022). Recombination-based search algorithm (Xu et al., 2022) can find thousands of hypotheses despite complicatedness.
242
+
243
+ Diversity in text generation The diversity of text generation has been a key challenge for applications like dialogue (Li et al., 2016; Zhang et al.,
244
+
245
+ <table><tr><td rowspan="2"></td><td rowspan="2">|SI</td><td rowspan="2">D</td><td colspan="3">BLEU</td></tr><tr><td>ORIGIN</td><td>COMET</td><td>Δ</td></tr><tr><td>Reference</td><td>11</td><td>36.9</td><td>-</td><td>-</td><td>-</td></tr><tr><td>BS</td><td>10</td><td>15.4</td><td>30.4</td><td>32.3</td><td>1.9</td></tr><tr><td>DBS</td><td>10</td><td>18.7</td><td>25.0</td><td>27.8</td><td>2.8</td></tr><tr><td>DBS+</td><td>10</td><td>24.6</td><td>20.8</td><td>22.9</td><td>2.1</td></tr><tr><td>BTYP0.2</td><td>3</td><td>11.0</td><td>26.5</td><td>26.1</td><td>-0.4</td></tr><tr><td>BTYP0.5</td><td>3</td><td>10.2</td><td>34.3</td><td>34.6</td><td>0.3</td></tr><tr><td>BTYP0.95</td><td>3</td><td>10.7</td><td>32.9</td><td>33.4</td><td>0.5</td></tr><tr><td>BNCLS0.5</td><td>2</td><td>9.0</td><td>33.0</td><td>33.3</td><td>0.3</td></tr><tr><td>BNCLS0.8</td><td>3</td><td>10.2</td><td>34.9</td><td>34.9</td><td>0.0</td></tr><tr><td>BNCLS0.9</td><td>3</td><td>10.4</td><td>32.6</td><td>33.8</td><td>1.2</td></tr><tr><td>TYP0.2</td><td>9</td><td>27.2</td><td>19.9</td><td>19.5</td><td>-0.3</td></tr><tr><td>TYP0.5</td><td>9</td><td>28.6</td><td>25.6</td><td>27.0</td><td>1.4</td></tr><tr><td>TYP0.95</td><td>10</td><td>36.5</td><td>19.2</td><td>22.1</td><td>2.9</td></tr><tr><td>NCLS0.5</td><td>8</td><td>18.6</td><td>31.1</td><td>32.2</td><td>1.1</td></tr><tr><td>NCLS0.8</td><td>10</td><td>30.2</td><td>25.9</td><td>27.0</td><td>1.0</td></tr><tr><td>NCLS0.9</td><td>10</td><td>35.0</td><td>23.2</td><td>25.8</td><td>2.6</td></tr><tr><td>BKSmean</td><td>35</td><td>19.6</td><td>30.1</td><td>33.3</td><td>3.2</td></tr><tr><td>BKSlast</td><td>33</td><td>20.5</td><td>26.1</td><td>31.1</td><td>5.0</td></tr></table>
246
+
247
+ Table 8: Machine translation from English to German. ORIGIN and COMET are the BLEU score before and after reranking; $\Delta$ indicates the change of BLEU score from reranking.
248
+
249
+ 2020; Stasaski and Hearst, 2022), MT (Shen et al., 2019) and conditional text generation (Yang and Klein, 2021). Beam search has also been developed to generate more diverse outputs (Vijayakumar et al., 2018; Anderson et al., 2017; Post and Vilar, 2018). Prior work also studies the trade-off between diversity and quality in text generation (Zhang et al., 2021).
250
+
251
+ Degeneration of beam search Welleck et al. (2020b); Holtzman et al. (2020) addressed the degeneration issue in neural text generation and Cohen and Beck (2019) studies the beam search performance degradation in neural sequence models. The gap between high probability and quality has been observed and studied (Meister et al., 2022b; Freitag et al., 2022).
252
+
253
+ # 8 Conclusion
254
+
255
+ In this work, we propose best- $k$ search, a novel decoding algorithm for text generation based on best-first search. The algorithm features a few technical components, and generates natural and diverse text while maintaining high quality. We conduct comprehensive experiments on four tasks to verify the approach. The algorithm is orthogonal to sampling methods and it is parameter-free, lightweight, and efficient.
256
+
257
+ # Acknowledgements
258
+
259
+ We thank Greg Durrett, Tong Niu, Chen Xing, Hiroaki Hayashi, Katie Stasaski, Philippe Laban, Semih Yavuz and Shafiq Rayhan Joty for helpful proofreading and comments on this work. We also thank the Salesforce AI Research team for generous support and feedback.
260
+
261
+ # Limitations
262
+
263
+ In this work, we propose a decoding algorithm for text generation. We present the algorithm with comprehensive discussion on design choices and mechanisms. We further verified our algorithm on four tasks and six datasets. However, we acknowledge the following limitations. First, we mainly apply the method to English data although we cover German and French in MT experiments. In future work, we could verify the approach on non-English languages, especially CJK, due to the possible gap of tokenization. Second, we did not cover open-ended generation tasks like story generation and long-form generation tasks in this paper. Third, we could conduct more experiments and analysis on the mechanism of our approach, and examine the outputs with human judgement and feedback.
264
+
265
+ # References
266
+
267
+ 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, pages 936-945, Copenhagen, Denmark. Association for Computational Linguistics.
268
+ 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, Ann Arbor, Michigan. Association for Computational Linguistics.
269
+ Ondrej Bojar, Christian Buck, Christian Federmann, Barry Haddow, Philipp Koehn, Johannes Leveling, Christof Monz, Pavel Pecina, Matt Post, Herve Saint-Amand, Radu Soricut, Lucia Specia, and Aleks Tamchyna. 2014. Findings of the 2014 workshop on statistical machine translation. In Proceedings of the Ninth Workshop on Statistical Machine Translation, pages 12-58, Baltimore, Maryland, USA. Association for Computational Linguistics.
270
+ Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind
271
+
272
+ Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in neural information processing systems, 33:1877-1901.
273
+ Antoine Chaffin, Vincent Claveau, and Ewa Kijak. 2022. PPL-MCTS: Constrained textual generation through discriminator-guided MCTS decoding. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2953-2967, Seattle, United States. Association for Computational Linguistics.
274
+ Eldan Cohen and Christopher Beck. 2019. Empirical analysis of beam search performance degradation in neural sequence models. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 1290-1299. PMLR.
275
+ Pradeep Dasigi, Nelson F. Liu, Ana Marasović, Noah A. Smith, and Matt Gardner. 2019. Quoref: A reading comprehension dataset with questions requiring coreferential 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 5925-5932, Hong Kong, China. Association for Computational Linguistics.
276
+ 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.
277
+ 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.
278
+ Bryan Eikema and Wilker Aziz. 2020. Is MAP decoding all you need? the inadequacy of the mode in neural machine translation. In Proceedings of the 28th International Conference on Computational Linguistics, pages 4506-4520, Barcelona, Spain (Online). International Committee on Computational Linguistics.
279
+ Alexander R. Fabbri, Wojciech Krysciński, Bryan McCann, Caiming Xiong, Richard Socher, and Dragomir Radev. 2021. SummEval: Re-evaluating summarization evaluation. Transactions of the Association for Computational Linguistics, 9:391-409.
280
+
281
+ Angela Fan, Mike Lewis, and Yann Dauphin. 2018 Hierarchical neural story generation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 889-898, Melbourne, Australia. Association for Computational Linguistics.
282
+ Patrick Fernandes, Antonio Farinhas, Ricardo Rei, José De Souza, Perez Ogayo, Graham Neubig, and Andre Martins. 2022. Quality-aware decoding for neural machine translation. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1396-1412, Seattle, United States. Association for Computational Linguistics.
283
+ Markus Freitag, David Grangier, Qijun Tan, and Bowen Liang. 2022. High quality rather than high model probability: Minimum Bayes risk decoding with neural metrics. Transactions of the Association for Computational Linguistics, 10:811-825.
284
+ 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.
285
+ Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. 2020. The curious case of neural text degeneration. In International Conference on Learning Representations.
286
+ Dan Klein and Christopher D. Manning. 2003. A* parsing: Fast exact Viterbi parse selection. In Proceedings of the 2003 Human Language Technology Conference of the North American Chapter of the Association for Computational Linguistics, pages 119-126
287
+ Wojciech Kryscinski, Bryan McCann, Caiming Xiong, and Richard Socher. 2020. Evaluating the factual consistency of abstractive text summarization. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 9332-9346, Online. Association for Computational Linguistics.
288
+ Rémi Leblond, Jean-Baptiste Alayrac, Laurent Sifre, Miruna Pislar, Lespiau Jean-Baptiste, Ioannis Antonoglou, Karen Simonyan, and Oriol Vinyals 2021. Machine translation decoding beyond beam search. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 8410-8434, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
289
+ Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020 BART: Denoising sequence-to-sequence pre-training
290
+
291
+ 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.
292
+ 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.
293
+ Bill Yuchen Lin, Wangchunshu Zhou, Ming Shen, Pei Zhou, Chandra Bhagavatula, Yejin Choi, and Xiang Ren. 2020. CommonGen: A constrained text generation challenge for generative commonsense reasoning. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 1823-1840, Online. Association for Computational Linguistics.
294
+ 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.
295
+ Ximing Lu, Sean Welleck, Peter West, Liwei Jiang, Jungo Kasai, Daniel Khashabi, Ronan Le Bras, Lianhui Qin, Youngjae Yu, Rowan Zellers, Noah A. Smith, and Yejin Choi. 2022. NeuroLogic a*esque decoding: Constrained text generation with lookahead heuristics. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 780-799, Seattle, United States. Association for Computational Linguistics.
296
+ Clara Meister, Ryan Cotterell, and Tim Vieira. 2020a. If beam search is the answer, what was the question? In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2173-2185, Online. Association for Computational Linguistics.
297
+ Clara Meister, Tiago Pimentel, Gian Wihar, and Ryan Cotterell. 2022a. Locally typical sampling.
298
+ Clara Meister, Tim Vieira, and Ryan Cotterell. 2020b. Best-first beam search. Transactions of the Association for Computational Linguistics, 8:795-809.
299
+ Clara Meister, Gian Wiher, Tiago Pimentel, and Ryan Cotterell. 2022b. On the probability-quality paradox in language generation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 36-45, Dublin, Ireland. Association for Computational Linguistics.
300
+ Lidiya Murakhovs'ka, Chien-Sheng Wu, Philippe Laban, Tong Niu, Wenhao Liu, and Caiming Xiong. 2022. MixQG: Neural question generation with mixed answer types. In Findings of the Association
301
+
302
+ for Computational Linguistics: NAACL 2022, pages 1486-1497, Seattle, United States. Association for Computational Linguistics.
303
+ 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.
304
+ Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong. 2022. A conversational paradigm for program synthesis. arXiv preprint arXiv:2203.13474.
305
+ Franz Josef Och, Nicola Ueffing, and Hermann Ney. 2001. An efficient A* search algorithm for statistical machine translation. In Proceedings of the ACL 2001 Workshop on Data-Driven Methods in Machine Translation.
306
+ Myle Ott, Michael Auli, David Grangier, and Marc'Aurelio Ranzato. 2018. Analyzing uncertainty in neural machine translation. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 3956-3965. PMLR.
307
+ Diogo Pernes, Afonso Mendes, and Andre FT Martins. 2022. Improving abstractive summarization with energy-based re-ranking. arXiv preprint arXiv:2210.15553.
308
+ Krishna Pillutla, Swabha Swayamdipta, Rowan Zellers, John Thickstun, Sean Welleck, Yejin Choi, and Zaid Harchaoui. 2021. Mauve: Measuring the gap between neural text and human text using divergence frontiers. Advances in Neural Information Processing Systems, 34:4816-4828.
309
+ 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, Volume 1 (Long Papers), pages 1314-1324, New Orleans, Louisiana. Association for Computational Linguistics.
310
+ Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J Liu, et al. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21(140):1-67.
311
+ 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.
312
+
313
+ Mathieu Ravaut, Shafiq Joty, and Nancy Chen. 2022. SummaReranker: A multi-task mixture-of-experts re-ranking framework for abstractive summarization. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4504-4524, Dublin, Ireland. Association for Computational Linguistics.
314
+ Raj Reddy. 1977. Speech understanding systems: A summary of results of the five-year research effort at carnegie mellon university. Pittsburgh, Pa.
315
+ Ricardo Rei, Craig Stewart, Ana C Farinha, and Alon Lavie. 2020. COMET: A neural framework for MT evaluation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2685-2702, Online. Association for Computational Linguistics.
316
+ Swarnadeep Saha, Shiyue Zhang, Peter Hase, and Mohit Bansal. 2022. Summarization programs: Interpretable abstractive summarization with neural modular trees. arXiv preprint arXiv:2209.10492.
317
+ Tianxiao Shen, Myle Ott, Michael Auli, and Marc'Aurelio Ranzato. 2019. Mixture models for diverse machine translation: Tricks of the trade. In International conference on machine learning, pages 5719-5728. PMLR.
318
+ 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. Association for Computational Linguistics.
319
+ Felix Stahlberg and Bill Byrne. 2019. On NMT search errors and model errors: Cat got your tongue? 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 3356-3362, Hong Kong, China. Association for Computational Linguistics.
320
+ Katherine Stasaski and Marti Hearst. 2022. Semantic diversity in dialogue with natural language inference. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 85-98, Seattle, United States. Association for Computational Linguistics.
321
+ Mirac Suzgun, Luke Melas-Kyriazi, and Dan Jurafsky. 2022. Follow the wisdom of the crowd: Effective text generation via minimum bayes risk decoding. arXiv preprint arXiv:2211.07634.
322
+ Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, and Angela Fan. 2021. Multilingual translation from de-noising pre-training. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021,
323
+
324
+ pages 3450-3466, Online. Association for Computational Linguistics.
325
+ Ashwin Vijayakumar, Michael Cogswell, Ramprasaath Selvaraju, Qing Sun, Stefan Lee, David Crandall, and Dhruv Batra. 2018. Diverse beam search for improved description of complex scenes. Proceedings of the AAAI Conference on Artificial Intelligence, 32(1).
326
+ Sean Welleck, Ilia Kulikov, Jaedeok Kim, Richard Yuanzhe Pang, and Kyunghyun Cho. 2020a. Consistency of a recurrent language model with respect to incomplete decoding. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5553-5568, Online. Association for Computational Linguistics.
327
+ Sean Welleck, Ilia Kulikov, Stephen Roller, Emily Dinan, Kyunghyun Cho, and Jason Weston. 2020b. Neural text generation with unlikelihood training. In ICLR.
328
+ 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.
329
+ 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.
330
+ Jiacheng Xu, Siddhartha Jonnalagadda, and Greg Durrett. 2022. Massive-scale decoding for text generation using lattices. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4659-4676, Seattle, United States. Association for Computational Linguistics.
331
+ Kevin Yang and Dan Klein. 2021. FUDGE: Controlled text generation with future discriminators. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3511-3535, Online. Association for Computational Linguistics.
332
+ Hugh Zhang, Daniel Duckworth, Daphne Ippolito, and Arvind Neelakantan. 2021. Trading off diversity and quality in natural language generation. In Proceedings of the Workshop on Human Evaluation of NLP
333
+
334
+ <table><tr><td>Property</td><td>Det.</td><td>No Dup.</td><td>Low Pruning</td><td>Completeness</td></tr><tr><td>BS</td><td>✓</td><td>✓</td><td>✗</td><td>✓</td></tr><tr><td>Sample</td><td>✗</td><td>✗6</td><td>✗</td><td>✓</td></tr><tr><td>BFS</td><td>✓</td><td>✓</td><td>✓</td><td>✗</td></tr></table>
335
+
336
+ Table 9: Property comparison of search algorithms and approaches. Det. stands for deterministic search with reproducibility. No Dup. indicates the approach could guarantee no duplication of output sequences.
337
+
338
+ # Algorithm 2 Best-First Search
339
+
340
+ Input: Language model abstracted as $p_{\theta}$ , search budget, and frontier $\mathcal{O}$ .
341
+
342
+ Output: All completed paths $P$
343
+
344
+ 1: $\mathcal{O} \gets \{\langle \infty, \mathrm{BOS}, -1 \rangle\}, T \gets 0, t \gets 0$ .
345
+ 2: while $T <$ budget do
346
+ 3: $n\gets \mathcal{O}.\mathrm{pop}()$
347
+ 4: for $v\in \mathcal{V}$ do
348
+ 5: if is-complete $(n\circ v)$ then
349
+ 6: $P\gets P\cup (n\circ v)$
350
+ 7: continue
351
+ 8: end if
352
+ 9: child $\leftarrow \langle h(n\circ v),v,t\rangle$
353
+ 10: $\mathcal{O}\gets \mathcal{O}\cup \mathrm{child}$
354
+ 11: end for
355
+ 12: $T\gets T + 1$
356
+ 13: $t\gets t + 1$
357
+ 14: end while
358
+
359
+ Systems (HumEval), pages 25-33, Online. Association for Computational Linguistics.
360
+
361
+ Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, and Bill Dolan. 2020. DIALOGPT: Large-scale generative pre-training for conversational response generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 270-278, Online. Association for Computational Linguistics.
362
+
363
+ # A Best-First Search Algorithm
364
+
365
+ We describe the best-first search algorithm in the context of probabilistic NLG in Algorithm 2.
366
+
367
+ # A.1 Setup for investigating BFS
368
+
369
+ We use XSum (Narayan et al., 2018) and a BART model BART-large-XSum<sup>7</sup> (Lewis et al., 2020) fine-tuned on it as the testbed of our preliminary
370
+
371
+ study. We sample 100 examples from the test set to measure the decoding quality. We set the beam size to 10 and the max sequence length to 30. For the machine configuration, we use Intel Xeon CPU @ 2.20GHz for CPU and NVIDIA A100-SXM4-40GB for GPU. We use Transformers (v4.23.1) (Wolf et al., 2020) and pytorch (v1.9.0) for baseline implementation and model calls.
372
+
373
+ # A.2 Advantages & Challenges
374
+
375
+ What are the potential advantages of using BFS, compared to beam search and sampling approaches? We enumerate the inherent property of beam search, sampling, and best-first search in Table 9. BFS has many strengths to satisfy desired properties like diversity, quality, and controllability in text generation.
376
+
377
+ Deterministic BFS is a deterministic search algorithm with lower variance and higher controllability than stochastic sampling methods. This also indicates that BFS is compatible with sampling on top, similar to beam search.
378
+
379
+ No duplication BFS comes with no duplication, so it's guaranteed that the more search budget used, the more unique outputs there will be. Sampling methods with low truncation thresholds suffer from this issue.
380
+
381
+ No Pruning We illustrate the pruning issue in beam search in Figure 2. BS prunes the desired hypotheses. Unlike beam search, BFS never prunes, and preserves all explored nodes. This also brings great flexibility that the generation could switch between different branches of search.
382
+
383
+ Diversity BFS yields diverse outputs with decent quality. The diversity of generated sequences is based on empirical lens, which will be covered in our experiments.
384
+
385
+ As we have discussed many strengths BFS enjoys, why has it not been the dominant approach? We implement a standard BFS algorithm, as described in Algorithm 2, and look into how it works on decoding text summaries from BART-XSum. We also define a notion of equivalent beam size<sup>9</sup>
386
+
387
+ <table><tr><td>Beam Size</td><td>1</td><td>2</td><td>5</td><td>10</td></tr><tr><td>Incomplete Rate</td><td>58.1%</td><td>23.8%</td><td>3.9%</td><td>3.0%</td></tr><tr><td>Time (s)</td><td>1.0</td><td>1.9</td><td>5.6</td><td>13.7</td></tr></table>
388
+
389
+ Table 10: Search incomplete rate and speed for the vanilla BFS. Beam size denotes the equivalent beam size, which is a reflection of the total search budget. Incomplete rate measures how often a search does not reach any completed state (EOS). Time denotes the running time for running the search algorithm per example.
390
+
391
+ to calibrate the search budget for all methods. For beam search, we set a beam size $b$ and a max decoding length $T$ , and the total search cost is $C = bT$ , which means there will be $C$ times forward passes through LM. BFS also calls the LM for $C$ times and discover $C$ nodes.
392
+
393
+ While beam search iteratively gains depth, best-first search does not. Hence, we investigate how often BFS could (not) reach the search goal, which is at least one EOS token. In Table 10, we show that the vanilla BFS has a pretty high chance of failure when the search budget is very limited. Even in the case of beam size $b = 10$ , there is a $3\%$ of chance that the method won't reach any completed sequence, a sequence ending with EOS or other pre-defined termination tokens. This indicates that the vanilla BFS struggles with the completeness. Efficiency is another crucial factor for practical usage. We measure the time consumed for running the search for each example and report it in Table 10. For reference, beam search with $b = 10$ can be completed in 0.7s per example. The vanilla BFS is slower than BS since the step-wise exploration in BFS is not batched.
394
+
395
+ # B Choice of Scoring Function
396
+
397
+ We test the incompleteness rate in a very strict use case: decoding a summary with at most $T = 30$ tokens with a total budget $C = bT = 300$ . If the model does not reach any EOS token before depth of 30, we consider it as a case of incompleteness. We show the comparison of the incompleteness rate in Table 12. The length-normalized sequence log-likelihood is formed as $\frac{1}{l^{\alpha}}\sum_{t=0}^{l}\log p_{\theta}(y_t|\mathbf{y}_{<t},\mathbf{x})$ . The original definition of scoring function, $\alpha = 0$ , is a failure in the context of best-first search. The reason behind is the monotonic relation of the hypothesis score and the length. Since shorter sequences always have higher scores, the greedy property of best-first search will hinder the exploration of longer sequences. Although the weight of tem
398
+
399
+ <table><tr><td></td><td colspan="5">BLEU</td></tr><tr><td></td><td>ISI</td><td>D</td><td>Original</td><td>COMET</td><td>Δ</td></tr><tr><td>Reference</td><td>11</td><td>29.2</td><td>-</td><td>-</td><td>-</td></tr><tr><td>BS</td><td>10</td><td>14.6</td><td>39.6</td><td>38.4</td><td>-1.2</td></tr><tr><td>DBS</td><td>10</td><td>18.4</td><td>32.1</td><td>32.1</td><td>0.0</td></tr><tr><td>DBS+</td><td>10</td><td>21.7</td><td>32.0</td><td>33.3</td><td>1.3</td></tr><tr><td>BTP0.2</td><td>2</td><td>10.2</td><td>35.4</td><td>35.4</td><td>-0.1</td></tr><tr><td>BTP0.5</td><td>2</td><td>9.2</td><td>44.3</td><td>44.2</td><td>0.0</td></tr><tr><td>BTP0.95</td><td>3</td><td>9.9</td><td>39.9</td><td>39.7</td><td>-0.2</td></tr><tr><td>BNCLS0.5</td><td>2</td><td>8.9</td><td>40.6</td><td>40.6</td><td>-0.1</td></tr><tr><td>BNCLS0.8</td><td>2</td><td>9.5</td><td>38.5</td><td>38.4</td><td>-0.1</td></tr><tr><td>BNCLS0.9</td><td>3</td><td>9.8</td><td>39.5</td><td>38.9</td><td>-0.6</td></tr><tr><td>TYP0.2</td><td>8</td><td>26.4</td><td>23.9</td><td>25.0</td><td>1.1</td></tr><tr><td>TYP0.5</td><td>9</td><td>27.0</td><td>31.2</td><td>32.6</td><td>1.4</td></tr><tr><td>TYP0.95</td><td>10</td><td>37.2</td><td>24.1</td><td>24.1</td><td>0.0</td></tr><tr><td>NCLS0.5</td><td>8</td><td>17.1</td><td>35.6</td><td>36.3</td><td>0.7</td></tr><tr><td>NCLS0.8</td><td>10</td><td>28.9</td><td>28.9</td><td>28.7</td><td>-0.2</td></tr><tr><td>NCLS0.9</td><td>10</td><td>33.4</td><td>25.4</td><td>26.6</td><td>1.2</td></tr><tr><td>BKSmean</td><td>18</td><td>16.8</td><td>38.0</td><td>39.0</td><td>1.0</td></tr><tr><td>BKSlast</td><td>26</td><td>18.1</td><td>33.5</td><td>37.2</td><td>3.6</td></tr></table>
400
+
401
+ Table 11: Machine translation from English to French. We highlight the best BLEU score after reranking and the improvement $\Delta$ for each sector. Numbers are rounded after calculation for display simplicity.
402
+
403
+ <table><tr><td></td><td>α = 0</td><td>α = 0.5</td><td>α = 1.0</td><td>BKSlast</td></tr><tr><td>Rate</td><td>79.5%</td><td>8.8%</td><td>1.8%</td><td>2.1%</td></tr><tr><td>Ref.</td><td>BS</td><td>DBS</td><td>BS+Sample</td><td>Sample</td></tr><tr><td>Rate</td><td>5.0%</td><td>1.1%</td><td>6.4%</td><td>0.8%</td></tr></table>
404
+
405
+ Table 12: Incomplete rate $(\downarrow)$ with different choices of scoring function in best- $k$ search (top) and reference baselines (bottom). $\alpha = 0$ stands for sequential log-likelihood without length adjustment; $\alpha = 1.0$ represents $\mathrm{BKS}_{mean}$ . We show the lowest incomplete rate under various configurations of temporal decay. See Sec. 5.3 for the definition and discussion.
406
+
407
+ poral decay could be increased, it will change the foundation of the algorithm if the decay is overwhelming the hypothesis score.
408
+
409
+ Performance of $\mathrm{BKS}_{last}$ and $\mathrm{BKS}_{mean}$ is overall good across all datasets. We also notice an interesting difference that $\mathrm{BKS}_{mean}$ prioritizes the quality slightly more than $\mathrm{BKS}_{last}$ while $\mathrm{BKS}_{last}$ enjoys more diversity. For example, $\mathrm{BKS}_{last}$ on QuoRef achieves higher distinctness score but a slightly lower ROUGE score. The difference of scoring function will definitely impact the search strategy and we treat it as a handle of controllability for our algorithm.
410
+
411
+ # C Experiment Setup
412
+
413
+ Question Generation We adopt a state-of-the-art question generation model, MixQG (Murakhovs'ka et al., 2022), as the testbed to verify whether our approach could elicit more diverse, larger number and high-quality questions compared to baseline approaches. We use the variant mixqqg-large in this paper. For datasets, we select a range of seen and unseen QA datasets, including SQuAD (Rajpurkar et al., 2016), DROP (Dua et al., 2019), and QuoRef (Dasigi et al., 2019). We set the maximum decoding length to 25 BPEs for SQuAD and QuoRef, and 20 for DROP.
414
+
415
+ Commonsense Generation CommonGen is a dataset for generative commonsense reasoning (Lin et al., 2020). The input is a few keywords and the target is a sentence satisfying commonsense and covering these keywords. We adopt a T5-based model<sup>10</sup> fine-tuned on the training set of CommonGen. Since CommonGen has multiple references for each input, we utilize multiple references for each example by evaluating outputs against them. The maximum decoding length is set to 20.
416
+
417
+ Text Summarization We use XSum (Narayan et al., 2018) as the dataset for abstractive text summarization. The model we use for this task is the BART<sup>11</sup> model (Lewis et al., 2020) fine-tuned on XSum. The maximum decoding length is 30.
418
+
419
+ # D Experiment: Machine Translation En→Fr
420
+
421
+ We present the machine translation result from English to French in Table 11. The dataset we use here is an extended version of newstest2014. We can see a significant improvement over BLEU in our approach after using COMET-QE reranking.
422
+
423
+ We obtained similar results on En-Fr compared to En-De in Table 8. Our approach achieves a good combination of diversity and quality compared to baseline methods. One of the beam search + sampling method, $\mathrm{BTYP}_{0.5}$ , achieves 44.2 after COMET-QE reranking, which surpasses any other methods by a decent margin. Our approach, $\mathrm{BKS}_{mean}$ , beats strong baselines including beam search and sampling-only approaches. What worth noticing is the significant jump after reranking,
424
+
425
+ which shows a great success of overgeneration + reranking as a paradigm.
426
+
427
+ <table><tr><td></td><td>ISI</td><td>D</td><td>OR</td><td>R</td><td>MV</td><td>GRM</td><td>MTR</td></tr><tr><td>BS</td><td>10</td><td>21.8</td><td>55.7</td><td>41.3</td><td>91.4</td><td>87.0</td><td>48.5</td></tr><tr><td>DBS</td><td>9</td><td>25.1</td><td>50.7</td><td>36.5</td><td>72.1</td><td>80.9</td><td>42.1</td></tr><tr><td>DBS+</td><td>9</td><td>29.6</td><td>50.5</td><td>31.9</td><td>37.7</td><td>81.3</td><td>35.6</td></tr><tr><td>BTYP0.2</td><td>1</td><td>9.8</td><td>41.9</td><td>41.2</td><td>96.8</td><td>87.6</td><td>46.8</td></tr><tr><td>BTYP0.5</td><td>1</td><td>10.2</td><td>46.1</td><td>44.9</td><td>94.3</td><td>88.7</td><td>50.2</td></tr><tr><td>BTYP0.95</td><td>2</td><td>10.7</td><td>46.6</td><td>44.7</td><td>95.0</td><td>88.5</td><td>50.4</td></tr><tr><td>BNCLS0.5</td><td>1</td><td>9.2</td><td>44.8</td><td>44.5</td><td>97.0</td><td>88.7</td><td>49.6</td></tr><tr><td>BNCLS0.8</td><td>1</td><td>10.2</td><td>46.3</td><td>44.6</td><td>94.8</td><td>88.4</td><td>49.9</td></tr><tr><td>BNCLS0.9</td><td>2</td><td>10.7</td><td>46.8</td><td>44.7</td><td>96.0</td><td>88.1</td><td>50.4</td></tr><tr><td>TYP0.2</td><td>5</td><td>21.1</td><td>45.8</td><td>37.7</td><td>94.2</td><td>87.1</td><td>43.4</td></tr><tr><td>TYP0.5</td><td>7</td><td>26.2</td><td>54.3</td><td>40.6</td><td>97.1</td><td>88.1</td><td>45.7</td></tr><tr><td>TYP0.95</td><td>9</td><td>34.8</td><td>55.6</td><td>39.2</td><td>97.8</td><td>86.5</td><td>44.6</td></tr><tr><td>NCLS0.5</td><td>9</td><td>31.9</td><td>55.6</td><td>39.0</td><td>95.1</td><td>86.3</td><td>44.3</td></tr><tr><td>NCLS0.8</td><td>8</td><td>28.3</td><td>55.4</td><td>40.8</td><td>98.4</td><td>87.8</td><td>46.1</td></tr><tr><td>NCLS0.9</td><td>9</td><td>31.6</td><td>55.9</td><td>39.0</td><td>97.7</td><td>85.9</td><td>44.3</td></tr><tr><td>BKSmean</td><td>19</td><td>29.5</td><td>54.8</td><td>38.2</td><td>99.0</td><td>86.0</td><td>44.0</td></tr><tr><td>BKSlast</td><td>18</td><td>32.8</td><td>54.2</td><td>35.8</td><td>98.8</td><td>84.4</td><td>40.6</td></tr></table>
428
+
429
+ Table 13: Results of question generation on SQuAD.
430
+
431
+ # E Experiment: Question Generation on SQuAD
432
+
433
+ We present the result of question generation on SQuAD in Table 13. Our approach achieves the best MAUVE score and a good combination of diversity and quality metrics. Our approach outperforms baseline models in either diversity or quality on SQuAD.
434
+
435
+ # F Design Choice for Completion
436
+
437
+ In our paper, we design a temporal decay function to encourage the completion of our search algorithm. We have also considered a depth-based auxiliary term to encourage the completion. For instance, we can define $\mathrm{aux}(n) = n \cdot \mathrm{length}()$ where a longer sequence will receive a higher score if we assume a longer sequence is more likely to terminate (Welleck et al., 2020a). The problem of this function is that it always prefer longer sequences. Once there exists one single long sequence, the rest of the search will focus on this string because it is longer than any other strings. The search will be shaped into a depth-first search while what we expect is to discover a diverse set of strings with various length and prefix.
438
+
439
+ A For every submission:
440
+
441
+ A1. Did you describe the limitations of your work?
442
+
443
+ Sec. Limitations after Sec. Conclusion.
444
+
445
+ A2. Did you discuss any potential risks of your work?
446
+
447
+ We do not see a substantial risk of our work. Although the output could contain toxic or biased content, we posit that it does not attribute to the search algorithm we propose.
448
+
449
+ A3. Do the abstract and introduction summarize the paper's main claims?
450
+
451
+ Abstract and Section 1.
452
+
453
+ A4. Have you used AI writing assistants when working on this paper?
454
+
455
+ Left blank.
456
+
457
+ B Did you use or create scientific artifacts?
458
+
459
+ We create scientific artifacts. See Section 4 and Appendix.
460
+
461
+ B1. Did you cite the creators of artifacts you used?
462
+
463
+ Not applicable. Left blank.
464
+
465
+ B2. Did you discuss the license or terms for use and / or distribution of any artifacts?
466
+
467
+ It is currently under discussion and processing and we will release the code.
468
+
469
+ B3. Did you discuss if your use of existing artifact(s) was consistent with their intended use, provided that it was specified? For the artifacts you create, do you specify intended use and whether that is compatible with the original access conditions (in particular, derivatives of data accessed for research purposes should not be used outside of research contexts)?
470
+
471
+ Not applicable. Left blank.
472
+
473
+ B4. Did you discuss the steps taken to check whether the data that was collected / used contains any information that names or uniquely identifies individual people or offensive content, and the steps taken to protect / anonymize it?
474
+
475
+ Not applicable. Left blank.
476
+
477
+ B5. Did you provide documentation of the artifacts, e.g., coverage of domains, languages, and linguistic phenomena, demographic groups represented, etc.?
478
+
479
+ Not applicable. Left blank.
480
+
481
+ B6. Did you report relevant statistics like the number of examples, details of train / test / dev splits, etc. for the data that you used / created? Even for commonly-used benchmark datasets, include the number of examples in train / validation / test splits, as these provide necessary context for a reader to understand experimental results. For example, small differences in accuracy on large test sets may be significant, while on small test sets they may not be.
482
+
483
+ Section 4, Section 5 and Appendix.
484
+
485
+ C Did you run computational experiments?
486
+
487
+ Section 4, 5 and 6, and Appendix.
488
+
489
+ C1. Did you report the number of parameters in the models used, the total computational budget (e.g., GPU hours), and computing infrastructure used?
490
+
491
+ We develop an inference algorithm, which does not require substantial computational resource. We provide related information in Appendix.
492
+
493
+ C2. Did you discuss the experimental setup, including hyperparameter search and best-found hyperparameter values?
494
+
495
+ We discuss the experimental setup in Section 4 and Appendix A.
496
+
497
+ C3. Did you report descriptive statistics about your results (e.g., error bars around results, summary statistics from sets of experiments), and is it transparent whether you are reporting the max, mean, etc. or just a single run?
498
+
499
+ We report the descriptive statistics in Section 4, 6 and Appendix.
500
+
501
+ C4. If you used existing packages (e.g., for preprocessing, for normalization, or for evaluation), did you report the implementation, model, and parameter settings used (e.g., NLTK, Spacy, ROUGE, etc.)?
502
+
503
+ We report the usage of existing packages in Section 4 and Appendix. There are also some footnotes providing instructions and details throughout the paper.
504
+
505
+ # D Did you use human annotators (e.g., crowdworkers) or research with human participants?
506
+
507
+ Left blank.
508
+
509
+ D1. Did you report the full text of instructions given to participants, including e.g., screenshots, disclaimers of any risks to participants or annotators, etc.?
510
+
511
+ No response.
512
+
513
+ D2. Did you report information about how you recruited (e.g., crowdsourcing platform, students) and paid participants, and discuss if such payment is adequate given the participants' demographic (e.g., country of residence)?
514
+
515
+ No response.
516
+
517
+ D3. Did you discuss whether and how consent was obtained from people whose data you're using/curating? For example, if you collected data via crowdsourcing, did your instructions to crowdworkers explain how the data would be used?
518
+
519
+ No response.
520
+
521
+ D4. Was the data collection protocol approved (or determined exempt) by an ethics review board?
522
+
523
+ No response.
524
+
525
+ D5. Did you report the basic demographic and geographic characteristics of the annotator population that is the source of the data?
526
+
527
+ No response.
bestksearchalgorithmforneuraltextgeneration/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a9f19c7f8cbe6d91fc137cc7f02dc531b7480b90501cff3fe66117e6389c19d
3
+ size 999270
bestksearchalgorithmforneuraltextgeneration/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec8a03911650dd00953baa580d5b713d05bfce254d6d93e1e282da7501aa293e
3
+ size 651692
bettersimultaneoustranslationwithmonotonicknowledgedistillation/a313c138-4cca-4d7a-b3c1-352a84f3f11d_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b10753acabc627b47e81bcf00aef61610c02efdae7a4cdeef84e3b4013d57106
3
+ size 99974
bettersimultaneoustranslationwithmonotonicknowledgedistillation/a313c138-4cca-4d7a-b3c1-352a84f3f11d_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46ebc02f8d5f0edf80c4386cdf23d7e4b148529060abd5b5aa90a93c83981bc2
3
+ size 122647
bettersimultaneoustranslationwithmonotonicknowledgedistillation/a313c138-4cca-4d7a-b3c1-352a84f3f11d_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93232dffd0a2d744ebd6462561fddc85454e8ed786ede089a194e7ce5e23349b
3
+ size 731693
bettersimultaneoustranslationwithmonotonicknowledgedistillation/full.md ADDED
@@ -0,0 +1,449 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Better Simultaneous Translation with Monotonic Knowledge Distillation
2
+
3
+ Shushu Wang $^{1}$ , Jing Wu $^{2}$ , Kai Fan $^{2}$ , Wei Luo $^{2}$ , Jun Xiao $^{1}$ , Zhongqiang Huang $^{2}$
4
+
5
+ <sup>1</sup>Zhejiang University, <sup>2</sup> Alibaba DAMO Academy
6
+
7
+ {wangshushu0213, junx}@zju.edu.cn
8
+
9
+ {wj334275, k.fan, muzhuo.lw, z.huang}@alibaba-inc.com
10
+
11
+ # Abstract
12
+
13
+ Simultaneous machine translation (SiMT) presents a unique challenge as it requires generating target tokens before the source sentence is fully consumed. This can lead to the hallucination problem, where target tokens are generated without support from the source sentence. The prefix-to-prefix training data used to train SiMT models are not always parallel, due to divergent word order between the source and target languages, and can contribute to the problem. In this paper, we propose a novel approach that leverages traditional translation models as teachers and employs a two-stage beam search algorithm to generate monotonic yet accurate reference translations for sequence-level knowledge distillation. Experimental results demonstrate the significant improvements achieved by our approach over multiple strong SiMT baselines, leading to new state-of-the-art performance across various language pairs. Notably, when evaluated on a monotonic version of the WMT15 De→En test set, which includes references generated in a more monotonic style by professional translators, our approach achieves even more substantial improvement over the baselines. The source code and data are publicly available for further exploration<sup>1</sup>.
14
+
15
+ # 1 Introduction
16
+
17
+ Simultaneous machine translation (SiMT) starts to translate with only a partial observation of the source sentence and can present unique challenges compared to full-sentence translation, particularly when employing offline NMT models. Prefix-to-prefix (P2P) methods such as the wait-k policy (Ma et al., 2019a) have been developed to narrow the gap between training and inference. However, these methods inherently rely on parallelism at the prefix level, which may not always be present in conventional parallel text.
18
+
19
+ # source prefix
20
+
21
+ 韩国对美出口则下滑 $11.8\%$ 因石油产量下滑。
22
+
23
+ # reference prefix
24
+
25
+ Since the sales of oil products declined, Korean exports to U.S. decreased by $11.8\%$ .
26
+
27
+ # monotonic reference prefix
28
+
29
+ South Korea's exports to U.S. fell $11.8\%$ as sales of oil fell.
30
+
31
+ Figure 1: An example of a parallel sentence pair, with color-coded parallel clauses. The boxes highlight the prefixes selected based on a wait-3 approach.
32
+
33
+ <table><tr><td>Trainset</td><td>k=1</td><td>k=3</td><td>k=5</td><td>k=7</td><td>k=9</td></tr><tr><td>WMT15 De→En</td><td>30.4</td><td>15.2</td><td>8.5</td><td>5.1</td><td>3.3</td></tr><tr><td>CWMT19 Zh→En</td><td>25.4</td><td>12</td><td>6.3</td><td>3.6</td><td>2.1</td></tr><tr><td>IWSLT15 En→Vi</td><td>17.3</td><td>5.2</td><td>1.9</td><td>0.8</td><td>0.4</td></tr></table>
34
+
35
+ Table 1: Anticipation rates (AR%) of the original training sets, measuring the percentage of target tokens with a reordering distance $\geq k$ (see definition in Appendix B).
36
+
37
+ The parallel text utilized for training offline MT models exhibits a wide range of word reordering between the source and target languages, resulting in non-parallel prefix-to-prefix pairs, as depicted in Figure 1. Table 1 highlights the challenge faced by a wait- $k$ model, which must predict a significant percentage of target tokens without access to the corresponding words in the source prefix across multiple parallel corpora. For example, when training a wait-3 model on the WMT15 De→En dataset, the model needs to anticipate $15.2\%$ of the target tokens during training, exacerbating the hallucination problem during inference.
38
+
39
+ An alternative approach is to train SiMT models on simultaneous interpretation corpora. However, there are two primary issues. First, the available interpretation training data is scant. Second, due to the real-time nature of simultaneous interpretation, the data tends to be overly simplified, making it less ideal for SiMT models where preservation of information is important. On the other hand, traditional parallel data is abundant. If this data could
40
+
41
+ be restructured to more closely follow the source word order, it would be more beneficial for SiMT models. This is the idea behind approaches such as (Chen et al., 2021). In line with this direction, we propose a two-stage beam search algorithm to reconstruct the training data, producing accurate yet monotonic translations. This restructured data is then utilized to train the SiMT model using knowledge distillation (KD) (Kim and Rush, 2016).
42
+
43
+ Similarly, traditional test sets are less ideal for evaluating SiMT models that produce translations in a more monotonic style. To address this, we constructed a new set of human references for the WMT15 De-En test set that more closely follows the source word order. This new reference can provide a more precise measurement of both translation quality and latency in a SiMT setting.
44
+
45
+ Our primary contributions include:
46
+
47
+ - We have developed a two-stage beam search algorithm to generate accurate monotonic training data. This algorithm is adjustable for different levels of monotonicity and is capable of leveraging both parallel and monolingual corpora.
48
+ - We have curated new human references for the WMT15 De-En test set that is more suitable for evaluating SiMT models. We are pleased to offer these for public access.
49
+ - Our empirical results demonstrate that our approach consistently outperforms strong SiMT baselines. We release both code and data to facilitate future research.
50
+
51
+ # 2 Related Works
52
+
53
+ SiMT Policy There are two types of SiMT policies: fixed and adaptive. Fixed policies, such as wait- $k$ in Ma et al. (2019a), first READ $k$ source tokens and then alternately READ/WRITE one token. Elbayad et al. (2020) proposed an efficient multipath training for the wait- $k$ policy to randomly sample $k$ during training.
54
+
55
+ Adaptive policies make READWRITE decisions dynamically. Gu et al. (2016) decides READ/WRITE actions via reinforcement learning. MILk (Arivazhagan et al., 2019) predicts a Bernoulli variable to determine READ/WRITE actions, which is further implemented into transformer architecture MMA (Ma et al., 2019b). Zheng et al. (2020) developed adaptive wait-k through heuristic ensemble of multiple wait-k mod
56
+
57
+ els. Miao et al. (2021) proposed a generative framework to generate READ/WRITE decisions. Liu et al. (2021) applies Connectionist Temporal Classification (CTC) by treating the blank symbol as the wait action. Zhang and Feng (2022) develops a READ/WRITE policy by modeling the translation process as information transport and taking the received information as the evidence for READ/WRITE decisions.
58
+
59
+ Monotonic SiMT Another approach to SiMT is to focus on producing the target as monotonically as possible with the source. Chen et al. (2021) proposed test-time wait- $k$ to produce pseudoreferences which are non-anticipatory. Han et al. (2021) proposed a method of chunk-wise reordering to refine the target sentences in an offline corpus and build a monotonically aligned parallel corpus for SimulMT. Deng et al. (2022) proposed a novel monolingual sampling strategy for SiMT, considering both chunk length and monotonicity. Chang et al. (2022) decomposed the translation process into a monotonic translation step and a reordering step, which rearranged the hidden states to produce the order in the target language. Our method extends (Chang et al., 2022) to include a rescoring stage based on the full sentence to produce more accurate translations.
60
+
61
+ Knowledge Distillation in NMT Knowledge distillation(KD) approaches (Hinton et al., 2015) aim to transfer knowledge from a teacher model to a student model. Kim and Rush (2016) first applied knowledge distillation to NMT using sequence-level KD. In terms of online NMT, Zhang et al. (2021b) proposed to use a conventional Transformer as the teacher of the incremental Transformer, and tried to embed future information in the model through knowledge distillation. Ren et al. (2020) proposed to transfer knowledge from the attention matrices of simultaneous NMT and ASR models to a simultaneous speech to text translation system.
62
+
63
+ # 3 Background
64
+
65
+ Offline NMT Offline NMT models typically employ an encoder-decoder framework. The encoder has access to the full source sentence $\mathbf{x}$ and maps it into hidden representations. The decoder autoregressively generates each target token $y_{t}$ conditioned on $\mathbf{x}$ and the previously generated tokens, as shown in Eq. (1):
66
+
67
+ $$
68
+ p (\mathbf {y} | \mathbf {x}; \boldsymbol {\theta}) = \prod_ {t = 1} ^ {| \mathbf {y} |} p \left(y _ {t} | \mathbf {x}, \mathbf {y} _ {< t}; \boldsymbol {\theta}\right) \tag {1}
69
+ $$
70
+
71
+ Simultaneous NMT Simultaneous NMT only has access to part of the source sentence. Let $g(t)$ be a monotonic non-decreasing function of $t$ that denotes the number of source tokens processed by the encoder when generating the target word $y_{t}$ . SiMT uses the source prefix $(x_{1}, x_{2}, \dots, x_{g(t)})$ to predict $y_{t}$ as shown in Eq. (2):
72
+
73
+ $$
74
+ p (\mathbf {y} | \mathbf {x}; \boldsymbol {\theta}) = \prod_ {t = 1} ^ {| \mathbf {y} |} p \left(y _ {t} | \mathbf {x} _ {\leq g (t)}, \mathbf {y} _ {< t}; \boldsymbol {\theta}\right) \tag {2}
75
+ $$
76
+
77
+ # 4 Monotonic Translation Construction
78
+
79
+ We propose two approaches for creating monotonic pseudo-targets for source sentences in traditional parallel data. This new data is then used to train SiMT models through knowledge distillation (KD).
80
+
81
+ # 4.1 Standard KD
82
+
83
+ A simple approach is to use an offline NMT model as a teacher to translate each source sentence of the parallel training data into a pseudo-target through beam search, as shown in Algorithm 2 in Appendix A. The resulting (source, pseudo-target) data adheres more closely to the source word order, as machine-translated sentences tend to have fewer long-distance reorderings. This data is then used to train SiMT models through sequence-level knowledge distillation (KD) (Kim and Rush, 2016), with the training loss represented in Eq. (3).
84
+
85
+ $$
86
+ \mathcal {L} _ {\text {s e q} k d} = - \log p (\hat {\mathbf {y}} | \mathbf {x}; \boldsymbol {\theta}) \tag {3}
87
+ $$
88
+
89
+ where $\hat{\mathbf{y}}$ represents the target predicted by the teacher model. Note that this diverges from conventional sequence-level KD training, which also utilizes the training loss over the original references, as the long-distance reorderings in the original data could be detrimental to the SiMT model.
90
+
91
+ # 4.2 Monotonic KD
92
+
93
+ A key drawback of standard KD is that, although the resulting target translations are more monotonic, they still depend on full sentences, and the degree of monotonicity cannot be controlled. To overcome this limitation, we propose a two-stage beam search strategy to produce target translations in a way similar to real-time simultaneous translation, while also preserving the translation quality.
94
+
95
+ ![](images/f285db68c2c1812d753284db2e865d34dc29d2dccf3682633f885eae76773552.jpg)
96
+ Figure 2: Visualization of two-stage beam search algorithm, with beam size $b_{1} = 4$ and $b_{2} = 3$ , and latency $k = 3$ . The 3rd ( $i = 3$ ) target token is being decoded.
97
+
98
+ As detailed in Algorithm 1 and depicted in Figure 2, our approach first translates pieces of the source incrementally, akin to a wait- $k$ policy, and then rescores and selects the better partial hypotheses using a full-sentence offline model.
99
+
100
+ In Stage 1, the streaming source prefix is fed into the offline teacher model to generate the initial $b_{1}$ partial hypotheses at each beam search step following a wait- $k$ policy. This stage simulates real-time simultaneous translation with incremental input, and ensures that the decoding is based on local information, thereby increasing monotonicity. By defining the desired latency $k$ , the monotonicity level of the partial hypotheses can be controlled.
101
+
102
+ In Stage 2, we use the teacher model to rescore each of the $b_{1}$ partial hypotheses conditioned on the full source sentence and only keep the top $b_{2}$ $(b_{2} < b_{1})$ partial hypotheses for the next step in the two-stage beam search process. With this strategy, future information in the source sentence is utilized to improve the quality of top partial hypotheses, while also preserving the local word order dictated by the prefix source.
103
+
104
+ Note that we can reverse the translation direction and construct more monotonic pseudo-source given the original target through backward translation. However, empirical results show that it is inferior than forward translation for SiMT (see Figure 13 in Appendix E), probably due to the discrepancy between pseudo-source and normal source text.
105
+
106
+ ![](images/b99d57ed001981cfc04b0b37e56eeed9fa2bdd8f6755b20080a295883a737472.jpg)
107
+ (a) $\mathrm{De}\rightarrow \mathrm{En}$
108
+
109
+ ![](images/a1e74a896253851058f315b2076c3409b1a7d593a3af84f3e83ce0d49642b56e.jpg)
110
+ (b) $\mathrm{Zn}\rightarrow \mathrm{En}$
111
+
112
+ ![](images/48d1e7b3dc07d86998418b39e9cbc83472e02db30d4dcc34679b7f756160a075.jpg)
113
+ (c) $\mathrm{En}\rightarrow \mathrm{Vi}$
114
+
115
+ ![](images/390b683f943af6bc0851edc945aedfe564b7e59991b476092d523c9bd64d6f12.jpg)
116
+ Figure 3: $k$ -Anticipation Rates ( $AR_{k}$ ) of the training data with original references and pseudo-targets generated by our KD methods.
117
+ (a) $\mathrm{De}\rightarrow \mathrm{En}$ , Transformer-Base
118
+ Figure 4: Evaluation of offline NMT models in offline (dashed) and simultaneous (solid) scenarios.
119
+
120
+ ![](images/49de1d3652495ae2f24949d8c5f4101edf4431143b0ba7dc708428c05c344101.jpg)
121
+ (b) $\mathrm{Z}\mathrm{h}\rightarrow \mathrm{En}$ ,Transformer-Base
122
+
123
+ ![](images/573b789aa4ca84424875368c62f68c7e0dc183660e4bfbde0fc359dc7f8cb9c7.jpg)
124
+ (c) $\mathrm{En}\rightarrow \mathrm{Vi}$ , Transformer-Small
125
+
126
+ # 5 Experiments
127
+
128
+ # 5.1 SiMT Models
129
+
130
+ We conduct experiments on three representative modeling approaches that have been used for simultaneous machine translation.
131
+
132
+ Offline MT: a Transformer NMT model (Vaswani et al., 2017) trained on full sentences.
133
+
134
+ Multipath Wait- $k$ : a wait- $k$ policy model (Elbayad et al., 2020) trained by randomly sampling different $k$ values between batches during training.
135
+
136
+ ITST: an adaptive read/write policy model (Zhang and Feng, 2022) that formulates the translation process as an optimal information transport problem. To the best of our knowledge, ITST is currently the state of the art method for SiMT.
137
+
138
+ # 5.2 Data
139
+
140
+ We select three datasets of different language pairs that have been used before for investigations of SiMT models.
141
+
142
+ WMT15 De→En (Callison-Burch et al., 2009) is a parallel corpus with 4.5M training pairs, which
143
+
144
+ are tokenized and split using 32K BPE merge operations with a shared vocabulary for German and English. We use newstest2013 (3000 sentence pairs) as the development set and report results on newstest2015 (2169 sentence pairs).
145
+
146
+ $\mathbf{CWMT19}^2$ $\mathbf{Z}\mathbf{h}\rightarrow \mathbf{E}\mathbf{n}$ contains 9.4M sentence pairs in the training set, which are tokenized and split using 32K BPE merge operations for both the source and the target languages. We use the validation set of 956 sentence pairs from BSTC (Zhang et al., 2021a) as the test set.
147
+
148
+ IWSLT15 En $\rightarrow$ Vi (Luong and Manning, 2015) contains 133K training pairs. We use TED tst2012 as the validation set (1553 sentence pairs) and TED tst2013 as the test set (1268 sentence pairs). Following the settings in (Ma et al., 2020), we replace rare tokens (frequency $< 5$ ) by <unk>. The resulting vocabulary sizes are 17K and 7.7K for English and Vietnamese respectively.
149
+
150
+ Figure 3 compares AR curves at various $k$ values in both the original and the reconstructed training data with pseudo-targets. Our two KD methods
151
+
152
+ Algorithm 1: Two-Stage Beam Search
153
+ Input: x: source sentence $b_{1}$ : max beam size before rescoring $b_{2}$ : max beam size after rescoring $n_{max}$ : max hypothesis length $k$ : fixed latency $l$ : source length $|\mathbf{x}|$ score $(\cdot ,\cdot)$ : scoring function Output: Best monotonic translation at $k$
154
+ 1 // beam format: (score,hypothesis)
155
+ 2 $B_0,B\gets \{\langle 0,\mathrm{BOS}\rangle \} ,\emptyset$
156
+ 3 for $i\in \{1,\dots ,n_{max}\}$ do
157
+ 4 $B^{\mathrm{before}},B^{\mathrm{after}}\gets \emptyset ,\emptyset$
158
+ 5 for $\langle s,\mathbf{y}\rangle \in B_{i - 1}$ do
159
+ 6 if y.last() = EOS then
160
+ 7 $B.\mathrm{add}(\langle s,\mathbf{y}\rangle)$ continue
161
+ 8
162
+ 9 $l = \min (i + k - 1,\mathbf{x}.len)$ for $y\in \mathcal{V}$ do
163
+ 11 // score by partial input
164
+ 12 $s\gets \mathrm{score}(\mathbf{x}[:l],\mathbf{y}\circ y)$ $B^{\mathrm{before}}.\mathrm{add}(\langle s,\mathbf{y}\circ y\rangle)$
165
+ 13
166
+ 14 $B^{\mathrm{before}}\gets B^{\mathrm{before}}.top(b_1)$ for $\langle s,\mathbf{y}\rangle \in B^{before}$ do
167
+ 16 // score by oracle input
168
+ 17 $s\gets \mathrm{score}(\mathbf{x},\mathbf{y})$ $B^{\mathrm{after}}.\mathrm{add}(\langle s,\mathbf{y}\rangle)$
169
+ 18
170
+ 19 $Bi\gets B^{\mathrm{after}}\gets B^{\mathrm{after}}.top(b_2)$
171
+ 20 return B.max()
172
+
173
+ can effectively reduce the anticipation rate across all language pairs at different $k$ values, with monotonic KD typically resulting in a lower anticipation rate compared to the standard KD. Our experiments are focused on understanding the impact of changes on the translation quality of SiMT models.
174
+
175
+ To properly evaluate SiMT performance, the test sets should be representative of the characteristics of real-time simultaneous translation, in both content and translation style. In addition to the official test sets described earlier, we choose to adapt the WMT newstest2015 De→En data set for real-time speech translation. We select 500 sentence pairs from this data set and ask professional translators to produce new reference translations, with as much monotonicity as linguistically possible without compromising the translation quality. The detail of this annotation task can be found in the Appendix D.
176
+
177
+ ![](images/8b2787c706a9b322d1c3a171a7bc110c517de72f940eee492dbe5766f3407a18.jpg)
178
+ Figure 5: Visualization of cross-attention matrix of $\mathrm{Zh}\rightarrow \mathrm{En}$ offline MT. Left: trained on original corpus. Right: trained with pseudo-targets produced by monotonic KD.
179
+
180
+ ![](images/688bd8fb9580eddfc817d267c1553ea31aeb14933e57061673ccecb33e9f0583.jpg)
181
+
182
+ # 5.3 Experimental Setup
183
+
184
+ We use Transformer-base models for the $\mathrm{De} \rightarrow \mathrm{En}$ and $\mathrm{Zh} \rightarrow \mathrm{En}$ translation directions and Transformersmall mdoels for $\mathrm{En} \rightarrow \mathrm{Vi}$ . Our model configurations generally follow the experiment settings detailed in Multipath Wait- $k^3$ and ITST $^4$ . For generating pseudo-targets, we use a beam size of 5 in standard KD, and in our two-stage monotonic KD method we set beam sizes $b_1 = 10$ and $b_2 = 5$ , with the latency value $k$ set to 7, 7, 6 for De-En, Zh-En, and En-Vi respectively.
185
+
186
+ For evaluation, we use tokenized case-insensitive $\mathrm{BLEU}^5$ for translation quality and Average Lagging (AL, token level) (Ma et al., 2019a) to measure latency.
187
+
188
+ # 5.4 Main Results
189
+
190
+ We first train an offline MT model for each of the three language pairs on the original training data, and then obtain pseudo parallel data and train Multipath Wait- $k$ and ITST models using the regular and monotonic KD methods described in Section 4.
191
+
192
+ Offline MT Evaluation For each language pair, we train two additional offline models, one for each of the two KD methods. We evaluate these models in both offline and simultaneous scenarios, adopting a simple wait- $k$ policy for the latter. The results are presented in Figure 4. The offline mod
193
+
194
+ ![](images/8bd065648d2e0411e00786ad3e7bef9658e98b79bef9a334b028804bcae9e077.jpg)
195
+ (a) $\mathrm{De}\rightarrow \mathrm{En}$ , Transformer-Base
196
+
197
+ ![](images/ae4f9351c378590b29c95bd2521dbae041b9d361041123120b59dc0251177fdd.jpg)
198
+ (b) $\mathrm{Zh}\rightarrow \mathrm{En}$ ,Transformer-Base
199
+
200
+ ![](images/fda6eff29a3985d1a14f9aba4bd460ebeebd86c6054bc87b1bdbc442fa5c03fc.jpg)
201
+ (c) $\mathrm{En}\rightarrow \mathrm{Vi}$ , Transformer-Small
202
+
203
+ ![](images/3269d6add3bdf1aff7e02072dc19ca855cb49cc821d76523e3c83eed28bf63a4.jpg)
204
+ Figure 6: Evaluation of multipath wait- $k$ models in offline (dashed) and simultaneous (solid) scenarios.
205
+ (a) De→En, Transformer-Base
206
+ Figure 7: Evaluation of ITST models in offline (dashed) and simultaneous (solid) scenarios.
207
+
208
+ ![](images/c9c1a136ed5a7ac2fafcd38a55674436ca5497a35070f422f64ad86245957e23.jpg)
209
+ (b) $\mathrm{Z}\mathrm{h}\rightarrow \mathrm{En}$ ,Transformer-Base
210
+
211
+ ![](images/6924be388bb31e0e14f6c604e6a40d51a5e0ae23de047882893b4f6ed71c8a99.jpg)
212
+ (c) $\mathrm{En}\rightarrow \mathrm{Vi}$ , Transformer-Small
213
+
214
+ els perform significantly worse in the streaming scenario, especially when at a low latency, due to the discrepancy between full-sentence training and prefix-to-prefix inference. The two models trained on pseudo-target data exhibit considerable improvements, with an average improvement of more than 2 BLEU points across all latency settings on the De→En test set in particular.
215
+
216
+ We attribute this improvement to the more monotonic nature of the pseudo data generated through KD. Models trained with this data can better model local source-target relationships, which leads to higher quality translations on partial source inputs. This is reflected in Figure 5, where the mass of cross-attention weights concentrate around the diagonal.
217
+
218
+ Multipath Wait- $k$ We train wait- $k$ SiMT models, following (Elbayad et al., 2020), on the original training data as well as the reconstructed training data with pseudo-target produced by the two KD
219
+
220
+ methods. As shown in Figure 6, two KD methods are both able to significantly improve translation quality across latency settings.
221
+
222
+ ITST Finally we train ITST models, following Zhang and Feng (2022), to see if our methods can achieve similar improvements with advanced adaptive read/write models. The results are shown in Figure 7. Similarly, we observe overall improvement in translation quality by training ITST models on the pseudo data. As illustrated in the example in Figure 9, the decoding path of the mono-KD trained ITST model is closer to the diagonal and its translation is more faithful and monotonic to the source input.
223
+
224
+ # 5.5 Evaluation on Monotonic Test Set
225
+
226
+ Although the pseudo data constructed by the monotonic KD method has a lower AR, as shown in Figure 3, models trained with the standard KD method typically achieve higher BLEU scores in many cases in Figure 4, 6, and 7. One possibility is that the references in the original test sets were not produced with a focus on simultaneous translation,
227
+
228
+ ![](images/ec71b6f59fc9355e7c852dda03a3d1be115acba6286a10b79030c9211ee86c47.jpg)
229
+ (a) wait- $k$ by offline
230
+
231
+ ![](images/2f74139e60b25f6c0c933f1b8232bd317cd38df5923392da132c384dfdd7b3c7.jpg)
232
+ (b) multipath wait- $k$
233
+
234
+ ![](images/4460add6954b60ad4f3166241c4050094ce9da976446172e724a47e48bd4c7b8.jpg)
235
+ (c) ITST
236
+
237
+ ![](images/70e021361a5f688fd2b089fb9bfe5fcd6a05b321ea8085e9a4bbbf20f91e89f7.jpg)
238
+ Figure 9: Visualization of R/W paths taken during inference for ITST models trained on the original corpus (blue) and trained with pseduo-targets produced by the monotonic KD method (red).
239
+
240
+ and thus can not accurately measure improvement in translation quality of more monotonic translations. To test this hypothesis, we took the first 500 pairs from the $\mathrm{De} \rightarrow \mathrm{En}$ test set and commissioned a new set of reference translations that are as monotonic as possible without sacrificing the translation quality. We re-evaluated our $\mathrm{De} \rightarrow \mathrm{En}$ models on this monotonic test set and the results are shown in Figure 8. Compared to the previous results on the original test set, the improvement from the monotonic KD method becomes more prominent, on par with the standard KD method or in many cases outperforming. Moreover, the overall improvement from the KD methods also becomes greater on this monotonic test set. Although the monotonic test set is only a subset of the original test set, the same conclusion holds when only comparing results on this subset (see performance of the multipath wait- $k$ method on the original subset in Figure 14 in Appendix E).
241
+
242
+ ![](images/af427a8774a92c6fc9d283249fa2900e8ef078dd1353badb8c1edfdae722e116.jpg)
243
+ Figure 8: Evaluation on the monotonic test set for $\mathrm{De}\rightarrow \mathrm{En}$
244
+ Figure 10: Effect of monolingual data on multipath wait-k models on WMT15 De→En.
245
+
246
+ # 5.6 Scaling with Monolingual Data
247
+
248
+ Given that only source sentences are needed for an offline teacher model to produce pseudo-targets, we can expand the KD training data by generating pseudo-targets using monolingual data. We conducted experiments on WMT15 De $\rightarrow$ En and collected 1 and 4 times of additional pseudo parallel data using the monotonic KD method on German sentences selected from News Crawl articles, excluding sentences longer than 190 characters. The results with the multipath wait- $k$ model are presented in Figure 10. The improvements from more pseudo data suggest that the ability to use a monolingual source corpus is another advantage of our approach.
249
+
250
+ In Figure 11, we focus on WMT15 De→En and demonstrate how our approach can further advance the current state of the art in SiMT. We take ITST, the current SOTA in SiMT, as our modeling method, and compare with ITST and another recent SiMT method wait-info (Zhang et al., 2022a). For a
251
+
252
+ <table><tr><td>hypotheses</td><td>k=1</td><td>k=3</td><td>k=5</td><td>k=7</td><td>k=9</td></tr><tr><td>origin</td><td>3.1</td><td>1.8</td><td>1.3</td><td>1.1</td><td>1</td></tr><tr><td>mono KD</td><td>2.2</td><td>1.2</td><td>1</td><td>0.8</td><td>0.8</td></tr><tr><td>KD</td><td>3</td><td>1.5</td><td>1</td><td>0.8</td><td>0.8</td></tr></table>
253
+
254
+ ![](images/e7295c186358dbf3abb8e0a2622b2351853aa40b7219246edc16f50a405d3c19.jpg)
255
+ Figure 11: Comparison with SOTAs on WMT15 De $\rightarrow$ En.
256
+
257
+ fair comparison, we rerun the original ITST and observe a minor performance dip under high latency conditions. The results show that the monotonic KD method combined with additional monolingual data can achieve new state of the art for SiMT.
258
+
259
+ # 5.7 Effects on Hallucination
260
+
261
+ Hallucination, a known issue in machine translation models, presents significant challenges for real-time simultaneous translation. Hallucination Rate $(\mathrm{HR}\%)$ (Chen et al., 2021) measures the percentage of words in the target output that are hallucinated (see full definition in Appendix C). We compare the HR% of multipath wait- $k$ models trained on the original parallel data or the pseudo data constructed by the KD methods. As shown in Table 2, the monotonic KD method has the lowest HR% across different latency settings. Examples of hallucination in translation results can be found in Table 6 of Appendix E.
262
+
263
+ # 6 Discussions
264
+
265
+ The first beam search stage of our monotonic KD method is equivalent to test-time wait- $k$ inference described in (Chen et al., 2021). This stage, however, may fail to produce accurate rankings of partial hypotheses, given that it relies on offline models for translating partial inputs. The second stage beach search, designed to incorporate full sentence
266
+
267
+ Table 2: HR% of multipath wait- $k$ models on WMT15 De $\rightarrow$ En.
268
+
269
+ <table><tr><td>Mono KD</td><td>Offline</td><td>k=1</td><td>k=3</td><td>k=5</td><td>k=7</td></tr><tr><td>one-stage</td><td>33.15</td><td>21.38</td><td>25.20</td><td>27.71</td><td>29.51</td></tr><tr><td>two-stage</td><td>33.15</td><td>25.36</td><td>28.86</td><td>30.78</td><td>32.39</td></tr></table>
270
+
271
+ information, is capable of more accurately scoring and ranking these partial hypotheses. We conducted an analysis on the WMT15 De→En test set to compare the quality of translations produced by test-time wait-k (i.e., monotonic one-stage beam search) and our monotonic two-stage beam search. As shown in Table 3, the rescoring process in the second stage significantly improves translation quality.
272
+
273
+ Table 4 shows the quality of pseudo-targets generated by standard KD, monotonic one-stage beam search, and monotonic two-stage beam search, measured in BLEU with respect to the original references. Across both $\mathrm{De}\rightarrow \mathrm{En}$ and $\mathrm{En}\rightarrow \mathrm{Vi}$ , the standard KD achieves the highest BLEU scores, closely followed by the monotonic KD method that uses two-stage beam search. The one-stage only beam search method results in the lowest translation quality among the three approaches, particularly on $\mathrm{De}\rightarrow \mathrm{En}$ where the BLEU score is 4 points lower. Figure 12 illustrates the performance of multipath wait- $k$ models trained on the respective training data. The two-stage method consistently outperforms the one-stage method on $\mathrm{De}\rightarrow \mathrm{En}$ and is better in most latency settings on $\mathrm{En}\rightarrow \mathrm{Vi}$ . It is notable that the one-stage method leads to substantially inferior SiMT models on $\mathrm{De}\rightarrow \mathrm{En}$ due to the markedly lower quality of the pseudo-targets.
274
+
275
+ Table 3: BLEU of monotonic KD-produced test set vs. original test set on WMT15 De→En.
276
+
277
+ <table><tr><td>Pseudo-Refs</td><td>De→En</td><td>En→Vi</td></tr><tr><td>Mono-KD(One-Stage)</td><td>31.66</td><td>37.89</td></tr><tr><td>Mono-KD(Two-Stage)</td><td>34.33</td><td>38.46</td></tr><tr><td>KD</td><td>35.74</td><td>38.52</td></tr></table>
278
+
279
+ Table 4: BLEU of KD-produced training data vs. original.
280
+
281
+ # 7 Conclusion
282
+
283
+ Long-distance reorderings in conventional parallel data can negatively impact the training of simultaneous translation models. To address this problem, we propose a novel two-stage beam search algorithm to generate monotonic yet accurate pseudo translations that are then used to train SiMT mod
284
+
285
+ ![](images/dfbfb70f433a2baec7c2f1ec34bd34f33f863ec4a3dead9ec3e2efd1894e646a.jpg)
286
+ Figure 12: Comparison of different KD methods with multipath wait- $k$ models.
287
+
288
+ els through sequence-level knowledge distillation. Experiments on three language pairs demonstrate that this method can consistently improve multiple SiMT models and achieve new state of the art performance for simultaneous translation.
289
+
290
+ # Limitations
291
+
292
+ Our monotonic KD approach requires searching for a hyper-parameter $k$ to strike a balance between monotonicity and translation quality for generating pseudo-targets. The current process requires substantial computational resources to determine the optimal value, which may be different depending on the dataset. More studies are needed to establish an efficient method.
293
+
294
+ # Acknowledgements
295
+
296
+ We would like to thank all the anonymous reviewers for the insightful and helpful comments. This work was supported by Alibaba Research Intern Program, the National Key Research & Development Project of China (2021ZD0110700), the National Natural Science Foundation of China (U19B2043, 61976185), and the Fundamental Research Funds for the Central Universities (226-2022-00051). This work was done during the first author's internship at Alibaba DAMO Academy.
297
+
298
+ # References
299
+
300
+ 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. arXiv preprint arXiv:1906.05218.
301
+ Chris Callison-Burch, Philipp Koehn, Christof Monz, and Josh Schroeder. 2009. Findings of the 2009 Workshop on Statistical Machine Translation. In
302
+
303
+ Proceedings of the Fourth Workshop on Statistical Machine Translation, pages 1-28, Athens, Greece. Association for Computational Linguistics.
304
+ Chih-Chiang Chang, Shun-Po Chuang, and Hung-yi Lee. 2022. Anticipation-free training for simultaneous machine translation. In Proceedings of the 19th International Conference on Spoken Language Translation (IWSLT 2022), pages 43-61.
305
+ Junkun Chen, Renjie Zheng, Atsuhito Kita, Mingbo Ma, and Liang Huang. 2021. Improving simultaneous translation by incorporating pseudo-references with fewer reorderingings. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 5857-5864.
306
+ Hexuan Deng, Liang Ding, Xuebo Liu, Meishan Zhang, Dacheng Tao, and Min Zhang. 2022. Improving simultaneous machine translation with monolingual data. arXiv preprint arXiv:2212.01188.
307
+ 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.
308
+ Maha Elbayad, Laurent Besacier, and Jakob Verbeek. 2020. Efficient wait-k models for simultaneous machine translation. arXiv preprint arXiv:2005.08595.
309
+ Jiatao Gu, Graham Neubig, Kyunghyun Cho, and Victor OK Li. 2016. Learning to translate in real-time with neural machine translation. arXiv preprint arXiv:1610.00388.
310
+ Hyojung Han, Seokchan Ahn, Yoonjung Choi, Insoo Chung, Sangha Kim, and Kyunghyun Cho. 2021. Monotonic simultaneous translation with chunkwise reordering and refinement. arXiv preprint arXiv:2110.09646.
311
+ Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531.
312
+ Yoon Kim and Alexander M Rush. 2016. Sequence-level knowledge distillation. arXiv preprint arXiv:1606.07947.
313
+ Dan Liu, Mengge Du, Xiaoxi Li, Ya Li, and Enhong Chen. 2021. Cross attention augmented transducer networks for simultaneous translation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 39-55.
314
+ Minh-Thang Luong and Christopher D Manning. 2015. Stanford neural machine translation systems for spoken language domains. In Proceedings of the 12th International Workshop on Spoken Language Translation: Evaluation Campaign.
315
+
316
+ Mingbo Ma, Liang Huang, Hao Xiong, Renjie Zheng, Kaibo Liu, Baigong Zheng, Chuanqiang Zhang, Zhongjun He, Hairong Liu, Xing Li, et al. 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.
317
+ Xutai Ma, Juan Pino, James Cross, Liezl Puzon, and Jiatao Gu. 2019b. Monotonic multihead attention. arXiv preprint arXiv:1909.12406.
318
+ Xutai Ma, Juan Miguel Pino, James Cross, Liezl Puzon, and Jiatao Gu. 2020. Monotonic multihead attention. In International Conference on Learning Representations.
319
+ Yishu Miao, Phil Blunsom, and Lucia Specia. 2021. A generative framework for simultaneous machine translation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6697-6706.
320
+ Yi Ren, Jinglin Liu, Xu Tan, Chen Zhang, Tao Qin, Zhou Zhao, and Tie-Yan Liu. 2020. Simulspeech: End-to-end simultaneous speech to text translation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 3787-3796.
321
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems, 30.
322
+ Ruiqing Zhang, Xiyang Wang, Chuanqiang Zhang, Zhongjun He, Hua Wu, Zhi Li, Haifeng Wang, Ying Chen, and Qinfei Li. 2021a. Bstc: A large-scale chinese-english speech translation dataset. arXiv preprint arXiv:2104.03575.
323
+ Shaolei Zhang and Yang Feng. 2022. Information-transport-based policy for simultaneous translation. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Online and Abu Dhabi. Association for Computational Linguistics.
324
+ Shaolei Zhang, Yang Feng, and Liangyou Li. 2021b. Future-guided incremental transformer for simultaneous translation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 14428-14436.
325
+ Shaolei Zhang, Shoutao Guo, and Yang Feng. 2022a. Wait-info policy: Balancing source and target at information level for simultaneous machine translation.
326
+ Shaolei Zhang, Shoutao Guo, and Yang Feng. 2022b. Wait-info policy: Balancing source and target at information level for simultaneous machine translation. In Findings of the Association for Computational Linguistics: EMNLP 2022, Online and Abu Dhabi. Association for Computational Linguistics.
327
+
328
+ Baigong Zheng, Kaibo Liu, Renjie Zheng, Mingbo Ma, Hairong Liu, and Liang Huang. 2020. Simultaneous translation policies: From fixed to adaptive. arXiv preprint arXiv:2004.13169.
329
+
330
+ # A Algorithm of Standard Beam Search
331
+
332
+ Algorithm 2: Standard Beam Search
333
+ Input: x: source sentence b: max beam size $n_{max}$ : max hypothesis length score $(\cdot ,\cdot)$ : scoring function Output: Best hypothesis
334
+ 1 $B_0\gets \{\langle 0,\mathrm{BOS}\rangle \}$
335
+ 2 for $i\in \{1,\dots ,n_{max}\}$ do
336
+ 3 $B\gets \emptyset$
337
+ 4 for $\langle s,\mathbf{y}\rangle \in B_{i - 1}$ do
338
+ 5 if y.last() = EOS then
339
+ 6 $B.\mathrm{add}(\langle s,\mathbf{y}\rangle)$ continue
340
+ 7
341
+ 8 for $y\in \mathcal{V}$ do
342
+ 9 $s\gets \mathrm{score}(\mathbf{x},\mathbf{y}\circ y)$
343
+ 10 $B.\mathrm{add}(\langle s,\mathbf{y}\circ y\rangle)$
344
+ 11 $B_i\gets B.\mathrm{top}(b)$
345
+ 12 return B.max()
346
+
347
+ # B Anticipation Rate of (Pseudo-)Refs
348
+
349
+ During the training of a simultaneous translation model, an anticipation happens when a target word is generated before the corresponding source word is encoded. To identify the anticipations, we need the word alignment between the parallel sentences.
350
+
351
+ We use fast-align in our experiments (Dyer et al., 2013) to get a word alignment $a$ between a source sentence $\mathbf{x}$ and a target sentence $\mathbf{y}$ . It is a set of source-target word index pairs $(s, t)$ where the $s^{\mathrm{th}}$ source word $x_{s}$ aligns with the $t^{\mathrm{th}}$ target word $y_{t}$ .
352
+
353
+ Formally, a target word $y_{t}$ is $k$ -anticipated $(A_{k}(t,a) = 1)$ if it aligns to at least one source word $\mathbf{x}_s$ where $s \geq t + k$ :
354
+
355
+ $$
356
+ A _ {k} (t, a) = \mathbb {1} [ \{(s, t) \in a | s \geq t + k \} \neq \varnothing ]
357
+ $$
358
+
359
+ The $k$ -anticipation rate $(AR_{k})$ of an $(\mathbf{x},\mathbf{y},\mathbf{a})$ triple is further defined under wait- $k$ policy:
360
+
361
+ $$
362
+ A R _ {k} (\mathbf {x}, \mathbf {y}, a) = \frac {1}{| \mathbf {y} |} \sum_ {t = 1} ^ {| \mathbf {y} |} A _ {k} (t, a)
363
+ $$
364
+
365
+ # C Hallucination Rate of Hypotheses
366
+
367
+ HR is defined to quantify the number of hallucinations in decoding. A target word $\hat{y}_t$ is a hallucination if it can not be aligned to any source word.
368
+
369
+ Formally, based on word alignment $a$ , whether target word $\hat{y}_t$ is a hallucination is
370
+
371
+ $$
372
+ H (t, a) = \mathbb {1} [ \{(s, t) \in a \} = \varnothing ] \tag {4}
373
+ $$
374
+
375
+ Hallucination rate $HR$ is further defined as
376
+
377
+ $$
378
+ H R (\mathbf {x}, \hat {\mathbf {y}}, a) = \frac {1}{| \hat {\mathbf {y}} |} \sum_ {t = 1} ^ {| \hat {\mathbf {y}} |} H (t, a)
379
+ $$
380
+
381
+ # D WMT15 De→En Test Set Annotations
382
+
383
+ In order to properly evaluate the quality of SiMT, we expect to remove the long-distance reorderings in the test set. So we ask the professional interpreters to rephrase the references in the test set of WMT15 De→En into simultaneous style. We hired two profession interpreters and spent 888 US dollars in total to get the monotonic test set. The annotation guidelines we provided with them are as follows:
384
+
385
+ - A monotonic translation should be faithful and fluent, following common practices in professional translation of sentences, without adding, deleting, or substituting meaningful information in the source sentence. The original professional translations are provided for reference only and annotators should feel free to start from scratch, or reuse the original translation and make necessary edits, in order to produce a monotonic translation that is faithful and fluent.
386
+ - A monotonic translation should reduce long distance reordering between words and try to emulate the word order in the source language if possible, under the requirement of criterion 1.
387
+ - While it can be difficult and time-consuming to come up with the best monotonic translation for a source sentence, we require reasonable effort to create a more monotonic translation that is quantitatively better than the original translation according to criterion 2, unless the original translation is already monotonic.
388
+ - There may exist multiple monotonic translations for a source sentence with varying degrees of monotonicity. We require reasonable effort to create a more monotonic translation but it does not need to be the most monotonic translation. We welcome diversity in monotonic translation and would collect multiple versions of monotonic translations from different in-house and external professional translators.
389
+
390
+ ![](images/2833b8e0094690f782c03339734922bee327a3a8b26921cdb13a1fe6ec6969e0.jpg)
391
+ E Additional Training Details and Experimental Results
392
+
393
+ ![](images/e9be3807e709e0b030d16409859476d3a8d2588640082e64b50f46cafc07090b.jpg)
394
+ Figure 13: Evaluation of back-translation on multipath wait- $k$ models on WMT15 De→En. We re-generate monotonic source input by standard beam search and trained a multipath wait- $k$ model on it.
395
+ Figure 14: Evaluation of multipath wait- $k$ models on the original first 500 pairs test set of WMT15 De $\rightarrow$ En.
396
+
397
+ # F Numerical Results
398
+
399
+ The numerical results of the main SiMT systems are presented in table 5 and table 7.
400
+
401
+ <table><tr><td rowspan="10">origin</td><td colspan="3">Multipath Wait-k</td></tr><tr><td colspan="3">De-En</td></tr><tr><td>k</td><td>AL</td><td>BLEU</td></tr><tr><td>3</td><td>2.12</td><td>26.21</td></tr><tr><td>5</td><td>4.09</td><td>28.53</td></tr><tr><td>7</td><td>6.03</td><td>29.72</td></tr><tr><td>9</td><td>7.9</td><td>30.69</td></tr><tr><td>11</td><td>9.7</td><td>31.11</td></tr><tr><td>13</td><td>11.42</td><td>31.41</td></tr><tr><td>+∞</td><td>-</td><td>32.25</td></tr><tr><td rowspan="8">mono KD</td><td>k</td><td>AL</td><td>BLEU</td></tr><tr><td>3</td><td>2.23</td><td>26.74</td></tr><tr><td>5</td><td>4.41</td><td>28.98</td></tr><tr><td>7</td><td>6.34</td><td>30.46</td></tr><tr><td>9</td><td>8.19</td><td>31.20</td></tr><tr><td>11</td><td>10.0</td><td>31.59</td></tr><tr><td>13</td><td>11.72</td><td>31.78</td></tr><tr><td>+∞</td><td>-</td><td>32.15</td></tr><tr><td rowspan="8">mono KD +monol*1</td><td>k</td><td>AL</td><td>BLEU</td></tr><tr><td>3</td><td>2.22</td><td>27.38</td></tr><tr><td>5</td><td>4.49</td><td>29.61</td></tr><tr><td>7</td><td>6.39</td><td>31.27</td></tr><tr><td>9</td><td>8.23</td><td>32.10</td></tr><tr><td>11</td><td>10.03</td><td>32.38</td></tr><tr><td>13</td><td>11.77</td><td>32.57</td></tr><tr><td>+∞</td><td>-</td><td>32.76</td></tr><tr><td rowspan="8">mono KD +monol*4</td><td>k</td><td>AL</td><td>BLEU</td></tr><tr><td>3</td><td>1.91</td><td>26.77</td></tr><tr><td>5</td><td>4.36</td><td>29.90</td></tr><tr><td>7</td><td>6.27</td><td>31.52</td></tr><tr><td>9</td><td>8.19</td><td>32.39</td></tr><tr><td>11</td><td>10.00</td><td>32.51</td></tr><tr><td>13</td><td>11.73</td><td>32.59</td></tr><tr><td>+∞</td><td>-</td><td>33.01</td></tr><tr><td rowspan="10">origin</td><td colspan="3">ITST</td></tr><tr><td>delta</td><td>AL</td><td>BLEU</td></tr><tr><td>0.2</td><td>2.15</td><td>24.88</td></tr><tr><td>0.3</td><td>2.69</td><td>28.25</td></tr><tr><td>0.4</td><td>3.74</td><td>29.50</td></tr><tr><td>0.5</td><td>5.28</td><td>30.54</td></tr><tr><td>0.6</td><td>7.21</td><td>31.00</td></tr><tr><td>0.7</td><td>9.50</td><td>31.22</td></tr><tr><td>0.8</td><td>12.39</td><td>31.21</td></tr><tr><td>+∞</td><td>-</td><td>32.25</td></tr><tr><td rowspan="9">mono KD</td><td>delta</td><td>AL</td><td>BLEU</td></tr><tr><td>0.2</td><td>2.15</td><td>24.91</td></tr><tr><td>0.3</td><td>2.45</td><td>27.50</td></tr><tr><td>0.4</td><td>3.16</td><td>29.13</td></tr><tr><td>0.5</td><td>4.34</td><td>30.01</td></tr><tr><td>0.6</td><td>6.17</td><td>30.98</td></tr><tr><td>0.7</td><td>8.59</td><td>31.41</td></tr><tr><td>0.8</td><td>12.09</td><td>31.58</td></tr><tr><td>+∞</td><td>-</td><td>32.15</td></tr><tr><td rowspan="9">mono KD +monol*1</td><td>delta</td><td>AL</td><td>BLEU</td></tr><tr><td>0.2</td><td>2.13</td><td>25.25</td></tr><tr><td>0.3</td><td>2.33</td><td>27.96</td></tr><tr><td>0.4</td><td>2.89</td><td>29.53</td></tr><tr><td>0.5</td><td>3.85</td><td>30.60</td></tr><tr><td>0.6</td><td>5.42</td><td>31.54</td></tr><tr><td>0.7</td><td>7.80</td><td>32.06</td></tr><tr><td>0.8</td><td>11.59</td><td>32.29</td></tr><tr><td>+∞</td><td>-</td><td>32.76</td></tr></table>
402
+
403
+ Table 5: Numerical Results in figure 10 and figure 11.
404
+
405
+ <table><tr><td>Input</td><td>第二种反馈功能是针对NLU结果的干预。</td></tr><tr><td>RefWait-3(origin)Wait-3(mono KD)Wait-3(KD)</td><td>The second function is intervening in NLU results .the second feedback function is designed for NLU results .the second feedback function is to target the intervention of NLU results .the second feedback function is to target NLU results intervention .</td></tr><tr><td>Input</td><td>那么在这个对话过程中发生了什么事情呢?</td></tr><tr><td>RefWait-3(origin)Wait-3(mono KD)Wait-3(KD)</td><td>What happened during this dialogue ?so what is the difference between what happened in this conversation ?so in this conversation , what happened ?so what do you think happened in this conversation ?</td></tr><tr><td>Input</td><td>我觉得从我的角度看,从我们现在的角度看,是时候了。</td></tr><tr><td>RefITST-0.4(origin)ITST-0.4(mono KD)ITST-0.4(KD)</td><td>I think from my perspective , from our perspective , it is about time .I think it&#x27;s a good idea to look at it from my point of view .I think from my point of view , from our point of view , it is time .I think from my point of view , from our present point of view , it is time .</td></tr><tr><td>Input</td><td>我们啊,只能用没有游戏功能的电子产品。</td></tr><tr><td>RefITST-0.4(origin)ITST-0.4(mono KD)ITST-0.4(KD)</td><td>So we are only permitted to use digital products without any gaming functions .we can only use the game without the electronic product .we can only use the game-free electronic products .we can only use the ability to use electronic products without game function .</td></tr></table>
406
+
407
+ Table 6: Translation Examples of models trained with original courpus and our (mono)KD-produced corpus. The first two examples are translated by multipath model with a wait-3 policy. The last two examples are translated by ITST with threshold 0.4. Texts in red are considered hallucination of SiMT.
408
+
409
+ <table><tr><td rowspan="3">origin</td><td colspan="12">Multipath Wait-k</td></tr><tr><td colspan="3">De-En</td><td colspan="3">De-En(Re-anno)</td><td colspan="3">Zh-En</td><td colspan="3">En-Vi</td></tr><tr><td>k</td><td>AL</td><td>BLEU</td><td>k</td><td>AL</td><td>BLEU</td><td>k</td><td>AL</td><td>BLEU</td><td>k</td><td>AL</td><td>BLEU</td></tr><tr><td>3</td><td>2.12</td><td>26.21</td><td>3</td><td>2.37</td><td>30.60</td><td>1</td><td>1.18</td><td>11.70</td><td>1</td><td>3.20</td><td>27.67</td><td></td></tr><tr><td>5</td><td>4.09</td><td>28.53</td><td>5</td><td>4.18</td><td>32.98</td><td>3</td><td>2.85</td><td>14.22</td><td>3</td><td>4.73</td><td>29.68</td><td></td></tr><tr><td>7</td><td>6.03</td><td>29.72</td><td>7</td><td>6.06</td><td>33.33</td><td>5</td><td>4.58</td><td>15.75</td><td>5</td><td>6.43</td><td>30.12</td><td></td></tr><tr><td>9</td><td>7.9</td><td>30.69</td><td>9</td><td>7.87</td><td>34.02</td><td>7</td><td>6.33</td><td>16.74</td><td>7</td><td>8.11</td><td>30.18</td><td></td></tr><tr><td>11</td><td>9.7</td><td>31.11</td><td>11</td><td>9.66</td><td>34.53</td><td>9</td><td>7.95</td><td>17.21</td><td>9</td><td>9.70</td><td>30.09</td><td></td></tr><tr><td>13</td><td>11.42</td><td>31.41</td><td>13</td><td>11.44</td><td>34.93</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td></td></tr><tr><td>+∞</td><td>-</td><td>32.25</td><td>+∞</td><td>-</td><td>33.62</td><td>+∞</td><td>-</td><td>17.49</td><td>+∞</td><td>-</td><td>29.61</td><td></td></tr><tr><td>mono KD</td><td>k</td><td>AL</td><td>BLEU</td><td>k</td><td>AL</td><td>BLEU</td><td>k</td><td>AL</td><td>BLEU</td><td>k</td><td>AL</td><td>BLEU</td></tr><tr><td>3</td><td>2.23</td><td>26.74</td><td>3</td><td>2.17</td><td>31.40</td><td>1</td><td>1.29</td><td>11.82</td><td>1</td><td>3.02</td><td>28.18</td><td></td></tr><tr><td>5</td><td>4.41</td><td>28.98</td><td>5</td><td>4.37</td><td>33.86</td><td>3</td><td>2.97</td><td>14.87</td><td>3</td><td>4.69</td><td>30.28</td><td></td></tr><tr><td>7</td><td>6.34</td><td>30.46</td><td>7</td><td>6.36</td><td>34.37</td><td>5</td><td>4.71</td><td>16.38</td><td>5</td><td>6.45</td><td>30.79</td><td></td></tr><tr><td>9</td><td>8.19</td><td>31.20</td><td>9</td><td>8.21</td><td>35.18</td><td>7</td><td>6.42</td><td>17.40</td><td>7</td><td>8.16</td><td>30.80</td><td></td></tr><tr><td>11</td><td>10.0</td><td>31.59</td><td>11</td><td>9.99</td><td>35.35</td><td>9</td><td>8.05</td><td>17.71</td><td>9</td><td>9.73</td><td>30.77</td><td></td></tr><tr><td>13</td><td>11.72</td><td>31.78</td><td>13</td><td>11.74</td><td>35.75</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td></td></tr><tr><td>+∞</td><td>-</td><td>32.15</td><td>+∞</td><td>-</td><td>36.18</td><td>+∞</td><td>-</td><td>17.88</td><td>+∞</td><td>-</td><td>30.6</td><td></td></tr><tr><td>KD</td><td>k</td><td>AL</td><td>BLEU</td><td>k</td><td>AL</td><td>BLEU</td><td>k</td><td>AL</td><td>BLEU</td><td>k</td><td>AL</td><td>BLEU</td></tr><tr><td>3</td><td>2.23</td><td>26.32</td><td>3</td><td>2.45</td><td>31.53</td><td>1</td><td>0.8</td><td>12.25</td><td>1</td><td>2.83</td><td>28.17</td><td></td></tr><tr><td>5</td><td>4.17</td><td>29.15</td><td>5</td><td>4.24</td><td>33.54</td><td>3</td><td>2.69</td><td>15.13</td><td>3</td><td>4.56</td><td>30.00</td><td></td></tr><tr><td>7</td><td>6.04</td><td>30.46</td><td>7</td><td>6.13</td><td>34.19</td><td>5</td><td>4.51</td><td>16.57</td><td>5</td><td>6.33</td><td>30.55</td><td></td></tr><tr><td>9</td><td>7.97</td><td>31.38</td><td>9</td><td>7.94</td><td>34.77</td><td>7</td><td>6.27</td><td>17.68</td><td>7</td><td>8.04</td><td>30.61</td><td></td></tr><tr><td>11</td><td>9.77</td><td>31.73</td><td>11</td><td>9.78</td><td>35.52</td><td>9</td><td>7.94</td><td>18.30</td><td>9</td><td>9.64</td><td>30.64</td><td></td></tr><tr><td>13</td><td>11.48</td><td>32.08</td><td>13</td><td>11.49</td><td>35.64</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td></td></tr><tr><td>+∞</td><td>-</td><td>32.83</td><td>+∞</td><td>-</td><td>35.81</td><td>+∞</td><td>-</td><td>18.6</td><td>+∞</td><td>-</td><td>30.9</td><td></td></tr><tr><td rowspan="3">origin</td><td colspan="12">ITST</td></tr><tr><td colspan="3">De-En</td><td colspan="3">De-En(Re-anno)</td><td colspan="3">Zh-En</td><td colspan="3">En-Vi</td></tr><tr><td>delta</td><td>AL</td><td>BLEU</td><td>delta</td><td>AL</td><td>BLEU</td><td>delta</td><td>AL</td><td>BLEU</td><td>delta</td><td>AL</td><td>BLEU</td></tr><tr><td>0.2</td><td>2.15</td><td>24.88</td><td>0.2</td><td>2.18</td><td>30.00</td><td>0.2</td><td>1.71</td><td>12.11</td><td>0.2</td><td>2.53</td><td>27.36</td><td></td></tr><tr><td>0.3</td><td>2.69</td><td>28.25</td><td>0.3</td><td>2.74</td><td>32.34</td><td>0.3</td><td>2.21</td><td>13.45</td><td>0.3</td><td>3.68</td><td>29.50</td><td></td></tr><tr><td>0.4</td><td>3.74</td><td>29.50</td><td>0.4</td><td>3.79</td><td>33.42</td><td>0.4</td><td>2.90</td><td>14.79</td><td>0.4</td><td>5.49</td><td>29.83</td><td></td></tr><tr><td>0.5</td><td>5.28</td><td>30.54</td><td>0.5</td><td>5.39</td><td>33.75</td><td>0.5</td><td>3.83</td><td>15.71</td><td>0.5</td><td>7.12</td><td>30.12</td><td></td></tr><tr><td>0.6</td><td>7.21</td><td>31.00</td><td>0.6</td><td>7.48</td><td>33.93</td><td>0.6</td><td>4.97</td><td>16.21</td><td>0.6</td><td>9.02</td><td>30.16</td><td></td></tr><tr><td>0.7</td><td>9.50</td><td>31.22</td><td>0.7</td><td>9.85</td><td>33.84</td><td>0.7</td><td>6.35</td><td>16.87</td><td>-</td><td>-</td><td>-</td><td></td></tr><tr><td>0.8</td><td>12.39</td><td>31.21</td><td>0.8</td><td>13.05</td><td>33.81</td><td>0.8</td><td>7.90</td><td>16.95</td><td>-</td><td>-</td><td>-</td><td></td></tr><tr><td>+∞</td><td>-</td><td>32.25</td><td>+∞</td><td>-</td><td>33.62</td><td>+∞</td><td>-</td><td>17.49</td><td>+∞</td><td>-</td><td>29.61</td><td></td></tr><tr><td>mono KD</td><td>delta</td><td>AL</td><td>BLEU</td><td>delta</td><td>AL</td><td>BLEU</td><td>delta</td><td>AL</td><td>BLEU</td><td>delta</td><td>AL</td><td>BLEU</td></tr><tr><td>0.2</td><td>2.15</td><td>24.91</td><td>0.2</td><td>2.10</td><td>31.07</td><td>0.2</td><td>1.93</td><td>13.37</td><td>0.2</td><td>2.31</td><td>28.51</td><td></td></tr><tr><td>0.3</td><td>2.45</td><td>27.50</td><td>0.3</td><td>2.44</td><td>34.00</td><td>0.3</td><td>2.29</td><td>14.69</td><td>0.3</td><td>3.29</td><td>30.43</td><td></td></tr><tr><td>0.4</td><td>3.16</td><td>29.13</td><td>0.4</td><td>3.21</td><td>34.20</td><td>0.4</td><td>2.94</td><td>15.35</td><td>0.4</td><td>4.82</td><td>30.77</td><td></td></tr><tr><td>0.5</td><td>4.34</td><td>30.01</td><td>0.5</td><td>4.38</td><td>34.53</td><td>0.5</td><td>3.74</td><td>16.34</td><td>0.5</td><td>6.46</td><td>30.74</td><td></td></tr><tr><td>0.6</td><td>6.17</td><td>30.98</td><td>0.6</td><td>6.40</td><td>35.17</td><td>0.6</td><td>4.82</td><td>16.70</td><td>0.6</td><td>8.27</td><td>30.81</td><td></td></tr><tr><td>0.7</td><td>8.59</td><td>31.41</td><td>0.7</td><td>8.93</td><td>35.71</td><td>0.7</td><td>6.11</td><td>17.25</td><td>-</td><td>-</td><td>-</td><td></td></tr><tr><td>0.8</td><td>12.09</td><td>31.58</td><td>0.8</td><td>12.37</td><td>35.55</td><td>0.8</td><td>7.58</td><td>17.75</td><td>-</td><td>-</td><td>-</td><td></td></tr><tr><td>+∞</td><td>-</td><td>32.15</td><td>+∞</td><td>-</td><td>36.18</td><td>+∞</td><td>-</td><td>17.88</td><td>+∞</td><td>-</td><td>30.6</td><td></td></tr><tr><td>KD</td><td>delta</td><td>AL</td><td>BLEU</td><td>delta</td><td>AL</td><td>BLEU</td><td>delta</td><td>AL</td><td>BLEU</td><td>delta</td><td>AL</td><td>BLEU</td></tr><tr><td>0.2</td><td>2.10</td><td>25.37</td><td>0.2</td><td>2.10</td><td>31.61</td><td>0.2</td><td>1.88</td><td>13.47</td><td>0.2</td><td>2.43</td><td>28.64</td><td></td></tr><tr><td>0.3</td><td>2.58</td><td>28.46</td><td>0.3</td><td>2.59</td><td>33.25</td><td>0.3</td><td>2.42</td><td>14.67</td><td>0.3</td><td>3.59</td><td>30.24</td><td></td></tr><tr><td>0.4</td><td>3.48</td><td>30.11</td><td>0.4</td><td>3.64</td><td>34.56</td><td>0.4</td><td>3.17</td><td>15.72</td><td>0.4</td><td>5.04</td><td>30.70</td><td></td></tr><tr><td>0.5</td><td>4.85</td><td>30.91</td><td>0.5</td><td>4.92</td><td>35.09</td><td>0.5</td><td>4.17</td><td>16.88</td><td>0.5</td><td>6.77</td><td>30.67</td><td></td></tr><tr><td>0.6</td><td>6.69</td><td>31.56</td><td>0.6</td><td>6.80</td><td>35.17</td><td>0.6</td><td>5.20</td><td>17.52</td><td>0.6</td><td>8.55</td><td>30.81</td><td></td></tr><tr><td>0.7</td><td>9.14</td><td>31.98</td><td>0.7</td><td>9.30</td><td>35.81</td><td>0.7</td><td>6.37</td><td>17.79</td><td>-</td><td>-</td><td>-</td><td></td></tr><tr><td>0.8</td><td>13.15</td><td>32.19</td><td>0.8</td><td>13.04</td><td>35.80</td><td>0.8</td><td>7.91</td><td>17.81</td><td>-</td><td>-</td><td>-</td><td></td></tr><tr><td>+∞</td><td>-</td><td>32.83</td><td>+∞</td><td>-</td><td>35.81</td><td>+∞</td><td>-</td><td>18.6</td><td>+∞</td><td>-</td><td>30.9</td><td></td></tr></table>
410
+
411
+ Table 7: Numerical Results in figure 6, figure 7 and figure 8.
412
+
413
+ A For every submission:
414
+
415
+ A1. Did you describe the limitations of your work? Limitations
416
+ A2. Did you discuss any potential risks of your work? Not applicable. Left blank.
417
+ A3. Do the abstract and introduction summarize the paper's main claims? Section1
418
+ A4. Have you used AI writing assistants when working on this paper? Left blank.
419
+
420
+ B Did you use or create scientific artifacts?
421
+
422
+ Left blank.
423
+
424
+ B1. Did you cite the creators of artifacts you used? Section1,3
425
+ B2. Did you discuss the license or terms for use and / or distribution of any artifacts? Section5
426
+ B3. Did you discuss if your use of existing artifact(s) was consistent with their intended use, provided that it was specified? For the artifacts you create, do you specify intended use and whether that is compatible with the original access conditions (in particular, derivatives of data accessed for research purposes should not be used outside of research contexts)? Section1
427
+ B4. Did you discuss the steps taken to check whether the data that was collected / used contains any information that names or uniquely identifies individual people or offensive content, and the steps taken to protect / anonymize it? Section5
428
+ B5. Did you provide documentation of the artifacts, e.g., coverage of domains, languages, and linguistic phenomena, demographic groups represented, etc.? Section5
429
+ B6. Did you report relevant statistics like the number of examples, details of train / test / dev splits, etc. for the data that you used / created? Even for commonly-used benchmark datasets, include the number of examples in train / validation / test splits, as these provide necessary context for a reader to understand experimental results. For example, small differences in accuracy on large test sets may be significant, while on small test sets they may not be. Section5
430
+
431
+ C Did you run computational experiments?
432
+
433
+ Section5
434
+
435
+ C1. Did you report the number of parameters in the models used, the total computational budget (e.g., GPU hours), and computing infrastructure used? Section5
436
+
437
+ The Responsible NLP Checklist used at ACL 2023 is adopted from NAACL 2022, with the addition of a question on AI writing assistance.
438
+
439
+ C2. Did you discuss the experimental setup, including hyperparameter search and best-found hyperparameter values? Section5
440
+ C3. Did you report descriptive statistics about your results (e.g., error bars around results, summary statistics from sets of experiments), and is it transparent whether you are reporting the max, mean, etc. or just a single run? Section5
441
+ C4. If you used existing packages (e.g., for preprocessing, for normalization, or for evaluation), did you report the implementation, model, and parameter settings used (e.g., NLTK, Spacy, ROUGE, etc.)? Section5
442
+
443
+ # D Did you use human annotators (e.g., crowdworkers) or research with human participants? Section5
444
+
445
+ D1. Did you report the full text of instructions given to participants, including e.g., screenshots, disclaimers of any risks to participants or annotators, etc.? Not applicable. Left blank.
446
+ D2. Did you report information about how you recruited (e.g., crowdsourcing platform, students) and paid participants, and discuss if such payment is adequate given the participants' demographic (e.g., country of residence)? Appendix
447
+ D3. Did you discuss whether and how consent was obtained from people whose data you're using/curating? For example, if you collected data via crowdsourcing, did your instructions to crowdworkers explain how the data would be used? Section5
448
+ D4. Was the data collection protocol approved (or determined exempt) by an ethics review board? Section5
449
+ D5. Did you report the basic demographic and geographic characteristics of the annotator population that is the source of the data? Section5, Appendix
bettersimultaneoustranslationwithmonotonicknowledgedistillation/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e0c7629096c4d52ef058e3828de180426f375f455b4f07656c78dad3f2e1467
3
+ size 1019075
bettersimultaneoustranslationwithmonotonicknowledgedistillation/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21ccf11907708433d24821119390f698b1095f1c9538e250ff239480f4fdf149
3
+ size 552509
beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/7d1ae7f3-12c3-4def-8ccd-6fb8a416e6f8_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90b2210bf7abd92f036c4e85eb56cc03bc36087c3c06e6b7e853f82ccd2adad0
3
+ size 150286
beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/7d1ae7f3-12c3-4def-8ccd-6fb8a416e6f8_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79a5bbcf5c60dd80eee188c8c58ea3e8997dea62bba911bc36093ef4a5d8b6e3
3
+ size 175283
beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/7d1ae7f3-12c3-4def-8ccd-6fb8a416e6f8_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0efae1feb54962ce49c46dee869480dbfe9da9b2cecc0eb51a74bcb4fad56537
3
+ size 1395427
beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/full.md ADDED
@@ -0,0 +1,528 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Beyond Contrastive Learning: A Variational Generative Model for Multilingual Retrieval
2
+
3
+ John Wieting<sup>1</sup>, Jonathan H. Clark<sup>1</sup>, William W. Cohen<sup>1</sup>, Graham Neubig<sup>2</sup>, and Taylor Berg-Kirkpatrick<sup>3</sup>
4
+
5
+ Google DeepMind
6
+
7
+ $^{2}$ Carnegie Mellon University, Pittsburgh, PA, 15213, USA
8
+
9
+ <sup>3</sup>University of California San Diego, San Diego, CA, 92093, USA
10
+
11
+ {jwieting,jhclark,wcohen}@google.com,gneubig@cs.cmu.edu,tberg@eng.ucsd.edu
12
+
13
+ # Abstract
14
+
15
+ Contrastive learning has been successfully used for retrieval of semantically aligned sentences, but it often requires large batch sizes and carefully engineered heuristics to work well. In this paper, we instead propose a generative model for learning multilingual text embeddings which can be used to retrieve or score sentence pairs. Our model operates on parallel data in $N$ languages and, through an approximation we introduce, efficiently encourages source separation in this multilingual setting, separating semantic information that is shared between translations from stylistic or language-specific variation. We show careful large-scale comparisons between contrastive and generation-based approaches for learning multilingual text embeddings, a comparison that has not been done to the best of our knowledge despite the popularity of these approaches. We evaluate this method on a suite of tasks including semantic similarity, bitext mining, and cross-lingual question retrieval—the last of which we introduce in this paper. Overall, our Variational Multilingual Source-Separation Transformer (VMSST) model outperforms both a strong contrastive and generative baseline on these tasks. $^{1}$
16
+
17
+ # 1 Introduction
18
+
19
+ Contrastive learning is the dominant paradigm for learning text representations from parallel text (Hermann and Blunsom, 2014; Singla et al., 2018; Guo et al., 2018; Wieting et al., 2019; Feng et al., 2022). However, contrastive learning requires strong negative examples in the data and finding these negatives can be expensive in terms of compute or manual effort. In this paper, we propose a generative $^{2}$ model for learning multilingual text embeddings
20
+
21
+ which encourages source separation, separating semantic information that is shared between translations from stylistic or language-specific variation. We find that by filtering this variation into separate variables, performance of the remaining representations, that encode shared semantic information, increases across all downstream tasks.
22
+
23
+ Through an approximation that greatly reduces the memory footprint of our model, we scale our model and train on 92 languages. We systematically compare our model, the Variational Multilingual Source-Separation Transformer (VMSST) to strong contrastive and generative baselines on a suite of tasks including semantic similarity, bitext mining, and question retrieval, which we introduce for the cross-lingual setting, using the same training data and architecture. We show that our model outperforms these models and is also competitive with the state-of-the-art.
24
+
25
+ We analyze VMSST with careful ablations, showing the contribution of each aspect of the model to performance. We also show that even at large batch sizes, the advantage over contrastive learning remains, especially for large models. Furthermore, we also find the learned embedding space of our model to be smoother, making it less affected by the "hubness problem" (Radovanovic et al., 2010; Radovanovic et al., 2010) in representation learning, and more suitable for large-scale retrieval than the baseline methods.
26
+
27
+ To the best of our knowledge, this is the first work to systematically compare generative and contrastive models for learning multilingual embeddings on a large parallel corpus containing many languages in a carefully controlled experimental setup—despite the popularity of these approaches (Artetxe and Schwenk, 2019b; Yang et al., 2020). We carry out these experiments with both pretrained and randomly initialized models. The comparison of objective functions is an important research question due to the large amounts of multi-
28
+
29
+ lingual text available to train models and the many uses of these models in downstream tasks. To that end, another contribution of this paper is showing these comparisons and the surprising result that contrastive objectives do not provide the overall best accuracy on downstream tasks. Moreover, our generative VMSST increasingly outperforms the contrastive model when more layers are added and when training with larger batches and more training data, suggesting that as models continue to scale in the future, this performance gap may continue to increase further motivating the use of generative approaches for learning multilingual text embeddings.
30
+
31
+ # 2 Related Work
32
+
33
+ There has been a number of approaches proposed for learning bilingual and multilingual text embeddings. One popular approach is contrastive learning (Hermann and Blunsom, 2014; Singla et al., 2018; Guo et al., 2018; Wieting et al., 2019; Feng et al., 2022) where translation pairs are positive examples and text from other pairs are used as negative examples. An alternative approach is to use a neural machine translation objective, where the representation from the hidden states of the encoder is used as the sentence embedding (Espana-Bonet et al., 2017; Schwenk and Douze, 2017; Artetxe and Schwenk, 2019b). Other approaches include multi-task learning approaches which often use some type of contrastive learning of parallel text to align representations among languages (Yang et al., 2020; Goswami et al., 2021), cross-lingual pretraining (Chi et al., 2022), and model distillation from a large pretrained multilingual model (Reimers and Gurevych, 2020).
34
+
35
+ An alternative approach that is more closely related to our work is generative models that separate the linguistic variation from the shared semantic information in translation pairs. Wieting et al. (2020) considered this for bitext, with each language having its own encoder and decoder parameters. This approach however does not scale, since it is not feasible to have thousands of encoders and decoders if one wants to model all of the more than 7,000 languages in the world.
36
+
37
+ # 3 Model
38
+
39
+ The generative process of our underlying probabilistic model and the computation graph of our training objective procedure are depicted in Fig-
40
+
41
+ ![](images/3b6f70941bfbaaa0505aee1fcd363d91cd7507f3c96ceaa098f89a5aa9473784.jpg)
42
+ Figure 1: The generative process of our model. Latent variables, $z_{l_i}$ , modeling the variation $x_{l_i}$ specifically due to language $l_i$ , as well as a latent variable modeling the common semantics, $z_{sem}$ , are drawn from a multivariate Gaussian prior. The observed translation in each language is then conditioned on its language-specific variable and $z_{sem}$ . In practice, we approximate this model to make learning and inference tractable.
43
+
44
+ ure 1 and Figure 2 respectively. In the generative story for VMSST, we first sample a semantic variable $z_{sem}$ for the sentence. Then for each of the $N$ languages, we sample a language-specific variable $z_{l_i}$ . Each latent variable $z$ is sampled from a multivariate Gaussian prior $\mathcal{N}(0, I_k)$ . These variables are then fed into a decoder that samples each of the $N$ sentences in the translation set. Each observed translation $x_{l_i}$ , is sampled conditioned on $z_{sem}$ and its language variable $z_{l_i}$ . Because $z_{sem}$ will be used to generate the sampled sentences in all languages, we expect that this variable will encode semantic, syntactic, or stylistic information that is shared in all of the translations. Conversely, the language variables $z_{l_i}$ will handle language-specific peculiarities or specific style differences that are not central to the meaning of the translation and are therefore not contained in many of the sentences. Concretely, the likelihood function of our model can be written for a single $N$ -way tuple of translations $x = (x_1, \ldots, x_N)$ :
45
+
46
+ $$
47
+ p (x | z _ {s e m}, z _ {l _ {1}}, \dots , z _ {l _ {N}}) = \prod_ {i} ^ {N} p (x _ {i} | z _ {s e m}, z _ {l _ {i}})
48
+ $$
49
+
50
+ In the next section, we discuss how this separation of information is encouraged during learning.
51
+
52
+ # 4 Learning and Inference
53
+
54
+ We would like to train our model on a set of parallel sentences $X$ consisting of $M$ examples in $N$ languages and a collection of latent variables $Z$ . However, $N$ -way parallel corpora are not available at the scale of bilingual text, and so we therefore approximate an $N$ -way parallel corpus by sampling translation pairs from a large pool of pairs containing text in $N$ languages. Therefore in our model, $X = \{\langle x_{l_i}^1, x_{l_j}^1 \rangle, \dots, \langle x_{l_i}^M, x_{l_j}^M \rangle\}$ and $Z = (\langle z_{l_i}^1, z_{l_j}^1, z_{sem}^1 \rangle, \dots, \langle z_{l_i}^M, z_{l_j}^M, z_{sem}^M \rangle)$ .
55
+
56
+ We aim to maximize the likelihood of the observed $X$ with respect to the parameters of the decoder $\theta$ , marginalizing over the latent variables $Z$ . We follow established procedures for this optimization problem from related latent variable models like variational autoencoders (VAEs; Kingma and Welling (2013)). Specifically, we optimize a variational lower bound on the log marginal likelihood, the evidence lower bound (ELBO). ELBO introduces a variational approximation $q(z_{sem}, z_{li}, z_{lj} | x_{li}, x_{lj}; \phi)$ to the true posterior of the model. The $q$ distribution is parameterized by encoders or inference networks with parameters $\phi$ . ELBO can be optimized by gradient ascent by using the reparameterization trick (Kingma and Welling, 2013), which allows for the expectation under $q$ to be approximated through sampling in a way that preserves backpropagation. The decoders and encoders are discussed in further detail in Section 5.
57
+
58
+ In contrast to variational autoencoders, which have only a single latent variable for each example, we have three in our model for each example. To encourage source separation, we make several independence assumptions for $q$ and factor it into three terms:
59
+
60
+ $$
61
+ \begin{array}{l} q \left(z _ {s e m}, z _ {l _ {i}}, z _ {l _ {j}} \mid x _ {l _ {i}}, x _ {l _ {j}}; \phi\right) = \\ q \left(z _ {s e m} \mid x _ {l _ {i}}, x _ {l _ {j}}; \phi\right) q \left(z _ {l _ {i}} \mid x _ {l _ {i}}; \phi\right) q \left(z _ {l _ {j}} \mid x _ {l _ {j}}; \phi\right) \\ \end{array}
62
+ $$
63
+
64
+ Lastly, we note that the ELBO contains a KL term that acts to regularize the latent variables. In our model, the KL term encourages $z_{sem}$ , $z_{l_i}$ , and $z_{l_j}$ to be close to a zero-centered Gaussian prior. The KL term thus encourages source separation, as encoding information shared by the translation pair in the shared variable results in only a single penalty from the KL loss, while encoding the information separately in the language-specific variables
65
+
66
+ unnecessarily doubles the overall cost. In effect, we can view these language-specific latent variables as collecting information that cannot be captured in a common semantic space, separating it out from the variables collecting shared semantic information that we use for downstream tasks.
67
+
68
+ Objective Function. The overall objective function for VMSST consists of consists of two terms, the first being ELBO as described earlier:
69
+
70
+ $$
71
+ \begin{array}{l} \operatorname {E L B O} = \mathbb {E} _ {q \left(Z _ {S}, Z _ {L} \mid X; \phi\right)} [ \log p (X \mid Z _ {S}, Z _ {L}; \theta) ] - \\ \mathrm {K L} (q \left(Z _ {S}, Z _ {L} | X; \phi\right) | | p \left(Z _ {S}; \theta\right) p \left(Z _ {L}; \theta\right)) \\ \end{array}
72
+ $$
73
+
74
+ where $Z_{S}$ is the collection of semantic variables, while $Z_{L}$ is the collection of language variables.
75
+
76
+ The second term, which we found necessary for strong performance, is the sum of $p(x_{l_i}|\mu_{seml_j})$ and $p(x_{l_j}|\mu_{seml_i})$ which can be interpreted as samples from the mean of the posterior distribution using semantic variables generated from both input sentences. When training variational objectives, where the model ignores the latent variables and the learned posterior remains close to the prior. Examples of other approaches to address these issues include: (Yang et al., 2017; Kim et al., 2018; Xu and Durrett, 2018; He et al., 2019). We weight the ELBO by $\lambda$ giving the total objective as:
77
+
78
+ $$
79
+ \sum_ {\left(x _ {l _ {i}}, x _ {l _ {j}}\right) \in X} p \left(x _ {l _ {i}} \mid \mu_ {s e m _ {l _ {j}}}\right) + p \left(x _ {l _ {j}} \mid \mu_ {s e m _ {l _ {i}}}\right) + \lambda \text {E L B O}
80
+ $$
81
+
82
+ Therefore, our objective resembles translation with a weighted source-separation term. We show the effectiveness of this formulation compared to a pure translation objective in our experiments in Section 6.
83
+
84
+ # 5 Architecture
85
+
86
+ Our architecture is an encoder-decoder model, where the encoder produces a single representation that is fed into the decoder. Cross-attention between the encoder and decoder is not used, therefore the decoder has no full sequence visibility and more pressure is applied on the encoder to create a semantically meaningful representation. Specifically, we follow the approach of Wieting et al. (2020) which uses a Transformer (Vaswani et al., 2017) encoder-decoder model, where the sentence embeddings are used in two places: at each layer of the decoder in place of cross-attention and in the computation of the logits.
87
+
88
+ ![](images/6b31cdbb4bfec28d4e792877d1873795c947f48c5d4f2be22aa7205bdd14f623.jpg)
89
+ Figure 2: The computation graph for the variational lower bound used to train VMSST. The text for languages $l_i$ and $l_j$ , with their respective language embeddings, are fed into the encoder acting as their inference networks. The text is also fed into the semantic inference network which is a separate encoder. The output of these networks are the language variables $z_{l_i}$ and $z_{l_j}$ and semantic variable $z_{sem}$ . Each language-specific variable is then concatenated to $z_{sem}$ and used by a single shared decoder to reconstruct the input sentence pair.
90
+
91
+ Decoder Architecture. The decoder models $p(x_{l_i}|z_{sem}, z_{l_i}; \theta)$ for each language $i$ (see right side of Figure 2). The inputs to the decoder are the language-specific variable $z_{l_i}$ and the semantic variable $z_{sem}$ , which are concatenated and used to condition the decoder to generate the reconstruction of the observed text $x_{l_i}$ . We use a single decoder for all languages.
92
+
93
+ Encoder Architecture. The encoders play an important role in the source separation as well as inference as detailed below.
94
+
95
+ In order to motivate the separation of the linguistic and semantic information we split the encoder into two parts, only sharing the embedding table. We use one of these encoders to be the semantic inference network, which produces the semantic variable. The other encoder represents the $N$ language inference networks and produces the language variables for each language. These inference networks are shown on the left side of Figure 2. We mean-pool the hidden states followed by a linear projection to produce each variable from the encoders.
96
+
97
+ The semantic inference network, which models $q(z_{sem}|x_{l_i},x_{l_j};\phi)$ , is a multilingual encoder that encodes each language. For each translation pair, we alternate which of the two parallel sentences is fed into the semantic encoder within a batch for the ELBO term in the objective. Since the semantic encoder is meant to capture language agnostic semantic information, its outputs for a translation
98
+
99
+ pair should be similar regardless of the language of the input sentence. We use the mean of the semantic encoder as the sentence representation for downstream tasks.
100
+
101
+ # 6 Experiments
102
+
103
+ # 6.1 Constructing the Training Data
104
+
105
+ We follow Artetxe and Schwenk (2019b) in constructing our training data. However, since the exact data is not publicly available, we expect their may be small differences due to random sampling and different dataset versions. More specifically we sample our data from Europarl, $^{3}$ United Nations (Rafalovitch and Dale, 2009), $^{4}$ OpenSubtitles2018 (Lison et al., 2018), $^{5}$ Global Voices, $^{6}$ Tanzil, $^{7}$ and Tatoeba v2021-07-22. $^{8}$
106
+
107
+ We sample the same amount of data as was done in Artetxe and Schwenk (2019b), detailed in Appendix C. The only deviation being that we take care to not include any Tatoeba test data in our training data. Our final corpus has nearly 216 million training examples, slightly less than 220 million reported in Artetxe and Schwenk (2019b). We use both English and Spanish as pivot languages, so each pair includes at least one English or Spanish sentence, and we use approximately the same
108
+
109
+ <sup>3</sup>http://opus.nlpl.eu/Europarl.php
110
+ <sup>4</sup>https://opus.nlpl.eu/UN.php
111
+ <http://opus.nlpl.eu/OpenSubtitles.php>
112
+ <sup>6</sup>https://opus.nlpl.eu/GlobalVoices.php
113
+ <sup>7</sup>https://opus.nlpl.eu/Tanzil.php
114
+ <sup>8</sup>https://opus.nlpl.eu/Tatoeba.php
115
+
116
+ amount of data for each language. We note that we only have training data for 92 languages instead of the 93 in Artetxe and Schwenk (2019b) due to not having training data for Aymara (ay).
117
+
118
+ # 6.2 Evaluation
119
+
120
+ We evaluate on three tasks: semantic similarity, bitext mining and question retrieval. While the first two are commonly used to evaluate multilingual sentence embeddings, we introduce question retrieval in this paper. As can be seen by our results, we found question retrieval to be somewhat uncorrelated to either of the latter two. For each task, we use a collection of different datasets, detailed below.
121
+
122
+ Semantic Textual Similarity The goal of the semantic textual similarity tasks is to predict the degree to which sentences have the same meaning as measured by human judges. The evaluation metric is Pearson's $r \times 100$ with the gold labels, which is convention for these tasks.
123
+
124
+ We make a distinction between two semantic similarity evaluations, English-only and crosslingual. For the English-only evaluation, we follow Wieting et al. (2016) by averaging the yearly performance on 2012-2016 SemEval Semantic Textual Similarity (STS) shared tasks (Agirre et al., 2012, 2013, 2014, 2015, 2016). More specifically, for each year of the competition, we average the Pearson's $r \times 100$ for each dataset in that year, and then finally average this result for each year of the competition. For the cross-lingual evaluation we use the cross-lingual STS tasks from SemEval 2017 (Cer et al., 2017). This evaluation contains Arabic-Arabic, Arabic-English, Spanish-Spanish, Spanish-English, and Turkish-English STS datasets. These datasets were created by translating one or both pairs of an English STS pair into Arabic (ar), Spanish (es), or Turkish (tr). We average Pearson's $r \times 100$ for these datasets.
125
+
126
+ Bitext Mining For bitext mining, we use the Tatoeba dataset introduced in Artetxe and Schwenk (2019b) and the 2018 Building and Using Parallel Corpora (BUCC) shared bitext mining task (Zweigenbaum et al., 2018).
127
+
128
+ The Tatoeba dataset consists of 100-1000 pairs of data aligned to English for 112 languages. The accuracy for Tatoeba can be computed in two ways, depending if English is the target language or source language. We compute accuracy using
129
+
130
+ cosine similarity in both directions for all 112 languages (19 are unseen in the training data) and average this score for all languages.
131
+
132
+ The goal of the BUCC task is to find the gold aligned parallel sentences given two corpora (one being very large) in two distinct languages. Languages are aligned with English and consist of German (de), French (fr), Russian (ru), and Chinese (zh). Typically, only about $2.5\%$ of the sentences are aligned. Following Schwenk (2018), we evaluate on the publicly available BUCC data. This involves scoring all pairs between the source target sentences and finding the optimal threshold that separates the data. Using the threshold, we can compute the precision, recall, and $F_{1}$ of the alignments. We report $F_{1} \times 100$ in our results.
133
+
134
+ We compare two different approaches for finding the sentence alignments. In the first, BUCC (cosine), we compute the cosine similarity between the non-English source sentences and the English target sentences, selecting the highest scoring English sentence as the match. In the second, BUCC (margin), we follow Artetxe and Schwenk (2019a) and use a margin-based scoring approach, where the final score of a sentence pair is both a function of the score between the pair and the scores of each sentence with its nearest neighbors. To compute this margin score, we divide the cosine similarity for source sentence $s_i$ and target sentence $t_i$ by the sum of the scores of the four nearest neighbors of $s_i$ with the target sentences and the sum of the scores of the four nearest neighbors of $t_i$ with the source sentences.
135
+
136
+ Margin-based scoring is designed to alleviate the "hubness problem" (Radovanovic et al., 2010; Radovanovic et al., 2010) where the neighborhood around embeddings in a high-dimensional space, like in sentence embeddings, have many neighbors in common. These neighbors can displace the correct mapping in the ordering, hurting performance.
137
+
138
+ Question Retrieval For our question retrieval evaluation, we report the accuracy $(R@1)$ on the test sets of Natural Questions (NQ) (Kwiatkowski et al., 2019) and the Multilingual Knowledge Questions and Answers (MKQA) (Longpre et al., 2021). We use the Probably Asked Questions dataset (PAQ) (Lewis et al., 2021) as a knowledge base from which we look up the nearest neighbor of each question in the NQ and MKQA test sets using cosine similarity. PAQ is a very large resource of 65 million automatically generated question-answer
139
+
140
+ pairs. This is a zero-shot evaluation without any NQ supervised data. $^{9}$
141
+
142
+ Overall Score We consolidate all of these evaluations into a score, as a way to get a sense of overall performance since different models favor different evaluations. While we are averaging different metrics (accuracy, Pearson's $r$ , and $F_{1}$ ), we justify this as they do have the same scale, $^{10}$ and a simple average gives a way for us to see overall performance. Our score is the average of six subtasks, two subtasks for each of semantic similarity, bitext mining, and question retrieval: English semantic similarity, cross-lingual semantic similarity, Tatoeba, BUCC (we average performance of the cosine and margin based scoring), NQ, and MKQA.
143
+
144
+ # 6.3 Baselines
145
+
146
+ We compare VMSST against two strong baselines, which have been used extensively in the literature.
147
+
148
+ The first baseline is CONTRASTIVE, where we use contrastive learning with the other sentences in the batch ("in-batch negative sampling") as negative examples (Sohn, 2016). CONTRASTIVE is computed as the average of computing $p(s_i|t_i)$ and $p(t_i|s_i)$ for source sentence $s_i$ and target sentence $t_i$ , and their respective representations $s_i$ and $t_i$ where the first term uses all the other targets as negatives and the second use all of the other source sentence as negatives. Specifically,
149
+
150
+ $$
151
+ p (s _ {i} | t _ {i}) = \exp (\mathbf {s} _ {\mathbf {i}} \cdot \mathbf {t} _ {\mathbf {i}}) / \sum_ {j \in B} \exp \mathbf {s} _ {\mathbf {i}} \cdot \mathbf {t} _ {\mathbf {j}}
152
+ $$
153
+
154
+ $$
155
+ p (t _ {i} | s _ {i}) = \exp (\mathbf {s} _ {\mathbf {i}} \cdot \mathbf {t} _ {\mathbf {i}}) / \sum_ {j \in B} \exp \mathbf {t} _ {\mathbf {i}} \cdot \mathbf {s} _ {\mathbf {j}}
156
+ $$
157
+
158
+ $$
159
+ \operatorname {l o s s} = - \frac {1}{2 | \mathcal {B} |} \sum_ {(s _ {i}, t _ {i}) \in \mathcal {B}} \log p (s _ {i} | t _ {i}) + \log p (t _ {i} | s _ {i})
160
+ $$
161
+
162
+ where $\mathcal{B}$ is a minibatch. This version of contrastive learning has been used in representation learning for retrieval (DPR, Karpukhin et al., 2020), visual tasks (SimCLR, Chen et al., 2020) and image/text tasks (CLIP, Radford et al., 2021). There are other variations of this loss (Qian et al., 2019), and other
163
+
164
+ contrastive losses like triplet loss (Weston et al., 2010) which has been used for learning text embeddings, but we leave a comparison of contrastive objectives for learning multilingual text embeddings for future work.
165
+
166
+ The second baseline is BITRANSLATION, where we use a translation objective to learn the representation Espana-Bonet et al. (2017); Schwenk and Douze (2017); Artetxe and Schwenk (2019b).
167
+
168
+ We also explore an alternative to the VMSST, VMSST CONTRASTIVE, by incorporating a contrastive loss to use in a multitask setting. Again, we weight the contribution of the VMSST loss by $\lambda$ .
169
+
170
+ # 6.4 Experimental Settings
171
+
172
+ We explore three different settings for each of four objective functions we consider. We use the Transformer architecture for all settings. Specifically, we explore a 6 layer encoder-decoder model, a 24 layer encoder-decoder model, and a 24 layer encoder-decoder initialized with the Multilingual T5 (mT5) Large (Xue et al., 2021). We set the dimension of the embeddings and hidden states for the encoders and decoders to 1024. The mT5 Large model inherently has embedding and hidden state dimensions of 1024. For all models, we use the mT5 vocabulary, which is derived from sentencepiece (Kudo and Richardson, 2018). The vocabulary consists of 250,000 tokens and was learned from multilingual variant of the C4 dataset called mC4 which includes 101 languages.
173
+
174
+ For optimization, we use Adafactor (Shazeer and Stern, 2018). We use the same learning rate schedule as Vaswani et al. (2017), i.e., the learning rate increases linearly for 4,000 steps, after which it is decayed proportionally to the inverse square root of the number of steps. We set the peak learning rate to be 0.001, and we train our models for 100,000 steps total. We use a batch size of 2048 and set the maximum sequence length of our model to 32 for all experiments.
175
+
176
+ We use a dropout rate of 0.1 for CONTRASTIVE models and no dropout for BITRANSLATION, VMSST CONTRASTIVE (with the exception of the randomly initialized 24 layer model which used 0.1), and VMSST. For VMSST, we anneal the KL term so that it increased linearly for 1,000,000 updates.
177
+
178
+ For VMSST, we set $\lambda$ , the weight on the VMSST ELBO loss term, to be 0.025 for the pre
179
+
180
+ <table><tr><td rowspan="2">Model</td><td colspan="4">Sem. Sim.</td><td colspan="3">Bitext Mining</td><td colspan="3">Quest. Retrieval</td></tr><tr><td>Eng.</td><td>XL</td><td>XL (s.)</td><td>XL (d.)</td><td>Tatoeba</td><td>BUCC (c.)</td><td>BUCC (m.)</td><td>NQ</td><td>MKQA</td><td>Score</td></tr><tr><td colspan="11">Random Init. (6 Layer)</td></tr><tr><td>CONTRASTIVE</td><td>65.5</td><td>66.8</td><td>73.3</td><td>62.4</td><td>63.1</td><td>66.2</td><td>84.0</td><td>34.1</td><td>17.6</td><td>53.7</td></tr><tr><td>BITRANSLATION</td><td>69.6</td><td>63.9</td><td>71.6</td><td>58.7</td><td>53.3</td><td>62.1</td><td>81.2</td><td>37.4</td><td>19.2</td><td>52.5</td></tr><tr><td>VMSST CONTRASTIVE</td><td>65.7</td><td>66.3</td><td>73.0</td><td>61.9</td><td>63.2</td><td>65.8</td><td>84.3</td><td>34.1</td><td>17.7</td><td>53.7</td></tr><tr><td>VMSST</td><td>70.1</td><td>67.4</td><td>75.1</td><td>62.2</td><td>58.7</td><td>73.7</td><td>85.9</td><td>37.3</td><td>20.1</td><td>55.6</td></tr><tr><td colspan="11">Random Init. (24 Layer)</td></tr><tr><td>CONTRASTIVE</td><td>64.4</td><td>64.6</td><td>71.6</td><td>60.0</td><td>62.7</td><td>64.3</td><td>83.7</td><td>32.8</td><td>16.0</td><td>52.4</td></tr><tr><td>BITRANSLATION</td><td>71.2</td><td>68.1</td><td>74.6</td><td>63.8</td><td>57.4</td><td>70.8</td><td>86.9</td><td>38.2</td><td>21.6</td><td>55.9</td></tr><tr><td>VMSST CONTRASTIVE</td><td>68.2</td><td>69.7</td><td>75.5</td><td>65.9</td><td>64.8</td><td>58.5</td><td>84.1</td><td>36.9</td><td>18.9</td><td>55.0</td></tr><tr><td>VMSST</td><td>71.1</td><td>71.7</td><td>77.7</td><td>67.7</td><td>61.4</td><td>78.7</td><td>89.0</td><td>38.3</td><td>22.3</td><td>58.1</td></tr><tr><td colspan="11">Pretrained (24 Layer)</td></tr><tr><td>CONTRASTIVE</td><td>73.3</td><td>74.7</td><td>76.0</td><td>73.9</td><td>85.1</td><td>74.3</td><td>93.7</td><td>40.2</td><td>27.6</td><td>64.2</td></tr><tr><td>BITRANSLATION</td><td>74.0</td><td>78.0</td><td>79.8</td><td>76.8</td><td>78.2</td><td>85.9</td><td>91.9</td><td>40.9</td><td>29.6</td><td>64.9</td></tr><tr><td>VMSST CONTRASTIVE</td><td>73.4</td><td>75.4</td><td>76.7</td><td>74.6</td><td>85.4</td><td>74.6</td><td>93.7</td><td>40.3</td><td>27.9</td><td>64.4</td></tr><tr><td>VMSST</td><td>74.6</td><td>79.1</td><td>81.5</td><td>77.5</td><td>81.1</td><td>87.8</td><td>92.5</td><td>40.8</td><td>29.9</td><td>65.9</td></tr></table>
181
+
182
+ Table 1: Experimental results for VMSST and VMSST CONTRASTIVE and our baselines CONTRASTIVE and BITRANSLATION. We evaluate on semantic similarity, bitext mining, and question retrieval. For semantic similarity we separate the evaluations into English-only, cross-lingual, cross-lingual but with the same language (XL (s.) ar-ar and es-es) and cross-lingual using different languages (XL (d.), ar-en, es-en, and tr-en). Results are reported as the average Pearson's $r \times 100$ across datasets. For bitext mining we evaluate on Tatoeba and BUCC, with BUCC split between using cosine similarity or using a margin approach (Artetxe and Schwenk, 2019a). Results are reported as accuracy $\times 100$ for Tatoeba and $F_{1} \times 100$ for BUCC. For question retrieval, we evaluate retrieval accuracy $\times 100$ using PAQ as a question knowledge base on the NQ and MKQA datasets. Finally, we compute a score to summarize quality over these evaluations.
183
+
184
+ trained models, and 0.1 when training from randomly initialized parameters. For VMSST CONTRASTIVE, we set it to .0005 for the pretrained and 6 layer settings and 0.001 for the randomly initialized 24 layer setting.
185
+
186
+ # 6.5 Results
187
+
188
+ The results of our experiments are shown in Table 1. Overall, VMSST has the best performance for all three experimental settings and the best performance on each task on average, with the exception of Tatoeba. In fact, for NQ question retrieval with a pretrained model, it performs nearly to that of the model trained specifically for this task on NQ data from Lewis et al. (2021) which has an accuracy of 41.2. VMSST and BITRANSLATION are especially strong when using more layers, which is not the case for CONTRASTIVE which declines in performance when moving from 6 to 24 layers. In fact at 24 layers, BITRANSLATION performs better on average than CONTRASTIVE. Perhaps for even larger models, the gap between contrastive and generative models will increase. We also see that CONTRASTIVE seems to benefit more from pretraining than VMSST and BITRANSLATION, which could possibly be due to VMSST re-purposing and adding additional randomly initialized param
189
+
190
+ eters to the decoder. Perhaps different pretraining strategies using this modified decoder would resolve these differences. We also see that VMSST CONTRASTIVE has negligible improvement over CONTRASTIVE which was unexpected—that is, a traditional contrastive loss does not improve further on top of generative loss of VMSST. We leave the exploration of different strategies of combining these approaches to future work.
191
+
192
+ It is also interesting to observe the stark performance difference for different tasks. Bitext mining tasks like Tatoeba, and BUCC (m.) for the pretrained 24 layer model, favor CONTRASTIVE, while semantic similarity, BUCC (c.) and question retrieval favor VMSST, suggesting some fundamental difference in these tasks favor CONTRASTIVE. An examination of the Tatoeba and BUCC data shows that there are paraphrases in the test set, but accounting for these does not seem to meaningfully explain this performance difference.
193
+
194
+ Lastly, we see that VMSST outperforms CONTRASTIVE on the BUCC task with cosine similarity, though the results between the two models are closer when using margin. This suggests that the "hubness problem" (Radovanovic et al., 2010; Radovanovic et al., 2010) where the neighborhood around embeddings in a high-dimensional spaces
195
+
196
+ have many neighbors in common, is less of an issue when learning embeddings with VMSST. This smoother embedding space may also contribute to the stronger results VMSST has on the question retrieval tasks.
197
+
198
+ # 6.6 Comparison to Related Work
199
+
200
+ Prior work on learning multilingual embeddings has explored a variety of models utilizing different strategies and using difference source and types of training data. However, comparing approaches is difficult as they differ in many factors that are crucial to performance: training data, model size, architecture, vocabulary, training time, and evaluation datasets. Complicating matters further, even the metric used in evaluation for the same dataset, the distance measure used between embeddings for the same dataset, and the specific subsets of the evaluation datasets used can be different.
201
+
202
+ The main goal of this paper is to compare contrastive and generative losses systematically and uniformly, on the same data, metrics and underlying architecture. However, we also emphasize that the best systems we compare are competitive with the current state-of-the-art. Hence, in this section we compare VMSST to published results of other models on semantic similarity and the Tatoeba and BUCC bitext mining tasks. We primarily compare against five models which have the strongest multilingual results in the literature: mUSE (Yang et al., 2020), LASER (Artetxe and Schwenk, 2019b), XLM-R (NLI/STS-B) and XLM (Para.) (Reimers and Gurevych, 2020), and LaBSE (Feng et al., 2022).
203
+
204
+ For semantic similarity, we include Spearman's $\rho$ in order to compare to work that solely uses this correlation metric. We use cosine as the similarity measure for all models in these evaluations. $^{11}$ The results are shown in Table 2.
205
+
206
+ For Tatoeba, we compare to methods that have evaluated on all 112 languages, which excludes mUSE as it was only trained on 16 language pairs. The results are shown in Table 3. Baselines results are taken from Reimers and Gurevych (2020).
207
+
208
+ For BUCC, we include results on the training sets using the margin retrieval methods from Artetxe and Schwenk (2019b). The results are
209
+
210
+ <table><tr><td>Model</td><td>XL</td><td>XL (s.)</td><td>XL (d.)</td></tr><tr><td>mUSE</td><td>79.5</td><td>81.7</td><td>78.1</td></tr><tr><td>LASER</td><td>69.0</td><td>74.3</td><td>65.5</td></tr><tr><td>XLM-R (NLI/STS-B)</td><td>79.0</td><td>81.7</td><td>77.2</td></tr><tr><td>XLM-R (Para.)</td><td>82.4</td><td>82.9</td><td>82.1</td></tr><tr><td>LaBSE</td><td>72.4</td><td>74.9</td><td>70.7</td></tr><tr><td>VMSST</td><td>79.4</td><td>81.9</td><td>77.7</td></tr></table>
211
+
212
+ Table 2: Comparisons to related work on cross-lingual semantic similarity. Results are reported in Spearman's $\rho \times 100$ . XL contains all 5 datasets, where XL (s.) contains only those where the languages are the same (ar-ar, es-es), and XL (d.) contains those datasets where the languages are different (ar-en, es-en, and tr-en). Note that models in this table are not trained on the same data; for instance LaBSE was trained on substantially more parallel data and XLM-R (Para.) was trained using a large English paraphrase corpus in addition to parallel data.
213
+
214
+ <table><tr><td>Model</td><td>Tatoeba</td></tr><tr><td>LASER</td><td>65.5</td></tr><tr><td>XLM-R (Para.)</td><td>67.1</td></tr><tr><td>LaBSE</td><td>83.7</td></tr><tr><td>VMSST</td><td>81.1</td></tr></table>
215
+
216
+ Table 3: Comparisons to related work on Tatoeba. Results are reported as accuracy $\times 100$ , averaging the xx>en and en->xx directions. Note that models in this table are not trained on the same data; for instance LaBSE was trained on substantially more parallel data and XLM-R (Para.) was trained using a large English paraphrase corpus in addition to parallel data.
217
+
218
+ shown in Table 5. Baselines results are taken from Artetxe and Schwenk (2019b); Reimers and Gurevych (2020).
219
+
220
+ While VMSST does not have the best performance relative to models from the literature on any single task, it does have the best overall performance if one averages the results for each task.12 While these models share much in common, namely using parallel text and some type of pretraining or pretrained model, there are differences in the exact data and models used, among other confounding variables. For instance, LaBSE used training data consisting of six billion parallel pairs across languages and was also trained on monolingual text using a masked language modelling objective. XLM-R (Para.) makes use of a 50 million example paraphrase corpus for distillation. In contrast, our setup most closely follows LASER, using an approximation of the 220M example parallel data used to train their model.
221
+
222
+ <table><tr><td rowspan="2">Model</td><td colspan="4">Sem. Sim.</td><td colspan="3">Bitext Mining</td><td colspan="3">Quest. Retrieval</td></tr><tr><td>Eng.</td><td>XL</td><td>XL (s.)</td><td>XL (d.)</td><td>Tatoeba</td><td>BUCC (c.)</td><td>BUCC (m.)</td><td>NQ</td><td>MKQA</td><td>Score</td></tr><tr><td colspan="11">Random Init. (24 Layer)</td></tr><tr><td>VMSST</td><td>71.1</td><td>71.7</td><td>77.7</td><td>67.7</td><td>61.4</td><td>78.7</td><td>89.0</td><td>38.3</td><td>22.3</td><td>58.1</td></tr><tr><td>VMSST (fact.)</td><td>67.3</td><td>69.9</td><td>76.3</td><td>65.7</td><td>63.0</td><td>77.9</td><td>90.4</td><td>37.3</td><td>21.5</td><td>57.2</td></tr><tr><td>VMSST (4 enc.)</td><td>71.2</td><td>70.2</td><td>76.6</td><td>66.0</td><td>60.8</td><td>77.7</td><td>88.5</td><td>38.4</td><td>22.0</td><td>57.6</td></tr><tr><td>VMSST (12L dec.)</td><td>71.1</td><td>70.9</td><td>77.4</td><td>66.7</td><td>61.2</td><td>78.4</td><td>88.8</td><td>38.0</td><td>22.2</td><td>57.8</td></tr><tr><td>VMSST (1L dec.)</td><td>71.0</td><td>71.2</td><td>77.0</td><td>67.4</td><td>63.0</td><td>79.4</td><td>89.1</td><td>38.7</td><td>22.8</td><td>58.5</td></tr><tr><td>VMSST (no KL)</td><td>70.7</td><td>68.7</td><td>76.2</td><td>63.7</td><td>56.9</td><td>70.8</td><td>86.6</td><td>37.8</td><td>21.5</td><td>55.7</td></tr><tr><td>VMSST (1 enc.)</td><td>70.6</td><td>69.4</td><td>76.7</td><td>64.6</td><td>60.0</td><td>77.0</td><td>87.8</td><td>38.4</td><td>21.4</td><td>57.0</td></tr><tr><td>VMSST (no enc. l.e.)</td><td>71.2</td><td>69.8</td><td>76.1</td><td>65.5</td><td>61.2</td><td>78.7</td><td>88.9</td><td>38.2</td><td>22.0</td><td>57.7</td></tr><tr><td>VMSST (no dec. l.e.)</td><td>70.8</td><td>70.7</td><td>76.7</td><td>66.7</td><td>60.9</td><td>77.4</td><td>88.6</td><td>38.3</td><td>21.8</td><td>57.6</td></tr></table>
223
+
224
+ Table 4: Ablations of VMSST. We investigate ablations involving factorization of the decoder projection layer (fact.), using 4 language encoders instead of 1 (4 enc.), using 12 layer (12L dec.) and 1 layer (1L dec.) decoders, using no KL term (no KL), using only a single encoder for both language and semantic variables (1 enc.), and using no encoder language embeddings (no enc. i.e.) or no decoder language embeddings (no dec. i.e.).
225
+
226
+ <table><tr><td>Model</td><td>de-en</td><td>fr-en</td><td>ru-en</td><td>zh-en</td><td>Avg.</td></tr><tr><td>mUSE</td><td>88.5</td><td>86.3</td><td>89.1</td><td>86.9</td><td>87.7</td></tr><tr><td>LASER</td><td>95.4</td><td>92.4</td><td>92.3</td><td>91.2</td><td>92.8</td></tr><tr><td>XLM-R (NLI/STS-B)</td><td>86.8</td><td>84.4</td><td>86.3</td><td>85.1</td><td>85.7</td></tr><tr><td>XLM-R (Para.)</td><td>90.8</td><td>87.1</td><td>88.6</td><td>87.8</td><td>88.6</td></tr><tr><td>LaBSE</td><td>95.9</td><td>92.5</td><td>92.4</td><td>93.0</td><td>93.5</td></tr><tr><td>VMSST</td><td>94.3</td><td>91.0</td><td>91.8</td><td>92.8</td><td>92.5</td></tr></table>
227
+
228
+ Table 5: Comparisons to related work on BUCC in accuracy $\times 100$ using the margin approach from Artetxe and Schwenk (2019a). Note that models in this table are not trained on the same data; for instance LaBSE was trained on substantially more parallel data and XLM-R (Para.) was trained using a large English paraphrase corpus in addition to parallel data.
229
+
230
+ # 7 Analysis
231
+
232
+ In this section, we analyze VMSST with additional experiments. We give a high-level overview in this section and put details and results in Appendix A.
233
+
234
+ We first investigate different ablations of the model. We analyzed aspects such as factorizing the projection layer, using weaker decoders, using 4 language-specific encoders instead of 1, removing the KL term, using a single encoder for the semantic and language embeddings, and removing the language embeddings from the encoder and from the decoder.
235
+
236
+ Secondly, we analyze the effect of the parameter sharing approximation in VMSST, where we train a full model with separate encoders and decoders for each language. This experiment uses data in 4 languages to make this experiment tractable. We found the performance to be similar enough that we can say the approximation holds, but there does remain a small gap. We hypothesize however, that this performance gap will shrink as the number of layers of the model increases.
237
+
238
+ Thirdly, we evaluate the performance of zero-shot bitext mining on languages that were unseen in the training data. We find significant improvement in this setting over the baseline BITRANSLATION. Since BITRANSLATION can be seen as an ablation of VMSST, we see that the source-separation loss especially helps with generalization to new languages.
239
+
240
+ Lastly, we investigate the impact of batch size on performance, comparing VMSST with CONTRASTIVE. It is common knowledge that contrastive models learn better representations when given harder negative examples, and bigger batch sizes increases the chances of finding these harder negatives. We experiment with batch sizes of 4096 and 8192, for both the 6 layer and 24 layer randomly initialized versions of CONTRASTIVE and VMSST. We find that both models improve when trained with larger batches, with the very best model being the 24 layer VMSST.
241
+
242
+ # 8 Conclusion
243
+
244
+ We present VMSST, a generative massively multilingual text embedding model trained to separate semantic information from language-specific information. VMSST also outperforms strong contrastive and generative baselines on a variety of tasks. There are several avenues for future work including alternative pretraining objectives that better fit the use case of the decoder, explore incorporating monolingual data into the generative objective, investigate synergy between VMSST and contrastive methods as they seem to specialize in different tasks, and lastly scale up to bigger models, more data, and languages to further investigate VMSST versus contrastive methods.
245
+
246
+ # Limitations
247
+
248
+ Some of our experiments, specifically those in the ablations with large batch sizes, required significant computational resources. We trained these models on Google Cloud TPUv3 Pod slice with 128 chips for a few days. This experiment is important, as otherwise there would be questions on how the models compare at large batch sizes where contrastive models are known to work better. Due to training costs and in the interest of open research, we will open source our code and model checkpoints for the community to use and build upon.
249
+
250
+ Secondly, VMSST and BITRANSLATION require decoding which which means they need more memory for the decoder and are slower during training. However one advantage of these models is that they can be trained with gradient checkpointing greatly reducing their memory requirements, which cannot be used for the contrastive models as that would reduce the effective batch size for finding negative examples. Moreover, during inference, there is no difference in the memory or speed requirements in CONTRASTIVE, BITRANSLATION, or VMSST as only a single encoder is used in inference and there is no decoding.
251
+
252
+ # Acknowledgements
253
+
254
+ We are grateful to Livio Baldini-Soares, Wenhu Chen, Zhuyun Dai, Tom Kwiatkowski, Jianmo Ni, Slav Petrov, Jason Riesa, and Pat Verga for useful discussions during the course of the project.
255
+
256
+ # References
257
+
258
+ Eneko Agirre, Carmen Banea, Claire Cardie, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Weiwei Guo, Inigo Lopez-Gazpio, Montse Maritxalar, Rada Mihalcea, German Rigau, Larraitz Uria, and Janyce Wiebe. 2015. SemEval-2015 task 2: Semantic textual similarity, English, Spanish and pilot on interpretability. In Proceedings of the 9th International Workshop on Semantic Evaluation (SemEval 2015), pages 252-263, Denver, Colorado. Association for Computational Linguistics.
259
+ Eneko Agirre, Carmen Banea, Claire Cardie, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Weiwei Guo, Rada Mihalcea, German Rigau, and Janyce Wiebe. 2014. SemEval-2014 task 10: Multilingual semantic textual similarity. In Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval 2014), pages 81–91, Dublin, Ireland. Association for Computational Linguistics.
260
+
261
+ Eneko Agirre, Carmen Banea, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Rada Mihalcea, German Rigau, and Janyce Wiebe. 2016. SemEval-2016 task 1: Semantic textual similarity, monolingual and cross-lingual evaluation. In Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016), pages 497-511, San Diego, California. Association for Computational Linguistics.
262
+ Eneko Agirre, Daniel Cer, Mona Diab, and Aitor Gonzalez-Agirre. 2012. SemEval-2012 task 6: A pilot on semantic textual similarity. In *SEM 2012: The First Joint Conference on Lexical and Computational Semantics – Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation (SemEval 2012), pages 385–393, Montréal, Canada. Association for Computational Linguistics.
263
+ Eneko Agirre, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, and Weiwei Guo. 2013. *SEM 2013 shared task: Semantic textual similarity. In Second Joint Conference on Lexical and Computational Semantics (*SEM), Volume 1: Proceedings of the Main Conference and the Shared Task: Semantic Textual Similarity, pages 32-43, Atlanta, Georgia, USA. Association for Computational Linguistics.
264
+ Mikel Artetxe and Holger Schwenk. 2019a. Margin-based parallel corpus mining with multilingual sentence embeddings. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3197-3203, Florence, Italy. Association for Computational Linguistics.
265
+ Mikel Artetxe and Holger Schwenk. 2019b. Massively multilingual sentence embeddings for zero-shot cross-lingual transfer and beyond. Transactions of the Association for Computational Linguistics, 7:597-610.
266
+ Daniel Cer, Mona Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. 2017. SemEval-2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 1-14, Vancouver, Canada. Association for Computational Linguistics.
267
+ Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. 2020. A simple framework for contrastive learning of visual representations. In Proceedings of the International Conference of Machine Learning.
268
+ Zewen Chi, Shaohan Huang, Li Dong, Shuming Ma, Bo Zheng, Saksham Singhal, Payal Bajaj, Xia Song, Xian-Ling Mao, Heyan Huang, and Furu Wei. 2022. XLM-E: Cross-lingual language model pre-training via ELECTRA. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6170–6182, Dublin, Ireland. Association for Computational Linguistics.
269
+
270
+ Cristina Espana-Bonet, Adám Csaba Varga, Alberto Barrón-Cedeno, and Josef van Genabith. 2017. An empirical analysis of nmt-derived interlingual embeddings and their use in parallel sentence identification. IEEE Journal of Selected Topics in Signal Processing, 11(8):1340-1350.
271
+ Fangxiaoyu Feng, Yinfei Yang, Daniel Cer, Naveen Arivazhagan, and Wei Wang. 2022. Language-agnostic BERT sentence embedding. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 878-891, Dublin, Ireland. Association for Computational Linguistics.
272
+ Koustava Goswami, Sourav Dutta, Haytham Assem, Theodorus Fransen, and John P. McCrae. 2021. Cross-lingual sentence embedding using multi-task learning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 9099–9113, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
273
+ Mandy Guo, Qinlan Shen, Yinfei Yang, Heming Ge, Daniel Cer, Gustavo Hernandez Abrego, Keith Stevens, Noah Constant, Yun-Hsuan Sung, Brian Strope, and Ray Kurzweil. 2018. Effective parallel corpus mining using bilingual sentence embeddings. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 165-176, Brussels, Belgium. Association for Computational Linguistics.
274
+ Junxian He, Daniel Spokoyny, Graham Neubig, and Taylor Berg-Kirkpatrick. 2019. Lagging inference networks and posterior collapse in variational autoencoders. arXiv preprint arXiv:1901.05534.
275
+ Karl Moritz Hermann and Phil Blunsom. 2014. Multilingual models for compositional distributed semantics. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 58-68, Baltimore, Maryland. Association for Computational Linguistics.
276
+ 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.
277
+ Yoon Kim, Sam Wiseman, Andrew Miller, David Sontag, and Alexander Rush. 2018. Semi-amortized variational autoencoders. In International Conference on Machine Learning, pages 2678-2687. PMLR.
278
+ Diederik P Kingma and Max Welling. 2013. Autoencoding variational bayes. arXiv preprint arXiv:1312.6114.
279
+ Taku Kudo and John Richardson. 2018. SentencePiece: A simple and language independent subword tokenizer and tokenizer for neural text processing. In
280
+
281
+ Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 66-71, Brussels, Belgium. Association for Computational Linguistics.
282
+ 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.
283
+ Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020a. BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880, Online. Association for Computational Linguistics.
284
+ Patrick Lewis, Ethan Perez, Aleksandra 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. Advances in Neural Information Processing Systems, 33:9459-9474.
285
+ Patrick Lewis, Yuxiang Wu, Linqing Liu, Pasquale Minervini, Heinrich Kuttler, Aleksandra Piktus, Pontus Stenetorp, and Sebastian Riedel. 2021. PAQ: 65 million probably-asked questions and what you can do with them. Transactions of the Association for Computational Linguistics, 9:1098-1115.
286
+ Pierre Lison, Jörg Tiedemann, and Milen Kouylekov. 2018. OpenSubtitles2018: Statistical rescoring of sentence alignments in large, noisy parallel corpora. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018), Miyazaki, Japan. European Language Resources Association (ELRA).
287
+ Shayne Longpre, Yi Lu, and Joachim Daiber. 2021. MKQA: A linguistically diverse benchmark for multilingual open domain question answering. Transactions of the Association for Computational Linguistics, 9:1389-1406.
288
+ Qi Qian, Lei Shang, Baigui Sun, Juhua Hu, Hao Li, and Rong Jin. 2019. Softtriple loss: Deep metric learning without triplet sampling. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6450-6458.
289
+ 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 International Conference on Machine
290
+
291
+ Learning, volume 139 of Proceedings of Machine Learning Research, pages 8748-8763. PMLR.
292
+ Milos Radovanovic, Alexandros Nanopoulos, and Mirjana Ivanovic. 2010. Hubs in space: Popular nearest neighbors in high-dimensional data. Journal of Machine Learning Research, 11(sept):2487-2531.
293
+ Milos Radovanovic, Alexandros Nanopoulos, and Mirjana Ivanović. 2010. On the existence of obstinate results in vector space models. In Proceedings of the 33rd international ACM SIGIR conference on Research and development in information retrieval, pages 186-193.
294
+ Alexandre Rafalovitch and Robert Dale. 2009. United Nations general assembly resolutions: A six-language parallel corpus. In Proceedings of Machine Translation Summit XII: Posters, Ottawa, Canada.
295
+ Nils Reimers and Iryna Gurevych. 2019. SentenceBERT: Sentence embeddings using Siamese BERTnetworks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3982-3992, Hong Kong, China. Association for Computational Linguistics.
296
+ Nils Reimers and Iryna Gurevych. 2020. Making monolingual sentence embeddings multilingual using knowledge distillation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4512-4525, Online. Association for Computational Linguistics.
297
+ Holger Schwenk. 2018. Filtering and mining parallel data in a joint multilingual space. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 228-234, Melbourne, Australia. Association for Computational Linguistics.
298
+ Holger Schwenk and Matthijs Douze. 2017. Learning joint multilingual sentence representations with neural machine translation. In Proceedings of the 2nd Workshop on Representation Learning for NLP, pages 157-167, Vancouver, Canada. Association for Computational Linguistics.
299
+ Noam Shazeer and Mitchell Stern. 2018. Adafactor: Adaptive learning rates with sublinear memory cost. In International Conference on Machine Learning, pages 4596-4604. PMLR.
300
+ Karan Singla, Dogan Can, and Shrikanth Narayanan. 2018. A multi-task approach to learning multilingual representations. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 214-220, Melbourne, Australia. Association for Computational Linguistics.
301
+ Kihyuk Sohn. 2016. Improved deep metric learning with multi-class n-pair loss objective. Advances in neural information processing systems, 29.
302
+
303
+ 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, pages 5998-6008.
304
+ Jason Weston, Samy Bengio, and Nicolas Usunier. 2010. Large scale image annotation: learning to rank with joint word-image embeddings. Machine learning, 81(1):21-35.
305
+ John Wieting, Mohit Bansal, Kevin Gimpel, and Karen Livescu. 2016. Towards universal paraphrastic sentence embeddings. In Proceedings of the International Conference on Learning Representations.
306
+ John Wieting, Kevin Gimpel, Graham Neubig, and Taylor Berg-Kirkpatrick. 2019. Simple and effective paraphrastic similarity from parallel translations. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4602-4608, Florence, Italy. Association for Computational Linguistics.
307
+ John Wieting, Graham Neubig, and Taylor Berg-Kirkpatrick. 2020. A bilingual generative transformer for semantic sentence embedding. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1581-1594, Online. Association for Computational Linguistics.
308
+ Jiacheng Xu and Greg Durrett. 2018. Spherical latent spaces for stable variational autoencoders. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4503-4513, Brussels, Belgium. Association for Computational Linguistics.
309
+ Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, and Colin Raffel. 2021. mT5: A massively multilingual pre-trained text-to-text transformer. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 483-498, Online. Association for Computational Linguistics.
310
+ Yinfei Yang, Daniel Cer, Amin Ahmad, Mandy Guo, Jax Law, Noah Constant, Gustavo Hernandez Abrego, Steve Yuan, Chris Tar, Yun-hsuan Sung, Brian Strope, and Ray Kurzweil. 2020. Multilingual universal sentence encoder for semantic retrieval. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 87-94, Online. Association for Computational Linguistics.
311
+ Zichao Yang, Zhiting Hu, Ruslan Salakhutdinov, and Taylor Berg-Kirkpatrick. 2017. Improved variational autoencoders for text modeling using dilated convolutions. In International Conference on Machine Learning, pages 3881-3890. JMLR.org.
312
+
313
+ Pierre Zweigenbaum, Serge Sharoff, and Reinhard Rapp. 2018. Overview of the third bucc shared task: Spotting parallel sentences in comparable corpora. In Proceedings of 11th Workshop on Building and Us ing Comparable Corpora, pages 39-42.
314
+
315
+ # Appendices accompanying “Beyond Contrastive Learning: A Variational Generative Model for Multilingual Retrieval”
316
+
317
+ # A Analysis
318
+
319
+ # A.1 Model Ablations
320
+
321
+ In this section, we investigate different ablations of VMSST. The ablations are shown in Table 4. We start from the 24 layer randomly initialized VMSST, and change it to see how certain hyperparameters and model choices affect performance.
322
+
323
+ Our first experiment, VMSST (fact.) investigates what happens if we simply factor the final projection layer of the decoder. This can save a lot of memory in the model, as that projection layer is $3 \times d \times V$ where $d$ is the hidden state dimension size and $V$ is the size of the vocabulary. $^{13}$ If we factor the projection layer, we can reduce the space to $d \times V + 3d \times d$ . In practice, this saves about 509 million parameters for our 24 layer models. However from the first row in Table 4, we see that this small change has a significant effect on performance, weakening results on semantic similarity and question retrieval tasks and strengthening results on bitext mining tasks.
324
+
325
+ In our second ablation, VMSST (4 enc.), we spread the model capacity of the language-specific encoder to 4 encoders, instead of the single encoder in our previous experiments. We allocate the languages randomly to the different encoders. We find that this doesn't improve results, perhaps because the 24 layer model has sufficient capacity to model all of the languages in one shared encoder. We could allocate languages to encoders based on language families, and perhaps this could fare better, but we leave that for future work.
326
+
327
+ Prior work (Wieting et al., 2020) shows that, a decoder that is weaker (i.e. less layers) can lead to stronger embeddings. This effect is presumably because there is more pressure on the sentence embedding to fully and clearly capture the semantics since it cannot rely on a strong decoder to fill in gaps. We found that that using a weaker single layer decoder (1L dec.), does indeed seem to improve performance. We also tried a 12 layer ablation (12L dec.), but that seemed to not have a significant improvement in the results.
328
+
329
+ The last four ablations investigate different modelling choices. In the first we eliminate the KL term (no KL), which has the most significant effect on performance, especially on cross-lingual tasks. In the second ablation, we use a single encoder instead of the twin encoders (1 enc.), one for semantic embeddings and one for language embeddings, we find that this has a modest overall effect on performance. Lastly, we eliminate the language embeddings. First we remove the language embedding inputs to the decoder (no enc. l.e.), then we experiment by removing the input language embeddings to the language-specific encoder (no dec. l.e.). We find these language embeddings have a smaller than expected impact on performance, perhaps because the large capacity of the decoder can ascertain the language being input or decoded.
330
+
331
+ # A.2 Testing the Parameter Sharing in VMSST
332
+
333
+ Parameter sharing was needed in order efficiently perform source separation on $N$ languages. Specifically we collapsed the language encoders into a single encoder and we collapsed the decoders into a single decoder. The VMSST approximates having $N$ language encoders by using an input embedding to indicate the language being considered. The same strategy is applied with the decoders as well, with the first input token to the decoder indicating the language to be generated.
334
+
335
+ In this section, we investigate what effect this parameter sharing has on VMSST by using $N$ encoders and decoders (full enc, full dec.). We experiment with 6 layer Transformer encoders and 4 languages Spanish, English, Arabic, and Turkish in order to keep the experiments tractable as in this setting we have 5 encoders and 4 decoders. The results are shown in Table 6.
336
+
337
+ The results indicate that the approximation appears to hold, as VMSST is much closer to the full model than BITRANSLATION, which is an ablation of VMSST without the source separation. However, there is still a gap between the full encoder/decoder of VMSST and VMSST. We hypothesize however, that as the number of layers of the model increases, this performance gap also shrinks. The extra capacity of these layers will allow for the model to separate language-specific variations without having separate parameters for each language. Evidence for this hypothesis is in Table 4 where having the language variation shared
338
+
339
+ <table><tr><td rowspan="2">Model</td><td rowspan="2">Eng.</td><td colspan="5">Sem. Sim.</td><td colspan="3">Bitext Mining</td><td colspan="3">Quest. Retrieval</td><td rowspan="2">Score</td></tr><tr><td colspan="5">XL</td><td colspan="3">Tatoeba</td><td>NQ</td><td colspan="2">MKQA</td></tr><tr><td>-</td><td>-</td><td>ar-en</td><td>ar-ar</td><td>es-en</td><td>es-es</td><td>tr-en</td><td>ar</td><td>es</td><td>tr</td><td>-</td><td>ar</td><td>es</td><td>tr</td></tr><tr><td colspan="14">Random Init. (6 Layer) - ar, en, es, tr</td></tr><tr><td>CONTRASTIVE</td><td>68.6</td><td>81.7</td><td>68.5</td><td>68.3</td><td>64.8</td><td>69.7</td><td>97.9</td><td>88.2</td><td>98.1</td><td>36.4</td><td>24.6</td><td>13.0</td><td>22.6</td></tr><tr><td>BITRANSlation</td><td>69.0</td><td>82.4</td><td>63.1</td><td>57.8</td><td>58.7</td><td>67.3</td><td>97.6</td><td>84.3</td><td>96.4</td><td>37.8</td><td>25.4</td><td>12.2</td><td>21.1</td></tr><tr><td>VMSST</td><td>70.6</td><td>83.1</td><td>65.9</td><td>63.1</td><td>62.1</td><td>68.8</td><td>97.9</td><td>84.9</td><td>97.2</td><td>38.1</td><td>27.2</td><td>14.4</td><td>24.1</td></tr><tr><td>VMSST (full enc., full dec.)</td><td>70.3</td><td>82.3</td><td>65.6</td><td>60.0</td><td>62.8</td><td>67.9</td><td>98.4</td><td>87.9</td><td>97.8</td><td>39.0</td><td>27.2</td><td>14.7</td><td>24.2</td></tr></table>
340
+
341
+ Table 6: Comparison of VMSST with a variation that has no parameter sharing, VMSST (full enc., full dec.). We experiment on 4 languages, so we have 5 encoders and 4 decoders.
342
+
343
+ amongst 4 encoders instead of 1 actually appears to weaken performance overall.
344
+
345
+ # A.3 Zero-Shot Bitext Mining
346
+
347
+ The Tatoeba dataset contains parallel sentence pairs of English with 112 languages. Our model is trained using 93 of these languages, and therefore there are 19 languages we can use for a zero-shot evaluation of bitext mining. Table 8 summarizes the results of this zero-shot evaluation for the two generation objectives, BITRANSLATION and VMSST considered in this paper. The results are shown in Table 8. We also compute $\Delta$ which is the difference between the performance gap of VMSST and BITRANSLATION on the seen and unseen languages. From the results, we see that VMSST does even better than BITRANSLATION on unseen languages than unseen languages. Since BITRANSLATION can be seen as an ablation of VMSST, i.e. VMSST without the source-separation loss, we see that the source-separation loss especially helps with generalization to new languages.
348
+
349
+ # A.4 Effects of Batch Size
350
+
351
+ Lastly, we investigate how VMSST compares to CONTRASTIVE as batch size increases. It is common knowledge that contrastive models learn better representations when given harder negative examples. Since we are using in-batch negatives in our contrastive baseline, the increased batch size increases the chances of encountering harder negative examples and will generally increase performance up to the point where the negatives become false. Furthermore, bigger batch sizes are known to also improve results in models using the Transformer architecture, presumably due to less noisy gradients, which would improve the results of both CONTRASTIVE and VMSST. It is important to note that using bigger batch sizes, means seeing
352
+
353
+ more examples (100,000 steps at a batch size of 2048 is about 1 pass through the data). However, parallel data is so numerous that training to convergence on the available data is not very practical. Therefore, these experiments do not separate out the gains from using a bigger batch size versus seeing more training data, but we argue that is not an important distinction to make due to the sheer amount (billions of pairs) of parallel data available.
354
+
355
+ We experiment with batch sizes of 4096 and 8192, double and quadruple the 2048 used in all experiments up to this point, for both the 6 layer and 24 layer randomly initialized versions of CONTRASTIVE and VMSST. All models are trained again for 100,000 steps. The results are shown in Table 7.
356
+
357
+ From the results, we see that for the 6 layer model, increasing the batch size equalizes VMSST and CONTRASTIVE overall, however each performs better at different tasks. CONTRASTIVE has better performance on Tatoeba, XL semantic similarity, and BUCC with margin (Artetxe and Schwenk, 2019a), where VMSST has better performance on English semantic similarity, BUCC with cosine similarity, and the retrieval tasks. For the 24 layer variations, VMSST is better at every task, with the exception of Tatoeba, and has the highest overall score of any model in the table. The 24 layer CONTRASTIVE variation does not perform as well as the 6 layer version at any batch size, in contrast to VMSST where the 24 layer model always outperforms the 6 layer variation.
358
+
359
+ # B Full Experimental Results
360
+
361
+ We include full results for our models using the pre-trained mT5 large checkpoint. We evaluate on English semantic similarity, Cross-lingual semantic similarity, question retrieval, and bitext mining.
362
+
363
+ <table><tr><td rowspan="2">Model</td><td rowspan="2">B. Size</td><td colspan="4">Sem. Sim.</td><td colspan="3">Bitext Mining</td><td colspan="3">Quest. Retrieval</td></tr><tr><td>Eng.</td><td>XL</td><td>XL (s.)</td><td>XL (d.)</td><td>Tatoeba</td><td>BUCC (c.)</td><td>BUCC (m.)</td><td>NQ</td><td>MKQA</td><td>Score</td></tr><tr><td colspan="12">Random Init. (6 Layer)</td></tr><tr><td rowspan="3">CONTRASTIVE</td><td>2048</td><td>65.5</td><td>66.8</td><td>73.3</td><td>62.4</td><td>63.1</td><td>64.7</td><td>82.9</td><td>34.0</td><td>17.6</td><td>53.5</td></tr><tr><td>4096</td><td>67.5</td><td>69.3</td><td>75.4</td><td>65.3</td><td>66.0</td><td>71.5</td><td>87.0</td><td>35.3</td><td>19.2</td><td>56.1</td></tr><tr><td>8192</td><td>69.4</td><td>71.6</td><td>76.8</td><td>68.1</td><td>68.6</td><td>76.2</td><td>89.4</td><td>36.4</td><td>20.9</td><td>58.3</td></tr><tr><td rowspan="3">VMSST</td><td>2048</td><td>70.1</td><td>67.4</td><td>75.1</td><td>62.2</td><td>58.7</td><td>72.6</td><td>84.7</td><td>37.2</td><td>20.2</td><td>55.4</td></tr><tr><td>4096</td><td>70.2</td><td>67.4</td><td>75.3</td><td>62.1</td><td>58.5</td><td>73.1</td><td>86.0</td><td>38.2</td><td>20.3</td><td>55.7</td></tr><tr><td>8192</td><td>71.4</td><td>70.9</td><td>76.6</td><td>67.1</td><td>61.8</td><td>77.9</td><td>88.0</td><td>39.0</td><td>22.4</td><td>58.1</td></tr><tr><td colspan="12">Random Init. (24 Layer)</td></tr><tr><td rowspan="3">CONTRASTIVE</td><td>2048</td><td>64.4</td><td>64.6</td><td>71.6</td><td>60.0</td><td>62.7</td><td>62.8</td><td>82.5</td><td>32.8</td><td>16.0</td><td>52.2</td></tr><tr><td>4096</td><td>66.6</td><td>68.6</td><td>75.1</td><td>64.3</td><td>65.7</td><td>70.9</td><td>86.8</td><td>34.7</td><td>18.1</td><td>55.4</td></tr><tr><td>8192</td><td>68.0</td><td>70.2</td><td>76.2</td><td>66.2</td><td>67.7</td><td>74.2</td><td>88.3</td><td>35.2</td><td>19.4</td><td>57.0</td></tr><tr><td rowspan="3">VMSST</td><td>2048</td><td>71.1</td><td>71.7</td><td>77.7</td><td>67.7</td><td>61.4</td><td>78.4</td><td>87.8</td><td>38.3</td><td>22.3</td><td>58.0</td></tr><tr><td>4096</td><td>72.0</td><td>72.1</td><td>77.7</td><td>68.3</td><td>62.9</td><td>81.0</td><td>89.7</td><td>38.7</td><td>23.5</td><td>59.1</td></tr><tr><td>8192</td><td>72.7</td><td>74.1</td><td>79.0</td><td>70.8</td><td>64.1</td><td>82.0</td><td>90.2</td><td>39.0</td><td>24.3</td><td>60.1</td></tr></table>
364
+
365
+ Table 7: Comparison of CONTRASTIVE and VMSST using different batch sizes during training.
366
+
367
+ <table><tr><td>Model</td><td>Tat. (seen)</td><td>Tat. (unseen)</td><td>Δ</td></tr><tr><td colspan="4">Random Init. (6 Layer)</td></tr><tr><td>BITRANSlation</td><td>59.3</td><td>24.0</td><td>-</td></tr><tr><td>VMSST</td><td>64.4</td><td>30.6</td><td>1.5</td></tr><tr><td colspan="4">Random Init. (24 Layer)</td></tr><tr><td>BITRANSlation</td><td>82.6</td><td>56.5</td><td>-</td></tr><tr><td>VMSST</td><td>84.9</td><td>62.2</td><td>3.4</td></tr><tr><td colspan="4">Pretrained (24 Layer)</td></tr><tr><td>BITRANSlation</td><td>63.7</td><td>26.5</td><td>-</td></tr><tr><td>VMSST</td><td>67.3</td><td>32.6</td><td>2.5</td></tr></table>
368
+
369
+ Table 8: Results on languages seen during training (seen) and languages that were not seen during training (unseen) on the Tatoeba dataset.
370
+
371
+ # B.1 Semantic Similarity
372
+
373
+ For English semantic similarity, we use the SemEval semantic textual similarity (STS) tasks from 2012 to 2016 (Agirre et al., 2012, 2013, 2014, 2015, 2016) as was done initially for sentence embeddings in (Wieting et al., 2016). As our test set, we report the average Pearson's $r$ over each year of the STS tasks from 2012-2016 as is convention in the top part of Table 9. However, some recent work, like Reimers and Gurevych (2019) computed Spearman's $\rho$ over concatenated datasets for each year of the STS competition. To be consistent with these works, we also include evaluations using this approach in the bottom part of Table 9. One other difference between these two ways of calculating the results is the inclusion of the SMT dataset of the 2013 task. When computing the results using Pearson's $r$ , this dataset is included, but when
374
+
375
+ computing the results using Spearman's $\rho$ , it is not included.
376
+
377
+ For cross-lingual semantic similarity and semantic similarity in non-English languages, we evaluate on the STS tasks from SemEval 2017. This evaluation contains Arabic-Arabic, Arabic-English, Spanish-Spanish, Spanish-English, and Turkish-English datasets. The datasets were created by translating one or both pairs of an English STS pair into Arabic (ar), Spanish (es), or Turkish (tr). Following convention, we report results with Pearson's $r$ for all systems, but also include results in Spearman's $\rho$ in Table 10.
378
+
379
+ # B.2 Question Retrieval
380
+
381
+ For our question retrieval evaluation, we report the accuracy $(\mathbb{R}@\mathbb{1})$ on the test sets of Natural Questions (NQ) (Kwiatkowski et al., 2019) shown in Table 11 and the Multilingual Knowledge Questions and Answers (MKQA) (Longpre et al., 2021) shown in Table 12. We use the the Probably Asked Questions dataset (PAQ) (Lewis et al., 2021) as a knowledge base from which we look up the nearest neighbor of each question in the NQ and MKQA test sets using cosine similarity.
382
+
383
+ # B.3 Bitext Mining
384
+
385
+ For bitext mining, we use the Tatoeba dataset introduced in Artetxe and Schwenk (2019b) and the 2018 Building and Using Parallel Corpora (BUCC) shared bitext mining task (Zweigenbaum et al., 2018).
386
+
387
+ The Tatoeba dataset consists of 100-1000 pairs
388
+
389
+ <table><tr><td rowspan="2">Model</td><td colspan="5">English Semantic Similarity</td></tr><tr><td>2012</td><td>2013</td><td>2014</td><td>2015</td><td>2016</td></tr><tr><td>CONTRASTIVE</td><td>69.7</td><td>61.1</td><td>76.4</td><td>81.4</td><td>77.7</td></tr><tr><td>BITRANSLATION</td><td>69.1</td><td>63.6</td><td>76.4</td><td>81.0</td><td>79.9</td></tr><tr><td>VMSST CONTRASTIVE</td><td>70.2</td><td>61.6</td><td>76.5</td><td>81.3</td><td>77.5</td></tr><tr><td>VMSST</td><td>70.5</td><td>64.3</td><td>76.5</td><td>81.6</td><td>80.1</td></tr><tr><td>CONTRASTIVE</td><td>68.0</td><td>74.9</td><td>69.1</td><td>79.9</td><td>76.9</td></tr><tr><td>BITRANSLATION</td><td>70.7</td><td>77.9</td><td>72.2</td><td>81.8</td><td>79.7</td></tr><tr><td>VMSST CONTRASTIVE</td><td>68.4</td><td>75.1</td><td>69.2</td><td>80.2</td><td>76.8</td></tr><tr><td>VMSST</td><td>72.7</td><td>77.9</td><td>72.7</td><td>82.1</td><td>79.2</td></tr></table>
390
+
391
+ Table 9: Full results on English STS. In the first part of the table, we show results, measured in Pearson's $r \times 100$ , for each year of the STS tasks 2012-2016 as well as the average performance across all years. In the second part, we evaluate based on the Spearman's $\rho \times 100$ of the concatenation of the datasets of each year with the 2013 SMT dataset removed following (Reimers and Gurevych, 2019).
392
+
393
+ <table><tr><td rowspan="2">Model</td><td colspan="10">Cross-Lingual Semantic Similarity</td></tr><tr><td colspan="2">ar-ar</td><td colspan="2">ar-en</td><td colspan="2">es-es</td><td colspan="2">es-en</td><td colspan="2">tr-en</td></tr><tr><td>CONTRASTIVE</td><td>72.4</td><td>72.2</td><td>72.7</td><td>74.2</td><td>79.7</td><td>81.0</td><td>71.7</td><td>72.0</td><td>77.2</td><td>77.0</td></tr><tr><td>BITRANSLATION</td><td>75.6</td><td>76.0</td><td>77.0</td><td>78.6</td><td>84.0</td><td>84.8</td><td>76.2</td><td>77.2</td><td>77.3</td><td>77.5</td></tr><tr><td>VMSST CONTRASTIVE</td><td>73.2</td><td>73.1</td><td>73.5</td><td>75.1</td><td>80.2</td><td>81.3</td><td>72.4</td><td>72.4</td><td>77.8</td><td>78.0</td></tr><tr><td>VMSST</td><td>77.6</td><td>78.1</td><td>78.5</td><td>78.8</td><td>85.5</td><td>85.7</td><td>77.0</td><td>77.4</td><td>77.0</td><td>77.0</td></tr></table>
394
+
395
+ Table 10: Full results on Cross-Linguual STS. We report results using both Pearson's $r \times 100$ and Spearman's $\rho \times 100$ across datasets, where Pearson's $r \times 100$ is the first column for each language pair and Spearman's $\rho \times 100$ is the second column.
396
+
397
+ <table><tr><td>Model</td><td>NQ</td></tr><tr><td>CONTRASTIVE</td><td>40.2</td></tr><tr><td>BITRANSLATION</td><td>40.9</td></tr><tr><td>VMSST CONTRASTIVE</td><td>40.3</td></tr><tr><td>VMSST</td><td>40.8</td></tr></table>
398
+
399
+ Table 11: Full results on question retrieval on the NQ data. We evaluate retrieval accuracy $\times 100$ using PAQ as a question knowledge base.
400
+
401
+ of data aligned to English for 112 languages. The accuracy for Tatoeba can be computed in two ways, depending if English is the target language or source language. We compute accuracy using cosine similarity in both directions for all 112 languages (19 are unseen in the training data) and average this score for all languages.
402
+
403
+ The goal of the BUCC task is to find the gold aligned parallel sentences given two corpora (one being very large) in two distinct languages. Languages are aligned with English and consist of German (de), French (fr), Russian (ru), and Chinese (zh). Following Schwenk (2018), we evaluate on the publicly available BUCC data. This involves scoring all pairs between the source target
404
+
405
+ sentences and finding the optimal threshold that separates the data. Using the threshold, we can compute the precision, recall, and $F_{1}$ of the alignments. We report $F_{1} \times 100$ in our results.
406
+
407
+ We compare two different approaches for finding the sentence alignments. In the first, BUCC (cosine), we compute the cosine similarity between the non-English source sentences and the English target sentences, selecting the highest scoring English sentence as the match. In the second, BUCC (margin), we follow Artetxe and Schwenk (2019a) and use a margin-based scoring approach.
408
+
409
+ # C Full Training Data
410
+
411
+ We follow Artetxe and Schwenk (2019b) in constructing our training data, sampling data from Europarl, $^{14}$ , United Nations (Rafalovitch and Dale, 2009), $^{15}$ OpenSubtitles2018 (Lison et al., 2018), $^{16}$ , Global Voices, $^{17}$ Tanzil, $^{18}$ and Tatoeba v2021-07-
412
+
413
+ <sup>14</sup>http://opus.nlpl.eu/Europarl.php
414
+ 15https://opus.nlpl.eu/UN.php
415
+ <sup>16</sup>http://opus.nlpl.eu/OpenSubtitles.php
416
+ 17https://opus.nlp1.eu/GlobalVoices.php
417
+ 18https://opus.nlpl.eu/Tanzil.php
418
+
419
+ 22.19
420
+
421
+ The only deviation from their data sampling approach is that we take care to not include any Tatoeba test data in our training data. Our final corpus has nearly 216 million training examples, slightly less than 220 million reported in Artetxe and Schwenk (2019b). We use both English and Spanish as pivot languages, so each pair includes at least one English or Spanish sentence, and attempt to use approximately the same amount of data for each language if possible. We note that we only have training data for 92 languages instead of the 93 in Artetxe and Schwenk (2019b) due to not having training data for Aymara (ay). The full amount of English and Spanish parallel data used for each of the 92 languages is reported in Table 15.
422
+
423
+ <table><tr><td rowspan="2">Model
424
+ Language</td><td rowspan="2">ar</td><td rowspan="2">da</td><td rowspan="2">de</td><td rowspan="2">en</td><td rowspan="2">es</td><td colspan="8">MKQA</td></tr><tr><td>fi</td><td>fr</td><td>he</td><td>hu</td><td>it</td><td>ja</td><td>km</td><td></td></tr><tr><td>CONTRASTIVE</td><td>21.4</td><td>30.4</td><td>29.2</td><td>33.2</td><td>30.4</td><td>27.7</td><td>30.0</td><td>24.4</td><td>26.9</td><td>29.4</td><td>24.2</td><td>23.6</td><td></td></tr><tr><td>BITRANSLATION</td><td>19.4</td><td>30.8</td><td>30.5</td><td>29.8</td><td>28.7</td><td>29.7</td><td>28.0</td><td>30.3</td><td>27.5</td><td>27.9</td><td>26.2</td><td>23.4</td><td></td></tr><tr><td>VMSST CONTRASTIVE</td><td>24.6</td><td>32.0</td><td>30.5</td><td>33.4</td><td>31.6</td><td>29.8</td><td>30.9</td><td>27.9</td><td>28.9</td><td>31.0</td><td>27.3</td><td>24.9</td><td></td></tr><tr><td>VMSST</td><td>21.4</td><td>32.1</td><td>32.5</td><td>31.5</td><td>30.3</td><td>31.3</td><td>30.0</td><td>31.9</td><td>29.9</td><td>30.0</td><td>29.9</td><td>25.9</td><td></td></tr><tr><td>Language</td><td>ko</td><td>ms</td><td>nl</td><td>no</td><td>pl</td><td>pt</td><td>ru</td><td>sv</td><td>th</td><td>tr</td><td>vi</td><td>zh</td><td></td></tr><tr><td>CONTRASTIVE</td><td>22.0</td><td>30.5</td><td>29.4</td><td>33.2</td><td>30.4</td><td>27.7</td><td>30.0</td><td>24.8</td><td>27.5</td><td>29.6</td><td>24.6</td><td>24.2</td><td></td></tr><tr><td>BITRANSLATION</td><td>19.4</td><td>30.8</td><td>30.9</td><td>30.0</td><td>29.2</td><td>30.2</td><td>28.1</td><td>30.4</td><td>28.0</td><td>28.3</td><td>26.9</td><td>23.7</td><td></td></tr><tr><td>VMSST CONTRASTIVE</td><td>25.3</td><td>32.3</td><td>30.6</td><td>33.4</td><td>31.5</td><td>30.1</td><td>31.0</td><td>28.1</td><td>29.9</td><td>31.1</td><td>27.7</td><td>24.9</td><td></td></tr><tr><td>VMSST</td><td>22.0</td><td>32.4</td><td>32.8</td><td>31.6</td><td>31.0</td><td>31.6</td><td>30.4</td><td>32.2</td><td>30.4</td><td>30.2</td><td>30.4</td><td>26.2</td><td></td></tr></table>
425
+
426
+ Table 12: Full results on question retrieval on the MKQA data. We evaluate retrieval accuracy $\times 100$ using PAQ as a question knowledge base.
427
+
428
+ <table><tr><td rowspan="2">Model</td><td colspan="4">Cosine</td><td colspan="4">Margin</td></tr><tr><td>de</td><td>fr</td><td>ru</td><td>zh</td><td>de</td><td>fr</td><td>ru</td><td>zh</td></tr><tr><td>CONTRASTIVE</td><td>84.6</td><td>81.3</td><td>66.6</td><td>64.4</td><td>96.2</td><td>93.7</td><td>92.1</td><td>93.0</td></tr><tr><td>BiTRANSLATION</td><td>90.1</td><td>85.5</td><td>84.1</td><td>84.1</td><td>93.6</td><td>90.3</td><td>91.3</td><td>92.4</td></tr><tr><td>VMSST CONTRASTIVE</td><td>84.8</td><td>81.9</td><td>67.4</td><td>64.4</td><td>96.1</td><td>93.6</td><td>92.1</td><td>92.9</td></tr><tr><td>VMSST</td><td>91.5</td><td>86.8</td><td>86.7</td><td>86.1</td><td>94.3</td><td>91.0</td><td>91.8</td><td>92.8</td></tr></table>
429
+
430
+ Table 13: Full results on BUCC. We report results using both cosine similarity and the margin approach from (Artetxe and Schwenk, 2019a). Results are reported as $F_{1} \times 100$ .
431
+
432
+ <table><tr><td>Language</td><td>afr</td><td>amh</td><td>ang</td><td>ara</td><td>arq</td><td>arz</td><td>ast</td><td>awa</td><td>aze</td><td>bel</td><td>ben</td><td>ber</td><td>bos</td><td>bre</td><td>bul</td><td>cat</td></tr><tr><td>CONTRASTIVE</td><td>97.6</td><td>94.9</td><td>66.8</td><td>95.0</td><td>61.8</td><td>86.1</td><td>91.3</td><td>74.0</td><td>95.8</td><td>96.8</td><td>92.4</td><td>80.4</td><td>97.5</td><td>47.2</td><td>96.4</td><td>97.8</td></tr><tr><td>BITRANSLATION</td><td>94.8</td><td>84.2</td><td>42.9</td><td>94.0</td><td>42.0</td><td>80.3</td><td>80.3</td><td>56.3</td><td>91.3</td><td>95.0</td><td>91.0</td><td>72.6</td><td>96.8</td><td>18.9</td><td>95.3</td><td>96.8</td></tr><tr><td>VMSST CONTRASTIVE</td><td>97.4</td><td>93.5</td><td>70.5</td><td>94.7</td><td>64.2</td><td>85.7</td><td>90.9</td><td>76.0</td><td>95.8</td><td>97.2</td><td>92.8</td><td>81.6</td><td>97.3</td><td>47.9</td><td>96.2</td><td>97.8</td></tr><tr><td>VMSST</td><td>95.6</td><td>88.1</td><td>53.4</td><td>94.6</td><td>50.2</td><td>84.7</td><td>86.2</td><td>64.3</td><td>93.5</td><td>95.6</td><td>91.9</td><td>79.0</td><td>97.0</td><td>26.1</td><td>95.8</td><td>97.0</td></tr><tr><td>Language</td><td>cbk</td><td>ceb</td><td>ces</td><td>cha</td><td>cmn</td><td>cor</td><td>csb</td><td>cym</td><td>dan</td><td>deu</td><td>dsb</td><td>dtp</td><td>ell</td><td>epo</td><td>est</td><td>eus</td></tr><tr><td>CONTRASTIVE</td><td>86.1</td><td>62.3</td><td>98.3</td><td>44.9</td><td>97.5</td><td>35.1</td><td>67.8</td><td>57.6</td><td>97.3</td><td>99.6</td><td>75.4</td><td>18.9</td><td>97.4</td><td>98.6</td><td>98.6</td><td>96.9</td></tr><tr><td>BITRANSLATION</td><td>78.0</td><td>48.8</td><td>97.3</td><td>33.6</td><td>95.6</td><td>18.4</td><td>48.6</td><td>37.0</td><td>96.0</td><td>99.3</td><td>53.1</td><td>8.3</td><td>95.8</td><td>98.3</td><td>97.8</td><td>94.8</td></tr><tr><td>VMSST CONTRASTIVE</td><td>86.9</td><td>63.7</td><td>98.2</td><td>44.2</td><td>97.7</td><td>37.6</td><td>69.8</td><td>56.4</td><td>97.2</td><td>99.6</td><td>76.9</td><td>20.3</td><td>97.2</td><td>98.4</td><td>98.8</td><td>97.1</td></tr><tr><td>VMSST</td><td>83.7</td><td>52.8</td><td>97.9</td><td>38.0</td><td>96.4</td><td>23.3</td><td>56.1</td><td>43.0</td><td>96.8</td><td>99.2</td><td>63.2</td><td>10.2</td><td>97.0</td><td>98.2</td><td>98.2</td><td>95.4</td></tr><tr><td>Language</td><td>fao</td><td>fin</td><td>fra</td><td>fry</td><td>glg</td><td>gle</td><td>glg</td><td>gsw</td><td>heb</td><td>hin</td><td>hrv</td><td>hsb</td><td>hun</td><td>hye</td><td>ido</td><td>ile</td></tr><tr><td>CONTRASTIVE</td><td>90.3</td><td>98.0</td><td>96.4</td><td>88.2</td><td>58.4</td><td>80.4</td><td>98.6</td><td>52.1</td><td>93.8</td><td>98.1</td><td>98.5</td><td>80.1</td><td>98.4</td><td>96.2</td><td>93.0</td><td>92.8</td></tr><tr><td>BITRANSLATION</td><td>78.2</td><td>97.8</td><td>95.8</td><td>80.1</td><td>35.6</td><td>60.6</td><td>96.8</td><td>44.9</td><td>93.0</td><td>96.4</td><td>96.8</td><td>58.6</td><td>96.4</td><td>95.2</td><td>87.9</td><td>86.7</td></tr><tr><td>VMSST CONTRASTIVE</td><td>91.0</td><td>98.2</td><td>96.6</td><td>87.9</td><td>55.7</td><td>79.5</td><td>98.6</td><td>53.8</td><td>93.7</td><td>98.0</td><td>98.4</td><td>82.4</td><td>98.2</td><td>96.1</td><td>94.4</td><td>93.1</td></tr><tr><td>VMSST</td><td>82.6</td><td>98.0</td><td>96.0</td><td>83.5</td><td>39.4</td><td>62.7</td><td>97.4</td><td>50.4</td><td>93.8</td><td>97.5</td><td>97.5</td><td>68.9</td><td>96.8</td><td>94.7</td><td>91.9</td><td>90.2</td></tr><tr><td>Language</td><td>ina</td><td>ind</td><td>isl</td><td>ita</td><td>jav</td><td>jpn</td><td>kab</td><td>kat</td><td>kaz</td><td>khm</td><td>kor</td><td>kur</td><td>kzj</td><td>lat</td><td>lfn</td><td>lit</td></tr><tr><td>CONTRASTIVE</td><td>96.8</td><td>97.0</td><td>97.0</td><td>96.6</td><td>74.1</td><td>98.3</td><td>71.7</td><td>95.6</td><td>92.8</td><td>87.8</td><td>95.2</td><td>76.3</td><td>17.4</td><td>89.9</td><td>83.6</td><td>98.2</td></tr><tr><td>BITRANSLATION</td><td>94.9</td><td>95.2</td><td>96.3</td><td>96.2</td><td>62.9</td><td>96.8</td><td>60.8</td><td>93.9</td><td>86.1</td><td>85.4</td><td>92.5</td><td>60.5</td><td>8.8</td><td>83.9</td><td>74.6</td><td>97.5</td></tr><tr><td>VMSST CONTRASTIVE</td><td>97.2</td><td>96.9</td><td>97.1</td><td>96.6</td><td>76.1</td><td>98.6</td><td>73.3</td><td>96.2</td><td>92.3</td><td>87.5</td><td>95.8</td><td>76.0</td><td>17.8</td><td>89.8</td><td>84.1</td><td>98.1</td></tr><tr><td>VMSST</td><td>96.4</td><td>95.8</td><td>96.8</td><td>96.8</td><td>69.5</td><td>97.2</td><td>67.3</td><td>95.8</td><td>87.7</td><td>86.3</td><td>93.5</td><td>67.7</td><td>11.7</td><td>86.5</td><td>79.0</td><td>97.8</td></tr><tr><td>Language</td><td>lvs</td><td>mal</td><td>mar</td><td>max</td><td>mhr</td><td>mkd</td><td>mon</td><td>nds</td><td>nld</td><td>nno</td><td>nob</td><td>nov</td><td>oci</td><td>orv</td><td>pam</td><td>pes</td></tr><tr><td>CONTRASTIVE</td><td>98.0</td><td>98.5</td><td>94.5</td><td>73.1</td><td>30.8</td><td>97.6</td><td>94.4</td><td>90.5</td><td>98.1</td><td>96.5</td><td>98.5</td><td>80.5</td><td>77.9</td><td>66.5</td><td>14.0</td><td>95.5</td></tr><tr><td>BITRANSLATION</td><td>97.0</td><td>98.2</td><td>95.0</td><td>58.1</td><td>22.1</td><td>96.0</td><td>85.8</td><td>80.7</td><td>96.7</td><td>92.3</td><td>97.4</td><td>70.6</td><td>66.5</td><td>47.5</td><td>8.5</td><td>93.0</td></tr><tr><td>VMSST CONTRASTIVE</td><td>98.1</td><td>98.5</td><td>94.6</td><td>72.5</td><td>29.5</td><td>98.0</td><td>95.0</td><td>92.1</td><td>98.0</td><td>97.0</td><td>98.3</td><td>80.5</td><td>78.0</td><td>67.4</td><td>14.6</td><td>95.7</td></tr><tr><td>VMSST</td><td>97.5</td><td>98.3</td><td>95.0</td><td>63.6</td><td>26.8</td><td>96.4</td><td>89.8</td><td>84.5</td><td>97.3</td><td>93.5</td><td>97.6</td><td>76.3</td><td>72.1</td><td>55.9</td><td>9.9</td><td>94.5</td></tr><tr><td>Language</td><td>pms</td><td>pol</td><td>por</td><td>ron</td><td>rus</td><td>slk</td><td>slv</td><td>spa</td><td>sqi</td><td>srp</td><td>swe</td><td>swg</td><td>swh</td><td>tam</td><td>tat</td><td>tel</td></tr><tr><td>CONTRASTIVE</td><td>74.3</td><td>99.0</td><td>95.9</td><td>98.0</td><td>95.3</td><td>98.0</td><td>97.0</td><td>99.1</td><td>98.6</td><td>96.6</td><td>97.5</td><td>76.8</td><td>77.4</td><td>92.7</td><td>92.0</td><td>98.1</td></tr><tr><td>BITRANSLATION</td><td>62.1</td><td>97.2</td><td>95.7</td><td>97.6</td><td>95.0</td><td>97.4</td><td>96.3</td><td>98.8</td><td>98.1</td><td>95.6</td><td>96.8</td><td>48.7</td><td>67.1</td><td>90.9</td><td>82.8</td><td>96.2</td></tr><tr><td>VMSST CONTRASTIVE</td><td>76.9</td><td>98.9</td><td>96.1</td><td>98.1</td><td>95.5</td><td>98.2</td><td>97.0</td><td>99.2</td><td>98.6</td><td>96.5</td><td>97.5</td><td>73.2</td><td>77.6</td><td>92.8</td><td>92.0</td><td>97.6</td></tr><tr><td>VMSST</td><td>69.6</td><td>98.2</td><td>95.8</td><td>97.6</td><td>94.8</td><td>97.8</td><td>96.9</td><td>98.6</td><td>98.2</td><td>95.8</td><td>97.3</td><td>59.8</td><td>69.2</td><td>92.8</td><td>86.2</td><td>97.4</td></tr><tr><td>Language</td><td>tgl</td><td>tha</td><td>tuk</td><td>tur</td><td>tzl</td><td>uig</td><td>ukr</td><td>urd</td><td>uzb</td><td>vie</td><td>war</td><td>wuu</td><td>xho</td><td>yid</td><td>yue</td><td>zsm</td></tr><tr><td>CONTRASTIVE</td><td>96.0</td><td>97.8</td><td>44.6</td><td>98.9</td><td>66.3</td><td>76.1</td><td>96.0</td><td>95.4</td><td>78.9</td><td>98.2</td><td>54.0</td><td>93.5</td><td>74.6</td><td>92.3</td><td>94.1</td><td>98.0</td></tr><tr><td>BITRANSLATION</td><td>91.7</td><td>97.0</td><td>30.3</td><td>98.2</td><td>43.8</td><td>54.4</td><td>95.2</td><td>91.8</td><td>64.3</td><td>97.4</td><td>33.3</td><td>88.7</td><td>59.5</td><td>82.8</td><td>90.8</td><td>96.0</td></tr><tr><td>VMSST CONTRASTIVE</td><td>96.4</td><td>98.2</td><td>47.5</td><td>98.9</td><td>64.4</td><td>77.6</td><td>96.3</td><td>95.4</td><td>78.3</td><td>98.4</td><td>54.5</td><td>93.8</td><td>75.7</td><td>92.6</td><td>94.1</td><td>97.8</td></tr><tr><td>VMSST</td><td>93.0</td><td>97.5</td><td>38.7</td><td>98.8</td><td>56.7</td><td>64.1</td><td>95.5</td><td>93.5</td><td>68.7</td><td>97.9</td><td>37.7</td><td>91.0</td><td>63.7</td><td>86.0</td><td>93.0</td><td>96.6</td></tr></table>
433
+
434
+ Table 14: Full results on Tatoeba. We report results as accuracy $\times 100$
435
+
436
+ <table><tr><td>Language</td><td>af</td><td>am</td><td>ar</td><td>ay</td><td>az</td><td>be</td><td>ber</td><td>bg</td></tr><tr><td>Training Pairs</td><td>77,772</td><td>101,613</td><td>7,907,914</td><td>0</td><td>291,925</td><td>6,330</td><td>142,061</td><td>4,834,661</td></tr><tr><td>Language</td><td>bn</td><td>br</td><td>bs</td><td>ca</td><td>cbk</td><td>cs</td><td>da</td><td>de</td></tr><tr><td>Training Pairs</td><td>1,148,461</td><td>34,472</td><td>4,166,739</td><td>895,940</td><td>1,623</td><td>5,429,060</td><td>7,767,119</td><td>8,707,293</td></tr><tr><td>Language</td><td>dtp</td><td>dv</td><td>el</td><td>en</td><td>eo</td><td>es</td><td>et</td><td>eu</td></tr><tr><td>Training Pairs</td><td>1,064</td><td>98,320</td><td>6,601,989</td><td>4,913,379</td><td>447,622</td><td>4,913,379</td><td>5,093,003</td><td>1,432,979</td></tr><tr><td>Language</td><td>fi</td><td>fr</td><td>ga</td><td>gl</td><td>ha</td><td>he</td><td>hi</td><td>hr</td></tr><tr><td>Training Pairs</td><td>7,785,493</td><td>8,935,842</td><td>1,112</td><td>391,824</td><td>134,775</td><td>4,046,554</td><td>358,907</td><td>3,911,368</td></tr><tr><td>Language</td><td>hu</td><td>hy</td><td>ia</td><td>id</td><td>ie</td><td>io</td><td>is</td><td>it</td></tr><tr><td>Training Pairs</td><td>5,256,214</td><td>8,194</td><td>12,048</td><td>4,326,151</td><td>2,445</td><td>3,181</td><td>2,712,556</td><td>8,468,538</td></tr><tr><td>Language</td><td>ja</td><td>ka</td><td>kab</td><td>kk</td><td>km</td><td>ko</td><td>ku</td><td>kw</td></tr><tr><td>Training Pairs</td><td>3,981,886</td><td>360,136</td><td>26,460</td><td>6,172</td><td>3,266</td><td>2,566,495</td><td>98,733</td><td>3,463</td></tr><tr><td>Language</td><td>kzj</td><td>la</td><td>lfn</td><td>lt</td><td>lv</td><td>mg</td><td>mhr</td><td>mk</td></tr><tr><td>Training Pairs</td><td>614</td><td>27,515</td><td>6,096</td><td>3,629,769</td><td>2,119,995</td><td>537,953</td><td>69</td><td>4,037,896</td></tr><tr><td>Language</td><td>ml</td><td>mr</td><td>ms</td><td>my</td><td>nb</td><td>nds</td><td>nl</td><td>oc</td></tr><tr><td>Training Pairs</td><td>867,026</td><td>52,340</td><td>3,288,492</td><td>4,802</td><td>9,694</td><td>6,263</td><td>8,346,102</td><td>730</td></tr><tr><td>Language</td><td>pl</td><td>ps</td><td>pt</td><td>ro</td><td>ru</td><td>sd</td><td>si</td><td>sk</td></tr><tr><td>Training Pairs</td><td>5,407,190</td><td>32</td><td>8,276,190</td><td>4,814,046</td><td>9,416,934</td><td>98,412</td><td>1,016,660</td><td>5,094,752</td></tr><tr><td>Language</td><td>sl</td><td>so</td><td>sq</td><td>sr</td><td>sv</td><td>sw</td><td>ta</td><td>te</td></tr><tr><td>Training Pairs</td><td>5,099,577</td><td>98,976</td><td>3,619,914</td><td>3,977,191</td><td>7,680,683</td><td>201,379</td><td>150,023</td><td>42,877</td></tr><tr><td>Language</td><td>tg</td><td>th</td><td>tl</td><td>tr</td><td>tt</td><td>ug</td><td>uk</td><td>ur</td></tr><tr><td>Training Pairs</td><td>135,245</td><td>3,849,777</td><td>34,829</td><td>5,854,059</td><td>132,273</td><td>101,989</td><td>1,687,685</td><td>844,052</td></tr><tr><td>Language</td><td>uz</td><td>vi</td><td>wuu</td><td>yue</td><td>zh</td><td></td><td></td><td></td></tr><tr><td>Training Pairs</td><td>148,860</td><td>3,905,401</td><td>929</td><td>4,525</td><td>7,636,488</td><td></td><td></td><td></td></tr></table>
437
+
438
+ Table 15: Full training data for each language. The total number of pairs is the sum of using English and Spanish as pivot languages.
439
+
440
+ A For every submission:
441
+
442
+ A1. Did you describe the limitations of your work?
443
+
444
+ In the Limitations section 8.
445
+
446
+ A2. Did you discuss any potential risks of your work?
447
+
448
+ This is textual similarity model that does not generate text, trained on publicly available bitext. It does not carry any novel risks from previous generic textual embedding models.
449
+
450
+ A3. Do the abstract and introduction summarize the paper's main claims?
451
+
452
+ Introduction is Section 1.
453
+
454
+ A4. Have you used AI writing assistants when working on this paper?
455
+
456
+ Left blank.
457
+
458
+ B Did you use or create scientific artifacts?
459
+
460
+ Yes, Appendix H.
461
+
462
+ B1. Did you cite the creators of artifacts you used?
463
+
464
+ Yes, Appendix H.
465
+
466
+ B2. Did you discuss the license or terms for use and / or distribution of any artifacts?
467
+
468
+ They all have licenses applicable to academic publishing and model release.
469
+
470
+ B3. Did you discuss if your use of existing artifact(s) was consistent with their intended use, provided that it was specified? For the artifacts you create, do you specify intended use and whether that is compatible with the original access conditions (in particular, derivatives of data accessed for research purposes should not be used outside of research contexts)?
471
+
472
+ No need for discussion as our use (academic research) is consistent with the implied intended use of these datasets.
473
+
474
+ B4. Did you discuss the steps taken to check whether the data that was collected / used contains any information that names or uniquely identifies individual people or offensive content, and the steps taken to protect / anonymize it?
475
+
476
+ These are well-studied standard academic translation datasets - there is no PII info and little offensive content (possibly in the subtitles data for the latter).
477
+
478
+ B5. Did you provide documentation of the artifacts, e.g., coverage of domains, languages, and linguistic phenomena, demographic groups represented, etc.?
479
+
480
+ Appendix H
481
+
482
+ B6. Did you report relevant statistics like the number of examples, details of train / test / dev splits, etc. for the data that you used / created? Even for commonly-used benchmark datasets, include the number of examples in train / validation / test splits, as these provide necessary context for a reader to understand experimental results. For example, small differences in accuracy on large test sets may be significant, while on small test sets they may not be.
483
+
484
+ Section 6.
485
+
486
+ # C Did you run computational experiments?
487
+
488
+ Section 6.
489
+
490
+ C1. Did you report the number of parameters in the models used, the total computational budget (e.g., GPU hours), and computing infrastructure used?
491
+
492
+ Section 6 and Section 8.
493
+
494
+ C2. Did you discuss the experimental setup, including hyperparameter search and best-found hyperparameter values?
495
+
496
+ Appendix B
497
+
498
+ C3. Did you report descriptive statistics about your results (e.g., error bars around results, summary statistics from sets of experiments), and is it transparent whether you are reporting the max, mean, etc. or just a single run?
499
+
500
+ Appendix B
501
+
502
+ C4. If you used existing packages (e.g., for preprocessing, for normalization, or for evaluation), did you report the implementation, model, and parameter settings used (e.g., NLTK, Spacy, ROUGE, etc.)?
503
+
504
+ Appendix B
505
+
506
+ # D Did you use human annotators (e.g., crowdworkers) or research with human participants?
507
+
508
+ Left blank.
509
+
510
+ D1. Did you report the full text of instructions given to participants, including e.g., screenshots, disclaimers of any risks to participants or annotators, etc.?
511
+
512
+ No response.
513
+
514
+ D2. Did you report information about how you recruited (e.g., crowdsourcing platform, students) and paid participants, and discuss if such payment is adequate given the participants' demographic (e.g., country of residence)?
515
+
516
+ No response.
517
+
518
+ D3. Did you discuss whether and how consent was obtained from people whose data you're using/curating? For example, if you collected data via crowdsourcing, did your instructions to crowdworkers explain how the data would be used?
519
+
520
+ No response.
521
+
522
+ D4. Was the data collection protocol approved (or determined exempt) by an ethics review board?
523
+
524
+ No response.
525
+
526
+ D5. Did you report the basic demographic and geographic characteristics of the annotator population that is the source of the data?
527
+
528
+ No response.
beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab2c24e2168a4f9e80000b1fdc4dedc01937c9e40d053c560d6859c0a9548eb3
3
+ size 1246751
beyondcontrastivelearningavariationalgenerativemodelformultilingualretrieval/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ddcf88b9387a1c978816d80d6e5cd63331b6f084750dc65b728eff66a8bc695
3
+ size 617767
beyondenglishcentricbitextsforbettermultilinguallanguagerepresentationlearning/242dda9b-ec5e-4e7a-b2e8-a0a4398cfa5b_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b2abed5b8a440ee57ef2ac8adb7dbae6293b2498a3e0cb1c96b9a0d045815ba
3
+ size 132120
beyondenglishcentricbitextsforbettermultilinguallanguagerepresentationlearning/242dda9b-ec5e-4e7a-b2e8-a0a4398cfa5b_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58311a54cb1f11722d39f41d0e9ac0867ed78389de660bd6ff8209f8f5d82972
3
+ size 156237