Add Batch f186f55d-c8bb-4ae1-829a-98e378a936c4
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_content_list.json +3 -0
- sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_model.json +3 -0
- sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_origin.pdf +3 -0
- sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/full.md +384 -0
- sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/images.zip +3 -0
- sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/layout.json +3 -0
- speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_content_list.json +3 -0
- speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_model.json +3 -0
- speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_origin.pdf +3 -0
- speechformerreducinginformationlossindirectspeechtranslation/full.md +184 -0
- speechformerreducinginformationlossindirectspeechtranslation/images.zip +3 -0
- speechformerreducinginformationlossindirectspeechtranslation/layout.json +3 -0
- spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_content_list.json +3 -0
- spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_model.json +3 -0
- spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_origin.pdf +3 -0
- spellbertalightweightpretrainedmodelforchinesespellingcheck/full.md +219 -0
- spellbertalightweightpretrainedmodelforchinesespellingcheck/images.zip +3 -0
- spellbertalightweightpretrainedmodelforchinesespellingcheck/layout.json +3 -0
- stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_content_list.json +3 -0
- stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_model.json +3 -0
- stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_origin.pdf +3 -0
- stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/full.md +449 -0
- stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/images.zip +3 -0
- stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/layout.json +3 -0
- streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_content_list.json +3 -0
- streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_model.json +3 -0
- streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_origin.pdf +3 -0
- streamhoverlivestreamtranscriptsummarizationandannotation/full.md +0 -0
- streamhoverlivestreamtranscriptsummarizationandannotation/images.zip +3 -0
- streamhoverlivestreamtranscriptsummarizationandannotation/layout.json +3 -0
- structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_content_list.json +3 -0
- structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_model.json +3 -0
- structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_origin.pdf +3 -0
- structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/full.md +397 -0
- structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/images.zip +3 -0
- structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/layout.json +3 -0
- structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_content_list.json +3 -0
- structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_model.json +3 -0
- structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_origin.pdf +3 -0
- structureaugmentedkeyphrasegeneration/full.md +370 -0
- structureaugmentedkeyphrasegeneration/images.zip +3 -0
- structureaugmentedkeyphrasegeneration/layout.json +3 -0
- structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_content_list.json +3 -0
- structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_model.json +3 -0
- structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_origin.pdf +3 -0
- structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/full.md +270 -0
- structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/images.zip +3 -0
- structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/layout.json +3 -0
- structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_content_list.json +3 -0
- structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_model.json +3 -0
sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d54ebf5269832095905af786b3a1602692697a1e345352bb8602691cb4bdaca6
|
| 3 |
+
size 79747
|
sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6295c1a968b50797ed45ca07032b9879079269df375ffecc6bb31563a4e61a48
|
| 3 |
+
size 97161
|
sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/8e29a750-0529-4176-9967-ce2a937bf837_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:753b93cfa78dce5e2f0a63c2d1b8b604a0680ba44077bc50713c0dba2840f8cd
|
| 3 |
+
size 898797
|
sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/full.md
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Sparsity and Sentence Structure in Encoder-Decoder Attention of Summarization Systems
|
| 2 |
+
|
| 3 |
+
Potsawee Manakul and Mark J. F. Gales
|
| 4 |
+
Department of Engineering, University of Cambridge
|
| 5 |
+
pm574@cam.ac.uk, mjfg@eng.cam.ac.uk
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Transformer models have achieved state-of-the-art results in a wide range of NLP tasks including summarization. Training and inference using large transformer models can be computationally expensive. Previous work has focused on one important bottleneck, the quadratic self-attention mechanism in the encoder. Modified encoder architectures such as LED or LoBART use local attention patterns to address this problem for summarization. In contrast, this work focuses on the transformer's encoder-decoder attention mechanism. The cost of this attention becomes more significant in inference or training approaches that require model-generated histories. First, we examine the complexity of the encoder-decoder attention. We demonstrate empirically that there is a sparse sentence structure in document summarization that can be exploited by constraining the attention mechanism to a subset of input sentences, whilst maintaining system performance. Second, we propose a modified architecture that selects the subset of sentences to constrain the encoder-decoder attention. Experiments are carried out on abstractive summarization tasks, including CNN/DailyMail, XSum, Spotify Podcast, and arXiv.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
The Transformer architecture (Vaswani et al., 2017) with large-scale pre-training has become the defacto approach for a wide range of NLP tasks, from classification (Devlin et al., 2019) to seq2seq (Raffel et al., 2020). Training and inference using large transformer models can be computationally expensive because the self-attention's time and memory grow quadratically with sequence length. Hence, there has been significant interest in efficient transformer architectures. A number of approaches have
|
| 14 |
+
|
| 15 |
+
been proposed to tackle the quadratic complexity, and a comprehensive survey on efficient transformers has been compiled in Tay et al. (2020). Most existing approaches are developed for encoder-only architectures. For seq2seq tasks, efficient models such as BigBird (Zaheer et al., 2020) or LED (Beltagy et al., 2020) consist of an efficient encoder with the vanilla decoder. For long-document summarization, this combination has been shown effective because the major bottleneck is the encoder self-attention (Manakul and Gales, 2021). The attention mechanisms in the decoder consist of self-attention and encoder-decoder attention. Techniques such as local attention are applicable to self-attention in both the encoder and decoder, while this work focuses on the encoder-decoder attention.
|
| 16 |
+
|
| 17 |
+
When humans produce a summary, the information conveyed by each word/part in the summary is likely drawn from some key sentences in the original document. Inspired by this, we hypothesize that if the encoder-decoder attention is constrained dynamically to salient sentences, the computation cost will be reduced. For instance, sentence-level structures for the encoder-decoder attention have been shown effective in the traditional RNN encoder-decoder attention (Cohan et al., 2018; Li et al., 2019; Manakul et al., 2020)
|
| 18 |
+
|
| 19 |
+
In this work, first, we compare the decoder's cost in the training and inference stages. We study the sparsity of the encoder-decoder attention in a common transformer-based abstractive summarization model. An approximation method to exploit this sparsity is described, and an empirical upper bound performance is given. Second, we propose a modified decoder architecture that can dynamically select salient input sentences to constrain the encoder-decoder attention without having to compute complete attention at inference time. Techniques to train our proposed model are described, and compared to the full attention baseline performance and empirical upper bound.
|
| 20 |
+
|
| 21 |
+
# 2 Models and Data
|
| 22 |
+
|
| 23 |
+
Vanilla Transformers. We use BART (Lewis et al., 2020) and local-attention BART (LoBART) (Manakul and Gales, 2021) as our base models. BART's maximum input length is 1024, while that of LoBART is 4096 with attention width of 1024. BART is fine-tuned to CNN/DailyMail and XSum, and LoBART is fine-tuned to Podcast and arXiv.
|
| 24 |
+
|
| 25 |
+
Data. CNN/DailyMail (Hermann et al., 2015) and XSum (Narayan et al., 2018) are used with BART, while long-document arXiv (Cohan et al., 2018) and Spotify Podcast (Clifton et al., 2020) are used with LoBART. More details about models, data, and training are provided in Appendix A.
|
| 26 |
+
|
| 27 |
+
# 3 Attention in the Transformer
|
| 28 |
+
|
| 29 |
+
Time and memory are dominated by the encoder self-attention, and models such as LoBART adopt local attention in its encoder to mitigate this bottleneck, while keeping the original decoder (Manakul and Gales, 2021). Training is fast because attention is highly parallelizable. However, during inference, the decoder uses its histories, becoming less parallelizable. To understand when the decoder might become a bottleneck, we fix the input length $N$ and measure the computational time as a function of the target length $M$ :
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\mathrm {t i m e} = \bar {c} _ {1} + \bar {c} _ {2} M + \bar {c} _ {3} M ^ {2} \tag {1}
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
in three operating modes: i) Forward+Backward, e.g. at training time; ii) Forward only, e.g. forward-pass where the input to the decoder is provided in advance; iii) Inference, e.g. the decoder using its own back histories as the input.
|
| 36 |
+
|
| 37 |
+
Through a curve-fitting method, the results in Table 1 show that the relative decoder cost during inference is almost one order of magnitude larger than that during training, e.g. forward+backward or forward only. More details are provided in Appendix B, where we also show that the encoder-decoder attention cost is greater than the decoder self-attention cost. Therefore, this work will focus on the encoder-decoder attention.
|
| 38 |
+
|
| 39 |
+
# 3.1 Encoder-Decoder Attention
|
| 40 |
+
|
| 41 |
+
Let $M =$ the summary length, $N =$ the input length, $N_{1} = \#$ sentences, and $N_{2} =$ the average number of words in a sentence, e.g. $N = N_{1}N_{2}$ . The standard encoder-decoder attention in Eq. 2 (scaling factor omitted) where $\mathbf{Q}\in \mathcal{R}^{M\times D}$ and $\mathbf{K},\mathbf{V}\in \mathcal{R}^{N\times D}$
|
| 42 |
+
|
| 43 |
+
<table><tr><td>Mode</td><td>c2/¯1(10-3)</td><td>¯3/¯1(10-6)</td></tr><tr><td>Forward+Backward</td><td>1.08</td><td>0.17</td></tr><tr><td>Forward only</td><td>1.14</td><td>0.25</td></tr><tr><td>Inference</td><td>9.96</td><td>1.30</td></tr></table>
|
| 44 |
+
|
| 45 |
+
Table 1: Empirical computational time as a function of the target length $M$ where ${\bar{c}}_{1},{\bar{c}}_{2},{\bar{c}}_{3}$ are the coefficients in Eq. 1. The analysis is based on BART from Wolf et al. (2020) and the input length is 1024 .
|
| 46 |
+
|
| 47 |
+
has the complexity: $\mathcal{O}(MN) = \mathcal{O}(MN_1N_2)$ . Note that we fix the representation dimension $D$ , so $D$ is omitted in our complexity notation.
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\mathbf {A} = \operatorname {s o f t m a x} \left(\mathbf {Q K} ^ {T}\right) \mathbf {V} \tag {2}
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
If the attention is concentrated on some $r$ sentences, by selecting appropriate $r$ , the speed of the encoder-decoder attention can be improved by a factor of $N_{1} / r$ in average. This is equivalent to:
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\mathbf {A} \approx \hat {\mathbf {A}} = \operatorname {s o f t m a x} \left(\mathbf {Q} \hat {\mathbf {K}} ^ {T}\right) \hat {\mathbf {V}} \tag {3}
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $\hat{\mathbf{K}},\hat{\mathbf{V}}\in \mathcal{R}^{rN_2\times D}$ , resulting in $\mathcal{O}(MrN_2)$
|
| 60 |
+
|
| 61 |
+
# 3.2 Sparsity of Encoder-Decoder Attention
|
| 62 |
+
|
| 63 |
+
Let the subscript $(i,j)$ denote the position of the $j$ -th word in the $i$ -th input sentence, e.g. $\mathbf{K} = [\underbrace{\mathbf{k}_{1,1},\mathbf{k}_{1,2},\mathbf{k}_{1,J_1}}_{\text{sent1}},\dots,\underbrace{\mathbf{k}_{i,1},\mathbf{k}_{i,J_i}}_{\text{sent} i},\dots,\underbrace{\mathbf{k}_{N_1,1},\mathbf{k}_{N_1,J_{N_1}}}_{\text{sent} N_1}]$ .
|
| 64 |
+
|
| 65 |
+
At inference time, the outputs are generated sequentially: $\mathbf{a}_m = \mathrm{softmax}(\mathbf{q}_m\mathbf{K}^T)\mathbf{V}$ , so $r$ sentences can be determined independently for each $\mathbf{q}_m$ . Consider the following sum of attention weights as the saliency at decoding step $m$ of sentence $i$ :
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\alpha_ {m, i} ^ {\mathbf {s}} = \frac {1}{Z _ {m}} \sum_ {j = 1} ^ {J _ {i}} \exp \left(\mathbf {q} _ {m} \cdot \mathbf {k} _ {i, j}\right) \tag {4}
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
where $Z_{m} = \sum_{\forall i^{\prime}}\sum_{\forall j^{\prime}}\exp (\mathbf{q}_{m}\cdot \mathbf{k}_{i^{\prime},j^{\prime}})$ . We then compute $\sum_{i}\alpha_{m,i}^{\mathrm{s}}$ up to $r$ sentences ranked by $\alpha_{m,i}^{\mathrm{s}}$ . The results in Fig. 1a show that $r = 25$ is required to achieve the sum of attention weights at $90\%$ . In addition to the vanilla model, we can fine-tune BART explicitly to make the attention sparse using:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\mathcal {L} _ {\mathrm {A}} = \mathcal {L} _ {\text {x e n t}} + \gamma \mathcal {L} _ {\text {s p a r s e}} \tag {5}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where $\mathcal{L}_{\mathrm{xent}}$ is the teacher-forced cross entropy loss, $\mathcal{L}_{\mathrm{sparse}} = \frac{1}{M}\sum_{m=1}^{M}\mathrm{H}(\pmb{\alpha}_m^{\mathrm{s}})$ , and entropy
|
| 78 |
+
|
| 79 |
+
$\mathrm{H}(\pmb{\alpha}_{m}^{\mathbf{s}}) = -\sum_{i=1}^{N_{1}} \alpha_{m,i}^{\mathbf{s}} \log \alpha_{m,i}^{\mathbf{s}}$ . We show in Fig. 1b that the fine-tuned models ( $\gamma = 0.1$ & $\gamma = 1.0$ ) retain close to $100\%$ of attention weights for small $r$ . Subsequently, we investigate how selecting $r$ sentences impacts the summarization performance.
|
| 80 |
+
|
| 81 |
+

|
| 82 |
+
(a) Layers 1,4,8,12
|
| 83 |
+
|
| 84 |
+

|
| 85 |
+
(b) $\mathcal{L}_{\mathrm{A}}$ -tuned (Layer1)
|
| 86 |
+
Figure 1: The sum of attention weights against the number of retained sentences $(r)$ evaluated on CNNDM.
|
| 87 |
+
|
| 88 |
+
To obtain an empirical upper bound performance of Eq. 3, for each $\mathbf{q}_m$ , we can get ideal $\mathbf{k}, \mathbf{v}$ corresponding to the top $r$ sentences ranked by $\alpha_{m,i}^{\mathrm{s}}$ :
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\mathcal {I} _ {m} ^ {r} = \left[ (i, j) \text {s . t .} i \in \operatorname {t o p} - r \left(\alpha_ {m, i} ^ {\mathbf {s}}\right) \right] \tag {6}
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
$\hat{\mathbf{K}}_m = [\mathbf{k}_{i,j}:(i,j)\in \mathcal{I}_m^r ],$ and the same method is applied to obtain $\hat{\mathbf{V}}_m$
|
| 95 |
+
|
| 96 |
+
<table><tr><td>System</td><td>r</td><td>Irmr</td><td>R1</td><td>R2</td><td>RL</td></tr><tr><td rowspan="3">Vanilla (γ = 0.0)</td><td>All</td><td>N/A</td><td>44.03</td><td>20.92</td><td>40.99</td></tr><tr><td>5</td><td>Ideal</td><td>43.94</td><td>20.82</td><td>40.81</td></tr><tr><td>5</td><td>Random</td><td>39.06</td><td>14.32</td><td>36.07</td></tr><tr><td>γ = 0.1</td><td>5</td><td>Ideal</td><td>44.22</td><td>21.01</td><td>41.19</td></tr><tr><td>γ = 1.0</td><td>5</td><td>Ideal</td><td>43.61</td><td>20.46</td><td>40.60</td></tr></table>
|
| 97 |
+
|
| 98 |
+
Table 2: Sparsity and Selection $(\mathcal{I}_m^r)$ on CNNDM.
|
| 99 |
+
|
| 100 |
+
The results in Table 2 show that:
|
| 101 |
+
|
| 102 |
+
- For the vanilla model, despite the sum of attention weights being around $50\%$ at $r = 5$ (Fig. 1a), the model is sufficiently sparse, and constraining to $r$ ideal sentences $(\mathrm{All} \to \mathcal{I}_m^{r,\mathrm{Ideal}})$ results in a small performance degradation.
|
| 103 |
+
- Forcing for sparsity (Fig.1b) does not yield a significant performance improvement; but this forcing also makes the model more sensitive to random selection (results in Appendix C).
|
| 104 |
+
|
| 105 |
+
Thus, for summarization, there is an observable sparsity, which allows us to reduce the cost of encoder-decoder attention with a minimal degradation. Next, we investigate how to build an efficient form of approximator to obtain salient sentences.
|
| 106 |
+
|
| 107 |
+
# 4 Sentence-Level Structure for Encoder-Decoder Attention
|
| 108 |
+
|
| 109 |
+
In Section 3.1, we use ideal selection $\mathcal{I}_m^r$ (Eq. 6), which requires computing $\alpha_{m,i}^{\mathrm{s}}$ (Eq. 4) using all input words. This process cannot make the decoder more efficient. By exploiting the sentence structure in the document, we propose the following partition for the sentence-level attention score (Eq. 4) to allow a compact approximation:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\alpha_ {m, i} ^ {\mathbf {s}} \approx \tilde {\alpha} _ {m, i} ^ {\mathbf {s}} = \operatorname {s o f t m a x} \left(f _ {1} \left(\mathbf {q} _ {m}\right) \cdot f _ {2} \left(\mathbf {k} _ {i, 1}, \dots , \mathbf {k} _ {i, J _ {i}}\right)\right) \tag {7}
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
where $\sum_{i=1}^{N_1} \tilde{\alpha}_{m,i}^{\mathbf{s}} = 1.0$ . Essentially, we modify the standard encoder-decoder attention such that it performs sentence selection based on $\tilde{\alpha}_{m,i}^{\mathbf{s}}$ (Eq. 7) and computes subset attention $\hat{\mathbf{A}}$ (Eq. 3).
|
| 116 |
+
|
| 117 |
+
# 4.1 Complexity of Modified Attention
|
| 118 |
+
|
| 119 |
+
The modified encoder-decoder attention consists of two components: i) sentence-level attention over $N_{1}$ sentences; ii) word-level attention over $rN_{2}$ words. Let $p$ denote a unit of matrix multiplication cost and $q$ denote a unit of softmax cost. The costs associated with attention are:
|
| 120 |
+
|
| 121 |
+
i) Sentence-level (Eq.7): $pMN_{1}D + qMN_{1}$
|
| 122 |
+
ii) Word-level (Eq.3): $2pMrN_{2}D + qMrN_{2}$
|
| 123 |
+
|
| 124 |
+
The additional cost associated with the sentence-level representation on the encoder side grows with the input length $N = N_{1}N_{2}$ . Thus, as opposed to $\mathcal{O}(MN_1N_2)$ in the case of vanilla encoder-decoder attention, the overall complexity of the modified attention is $\mathcal{O}(MN_1 + k_wMrN_2 + k_eN_1N_2)$ , where $k_w\approx \frac{2pD + q}{pD + q}$ and $k_{e}$ depends on the exact form of sentence-level representation computation.
|
| 125 |
+
|
| 126 |
+
# 4.2 Model-based Neural Approximator
|
| 127 |
+
|
| 128 |
+
To utilize the simple partition and sentence-level structure in Eq. 7, we use a linear mapping for $f_{1}$ and a bidirectional RNN for $f_{2}$ as follows:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
f _ {1} \left(\mathbf {q} _ {m}\right) = \mathbf {q} _ {m} \mathbf {W} ^ {\mathbb {Q}} \tag {8}
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
f _ {2} \left(\mathbf {k} _ {i, 1}, \dots , \mathbf {k} _ {i, J _ {i}}\right) = \mathbf {y} _ {i} \mathbf {W} ^ {\mathrm {K}} \tag {9}
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\mathbf {y} _ {i} = \operatorname {R N N} \left(\mathbf {k} _ {i, 1}, \dots , \mathbf {k} _ {i, J _ {i}}\right) \tag {10}
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
As illustrated in Fig. 3, the base transformer model is extended by augmenting two layers: i) sentence-level encoder-decoder attention computing $\tilde{\alpha}_{m,i}^{\mathrm{s}}$ in Eq. 7; ii) sentence encoder computing the sentence-level representation in Eq. 10. The details about model parameters are provided in Appendix A.
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
(a) BART(1k) & CNNDM
|
| 146 |
+
|
| 147 |
+

|
| 148 |
+
(b) BART(1k) & XSum
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
(c) LoBART(4k) & Podcast
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
(d) LoBART(4k) & arXiv
|
| 155 |
+
|
| 156 |
+

|
| 157 |
+
Figure 2: Performance (ROUGE-1) of BART & LoBART. The integrated training is based on $\mathcal{I}_m^{r,\mathrm{Apx}}$ .
|
| 158 |
+
Figure 3: Modified architecture with model-based approximator where the base model is BART/LoBART. Model-based neural approximator is shown in orange.
|
| 159 |
+
|
| 160 |
+
# 4.3 KL Loss and Integrated Training
|
| 161 |
+
|
| 162 |
+
Let $\theta_{\mathrm{dec}}$ denote the original decoder, and $\tilde{\theta}$ denote the neural approximator. We train $\tilde{\theta}$ by minimizing:
|
| 163 |
+
|
| 164 |
+
$$
|
| 165 |
+
\mathcal {L} _ {\mathrm {K L}} = \frac {1}{M} \sum_ {m = 1} ^ {M} \mathrm {K L} \left(\boldsymbol {\alpha} _ {m} ^ {\mathrm {s}} | | \tilde {\boldsymbol {\alpha}} _ {m} ^ {\mathrm {s}}\right) \tag {11}
|
| 166 |
+
$$
|
| 167 |
+
|
| 168 |
+
where $\mathrm{KL}(.) = \sum_{i=1}^{N_1} \alpha_{m,i}^{\mathsf{s}} \log (\alpha_{m,i}^{\mathsf{s}} / \tilde{\alpha}_{m,i}^{\mathsf{s}})$ . In addition, we can integrate $\theta_{\mathrm{dec}}$ in the training process. With the teacher-forced cross entropy loss $\mathcal{L}_{\mathrm{xent}}$ , we define the integrated training loss:
|
| 169 |
+
|
| 170 |
+
$$
|
| 171 |
+
\mathcal {L} _ {\mathrm {I}} = \mathcal {L} _ {\mathrm {x e n t}} + \lambda \mathcal {L} _ {\mathrm {K L}} \tag {12}
|
| 172 |
+
$$
|
| 173 |
+
|
| 174 |
+
We cannot optimize $\mathcal{L}_{\mathrm{I}}$ in an end-to-end fashion because the top- $r$ operation in Eq. 6 is not differentiable. Hence, we interleave the training, i.e., update $\theta_{\mathrm{dec}}$ at fixed $\tilde{\theta}$ and update $\tilde{\theta}$ using $\mathcal{L}_{\mathrm{KL}}$ only:
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\begin{array}{l} \Delta \boldsymbol {\theta} _ {\mathrm {d e c}} = \nabla_ {\boldsymbol {\theta} _ {\mathrm {d e c}}} \mathcal {L} _ {\mathrm {I}} | _ {\tilde {\boldsymbol {\theta}}} = \nabla_ {\boldsymbol {\theta} _ {\mathrm {d e c}}} \mathcal {L} _ {\mathrm {x e n t}} | _ {\tilde {\boldsymbol {\theta}}} + \lambda \nabla_ {\boldsymbol {\theta} _ {\mathrm {d e c}}} \mathcal {L} _ {\mathrm {K L}} | _ {\tilde {\boldsymbol {\theta}}} \\ \Delta \tilde {\boldsymbol {\theta}} = \nabla_ {\tilde {\boldsymbol {\theta}}} \mathcal {L} _ {\mathrm {I}} = \underbrace {\nabla_ {\tilde {\boldsymbol {\theta}}} \mathcal {L} _ {\text {x e n t}} ^ {- 1}} _ {+} + \lambda \nabla_ {\tilde {\boldsymbol {\theta}}} \mathcal {L} _ {\mathrm {K L}} \tag {13} \\ \end{array}
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
Because during training, we compute both $\alpha_{m,i}^{\mathrm{s}}$ (ideal) and $\tilde{\alpha}_{m,i}^{\mathrm{s}}$ (approx), we can use either in the top- $r$ selection. Also, inspired by scheduled sampling (Bengio et al., 2015), we try mixing them: $\alpha_{m,i}^{\mathrm{s}}$ with probability $1 - \frac{\text{step}}{\text{epoch\_size}}$ , otherwise $\tilde{\alpha}_{m,i}^{\mathrm{s}}$ .
|
| 181 |
+
|
| 182 |
+
# 4.4 System Performance
|
| 183 |
+
|
| 184 |
+
In Table 3, we provide two vanilla baselines: random $(\mathcal{I}_m^{r,\mathrm{Rnd}})$ obtained by random selection; ideal
|
| 185 |
+
|
| 186 |
+
<table><tr><td>System</td><td>Train</td><td>Inference</td><td>R1</td><td>R2</td><td>RL</td></tr><tr><td>Vanilla</td><td>X</td><td>IrrnD</td><td>39.06</td><td>14.32</td><td>36.07</td></tr><tr><td>Vanilla</td><td>X</td><td>IrrdIdl</td><td>43.94</td><td>20.82</td><td>40.81</td></tr><tr><td>KL-only</td><td>LKL</td><td>IrrApx</td><td>43.02</td><td>20.02</td><td>39.89</td></tr><tr><td>Int-Idl</td><td>Ll(ImrIdl)</td><td>IrrApx</td><td>43.03</td><td>20.04</td><td>40.05</td></tr><tr><td>Int-Apx</td><td>Ll(ImrApx)</td><td>IrrApx</td><td>43.72</td><td>20.40</td><td>40.70</td></tr><tr><td>Int-Mix</td><td>Ll(Mix)</td><td>IrrApx</td><td>43.31</td><td>20.21</td><td>40.35</td></tr></table>
|
| 187 |
+
|
| 188 |
+
Table 3: Performance on CNNDM where $r = 5$ for both training and inference. KL-only $= \tilde{\theta}$ trained on $\mathcal{L}_{\mathrm{KL}}$ ; Int $= (\theta_{\mathrm{dec}} \& \tilde{\theta})$ trained on $\mathcal{L}_{\mathrm{I}}$ . Rnd=random, Idl=ideal, Apx=approximation, Mix=scheduled(Idl/Apx).
|
| 189 |
+
|
| 190 |
+
$(\mathcal{I}_m^{r,\mathrm{Idl}})$ obtained by Eq. 6. The results show that the KL-only system clearly outperforms the random selection baseline, and the performance degradation of the KL-only system can be reduced by our integrated training. The results verify the effectiveness of our modified decoder that attends to a subset of sentences. Also, Table 3 shows that it is best to use $\mathcal{I}_m^{r,\mathrm{Apx}}$ as reference in integrated training. This result is likely because we initialized integrated training from the KL-only model. In addition, we apply the modified architecture to BART trained on XSum ( $\leq 1\mathrm{k}$ words), and to LoBART trained on Podcast and arXiv ( $\leq 4\mathrm{k}$ words). The results in Fig. 2 confirm that the performance of our proposed method converges to that of the full attention baseline across all models and datasets.
|
| 191 |
+
|
| 192 |
+
In addition, $r^* \approx 5,10,30,30$ , respectively. Although XSum has fewer sentences in average compared to CNNDM, $r_{\mathrm{XSum}}^* > r_{\mathrm{CNNDM}}^*$ as XSum is more abstractive. For longer summarization tasks as shown by Podcast and arXiv, the performance degradation appears larger, meaning that the task of constraining to salient sentences in longer tasks is more challenging, and larger $r$ is required.
|
| 193 |
+
|
| 194 |
+
# Sensitivity of $r$ in Integrated Training
|
| 195 |
+
|
| 196 |
+
We train BART in three settings: $r^{\mathrm{train}} = 2,5,10$ , and we show the performance level w.r.t. the model with $r^{\mathrm{train}} = 5$ in Fig. 4. The results show that setting $r^{\mathrm{train}}$ beyond $r^{*}$ is not necessarily beneficial as shown by the model with $r^{\mathrm{train}} = 10$ in the CNNDM result, and it is best to set $r^{\mathrm{train}}$ close to $r^{\mathrm{inference}}$ .
|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
(a) CNNDM
|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
(b) XSum
|
| 203 |
+
Figure 4: $\Delta \mathrm{R}1$ (Y-axis) against $r$ at inference (X-axis).
|
| 204 |
+
|
| 205 |
+
# 4.5 Further Discussion on Sentence-Level Encoder-Decoder Attention
|
| 206 |
+
|
| 207 |
+
The results in Section 4.4 demonstrate empirically that a neural network can predict sparsity, therefore, allowing sentence selection. Our novel framework requires an addition of modules to the original attention mechanism, and the real gain in speed will depend on the balance of the sparsity against the computational cost of the additional modules. Consequently, the challenge is to make these additional modules highly efficient. Because the particular network realization selected in this paper is to show the feasibility of our framework, its limitations and possible improvements are discussed as follows.
|
| 208 |
+
|
| 209 |
+
# Limitations and Possible Improvements
|
| 210 |
+
|
| 211 |
+
The model choice of using RNN for the sentence encoder in Eq. 10 leads to a large additional computational cost (specifically large $k_{e}$ ) because the computational cost of RNN grows with $N_{1}N_{2}D^{2}$ . Because the goal is to obtain a sentence-level representation, there is an opportunity to replace RNN by a hierarchical attention that runs over sentences, which could instead lead to a computational cost that grows with $N_{1}N_{2}D$ . Additional sentence-level query and key mappings in Eq. 8 and Eq. 9 also incur a large computational cost.
|
| 212 |
+
|
| 213 |
+
# Model-free Approximator
|
| 214 |
+
|
| 215 |
+
Lastly, we re-visit the sentence-level attention in Eq. 4, which have been approximated by Eq. 7 and the model-based approximator. It is a challenge to attempt via a model-free algebraic approximation, which does not require any training and has
|
| 216 |
+
|
| 217 |
+
little additional inference-time cost. We examined various forms, and we present one model-free approach as well as experimental results in Appendix D, but the current form has worse summarization performance than our model-based approach.
|
| 218 |
+
|
| 219 |
+
# 5 Related Work
|
| 220 |
+
|
| 221 |
+
The discrepancy between low/moderate attention weight sparsity and good sparse approximation could be because a considerable amount of the attention weight is assigned to special tokens, e.g. ‘.’ in all sentences, but their vector norm is small, which was observed in Kobayashi et al. (2020).
|
| 222 |
+
|
| 223 |
+
The sparse attention (Eq. 3) with ideal selection (Eq. 6) can be considered as content selection, which has been shown to improve summarization (Gehrmann et al., 2018; Hsu et al., 2018). Recently, head-wise masks are applied to encoder-decoder attention at inference time, and a performance improvement is reported (Cao and Wang, 2021).
|
| 224 |
+
|
| 225 |
+
Voita et al. (2019) observed that heads are redundant, and Clark et al. (2019) found that a head in BERT rarely attends to several consecutive tokens. Based on these, Huang et al. (2021) applies a stride pattern in the encoder-decoder attention, reducing its cost by a factor of the stride size, and this method is likely complementary to our work.
|
| 226 |
+
|
| 227 |
+
# 6 Conclusion
|
| 228 |
+
|
| 229 |
+
We show that the computational cost of the transformer decoder becomes more significant at inference time. Towards reducing this cost, first, we show that there is sparsity in the encoder-decoder attention that allows us to reduce the computational cost with a minimal degradation. Second, we partition the sentence-level attention score, and we augment the standard decoder by adding a neural network to approximate the attention over sentences, allowing sentence selection. We show that the summarization performance of our approach converges to that of the full attention baseline, while switching the complexity from $\mathcal{O}(MN_1N_2)$ to $\mathcal{O}(MN_1 + k_wMrN_2 + k_eN_1N_2)$ .
|
| 230 |
+
|
| 231 |
+
# Acknowledgments
|
| 232 |
+
|
| 233 |
+
This paper reports on research supported by ALTA institute, Cambridge Assessment English, University of Cambridge, and Cambridge International & St John's College Scholarship. Thanks to Yiting Lu for interesting discussions. Thanks to the anonymous reviewers for their helpful comments.
|
| 234 |
+
|
| 235 |
+
# References
|
| 236 |
+
|
| 237 |
+
Iz Beltagy, Matthew E Peters, and Arman Cohan. 2020. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150.
|
| 238 |
+
Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. 2015. Scheduled sampling for sequence prediction with recurrent neural networks. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 1171-1179.
|
| 239 |
+
Shuyang Cao and Lu Wang. 2021. Attention head masking for inference time content selection in abstractive summarization. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5008-5016, Online. Association for Computational Linguistics.
|
| 240 |
+
Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1724-1734, Doha, Qatar. Association for Computational Linguistics.
|
| 241 |
+
Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D. Manning. 2019. What does BERT look at? an analysis of BERT's attention. In Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 276-286, Florence, Italy. Association for Computational Linguistics.
|
| 242 |
+
Ann Clifton, Sravana Reddy, Yongze Yu, Aasish Pappu, Rezvaneh Rezapour, Hamed Bonab, Maria Eskevich, Gareth Jones, Jussi Karlgren, Ben Carterette, and Rosie Jones. 2020. 100,000 podcasts: A spoken English document corpus. In Proceedings of the 28th International Conference on Computational Linguistics, pages 5903-5917, Barcelona, Spain (Online). International Committee on Computational Linguistics.
|
| 243 |
+
Arman Cohan, Franck Dernoncourt, Doo Soon Kim, Trung Bui, Seokhwan Kim, Walter Chang, and Nazli Goharian. 2018. A discourse-aware attention model for abstractive summarization of long documents. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 615-621, New Orleans, Louisiana. Association for Computational Linguistics.
|
| 244 |
+
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
|
| 245 |
+
|
| 246 |
+
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.
|
| 247 |
+
Sebastian Gehrmann, Yuntian Deng, and Alexander Rush. 2018. Bottom-up abstractive summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4098-4109, Brussels, Belgium. Association for Computational Linguistics.
|
| 248 |
+
Karl Moritz Hermann, Tomás Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. 2015. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 1693-1701.
|
| 249 |
+
Wan-Ting Hsu, Chieh-Kai Lin, Ming-Ying Lee, Kerui Min, Jing Tang, and Min Sun. 2018. A unified model for extractive and abstractive summarization using inconsistency loss. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 132-141, Melbourne, Australia. Association for Computational Linguistics.
|
| 250 |
+
Luyang Huang, Shuyang Cao, Nikolaus Parulian, Heng Ji, and Lu Wang. 2021. Efficient attentions for long document summarization. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1419-1436, Online. Association for Computational Linguistics.
|
| 251 |
+
Rosie Jones, Ben Carterette, Ann Clifton, Maria Eskevich, Gareth J. F. Jones, Jussi Karlgren, Aasish Pappu, Sravana Reddy, and Yongze Yu. 2020. Trec 2020 podcasts track overview. In The 29th Text Retrieval Conference (TREC) notebook.
|
| 252 |
+
Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
|
| 253 |
+
Goro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, and Kentaro Inui. 2020. Attention is not only a weight: Analyzing transformers with vector norms. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7057-7075, Online. Association for Computational Linguistics.
|
| 254 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020. BART: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational
|
| 255 |
+
|
| 256 |
+
Linguistics, pages 7871-7880, Online. Association for Computational Linguistics.
|
| 257 |
+
Manling Li, Lingyu Zhang, Heng Ji, and Richard J. Radke. 2019. Keep meeting summaries on topic: Abstractive multi-modal meeting summarization. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2190-2196, Florence, Italy. Association for Computational Linguistics.
|
| 258 |
+
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.
|
| 259 |
+
Potsawee Manakul and Mark Gales. 2021. Long-span summarization via local attention and content selection. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 6026-6041, Online. Association for Computational Linguistics.
|
| 260 |
+
Potsawee Manakul, Mark J.F. Gales, and Linlin Wang. 2020. Abstractive Spoken Document Summarization Using Hierarchical Model with Multi-Stage Attention Diversity Optimization. In Proc. Interspeech 2020, pages 4248-4252.
|
| 261 |
+
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.
|
| 262 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 8024-8035.
|
| 263 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
|
| 264 |
+
Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. 2020. Efficient transformers: A survey. arXiv preprint arXiv:2009.06732.
|
| 265 |
+
|
| 266 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 5998-6008.
|
| 267 |
+
Elena Voita, David Talbot, Fedor Moiseev, Rico Senrich, and Ivan Titov. 2019. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5797-5808, Florence, Italy. Association for Computational Linguistics.
|
| 268 |
+
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.
|
| 269 |
+
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.
|
| 270 |
+
Manzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Otanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, and Amr Ahmed. 2020. Big bird: Transformers for longer sequences. In Advances in Neural Information Processing Systems, volume 33, pages 17283-17297. Curran Associates, Inc.
|
| 271 |
+
|
| 272 |
+
# A Reproducibility Details
|
| 273 |
+
|
| 274 |
+
# A.1 Models
|
| 275 |
+
|
| 276 |
+
BART/LoBART: We use the HuggingFace's implementation (Wolf et al., 2020), including BART models fine-tuned to CNNDM and XSum. We take LoBART from Manakul and Gales (2021), including LoBART(4k)+MCS fine-tuned to Podcast and arXiv. MCS is the multitask content selection system for handling the Podcast/arXiv input documents that exceed 4096 words.
|
| 277 |
+
|
| 278 |
+
Modified Architecture: As shown in Fig. 3, the modified architecture consists of a sentence encoder and a sentence-level encoder-decoder attention. The sentence encoder, which approximates $f_{2}(.)$ in Eq. 7, is a two-layer bi-directional GRU (Cho et al., 2014) with hidden dimension of 1024. The sentence-level encoder-decoder attention has linear mapping weights $\mathbf{W}^{\mathbb{Q}}$ (query) and $\mathbf{W}^{\mathrm{K}}$ (key), and both weights have the same dimension as and are initialized from their corresponding word-level encoder-decoder attention's linear mapping weights in the base model. The total number of additional parameters is 58.8M.
|
| 279 |
+
|
| 280 |
+
# A.2 Data
|
| 281 |
+
|
| 282 |
+
CNNDM: We follow the standard train-valid/test split of 287,113/13,368/11,490.
|
| 283 |
+
|
| 284 |
+
XSum: We follow the standard train-valid/test split of 204,045/11,332/11,334.
|
| 285 |
+
|
| 286 |
+
Spotify Podcast: We follow the data processing and split in Jones et al. (2020), resulting in train-valid/test splits of 60,415/2,189/1,027.
|
| 287 |
+
|
| 288 |
+
arXiv: We follow the standard train-valid/test split of 203,037/6,436/6,440.
|
| 289 |
+
|
| 290 |
+
Our data processing is based on the byte-pair encoding (BPE) tokenizer same as the BART-large tokenizer, and we use the NLTK toolkit for sentence splitting. **In Fig. 2 and Fig. 4, to reduce computational cost, we use first 2,000 samples of each test set, except Podcast which contains less than 2,000 samples.
|
| 291 |
+
|
| 292 |
+
# A.3 Training and Inference
|
| 293 |
+
|
| 294 |
+
We use PyTorch (Paszke et al., 2019) in our experiments. All training experiments use the Adam
|
| 295 |
+
|
| 296 |
+
<table><tr><td>Dataset</td><td>N</td><td>N1</td><td>M</td><td>N/M</td></tr><tr><td>CNNDM</td><td>870</td><td>28.7</td><td>67.4</td><td>14.2</td></tr><tr><td>XSum</td><td>489</td><td>17.4</td><td>27.9</td><td>18.2</td></tr><tr><td>Podcast</td><td>5727</td><td>330.8</td><td>86.6</td><td>143.9</td></tr><tr><td>arXiv</td><td>8584</td><td>237.0</td><td>364.9</td><td>45.3</td></tr></table>
|
| 297 |
+
|
| 298 |
+
Table 4: Data statistics (average over corpus). $N=$ input length, $N_{1}=$ #sentences, $M=$ summary length.
|
| 299 |
+
|
| 300 |
+
optimizer (Kingma and Ba, 2015) with $\beta_{1} = 0.9$ , $\beta_{2} = 0.999$ , and the learning rate is:
|
| 301 |
+
|
| 302 |
+
$$
|
| 303 |
+
\mathrm {l r} = 0. 0 0 2 \times \min (\text {s t e p} ^ {- 0. 5}, \text {s t e p} \times \text {w a r m u p} ^ {- 1. 5})
|
| 304 |
+
$$
|
| 305 |
+
|
| 306 |
+
where we use 20,000 warmup steps. In all experiments, we set batch size to 1, and gradient accumulation to 2 steps. We evaluate the training loss on the validation set every 20,000 steps, and stop the training if the validation loss does not improve 3 times. All training experiments converged within 1 epoch. All experiments were carried out in 32-bit precision on either one V100 (32GB) GPU, or one RTX 2080Ti (11GB) GPU.
|
| 307 |
+
|
| 308 |
+
At inference time, we use the standard setting: beam search of width 4, and length penalty of 2.0 (Wu et al., 2016) for all experiments. The ROUGE (Lin, 2004) scoring tool is pyrouge. $^7$
|
| 309 |
+
|
| 310 |
+
# A.4 Multi-head attention
|
| 311 |
+
|
| 312 |
+
In all of the equations and expressions in the paper, we omit the heads for simplicity. Both BART and LoBART models have 16 heads. In Fig. 1, we average $\alpha_{m,i}^{\mathrm{s}}$ over heads, before the summation. When computing an uncertainty measure such as entropy $\mathrm{H(.)}$ or KL-divergence $\mathrm{KL(.)}$ , we compute the measure for each head separately and take the average. In obtaining $\mathcal{I}_m^r$ , we average $\alpha_{m,i}^{\mathrm{s}}$ over heads, before the top- $r$ operation, i.e. all heads get assigned the same subset of sentences, but the differences are across layers and decoding timesteps.
|
| 313 |
+
|
| 314 |
+
# A.5 KL Loss and Integrated Training
|
| 315 |
+
|
| 316 |
+
The target $\alpha_{m,i}^{\mathbf{s}}$ is re-normalized to encourage higher sparsity as follows:
|
| 317 |
+
|
| 318 |
+
$$
|
| 319 |
+
\boldsymbol {\alpha} _ {m} ^ {\mathrm {s}} \leftarrow \operatorname {s o f t m a x} \left(\frac {\log \left(\boldsymbol {\alpha} _ {m} ^ {\mathrm {s}}\right)}{T}\right) \tag {15}
|
| 320 |
+
$$
|
| 321 |
+
|
| 322 |
+
where temperature $T$ is set to 0.5. For integrated training, we set $\lambda$ in $\mathcal{L}_{\mathrm{I}}$ to 0.2. We initialize integrated training experiments from KL-only models.
|
| 323 |
+
|
| 324 |
+
# B Time Analysis
|
| 325 |
+
|
| 326 |
+
For each mode in Table 1, we take 6 samples of $M$ and the average time of 100 iterations. Curve fitting yields R-squared of at least 0.994.
|
| 327 |
+
|
| 328 |
+
Computational time as function of $M$ and $N$ is time $= c_{1} + c_{2}M + c_{3}N + c_{4}MN + c_{5}M^{2} + c_{6}N^{2}$ . The coefficients are obtained by a least-squares regression, e.g. $\mathbf{c}^{*} = (\mathbf{P}^{T}\mathbf{P})^{-1}\mathbf{P}^{T}\mathbf{t}$ where $\mathbf{P}$ is the matrix of $M, N$ associated with the coefficients, and $\mathbf{t}$ contains the time measures. We collect 30 samples of the average time of $100\mathrm{F} + \mathrm{B}$ passes, spanning $N \in [256, 1024]$ and $M \in [50, 300]$ . The normalized coefficients are: $c_{1} = 1.00$ , $c_{2} = 3.78 \times 10^{-3}$ , $c_{3} = 3.15 \times 10^{-3}$ , $c_{4} = 1.47 \times 10^{-6}$ , $c_{5} = 7.26 \times 10^{-7}$ , $c_{6} = 7.79 \times 10^{-7}$ . Because $c_{4} \approx 2c_{5}$ and $N > M$ , the enc-dec attention cost is greater than the decoder self attention cost.
|
| 329 |
+
|
| 330 |
+
# C Sensitivity to Random Selection
|
| 331 |
+
|
| 332 |
+
<table><tr><td>System</td><td>R1</td><td>R2</td><td>RL</td></tr><tr><td>Vanilla (γ = 0.0)</td><td>39.06</td><td>14.32</td><td>36.07</td></tr><tr><td>LA-tuned (γ = 0.1)</td><td>28.43</td><td>7.72</td><td>24.00</td></tr><tr><td>LA-tuned (γ = 1.0)</td><td>21.38</td><td>4.22</td><td>17.69</td></tr></table>
|
| 333 |
+
|
| 334 |
+
# D Model-free Approximation for Eq. 4
|
| 335 |
+
|
| 336 |
+
Since $\alpha_{m,i}^{\mathbf{s}} = \frac{1}{Z_m}\sum_{j = 1}^{J_i}\exp (\mathbf{q}_m\cdot \mathbf{k}_{i,j})$ is used to rank input sentences, the normalization term, $Z_{m}$ can be dropped. The encoder-decoder attention has $\mathcal{O}(MN_1N_2)$ complexity because $\mathbf{q}_m\cdot \mathbf{k}_{i,j}$ is computed for every $m$ and $(i,j)$ pair. Hence, if we can group $\mathbf{k}_{i,j}$ into sentences, the complexity could potentially be reduced. We try the following approximation of unnormalized $\alpha_{m,i}^{\mathbf{s}}$ :
|
| 337 |
+
|
| 338 |
+
$$
|
| 339 |
+
\begin{array}{l} \sum_ {j = 1} ^ {J _ {i}} \exp (\mathbf {q} _ {m} \cdot \mathbf {k} _ {i, j}) \\ = \sum_ {j = 1} ^ {J _ {i}} \prod_ {d = 1} ^ {D} \exp \left(q _ {m, d} k _ {i, j, d}\right) (16) \\ \approx \sum_ {j = 1} ^ {J _ {i}} \sum_ {d = 1} ^ {D} \exp \left(q _ {m, d} k _ {i, j, d}\right) (17) \\ \approx \sum_ {j = 1} ^ {J _ {i}} \sum_ {d = 1} ^ {D} \phi \left(q _ {m, d}\right) \phi \left(k _ {i, j, d}\right) (18) \\ = \phi (\mathbf {q} _ {m}) \cdot \left(\sum_ {j = 1} ^ {J _ {i}} \phi (\mathbf {k} _ {i, j})\right) (19) \\ \end{array}
|
| 340 |
+
$$
|
| 341 |
+
|
| 342 |
+
where $d = \{1,\dots,D\}$ is the hidden dimension, and $\phi(.)=\mathrm{ELU}(.)+1$ (or other form such as exp and ReLU). The model-free method reduces complexity from $\mathcal{O}(MN_1N_2)$ to $\mathcal{O}(MN_1 + k_wMrN_2 + k_eN_1N_2)$ where $k_{e}$ is now much smaller compared to the model-based approach. Based on Eq. 19, we provide model-free results in Table 6.
|
| 343 |
+
|
| 344 |
+
Table 5: Impact of sparsity on the sensitivity to random selection based on CNNDM with $r = 5$ .
|
| 345 |
+
|
| 346 |
+
<table><tr><td>Selection Method</td><td>R1</td><td>R2</td><td>RL</td></tr><tr><td>Ideal (Eq.6)</td><td>43.94</td><td>20.82</td><td>40.81</td></tr><tr><td>Best Model-based</td><td>43.72</td><td>20.40</td><td>40.70</td></tr><tr><td>Random</td><td>39.06</td><td>14.32</td><td>36.07</td></tr><tr><td>Model-free (Eq.19)</td><td>40.01</td><td>17.28</td><td>36.95</td></tr></table>
|
| 347 |
+
|
| 348 |
+
Table 6: Model-free results on CNNDM $\left( {r = 5}\right)$ .
|
| 349 |
+
|
| 350 |
+
Our model-free approach is better than the random selection baseline, but it is significantly worse than both the ideal selection baseline and the model-based approach. The reasons for this poor performance are: (i) the approximation from (16) to (17) requires the following condition to be true: $A_{1}A_{2} > B_{1}B_{2} \rightarrow A_{1} + A_{2} > B_{1} + B_{2}$ , so it is inaccurate when the values are not in a similar range; (ii) the approximation from (17) to (18) is inaccurate for non-positive values. In conclusion, this experiment investigates an alternative challenging method, which would not require any training and would be computationally cheaper at inference time. Although the current algebra does not work well, we hope that our initial study might draw more interests into this type of model-free approach to exploit the sentence structure in seq2seq tasks such as abstractive summarization.
|
| 351 |
+
|
| 352 |
+
# E Word-level and Sentence-level Attention Weight Plots
|
| 353 |
+
|
| 354 |
+
Constraining the encoder-decoder attention to $r$ sentences is motivated by the observations of sentence-level attention (in Fig. 5b, 6b, 7b, 8b). Note that we average over all heads for the plots.
|
| 355 |
+
|
| 356 |
+
For instance, Fig. 5 shows that the decoder attends particularly to input sentences #1,#2,#13 in the summary generation. Compared to Fig. 5, Fig. 6 shows a wider spread of the attention over sentences in a more abstractive task. When using LoBART, Fig. 7 and Fig. 8 show a similar trend of the sparsity to BART scenarios. These figures also explain Fig. 1a (Section 3) that $\sum_{i}^{\mathcal{T}_m^r}\alpha_{m,i}^s$ is only low/moderate because most sentences get assigned some attention weights, despite being non-salient.
|
| 357 |
+
|
| 358 |
+

|
| 359 |
+
(a) Word-Level
|
| 360 |
+
|
| 361 |
+

|
| 362 |
+
(b) Sentence-Level $(\alpha_{m,i}^{\mathrm{s}})$
|
| 363 |
+
|
| 364 |
+

|
| 365 |
+
Figure 5: Example of BART's encoder-decoder attention evaluated on CNNDM test set.
|
| 366 |
+
(a) Word-Level
|
| 367 |
+
|
| 368 |
+

|
| 369 |
+
(b) Sentence-Level $(\alpha_{m,i}^{\mathrm{s}})$
|
| 370 |
+
|
| 371 |
+

|
| 372 |
+
(a) Word-Level
|
| 373 |
+
Figure 7: Example of LoBART's encoder-decoder attention evaluated on Podcast test set.
|
| 374 |
+
|
| 375 |
+

|
| 376 |
+
Figure 6: Example of BART's encoder-decoder attention evaluated on XSum test set.
|
| 377 |
+
(b) Sentence-Level $(\alpha_{m,i}^{\mathrm{s}})$
|
| 378 |
+
|
| 379 |
+

|
| 380 |
+
(a) Word-Level
|
| 381 |
+
Figure 8: Example of LoBART's encoder-decoder attention evaluated on arXiv test set.
|
| 382 |
+
|
| 383 |
+

|
| 384 |
+
(b) Sentence-Level $(\alpha_{m,i}^{\mathrm{s}})$
|
sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:654ac3d2f0935e8d4ea27952a15d58f107773bd05f89b029c2cfe113b0e67033
|
| 3 |
+
size 575950
|
sparsityandsentencestructureinencoderdecoderattentionofsummarizationsystems/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:404872c139e383f9fedc8fee16a1ea101c114e4c152c95b90fca08f64c8234ea
|
| 3 |
+
size 489136
|
speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a2df98b8646873781633b66e4ff1e61bdcb56bd0363b0e34604ac000cabcadf6
|
| 3 |
+
size 56605
|
speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dabe55848b9def35c4264050c0e2fffbe1fe9c80bb39da5c208e1c8d2860cb77
|
| 3 |
+
size 67394
|
speechformerreducinginformationlossindirectspeechtranslation/40bd627e-e649-499d-adba-5f5dc511ba9e_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d9512e6608bd95c776686d937f5b1ef3795e730cff9291852d31f4e6ae7576bc
|
| 3 |
+
size 507991
|
speechformerreducinginformationlossindirectspeechtranslation/full.md
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Speechformer: Reducing Information Loss in Direct Speech Translation
|
| 2 |
+
|
| 3 |
+
Sara Papi $^{1,2}$ , Marco Gaido $^{1,2}$ , Matteo Negri $^{1}$ , Marco Turchi $^{1}$ $^{1}$ Fondazione Bruno Kessler
|
| 4 |
+
$^{2}$ University of Trento
|
| 5 |
+
{spapi,mgaido,negri,turchi} $@$ fbk.eu
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Transformer-based models have gained increasing popularity achieving state-of-the-art performance in many research fields including speech translation. However, Transformer's quadratic complexity with respect to the input sequence length prevents its adoption as is with audio signals, which are typically represented by long sequences. Current solutions resort to an initial sub-optimal compression based on a fixed sampling of raw audio features. Therefore, potentially useful linguistic information is not accessible to higher-level layers in the architecture. To solve this issue, we propose Speechformer, an architecture that, thanks to a reduced memory usage in the attention layers, avoids the initial lossy compression and aggregates information only at a higher level according to more informed linguistic criteria. Experiments on three language pairs (en→de/es/nl) show the efficacy of our solution, with gains of up to 0.8 BLEU on the standard MuST-C corpus and of up to 4.0 BLEU in a low resource scenario.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Speech-to-text translation (ST) has been traditionally approached with cascade architectures consisting of a pipeline of two sub-components (Stentiford and Steer, 1988; Waibel et al., 1991): an automatic speech recognition (ASR), which transforms the audio input into a textual representation, and a machine translation (MT) model, which projects the transcript into the target language. A more recent approach consists in directly translating speech into target text using a single model (Bérard et al., 2016; Weiss et al., 2017). This direct solution has interesting advantages (Sperber and Paulik, 2020): $i$ ) it can better exploit audio information (e.g. prosody) during the translation phase, $ii$ ) it has lower latency, and $iii$ ) it is not affected by error propagation.
|
| 14 |
+
|
| 15 |
+
Thanks to these advantages, the initially huge performance gap with cascade systems has gradually closed (Ansari et al., 2020), motivating research towards further improvements.
|
| 16 |
+
|
| 17 |
+
Direct ST models are fed with features extracted from the audio with high frequency (usually every 10ms). This, on average, makes the resulting input sequence of vectors $\sim 10$ times longer than the corresponding text, leading to an intrinsically redundant (i.e. long and repetitive) representation. For this reason, it is not possible to process speech data with a vanilla Transformer encoder (Vaswani et al., 2017), whose self-attention layers have quadratic memory complexity with respect to the input length. State-of-the-art architectures tackle the problem by collapsing adjacent vectors in a fixed way, i.e. by mapping a predefined number of vectors (usually 4) into a single one, either using strided convolutional layers (Bérard et al., 2018; Di Gangi et al., 2019; Wang et al., 2020a) or by stacking them (Sak et al., 2015). As a positive side effect, these length reduction solutions lower input redundancy. As a negative side effect, they disregard the variability over time of the amount of linguistic and phonetic information in audio signals (e.g. due to pauses and speaking rate variations) by giving equal weight to all features. In doing this, relevant features are penalized and considered equally important to the irrelevant ones, resulting in an information loss.
|
| 18 |
+
|
| 19 |
+
Recently, Salesky et al. (2019) obtained considerable translation quality gains by collapsing consecutive vectors with the same phonetic content instead of compressing them in a fixed way. Zhang et al. (2020) also showed that selecting a small percentage $(\sim 16\%)$ of input time steps based on their informativeness improves ST quality. On the downside, these approaches respectively require adding a model that performs phoneme classification and a pre-trained adaptive feature selection layer on top of an ASR encoder, losing the compactness of direct solutions at the risk of error propagation.
|
| 20 |
+
|
| 21 |
+
In direct ST, Liu et al. (2020) and Gaido et al. (2021) addressed the problem with a transcript/phoneme-based compression leveraging Connectionist Temporal Classification (CTC - Graves et al. 2006). However, since these methods are applied to the representation encoded by Transformer layers, the initial content-unaware down-sampling of the input is still required for memory reasons, at the risk of losing important information.
|
| 22 |
+
|
| 23 |
+
To avoid initial fixed compression, we propose Speechformer: the first Transformer-based architecture that processes full audio content maintaining the original dimensions of the input sequence. Inspired by recent work on reducing the memory complexity of the attention mechanism (Wang et al., 2020b), we introduce a novel attention layer – the ConvAttention – whose memory requirements are reduced by means of convolutional layers. As the benefits of avoiding the initial lossy compression might be outweighed by the increased redundancy of the encoded audio features, we aggregate the high-level representation of the input sequence in a linguistically informed way, as in (Liu et al., 2020; Gaido et al., 2021). In other words, we collapse vectors representing the same linguistic atomic content (words, sub-words, pauses) into a single element, since they express the same linguistic information. The usage of the ConvAttention and of the linguistically motivated compression produces a considerably shorter, yet informative, sequence that fits the memory requirements of vanilla Transformer encoder layers. Experiments on three language directions (en→de/es/nl) show that the proposed architecture outperforms a state-of-the-art ST model by up to 0.8 BLEU points on the standard MuST-C corpus and obtains significantly larger gains (up to 4.0 BLEU) in a low resource setting where the amount of training data is reduced to 100 hours.
|
| 24 |
+
|
| 25 |
+
# 2 Model
|
| 26 |
+
|
| 27 |
+
In this section, we first introduce a novel attention layer that enables to process raw audio features without downsampling (§2.1). Then, we present an architecture that leverages this attention mechanism in the first encoder layers and reduces the redundancy of the more informative but longer resulting sequences with CTC compression (§2.2).
|
| 28 |
+
|
| 29 |
+
# 2.1 ConvAttention layer
|
| 30 |
+
|
| 31 |
+
State-of-the-art ST models employ convolutional neural networks to sample the feature sequence
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
Figure 1: Attention mechanism with the proposed convolutional compression of $K$ and $V$ .
|
| 35 |
+
|
| 36 |
+
to a lower dimension (typically by a factor of 4), enabling the use of Transformer layers otherwise impossible given their memory consumption. Outside ST, the Linformer architecture (Wang et al., 2020b) has been recently proposed to reduce the quadratic complexity of the product between the attention matrix (resulting from the product of the query $-Q$ and key $-K$ matrices) and the value $(V)$ matrix by applying a linear projection to $K$ and $V$ . These projections bring the dimension of the sequence length of $K$ and $V$ to a fixed value, yielding a linear memory complexity. However, a direct application of this architecture to ST is problematic due to the high variability in audio lengths. On one side, mapping those sequences to a fixed dimension can cause an excessive information loss, with a consequent performance drop. On the other, it poses technical issues: the linear projection matrix has size $n \times k$ , where $n$ is the maximum input length and $k$ is the fixed dimension. If the input has a length $n'$ shorter than $n$ , which is a common case due to the high variability in length of audio sequences, only the first $n'$ weights of the matrix are updated. This results in gradients of different dimensions across GPUs, leading to training failures due to inconsistencies.
|
| 37 |
+
|
| 38 |
+
To avoid the aforementioned problems, we propose the adoption of ConvAttention (Figure 1), in which the linear projections of the Linformer architecture are substituted, both in $K$ and $V$ , with a single 1D convolutional layer. Hence, the length of the sequences used in the scaled dot-product attention depends on the stride of the convolution, a hyper-parameter we named compression factor $(\chi)$ , which controls the memory complexity of the ConvAttention. Namely, being $n$ the temporal dimension of $K$ and $V$ , the convolution output length is $\frac{n}{\chi}$ and the complexity of the ConvAttention is
|
| 39 |
+
|
| 40 |
+
$O\left(\left(\frac{n}{\chi}\right)^{2}\right)$ , i.e. a $\frac{1}{\chi^2}$ factor lower than a vanilla Transformer self-attention. For instance, setting $\chi$ to 4 leads to the same memory consumption as standard ST models with an initial $\times 4$ subsampling (i.e. with two initial convolutional layers with stride 2).
|
| 41 |
+
|
| 42 |
+
Notice that the output sequence length is still equal to the input sequence length as it depends on the length of $Q$ that is not modified.
|
| 43 |
+
|
| 44 |
+
# 2.2 Speechformer
|
| 45 |
+
|
| 46 |
+
The introduction of ConvAttention layers allows us to avoid sub-optimal fixed compressions that disregard the variability over time in the amount of audio information. However, since an encoder consisting only of ConvAttention layers does not compress the length of the original input sequence, the decoder will be fed with long and redundant sequences that are difficult to attend, leading to potential performance degradation.
|
| 47 |
+
|
| 48 |
+
To overcome this problem, as in (Liu et al., 2020; Gaido et al., 2021), we apply a content-informed compression to high-level hidden states trained using the CTC loss (Graves et al., 2006) to represent the linguistic content. Specifically, the CTC loss produces a prediction for each input time step and then merges equal predictions for consecutive time steps. The resulting sequence is compared with the reference, which is the sequence of subwords representing the transcript of the input utterance. CTC compression, similarly to the loss computation, collapses consecutive features corresponding to the same predictions, averaging them. After this operation, the sequence is reduced to a representation dimensionally closer to its textual content, which can be processed by the original attention mechanism without the need of approximations.
|
| 49 |
+
|
| 50 |
+
Speechformer (see Figure 2), is composed of $E_{L}$ ConvAttention layers up to a CTC compression layer, after which there are $E_{T}$ Transformer encoder layers. The $E_{L}$ ConvAttention layers are meant to learn the linguistic content of the input audio while the $E_{T}$ Transformer encoder layers are in charge of learning higher-level semantic representations, i.e. the encoder outputs, which the decoder has to convert into a text in the target language. We also maintain the two 1D convolutional layers before the ConvAttention layers but without striding, so that no sub-sampling is applied to the input. We make this choice both to keep the number of parameters comparable to the existing architectures, and to let the model learn a better representation of the
|
| 51 |
+
|
| 52 |
+

|
| 53 |
+
Figure 2: Speechformer architecture with $E_{L}$ ConvAttention Layers and $E_{T}$ Transformer Encoder Layers.
|
| 54 |
+
|
| 55 |
+
<table><tr><td>kernel</td><td>16</td><td>16</td><td>8</td><td>8</td><td>4</td></tr><tr><td>χ</td><td>16</td><td>8</td><td>8</td><td>4</td><td>4</td></tr><tr><td>BLEU</td><td>19.7</td><td>20.6</td><td>20.5</td><td>21.3</td><td>20.2</td></tr></table>
|
| 56 |
+
|
| 57 |
+
Table 1: BLEU on MuST-C en-de dev set varying the compression factor $\chi$ and 1D convolutional kernel size. The scores are obtained without label smoothing.
|
| 58 |
+
|
| 59 |
+
input before feeding it to the attention mechanism.
|
| 60 |
+
|
| 61 |
+
# 3 Experimental Settings
|
| 62 |
+
|
| 63 |
+
We experimented on three languages of MuST-C (Cattoni et al., 2021): English-German, English-Spanish, and English-Dutch. To ensure the reproducibility of our work, all training details are provided in the Appendix and the code - based on fairseq (Ott et al., 2019) - is released open source.
|
| 64 |
+
|
| 65 |
+
Following (Wang et al., 2020b), we share the convolution parameters of the ConvAttention layers both among $K$ and $V$ and among the attention heads. We select the compression factor and the 1D convolution kernel size with a set of preliminary experiments on the en-de validation set. The compression factor $(\chi)$ is chosen among 4, 8, and 16, since 4 is the minimum value that avoids out-of-memory issues. The kernel size is set either equal to or twice as the value of $\chi$ . Table 1 shows that the combination of a compression factor of 4 and a kernel size of 8 leads to better performance compared to the other combinations. Consequently, in all our experiments we use this setting.
|
| 66 |
+
|
| 67 |
+
We initialize the ConvAttention weights of Speechformer with those of a pre-trained ST model
|
| 68 |
+
|
| 69 |
+
<table><tr><td rowspan="2">Model</td><td colspan="4">en-de</td><td colspan="4">en-es</td><td colspan="4">en-nl</td><td rowspan="2">Inference Time</td></tr><tr><td>dev</td><td colspan="3">tst-COMMON</td><td>dev</td><td colspan="3">tst-COMMON</td><td>dev</td><td colspan="3">tst-COMMON</td></tr><tr><td>(Inaguma et al., 2020)</td><td>-</td><td colspan="3">22.9</td><td>-</td><td colspan="3">28.0</td><td>-</td><td colspan="3">27.4</td><td>-</td></tr><tr><td>(Wang et al., 2020a)</td><td>-</td><td colspan="3">22.7</td><td>-</td><td colspan="3">27.2</td><td>-</td><td colspan="3">27.3</td><td>-</td></tr><tr><td rowspan="2">Our baseline + compression</td><td>22.5</td><td colspan="3">22.8</td><td>31.2</td><td colspan="3">27.9</td><td>24.2</td><td colspan="3">27.2</td><td>1.0x</td></tr><tr><td>22.3</td><td>-0.2</td><td>22.8</td><td>+0.0</td><td>31.1</td><td>-0.1</td><td>27.9</td><td>+0.0</td><td>24.2</td><td>+0.0</td><td>27.0</td><td>-0.2</td><td>0.9x</td></tr><tr><td>Plain ConvAttention</td><td>23.1*</td><td>+0.6</td><td>23.2</td><td>+0.4</td><td>31.5</td><td>+0.3</td><td>27.7</td><td>-0.2</td><td>24.8*</td><td>+0.6</td><td>26.9</td><td>-0.3</td><td>1.8x</td></tr><tr><td>Speechformer</td><td>23.3*</td><td>+0.8</td><td>23.6*</td><td>+0.8</td><td>31.8*</td><td>+0.6</td><td>28.5*</td><td>+0.6</td><td>24.9*</td><td>+0.7</td><td>27.7*</td><td>+0.5</td><td>1.3x</td></tr></table>
|
| 70 |
+
|
| 71 |
+
Table 2: BLEU score (average over 3 runs) on English→Dutch (en-nl), English→German (en-de), and English→Spanish (en-es) of MuST-C tst-COMMON (tst) and the dev (validation) set. The * symbol indicates statistically significant improvements over the baseline. Statistical significance is computed with a t-test (Student, 1908), whose null hypothesis is that the mean of the considered experiment is not higher than the mean of the baseline. We consider the result statistically significant if we can reject the null hypothesis with $95\%$ confidence.
|
| 72 |
+
|
| 73 |
+
having only ConvAttention layers in the encoder, since, in the initial random state, the CTC-based compression might not properly reduce the input sequence, leading to out-of-memory issues in the following Transformer encoder layers. Notice that the pre-training does not improve performance. Indeed, Gaido et al. (2021) already showed that the encoder pre-training improves the baseline performance only without the additional CTC loss and that the results obtained by training without CTC loss and with encoder pre-training are identical to those achieved with the additional CTC loss. These findings have been confirmed in our experiments: $i$ ) initializing the encoder of the baseline with either an ASR or an ST encoder did not bring any improvement, and $ii$ ) our results are on par with those obtained with encoder pre-training and no additional CTC loss. We do not include the results with encoder pre-training of the baselines, as they do not bring any additional insight.
|
| 74 |
+
|
| 75 |
+
# 4 Results
|
| 76 |
+
|
| 77 |
+
We compare our proposed model to a strong baseline represented by a Transformer-based model with initial fixed sub-sampling (Wang et al., 2020a) and its baseline+compression variant that includes the average CTC compression strategy, as per (Gaido et al., 2021). We choose to also develop the second baseline to make the comparison with Speechformer fair since they both use the CTC compression strategy. Table 2 reports the results computed with SacreBLEU $^2$ (Post, 2018). For each experiment, we report the average over 3 runs to ensure that performance differences do not depend on the fluctuations of particularly good or bad runs.
|
| 78 |
+
|
| 79 |
+
First, it can be noticed that our baseline is in line with state-of-the-art architectures trained only
|
| 80 |
+
|
| 81 |
+
on MuST-C (Wang et al., 2020a; Inaguma et al., 2020). Second, the addition of CTC compression to the baseline model does not bring benefits. This confirms the findings of Gaido et al. (2021), who showed that applying CTC compression using transcripts produces differences in score that are not statistically significant. Speechformer, instead, results in statistically significant improvements over the baseline in all language directions, with BLEU gains ranging from 0.5 (for en-nl) to 0.8 (for ende). As the CTC compression is not helpful for the baseline, we also evaluate a model (Plain ConvAttention) whose encoder is a stack of ConvAttention layers, i.e. without vanilla Transformer-encoder layers and any form of compression. The drop in performance with respect to Speechformer varies between 0.4 and 0.8 BLEU on all language pairs, supporting our hypothesis that a non-compressed encoder output is too redundant to be effectively attended by the decoder.
|
| 82 |
+
|
| 83 |
+
Low-Resource Settings. We suppose that the higher gains on en-de may be related to the size of the training data. Indeed, the en-de section of MuST-C used for training is the smallest one, containing $20\%$ fewer data than the en-es section and $10\%$ less than the en-nl one. Thus, we study Speechformer's performance in different data conditions by progressively reducing the amount of training data. For this analysis, we select the enes section of MuST-C as it contains the highest number of hours (478h) among the three languages, and we experiment with three subsets, respectively containing 385h (corresponding to the amount of training data for en-de), 200h, and 100h (which can be considered a limited quantity given that the number of hours is respectively less than half and one fourth of the available data). Figure 3 shows that the gains obtained by Speechformer over the baseline do not vary significantly between 385h
|
| 84 |
+
|
| 85 |
+
and 478h (0.5 vs 0.6 BLEU). We can then conclude that the gain variation between en-de and en-es does not depend on the smaller size of the en-de training set. However, in the low resource settings (200h and 100h), the gains obtained by the Speechformer are much larger, amounting to 1.1 BLEU with 200h and 4.0 BLEU with 100h. To validate the robustness of these results, we also experimented on the en-de language pair and obtained consistent results: Speechformer outperforms the baseline by 1.5 BLEU (19.6 vs 18.1 BLEU) with 200h of training data and by 1.9 BLEU (9.7 vs 7.8 BLEU) with 100h of training data, achieving a considerable relative improvement of more than $24\%$ . Although it brings consistent and significant gains in higher resource scenarios, these experiments show that Speechformer is particularly fruitful in low-resource settings. We leave to future work the assessment of the behavior of Speechformer in unrestricted data conditions (e.g. when using large ASR corpora to generate pseudo-labelled ST training data).
|
| 86 |
+
|
| 87 |
+

|
| 88 |
+
Figure 3: Architecture comparison varying the amount of en-es training data (478h, 385h, 200h, and 100h).
|
| 89 |
+
|
| 90 |
+
Inference Time. The ConvAttention layers process the whole input sequences, which are 4 times larger than those elaborated by the baseline attention mechanism. Thereby, a slow-down at inference time is expected, especially for the Plain ConvAttention, whose encoder layers are all ConvAttention layers. The last column of Table 2 confirms that the Plain ConvAttention architecture is 1.8 times slower than the baseline, i.e. the inference time is nearly twice. Speechformer is also slower than the baseline, but the overhead amounts to only $30\%$ instead of $80\%$ . Moreover, it can be noticed that the size of the attention matrix – and therefore the corresponding computational cost – can be
|
| 91 |
+
|
| 92 |
+
controlled in the Speechformer with the compression factor $(\chi)$ hyper-parameter. We leave to future studies the analysis of the trade-off between overall translation quality and inference time, which is usually irrelevant in offline ST, but becomes critical in simultaneous scenarios.
|
| 93 |
+
|
| 94 |
+
Manual Analysis. Lastly, we inspected the baseline and Speechformer outputs to better understand the reason behind the improvements brought by our architecture. This qualitative analysis was conducted on a sample of 200 sentences of the ende test set – the language direction showing the largest gap between the systems (+0.8, see Table 2) – by a professional linguist with C2 German level. It emerged (see the Appendix for examples) that Speechformer tends to have better word-ordering, a typical problem arising when translating from an SVO language like English to an SOV language like German. Furthermore, Speechformer outputs display a better punctuation positioning – attributable to an improved handling of pauses and prosody – and a reduction of the number of audio misunderstandings and omissions. Together with the overall BLEU gains, these findings provide us with interesting hints about the potential of Speechformer.
|
| 95 |
+
|
| 96 |
+
# 5 Conclusion
|
| 97 |
+
|
| 98 |
+
In the wake of previous works showing the benefits of a content-informed compression over fixed downsampling of the audio features, we proposed Speechformer: the first ST Transformer-based model able to encode the whole raw audio features without any sub-optimal initial subsampling typical of current state-of-the-art models. Our solution is made possible by the introduction of a modified attention mechanism – the ConvAttention – that reduces the memory complexity to $O\left(\left(\frac{n}{\chi}\right)^2\right)$ . As the plain application of ConvAttention layers leads to redundant sequences, high-level hidden states are compressed with a CTC-based strategy to obtain a compact, yet informative representation that can be processed by vanilla Transformer encoder layers. Experiments on three language pairs show that Speechformer significantly outperforms a state-of-the-art ST model by 0.5-0.8 BLEU, reaching a peak of 4 BLEU points in a low resource scenario.
|
| 99 |
+
|
| 100 |
+
# Acknowledgements
|
| 101 |
+
|
| 102 |
+
The authors would like to thank Alina Karakanta for the support and help with the manual analysis.
|
| 103 |
+
|
| 104 |
+
# References
|
| 105 |
+
|
| 106 |
+
Ebrahim Ansari, Amittai Axelrod, Nguyen Bach, Ondrej Bojar, Roldano Cattoni, Fahim Dalvi, Nadir Durrani, Marcello Federico, Christian Federmann, Jiatao Gu, Fei Huang, Kevin Knight, Xutai Ma, Ajay Nagesh, Matteo Negri, Jan Niehues, Juan Pino, Elizabeth Salesky, Xing Shi, Sebastian Stüker, Marco Turchi, Alexander Waibel, and Changhan Wang. 2020. FINDINGS OF THE IWSLT 2020 EVALUATION CAMPAIGN. In Proceedings of the 17th International Conference on Spoken Language Translation, pages 1-34, Online. Association for Computational Linguistics.
|
| 107 |
+
Parnia Bahar, Tobias Bieschke, and Hermann Ney. 2019. A Comparative Study on End-to-end Speech to Text Translation. In Proceedings of International Workshop on Automatic Speech Recognition and Understanding (ASRU), pages 792-799, Sentosa, Singapore.
|
| 108 |
+
Alexandre Bérard, Laurent Besacier, Ali Can Kocabiyikoglu, and Olivier Pietquin. 2018. End-to-End Automatic Speech Translation of Audiobooks. In Proceedings of ICASSP 2018 - IEEE International Conference on Acoustics, Speech and Signal Processing, Calgary, Alberta, Canada.
|
| 109 |
+
Alexandre Bérard, Olivier Pietquin, Christophe Servan, and Laurent Besacier. 2016. Listen and Translate: A Proof of Concept for End-to-End Speech-to-Text Translation. In NIPS Workshop on end-to-end learning for speech and audio processing, Barcelona, Spain.
|
| 110 |
+
Roldano Cattoni, Mattia Antonino Di Gangi, Luisa Bentivogli, Matteo Negri, and Marco Turchi. 2021. Must-c: A multilingual corpus for end-to-end speech translation. Computer Speech & Language, 66:101155.
|
| 111 |
+
Mattia A. Di Gangi, Matteo Negri, Roldano Cattoni, Roberto Dessi, and Marco Turchi. 2019. Enhancing Transformer for End-to-end Speech-to-Text Translation. In Proceedings of Machine Translation Summit XVII Volume 1: Research Track, pages 21-31, Dublin, Ireland. European Association for Machine Translation.
|
| 112 |
+
Marco Gaido, Mauro Cettolo, Matteo Negri, and Marco Turchi. 2021. CTC-based Compression for Direct Speech Translation. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 690-696, Online. Association for Computational Linguistics.
|
| 113 |
+
Alex Graves, Santiago Fernández, Faustino J. Gomez, and Jürgen Schmidhuber. 2006. Connectionist Temporal Classification: Labelling Unsegmented Sequence Data with Recurrent Neural Networks. In Proceedings of the 23rd international conference on Machine learning (ICML), pages 369-376, Pittsburgh, Pennsylvania.
|
| 114 |
+
|
| 115 |
+
Hirofumi Inaguma, Shun Kiyono, Kevin Duh, Shigeki Karita, Nelson Yalta, Tomoki Hayashi, and Shinji Watanabe. 2020. ESPnet-ST: All-in-One Speech Translation Toolkit. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 302-311, Online. Association for Computational Linguistics.
|
| 116 |
+
Suyoun Kim, Takaaki Hori, and Shinji Watanabe. 2017. Joint CTC-attention based end-to-end speech recognition using multi-task learning. In Proceedings of the 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 4835-4839, New Orleans, Louisiana.
|
| 117 |
+
Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
|
| 118 |
+
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.
|
| 119 |
+
Taku Kudo. 2018. Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidates. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 66-75, Melbourne, Australia. Association for Computational Linguistics.
|
| 120 |
+
Taku Kudo and John Richardson. 2018. SentencePiece: A simple and language independent subword tokenizer and tokenizer for Neural Text Processing. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 66-71, Brussels, Belgium. Association for Computational Linguistics.
|
| 121 |
+
Yuchen Liu, Junnan Zhu, Jiajun Zhang, and Chengqing Zong. 2020. Bridging the Modality Gap for Speech-to-Text Translation.
|
| 122 |
+
Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. *fairseq: A Fast, Extensible Toolkit for Sequence Modeling*. In *Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations)*, pages 48-53, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 123 |
+
Daniel S. Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D. Cubuk, and Quoc V. Le. 2019. SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognition. In Proceedings of Interspeech 2019, pages 2613-2617, Graz, Austria.
|
| 124 |
+
|
| 125 |
+
Matt Post. 2018. A Call for Clarity in Reporting BLEU Scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 186-191, Belgium, Brussels. Association for Computational Linguistics.
|
| 126 |
+
Hasim Sak, Andrew Senior, Kanishka Rao, and Françoise Beaufays. 2015. Fast and Accurate Recurrent Neural Network Acoustic Models for Speech Recognition. In Proceedings of Interspeech 2015, Dresden, Germany.
|
| 127 |
+
Elizabeth Salesky, Matthias Sperber, and Alan W. Black. 2019. Exploring Phoneme-Level Speech Representations for End-to-End Speech Translation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1835–1841, Florence, Italy. Association for Computational Linguistics.
|
| 128 |
+
Matthias Sperber and Matthias Paulik. 2020. Speech translation and the end-to-end promise: Taking stock of where we are. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7409-7421, Online. Association for Computational Linguistics.
|
| 129 |
+
Frederick W. M. Stentiford and Martin G. Steer. 1988. Machine Translation of Speech. British Telecom Technology Journal, 6(2):116-122.
|
| 130 |
+
Student. 1908. The probable error of a mean. Biometrika, 6(1):1-25.
|
| 131 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. 2016. Rethinking the Inception Architecture for Computer Vision. In Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2818-2826, Las Vegas, Nevada, United States.
|
| 132 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is All You Need. In Proceedings of Advances in Neural Information Processing Systems 30 (NIPS), pages 5998-6008, Long Beach, California.
|
| 133 |
+
Alex Waibel, Ajay N. Jain, Arthur E. McNair, Hiroaki Saito, Alexander G. Hauptmann, and Joe Tebelskis. 1991. JANUS: A Speech-to-Speech Translation System Using Connectionist and Symbolic Processing Strategies. In Proceedings of the International Conference on Acoustics, Speech and Signal Processing, ICASSP 1991, pages 793-796, Toronto, Canada.
|
| 134 |
+
Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Dmytro Okhonko, and Juan Pino. 2020a. Fairseq S2T: Fast Speech-to-Text Modeling with Fairseq. In Proceedings of the 1st Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 10th International Joint Conference on Natural Language Processing: System Demonstrations, pages 33–39, Suzhou, China. Association for Computational Linguistics.
|
| 135 |
+
|
| 136 |
+
Sinong Wang, Belinda Z. Li, Madian Khabsa, Han Fang, and Hao Ma. 2020b. Linformer: Self-Attention with Linear Complexity.
|
| 137 |
+
Ron J. Weiss, Jan Chorowski, Navdeep Jaitly, Yonghui Wu, and Zhifeng Chen. 2017. Sequence-to-Sequence Models Can Directly Translate Foreign Speech. In Proceedings of Interspeech 2017, pages 2625-2629, Stockholm, Sweden.
|
| 138 |
+
Biao Zhang, Ivan Titov, Barry Haddow, and Rico Senrich. 2020. Adaptive Feature Selection for End-to-End Speech Translation. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 2533–2544, Online. Association for Computational Linguistics.
|
| 139 |
+
Chang-Bin Zhang, Peng-Tao Jiang, Qibin Hou, Yunchao Wei, Qi Han, Zhen Li, and Ming-Ming Cheng. 2021. Delving Deep Into Label Smoothing. IEEE Transactions on Image Processing, 30:5984-5996.
|
| 140 |
+
|
| 141 |
+
# A Training Details
|
| 142 |
+
|
| 143 |
+
All our models are composed by 12 encoder layers and 6 decoder layers with 8 attention heads and are trained using label smoothed cross entropy (Szegedy et al., 2016) with the auxiliary CTC loss (Kim et al., 2017; Bahar et al., 2019) and Adam optimizer (Kingma and Ba, 2015). The number of parameters is $\sim 77\mathrm{M}$ for the baseline and $\sim 79\mathrm{M}$ for the Speechformer. The CTC is computed at the 8th encoder layer and its role is to predict the source transcription (lowercased and without punctuation), as in (Liu et al., 2020). The learning rate is set to 1e-3 with an inverse square-root scheduler and 10,000 warm-up updates. Mini-batches contain up to 5,000 tokens and we update gradients every 16 mini-batches. We apply SpecAugment (Park et al., 2019) and utterance-level cepstral mean and variance normalization. We filter out samples with duration exceeding 30s. The text is segmented in sub-word units with transcript and target Sentencepiece (Kudo and Richardson, 2018) unigram language models (Kudo, 2018) with size 5,000 and 8,000 respectively. We average 7 checkpoints around the best on the validation loss. Trainings were performed with 4 GPUs NVIDIA Tesla K-80 with 12GB of RAM and lasted about 3 days.
|
| 144 |
+
|
| 145 |
+
# B Output examples
|
| 146 |
+
|
| 147 |
+
Table 3 provides examples of the German translations generated by the baseline and by Speechformer for four utterances of the MuST-C test set, chosen among 200 sentences manually inspected by a C2 German speaker. These sentences have
|
| 148 |
+
|
| 149 |
+
<table><tr><td colspan="2">(a) Word ordering</td></tr><tr><td>Audio Reference</td><td>It was a way that parents could figure out which were the right public schools for their kids.
|
| 150 |
+
Es ging um eine Methode, mit der Eltern hersausfinden konnen, welche die richtigen öffentlichen Schulen für ihre Kinder sind.</td></tr><tr><td>Baseline</td><td>Es war eine Möglichkeit, dass Eltern hersausfinden konnen, welche für ihre Kinder die richtige öffentliche Schule war.
|
| 151 |
+
It was an opportunity for the parents to find out which were for their children the right public schools.
|
| 152 |
+
Es war eine Methode, mit der Eltern hersausfinden konnen, welche die richtigen öffentlichen Schulen für ihre Kinder waren.
|
| 153 |
+
It was a method with which the parents could find out which were the right public schools for their children.</td></tr><tr><td colspan="2">(b) Punctuation handling</td></tr><tr><td>Audio Reference</td><td>So, sir, can you help me? I need help.
|
| 154 |
+
Also, mein Herr, konnen Sie mir halten? Ich brauche Hilfe.</td></tr><tr><td>Baseline</td><td>Es ist also möglich, mir zu halten.
|
| 155 |
+
So it is possible to help me.</td></tr><tr><td>Speechformer</td><td>Also, konnen Sie mir halten? Ich habe keine Hilfe.
|
| 156 |
+
So can you help me? I have no help.</td></tr><tr><td colspan="2">(c) Audio misunderstanding</td></tr><tr><td>Audio Reference</td><td>You see Aluminum was the most valuable metal on the Planet, worth more than Gold and Platinum.
|
| 157 |
+
Aluminium war zu dieser Zeit das wertvollste Metall auf dem Planeten, wertvoller als Gold und Platinum.</td></tr><tr><td>Baseline</td><td>Aluminium war die wertvollste Metallart auf dem Planeten, mehr als Gold und Pflanzen.
|
| 158 |
+
Aluminum was the most valuable type of metal on the planet, more than gold and plants.</td></tr><tr><td>Speechformer</td><td>Aluminium war das wertvollste Metall auf dem Planeten, mehr als Gold und Platin.
|
| 159 |
+
Aluminum was the most valuable metal on the planet, more than gold and platinum.</td></tr><tr><td colspan="2">(d) Omission</td></tr><tr><td>Audio Reference</td><td>But the amazing thing about cities is they're worth so much more than it costs to build them.
|
| 160 |
+
Aber das Erstaunliche an Städten ist, dass sie so viel mehr wert sind, als es kostet sie zu bauen.</td></tr><tr><td>Baseline</td><td>Aber das Faszinierende an Städten ist, dass es viel mehr wert ist, als es zu bauen.
|
| 161 |
+
But the fascinating thing about cities is that it's worth a lot more than building it.</td></tr><tr><td>Speechformer</td><td>Aber das Erstaunliche an Städten ist, dass sie viel mehr wert sind als sie es kostet, sie zu bauen.
|
| 162 |
+
But the amazing thing about cities is that they are worth a lot more than it costs to build them.</td></tr></table>
|
| 163 |
+
|
| 164 |
+
Table 3: Examples of translation problems $- ( a ) , ( b ) , ( c ) -$ and omissions $- ( d ) -$ that Speechformer does not suffer from while baseline does.
|
| 165 |
+
|
| 166 |
+
been selected to highlight the specific aspects that are better handled by Speechformer.
|
| 167 |
+
|
| 168 |
+
Example $(a)$ exhibits a wrong word ordering present in the baseline output, i.e. it anticipates "für ihre Kinder" (for their kids) with respect to "die richtigen öffentlichen Schulen" (the right public schools). Our proposed architecture, instead, translates the sentence in the correct order, making the translation easier to be read and understood.
|
| 169 |
+
|
| 170 |
+
Example $(b)$ displays that Speechformer shows better punctuation handling, which – we hypothesize – is the result of an improved representation of prosody and pauses. In this example, for instance, our architecture is capable of detecting a question (i.e. So can you help me?) and translating it, while the baseline does not translate the input in question form and omits the last part of the audio content. Listening to the audio, we noticed a long pause after the question. We suppose that this pause led the baseline to conclude the sentence, while Speechformer managed to translate the remaining part of the utterance by going beyond that pause.
|
| 171 |
+
|
| 172 |
+
Our architecture shows an improved encoding of audio features that is reflected in its superior
|
| 173 |
+
|
| 174 |
+
understanding of audio content. This emerges, indeed, from example (c), where the word Platinum is correctly recognized and translated by our system, while the baseline misunderstands and translates it in another word, "Pflanzen" (plants), with a completely different meaning. The better audio understanding of Speechformer is present in example (d) as well. On the contrary, the baseline omits part of the original sentence (i.e. it costs), with a huge impact on the meaning of the resulting sentence, while Speechformer does not lose audio details and produces a complete translation. In this example, we can also notice that our system better solves pronominal resolution as it chooses sie, which follows the grammatical gender and number of Staedten (i.e. plural feminine), while the baseline uses es, which wrongly agrees with das Faszinierende (i.e. singular neuter).
|
| 175 |
+
|
| 176 |
+
# C Effect of Label Smoothing
|
| 177 |
+
|
| 178 |
+
Label smoothing (Szegedy et al., 2016) is a widely adopted regularization factor (Zhang et al., 2021). As such, a more complex architecture that pro
|
| 179 |
+
|
| 180 |
+
<table><tr><td>Model</td><td colspan="2">en-de</td><td colspan="2">en-es</td><td colspan="2">en-nl</td></tr><tr><td>baseline</td><td>21.2</td><td></td><td>26.2</td><td></td><td>25.5</td><td></td></tr><tr><td>+ compression</td><td>21.2</td><td>+0.0</td><td>26.0</td><td>-0.2</td><td>25.1</td><td>-0.4</td></tr><tr><td>Plain ConvAttention</td><td>21.6</td><td>+0.4</td><td>25.6*</td><td>-0.6</td><td>25.6</td><td>+0.1</td></tr><tr><td>Speechformer</td><td>22.3*</td><td>+1.1</td><td>26.7*</td><td>+0.5</td><td>26.2*</td><td>+0.7</td></tr></table>
|
| 181 |
+
|
| 182 |
+
Table 4: BLEU score on three language pairs of MuST-C tst-COMMON. The * symbol indicates statistically significant improvements over the baseline computed with bootstrap resampling (Koehn, 2004) with 10,000 samples, 1,000 sample size and $95\%$ significance level.
|
| 183 |
+
|
| 184 |
+
cesses longer and potentially more redundant inputs – like our proposed Speechformer – can benefit more from its adoption. Hence, to validate that our gains are not due to a better regularization of the models and to assess the effect of label smoothing, we run experiments using the cross entropy loss without smoothing factor. The results are reported in Table 4. Compared with the scores reported in Section 4 of the paper, we can see that label smoothing brings significant gains for all the systems (ranging from 1.5 to 2.0 BLEU points). Most importantly, the improvements of the Speechformer architecture (0.5-1.1 BLEU) are similar to those achieved with label smoothing (0.5-0.8 BLEU). The minimal difference can be explained by statistical variations of the results, considering that those obtained without label smoothing are computed on a single run. We can conclude that these results confirm the efficacy of our architecture and the validity of our experiments, showing that they are not biased by a higher regularization that might favor our solution over the baseline.
|
speechformerreducinginformationlossindirectspeechtranslation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61918619f9686266db1296786ffb9f4d3074a46cf4a3a372051eb53169a6d773
|
| 3 |
+
size 349032
|
speechformerreducinginformationlossindirectspeechtranslation/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7066c89479735781ab7f3bc3d9db622d499f8c4fe5efe92ff6aba75223ea56c6
|
| 3 |
+
size 245901
|
spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8093a4f7e26b3967e6c563c5f0e622b9ad064cef65ef881ad62cd73622e22867
|
| 3 |
+
size 52253
|
spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3661d150a01bee2e35c30d2f84cb998f449be64ab55ac5e5436b7e9855002566
|
| 3 |
+
size 64662
|
spellbertalightweightpretrainedmodelforchinesespellingcheck/f0420c72-b7f2-4e69-a4ce-947b4c2b505a_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee1463d547395898e7cae0166f751d3a24e9188154937ac21731c8a904dc4ff9
|
| 3 |
+
size 501696
|
spellbertalightweightpretrainedmodelforchinesespellingcheck/full.md
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SpellBERT: A Lightweight Pretrained Model for Chinese Spelling Check
|
| 2 |
+
|
| 3 |
+
Tuo Ji, Hang Yan, Xipeng Qiu*
|
| 4 |
+
|
| 5 |
+
School of Computer Science, Fudan University
|
| 6 |
+
|
| 7 |
+
Shanghai Key Laboratory of Intelligent Information Processing, Fudan University
|
| 8 |
+
|
| 9 |
+
{tji19, hyan19, xpqiu}@fudan.edu.cn
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
Chinese Spelling Check (CSC) is to detect and correct Chinese spelling errors. Many models utilize a predefined confusion set to learn a mapping between correct characters and its visually similar or phonetically similar misuses but the mapping may be out-of-domain. To that end, we propose SpellBERT, a pretrained model with graph-based extra features and independent on confusion set. To explicitly capture the two erroneous patterns, we employ a graph neural network to introduce radical and pinyin information as visual and phonetic features. For better fusing these features with character representations, we devise masked language model alike pre-training tasks. With this feature-rich pre-training, SpellBERT with only half size of BERT can show competitive performance and make a state-of-the-art result on the OCR dataset where most of the errors are not covered by the existing confusion set
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
Spelling Check is to detect and correct Chinese spelling errors in sentences. However, it is a nontrivial task for Chinese spelling check because of the nature of ideographic language. Chinese has a large vocabulary including at least 3,500 common characters which leads to huge search space and an unbalanced distribution of errors.
|
| 18 |
+
|
| 19 |
+
Though hard to cover most of the misuses, their patterns could be roughly reduced to visual or phonetic errors (Chang, 1995) as shown in Figure 1. The former type of errors have similar shapes as correct ones and they are often caused by optical character recognition (OCR) or morphology-based input method. The other type of errors have similar pronunciation as original ones and they are usually caused by automatic speech recognition (ASR) or phonetic-based input method.
|
| 20 |
+
|
| 21 |
+
Previous work (Hsieh et al., 2013; Yu and Li, 2014; Wang et al., 2019a; Cheng et al., 2020) tend
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1: The two erroneous patterns. (a) is a phonetic error and its pinyin have overlap with the correct ones. (b) is a visual error and its radicals also have overlap
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
|
| 28 |
+
to employ a predefined confusion set to find and filter correction candidates. Confusion set is constructed by incorrect stats (Liu et al., 2010) and it has a mapping between visually similar pairs and phonetically similar pairs in accord with erroneous patterns. However, these models only learn a shallow mapping from confusion set and their performance is heavily dependent on the quality of confusion set. But it is hard to find an up-to-date and in-domain confusion set.
|
| 29 |
+
|
| 30 |
+
In this paper, we devise two pre-training tasks to model the two aforementioned erroneous patterns explicitly. To model visual errors, we introduce radical features. Chinese characters can be decomposed into various components namely radical. As for phonetic errors, we employ pinyin as features which are descriptions of pronunciation. We fuse these visual and phonetic features with character representations by relational graph convolutional network (Schlichtkrull et al., 2018). Likewise masked language model in BERT (Devlin et al., 2019), we randomly replace some characters and then predict the original visual and phonetic features with false input. Our model, SpellBERT, can intrinsically learn to correct errors based on visual or phonetic patterns rather than simple mapping. On the OCR dataset, where only a few errors are covered by confusion set, we make a state-of-the-art result and this indicates that SpellBERT can generalize well without depending on confusion set.
|
| 31 |
+
|
| 32 |
+
On resource-constrained scenarios for deployment, making a model lightweight is necessary. SpellBERT only has half size of BERT and is more efficient for these scenarios.
|
| 33 |
+
|
| 34 |
+
In summary, SpellBERT is independent on confusion set in training and inference phase. With only half size of BERT, SpellBERT can show competitive performance and generalize well.
|
| 35 |
+
|
| 36 |
+
# 2 Related Work
|
| 37 |
+
|
| 38 |
+
Current methods consider CSC as sequence generation problem or sequence labeling problem. Wang et al. (2019b) introduce copy mechanism to generate corrected sequence. Bao et al. (2020) unify single-character and multi-character correction by a chunk-based generative model.
|
| 39 |
+
|
| 40 |
+
Pretrained models (PTMs) have made a success on sequence labeling tasks (Qiu et al., 2020). Masked language model (MLM) is introduced as pre-training task to predict masked or replaced words conditioned on context. The mode of MLM is intuitively appropriate to be transformed to predict spelling errors and correct them. Significant progress has been made by power of PTM (Hong et al., 2019). Based on MLM, confusion set is applied to narrow search space for predicting correct characters. Cheng et al. (2020) constructed a graph by confusion set to help final prediction. Nguyen et al. (2020) raised an adaptable confusion set but its training process is not end-to-end.
|
| 41 |
+
|
| 42 |
+
Ideally, CSC corpus can be infinitely constructed by replacing words based on confusion set. Wang et al. (2018) generated 270k data by OCR- and ASR-based approaches. Zhang et al. (2020) created 5 million augmented data and Li et al. (2021) created 9 million augmented data by substitution-based method. Zhang et al. (2021) corrupted input sentence by randomly replacing characters with noisy-pinyin and the new pre-training task fitted well for CSC.
|
| 43 |
+
|
| 44 |
+
More recently, some methods also utilized phonetic and visual features in CSC. Liu et al. (2021) employed a GRU(Bahdanau et al., 2014) to encode pinyin sequence and Chinese strokes sequence as extra features. Xu et al. (2021) had similar design but they encoded pictures of characters to get visual features. Huang et al. (2021) enriched character representations by knowledge of audio and visual modalities. Our method is different from all of these work. For phonetic features, we regard pinyin as a whole but not a sequence. For visual features, we used radicals which are higher-level features than strokes. And we incorporate these extra features by graph neural network.
|
| 45 |
+
|
| 46 |
+
# 3 Approach
|
| 47 |
+
|
| 48 |
+
We treat CSC as a sequence labeling problem. An input sequence with $n$ characters is represented as $\mathbf{X} = \{x_{1}, x_{2}, \dots, x_{n}\}$ . Our goal is to transform it into a target sequence $\mathbf{Y} = \{y_{1}, y_{2}, \dots, y_{n}\}$ . During which, incorrect characters will be detected and corrected. Obviously, the input and output share the same vocabulary and most of the output characters can be directly copied from input. The framework of our model is shown in Figure 2. It contains three parts, i.e., a BERT-based encoder, a feature-fusing module and a component for pretraining. We will progressively elaborate our design in detail.
|
| 49 |
+
|
| 50 |
+
# 3.1 An MLM-based Backbone
|
| 51 |
+
|
| 52 |
+
Many attribute the success of BERT (Devlin et al., 2019) to its MLM pre-training task. BERT randomly masked or replaced some tokens and then predict the original tokens. Regarding the masked and replaced tokens as spelling errors, BERT is properly adapted to be a spelling checker. Each input character $x_{i}$ is indexed to its embedding representation $\mathbf{e}_i$ by the BERT-embedding-layer. Then $\mathbf{e}_i$ will be passed to BERT-encoder-layers to get a representation $\mathbf{h}_i$ as follows:
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\mathbf {e} _ {i} = \operatorname {B E R T E m b e d d i n g} (\mathbf {x} _ {i}), \tag {1}
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\mathbf {h} _ {i} = \operatorname {B E R T E n c o d e r} \left(\mathbf {e} _ {i}\right), \tag {2}
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $\mathbf{e}_i, \mathbf{h}_i \in \mathbb{R}^{1 \times d}$ and $d$ is the hidden dimension. After that, the $\mathbf{h}_i$ will be computed similarities with all character embeddings to get a predicted distribution $\hat{\mathbf{y}}_i$ over vocabulary as follows:
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\hat {\mathbf {y}} _ {\mathbf {i}} = \operatorname {S o f t m a x} \left(\mathbf {h} _ {i} \mathbf {E} ^ {T}\right), \tag {3}
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
where $\mathbf{E} \in \mathbb{R}^{V \times d}$ ; $\hat{\mathbf{y}}_{\mathbf{i}} \in \mathbb{R}^{1 \times V}$ and $V$ is the vocabulary size. Here $\mathbf{E}$ refers to the BERT-embedding-layer and the $\mathrm{i}_{\mathrm{th}}$ row of $\mathbf{E}$ corresponds to $\mathbf{e}_i$ in Equation 1. Finally we use the character $x_{k}$ as the correction result for $x_{i}$ whose $\mathbf{e}_k$ has the highest similarity with $\mathbf{h}_i$ .
|
| 69 |
+
|
| 70 |
+
# 3.2 Fusing Visual and Phonetic Features
|
| 71 |
+
|
| 72 |
+
The above backbone lacks special modeling for this task. Chinese spelling errors can be roughly classified into two patterns. Visual errors have similar shapes as correct characters while phonetic errors have similar pronunciation. Some work utilize an external confusion set that has predefined mappings between visually similar pairs and phonetically similar pairs (Yu and Li, 2014; Wang et al.,
|
| 73 |
+
|
| 74 |
+

|
| 75 |
+
Figure 2: The architecture of SpellBERT. Green denotes correct characters while red denotes errors. Pinyin and radical features are fused by graph and then passed to a 4-layer BERT. We expect the model to do MLM, pinyin prediction and radical prediction of correct characters with false input.
|
| 76 |
+
|
| 77 |
+
2019a; Cheng et al., 2020). These models relied on confusion set to filter candidates but the confusion set might be out-of-date or out-of-domain.
|
| 78 |
+
|
| 79 |
+
To model the two erroneous patterns, we infuse character representations $\mathbf{e}_i$ with visual and phonetic features by incorporating radical and pinyin information. Chinese characters can be decomposed into components namely radicals and visual errors often have overlap radicals with the correct character. Pinyin is a sequence of pronunciation descriptions for Chinese characters and phonetic errors often have overlap pinyin. Based on the extra features, our model can automatically learn visually similar and phonetically similar mappings.
|
| 80 |
+
|
| 81 |
+
We employ a relational graph convolutional network (Schlichtkrull et al., 2018) short as R-GCN to infill multiple types of features into character representations $\mathbf{e}_i$ in Equation 1. We view characters as nodes and input sequence $\mathbf{X}$ can be organized as a line graph naturally. Both radicals and pinyin are viewed as nodes of graph as well. If a radical or pinyin belong to a certain character, we construct connections between them as edges. We regard these connections as different depending on the pair of nodes between them. Besides,
|
| 82 |
+
|
| 83 |
+
we construct edges between neighboring characters because local context information is beneficial for better-incorporating pinyin and radical features. As a result, We define the following types of edges:
|
| 84 |
+
|
| 85 |
+
- An edge between a character and a radical
|
| 86 |
+
- An edge between a character and a pinyin
|
| 87 |
+
- An edge between a character and a neighboring character within a fixed-length context
|
| 88 |
+
- An edge between a character and itself
|
| 89 |
+
|
| 90 |
+
We initialize feature of character-node by character-embedding $\mathbf{e}_i$ in Euqation 1. To represent and update features of radical-node and pinyin-node, we also construct an extra embedding table which is initialized by averaging their most related character-embeddings. As shown in Figure 2, these features diffuse on a relational graph as following:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\hat {\mathbf {e}} _ {i} = \sigma \left(\sum_ {r \in \mathcal {R}} \sum_ {j \in \mathcal {N} _ {i} ^ {r}} \frac {1}{c _ {i , r}} \mathbf {W} _ {r} \mathbf {e} _ {j} + \mathbf {W} _ {0} \mathbf {e} _ {i}\right), \tag {4}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $\mathbf{e}_i$ means character-embedding of $x_{i}$ and $\mathbf{e}_j$ means feature of connected node j; $r$ denotes the type of edge; $\mathcal{N}_i^r$ refers to the set of connected nodes for edge type $r$ ; $\mathbf{W}_r$ is the transformation layer of edge type $r$ and $\mathbf{c}_{i,r}$ is a problem-specific normalization constant which is set as $|\mathcal{N}_i^{\mathrm{r}}|$ here. The final $\hat{\mathbf{e}}_i$ can be viewed as character representation enhanced by radical and pinyin information. Finally, we combine enhanced representation and original character-embedding and Equation 3 can be updated as following:
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\mathbf {h} _ {i} = \operatorname {B E R T E n c o d e r} \left(\mathbf {e} _ {i} + \hat {\mathbf {e}} _ {i}\right), \tag {5}
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
where $\mathbf{h}_i$ denote the final representation of each character.
|
| 103 |
+
|
| 104 |
+
# 3.3 Enhanced Pretraining Tasks for CSC
|
| 105 |
+
|
| 106 |
+
It has been shown that external information can be better integrated into BERT by pre-training alike tasks (Peters et al., 2019; Zhang et al., 2019; Sun et al., 2020; Ma et al., 2020). Considering the radical and pinyin features are externally added by design, we devise two more pre-training alike tasks which are radical prediction and pinyin prediction.
|
| 107 |
+
|
| 108 |
+
In MLM, Devlin et al. (2019) randomly masked a percentage of input tokens and then predict these tokens. In radical and pinyin prediction, we randomly mask connections from characters to their radicals and pinyin and then predict the masked
|
| 109 |
+
|
| 110 |
+
connections. Through reconstructing connections, the model can learn a better representation that contains not only contextual information but also visual and phonetic information.
|
| 111 |
+
|
| 112 |
+
Same as MLM, we randomly choose $15\%$ of characters to process. If a character is chosen, our potential practices are shown below:
|
| 113 |
+
|
| 114 |
+
- Keep it unchanged $10\%$ of the time. Then predict the character itself, its radicals, and its pinyin. This is to match downstream fin-tuning where each character can directly see all of its radicals and pinyin.
|
| 115 |
+
- Replace it with [MASK] $60\%$ of the time and mask all of its connections with a probability of $80\%$ . Then predict the masked character and the masked connections.
|
| 116 |
+
- Replace it with a confusing word sampled from confusion set $30\%$ of the time and mask all of its connections with a probability of $80\%$ . Then predict the original character and its connections. This is to force our model to correct characters based on false radicals and pinyin of errors. Note that we only use confusion set in this stage to construct misspellings.
|
| 117 |
+
|
| 118 |
+
In our graph, edges have no representations and the graph is utilized only between BERT-embedding-layer and BERT-encoder-layers. So we transform the task of edge-prediction into token-classification. For each character $\mathbf{x}_i$ , we take one of its pinyin and radicals as ground-truth and negatively sample other pinyin and radicals that do not belong to the character. We use feature-embeddings of these pinyin and radicals as a classified layer to compute their similarities with $\mathbf{h}_i$ from BERT-encoder-layer in Equation 2. Related embeddings will be drawn close to each other, and unrelated embeddings will be pulled away from each other.
|
| 119 |
+
|
| 120 |
+
# 3.4 Reducing Parameters
|
| 121 |
+
|
| 122 |
+
Given the need of computational efficiency for deployment, it is necessary to get a lightweight model. We only use 4 layers of BERT to initialize, pre-train, and fine-tune our model and which reduces the total number of parameters from $110\mathrm{M}$ to $55\mathrm{M}$ . We also measure the inference speed of our lightweight model and the experiments result show that it has better time-efficiency compared with a 12-layer BERT.
|
| 123 |
+
|
| 124 |
+
# 4 Experiments
|
| 125 |
+
|
| 126 |
+
# 4.1 Pre-training Setup
|
| 127 |
+
|
| 128 |
+
We use BERT (Devlin et al., 2019) base as initialization and only the first 4 layers are utilized. Our model is implemented by PyTorch (Paszke et al., 2019) and DGL (Wang et al., 2019c). We randomly select 1M sentences provided by Xu (2019) as pretraining corpus and pad the sentences to a max length of 128. We set the learning rate as 5e-5, batch size as 1024, and pre-train 10K steps on 4 RTX 3090 for around 2 days.
|
| 129 |
+
|
| 130 |
+
# 4.2 Dataset and Fine-tuning Setup
|
| 131 |
+
|
| 132 |
+
We conduct CSC experiments on three widely used datasets SIGHAN14 (Yu et al., 2014), SIGHAN15 (Tseng et al., 2015), OCR (Hong et al., 2019) and mark them as $\mathrm{csc}_{14}$ , $\mathrm{csc}_{15}$ andOCR.
|
| 133 |
+
|
| 134 |
+
The original corpus of $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ was collected from essays written by learners of Chinese as a foreign language and it was in Traditional Chinese. Wang et al. (2019a), Zhang et al. (2020), and Nguyen et al. (2020) transformed it into Simplified Chinese and used augmented data provided by Wang et al. (2018). Because our pre-training corpus was in Simplified Chinese, we use the latter setting. We directly use the corpus provided by Cheng et al. (2020). Under this setting, the training set of $\mathrm{csc}_{14}$ , $\mathrm{csc}_{15}$ and the augmented data provided by Wang et al. (2018) are combined as a new training set. We fine-tune our model on the test set of $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ separately.
|
| 135 |
+
|
| 136 |
+
ocr is a Simplified Chinese dataset of which the sentences are much shorter and extracted from the entertainment domain. We only use the data fromOCR to train and test and it has 4575 sentences in total.
|
| 137 |
+
|
| 138 |
+
For different datasets, we find the following ranges of hyperparameters work well: the batch size is set to among $\{32, 64\}$ , the learning rate is set to among $\{1e-5, 2e-5, 3e-5\}$ and the number of epochs is ranging from 5 to 20.
|
| 139 |
+
|
| 140 |
+
On $\csc_{14}$ and $\csc_{15}$ , we evaluate our model in sentence-level by the official tool (Tseng et al., 2015). And onOCR, the metric is in edit-level by a different official tool (Wu et al., 2013).
|
| 141 |
+
|
| 142 |
+
# 4.3 Results and Analysis
|
| 143 |
+
|
| 144 |
+
Main Results As shown in Table 1, we compare SpellBERT with recent work and a 4-layer BERT baseline. All of them are BERT-based which means that their number of parameters are at least twice
|
| 145 |
+
|
| 146 |
+
<table><tr><td rowspan="3">Model</td><td colspan="9">Detection Level</td><td colspan="8">Correction Level</td><td></td></tr><tr><td colspan="3">ocr</td><td colspan="3">csc14</td><td colspan="3">csc15</td><td colspan="3">ocr</td><td colspan="3">csc14</td><td colspan="2">csc15</td><td></td></tr><tr><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>Nguyen et al. (2020) (BERT 12 layers)</td><td>-</td><td>-</td><td>-</td><td>82.5</td><td>61.6</td><td>70.5</td><td>84.5</td><td>71.8</td><td>77.6</td><td>-</td><td>-</td><td>-</td><td>82.1</td><td>60.2</td><td>69.4</td><td>84.2</td><td>70.2</td><td>76.5</td></tr><tr><td>Bao et al. (2020) (BERT 12 layers)</td><td>77.6</td><td>63.3</td><td>69.7</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>46.5</td><td>37.9</td><td>41.7</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Cheng et al. (2020) (BERT 12 layers)</td><td>-</td><td>-</td><td>-</td><td>83.1</td><td>69.5</td><td>75.7</td><td>85.9</td><td>80.6</td><td>83.1</td><td>-</td><td>-</td><td>-</td><td>82.8</td><td>67.8</td><td>74.5</td><td>85.4</td><td>77.6</td><td>81.3</td></tr><tr><td>BERT (4 layers)</td><td>67.8</td><td>35.2</td><td>46.4</td><td>82.6</td><td>59.0</td><td>68.8</td><td>85.2</td><td>68.9</td><td>76.2</td><td>43.2</td><td>22.4</td><td>29.5</td><td>82.4</td><td>58.0</td><td>68.1</td><td>84.8</td><td>66.9</td><td>74.8</td></tr><tr><td>SpellBERT (4 layers)</td><td>83.5</td><td>60.4</td><td>70.1</td><td>83.1</td><td>62.0</td><td>71.0</td><td>87.5</td><td>73.6</td><td>80.0</td><td>66.0</td><td>47.7</td><td>55.4</td><td>82.9</td><td>61.2</td><td>70.4</td><td>87.1</td><td>71.5</td><td>78.5</td></tr><tr><td>w/o graph</td><td>81.2</td><td>61.4</td><td>69.9</td><td>81.8</td><td>62.0</td><td>70.5</td><td>87.8</td><td>73.1</td><td>79.8</td><td>61.1</td><td>46.2</td><td>52.6</td><td>81.5</td><td>60.5</td><td>69.4</td><td>87.5</td><td>71.1</td><td>78.4</td></tr><tr><td>w/o pre-training</td><td>67.6</td><td>36.1</td><td>47.1</td><td>81.3</td><td>60.5</td><td>69.3</td><td>86.4</td><td>70.7</td><td>77.8</td><td>51.7</td><td>27.6</td><td>36.0</td><td>81.0</td><td>59.3</td><td>68.5</td><td>86.0</td><td>68.0</td><td>75.9</td></tr></table>
|
| 147 |
+
|
| 148 |
+
Table 1: Results in detection-level and correction-level. For baselines, we use their reported results. Hong et al. (2019) and Bao et al. (2020) used the Traditional Chinese corpus on $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ , and which makes their results incomparable to ours.
|
| 149 |
+
|
| 150 |
+
<table><tr><td>Dataset</td><td>Noises</td><td>Errors covered by confusion sets</td></tr><tr><td>ocr test</td><td>0/1000 (0%)</td><td>302/1303 (23.2%)</td></tr><tr><td>csc14test</td><td>16/1062 (1.5%)</td><td>663/792 (83.7%)</td></tr><tr><td>csc15test</td><td>10/1100 (0.9%)</td><td>605/715 (84.6%)</td></tr></table>
|
| 151 |
+
|
| 152 |
+
as many as ours. However, by fusing pinyin and radical features and the feature-rich pre-training, SpellBERT still has the best performance on the OCR dataset. Compared with Nguyen et al. (2020), our work has better results on both $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ . However, there is still a gap between SpellBERT and SpellGCN (Cheng et al., 2020) which means that our devised extra modules can not completely make up for the reduced size of model.
|
| 153 |
+
|
| 154 |
+
Effectiveness of Modules We also remove graph and pre-training stage respectively to test their effectiveness. The results showed that pre-training can generally bring significant improvements on all datasets which suggests that pre-training is an effective way on CSC. The contribution of the graph mechanism is not that impressive but this makes it possible to only transfer our encoder parameters to other architectures.
|
| 155 |
+
|
| 156 |
+
Impact of Confusion Set Notice that our improvements over previous work are more obvious onOCR than that on $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ . Firstly, there are inevitable noises when converting data into Simplified Chinese and the noisy ratio is $1.5\%$ and $0.9\%$ for $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ . The other reason is that previous work such as Nguyen et al. (2020) and Bao et al. (2020) relied on confusion set to filter candidates. $83.7\%$ and $84.6\%$ of test errors in $\mathrm{csc}_{14}$ and $\mathrm{csc}_{15}$ are covered by confusion set which is an ideal and infrequent situation. OnOCR which has much fewer errors covered by confusion set, they
|
| 157 |
+
|
| 158 |
+
Table 2: Stats of datasets. Noises denote the noisy data when converting data to Simplified Chinese. The rightmost column refers to the number of errors covered by confusion set (Wu et al., 2013) on test data
|
| 159 |
+
|
| 160 |
+
<table><tr><td rowspan="2">Dataset</td><td rowspan="2">Ave Length</td><td colspan="2">Time per Sent</td><td rowspan="2">Speedup</td></tr><tr><td>Ours</td><td>12-layer BERT</td></tr><tr><td>ocr test</td><td>10.2</td><td>48</td><td>76</td><td>1.58x</td></tr><tr><td>csc14test</td><td>50.0</td><td>98</td><td>153</td><td>1.56x</td></tr><tr><td>csc15test</td><td>30.6</td><td>77</td><td>119</td><td>1.54x</td></tr></table>
|
| 161 |
+
|
| 162 |
+
Table 3: Speed comparison (ms/sentence). Preprocessing time is excluded. We set batch size as 1 and do experiments on 4 cores of a Intel(R) Xeon(R) Silver 4114T CPU following Hong et al. (2019).
|
| 163 |
+
|
| 164 |
+
naturally performed worse.
|
| 165 |
+
|
| 166 |
+
OnOCR, confusion set can simply cover $23.2\%$ of errors and the average length of sentences are much shorter. The confusion set can be viewed as out-of-domain onOCR. SpellBERT substantially improves the performance on this dataset which indicates that SpellBERT can generalize well on different corpus without dependence on confusion set. The ablation studies further demonstrate that our proposed modules help deal with unseen errors.
|
| 167 |
+
|
| 168 |
+
Efficiency Analysis With only half the number of parameters of a 12-layer BERT, SpellBERT has the best space efficiency compared to BERT-based work. To verify time efficiency, we incorporate a speed measure in terms of absolute time consumption per sentence mentioned in Hong et al. (2019). Results in Table 3 indicate that SpellBERT can speed up at least 1.5 times.
|
| 169 |
+
|
| 170 |
+
# 5 Conclusion
|
| 171 |
+
|
| 172 |
+
In this work, we propose a lightweight pretrained model, SpellBERT, for Chinese spelling check. We incorporate pinyin and radicals as phonetic and visual features and design two pre-training tasks to encourage the pre-trained model to explicitly capture erroneous patterns. Experiments show that SpellBERT has competitive performance compared to the large pretrained models. Besides, SpellBERT can be directly used without confusion set in the fine-tuning and inference phase, which is more
|
| 173 |
+
|
| 174 |
+
convenient to use and easier to deal with the errors uncovered by the existing confusion sets.
|
| 175 |
+
|
| 176 |
+
# Acknowledgement
|
| 177 |
+
|
| 178 |
+
This work was supported by the National Key Research and Development Program of China (No. 2020AAA0108702) and National Natural Science Foundation of China (No. 62022027).
|
| 179 |
+
|
| 180 |
+
# References
|
| 181 |
+
|
| 182 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473.
|
| 183 |
+
Zuyi Bao, Chen Li, and Rui Wang. 2020. Chunk-based chinese spelling check with global optimization. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings, EMNLP 2020, Online Event, 16-20 November 2020, pages 2031-2040. Association for Computational Linguistics.
|
| 184 |
+
Chao-Huang Chang. 1995. A new approach for automatic chinese spelling correction. In Proceedings of Natural Language Processing Pacific Rim Symposium, volume 95, pages 278-283. CiteSeer.
|
| 185 |
+
Xingyi Cheng, Weidi Xu, Kunlong Chen, Shaohua Jiang, Feng Wang, Taifeng Wang, Wei Chu, and Yuan Qi. 2020. Spellgen: Incorporating phonological and visual similarities into language models for Chinese spelling check. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 871-881. Association for Computational Linguistics.
|
| 186 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pages 4171-4186. Association for Computational Linguistics.
|
| 187 |
+
Yuzhong Hong, Xianguo Yu, Neng He, Nan Liu, and Junhui Liu. 2019. Faspell: A fast, adaptable, simple, powerful chinese spell checker based on dae-decoder paradigm. In Proceedings of the 5th Workshop on Noisy User-generated Text, W-NUT@EMNLP 2019, Hong Kong, China, November 4, 2019, pages 160-169. Association for Computational Linguistics.
|
| 188 |
+
Yu-Ming Hsieh, Ming-Hong Bai, and Keh-Jiann Chen. 2013. Introduction to CKIP chinese spelling check system for SIGHAN bakeoff 2013 evaluation. In Proceedings of the Seventh SIGHAN Workshop on Chinese Language Processing, SIGHAN@IJCNLP
|
| 189 |
+
|
| 190 |
+
2013, Nagoya, Japan, October 14-18, 2013, pages 59-63. Asian Federation of Natural Language Processing.
|
| 191 |
+
Li Huang, Junjie Li, Weiwei Jiang, Zhiyu Zhang, Minchuan Chen, Shaojun Wang, and Jing Xiao. 2021. PHMOSpell: Phonological and morphological knowledge guided Chinese spelling check. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 5958-5967, Online. Association for Computational Linguistics.
|
| 192 |
+
Chong Li, Cenyuan Zhang, Xiaoqing Zheng, and Xuanjing Huang. 2021. Exploration and exploitation: Two ways to improve Chinese spelling correction models. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 441-446, Online. Association for Computational Linguistics.
|
| 193 |
+
Chao-Lin Liu, Min-Hua Lai, Yi-Hsuan Chuang, and Chia-Ying Lee. 2010. Visually and phonologically similar characters in incorrect simplified chinese words. In COLING 2010, 23rd International Conference on Computational Linguistics, Posters Volume, 23-27 August 2010, Beijing, China, pages 739-747. Chinese Information Processing Society of China.
|
| 194 |
+
Shulin Liu, Tao Yang, Tianchi Yue, Feng Zhang, and Di Wang. 2021. PLOME: Pre-training with misspelled knowledge for Chinese spelling correction. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 2991-3000, Online. Association for Computational Linguistics.
|
| 195 |
+
Wentao Ma, Yiming Cui, Chenglei Si, Ting Liu, Shijin Wang, and Guoping Hu. 2020. Charbert: Character-aware pre-trained language model. In Proceedings of the 28th International Conference on Computational Linguistics, COLING 2020, Barcelona, Spain (Online), December 8-13, 2020, pages 39-50. International Committee on Computational Linguistics.
|
| 196 |
+
Minh Nguyen, Gia H. Ngo, and Nancy F. Chen. 2020. Adaptable filtering using hierarchical embeddings for chinese spell check. CoRR, abs/2008.12281.
|
| 197 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing
|
| 198 |
+
|
| 199 |
+
Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 8024-8035.
|
| 200 |
+
Matthew E. Peters, Mark Neumann, Robert L. Logan IV, Roy Schwartz, Vidur Joshi, Sameer Singh, and Noah A. Smith. 2019. Knowledge enhanced contextual word representations. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pages 43-54. Association for Computational Linguistics.
|
| 201 |
+
Xipeng Qiu, TianXiang Sun, Yige Xu, Yunfan Shao, Ning Dai, and Xuanjing Huang. 2020. Pre-trained models for natural language processing: A survey. _SCIENCE CHINA Technological Sciences_, 63(10):1872-1897.
|
| 202 |
+
Michael Sejr Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. 2018. Modeling relational data with graph convolutional networks. In *The Semantic Web - 15th International Conference*, ESWC 2018, Heraklion, Crete, Greece, June 3-7, 2018, Proceedings, volume 10843 of Lecture Notes in Computer Science, pages 593-607. Springer.
|
| 203 |
+
Tianxiang Sun, Yunfan Shao, Xipeng Qiu, Qipeng Guo, Yaru Hu, Xuanjing Huang, and Zheng Zhang. 2020. Colake: Contextualized language and knowledge embedding. In Proceedings of the 28th International Conference on Computational Linguistics, COLING 2020, Barcelona, Spain (Online), December 8-13, 2020, pages 3660-3670. International Committee on Computational Linguistics.
|
| 204 |
+
Yuen-Hsien Tseng, Lung-Hao Lee, Li-Ping Chang, and Hsin-Hsi Chen. 2015. Introduction to SIGHAN 2015 bake-off for chinese spelling check. In Proceedings of the Eighth SIGHAN Workshop on Chinese Language Processing, SIGHAN@IJCNLP 2015, Beijing, China, July 30-31, 2015, pages 32-37. Association for Computational Linguistics.
|
| 205 |
+
Dingmin Wang, Yan Song, Jing Li, Jialong Han, and Haisong Zhang. 2018. A hybrid approach to automatic corpus generation for chinese spelling check. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pages 2517-2527. Association for Computational Linguistics.
|
| 206 |
+
Dingmin Wang, Yi Tay, and Li Zhong. 2019a. Confusionset-guided pointer networks for Chinese spelling check. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5780-5785.
|
| 207 |
+
Dingmin Wang, Yi Tay, and Li Zhong. 2019b. Confusionset-guided pointer networks for chinese
|
| 208 |
+
|
| 209 |
+
spelling check. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28-August 2, 2019, Volume 1: Long Papers, pages 5780-5785. Association for Computational Linguistics.
|
| 210 |
+
Minjie Wang, Lingfan Yu, Da Zheng, Quan Gan, Yu Gai, Zihao Ye, Mufei Li, Jinjing Zhou, Qi Huang, Chao Ma, Ziyue Huang, Qipeng Guo, Hao Zhang, Haibin Lin, Junbo Zhao, Jinyang Li, Alexander J. Smola, and Zheng Zhang. 2019c. Deep graph library: Towards efficient and scalable deep learning on graphs. CoRR, abs/1909.01315.
|
| 211 |
+
Shih-Hung Wu, Chao-Lin Liu, and Lung-Hao Lee. 2013. Chinese spelling check evaluation at SIGHAN bake-off 2013. In Proceedings of the Seventh SIGHAN Workshop on Chinese Language Processing, SIGHAN@IJCNLP 2013, Nagoya, Japan, October 14-18, 2013, pages 35-42. Asian Federation of Natural Language Processing.
|
| 212 |
+
Bright Xu. 2019. Nlp chinese corpus: Large scale chinese corpus for nlp.
|
| 213 |
+
Heng-Da Xu, Zhongli Li, Qingyu Zhou, Chao Li, Zizhen Wang, Yunbo Cao, Heyan Huang, and XianLing Mao. 2021. Read, listen, and see: Leveraging multimodal information helps Chinese spell checking. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 716-728, Online. Association for Computational Linguistics.
|
| 214 |
+
Junjie Yu and Zhenghua Li. 2014. Chinese spelling error detection and correction based on language model, pronunciation, and shape. In Proceedings of The Third CIPS-SIGHAN Joint Conference on Chinese Language Processing, Wuhan, China, October 20-21, 2014, pages 220-223. Association for Computational Linguistics.
|
| 215 |
+
Liang-Chih Yu, Lung-Hao Lee, Yuen-Hsien Tseng, and Hsin-Hsi Chen. 2014. Overview of SIGHAN 2014 bake-off for chinese spelling check. In Proceedings of The Third CIPS-SIGHAN Joint Conference on Chinese Language Processing, Wuhan, China, October 20-21, 2014, pages 126-132. Association for Computational Linguistics.
|
| 216 |
+
Ruiqing Zhang, Chao Pang, Chuanqiang Zhang, Shuo-huan Wang, Zhongjun He, Yu Sun, Hua Wu, and Haifeng Wang. 2021. Correcting Chinese spelling errors with phonetic pre-training. In Findings of the Association for Computational Linguistics: ACLIJCNLP 2021, pages 2250-2261, Online. Association for Computational Linguistics.
|
| 217 |
+
Shaohua Zhang, Haoran Huang, Jicong Liu, and Hang Li. 2020. Spelling error correction with soft-masked BERT. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 882-890. Association for Computational Linguistics.
|
| 218 |
+
|
| 219 |
+
Zhengyan Zhang, Xu Han, Zhiyuan Liu, Xin Jiang, Maosong Sun, and Qun Liu. 2019. ERNIE: enhanced language representation with informative entities. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pages 1441-1451. Association for Computational Linguistics.
|
spellbertalightweightpretrainedmodelforchinesespellingcheck/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43ed3a2fc496adbf9fe48fc941e71f3c5919dbd7377dda00f163097171ceab31
|
| 3 |
+
size 223383
|
spellbertalightweightpretrainedmodelforchinesespellingcheck/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fbb81df53a6f14bbad4447dd5552497f3eabb01e33d38169d690e78b46598521
|
| 3 |
+
size 262221
|
stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2fb0e08ed5f4703b7c30530d3395cdca5fb4c61d706c4d7342a52d7bc8ae0f92
|
| 3 |
+
size 103822
|
stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:671d413837e784938cb3fe951e69d8ab4d619b9eeec67c9c958f4adc2847d8e0
|
| 3 |
+
size 127528
|
stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/44c1324a-af57-40d0-b544-4b6b3ed17ca3_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b291161ed66d3e85fa6195df89ff19e24fd77efcdaa73dd8d8a7caa37be79bf0
|
| 3 |
+
size 15921518
|
stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/full.md
ADDED
|
@@ -0,0 +1,449 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stepmothers are mean and academics are pretentious: What do pretrained language models learn about you?
|
| 2 |
+
|
| 3 |
+
Rochelle Choenni
|
| 4 |
+
|
| 5 |
+
University of Amsterdam
|
| 6 |
+
|
| 7 |
+
r.m.v.k.choenni@uva.nl
|
| 8 |
+
|
| 9 |
+
Ekaterina Shutova
|
| 10 |
+
|
| 11 |
+
University of Amsterdam
|
| 12 |
+
|
| 13 |
+
e.shutova@uva.nl
|
| 14 |
+
|
| 15 |
+
Robert van Rooij
|
| 16 |
+
|
| 17 |
+
University of Amsterdam
|
| 18 |
+
|
| 19 |
+
r.a.m.vanrooij@uva.nl
|
| 20 |
+
|
| 21 |
+
# Abstract
|
| 22 |
+
|
| 23 |
+
Warning: this paper contains content that may be offensive or upsetting.
|
| 24 |
+
|
| 25 |
+
In this paper, we investigate what types of stereotypical information are captured by pretrained language models. We present the first dataset comprising stereotypical attributes of a range of social groups and propose a method to elicit stereotypes encoded by pretrained language models in an unsupervised fashion. Moreover, we link the emergent stereotypes to their manifestation as basic emotions as a means to study their emotional effects in a more generalized manner. To demonstrate how our methods can be used to analyze emotion and stereotype shifts due to linguistic experience, we use fine-tuning on news sources as a case study. Our experiments expose how attitudes towards different social groups vary across models and how quickly emotions and stereotypes can shift at the fine-tuning stage.
|
| 26 |
+
|
| 27 |
+
# 1 Introduction
|
| 28 |
+
|
| 29 |
+
Pretraining strategies for large-scale language models (LMs) require unsupervised training on large amounts of human generated text data. While highly successful, these methods come at the cost of interpretability as it has become increasingly unclear what relationships they capture. Yet, as their presence in society increases, so does the importance of recognising the role they play in perpetuating social biases. In this regard, Bolukbasi et al. (2016) first discovered that contextualized word representations reflect gender biases captured in the training data. What followed was a suite of studies that aimed to quantify and mitigate the effect of harmful social biases in word (Caliskan et al., 2017) and sentence encoders (May et al., 2019). Despite these studies, it has remained difficult to define what constitutes "bias", with most work focusing on "gender bias" (Manela et al., 2021; Sun et al., 2019) or "racial bias" (Davidson et al., 2019;
|
| 30 |
+
|
| 31 |
+
Sap et al., 2019). More broadly, biases in the models can comprise a wide range of harmful behaviors that may affect different social groups for various reasons (Blodgett et al., 2020).
|
| 32 |
+
|
| 33 |
+
In this work, we take a different focus and study stereotypes that emerge within pretrained LMs instead. While bias is a personal preference that can be harmful when the tendency interferes with the ability to be impartial, stereotypes can be defined as a preconceived idea that (incorrectly) attributes general characteristics to all members of a group. While the two concepts are closely related i.e., stereotypes can evoke new biases or reinforce existing ones, stereotypical thinking appears to be a crucial part of human cognition that often emerges implicitly (Hinton, 2017). Hinton (2017) argued that implicit stereotypical associations are established through Bayesian principles, where the experience of their prevalence in the world of the perceiver causes the association. Thus, as stereotypical associations are not solely reflections of cognitive bias but also stem from real data, we suspect that our models, like human individuals, pick up on these associations. This is particularly true given that their knowledge is largely considered to be a reflection of the data they are trained on. Yet, while we consider stereotypical thinking to be a natural side-effect of learning, it is still important to be aware of the stereotypes that models encode. Psychology studies show that beliefs about social groups are transmitted and shaped through language (Maass, 1999; Beukeboom and Burgers, 2019). Thus, specific lexical choices in downstream applications not only reflect the model's attitude towards groups but may also influence the audience's reaction to it, thereby inadvertently propagating the stereotypes they capture (Park et al., 2020).
|
| 34 |
+
|
| 35 |
+
Studies focused on measuring stereotypes in pretrained models have thus far taken supervised approaches, relying on human knowledge of common stereotypes about (a smaller set of) social groups
|
| 36 |
+
|
| 37 |
+
(Nadeem et al., 2020; Nangia et al., 2020). This, however, bears a few disadvantages: (1) due to the implicit nature of stereotypes, human defined examples can only expose a subset of popular stereotypes, but will omit those that human annotators are unaware of (e.g. models might encode stereotypes that are not as prevalent in the real world); (2) stereotypes vary considerably across cultures (Dong et al., 2019), meaning that the stereotypes tested for will heavily depend on the annotator's cultural frame of reference; (3) stereotypes constantly evolve, making supervised methods difficult to maintain in practice. Therefore, similar to Field and Tsvetkov (2020), we advocate the need for implicit approaches to expose and quantify bias and stereotypes in pretrained models.
|
| 38 |
+
|
| 39 |
+
We present the first dataset of stereotypical attributes of a wide range of social groups, comprising $\sim 2\mathrm{K}$ attributes in total. Furthermore, we propose a stereotype elicitation method that enables the retrieval of salient attributes of social groups encoded by state-of-the-art LMs in an unsupervised manner. We use this method to test the extent to which models encode the human stereotypes captured in our dataset. Moreover, we are the first to demonstrate how training data at the fine-tuning stage can directly affect stereotypical associations within the models. In addition, we propose a complementary method to study stereotypes in a more generalized way through the use of emotion profiles, and systematically compare the emerging emotion profiles for different social groups across models. We find that all models vary considerably in the information they encode, with some models being overall more negatively biased while others are mostly positive instead. Yet, in contrast to previous work, this study is not meant to advocate the need for debiasing. Instead, it is meant to expose varying implicit stereotypes that different models incorporate and to bring awareness to how quickly attitudes towards groups change based on contextual differences in the training data used both at the pretraining and fine-tuning stage.
|
| 40 |
+
|
| 41 |
+
# 2 Related work
|
| 42 |
+
|
| 43 |
+
Previous work on stereotypes While studies that explicitly focus on stereotypes have remained limited in NLP, several works on bias touch upon this topic (Blodgett et al., 2020). This includes, for instance, studying specific phenomena such as the infamous 'Angry Black Woman' stereotype and the 'double bind' (Heilman et al., 2004) theory (Kir
|
| 44 |
+
|
| 45 |
+
itchenko and Mohammad, 2018; May et al., 2019; Tan and Celis, 2019), or relating model predictions to gender stereotype lexicons (Field and Tsvetkov, 2020). To the best of our knowledge, Nadeem et al. (2020); Nangia et al. (2020) and Manela et al. (2021) are the first to explicitly study stereotypes in pretrained sentence encoders. While Manela et al. (2021) focus on gender stereotypes using the Winobias dataset (Zhao et al., 2018), the other works propose new crowdsourced datasets (i.e. StereoSet and Crowspair) with stereotypes that cover a wide range of social groups. All datasets, however, have a similar set-up: they contain pairs of sentences of which one is more stereotypical than the other. Working in the language modeling framework, they evaluated whether the model "prefers" the stereotypical sentence over the anti-stereotypical one. In contrast, we propose a different experimental setup and introduce a new dataset that leverages search engines' autocomplete suggestions for the acquisition of explicit stereotypical attributes. Instead of indirectly uncovering stereotypes through comparison, our elicitation method directly retrieves salient attributes encoded in the models. Our technique is inspired by Kurita et al. (2019), but while they measure the LM probability for completing sentences with the pronouns she and he specifically, we study the top $k$ salient attributes without posing any restrictions on what these could be. Moreover, we are the first to include both monolingual and multilingual models in our analysis.
|
| 46 |
+
|
| 47 |
+
Stereotype-driven emotions Stereotypes are constantly changing and identifying negative ones in particular, is an inherently normative process. While some stereotypes clearly imply disrespect (e.g., women are incompetent), others emerge from excessive competence instead (e.g., Asians are good at math). Moreover, stereotypical content is heavily influenced by the social pressures of society at the time. Cuddy et al. (2009) argue that no stereotype remains stable and predictable from theoretical principles. Hence, many social psychologists have abandoned the study of stereotype content to focus on systematic principles that generalize across different specific instances of stereotypes instead, presumably making them more stable over time and place (Cuddy et al., 2009; Mackie et al., 2000; Weiner, 1993). Similarly, we explore a more robust approach to uncovering stereotypes in pretrained LMs by studying how stereotypes are more generally manifested as varying emotion profiles in
|
| 48 |
+
|
| 49 |
+
<table><tr><td>Search query</td><td>Category</td><td>Social group</td><td>Stereotypical attributes</td><td>Search engine</td></tr><tr><td>Why are black people so</td><td>race</td><td>black people</td><td>fast, athletic, hated, angry, loud</td><td>Yahoo</td></tr><tr><td>Why are british people so</td><td>race</td><td>british people</td><td>polite, pale, tall, reserved, cold</td><td>DuckDuckGo</td></tr><tr><td>Why are californians so</td><td>lifestyle</td><td>californians</td><td>entitled, rich, flaky, backstabby</td><td>multiple</td></tr><tr><td>Why are comedians so</td><td>profession</td><td>comedians</td><td>funny, sad, intelligent, depressed</td><td>Google</td></tr><tr><td>Why are millennials so</td><td>age</td><td>millennials</td><td>fragile, nostalgic, lonely, broke</td><td>Google</td></tr><tr><td>Why is Norway so</td><td>country</td><td>Norway</td><td>healthy, wealthy, happy, rich</td><td>multiple</td></tr><tr><td>Why are conservatives so</td><td>political</td><td>conservatives</td><td>angry, controlling, racist</td><td>Yahoo</td></tr><tr><td>Why are mortons so</td><td>religion</td><td>mormons</td><td>misunderstood, rich, successful, nice</td><td>multiple</td></tr></table>
|
| 50 |
+
|
| 51 |
+
Table 1: A few (random) examples of stereotypical attributes sampled from the dataset. Note that the number of attributes vary as we do not retrieve the same number for each social group per search engine.
|
| 52 |
+
|
| 53 |
+
the models. Previous works show that groups evoke different emotional profiles (Cottrell and Neuberg, 2005; Tapias et al., 2007; Mackie et al., 2000), and a variety of theories link particular intergroup relations to distinct stereotype-driven emotions such as disgust and anger (Harris and Fiske, 2006, 2009).
|
| 54 |
+
|
| 55 |
+
# 3 Stereotypes from search engines
|
| 56 |
+
|
| 57 |
+
Retrieving human stereotypes in an implicit manner can be useful as people are likely to give more politically correct answers when asked for stereotypes explicitly. Questions we ask to search engines are often done in the comfort of our own homes, making them likely to reflect true stereotypes that are out there in the real world (Stephens-Davidowitz, 2018). When feeding search engines queries that already imply a stereotype about a specific social group, the suggested completions are often salient (i.e. stereotypical) attributes of that particular group e.g., search query: 'Why are Asian parents so' $\rightarrow$ completion: 'strict'. As the auto-complete suggestions are based on popular human generated queries, we exploit this property for the acquisition of stereotypical attributes.
|
| 58 |
+
|
| 59 |
+
Social groups We use 382 social groups which we divide into 9 categories: age (11), gender (26), profession (115), race (99), country (73), religion (10), political (9), sexuality (12) and lifestyle (19). See Appendix C for the full lists of social groups per category. The social groups include, but are not limited to, the ones used by Nadeem et al. (2020) who collected Wikidata relation triples to automatically retrieve target terms.
|
| 60 |
+
|
| 61 |
+
Templates To increase coverage, we design 5 slightly varying templates to retrieve autocomplete suggestions for. For groups pertaining to people we use the templates:
|
| 62 |
+
|
| 63 |
+
- 'Why are [TGT] so [ATTR]?'
|
| 64 |
+
- 'What makes [TGT] so [ATTR]?'
|
| 65 |
+
How come [TGT] are so [ATTR]?
|
| 66 |
+
|
| 67 |
+
- 'Why are [TGT] always so [ATTR]?'
|
| 68 |
+
- 'Why are all [TGT] so [ATTR]?
|
| 69 |
+
|
| 70 |
+
For countries we use:
|
| 71 |
+
|
| 72 |
+
- 'Why is [TGT] so [ATTR]?'
|
| 73 |
+
- 'What makes [TGT] so [ATTR]?'
|
| 74 |
+
- 'How come [TGT] is so [ATTR]?'
|
| 75 |
+
- 'Why is [TGT] always so [ATTR]?'
|
| 76 |
+
- 'Why are all people in [TGT] so [ATTR]?'
|
| 77 |
+
|
| 78 |
+
where [TGT] are social groups for which we search stereotypes and [ATTR] is the salient attribute with which the search engine completes the sequence. We tested other (longer and more elaborate) templates but we found that they did not produce many autocomplete suggestions. In fact, we believe that the above queries are so successful precisely because of their simplicity, given that people are likely to keep search queries concise.
|
| 79 |
+
|
| 80 |
+
Search engines Due to Google's hate speech filtering system the autocomblection feature is disabled for frequently targeted groups e.g. black people, Jewish people and members of the LGBTQ+ community. Thus, we retrieve autocompactee suggestions from 3 search engines: Google, Yahoo and DuckDuckGo. In many cases, identical completions were given by multiple search engines. We sort these duplicate samples under the category 'multiple engines'. We find that most negative (offensive) stereotypes are retrieved from Yahoo.
|
| 81 |
+
|
| 82 |
+
Pre-processing We clean up the dataset manually, using the following procedure:
|
| 83 |
+
|
| 84 |
+
1. Remove noisy completions that do not result in a grammatically correct sentence e.g. non adjectives.
|
| 85 |
+
2. Remove specific trend-sensitive references: e.g. to video games 'why are asians so good at league of legends'.
|
| 86 |
+
3. Remove neutral statements not indicative of stereotypes e.g. 'why are [TGT] so called'.
|
| 87 |
+
4. We filter out completions consisting of mul
|
| 88 |
+
|
| 89 |
+
tiple words.1 Yet, when possible, the input is altered such that only the key term has to be predicted by the model e.g., 'Why are russians so $x$ ,where $\mathrm{x} =$ good at playing chess $\rightarrow$ 'Why are russians so good at $x$ , $\mathrm{x} =$ chess.
|
| 90 |
+
|
| 91 |
+
The final dataset contains $\sim 2\mathrm{K}$ stereotypes about 274 social groups. The stereotypes are distributed across categories as follows - profession: 713, race: 412, country: 396, gender: 198, age: 171, lifestyle: 123, political: 50, religion: 36. None of the search engines produce stereotypical autocomplete suggestions for members of the LGBTQ+ community. In Table 1 we provide some examples from the dataset. See Appendix B for more details on the data acquisition and search engines. The full code and dataset are publicly available.
|
| 92 |
+
|
| 93 |
+
# 4 Correlating human stereotypes with salient attributes in pretrained models
|
| 94 |
+
|
| 95 |
+
To test for human stereotypes, we propose a stereotype elicitation method that is inspired by cloze testing, a technique that stems from psycholinguistics. Using our method we retrieve salient attributes from the model in an unsupervised manner and compute recall scores over the stereotypes captured in our search engine dataset.
|
| 96 |
+
|
| 97 |
+
Pretrained models We study different types of pretrained LMs of which 3 are monolingual and 2 multilingual: BERT (Devlin et al., 2019) uncased trained on the BooksCorpus dataset (Zhu et al., 2015) and English Wikipedia; RoBERTa (Liu et al., 2019), the optimized version of BERT that is in addition trained on data from CommonCrawl News (Nagel, 2016), OpenTextCorpus (Gokaslan and Cohen, 2019) and STORIES (Trinh and Le, 2018); BART, a denoising autoencoder (Lewis et al., 2020) that while using a different architecture and pretraining strategy from RoBERTa, uses the same training data. Moreover, we use mBERT, that apart from being trained on Wikipedia in multiple languages, is identical to BERT. We use the uncased version that supports 102 languages. Similarly, XLM-R is the multilingual variant of RoBERTa (Conneau et al., 2020) that is trained on cleaned CommonCrawl data (Wenzek et al., 2020) and
|
| 98 |
+
|
| 99 |
+
supports 100 languages. We include both versions of a model (i.e. Base and Large) if available. Appendix A provides more details on the models.
|
| 100 |
+
|
| 101 |
+
Table 2: Ranking: 'why are old people so bad with'.
|
| 102 |
+
Prior Post
|
| 103 |
+
|
| 104 |
+
<table><tr><td>1. memory</td><td>1. memory</td></tr><tr><td>2. math</td><td>2. alcohol</td></tr><tr><td>3. money</td><td>3. technology</td></tr><tr><td>4. children</td><td>4. dates</td></tr></table>
|
| 105 |
+
|
| 106 |
+
Stereotype elicitation method For each sample in our dataset we feed the model the template sentence and replace [ATTR] with the [MASK] token. We then retrieve the top $k = 200$ model predictions for the MASK token, and test how many of the stereotypes found by the search engines are also encoded in the LMs. We adapt the method from Kurita et al. (2019) to rank the top $k$ returned model outputs based on their typicality for the respective social group. We quantify typicality by computing the log probability of the model probability for the predicted completion corrected for by the prior probability of the completion e.g.:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
P _ {\text {p o s t}} (y = \text {s t r i c t} | \text {W h y a r e p a r e n t s} y?) \tag {1}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
P _ {p r i o r} (y = \text {s t r i c t} | \text {W h y a r e [ M A S K ] s o} y?) \tag {2}
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
p = \log \left(P _ {\text {p o s t}} / P _ {\text {p r i o r}}\right) \tag {3}
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
i.e., measuring association between the words by computing the chance of completing the template with 'strict' given 'parents' corrected by the prior chance of 'strict' given any other group. Note that Eq. 3 has been well-established as a measure for stereotypicality in research from both social psychology (McCauley et al., 1980) and economics (Bordalo et al., 2016). After re-ranking by typicality, we evaluate how many of the stereotypes are correctly retrieved by the model through recall@ $k$ for each of the 8 target categories.
|
| 121 |
+
|
| 122 |
+
Results Figure 1 shows the recall@ $k$ scores per model separated by category, showcasing the ability to directly retrieve stereotypical attributes of social groups using our elicitation method. While models capture the human stereotypes to similar extents, results vary when comparing across categories with most models obtaining the highest recall for country stereotypes. Multilingual models obtain relatively low scores when recalling stereotypical attributes pertaining to age, gender and political groups. Yet, XLMR-L is scoring relatively high on stereotypical profession and race attributes.
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
|
| 126 |
+

|
| 127 |
+
|
| 128 |
+

|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
|
| 132 |
+

|
| 133 |
+
Figure 1: Recall@k scores for recalling the human-defined stereotypes captured in our dataset using our stereotype elicitation method on various pretrained LMs.
|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
|
| 139 |
+

|
| 140 |
+
|
| 141 |
+
The suboptimal performance of multilingual models could be explained in different ways. For instance, as multilingual models are known to suffer from negative interference (Wang et al., 2020), their quality on individual languages is lower compared to monolingual models, due to limited model capacity. This could result in a loss of stereotypical information. Alternatively, multilingual models are trained on more culturally diverse data, thus conflicting information could counteract within the model with stereotypes from different languages dampening each other's effect. Cultural differences might also be more pronounced when it comes to e.g. age and gender, whilst profession and race stereotypes might be established more universally.
|
| 142 |
+
|
| 143 |
+
# 5 Quantifying emotion towards different social groups
|
| 144 |
+
|
| 145 |
+
To study stereotypes through emotion, we draw inspiration from psychology studies showing that stereotypes evoke distinct emotions based on different types of perceived threats (Cottrell and Neuberg, 2005) or perceived social status and competitiveness of the targeted group (Fiske, 1998). For instance, Cottrell and Neuberg (2005) show that both feminists and African Americans elicit anger, but while the former group is perceived as a threat to social values, the latter is perceived as a threat to property instead. Thus, the stereotypes that underlie the emotion are likely different. Whilst strong emotions are not evidence of stereotypes per se, they do suggest the powerful effects of subtle biases captured in the model. Thus, the study into emotion profiles provides us with a good starting point to identify which stereotypes associated with
|
| 146 |
+
|
| 147 |
+
the social groups evoke those emotions. To this end, we (1) build emotion profiles for social groups in the models and (2) retrieve stereotypes about the groups that most strongly elicit emotions.
|
| 148 |
+
|
| 149 |
+
Model predictions To measure the emotions encoded by the model, we feed the model the 5 stereotype eliciting templates for each social group and retrieve the top 200 predictions for the [MASK] token (1000 in total). When taking the 1000 salient attributes retrieved from the 5 templates, we see that there are many overlapping predictions, hence we are left with only approx. between 300-350 unique attributes per social group. This indicates that the returned model predictions are robust with regard to the different templates.
|
| 150 |
+
|
| 151 |
+
Emotion scoring For each group, we score the predicted set of stereotypical attributes $W_{TGT}$ using the NRC emotion lexicon (Mohammad and Turney, 2013) that contains $\sim 14\mathrm{K}$ English words that are manually annotated with Ekman's eight basic emotions (fear, joy, anticipation, trust, surprise, sadness, anger, and disgust) (Ekman, 1999) and two sentiments (negative and positive). These emotions are considered basic as they are thought to be shaped by natural selection to address survival-related problems, which is often denoted as a driving factor for stereotyping (Cottrell and Neuberg, 2005). We use the annotations that consist of a binary value (i.e. 0 or 1) for each of the emotion categories; words can have multiple underlying emotions (e.g. selfish is annotated with 'negative', 'anger' and 'disgust') or none at all (e.g. vocal scores 0 on all categories). We find that the coverage for the salient attributes in the NRC lexicon is $\approx 70 - 75\%$ per group.
|
| 152 |
+
|
| 153 |
+
We score groups by counting the frequencies with which the predicted attributes $W_{TGT}$ are associated with the emotions and sentiments. For each group, we remove attributes from $W_{TGT}$ that are not covered in the lexicon. Thus, we do not extract emotion scores for the exact same number of attributes per group (number of unique attributes and coverage in the lexicon vary). Thus, we normalize scores per group by the number of words for which we are able to retrieve emotion scores ( $\approx 210 - 250$ per group). The score of an emotion-group pair is computed as follows:
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
\mathrm {s} _ {e m o} (\mathrm {T G T}) = \sum_ {i = w} ^ {| W _ {T G T} |} \mathrm {N R C} _ {e m o} (i) / \left(| W _ {T G T} |\right) \tag {4}
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
We then define emotion vectors $\hat{v} \in \mathcal{R}^{10}$ for each group $TGT$ : $\hat{v}_{TGT} = [s_{\text{fear}}, s_{\text{joy}}, s_{\text{sadness}}, s_{\text{trust}}]$ .
|
| 160 |
+
|
| 161 |
+
$s_{surprise}, s_{anticipation}, s_{disgust}, s_{anger}, s_{negative}, s_{positive}]$ , which we use as a representation for the emotion profiles within the model.
|
| 162 |
+
|
| 163 |
+
Analysis Figure 2, provides examples of the emotion profiles encoded for a diverse set of social groups to demonstrate how these profiles allow us to expose stereotypes. For instance, we see that in RoBERTa-B religious people and liberals are primarily associated with attributes that underlie anger. Towards homosexuals, the same amount of anger is accompanied by disgust and fear as well. As a result, we can detect distinct salient attributes that contribute to these emotions e.g.: Christians are intense, misguided and perverse, liberals are phony, mad and rabid, whilst homosexuals are dirty, bad, filthy, appalling, gross and indecent. The finding that homosexuals elicit relatively much disgust can be confirmed by studies on humans as well (Cottrell and Neuberg, 2005). Similarly, we find that Greece and Puerto Rico elicit relatively much fear and sadness in RoBERTa-B. Whereas Puerto Rico is turbulent, battered, armed, precarious and haunted, for Greece we find attributes such as failing, crumbling, inefficient, stagnant and paralyzed.
|
| 164 |
+
|
| 165 |
+
Emotion profiles elicited in BART-B differ considerably, showcasing how vastly sentiments vary across models. In particular, we see that overall the evoked emotion responses are weaker. Moreover, we detect relative differences such as liberals being more negatively associated than homosexuals, encoding attributes such as cowardly, greedy and hypocritical. We also find that BART-B encodes more positive associations e.g., committed,
|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
Figure 2: Examples of emotion profiles for a diverse set of social groups from RoBERTa-B and BART-B.
|
| 169 |
+
|
| 170 |
+
reliable, noble and responsible contributing to trust for husbands. Interestingly, all multilingual models encode vastly more positive attributes for all social groups (see Appendix D). We expect that this might be an artefact of the training data, but leave further investigation of this for future work.
|
| 171 |
+
|
| 172 |
+
Comparison across models We systematically compare the emotion profiles elicited by the social groups across different models by adapting the Representational Similarity Analysis (RSA) from Kriegeskorte et al. (2008). We opted for this method as it takes the relative relations between groups within the same model into account. This is particularly important as we have seen that some models are overall more negatively or positively biased. Yet, when it comes to bias and stereotypicality, we are less interested in absolute differences across models, but rather in how emotions differ towards groups in relation to the other groups. First, the representational similarity within each model is defined using a similarity measure to construct a representational similarity matrix (RSM). We define a similarity vector $\hat{w}_{TGT}$ for a social group such that every element $\hat{w}_{ij}$ of the vector is determined by the cosine similarity between $\hat{v}_i$ , where $i = \mathrm{TGT}$ , and the vector $\hat{v}_j$ for the j-th group in the list. The RSM is then defined as the symmetric matrix consisting of all similarity vectors. The resulting matrices are then compared across models by computing the Spearman correlation $(\rho)$ between the similarity vectors corresponding to the emotion profiles for a group in a model $a$ and $b$ . To express the similarity between the two models we take the mean correlation over all social groups in our list.
|
| 173 |
+
|
| 174 |
+
Results Computing RSA over all categories combined, shows us that RoBERTa-B and BART-B ob
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
Figure 3: Correlations in emotion profiles for gender and age groups across news sources (BERT-B).
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
Figure 4: Effect on recall@k when fine-tuning BERT-B on 10, 25, 50 and $100\%$ of the data
|
| 181 |
+
|
| 182 |
+
tain the highest correlation $(\rho = 0.44)$ . While using different architectures and pretraining strategies, the models rely on the same training data. Yet, we included base and large versions of models in our study and find that these models show little to no correlation (see Appendix E, Fig.10). This is surprising, as they are pretrained on the same data and tasks as their base versions (but contain more model parameters e.g. through additional layers). This shows how complex the process is in which associations are established and provides strong evidence that other modelling decisions, apart from training data, contribute to what models learn about groups. Thus, carefully controlling training content can not fully eliminate the need to analyze models w.r.t. the stereotypes that they might propagate.
|
| 183 |
+
|
| 184 |
+
# 6 Stereotype shifts during fine-tuning
|
| 185 |
+
|
| 186 |
+
Many debiasing studies intervene at the data level e.g., by augmenting imbalanced datasets (Manela et al., 2021; Webster et al., 2018; Dixon et al., 2018; Zhao et al., 2018) or reducing annotator bias (Sap et al., 2019). These methods are, however, dependent on the dataset, domain, or task, making new mitigation needed when transferring to a new setup (Jin et al., 2020). This raises the question of how emotion profiles and stereotypes are established through language use, and how they might shift due to new linguistic experience at the fine-tuning stage. We take U.S. news sources from across the political spectrum as a case study, as media outlets are known to be biased (Baron, 2006). By revealing stereotypes learned as an effect of fine-tuning on a specific source, we can trace the newly learned stereotypes back to the respective source.
|
| 187 |
+
|
| 188 |
+
We rely on the political bias categorisation of news sources from the AllSides $^{3}$ media bias rating website. These ratings are retrieved using multiple
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
|
| 192 |
+

|
| 193 |
+
|
| 194 |
+

|
| 195 |
+
Figure 5: Decrease in Spearman correlation $(\Delta \rho)$ after fine-tuning the pretrained models compared to no fine-tuning $(\Delta \rho = 1)$ (no correlation left: $\Delta \rho = -1$ ). We show results for models trained on varying proportions of the data. Results are averaged over categories and standard deviations are indicated by error bars.
|
| 196 |
+
|
| 197 |
+
methods, including editorial reviews, blind bias surveys, and third party research. Based on these ratings we select the following sources: New Yorker (far left), The Guardian (left), Reuters (center), FOX News (right) and Breitbart (far right). From each news source we take 4354 articles from the All-The-News $^{4}$ dataset that contains articles from 27 American Publications collected between 2013 and early 2020. We fine-tune the 5 base models $^{5}$ on these news sources using the MLM objective for only 1 training epoch with a learning rate of 5e-5 and a batch size of 8 using the HuggingFace library (Wolf et al., 2020). We then quantify the emotion shift after fine-tuning using RSA.
|
| 198 |
+
|
| 199 |
+
Results We find that fine-tuning on news sources can directly alter the encoded stereotypes. For instance, for $k = 25$ , fine-tuning BERT-B on Reuters informs the model that Croatia is good at sports and Russia is good at hacking, at the same time, associations such as Pakistan is bad at football, Romania is good at gymnastics and South Africa at
|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
Figure 6: A few interesting examples of emotional profiles for a diverse set of social group after fine-tuning RoBERTa-B for only 1 training epoch on articles from Guardian, Reuters and FOX news respectively.
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
Figure 7: Stereotypical attribute shifts when finetuning RoBERTa-B on New Yorker (left) and FOX news (right). Removed attributes are red and those added green. Attributes that persisted are grey.
|
| 206 |
+
|
| 207 |
+
rugby are lost. Moreover, from fine-tuning on both Breitbart and FOX news the association emerges that black women are violent, while this is not the case when fine-tuning on the other sources.
|
| 208 |
+
|
| 209 |
+
In fact, Guardian and Breitbart are the only news sources that result in the encoding of the salient attribute racist for White Americans. We find that such shifts are already visible after training on as little as $25\%$ of the original data $(\sim 1K$ articles). When comparing to human stereotypes, we find that fine-tuning on Reuters decreases the overall recall scores (see Figure 4). Although New Yorker exhibits a similar trend, fine-tuning on the other sources have little effect on the number of stereotypes recalled from the dataset. As Reuters has a
|
| 210 |
+
|
| 211 |
+
center bias rating i.e., it does not predictably favor either end of the political spectrum, we speculate that large amounts of more nuanced data helps transmit fewer stereotypes.
|
| 212 |
+
|
| 213 |
+
Figure 5 shows the decrease in correlation between the emotion profiles from pretrained BERT-B and BERT-B fine-tuned on different proportions of the data. Interestingly, fine-tuning on less articles does not automatically result in smaller changes to the models. In fact, in many cases, the amount of relative change in emotion profiles is heavily dependent on the social category as indicated by the error bars. This is not unexpected as news sources might propagate stronger opinions about specific categories. Moreover, we find that emotions towards different social categories cannot always be distinguished by the political bias of the source. Figure 3, shows how news sources compare to each other w.r.t. different social categories, exposing that e.g. Guardian and FOX news show lower correlation on gender than on age.
|
| 214 |
+
|
| 215 |
+
Computing correlation between all pretrained and fine-tuned models, we find that emotion profiles are prone to change irrespective of model or news source (see Appendix E). In Figure 6, we showcase the effect of fine-tuning from the model that exhibits the lowest change in correlation, i.e. RoBERTa-B, to highlight how quickly emotions shift. We find that while Reuters results in weaker emotional responses, Guardian elicits stronger negative emotions than FOX news e.g. towards conservatives and academics. Yet, while both sources result in anger towards similar groups, for FOX news anger is more often accompanied with fear while for Guardian this seems to more strongly stems from disgust (e.g. see Christians and Iraq).
|
| 216 |
+
|
| 217 |
+
Lastly, Figure 7 shows specific stereotype shifts found on the top 15 predictions per template. We
|
| 218 |
+
|
| 219 |
+
illustrate the salient attributes that are removed, added and remained constant after fine-tuning. For instance, the role of news media in shaping public opinion about police has received much attention in the wake of the growing polarization over high-profile incidents (Intravia et al., 2018; Graziano, 2019). We find clear evidence of this polarization as fine-tuning on New Yorker results in attributes such as cold, unreliable, deadly and inept, yet, fine-tuning on FOX news yields positive associations such as polite, loyal, cautious and exceptional. In addition, we find evidence for other stark contrasts such as the model picking up on sexist (e.g. women are not interesting and equal but late, insecure and entitled) and racist stereotypes (e.g. black people are not misunderstood and powerful, but bitter, rude and stubborn) after fine-tuning on FOX news.
|
| 220 |
+
|
| 221 |
+
# 7 Conclusion
|
| 222 |
+
|
| 223 |
+
We present the first dataset containing stereotypical attributes of a range of social groups. Importantly, our data acquisition technique enables the inexpensive retrieval of similar datasets in the future, enabling comparative analysis on stereotype shifts over time. Additionally, our proposed methods could inspire future work on analyzing the effect of training data content, and simultaneously contribute to the field of social psychology by providing a testbed for studies on how stereotypes emerge from linguistic experience. To this end, we have shown that our methods can be used to identify stereotypes evoked during fine-tuning by taking news sources as a case study. Moreover, we have exposed how quickly stereotypes and emotions shift based on training data content, and linked stereotypes to their manifestations as emotions to quantify and compare attitudes towards groups within LMs. We plan to extent our approach to more languages in future work to collect different, more culturally dependent, stereotypes as well.
|
| 224 |
+
|
| 225 |
+
# 8 Ethical consideration
|
| 226 |
+
|
| 227 |
+
The examples given in the paper can be considered offensive but are in no way a reflection of the authors' own values and beliefs and should not be taken as such. Moreover, it is important to note that for the fine-tuning experiments only a few interesting examples were studied and showcased. Hence, more thorough research should be conducted before drawing any hard conclusions about the news papers and the stereotypes they propagate. In ad
|
| 228 |
+
|
| 229 |
+
dition, our data acquisition process is completely automated and did not require the help from human subjects. While the stereotypes we retrieve stem from real humans, the data we collect is publicly available and completely anonymous as the specific stereotypical attributes and/or search queries can not be traced back to individual users.
|
| 230 |
+
|
| 231 |
+
# References
|
| 232 |
+
|
| 233 |
+
David P Baron. 2006. Persistent media bias. Journal of Public Economics, 90(1-2):1-36.
|
| 234 |
+
Camiel J Beukeboom and Christian Burgers. 2019. How stereotypes are shared through language: a review and introduction of the social categories and stereotypes communication (scsc) framework. Review of Communication Research, 7:1-37.
|
| 235 |
+
Su Lin Blodgett, Solon Barocas, Hal Daumé III, and Hanna Wallach. 2020. Language (technology) is power: A critical survey of "bias" in nlp. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5454-5476.
|
| 236 |
+
Tolga Bolukbasi, Kai-Wei Chang, James Zou, Venkatesh Saligrama, and Adam Kalai. 2016. Man is to computer programmer as woman is to homemaker? debiasing word embeddings. In Proceedings of the 30th International Conference on Neural Information Processing Systems, pages 4356-4364.
|
| 237 |
+
Pedro Bordalo, Katherine Coffman, Nicola Gennaioli, and Andrei Shleifer. 2016. Stereotypes. The Quarterly Journal of Economics, 131(4):1753-1794.
|
| 238 |
+
Aylin Caliskan, Joanna J Bryson, and Arvind Narayanan. 2017. Semantics derived automatically from language corpora contain human-like biases. Science, 356(6334):183-186.
|
| 239 |
+
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.
|
| 240 |
+
Catherine A Cottrell and Steven L Neuberg. 2005. Different emotional reactions to different groups: a sociofunctional threat-based approach to prejudice". Journal of personality and social psychology, 88(5):770.
|
| 241 |
+
Amy JC Cuddy, Susan T Fiske, Virginia SY Kwan, Peter Glick, Stephanie Demoulin, Jacques-Philippe Leyens, Michael Harris Bond, Jean-Claude Croizet, Naomi Ellemers, Ed Sleebos, et al. 2009. Stereotype content model across cultures: Towards universal similarities and some differences. British Journal of Social Psychology, 48(1):1-33.
|
| 242 |
+
|
| 243 |
+
Thomas Davidson, Debasmita Bhattacharya, and Ingmar Weber. 2019. Racial bias in hate speech and abusive language detection datasets. In Proceedings of the Third Workshop on Abusive Language Online, pages 25-35.
|
| 244 |
+
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.
|
| 245 |
+
Lucas Dixon, John Li, Jeffrey Sorensen, Nithum Thain, and Lucy Vasserman. 2018. Measuring and mitigating unintended bias in text classification. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, pages 67-73.
|
| 246 |
+
MeiXing Dong, David Jurgens, Carmen Banea, and Rada Mihalcea. 2019. Perceptions of social roles across cultures. In International Conference on Social Informatics, pages 157-172. Springer.
|
| 247 |
+
Paul Ekman. 1999. Basic emotions. Handbook of Cognition and Emotion, pages 45-60.
|
| 248 |
+
Anjalie Field and Yulia Tsvetkov. 2020. Unsupervised discovery of implicit gender bias. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 596-608.
|
| 249 |
+
Susan T Fiske. 1998. Stereotyping, prejudice, and discrimination. The handbook of social psychology, 2(4):357-411.
|
| 250 |
+
Aaron Gokaslan and Vanya Cohen. 2019. Openwebtext corpus. https://skylion007.github.io/OpenWebTextCorpus/.
|
| 251 |
+
Lisa M Graziano. 2019. News media and perceptions of police: a state-of-the-art-review. Policing: An International Journal.
|
| 252 |
+
Lasana T Harris and Susan T Fiske. 2006. Dehumanizing the lowest of the low: Neuroimaging responses to extreme out-groups. *Psychological science*, 17(10):847-853.
|
| 253 |
+
Lasana T Harris and Susan T Fiske. 2009. Social neuroscience evidence for dehumanised perception. *European review of social psychology*, 20(1):192-231.
|
| 254 |
+
Madeline E Heilman, Aaron S Wallen, Daniella Fuchs, and Melinda M Tamkins. 2004. Penalties for success: reactions to women who succeed at male gender-typed tasks. Journal of applied psychology, 89(3):416.
|
| 255 |
+
Perry Hinton. 2017. Implicit stereotypes and the predictive brain: cognition and culture in "biased" person perception. *Palgrave Communications*, 3(1):1-9.
|
| 256 |
+
|
| 257 |
+
Jonathan Intravia, Kevin T Wolff, and Alex R Piquero. 2018. Investigating the effects of media consumption on attitudes toward police legitimacy. Deviant Behavior, 39(8):963-980.
|
| 258 |
+
Xisen Jin, Francesco Barbieri, Brendan Kennedy, Aida Mostafazadeh Davani, Leonardo Neves, and Xiang Ren. 2020. On transferability of bias mitigation effects in language model fine-tuning. arXiv preprint arXiv:2010.12864.
|
| 259 |
+
Svetlana Kiritchenko and Saif Mohammad. 2018. Examining gender and race bias in two hundred sentiment analysis systems. In Proceedings of the Seventh Joint Conference on Lexical and Computational Semantics, pages 43-53.
|
| 260 |
+
Nikolaus Kriegeskorte, Marieke Mur, and Peter A Bandettini. 2008. Representational similarity analysis connecting the branches of systems neuroscience. Frontiers in systems neuroscience, 2:4.
|
| 261 |
+
Keita Kurita, Nidhi Vyas, Ayush Pareek, Alan W Black, and Yulia Tsvetkov. 2019. Measuring bias in contextualized word representations. In Proceedings of the First Workshop on Gender Bias in Natural Language Processing, pages 166-172.
|
| 262 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020. Bart: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880.
|
| 263 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
|
| 264 |
+
Anne Maass. 1999. Linguistic intergroup bias: Stereotype perpetuation through language. In Advances in experimental social psychology, volume 31, pages 79-121. Elsevier.
|
| 265 |
+
Diane M Mackie, Thierry Devos, and Eliot R Smith. 2000. Intergroup emotions: Explaining offensive action tendencies in an intergroup context. Journal of personality and social psychology, 79(4):602.
|
| 266 |
+
Daniel de Vassimon Manela, David Errington, Thomas Fisher, Boris van Breugel, and Pasquale Minervini. 2021. Stereotype and skew: Quantifying gender bias in pre-trained and fine-tuned language models. arXiv preprint arXiv:2101.09688.
|
| 267 |
+
Chandler May, Alex Wang, Shikha Bordia, Samuel Bowman, and Rachel Rudinger. 2019. On measuring social biases in sentence encoders. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 622-628.
|
| 268 |
+
|
| 269 |
+
Clark McCauley, Christopher L Stitt, and Mary Segal. 1980. Stereotyping: From prejudice to prediction. Psychological Bulletin, 87(1):195.
|
| 270 |
+
Saif M Mohammad and Peter D Turney. 2013. Nrc emotion lexicon. National Research Council, Canada, 2.
|
| 271 |
+
Moin Nadeem, Anna Bethke, and Siva Reddy. 2020. Stereoset: Measuring stereotypical bias in pretrained language models. arXiv preprint arXiv:2004.09456.
|
| 272 |
+
Sebastian Nagel. 2016. Cc-news dataset. https://commoncrawl.org/2016/10/news-dataset-available/.
|
| 273 |
+
Nikita Nangia, Clara Vania, Rasika Bhalerao, and Samuel Bowman. 2020. Crows-pairs: A challenge dataset for measuring social biases in masked language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1953-1967.
|
| 274 |
+
Chan Young Park, Xinru Yan, Anjalie Field, and Yulia Tsvetkov. 2020. Multilingual contextual affective analysis of lgbt people portrayals in wikipedia. arXiv preprint arXiv:2010.10820.
|
| 275 |
+
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.
|
| 276 |
+
Seth Stephens-Davidowitz. 2018. Everybody Lies: What the internet can tell us about who we really are. In Bloomsbury Publishing Plc.
|
| 277 |
+
Tony Sun, Andrew Gaut, Shirlyn Tang, Yuxin Huang, Mai ElSherief, Jieyu Zhao, Diba Mirza, Elizabeth Belding, Kai-Wei Chang, and William Yang Wang. 2019. Mitigating gender bias in natural language processing: Literature review. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1630-1640.
|
| 278 |
+
Yi Chern Tan and L Elisa Celis. 2019. Assessing social and intersectional biases in contextualized word representations. arXiv preprint arXiv:1911.01485.
|
| 279 |
+
Molly Parker Tapias, Jack Glaser, Dacher Keltner, Kristen Vasquez, and Thomas Wickens. 2007. Emotion and prejudice: Specific emotions toward outgroups. Group Processes & Intergroup Relations, 10(1):27-39.
|
| 280 |
+
Trieu H Trinh and Quoc V Le. 2018. A simple method for commonsense reasoning. arXiv preprint arXiv:1806.02847.
|
| 281 |
+
Zirui Wang, Zachary C Lipton, and Yulia Tsvetkov. 2020. On negative interference in multilingual language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4438-4450.
|
| 282 |
+
|
| 283 |
+
Kellie Webster, Marta Recasens, Vera Axelrod, and Jason Baldridge. 2018. Mind the gap: A balanced corpus of gendered ambiguous pronouns. Transactions of the Association for Computational Linguistics, 6:605-617.
|
| 284 |
+
Bernard Weiner. 1993. On sin versus sickness: A theory of perceived responsibility and social motivation. American psychologist, 48(9):957.
|
| 285 |
+
Guillaume Wenzek, Marie-Anne Lachaux, Alexis Conneau, Vishrav Chaudhary, Francisco Guzmán, Armand Joulin, and Édouard Grave. 2020. Ccnet: Extracting high quality monolingual datasets from web crawl data. In Proceedings of The 12th Language Resources and Evaluation Conference, pages 4003-4012.
|
| 286 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38-45, Online. Association for Computational Linguistics.
|
| 287 |
+
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.
|
| 288 |
+
Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pages 19-27.
|
| 289 |
+
|
| 290 |
+
# A Pretrained model details
|
| 291 |
+
|
| 292 |
+
<table><tr><td>Model</td><td>tokenization</td><td>L</td><td>dim</td><td>H</td><td>params</td><td>V</td><td>D</td><td>task</td><td>#lgs</td></tr><tr><td>BERT-B</td><td>WordPiece</td><td>12</td><td>768</td><td>12</td><td>110M</td><td>30K</td><td>16GB</td><td>MLM+NSP</td><td>1</td></tr><tr><td>BERT-L</td><td>WordPiece</td><td>24</td><td>1024</td><td>16</td><td>336M</td><td>30K</td><td>16GB</td><td>MLM+NSP</td><td>1</td></tr><tr><td>RoBERTa-B</td><td>BPE</td><td>12</td><td>768</td><td>12</td><td>125M</td><td>50K</td><td>160GB</td><td>MLM</td><td>1</td></tr><tr><td>RoBERTa-L</td><td>BPE</td><td>24</td><td>1024</td><td>16</td><td>335M</td><td>50K</td><td>160GB</td><td>MLM</td><td>1</td></tr><tr><td>BART-B</td><td>BPE</td><td>12</td><td>768</td><td>16</td><td>139M</td><td>50K</td><td>160GB</td><td>Denoising</td><td>1</td></tr><tr><td>BART-L</td><td>BPE</td><td>24</td><td>1024</td><td>16</td><td>406M</td><td>50K</td><td>160GB</td><td>Denoising</td><td>1</td></tr><tr><td>mBERT</td><td>WordPiece</td><td>12</td><td>768</td><td>12</td><td>168M</td><td>110K</td><td>-</td><td>MLM+NSP</td><td>102</td></tr><tr><td>XLMR-B</td><td>SentencePiece</td><td>12</td><td>768</td><td>8</td><td>270M</td><td>250K</td><td>2.5TB</td><td>MLM</td><td>100</td></tr><tr><td>XLMR-L</td><td>SentencePiece</td><td>24</td><td>1024</td><td>16</td><td>550M</td><td>250K</td><td>2.5TB</td><td>MLM</td><td>100</td></tr></table>
|
| 293 |
+
|
| 294 |
+
Table 3: Summary statistics of the model architectures: tokenization method, number of layers $L$ , hidden state dimensionality $dim$ , number of attention heads $H$ , number of model parameters $params$ , vocabulary size $V$ , training data size $D$ , pretraining tasks, and number of languages used $\# lgs$ .
|
| 295 |
+
|
| 296 |
+
# B Data acquisition
|
| 297 |
+
|
| 298 |
+
For the collection of autocomplete suggestions we rely on the free publicly available API's from the respective engines using the following base url's:
|
| 299 |
+
|
| 300 |
+
- Google: http://suggestqueries.google.com/complete/search
|
| 301 |
+
- Yahoo: http://sugg.search.yahoo.net/sg
|
| 302 |
+
- DuckDuckGo: https://duckduckgo.com/ac
|
| 303 |
+
|
| 304 |
+
All search engine suggestions are automatically generated by an algorithm without human involvement. These suggestions are supposed to be based on factors like popularity and similarity. We enter the search queries anonymously such that the resulting suggestions are mainly based on common queries from other people's search histories. Unfortunately, however, exact details about the workings of the algorithms are not publicly available, but an extensive explanation of Google's search predictions can be found here: Google's documentation on autocomplete suggestions. Moreover, Figure B illustrates the contribution of each search engine to the datasets. We see that while each search engine relies on a different algorithm, in many cases the engines predict similar stereotypical attributes regardless. Moreover, the dataset was constructed during the period January-May 2021. However, given that the algorithms behind these engines are constantly evolving, it is not guaranteed that the same approach will yield identical results in the future. We will make the dataset and corresponding code available upon publication.
|
| 305 |
+
|
| 306 |
+

|
| 307 |
+
Figure 8: Distribution of the contribution of each search engine to the final dataset.
|
| 308 |
+
|
| 309 |
+
# C Lists of social groups per category
|
| 310 |
+
|
| 311 |
+
# Age (11)
|
| 312 |
+
|
| 313 |
+
"elders", "kids", "millenials", "teens", "boomers", "old people"
|
| 314 |
+
|
| 315 |
+
"old women", "children", "teenagers", "daughters", "sons"
|
| 316 |
+
|
| 317 |
+
# Gender (25)
|
| 318 |
+
|
| 319 |
+
"girls,"women", "men", "females", "males", "boys"
|
| 320 |
+
|
| 321 |
+
"boyfriends", "girlfriends", "stepmothers", "stepfathers", "ladies", "gentlemen"
|
| 322 |
+
|
| 323 |
+
"brothers", "sisters", "mothers", "fathers", "grandfathers", ""grandmothers
|
| 324 |
+
|
| 325 |
+
"wives", "husbands", "brides", "grooms", "schoolgirls", "schoolboys"
|
| 326 |
+
|
| 327 |
+
"mommies", "daddies"
|
| 328 |
+
|
| 329 |
+
# Race (99)
|
| 330 |
+
|
| 331 |
+
"Asians", "Americans", "Europeans", "Jews", "Indians", "Russians", "Africans", "Black people"
|
| 332 |
+
|
| 333 |
+
"Mexicans", "Whites" "Blacks", "White people", "Germans", "blondes", "blonde girls", "Arabs"
|
| 334 |
+
|
| 335 |
+
"White Americans", "Black Americans" "Hispanics", "Native Americans", "Black men", "White men"
|
| 336 |
+
|
| 337 |
+
"Asian women", "Asian men" Black women", "the Dutch", "Irish people", "Irish men", "White women"
|
| 338 |
+
|
| 339 |
+
"Indian men", "Indian women", "Chinese men", "Chinese women", "Japanese women", "Japanese men"
|
| 340 |
+
|
| 341 |
+
"Indian parents", "Asian parents", "White parents", "Black parents", "Black fathers", "Latinas", "Latinos"
|
| 342 |
+
|
| 343 |
+
"Latin people", "Brazilian women", "Asian kids", "Black kids", "White kids", "African Americans"
|
| 344 |
+
|
| 345 |
+
"Nigerians", "Ethiopians", "Ukrainians", "Sudanese people", "Afghans", "Iraqis", "Hispanic
|
| 346 |
+
|
| 347 |
+
"Hispanic women", "Italians", "Italian men", "Italian women", "Somalis", "Iranian people", "Iranians"
|
| 348 |
+
|
| 349 |
+
"Australians", "Australian men", "Australian women", "Aussies", "Ghanaians", "Swedes", "Finns"
|
| 350 |
+
|
| 351 |
+
"Venezuelans", "Moroccans", "Syrians", "Pakistanis", "British people", "French people", "Greeks"
|
| 352 |
+
|
| 353 |
+
"Indonesians", "Vietnamese people", "Romanians", "Ecuadorians", "Norwegians", "Nepalis", "Scots"
|
| 354 |
+
|
| 355 |
+
"Bengalis", "Polish people", "Taiwanese people", "Albanians", "Colombians", "Egyptians", "Koreans"
|
| 356 |
+
|
| 357 |
+
"Persian people", "Portuguese men", "Portuguese women", "Turkish people", "Austrians"
|
| 358 |
+
|
| 359 |
+
"South Africans", "Dutch people", "Chileans", "Lebanese people"
|
| 360 |
+
|
| 361 |
+
# Countries (73)
|
| 362 |
+
|
| 363 |
+
"Ethiopia", "Europe", "Ukraine", "Sudan", "Afghanistan", "Iraq", "Yemen", "Russia", "Italy", "Somalia"
|
| 364 |
+
|
| 365 |
+
"Iran", "Venezuela", "Oman", "Syria", "China", "India", "Britain", "France", "Greece", "Scotland"
|
| 366 |
+
|
| 367 |
+
"Paraguay", "Brazil", "Africa", "Jordan", "Indonesia", "Vietnam", "Pakistan", "Romania, Ecuador"
|
| 368 |
+
|
| 369 |
+
"Mexico", "Puerto Rico", "Cameroon", "Kenya", "Liberia", "Sierra Leon", "Qatar", "Syria", "Kenya"
|
| 370 |
+
|
| 371 |
+
"Saudi Arabia", "Lebanon", "South Africa", "Korea", "Singapore", "Germany", "Ireland", "Morocco"
|
| 372 |
+
|
| 373 |
+
"Turkey", "Laos", "Bangladesh", "Guatemala", "Ghana", "Nepal", "Albania", "Spain", "Sweden"
|
| 374 |
+
|
| 375 |
+
"Argentina", "Chile", "Taiwan", "Finland", "Australia", "Egypt", "Peru", "Poland", "Columbia", "Bolivia"
|
| 376 |
+
|
| 377 |
+
"Japan", "Norway", "Cape Verde", "Portugal", "Austria", "the Netherlands"
|
| 378 |
+
|
| 379 |
+
"Croatia", "Malta", "Belgium"
|
| 380 |
+
|
| 381 |
+
# Profession (115)
|
| 382 |
+
|
| 383 |
+
"students", "politicians", "doctors", "business men", "librarians", "artists", "professors", "priests"
|
| 384 |
+
|
| 385 |
+
"bosses", "police", "police officers", "soldiers", "scientists", "physicians", "cashiers" "housekeepers"
|
| 386 |
+
|
| 387 |
+
"teachers", "janitors", "models", "actresses", "pilots", "strippers" "brokers", "hairdressers", "bartenders"
|
| 388 |
+
|
| 389 |
+
"diplomats", "receptionists", "realtors", "mathematicians", "barbers", "coaches", "business people"
|
| 390 |
+
|
| 391 |
+
"construction workers", "managers", "accountants", "commanders", "firefighters", "movers", "attorneys"
|
| 392 |
+
|
| 393 |
+
"Bakers", "athletes", "dancers", "carpenters", "mechanics", "handymen", "musicians", "detectives"
|
| 394 |
+
|
| 395 |
+
"entrepreneurs", "opera singers", "chiefs", "lawyers", "software developers", "farmers", "writers"
|
| 396 |
+
|
| 397 |
+
"real-estate developers", "butchers", "electricians", "prosecutors", "bankers", "cooks", "plumbers"
|
| 398 |
+
|
| 399 |
+
"football players", "boxers", "chess players", "swimmers", "tennis players", "supervisors", "attendants"
|
| 400 |
+
|
| 401 |
+
"producers", "researchers", "economists", "physicists", "psychologists", "sales people", "assistants"
|
| 402 |
+
|
| 403 |
+
"engineers", "comedians", "painters", "civil servants", "guitarists", "linguists", "laborers", "historians"
|
| 404 |
+
|
| 405 |
+
"chemists", "pensioners", "performing artists", "singers", "secretaries", "auditors", "counselors"
|
| 406 |
+
|
| 407 |
+
"dentists", "analysts", "nurses", "waiters", "authors", "architects", "academics", "directors", "illustrators"
|
| 408 |
+
|
| 409 |
+
"clerks", "photographers", "cleaners", "composers", "pharmacists", "sociologists", "journalists"
|
| 410 |
+
|
| 411 |
+
"guards", "actors", "midwives", "sheriffs", "editors", "designers", "judges", "poets", "maids"
|
| 412 |
+
|
| 413 |
+
# Religion (10)
|
| 414 |
+
|
| 415 |
+
"Religious people", "Muslims", "Christians", "Hindus", "atheists", "Buddhists"
|
| 416 |
+
|
| 417 |
+
"Catholics", "Protestants", "Sikhs", "Mormons"
|
| 418 |
+
|
| 419 |
+
# Political (9)
|
| 420 |
+
|
| 421 |
+
"immigrants", "conservatives", "liberals", "trump supporters", "voters", "communists" "capitalists", "populists", "socialists"
|
| 422 |
+
|
| 423 |
+
# Sexuality (12)
|
| 424 |
+
|
| 425 |
+
"gay people", "lesbians", "queer people", "transgenders", "homosexuals", "pansexual people" "queers", "faggots", "bisexual people", "asexual people", "crossdressers", "fags"
|
| 426 |
+
|
| 427 |
+
# Lifestyle (19)
|
| 428 |
+
|
| 429 |
+
"hipsters", "nerds", "rednecks", "homeless people", "feminists", "rich people", "poor people", "criminals"
|
| 430 |
+
"frats", "frat boys", "sorority girls", "hippies", "geeks", "goths", "punks", "Californians"
|
| 431 |
+
"celebrities", "redheads", "gingers"
|
| 432 |
+
|
| 433 |
+
# D Emotion profiles from multilingual models
|
| 434 |
+
|
| 435 |
+

|
| 436 |
+
Figure 9: Examples of emotion profiles for the multilingual models. It showcases that these models are much more positive about all social groups in comparison to the monolingual models. Whereas we observed that monolingual models primarily encode negative associations for most groups, associations encoded within the multilingual models are more balanced between positive and negative sentiments.
|
| 437 |
+
|
| 438 |
+

|
| 439 |
+
|
| 440 |
+

|
| 441 |
+
|
| 442 |
+
# E Additional quantitative results of systematic shifts in emotion profiles across models
|
| 443 |
+
|
| 444 |
+

|
| 445 |
+
Figure 10: Spearman correlation between each pair of models computed over all social groups. This figure illustrates that there is fairly little correlation between any of the models when it comes to the emotion profiles that they capture.
|
| 446 |
+
|
| 447 |
+
<table><tr><td>Δρ</td><td>Source</td><td>Religion</td><td>Profession</td><td>Lifestyle</td><td>Sexuality</td><td>Race</td><td>Gender</td><td>Country</td><td>Age</td><td>Political</td></tr><tr><td rowspan="5">BERT-B</td><td>NewYorker</td><td>-.56</td><td>-.34</td><td>-.25</td><td>-.23</td><td>-.39</td><td>-.47</td><td>-.47</td><td>-.43</td><td>-.72</td></tr><tr><td>Guardian</td><td>-.49</td><td>-.34</td><td>-.08</td><td>-.23</td><td>-.37</td><td>-.31</td><td>-.43</td><td>-.31</td><td>-.49</td></tr><tr><td>Reuters</td><td>-.71</td><td>-.53</td><td>-.43</td><td>-.65</td><td>-.53</td><td>-.63</td><td>-.69</td><td>-.60</td><td>-.54</td></tr><tr><td>FOX news</td><td>-.46</td><td>-.30</td><td>-.16</td><td>-.22</td><td>-.35</td><td>-.30</td><td>-.44</td><td>-.33</td><td>-.51</td></tr><tr><td>BreitBart</td><td>-.39</td><td>-.25</td><td>-.11</td><td>-.21</td><td>-.33</td><td>-.23</td><td>-.40</td><td>-.34</td><td>-.66</td></tr><tr><td rowspan="5">RoBERTa-B</td><td>NewYorker</td><td>-.20</td><td>-.22</td><td>-.20</td><td>-.29</td><td>-.21</td><td>-.24</td><td>-.16</td><td>-.08</td><td>-.38</td></tr><tr><td>Guardian</td><td>-.19</td><td>-.20</td><td>-.19</td><td>-.20</td><td>-.22</td><td>-.18</td><td>-.16</td><td>-.13</td><td>-.24</td></tr><tr><td>Reuters</td><td>-.25</td><td>-.32</td><td>-.33</td><td>-.21</td><td>-.33</td><td>-.49</td><td>-.37</td><td>-.24</td><td>-.40</td></tr><tr><td>FOX news</td><td>-.10</td><td>-.18</td><td>-.14</td><td>-.37</td><td>-.16</td><td>-.12</td><td>-.16</td><td>-.25</td><td>-.25</td></tr><tr><td>BreitBart</td><td>-.15</td><td>-.23</td><td>-.21</td><td>-.41</td><td>-.18</td><td>-.27</td><td>-.22</td><td>-.18</td><td>-.43</td></tr><tr><td rowspan="5">BART-B</td><td>NewYorker</td><td>-.56</td><td>-.48</td><td>-.40</td><td>-.60</td><td>-.44</td><td>-.55</td><td>-.43</td><td>-.48</td><td>-.49</td></tr><tr><td>Guardian</td><td>-.49</td><td>-.48</td><td>-.32</td><td>-.41</td><td>-.37</td><td>-.50</td><td>-.47</td><td>-.67</td><td>-.33</td></tr><tr><td>Reuters</td><td>-.43</td><td>-.51</td><td>-.45</td><td>-.51</td><td>-.53</td><td>-.54</td><td>-.54</td><td>-.70</td><td>-.29</td></tr><tr><td>FOX news</td><td>-.27</td><td>-.50</td><td>-.32</td><td>-.44</td><td>-.37</td><td>-.44</td><td>-.42</td><td>-.65</td><td>-.50</td></tr><tr><td>BreitBart</td><td>-.37</td><td>-.48</td><td>-.42</td><td>-.35</td><td>-.37</td><td>-.51</td><td>-.44</td><td>-.56</td><td>-.50</td></tr><tr><td rowspan="5">mBERT</td><td>NewYorker</td><td>-.58</td><td>-.64</td><td>-.33</td><td>-.44</td><td>-.64</td><td>-.63</td><td>-.80</td><td>-.59</td><td>-.38</td></tr><tr><td>Guardian</td><td>-.58</td><td>-.49</td><td>-.30</td><td>-.50</td><td>-.63</td><td>-.72</td><td>-.77</td><td>-.53</td><td>-.37</td></tr><tr><td>Reuters</td><td>-.50</td><td>-.56</td><td>-.29</td><td>-.46</td><td>-.37</td><td>-.59</td><td>-.85</td><td>-.33</td><td>-.42</td></tr><tr><td>FOX news</td><td>-.35</td><td>-.64</td><td>-.36</td><td>-.54</td><td>-.68</td><td>-.71</td><td>-.71</td><td>-.49</td><td>-.60</td></tr><tr><td>BreitBart</td><td>-.39</td><td>-.66</td><td>-.36</td><td>-.43</td><td>-.51</td><td>-.61</td><td>-.75</td><td>-.40</td><td>-.55</td></tr><tr><td rowspan="5">XLMR-B</td><td>NewYorker</td><td>-.44</td><td>-.76</td><td>-.45</td><td>-.66</td><td>-.61</td><td>-.86</td><td>-.66</td><td>-.72</td><td>-.58</td></tr><tr><td>Guardian</td><td>-.52</td><td>-.72</td><td>-.49</td><td>-.46</td><td>-.68</td><td>-.83</td><td>-.53</td><td>-.63</td><td>-.38</td></tr><tr><td>Reuters</td><td>-.53</td><td>-.74</td><td>-.69</td><td>-.55</td><td>-.67</td><td>-.73</td><td>-.53</td><td>-.69</td><td>-.57</td></tr><tr><td>FOX news</td><td>-.40</td><td>-.71</td><td>-.47</td><td>-.57</td><td>-.58</td><td>-.69</td><td>-.51</td><td>-.69</td><td>-.30</td></tr><tr><td>BreitBart</td><td>-.60</td><td>-.76</td><td>-.47</td><td>-.56</td><td>-.75</td><td>-.79</td><td>-.60</td><td>-.65</td><td>-.51</td></tr></table>
|
| 448 |
+
|
| 449 |
+
Table 4: Emotion shifts after fine-tuning for 1 training epoch on $\pm$ 4.5K articles from the respective news sources. We quantify shift as the decrease in similarity after fine-tuning, i.e. change in averaged Spearman correlation $(\Delta \rho)$ , between the pretrained and fine-tuned model respectively. If the emotion profiles do no change $\rho = 1$ and thus $\Delta \rho = 0$ , on the other hand, if no correlation remains after fine-tuning $\Delta \rho = -1$ . Biggest changes are indicated by bold letters.
|
stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f8cadbd11690c3f1f99e3c118f4b26fc59db8dae3c3289137d9765276678627
|
| 3 |
+
size 849631
|
stepmothersaremeanandacademicsarepretentiouswhatdopretrainedlanguagemodelslearnaboutyou/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e9e822b638d5a56c3d39e6b302db8c6d4ece1606f7ac42fef9aeb0361d020bfe
|
| 3 |
+
size 466455
|
streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea7877ae56161bf268c026ba4a800f565739df4cadfc3c1fd485748278ef9cff
|
| 3 |
+
size 176122
|
streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b434ac95003d942e1c69037dd2e8ac0981be1039f61bb59e330c10a3f5fb2e7f
|
| 3 |
+
size 258404
|
streamhoverlivestreamtranscriptsummarizationandannotation/567a4cdd-e5c2-410d-88cc-055139968eb5_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a3a15c3a4f9f4a5af63618bbb7ef5418d8804e493f2cd1940987cb95acd8f31
|
| 3 |
+
size 2841944
|
streamhoverlivestreamtranscriptsummarizationandannotation/full.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
streamhoverlivestreamtranscriptsummarizationandannotation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e93c951e3f893e39bab964366983da715623ca336741de7effd6c762ab32bdf
|
| 3 |
+
size 393579
|
streamhoverlivestreamtranscriptsummarizationandannotation/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b25cbd16f239e3260e7c13d546affe64d7771294e44ff8b828741aaee235c64c
|
| 3 |
+
size 1062562
|
structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2756e25cc8182908ac87de2a82ff5b90337e0ca043e7c0aefe551b524bc44866
|
| 3 |
+
size 102836
|
structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0198d1f8b6e94278cb7d5b39904dacfd9ab67100caf6b82289852bd1f0e7adf8
|
| 3 |
+
size 124617
|
structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/60239455-0ce1-4f40-815d-3ae4d008a185_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4fe2c1e33ae5804a952c1d3cff676a6ac6f13f4793fbb50730f05b4325461ce2
|
| 3 |
+
size 546202
|
structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/full.md
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Structural Adapters in Pretrained Language Models for AMR-to-Text Generation
|
| 2 |
+
|
| 3 |
+
Leonardo F. R. Ribeiro†, Yue Zhang‡ and Iryna Gurevych†
|
| 4 |
+
|
| 5 |
+
†Ubiquitous Knowledge Processing Lab, Technical University of Darmstadt ‡School of Engineering, Westlake University ribeiro@aiphes.tu-darmstadt.de
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Pretrained language models (PLM) have recently advanced graph-to-text generation, where the input graph is linearized into a sequence and fed into the PLM to obtain its representation. However, efficiently encoding the graph structure in PLMs is challenging because such models were pretrained on natural language, and modeling structured data may lead to catastrophic forgetting of distributional knowledge. In this paper, we propose STRUCTADAPT, an adapter method to encode graph structure into PLMs. Contrary to prior work, STRUCTADAPT effectively models interactions among the nodes based on the graph connectivity, only training graph structure-aware adapter parameters. In this way, we incorporate task-specific knowledge while maintaining the topological structure of the graph. We empirically show the benefits of explicitly encoding graph structure into PLMs using STRUCTADAPT, outperforming the state of the art on two AMR-to-text datasets, training only $5.1\%$ of the PLM parameters. $^{1}$
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Data-to-text tasks aim to generate meaningful and coherent natural language text that faithfully conveys structured data. Some examples of structured information include tables (Parikh et al., 2020), Knowledge Graphs (KGs) (Gardent et al., 2017; Vougiouklis et al., 2018) and Abstract Meaning Representation (AMR) (Banarescu et al., 2013). In this work, we focus on AMR-to-text generation where the goal is to generate a fluent and grammatical sentence that is faithful to a given AMR graph (See Figure 1a). AMR is a semantic formalism that has received much research interest (Song et al., 2018; Guo et al., 2019; Ribeiro et al., 2019; Opitz et al., 2020, 2021; Fu et al., 2021) and has been shown to benefit downstream tasks
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: (a) AMR for the sentence More power to her for her achievements. While in (b) the pretrained model gets as input the graph linearization, in (c) it additionally receives the graph connectivity information.
|
| 17 |
+
|
| 18 |
+
such as text summarization (Liao et al., 2018) and machine translation (Song et al., 2019). Both statistical (Flanigan et al., 2016; Pourdamghani et al., 2016) and neural methods (Bai et al., 2020; Cai and Lam, 2020) have been investigated for AMR-to-text generation, and dominant methods make use of Graph Neural Networks (GNNs) (Kipf and Welling, 2017) or Transformers (Vaswani et al., 2017) for representing the input graph.
|
| 19 |
+
|
| 20 |
+
Pretrained language models (PLMs) (Devlin et al., 2019; Liu et al., 2020; Radford et al., 2019; Lewis et al., 2020) have been shown useful as a general text representation method, giving much improved results on a wide range of tasks (Wang et al., 2018, 2019). However, they cannot be directly leveraged to benefit AMR-to-text generation, and more generally graph-to-text generation, due to the structural nature of the input. One solution is to transform the structured input into a se
|
| 21 |
+
|
| 22 |
+
quence, which can be directly fed into PLMs (See Figure 1b). Recent studies (Mager et al., 2020; Harkous et al., 2020; Ribeiro et al., 2020a, 2021) transform AMRs into sequences by top-down linearization (Konstas et al., 2017). It has been shown that such linearized graph representation can be used to fine-tune a PLM and improve graph-to-text generation performances (Kale, 2020).
|
| 23 |
+
|
| 24 |
+
The above methods, however, suffer from two salient limitations. First, linearized graph structures are different in nature from natural language. As a result, knowledge from large-scale pretraining intuitively cannot be fully transferred, and finetuning a sentence representation using linearized graphs can lead to catastrophic forgetting of such distributional knowledge (Goodfellow et al., 2014; Kirkpatrick et al., 2017). Second, a linearized representation weakens structural information in the original graphs by diluting the explicit connectivity information (i.e., which nodes are connected to each other), and PLMs must infer how edge connections are specified in the sequence. This fact was also observed by Song et al. (2018), Beck et al. (2018) and Ribeiro et al. (2019), who show that GNN encoders outperform sequential encoders for AMR-to-text generation without pretraining.
|
| 25 |
+
|
| 26 |
+
To mitigate the issues, we aim to explicitly encode the graph data into a PLM without contaminating its original distributional knowledge. To this end, we propose STRUCTADAPT, a novel structure-aware adapter that effectively allows leveraging the input graph structure into PLMs (See Figure 1c). The main idea is to add layer-wise modules, which extract information from the pretrained layers and make use of it in a graph-structure encoding. As shown in Figure 2, STRUCTADAPT employs a graph convolution in order to learn representations built upon the graph connectivity over the PLM encoder. Because STRUCTADAPT is added to each encoder layer, deep integration of linguistic knowledge and graph knowledge can be achieved. During finetuning, only the adapter parameters are trained, whereas the PLM parameters remain unchanged, in contrast to previous methods based on the graph linearizations that fine-tune all model parameters.
|
| 27 |
+
|
| 28 |
+
Empirically we show that STRUCTADAPT significantly outperforms linearized fine-tuning baselines and naive sequential adapters (Houlsby et al., 2019). Moreover, STRUCTADAPT is more robust to different graph linearizations, better treats reentrancies (nodes with more than one entering edge) and long-
|
| 29 |
+
|
| 30 |
+
range node dependencies. Our proposed models, based on STRUCTADAPT, surpass the current state of the art on LDC2017T10 and LDC2020T02 datasets by up to 3.1 BLEU points, training only $5.1\%$ of the original PLM parameters.
|
| 31 |
+
|
| 32 |
+
# 2 Related Work
|
| 33 |
+
|
| 34 |
+
Fine-tuning for Graph-to-text Generation. While previous approaches (Song et al., 2018; Ribeiro et al., 2019; Cai and Lam, 2020; Schmitt et al., 2021; Zhang et al., 2020b) have shown that explicitly encoding the graph structure is beneficial, fine-tuning PLMs on linearized structured data has established a new level of performance in data-to-text generation (Nan et al., 2021; Kale, 2020; Ribeiro et al., 2021). Our work can be seen as integrating the advantage of both graph structure encoding and PLMs, using a novel adapter module.
|
| 35 |
+
|
| 36 |
+
Mager et al. (2020) employ cycle consistency to improve the adequacy of generated texts from AMRs using GPT-2 (Radford et al., 2019), whereas Harkous et al. (2020) train a classifier to rank candidate generations based on the semantic fidelity. Ribeiro et al. (2020a) investigate encoder-decoder PLMs for graph-to-text generation, and show that task-specific pretraining can lead to notable improvements and that PLMs benefit much more from the graph structure of AMRs than of KGs. Hoyle et al. (2021) explore the extent to which PLMs are invariant to graph linearization, finding that models trained on canonical linearizations fail to generalize to meaning-preserving alternatives. Compared to this line of work, which tunes all PLM parameters, our method obtains a further $19\mathrm{x}$ reduction in task-specific parameters, tuning only $5.1\%$ of the parameters while achieving state-of-the-art performance, being more robust to permutations of the graph representation and better encoding larger graphs.
|
| 37 |
+
|
| 38 |
+
Lightweight Fine-tuning. Recently, different approaches have emerged as an alternative training strategy in order to avoid fine-tuning all parameters of a PLM. Zhang et al. (2019) train a lightweight "side" network that is fused with the pretrained model via summation. Li and Liang (2021) propose to prepend a trainable continuous prefix as an alternative to adapters, maintaining comparable performance in data-to-text tasks using fewer trained parameters. Liu et al. (2021) develop a method to automatically search prompts in the continuous space and evaluate it in few-shot NLU tasks. Ham-
|
| 39 |
+
|
| 40 |
+
bardzumyan et al. (2021) propose adversarial reprogramming attempts to learn task-specific word embeddings to customize the language model for the downstream task.
|
| 41 |
+
|
| 42 |
+
Adapter-based approaches (Houlsby et al., 2019; Rebuffi et al., 2017; Lauscher et al., 2020; Pfeiffer et al., 2020a, 2021) introduce a small number of task specific parameters, keeping the underlying pretrained model fixed. Pfeiffer et al. (2020b) propose an adapter method to arbitrary tasks and languages by learning modular language and task representations. The above works are related to STRUCTADAPT as it trains much fewer parameters, but also different because they do not explicitly encode the input structure, whereas STRUCTADAPT directly aims to encode it.
|
| 43 |
+
|
| 44 |
+
# 3 Graph-to-Text Model
|
| 45 |
+
|
| 46 |
+
Let $\mathcal{G}_0 = (\mathcal{V}_0, \mathcal{E}_0, \mathcal{R}_0)$ denote a rooted and directed AMR graph with a node set $\mathcal{V}_0$ and labeled edges $(u, r, v) \in \mathcal{E}_0$ , where $u, v \in \mathcal{V}_0$ and $r \in \mathcal{R}_0$ is a relation type. An example of an AMR graph and its corresponding sentence is shown in Figure 1a.
|
| 47 |
+
|
| 48 |
+
# 3.1 Encoder-Decoder Architecture
|
| 49 |
+
|
| 50 |
+
Consider a conditional generation task where the input is a context $x$ and the output $y = \langle y_1, \ldots, y_{|y|} \rangle$ is a sequence of tokens. In AMR-to-text generation, the context $x$ is the AMR graph and $y$ is the sentence that describes the AMR graph in natural language.
|
| 51 |
+
|
| 52 |
+
Let $p_{\phi}(y \mid x)$ denote a PLM parametrized by $\phi$ , where $x$ is encoded by a bidirectional encoder, and the decoder predicts $y$ autoregressively, conditioned on the encoded $x$ and its left context. We focus on PLMs based on the Transformer encoder-decoder architecture (Vaswani et al., 2017), as they are suitable for conditional text generation. We define $x = \mathrm{LIN}(\mathcal{G}_0)$ , where LIN is a function that linearizes $\mathcal{G}_0$ into a sequence of tokens. Following Damonte and Cohen (2019), as shown in Figure 1b, we linearize the AMR into a sequence of nodes and edges using the depth-first traversal of the canonical human-created AMR. In a nutshell, the hidden representation $\mathbf{h}_i^l \in \mathbb{R}^d$ , for all $x_i \in x$ , is computed by the encoder layer $l$ , where $d$ is the hidden dimension. The decoder hidden representation $\hat{\mathbf{h}}_i^l \in \mathbb{R}^d$ is computed by the layer $l$ of the
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
|
| 58 |
+

|
| 59 |
+
Figure 2: Integration of the adapter modules with the (a) encoder and (b) decoder layers of the Transformer; layer normalization and residual connections are omitted for clarification. (c) ADAPT with two feed-forwards layers. (d) STRUCTADAPT encodes the graph structure using a graph convolutional layer.
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
|
| 63 |
+
autoregressive decoder at time step $i$ .
|
| 64 |
+
|
| 65 |
+
# 3.2 Fine-tuning
|
| 66 |
+
|
| 67 |
+
The model is initialized with pretrained parameters $\phi$ (e.g. using T5, Raffel et al., 2019) and fine-tuned to optimize the following log-likelihood objective over each gold instance $(x,y)$ :
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\max _ {\phi} \log p _ {\phi} (y \mid x) = \sum_ {i = 1} ^ {| y |} \log p _ {\phi} \left(y _ {i} \mid y _ {1: i - 1}, x\right). \tag {1}
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
# 3.3 Baseline Adapter
|
| 74 |
+
|
| 75 |
+
We employ an adapter module after the feedforward sub-layer of each layer on both encoder (Figure 2a) and decoder (Figure 2b) of the PLM. We modify the adapter architecture from Houlsby et al. (2019), computing the adapter representation at each layer $l$ , given the encoder layer representation $\mathbf{h}_i^l$ (or $\hat{\mathbf{h}}_i^l$ in the decoder), as follows:
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
\hat {\mathbf {z}} _ {i} = \mathbf {W} _ {o} ^ {l} \left(\sigma \left(\mathbf {W} _ {p} ^ {l} \sqcup \mathbb {N} \left(\mathbf {h} _ {i} ^ {l}\right)\right)\right) + \mathbf {h} _ {i} ^ {l}, \tag {2}
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
where $\sigma$ is the activation function and $\mathsf{LN}(\cdot)$ denotes layer normalization. $\mathbf{W}_o^l\in \mathbb{R}^{d\times m}$ and $\mathbf{W}_p^l\in$ $\mathbb{R}^{m\times d}$ are adapter parameters, and $m$ is the hidden dimension of the adapter. Figure 2c illustrates the baseline adapter module, which we call ADAPT.
|
| 82 |
+
|
| 83 |
+
Training. Let the set of adapters' parameters for the encoder and decoder layers be parametrized by $\theta$ . The training objective is the same as Equation (1), but the set of trainable parameters changes: the PLM parameters $\phi$ are frozen and the adapter parameters $\theta$ are the only trainable parameters. In contrast to fine-tuning, adapters substantially reduce the number of trainable parameters that are used to adapt the PLM to the downstream task.
|
| 84 |
+
|
| 85 |
+
# 3.4 Limitation
|
| 86 |
+
|
| 87 |
+
Intuitively, the connection between nodes in the input graph can influence the encoding of $x$ by guiding what to extract from $x$ in order to generate $y$ . Note that in both fine-tuning and ADAPT approaches, the self-attention mechanisms of the encoder layers treat the sequence of nodes and edges $x$ essentially as a fully connected graph, greatly diluting the original graph structure. In this way, the model has to retrieve the original connectivity of the graph from $x$ . For example, the AMR linearization in Figure 1b has two mentions of the node she, and the model should capture that both mentions belong to the same node in the original graph.
|
| 88 |
+
|
| 89 |
+
# 4 Structural Adapter
|
| 90 |
+
|
| 91 |
+
We propose STRUCTADAPT, a lightweight alternative to injecting structural inductive bias into PLMs.
|
| 92 |
+
|
| 93 |
+
We first describe the intuition in §4.1 and define our method formally in §4.3.
|
| 94 |
+
|
| 95 |
+
# 4.1 Intuition
|
| 96 |
+
|
| 97 |
+
Injecting graph structural bias into graph-to-text models trained from scratch improves the performance compared to linearized approaches (Damonte and Cohen, 2019; Ribeiro et al., 2019). However, it is not straightforward how to effectively model the input graph structure when fine-tuning PLMs, which usually are pretrained using natural language and not structured data.
|
| 98 |
+
|
| 99 |
+
Our key idea is modeling the graph connectivity in the encoder utilizing an adapter module, using information flows between adjacent nodes in a message-passing update, employing a graph convolution (see Figure 2d). In this way, the graph structure substantially impacts the node representations, better encoding the input graph without impacting the knowledge learned during pretraining. This can
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
e)
|
| 105 |
+
|
| 106 |
+

|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 3: An example of (a) an AMR graph structure, (b) its unlabeled version and three different subword representations: (c) rep1, (d) rep2 and (e) rep3.
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
|
| 113 |
+
lead to more efficient and better AMR-to-text generation as we will show in §5 and §6. Moreover, different adapters for distinct graph domains can be used with the same PLM, yielding a high degree of parameter sharing for graph-to-text tasks.
|
| 114 |
+
|
| 115 |
+
# 4.2 Graph Representation
|
| 116 |
+
|
| 117 |
+
We convert each $\mathcal{G}_0$ into a bipartite graph $\mathcal{G}_1 = (\mathcal{V}_1, \mathcal{E}_1)$ , replacing each labeled edge $(u, r, v) \in \mathcal{E}_0$ with two unlabeled edges $e_1 = (u, r)$ and $e_2 = (r, v)$ . Similar to Beck et al. (2018), this process converts the graph into its unlabeled version. Figure 3 shows an (a) AMR subgraph and (b) its unlabeled representation.
|
| 118 |
+
|
| 119 |
+
Note that PLMs typically use a vocabulary with subword units (Sennrich et al., 2016). This presents a challenge in how to represent such a graph using subword tokens. Inspired by Ribeiro et al. (2020b), we transform each $\mathcal{G}_1$ into a new token graph $\mathcal{G} = (\mathcal{V},\mathcal{E})$ , where each token of a node in $\mathcal{V}_1$ becomes a node $v\in \mathcal{V}$ . We convert each edge $(u_{1},v_{1})\in \mathcal{E}_{1}$ into a set of edges and connect every token of $u_{1}$ to every token of $v_{1}$ . That is, an edge $(u,v)$ will belong to $\mathcal{E}$ if and only if there exists an edge $(u_1,v_1)\in \mathcal{E}_1$ such that $u\in u_{1}$ and $v\in v_{1}$ , where $u_{1}$ and $v_{1}$ are seen as sets of tokens. Figure 3c shows an example of the token graph.
|
| 120 |
+
|
| 121 |
+
# 4.3 Method
|
| 122 |
+
|
| 123 |
+
STRUCTADAPT employs a two-layer architecture in order to re-purpose the PLM for the graph-to-text task using a small number of new parameters. Formally, for each node $v \in \mathcal{V}$ , given the hidden representation $\mathbf{h}_v^l$ from the encoder layer $l$ , STRUCTADAPT computes:
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\begin{array}{l} \mathbf {g} _ {v} ^ {l} = \operatorname {G r a p h C o n v} _ {l} (\mathsf {L N} \left(\mathbf {h} _ {v} ^ {l}\right), \{\mathsf {L N} \left(\mathbf {h} _ {u} ^ {l}\right): u \in \mathcal {N} (v) \}) \\ \mathbf {z} _ {v} ^ {l} = \mathbf {W} _ {e} ^ {l} \sigma \left(\mathbf {g} _ {v} ^ {l}\right) + \mathbf {h} _ {v} ^ {l}, \end{array} \tag {3}
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
where $\mathcal{N}(v)$ is the immediate neighborhood of $v$ in $\mathcal{G}$ . GraphConv $_l(\cdot)$ is the graph convolution that computes the node representation based on the local neighborhood of $v$ , and $\mathbf{W}_e^l \in \mathbb{R}^{d \times m}$ is a parameter. Figure 2d illustrates STRUCTADAPT.
|
| 130 |
+
|
| 131 |
+
Graph Convolution. The graph convolutional layer allows exploration of distinct strategies for neighborhood aggregation in order to model structural information of the input graph. Different GNN architectures (Velickovic et al., 2018; Xu et al., 2019) can be employed as the graph convolution. Moreover, in this way, we avoid changing the self-attention mechanism of the current pretrained encoder, allowing to also capture global information based on the pretrained knowledge.
|
| 132 |
+
|
| 133 |
+
Our graph convolution is based on the Graph Convolutional Network (GCN) proposed by Kipf and Welling (2017). At each layer $l$ , we compute the representation of a node $v \in \mathcal{V}$ as follows:
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
\mathbf {g} _ {v} ^ {l} = \sum_ {u \in \mathcal {N} (v)} \frac {1}{\sqrt {d _ {v} d _ {u}}} \mathbf {W} _ {g} ^ {l} \mathbf {h} _ {u} ^ {l}, \tag {4}
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
where $\mathcal{N}(v)$ is a set of nodes with incoming edges to $v$ and $v$ itself, $d_v$ is the degree of $v$ , and $\mathbf{W}_g^l \in \mathbb{R}^{m \times d}$ is a parameter.
|
| 140 |
+
|
| 141 |
+
We also consider the variant relational GCN (RGCN) (Schlichtkrull et al., 2018) as graph convolution. RGCN allows capturing the reverse edge direction so that we can consider the differences in the incoming and outgoing relations, which has shown to be beneficial (Beck et al., 2018). In particular, the node representation is computed as:
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
\mathbf {g} _ {v} ^ {l} = \sum_ {r \in \mathcal {R}} \sum_ {u \in \mathcal {N} _ {r} (v)} \frac {1}{| \mathcal {N} _ {r} (v) |} \mathbf {W} _ {r} ^ {l} \mathbf {h} _ {u} ^ {l}, \tag {5}
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
where $\mathcal{R}$ denotes the set of relations, i.e., the edge types default and reverse, $\mathcal{N}_r(v)$ denotes the set of neighbors under relation $r\in \mathcal{R}$ , and $\mathbf{W}_r^l\in \mathbb{R}^{m\times d}$ encodes the edge type between the nodes $u$ and $v$ .
|
| 148 |
+
|
| 149 |
+
Note that $\mathbf{STRUCTADAPT}$ computes the refined structural node representation $\mathbf{z}_v^l$ based on the local node context, using as input the global representation $\mathbf{h}_v^l$ generated by the current PLM encoder layer. In this way, the model is able to capture both the global context based on the PLM linguistic knowledge and the local context based on the graph knowledge. Finally, we employ ADAPT into the decoder in order to adapt the language model to the graph-to-text task.
|
| 150 |
+
|
| 151 |
+
<table><tr><td></td><td>BLEU</td><td>chrF++</td><td>M</td><td>BERT</td></tr><tr><td>Mager et al. (2020)</td><td>33.0</td><td>63.9</td><td>-</td><td>-</td></tr><tr><td>Zhang et al. (2020b)</td><td>33.6</td><td>63.2</td><td>-</td><td>-</td></tr><tr><td>Harkous et al. (2020)</td><td>37.7</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Hoyle et al. (2021)</td><td>44.9</td><td>-</td><td>76.54</td><td>-</td></tr><tr><td>Ribeiro et al. (2020a)</td><td>45.8</td><td>72.5</td><td>-</td><td>-</td></tr></table>
|
| 152 |
+
|
| 153 |
+
<table><tr><td></td><td colspan="4">T5base</td></tr><tr><td>FINE-TUNE</td><td>38.3±0.3</td><td>68.6±0.1</td><td>77.8±0.3</td><td>95.5±0.1</td></tr><tr><td>FT-TOP2(14.8%)</td><td>29.9±0.1</td><td>63.0±0.1</td><td>74.1±0.2</td><td>94.4±0.2</td></tr><tr><td>FT-Bottom2(14.8%)</td><td>35.9±0.3</td><td>67.0±0.2</td><td>76.9±0.1</td><td>95.3±0.1</td></tr><tr><td>ADAPT(8.5%)</td><td>38.7±0.4</td><td>69.2±0.2</td><td>78.3±0.1</td><td>95.6±0.1</td></tr><tr><td>STRUCTADAPT-GCN(2.1%)</td><td>39.0±0.3</td><td>69.1±0.2</td><td>78.4±0.2</td><td>95.7±0.2</td></tr><tr><td>STRUCTADAPT-GCN(8.5%)</td><td>41.0±0.5</td><td>70.0±0.2</td><td>78.4±0.1</td><td>95.7±0.1</td></tr><tr><td>STRUCTADAPT-RGCN(6.3%)</td><td>44.0±0.3</td><td>71.2±0.2</td><td>79.4±0.1</td><td>95.9±0.2</td></tr></table>
|
| 154 |
+
|
| 155 |
+
<table><tr><td></td><td colspan="4">T5large</td></tr><tr><td>FINE-TUNE</td><td>41.2±0.5</td><td>70.2±0.2</td><td>78.0±0.1</td><td>95.8±0.2</td></tr><tr><td>FT-TOP2(7.9%)</td><td>28.8±0.4</td><td>61.8±0.5</td><td>73.9±0.2</td><td>94.1±0.2</td></tr><tr><td>FT-Bottom2(7.9%)</td><td>37.6±0.3</td><td>68.0±0.2</td><td>77.2±0.2</td><td>95.5±0.1</td></tr><tr><td>ADAPT(6.8%)</td><td>42.9±0.3</td><td>71.6±0.2</td><td>78.9±0.1</td><td>96.1±0.1</td></tr><tr><td>STRUCTADAPT-GCN(1.7%)</td><td>44.1±0.4</td><td>71.8±0.3</td><td>79.1±0.1</td><td>96.1±0.2</td></tr><tr><td>STRUCTADAPT-GCN(6.8%)</td><td>45.8±0.2</td><td>72.5±0.1</td><td>79.3±0.2</td><td>96.2±0.1</td></tr><tr><td>STRUCTADAPT-RGCN(5.1%)</td><td>46.6±0.3</td><td>72.9±0.2</td><td>79.6±0.1</td><td>96.3±0.1</td></tr></table>
|
| 156 |
+
|
| 157 |
+
Table 1: Results on the LDC2017T10 test set. Mean (±s.d.) over 4 seeds.
|
| 158 |
+
|
| 159 |
+
# 5 Experiments
|
| 160 |
+
|
| 161 |
+
Our models are initialized with pre-trained T5 (Raffel et al., 2019), but our approach can be combined with other PLMs such as BART (Lewis et al., 2020). Our implementation is based on Hugging Face Transformer models (Wolf et al., 2019). We use $\mathrm{T}5_{\mathrm{base}}$ for all experiments and report results with $\mathrm{T}5_{\mathrm{large}}$ for the test sets. We use the Adam optimizer (Kingma and Ba, 2015) and employ a linearly decreasing learning rate schedule without warm-up. BLEU is used for the stopping criterion. Following recent work (Mager et al., 2020; Zhang et al., 2020b), we evaluate our proposed models on LDC2017T10 and LDC2020T02 corpora.
|
| 162 |
+
|
| 163 |
+
Evaluation. We evaluate the results with BLEU (Papineni et al., 2002) and $\mathrm{chrF}++$ (Popovic, 2015) metrics. We also report the meaning $(\mathcal{M})$ component of the $\mathcal{MF}$ -score (Opitz and Frank, 2021), which measures how well the source AMR graph can be reconstructed from the generated sentence. We use BERTScore (Zhang et al., 2020a) allowing a semantic evaluation that depends less on the surface forms. Finally, we also perform a human evaluation ( $\S 5.2$ ).
|
| 164 |
+
|
| 165 |
+
# 5.1 Main Results
|
| 166 |
+
|
| 167 |
+
We compare STRUCTADAPT with four methods: finetuning (FINE-TUNE), fine-tuning only the top or bottom 2 layers (FT-TOP2, FT-BOTTM2) and ADAPT. All
|
| 168 |
+
|
| 169 |
+
<table><tr><td></td><td>BLEU</td><td>chrF++</td><td>M</td><td>BERT</td></tr><tr><td>Zhang et al. (2020b)</td><td>34.3</td><td>63.7</td><td>-</td><td>-</td></tr><tr><td>Bevilacqua et al. (2021)</td><td>44.9</td><td>72.9</td><td>-</td><td>-</td></tr><tr><td colspan="5">T5large</td></tr><tr><td>FINE-TUNE</td><td>41.6±0.6</td><td>70.4±0.5</td><td>78.5±0.2</td><td>96.0±0.1</td></tr><tr><td>FT-TOP2(7.9%)</td><td>33.4±0.5</td><td>63.5±0.3</td><td>73.4±0.4</td><td>94.3±0.1</td></tr><tr><td>FT-Bottom2(7.9%)</td><td>38.2±0.2</td><td>68.3±0.1</td><td>78.1±0.2</td><td>95.6±0.1</td></tr><tr><td>ADAPT(6.8%)</td><td>43.0±0.2</td><td>71.3±0.2</td><td>79.3±0.1</td><td>96.2±0.1</td></tr><tr><td>STRUCTADAPT-GCN(1.7%)</td><td>46.2±0.2</td><td>71.8±0.2</td><td>79.4±0.3</td><td>96.0±0.2</td></tr><tr><td>STRUCTADAPT-GCN(6.8%)</td><td>47.1±0.4</td><td>72.5±0.1</td><td>79.7±0.2</td><td>96.2±0.1</td></tr><tr><td>STRUCTADAPT-RGCN(5.1%)</td><td>48.0±0.2</td><td>73.2±0.1</td><td>80.1±0.3</td><td>96.3±0.1</td></tr></table>
|
| 170 |
+
|
| 171 |
+
models use the same graph linearization generated by the depth-first traversal. We also report recent state-of-the-art results on both datasets. Tables 1 and 2 show the results.
|
| 172 |
+
|
| 173 |
+
We find that training only $5.1\%$ task-specific parameters, STRUCTADAPT-RGCN achieves a BLEU score of 46.6 in LDC2017T10, substantially improving over FINE-TUNE and other lightweight baselines (ADAPT, FT-TOP2, FT-BOTTM2), and outperforming Ribeiro et al. (2020a) and Hoyle et al. (2021) which fine-tune T5 updating significantly more parameters. STRUCTADAPT also achieves state-of-the-art performance on LDC2020T02, considerably improving over Bevilacqua et al. (2021), which implicitly models the graph structure information using linearization techniques.
|
| 174 |
+
|
| 175 |
+
In general, STRUCTADAPT is better than ADAPT when training the same number of parameters, and slightly better even when training only $1.7\%$ of the parameters for both datasets. This highlights that the gains not only come from using an adapter architecture, but from considering the graph connectivity. STRUCTADAPT-RGCN is more effective than STRUCTADAPT-GCN using fewer parameters, demonstrating that considering reverse relations is advantageous. ADAPT is consistently better than FINETUNE, agreeing with our intuition of catastrophic forgetting when fine-tuning. Interestingly, in contrast to popular strategies that focus on upper layers in fine-tuning (Howard and Ruder, 2018; Houlsby et al., 2019; Li and Liang, 2021), FT-BOTTM2's performance is better than FT-TOP2's, suggesting that lower layers have a significant impact in adapting the PLM to structured data.
|
| 176 |
+
|
| 177 |
+
Different from our work, both Mager et al. (2020) and Ribeiro et al. (2020a) use the PENMAN notation which makes the input much longer (containing more tokens), and demonstrate that this representation is able to achieve strong results – this is orthogonal to our STRUCTADAPT representation and
|
| 178 |
+
|
| 179 |
+
Table 2: Results on the LDC2020T02 test set.
|
| 180 |
+
|
| 181 |
+
<table><tr><td>Graph Size</td><td>ADAPT</td><td>STRUCTADAPT-RGCN</td></tr><tr><td>All</td><td>5.6A</td><td>6.1B</td></tr><tr><td>01-30</td><td>6.1A</td><td>6.2A</td></tr><tr><td>31-60</td><td>5.4A</td><td>5.4A</td></tr><tr><td>>60</td><td>5.2A</td><td>6.2B</td></tr></table>
|
| 182 |
+
|
| 183 |
+
Table 3: Meaning similarity obtained in the human evaluation. The ranking was determined by Mann-Whitney tests with $p < 0.05$ . Difference between systems which have a letter in common is not statistically significant.
|
| 184 |
+
|
| 185 |
+
can be incorporated in future work.
|
| 186 |
+
|
| 187 |
+
Overall, the results indicate that explicitly considering the graph structure using an adapter mechanism is effective for AMR-to-text generation, significantly reducing the number of trained parameters while improving generation quality.
|
| 188 |
+
|
| 189 |
+
# 5.2 Human Evaluation
|
| 190 |
+
|
| 191 |
+
To further assess the quality of the generated texts by the adapter-based models in LDC2020T02, we conduct a human evaluation via crowdsourcing using Amazon Mechanical Turk. We follow previous work (Ribeiro et al., 2019; Castro Ferreira et al., 2019) and evaluate the meaning similarity, i.e., how close in meaning is the generated text to the reference sentence.<sup>7</sup> We divide the datapoints into 3 different sets by the graph size, i.e., the number of nodes, after converting edges into nodes (cf. §4.2). This setting allows us to evaluate the performance of the models based on the complexity of the AMR graph.
|
| 192 |
+
|
| 193 |
+
We randomly select 100 generated texts for each set and each model (total of 600), which annotators then rate on a 1-7 Likert scale. For each text we collect scores from 3 annotators and use MACE (Hovy et al., 2013), a Bayesian model that incorporates the reliability of individual workers, to merge sentence-level labels. Table 3 shows that STRUCTADAPT improves the meaning similarity over ADAPT with statistically significant margins $(p < 0.05)$ . Note that the gains mainly come from datapoints with $>60$ nodes, indicating that STRUCTADAPT is better when encoding larger graphs.
|
| 194 |
+
|
| 195 |
+
# 5.3 Detailed Discussion
|
| 196 |
+
|
| 197 |
+
Parameter/Performance Trade-off. We investigate how the number of parameters affects the models. A higher hidden dimensionality means more
|
| 198 |
+
|
| 199 |
+

|
| 200 |
+
Figure 4: (a) Impact (measure with BLEU) of the number of parameters in the LDC2017T10 dev set. (b) Performance in the LDC2017T10 test set when experimenting with different amounts of training data.
|
| 201 |
+
|
| 202 |
+
trainable parameters, and smaller adapters introduce fewer parameters at a possible cost to performance. That is, the adapter size controls the parameter efficiency. Figure 4a shows the effect of the number of trained parameters in the performance measured using BLEU. Each point in the ADAPT and STRUCTADAPT curves represents a hidden dimension in the range [8, 16, . . ., 2048]. STRUCTADAPT-GCN is consistently better than ADAPT over all model capacities, even though both approaches train the same number of parameters. STRUCTADAPT-RGCN achieves similar performance than FINE-TUNE when training only $0.8\%$ of the parameters whereas ADAPT achieves similar performance to $8.5\%$ , demonstrating the effectiveness of injecting the graph structure into the PLM.
|
| 203 |
+
|
| 204 |
+
Low-data Setting. Previous work (Li and Liang, 2021) has shown that lightweight fine-tuning has an advantage in some generation tasks when the training size is smaller. Therefore, we investigate how STRUCTADAPT behaves in a low-data setting. We subsample the LDC2017T10 training set to analyze different smaller training sets. For each size, we sample 5 different datasets and average over 2 training random seeds. Thus, we average over 10 models to get an estimate for each low-data setting. Figure 4b shows the results. First note that both adapter-based approaches improve over FINETUNE. When training with only 1000 datapoints, STRUCTADAPT outperforms FINETUNE by 8.2 BLEU points. Also note that the gap between ADAPT and FINETUNE decreases when the size of the training set increases. In general, STRUCTADAPT outperforms FINETUNE and ADAPT in low-resource scenarios by 7.3 and 4.8 BLEU points on average, respectively, whereas requiring much fewer trained parameters
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
|
| 208 |
+
<table><tr><td>REFERENCE: Me and my son's father have been broken up since August.</td></tr><tr><td>FINE-TUNE-2000: I've broken up with my son and father since August.</td></tr><tr><td>FINE-TUNE: I've been with my son's father since August.</td></tr><tr><td>STRUCTADAPT-2000: Since August 8 I have broken up with my son's father.</td></tr><tr><td>STRUCTADAPT: I've been breaking up with my son's father since August.</td></tr></table>
|
| 209 |
+
|
| 210 |
+
Table 4: An example of an AMR graph and generated sentences by different models trained on full data and on a low-data setting with 2000 datapoints.
|
| 211 |
+
|
| 212 |
+
than FINE-TUNE and fewer number of parameters than ADAPT.
|
| 213 |
+
|
| 214 |
+
Case Study. We perform a case study to provide a better understanding of the STRUCTADAPT's performance. Table 4 shows an AMR graph in PENMAN notation containing reentrancies (marked in bold) and sentences generated by FINE-TUNE and STRUCTADAPT trained on the LDC2017T10 full training set and in a low-data setting where the models are trained with 2000 data points. FINE-TUNE fails in generating a sentence with the correct concept break-up whereas STRUCTADAPT correctly generates a sentence that describes the input graph. The incorrect verb tense is due to lack of tense information in AMR. FINE-TUNE-2000 mixes the semantic relation between $I$ and $son$ (i.e., mistranslation of the edges in the graph) whereas STRUCTADAPT-2000 generates a correct sentence (except by generating the number 8). Overall, STRUCTADAPT produces a more accurate text output than FINE-TUNE by generating correct pronouns and mentions when control verbs and reentrancies are involved, in both full and low-data scenarios.
|
| 215 |
+
|
| 216 |
+
Model Variations. In Table 5, we report an ablation study on the impact of distinct adapter components, using adapters only in the encoder or decoder. We evaluate different architecture configurations keeping the same number of parameters for a fair comparison. We find that only training adapters in
|
| 217 |
+
|
| 218 |
+
<table><tr><td></td><td>BLEU</td><td>BERT</td></tr><tr><td>FINE-TUNE</td><td>38.5</td><td>95.6</td></tr><tr><td>ADAPT ONLY ENC</td><td>38.5</td><td>95.7</td></tr><tr><td>ADAPT ONLY DEC</td><td>11.6</td><td>90.3</td></tr><tr><td>ADAPT ENC + DEC</td><td>38.6</td><td>95.6</td></tr><tr><td>STRUCTADAPT-GCN ONLY ENC</td><td>40.3</td><td>95.9</td></tr><tr><td>STRUCTADAPT-GCN ENC + DEC</td><td>41.7</td><td>96.0</td></tr></table>
|
| 219 |
+
|
| 220 |
+
the decoder is not sufficient for a good performance, even having the same number of parameters. This suggests that adapting the PLM encoder to handle graph structures is key in AMR-to-text tasks. Interestingly, the model that only employs STRUCTADAPT in the encoder (i.e., no ADAPT is used in the decoder) has a better performance (+1.7 BLEU) than using ADAPT in both encoder and decoder, highlighting STRUCTADAPT's strong graph encoding abilities. Finally, the best performance is achieved when we employ STRUCTADAPT in the encoder and ADAPT in the decoder, reaching 41.7 BLEU points.
|
| 221 |
+
|
| 222 |
+
# 6 Graph Representation Evaluation
|
| 223 |
+
|
| 224 |
+
In this section, we explore how different graph properties impact the models' abilities to encode the input graph structure.
|
| 225 |
+
|
| 226 |
+
# 6.1 Impact of the Graph Representation
|
| 227 |
+
|
| 228 |
+
Inspired by Damonte and Cohen (2019), we investigate two different approaches when linearizing the AMR: (i) only nodes have explicit representations, whereas edge relations are represented by the adapter parameters using the RGCN;[10] and (ii) the sequence of nodes and edges using depth-first traversal of the graph.
|
| 229 |
+
|
| 230 |
+
We also propose and evaluate three different graph structures based on subwords (cf. §4.2): rep1: for each edge, we connect every token from the source node to every token of the target node; rep2: we connect the last token of the source node to the first token of the target node and connect the tokens of a node sequentially; rep3: we connect the first token of the source node to the first token of the target node and connect the token of a node sequentially. Figure 3 shows an example of the three representations for an AMR graph structure.
|
| 231 |
+
|
| 232 |
+
Table 5: Impact of the adapter modules in the encoder or decoder in the LDC2017T10 dev set. All adapter-based models have the same number of parameters.
|
| 233 |
+
|
| 234 |
+
<table><tr><td>Linearization</td><td>Graph Representation</td><td>BLEU</td><td>BERT</td></tr><tr><td rowspan="3">(i) only nodes</td><td>rep1</td><td>39.1</td><td>95.8</td></tr><tr><td>rep2</td><td>38.5</td><td>95.6</td></tr><tr><td>rep3</td><td>38.9</td><td>95.7</td></tr><tr><td rowspan="4">(ii) nodes and edges</td><td>rep1</td><td>41.7</td><td>96.0</td></tr><tr><td>rep2</td><td>40.4</td><td>95.8</td></tr><tr><td>rep3</td><td>40.8</td><td>95.9</td></tr><tr><td>complete graph</td><td>39.4</td><td>95.8</td></tr></table>
|
| 235 |
+
|
| 236 |
+
Table 6: Performance on the LDC2017T10 dev set when using different graph representation strategies.
|
| 237 |
+
|
| 238 |
+
Additionally, we also investigate a fully connected graph structure (complete graph), that is, similarly to the self-attention mechanism in Transformers, all nodes and edges are connected.
|
| 239 |
+
|
| 240 |
+
As shown in Table 6, explicitly considering nodes and edges in the graph linearization is beneficial. This approach has the advantage of allowing the model to handle new edge relations during inference, as they are not encoded as model parameters. Note that the complete graph representation has relatively inferior performance, again demonstrating the advantage of explicitly encoding the input graph connectivity.
|
| 241 |
+
|
| 242 |
+
Finally, we observe that the best configuration is using nodes and edges with $rep1$ (see an example in Figure 3c). We believe that this is because $rep1$ allows direct interactions between all source and target tokens, making all token representations of an AMR node directly influenced by the neighbouring tokens.
|
| 243 |
+
|
| 244 |
+
# 6.2 Robustness to Graph Linearization
|
| 245 |
+
|
| 246 |
+
A critical advantage of modeling the graph structure is to be less dependent on linearization strategies because the graph connectivity is invariant to the graph linearization. We thus are interested in measuring the impact of the graph linearization in the models.
|
| 247 |
+
|
| 248 |
+
Following Hoyle et al. (2021), we investigate three different graph linearizations: (i) CANON: the original order of the canonical human-created linearizations in AMR corpora; (ii) RECONF: the order from the canonical graph linearization is ignored, except for the top node;[11] and (iii) RANDOM: constructs a linearization from a random node in the graph, disregarding all order information from the canonical format, but it remains a valid traversal of the graph. All linearizations are converted to a
|
| 249 |
+
|
| 250 |
+
<table><tr><td></td><td>CANON</td><td>RECONF</td><td>RANDOM</td></tr><tr><td>FINE-TUNE</td><td>38.0</td><td>35.6</td><td>31.3</td></tr><tr><td>ADAPT</td><td>+0.9</td><td>+0.8</td><td>+0.9</td></tr><tr><td>STRUCTADAPT-RGCN</td><td>+4.1</td><td>+3.6</td><td>+5.9</td></tr></table>
|
| 251 |
+
|
| 252 |
+
sequence of node and edge labels using depth-first traversal and used for both training and evaluation. Examples of such graph linearizations are shown in Appendix C.
|
| 253 |
+
|
| 254 |
+
Table 7 presents the results. Note that while RECONF has a negative impact on all models, STRUCTADAPT has the best performance. ADAPT has similar performance gains over FINE-TUNE in all graph linearizations. Finally, note that for RANDOM, there is a drastic performance drop in FINE-TUNE and the gap between STRUCTADAPT and FINE-TUNE is widest $(+5.9$ BLEU), demonstrating that explicitly encoding the graph structure is beneficial and that STRUCTADAPT is much less impacted by different graph linearizations.
|
| 255 |
+
|
| 256 |
+
# 6.3 Graph Properties
|
| 257 |
+
|
| 258 |
+
Table 8 shows the effects of the graph size, graph diameter and reentrancies in the performance. First, note that the BLEU scores decrease as the graph size increases since larger graphs often are more complex. The performance gap between STRUCTADAPT and FINE-TUNE becomes larger for relatively larger graphs, showing that STRUCTADAPT is able to better encode complex graphs. As ADAPT is not aware of the graph connectivity, it has much worse scores compared to STRUCTADAPT, especially for larger graphs.
|
| 259 |
+
|
| 260 |
+
It is expected that the benefit of the STRUCTADAPT will be more evident for AMR graphs containing larger diameter as the encoder is aware of the input graph structure. As seen in Table 8, similarly to the graph size, the scores decrease as the graph diameter increases. STRUCTADAPT achieves a clear improvement when handling graphs with $\geq 20$ diameter, with a improvement of $+4.2$ BLEU points over FINE-TUNE.
|
| 261 |
+
|
| 262 |
+
Previous work (Damonte and Cohen, 2019; Szubert et al., 2020) showed that reentrancies (nodes with multiple parents) pose difficulties in encoding AMRs correctly. Because STRUCTADAPT is the only approach to model reentrancies explicitly, we expect it to deal better with these structures. The
|
| 263 |
+
|
| 264 |
+
Table 7: Differences, with respect to FINE-TUNE, in the BLEU score of the LDC2017T10 test set as a function of different graph linearizations.
|
| 265 |
+
|
| 266 |
+
<table><tr><td>graph size</td><td>1-30</td><td>31-60</td><td>>60</td></tr><tr><td># datapoints</td><td>548</td><td>537</td><td>286</td></tr><tr><td>FINE-TUNE</td><td>40.6</td><td>37.3</td><td>38.1</td></tr><tr><td>ADAPT</td><td>+0.5</td><td>+1.4</td><td>+1.1</td></tr><tr><td>STRUCTADAPT-RGCN</td><td>+2.3</td><td>+4.0</td><td>+4.6</td></tr><tr><td>graph diameter</td><td>1-10</td><td>11-20</td><td>>20</td></tr><tr><td># datapoints</td><td>384</td><td>769</td><td>218</td></tr><tr><td>FINE-TUNE</td><td>43.3</td><td>37.6</td><td>38.5</td></tr><tr><td>ADAPT</td><td>-0.1</td><td>+1.7</td><td>+0.3</td></tr><tr><td>STRUCTADAPT-RGCN</td><td>+0.5</td><td>+4.3</td><td>+4.2</td></tr><tr><td># reentrancies</td><td>0</td><td>1-3</td><td>4-20</td></tr><tr><td># datapoints</td><td>619</td><td>664</td><td>88</td></tr><tr><td>FINE-TUNE</td><td>42.9</td><td>38.0</td><td>31.3</td></tr><tr><td>ADAPT</td><td>+0.2</td><td>+1.7</td><td>+0.8</td></tr><tr><td>STRUCTADAPT-RGCN</td><td>+3.4</td><td>+4.4</td><td>+4.4</td></tr></table>
|
| 267 |
+
|
| 268 |
+
Table 8: Differences, with respect to FINE-TUNE, in the BLEU score of the LDC2017T10 test set as a function of the graph size, graph diameter and number of reentrancies.
|
| 269 |
+
|
| 270 |
+
gap between StractADAPT and the other models is widest for examples with more reentrancies, confirming our hypothesis. In particular, when graphs contain $\geq 4$ reentrancies, StractADAPT has an improvement of $+3.6$ BLEU points compared to ADAPT.
|
| 271 |
+
|
| 272 |
+
# 7 Conclusion
|
| 273 |
+
|
| 274 |
+
We presented STRUCTADAPT, a novel adapter architecture to explicitly model graph structures into pretrained language models, providing an extensive evaluation of our approach and showing that it achieves state-of-the-art results on two AMR-to-text benchmarks, training much fewer parameters. We also found that STRUCTADAPT is more effective when encoding complex graphs, when trained on fewer datapoints, and is more robust to different graph linearizations and reentries. In future work, we plan to consider other graph-to-text tasks, such as those based on Knowledge Graphs.
|
| 275 |
+
|
| 276 |
+
# Acknowledgments
|
| 277 |
+
|
| 278 |
+
We thank our anonymous reviewers for their thoughtful comments. We also would like to thank Jonas Pfeiffer, Jorge Cardona, Juri Opitz, Kevin Stowe, Thy Tran, Tilman Beck and Tim Baumgartner for their feedback on this work. This work has been supported by the German Research Foundation (DFG) as part of the Research Training Group "Adaptive Preparation of Information form Heterogeneous Sources" (AIPHES, GRK 1994/1) and as part of the DFG funded project UKP-SQuARE with the number GU 798/29-1.
|
| 279 |
+
|
| 280 |
+
# References
|
| 281 |
+
|
| 282 |
+
Xuefeng Bai, Linfeng Song, and Yue Zhang. 2020. Online back-parsing for AMR-to-text generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1206-1219, Online. Association for Computational Linguistics.
|
| 283 |
+
Laura Banarescu, Claire Bonial, Shu Cai, Madalina Georgescu, Kira Griffith, Ulf Hermjakob, Kevin Knight, Philipp Koehn, Martha Palmer, and Nathan Schneider. 2013. Abstract Meaning Representation for sembanking. In Proceedings of the 7th Linguistic Annotation Workshop and Interoperability with Discourse, pages 178-186, Sofia, Bulgaria. Association for Computational Linguistics.
|
| 284 |
+
Daniel Beck, Gholamreza Haffari, and Trevor Cohn. 2018. Graph-to-sequence learning using gated graph neural networks. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 273-283, Melbourne, Australia. Association for Computational Linguistics.
|
| 285 |
+
Michele Bevilacqua, Rexhina Blloshmi, and Roberto Navigli. 2021. One spring to rule them both: Symmetric amr semantic parsing and generation without a complex pipeline. Proceedings of the AAAI Conference on Artificial Intelligence, 35(14):12564-12573.
|
| 286 |
+
Deng Cai and Wai Lam. 2020. Graph transformer for graph-to-sequence learning. Proceedings of the AAAI Conference on Artificial Intelligence, 34(05):7464-7471.
|
| 287 |
+
Thiago Castro Ferreira, Chris van der Lee, Emiel van Miltenburg, and Emiel Krahmer. 2019. Neural data-to-text generation: A comparison between pipeline and end-to-end architectures. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 552-562, Hong Kong, China. Association for Computational Linguistics.
|
| 288 |
+
Marco Damonte and Shay B. Cohen. 2019. Structural neural encoders for AMR-to-text generation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 3649-3658, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 289 |
+
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),
|
| 290 |
+
|
| 291 |
+
pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 292 |
+
Jeffrey Flanigan, Chris Dyer, Noah A. Smith, and Jaime Carbonell. 2016. Generation from Abstract Meaning Representation using tree transducers. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 731-739, San Diego, California. Association for Computational Linguistics.
|
| 293 |
+
Qiankun Fu, Linfeng Song, Wenyu Du, and Yue Zhang. 2021. End-to-end AMR corefence resolution. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 4204-4214, Online. Association for Computational Linguistics.
|
| 294 |
+
Claire Gardent, Anastasia Shimorina, Shashi Narayan, and Laura Perez-Beltrachini. 2017. The WebNLG challenge: Generating text from RDF data. In Proceedings of the 10th International Conference on Natural Language Generation, pages 124-133, Santiago de Compostela, Spain. Association for Computational Linguistics.
|
| 295 |
+
Ian J. Goodfellow, Mehdi Mirza, Da Xiao, Aaron Courville, and Yoshua Bengio. 2014. An empirical investigation of catastrophic forgetting in gradient-based neural networks. In Proceedings of International Conference on Learning Representations (ICLR).
|
| 296 |
+
Zhijiang Guo, Yan Zhang, Zhiyang Teng, and Wei Lu. 2019. Densely connected graph convolutional networks for graph-to-sequence learning. Transactions of the Association for Computational Linguistics, 7:297-312.
|
| 297 |
+
Karen Hambardzumyan, Hrant Khachatrian, and Jonathan May. 2021. WARP: Word-level Adversarial ReProgramming. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 4921-4933, Online. Association for Computational Linguistics.
|
| 298 |
+
Hamza Harkous, Isabel Groves, and Amir Saffari. 2020. Have your text and use it too! end-to-end neural data-to-text generation with semantic fidelity. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2410-2424, Barcelona, Spain (Online). International Committee on Computational Linguistics.
|
| 299 |
+
Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019. Parameter-efficient transfer learning for NLP. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings
|
| 300 |
+
|
| 301 |
+
of Machine Learning Research, pages 2790-2799.
|
| 302 |
+
PMLR.
|
| 303 |
+
Dirk Hovy, Taylor Berg-Kirkpatrick, Ashish Vaswani, and Eduard Hovy. 2013. Learning whom to trust with MACE. In Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1120-1130, Atlanta, Georgia. Association for Computational Linguistics.
|
| 304 |
+
Jeremy Howard and Sebastian Ruder. 2018. Universal language model fine-tuning for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 328-339, Melbourne, Australia. Association for Computational Linguistics.
|
| 305 |
+
Alexander Miserlis Hoyle, Ana Marasovic, and Noah A. Smith. 2021. Promoting graph awareness in linearized graph-to-text generation. In *Findings of the Association for Computational Linguistics: ACL-IJCNLP* 2021, pages 944–956, Online. Association for Computational Linguistics.
|
| 306 |
+
Mihir Kale. 2020. Text-to-text pre-training for data-to-text tasks. arXiv e-prints.
|
| 307 |
+
Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
|
| 308 |
+
Thomas N. Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulouse, France, April 24-26, 2017, Conference Track Proceedings.
|
| 309 |
+
James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell. 2017. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521-3526.
|
| 310 |
+
Ioannis Konstas, Srinivasan Iyer, Mark Yatskar, Yejin Choi, and Luke Zettlemoyer. 2017. Neural AMR: Sequence-to-sequence models for parsing and generation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 146-157, Vancouver, Canada. Association for Computational Linguistics.
|
| 311 |
+
Anne Lauscher, Olga Majewska, Leonardo F. R. Ribeiro, Iryna Gurevych, Nikolai Rozanov, and Goran Glavaš. 2020. Common sense or world knowledge? investigating adapter-based knowledge injection into pretrained transformers. In Proceedings of Deep Learning Inside Out (DeeLIO): The First Workshop on Knowledge Extraction and Integration for Deep Learning Architectures, pages 43-49, Online. Association for Computational Linguistics.
|
| 312 |
+
|
| 313 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020. BART: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880, Online. Association for Computational Linguistics.
|
| 314 |
+
Xiang Lisa Li and Percy Liang. 2021. Prefix-tuning: Optimizing continuous prompts for generation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 4582-4597, Online. Association for Computational Linguistics.
|
| 315 |
+
Kexin Liao, Logan Lebanoff, and Fei Liu. 2018. Abstract Meaning Representation for multi-document summarization. In Proceedings of the 27th International Conference on Computational Linguistics, pages 1178-1190, Santa Fe, New Mexico, USA. Association for Computational Linguistics.
|
| 316 |
+
Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. 2021. GPT understands, too. CoRR, abs/2103.10385.
|
| 317 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2020. Roberta: A robustly optimized bert pretraining approach. arXiv e-prints.
|
| 318 |
+
Manuel Mager, Ramón Fernandez Astudillo, Tahira Naseem, Md Arafat Sultan, Young-Suk Lee, Radu Florian, and Salim Roukos. 2020. GPT-too: A language-model-first approach for AMR-to-text generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1846-1852, Online. Association for Computational Linguistics.
|
| 319 |
+
Linyong Nan, Dragomir Radev, Rui Zhang, Amrit Rau, Abhinand Sivaprasad, Chiachun Hsieh, Xiangru Tang, Aadit Vyas, Neha Verma, Pranav Krishna, Yangxiaokang Liu, Nadia Irwanto, Jessica Pan, Faiaz Rahman, Ahmad Zaidi, Mutethia M tuma, Yasin Tarabar, Ankit Gupta, Tao Yu, Yi Chern Tan, Xi Victoria Lin, Caiming Xiong, Richard Socher, and Nazneen Fatema Rajani. 2021. DART: Open-domain structured data record to text generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 432-447, Online. Association for Computational Linguistics.
|
| 320 |
+
Juri Opitz, Angel Daza, and Anette Frank. 2021. Weisfeiler-leman in the bamboo: Novel amr graph metrics and a benchmark for amr graph similarity. Transactions of the Association for Computational Linguistics.
|
| 321 |
+
|
| 322 |
+
Juri Opitz and Anette Frank. 2021. Towards a decomposable metric for explainable evaluation of text generation from AMR. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1504-1518, Online. Association for Computational Linguistics.
|
| 323 |
+
Juri Opitz, Letitia Parcalabescu, and Anette Frank. 2020. AMR similarity metrics from principles. Transactions of the Association for Computational Linguistics, 8:522-538.
|
| 324 |
+
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.
|
| 325 |
+
Ankur Parikh, Xuezhi Wang, Sebastian Gehrmann, Manaal Faruqui, Bhuwan Dhingra, Diyi Yang, and Dipanjan Das. 2020. ToTTo: A controlled table-to-text generation dataset. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1173-1186, Online. Association for Computational Linguistics.
|
| 326 |
+
Jonas Pfeiffer, Aishwarya Kamath, Andreas Rückle, Kyunghyun Cho, and Iryna Gurevych. 2021. AdapterFusion: Non-Destructive Task Composition for Transfer Learning. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics (EACL), Online. Association for Computational Linguistics.
|
| 327 |
+
Jonas Pfeiffer, Andreas Rückle, Clifton Poth, Aishwarya Kamath, Ivan Vulic, Sebastian Ruder, Kyunghyun Cho, and Iryna Gurevych. 2020a. AdapterHub: A framework for adapting transformers. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 46-54, Online. Association for Computational Linguistics.
|
| 328 |
+
Jonas Pfeiffer, Ivan Vulic, Iryna Gurevych, and Sebastian Ruder. 2020b. MAD-X: An Adapter-Based Framework for Multi-Task Cross-Linguual Transfer. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7654–7673, Online. Association for Computational Linguistics.
|
| 329 |
+
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.
|
| 330 |
+
Nima Pourdamghani, Kevin Knight, and Ulf Hermjakob. 2016. Generating English from Abstract Meaning Representations. In Proceedings of the 9th International Natural Language Generation conference, pages 21-25, Edinburgh, UK. Association for Computational Linguistics.
|
| 331 |
+
|
| 332 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. In Technical report, OpenAI.
|
| 333 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2019. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv e-prints.
|
| 334 |
+
Sylvestre-Alvise Rebuffi, Hakan Bilen, and Andrea Vedaldi. 2017. Learning multiple visual domains with residual adapters. In Advances in Neural Information Processing Systems, volume 30, pages 506-516. Curran Associates, Inc.
|
| 335 |
+
Leonardo F. R. Ribeiro, Claire Gardent, and Iryna Gurevych. 2019. Enhancing AMR-to-text generation with dual graph representations. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3183-3194, Hong Kong, China. Association for Computational Linguistics.
|
| 336 |
+
Leonardo F. R. Ribeiro, Jonas Pfeiffer, Yue Zhang, and Iryna Gurevych. 2021. Smelting gold and silver for improved multilingual amr-to-text generation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Punta Cana, November 7-11, 2021.
|
| 337 |
+
Leonardo F. R. Ribeiro, Martin Schmitt, Hinrich Schütze, and Iryna Gurevych. 2020a. Investigating pretrained language models for graph-to-text generation. arXiv e-prints.
|
| 338 |
+
Leonardo F. R. Ribeiro, Yue Zhang, Claire Gardent, and Iryna Gurevych. 2020b. Modeling global and local node contexts for text generation from knowledge graphs. Transactions of the Association for Computational Linguistics, 8:589-604.
|
| 339 |
+
Michael Sejr Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. 2018. Modeling relational data with graph convolutional networks. In ESWC 2018, Heraklion, Crete, Greece, June 3-7, 2018, Proceedings, pages 593-607.
|
| 340 |
+
Martin Schmitt, Leonardo F. R. Ribeiro, Philipp Dufter, Iryna Gurevych, and Hinrich Schütze. 2021. Modeling graph structure via relative position for text generation from knowledge graphs. In Proceedings of the Fifteenth Workshop on Graph-Based Methods for Natural Language Processing (TextGraphs-15), pages 10-21, Mexico City, Mexico. Association for Computational Linguistics.
|
| 341 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational
|
| 342 |
+
|
| 343 |
+
Linguistics (Volume 1: Long Papers), pages 1715-1725, Berlin, Germany. Association for Computational Linguistics.
|
| 344 |
+
Linfeng Song, Daniel Gildea, Yue Zhang, Zhiguo Wang, and Jinsong Su. 2019. Semantic neural machine translation using amr. Transactions of the Association for Computational Linguistics, 7:19-31.
|
| 345 |
+
Linfeng Song, Yue Zhang, Zhiguo Wang, and Daniel Gildea. 2018. A graph-to-sequence model for AMR-to-text generation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1616-1626, Melbourne, Australia. Association for Computational Linguistics.
|
| 346 |
+
Ida Szubert, Marco Damonte, Shay B. Cohen, and Mark Steedman. 2020. The role of reentrancies in Abstract Meaning Representation parsing. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 2198-2207, Online. Association for Computational Linguistics.
|
| 347 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 5998-6008. Curran Associates, Inc.
|
| 348 |
+
Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. 2018. Graph attention networks. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings.
|
| 349 |
+
Pavlos Vougiouklis, Hady Elsahar, Lucie-Aimée Kaffee, Christophe Gravier, Frédérique Laforest, Jonathon Hare, and Elena Simperl. 2018. Neural wikipedian: Generating textual summaries from knowledge base triples. Journal of Web Semantics, 52-53:1 - 15.
|
| 350 |
+
Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2019. Superglue: A stickier benchmark for general-purpose language understanding systems. In H. Wallach, H. Larochelle, A. Beygelzimer, F. Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 3266-3280.
|
| 351 |
+
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. 2018. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353-355, Brussels, Belgium. Association for Computational Linguistics.
|
| 352 |
+
|
| 353 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funpowicz, and Jamie Brew. 2019. Huggingface's transformers: State-of-the-art natural language processing.
|
| 354 |
+
Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. 2019. How powerful are graph neural networks? In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019.
|
| 355 |
+
Jeffrey O. Zhang, Alexander Sax, Amir Zamir, Leonidas J. Guibas, and Jitendra Malik. 2019. Sidetuning: Network adaptation via additive side networks. arXiv e-prints.
|
| 356 |
+
Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. 2020a. *Bertscore: Evaluating text generation with BERT.* In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020.
|
| 357 |
+
Yan Zhang, Zhijiang Guo, Zhiyang Teng, Wei Lu, Shay B. Cohen, Zuozhu Liu, and Lidong Bing. 2020b. Lightweight, dynamic graph convolutional networks for AMR-to-text generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2162-2172, Online. Association for Computational Linguistics.
|
| 358 |
+
|
| 359 |
+
# Appendices
|
| 360 |
+
|
| 361 |
+
In this supplementary material, we detail experiments' settings and additional information about the human evaluation and graph representations.
|
| 362 |
+
|
| 363 |
+
# A Details of Models and Hyperparameters
|
| 364 |
+
|
| 365 |
+
The experiments were executed using the version 3.3.1 of the transformers library released by Hugging Face (Wolf et al., 2019). In Table 9, we report the hyperparameters used to train the models presented in this paper. We train until the development set BLEU has not improved for 5 epochs.
|
| 366 |
+
|
| 367 |
+
<table><tr><td></td><td>learning rate</td><td>batch size</td><td>beam search size</td></tr><tr><td>FINE-TUNE</td><td>3e-05</td><td>4</td><td>5</td></tr><tr><td>FT-TOP2</td><td>1e-04</td><td>4</td><td>5</td></tr><tr><td>FT-Bottom2</td><td>1e-04</td><td>4</td><td>5</td></tr><tr><td>ADAPT</td><td>1e-04</td><td>4</td><td>5</td></tr><tr><td>STRUCTADAPT</td><td>1e-04</td><td>4</td><td>5</td></tr></table>
|
| 368 |
+
|
| 369 |
+
# B Details on the Human Evaluation
|
| 370 |
+
|
| 371 |
+
The human evaluation was conducted via Amazon Mechanical Turk. We randomly select 100 generated texts for each of the 3 sets and each adapter model (ADAPT, STRUCTADAPT-GCN), with a total of 600 texts to be evaluated. The annotators then rate the meaning similarity on a 1-7 Likert scale. For each text, we collect scores from 3 annotators. We use MACE (Hovy et al., 2013) to further improve upon these raw answers by unsupervised estimation of worker trustworthiness and subsequent recovery of the most likely score. Models are ranked according to the mean of sentence-level scores. We defined a filter for all our evaluations, allowing to participate only workers who have more than 5000 HITs approved and with an acceptance rate of $95\%$ or higher. The task took workers a median time of 1.6 minutes per pair of sentences. We apply a quality control step filtering workers who do not score some faked and known sentences properly or did the experiment in a very short time.
|
| 372 |
+
|
| 373 |
+
# C Example of Graph Linearizations
|
| 374 |
+
|
| 375 |
+
In Table 10, we present three different linearizations for the same AMR graph and its corresponding reference sentence. Figure 5 shows the two possible graphs that are represented by the linearizations. In particular, Figure 5a shows a graph that is represented by CANON and RECONF linearizations
|
| 376 |
+
|
| 377 |
+
and Figure 5b shows a graph that is represented by RANDOM. Note that whereas the linearizations can greatly differ from each other, the graph structure for all linearizations remains very similar.
|
| 378 |
+
|
| 379 |
+

|
| 380 |
+
Figure 5: Two AMR graphs with the same meaning.
|
| 381 |
+
|
| 382 |
+

|
| 383 |
+
|
| 384 |
+
Table 9: Hyperparameter settings for our methods.
|
| 385 |
+
|
| 386 |
+
<table><tr><td>CANON</td></tr><tr><td>(s / subsidize-01
|
| 387 |
+
:ARG1 (u / utility
|
| 388 |
+
:poss (s2 / she)
|
| 389 |
+
:mod (a / all)))</td></tr><tr><td>RECONF</td></tr><tr><td>(s / subsidize-01
|
| 390 |
+
:ARG1 (u / utility
|
| 391 |
+
:mod (a / all)
|
| 392 |
+
:poss (s2 / she)))</td></tr><tr><td>RANDOM</td></tr><tr><td>(s2 / she
|
| 393 |
+
:poss-of (u / utility
|
| 394 |
+
:ARG1-of (s / subsidize-01)
|
| 395 |
+
:mod (a / all)))</td></tr><tr><td>SENTENCE: Her utilities are all subsidized.</td></tr></table>
|
| 396 |
+
|
| 397 |
+
Table 10: Different linearizations for an AMR graph.
|
structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f041651dcea2d9cc2a5cfa68f5ae3f06ccb2c44d4be1d1d4d6f916e8ad788cce
|
| 3 |
+
size 533900
|
structuraladaptersinpretrainedlanguagemodelsforamrtotextgeneration/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:26bd6b12f14ec7356ff43c91797b9620a6e7ce689feeacf0504219ab8974a06f
|
| 3 |
+
size 491691
|
structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a03db2f7400babe2a820d4aef38412b6781c2c04f5d41eacb1ed0d284609969a
|
| 3 |
+
size 89839
|
structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e613578537dfb0441cdff096ba3d21f087695acea21de0661c12bf8038e522c1
|
| 3 |
+
size 106639
|
structureaugmentedkeyphrasegeneration/a84709dc-2ac9-4d1e-af8a-6d224578dfa8_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ef4326dc1c031d5cefbab3c48968940d82deeb42ebbb3307fcb8bd35ecae129
|
| 3 |
+
size 393517
|
structureaugmentedkeyphrasegeneration/full.md
ADDED
|
@@ -0,0 +1,370 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Structure-Augmented Keyphrase Generation
|
| 2 |
+
|
| 3 |
+
Jihyuk Kim
|
| 4 |
+
|
| 5 |
+
Yonsei University
|
| 6 |
+
|
| 7 |
+
jihyukkim@yonsei.ac.kr
|
| 8 |
+
|
| 9 |
+
Seungtaek Choi
|
| 10 |
+
|
| 11 |
+
Yonsei University
|
| 12 |
+
|
| 13 |
+
hist0613@yonsei.ac.kr
|
| 14 |
+
|
| 15 |
+
Myeongho Jeong
|
| 16 |
+
|
| 17 |
+
Yonsei University
|
| 18 |
+
|
| 19 |
+
wag9611@yonsei.ac.kr
|
| 20 |
+
|
| 21 |
+
Seung-won Hwang*
|
| 22 |
+
|
| 23 |
+
Seoul National University
|
| 24 |
+
|
| 25 |
+
seungwonh@snu.ac.kr
|
| 26 |
+
|
| 27 |
+
# Abstract
|
| 28 |
+
|
| 29 |
+
This paper studies the keyphrase generation (KG) task for scenarios where structure plays an important role. For example, a scientific publication consists of a short title and a long body, where the title can be used for de-emphasizing unimportant details in the body. Similarly, for short social media posts (e.g., tweets), scarce context can be augmented from titles, though often missing. Our contribution is generating/augmenting structure then encoding these information, using existing keyphrases of other documents, complementing missing/incomplete titles. Specifically, we first extend the given document with related but absent keyphrases from existing keyphrases, to augment missing contexts (generating structure), and then, build a graph of keyphrases and the given document, to obtain structure-aware representation of the augmented text (encoding structure). Our empirical results validate that our proposed structure augmentation and structure-aware encoding can improve KG for both scenarios, outperforming the state-of-the-art<sup>1</sup>.
|
| 30 |
+
|
| 31 |
+
# 1 Introduction
|
| 32 |
+
|
| 33 |
+
Keyphrases not only help human readers to gain immediate insights about a given document, but also make documents queryable, e.g., by hashtagging social posts with predicted keyphrases. Among keyphrase tasks, we focus on tasks that allow words that are not present in the given document, which often be called absent words, to be keyphrases, as the input document can be often context-scarce: Many potentially relevant keyphrases are missing in the given document, since the keyphrase can be expressed in terms different from those present in the document (i.e., vocabulary mismatch).
|
| 34 |
+
|
| 35 |
+
Our goal is to generate keyphrases that are likely to be words absent from the document, especially
|
| 36 |
+
|
| 37 |
+
<table><tr><td>Field</td><td>Text</td></tr><tr><td>Title</td><td>Methods to tell if a question can be answered from a paragraph</td></tr><tr><td>Question</td><td>... Is there any existing research in telling whether or not a question is answerable? ...
|
| 38 |
+
...
|
| 39 |
+
... I considered textual entailment, but it doesn’t seem to be exactly what I’m looking for ...</td></tr><tr><td>Existing Keyphrases</td><td>..., “natural language processing”, “formal languages”, ...</td></tr><tr><td>Gold Keyphrases</td><td>“question answering”, “natural language processing”</td></tr></table>
|
| 40 |
+
|
| 41 |
+
Table 1: An example of a social Q&A post consisting of a title and the main body question: We present gold keyphrases labeled by the user, and existing keyphrases labeled for other related posts. **Bold-face** words can indicate the topic of the post.
|
| 42 |
+
|
| 43 |
+
in the following scenarios: (a) scientific publications with diverse vocabularies, or (b) short social posts, where we found that, from public and real-life datasets we used in our evaluation, $37\%$ of keyphrases in scientific publications, $67\%$ of hashtags, on average, in social media posts are absent in the given document. Thus, we formulate our problem as keyphrase generation (KG) (Meng et al., 2017) of predicting keyphrases, including absent words as well as present words, adopting encoder-decoder architecture.
|
| 44 |
+
|
| 45 |
+
A recent trend is leveraging document structure for KG (Chen et al., 2019b), where metadata in documents, e.g., document title, clarifies the meaning of documents (Kim et al., 2021). For illustration, Table 1 shows a social Q&A post consisting of title (the first row) and main body question (the second row), where we need to predict gold keyphrases "question answering" and "natural language processing" (the last row). The concise title enables readers to focus on important parts of the main question (bold-face words), while ignoring details. However, titles often exclude meaningful keyphrases (e.g., "natural language processing" in Table 1) due to their inherent length limitation, and
|
| 46 |
+
|
| 47 |
+
making matters worse, titles may not exist at all in some social media posts (e.g., tweets).
|
| 48 |
+
|
| 49 |
+
Our contribution is to construct a structured document $\mathcal{X}^{+}$ , even when the structure is not given, by leveraging observed keyphrases from other documents in the training dataset, to improve both encoding and decoding. For encoding, keyphrases can be used to emphasize relevant parts in $\mathcal{X}$ , similarly done with the title. For decoding, the keyphrases can augment vocabulary, e.g., "natural language processing", from which the decoder can copy words. We stress that our work is designed to work for both closed and open set scenarios, represented by social and scientific document scenario respectively, with the following distinctions:
|
| 50 |
+
|
| 51 |
+
- Closed set: Hashtags in social media posts are frequently reused (i.e., keyphrases can be copied from observed keyphrases from the training set for decoding).
|
| 52 |
+
- Open set: A significant amount of keyphrases of scientific publications (about $20\%$ in our target scenario) have never been observed in the training dataset (i.e., keyphrases candidate set is open-ended).
|
| 53 |
+
|
| 54 |
+
Our proposed solution is two-phased: The first phase, to construct a structured document $\mathcal{X}^+$ , augments the given document $\mathcal{X}$ by retrieving relevant keyphrases $\mathcal{R}$ from existing keyphrases in the training dataset. Then, the second phase follows, to encode structure-aware representations on $\mathcal{X}^+$ . We use graph representation to effectively integrate $\mathcal{X}$ and $\mathcal{R}$ , where the graph can be flexibly designed depending on closed/open set scenarios.
|
| 55 |
+
|
| 56 |
+
Our empirical results validate that generating and encoding document structures significantly improve performance, outperforming the state-of-the-art, for both social and scientific documents.
|
| 57 |
+
|
| 58 |
+
# 2 Related Work
|
| 59 |
+
|
| 60 |
+
We briefly explain our target task of KG and introduce our distinction of leveraging structures.
|
| 61 |
+
|
| 62 |
+
Observing words in the document is a crucial signal for keyphrase tasks, especially for keyphrase extraction (KE) requiring keyphrases to appear in the given document. In contrast, we focus on KG, as our target scenarios require not having such restrictions. KG, to generate absent words, is often modeled as neural encoder-decoder architecture (Sutskever et al., 2014), which generates the keyphrase sequence given the input document (Meng et al., 2017). KG approaches can be
|
| 63 |
+
|
| 64 |
+
further categorized into two settings: one-to-one (O2O) and one-to-seq (O2S) (Yuan et al., 2020; Ye et al., 2021). In O2O, a model is trained to generate a single keyphrase for each document, and then, for evaluation, the model generates multiple keyphrases using beam search decoding with a large beam size (e.g., 200). On the other hand, in O2S, a model is trained to generate multiple keyphrases where multiple keyphrases for each document are concatenated into a single sequence with a predefined delimiter. Our model follows O2O, as O2O is known to be better for predicting absent keyphrases (Meng et al., 2021) and as absent keyphrases are frequently observed in our target scenario with scarce context. The distinction of our proposal for KG is to leverage structures in documents, to improve both encoder and decoder.
|
| 65 |
+
|
| 66 |
+
Structures in documents are essential sources of prediction signals (Kim et al., 2021). For example, for a scientific publication consisting of a title and the main body, the structured document enjoys the complementary strength of the two fields: While the main body contains many keywords (i.e., high recall), title, though much shorter, concisely describes the main focus of the paper (i.e., high precision). To leverage such structure, TGNet (Chen et al., 2019b) uses the title to guide the encoder to accurately capture core contents. However, the given title is observed to be often insufficient due to length limitation (Li et al., 2010), which we consistently observed in our evaluations.
|
| 67 |
+
|
| 68 |
+
As a further extreme, short social media posts may not have titles. Furthermore, because of the length limitation (e.g., 140 character tweets), most keywords may not appear in the given post (i.e., low recall). In such scenarios, one can construct structured posts, to augment posts with missing keywords. For example, TAKG (Wang et al., 2019) utilizes topic modeling, where topics shared across other documents enable the encoder to leverage contexts observed in other related posts. However, a small, fixed number of topics (e.g., 15 or 30) are limited in differentiating diverse documents with similar topics.
|
| 69 |
+
|
| 70 |
+
Our distinction is overcoming incomplete or missing structure, by generating a virtual structure from existing keyphrases (keyphrases in the train set), from which we "retrieve" terms that can serve as titles or topics for encoding. KG-KE-KR (Chen et al., 2019a) similarly leverages keyphrase retrieval, but they do not use this for structure-aware
|
| 71 |
+
|
| 72 |
+
encoding and use only for decoding. In contrast, we jointly contextualize the given document and the retrieved keyphrases, to allow both fields to exchange contexts from each other. We empirically validate that our proposed structure-augmented encoding significantly boosts performance.
|
| 73 |
+
|
| 74 |
+
# 3 Approach
|
| 75 |
+
|
| 76 |
+
Given a document $\mathcal{X} = \{x_i\}_{i=1}^{N_{\mathcal{X}}}$ with $N_{\mathcal{X}}$ unique words, KG models aim to output a set of target keyphrases, which can be implemented using encoder-decoder architecture. We train a model to predict a single keyphrase, then, for inference, we generate multiple keyphrases using beam search decoding. We denote a single keyphrase with length $T$ by $\mathcal{Y} = [y_1, \ldots, y_T]$ .
|
| 77 |
+
|
| 78 |
+
In the following sections, we first describe a baseline encoding targeting plain text $\mathcal{X}$ (§3.1), and then, we explain our distinction of generating structure (§3.2.1) and encoding structure (§3.2.2).
|
| 79 |
+
|
| 80 |
+
In this section, we do not consider pre-existing title $\mathcal{T}$ , but our framework straightforwardly extends for such titles, as we later discuss in §4.4.1.
|
| 81 |
+
|
| 82 |
+
# 3.1 Baseline: Plain Text Encoding
|
| 83 |
+
|
| 84 |
+
Targeting plain texts, a novel graph-based encoder was proposed in DivGraphPointer (Sun et al., 2019), outperforming sequence-based encodings such as GRU (Cho et al., 2014) or LSTM (Hochreiter and Schmidhuber, 1997).
|
| 85 |
+
|
| 86 |
+
For graph construction, a fully connected graph is used, where nodes are unique words in $\mathcal{X}$ . For edges, two adjacency matrices $\overleftarrow{\mathbf{A}}_{ij}^{\mathcal{X}}$ and $\overrightarrow{\mathbf{A}}_{ij}^{\mathcal{X}}$ , using position-based proximity, are obtained for forward and backward direction respectively:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\begin{array}{l} \overset {\prime} {\mathbf {A}} _ {i j} ^ {\mathcal {X}} = \sum_ {p _ {i} ^ {\mathcal {X}}} \sum_ {p _ {j} ^ {\mathcal {X}}} m a x ((p _ {i} ^ {\mathcal {X}} - p _ {j} ^ {\mathcal {X}}) ^ {- 1}, 0) \\ \overrightarrow {\mathbf {A}} _ {i j} ^ {\mathcal {X}} = \sum_ {p _ {i} ^ {\mathcal {X}}} \sum_ {p _ {j} ^ {\mathcal {X}}} \max \left(\left(p _ {j} ^ {\mathcal {X}} - p _ {i} ^ {\mathcal {X}}\right) ^ {- 1}, 0\right), \tag {1} \\ \end{array}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where $p_{[i / j]}^{\mathcal{X}}\in \mathcal{P}(x_{[i / j]})$ is a position offset of a unique word $x_{[i / j]}$ in $\mathcal{X}$ .
|
| 93 |
+
|
| 94 |
+
Given the graph, to contextualize node representations, Graph Convolutional Network (GCN) (Kipf and Welling, 2017) is adopted. We denote the number of stacked graph convolution layers by $L$ , the number of node features by $D$ , and contextualized representations of nodes for $l$ -th layer by $\mathbf{H}_l^{\mathcal{X}} \in \mathbb{R}^{N_{\mathcal{X}} \times D}$ where $\mathbf{H}_1^{\mathcal{X}}$ is obtained from a word embedding matrix. As comprehensive notations, we denote learnable parameters by
|
| 95 |
+
|
| 96 |
+
$\mathbf{v}$ for vector and $\mathbf{W}$ for matrix, with different super/subscripts.
|
| 97 |
+
|
| 98 |
+
Starting from $\mathbf{H}_1^{\mathcal{X}}$ , context vectors $\mathbf{C}_l^{\mathcal{X}} \in \mathbb{R}^{N_{\mathcal{X}} \times D}$ are gathered from neighbor nodes using graph convolution, then combined with $\mathbf{H}_l^{\mathcal{X}}$ to produce $\mathbf{H}_{l+1}^{\mathcal{X}}$ (Dauphin et al., 2017):
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\begin{array}{l} \mathbf {C} _ {l} ^ {\chi} = \overleftarrow {\mathbf {A}} ^ {\chi} \mathbf {H} _ {l} ^ {\chi} \overrightarrow {\mathbf {W}} _ {l} ^ {\chi} + \overrightarrow {\mathbf {A}} ^ {\chi} \mathbf {H} _ {l} ^ {\chi} \overrightarrow {\mathbf {W}} _ {l} ^ {\chi} \tag {2} \\ + \mathbf {H} _ {l} ^ {\boldsymbol {\chi}} \tilde {\mathbf {W}} _ {l} ^ {\boldsymbol {\chi}} \\ \end{array}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\mathbf {H} _ {l + 1} ^ {\mathcal {X}} = \mathbf {H} _ {l} ^ {\mathcal {X}} + \mathbf {C} _ {l} ^ {\mathcal {X}} \times \sigma \left(\mathbf {G} _ {l} ^ {\mathcal {X}}\right), \tag {3}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
where $\sigma$ denotes sigmoid function, and $\stackrel{\leftrightarrow}{\hat{\mathbf{A}}}^{\mathcal{X}}$ , $\stackrel{\rightarrow}{\hat{\mathbf{A}}}^{\mathcal{X}}$ are normalized matrices with eigenvalues close to 1 for stable training (Kipf and Welling, 2017). In Eq (3), residual addition is employed with $\mathbf{G}_l^{\mathcal{X}} \in \mathbb{R}^{N_{\mathcal{X}} \times D}$ , which helps gradient back-propagation through deep layers (He et al., 2016; Dauphin et al., 2017). $\mathbf{G}_l^{\mathcal{X}}$ is obtained in the same way to $\mathbf{C}_l^{\mathcal{X}}$ in Eq (2) but with different learnable parameters.
|
| 109 |
+
|
| 110 |
+
We adopt the same graph construction and GCN contextualization, for encoding $\mathcal{X}$ . Built upon the GCN encoder, our distinction is to generate and encode structure for $\mathcal{X}$ .
|
| 111 |
+
|
| 112 |
+
# 3.2 Proposed: Structure-Augmented KG
|
| 113 |
+
|
| 114 |
+
Beyond plain text, we aim to leverage structures in documents. Though leveraging the title-body structure in scientific publications has been shown effective (Chen et al., 2019b), the given titles are often found to be incomplete because of limited length (Li et al., 2010), or unavailable (e.g., tweets).
|
| 115 |
+
|
| 116 |
+
Our goal is, given incomplete or missing structure, to generate and encode structures, to replace missing titles or complement incomplete titles.
|
| 117 |
+
|
| 118 |
+
# 3.2.1 Generating Structure
|
| 119 |
+
|
| 120 |
+
To generate structured document $\mathcal{X}^+$ , we leverage existing keyphrases of other documents, specifically similar documents to $\mathcal{X}$ , by adopting an assumption that similar documents tend to have similar keyphrases. Specifically, for each keyphrase $r$ in the training dataset, we first collect supporting documents, having $r$ as one of the ground-truth keyphrases, then concatenate them as a single document, denoted by $\mathcal{S}_r$ , and use $\mathcal{S}_r$ to index $r$ . We then use BM25 search (Robertson and Walker, 1994) with $\mathcal{X}$ as a query, to retrieve top- $K$ relevant keyphrases $\mathcal{R} = [r_1, \dots, r_K]^2$ . Finally, we extend $\mathcal{X}$ with $\mathcal{R}$ , to construct a structured document $\mathcal{X}^+$ .
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 1: Overall approach: Red-colored words or phrases are texts included in decoded keyphrases. Black edges and blue edges are proximity between nodes, obtained from $\mathcal{X}$ and $\mathcal{R}$ respectively, where the thickness indicates the degree of relatedness between nodes. To construct an integrated graph for social posts, we connect two graphs (from $\mathcal{X}$ and $\mathcal{R}$ ), using green edges, and for scientific articles, we construct a multigraph with two types of edges (for $\mathcal{X}$ and $\mathcal{R}$ ), by merging nodes having the same words, depicted by green nodes.
|
| 124 |
+
|
| 125 |
+
Having relevant keyphrases $\mathcal{R}$ enhances both encoding and decoding phases, as described next.
|
| 126 |
+
|
| 127 |
+
# 3.2.2 Encoding Structure
|
| 128 |
+
|
| 129 |
+
Once we augment $\mathcal{X}$ with $\mathcal{R}$ , our next step is to integrate $\mathcal{X}$ and $\mathcal{R}$ into $\mathcal{X}^+$ , and jointly contextualize contents in $\mathcal{X}^+$ by exchanging contexts between the two fields.
|
| 130 |
+
|
| 131 |
+
For effective integration, we represent $\mathcal{X}^+$ as an integrated graph, that can be flexibly designed, based on the following principle: A pair of two highly related nodes should be connected by an edge or merged into a single node, while unrelated nodes should be separated from each other.
|
| 132 |
+
|
| 133 |
+
For encoding $\mathcal{X}$ , we adopt the GCN contextualization, described in §3.1. On the other hand, for $\mathcal{R}$ , graphs are differently encoded for open- and closed-set scenarios, as below.
|
| 134 |
+
|
| 135 |
+
- Closed set $\mathcal{V}$ : Keyphrases in $\mathcal{R}$ are likely to be reused for the target keyphrases $\mathcal{V}$ , where keyphrase in $\mathcal{R}$ is assigned as a node. The keyphrase can be copied as $\mathcal{V}$ based on the node representation.
|
| 136 |
+
- Open set $\mathcal{V}$ : Keyphrases may not be reused, such that words in $\mathcal{R}$ should be combined with other words to generate novel keyphrases, for which we assign the node with a keyword in $\mathcal{R}$ .
|
| 137 |
+
|
| 138 |
+
In the following two sections, we introduce our Graph-based Structured Document Encoder, or
|
| 139 |
+
|
| 140 |
+
GSEnc, specifically for closed (§3.2.3) and open set $\mathcal{V}$ (§3.2.4) respectively.
|
| 141 |
+
|
| 142 |
+
# 3.2.3 GSEnc for closed set $\mathcal{V}$
|
| 143 |
+
|
| 144 |
+
Targeting closed set keyphrases, we jointly contextualize word nodes from $\mathcal{X}$ and keyphrase nodes from $\mathcal{R}$ , by building a graph each, then generate connecting edges between the two for propagating contexts across graphs.
|
| 145 |
+
|
| 146 |
+
Constructing and encoding graph for $\mathcal{X}$ follow §3.1. On the other hand, for $\mathcal{R}$ , we set a single phrase node for each keyphrase, instead of multiple word nodes, to enable a decoder to copy the keyphrase as-is based on the node features. For edge construction, instead of position-based proximity in Eq (1) which is not available for keyphrase nodes, we adopt co-occurrence-based proximity, as frequently co-occurred keyphrases tend to have similar topics<sup>3</sup>. Specifically, we compute adjacency matrix $\mathbf{A}^{\mathcal{R}}$ as conditional probabilities based on co-occurrence between keyphrases, then, contexts are gathered using graph convolution, similar to Eq (2).
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\mathbf {A} _ {j k} ^ {\mathcal {R}} = p \left(r _ {k} \mid r _ {j}\right) \tag {4}
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
$$
|
| 153 |
+
\mathbf {C} _ {l} ^ {\mathcal {R}} = \hat {\mathbf {A}} ^ {\mathcal {R}} \mathbf {H} _ {l} ^ {\mathcal {R}} \hat {\mathbf {W}} _ {l} ^ {\mathcal {R}} + \mathbf {H} _ {l} ^ {\mathcal {R}} \tilde {\mathbf {W}} _ {l} ^ {\mathcal {R}}, \tag {5}
|
| 154 |
+
$$
|
| 155 |
+
|
| 156 |
+
where $\mathbf{H}_l^{\mathcal{R}}\in \mathbb{R}^{K\times D}$ is node features for $\mathcal{R}$ in $l$ -th layer, $p(r_k|r_j)$ is the probability that $r_k$ co
|
| 157 |
+
|
| 158 |
+
occurs given $r_j$ , which is computed using the training dataset, and $\hat{\mathbf{A}}^{\mathcal{R}}$ is normalized matrix from $\mathbf{A}^{\mathcal{R}}$ , as in $\hat{\mathbf{A}}^{\mathcal{X}}$ from $\mathbf{A}^{\mathcal{X}}$ .
|
| 159 |
+
|
| 160 |
+
We now discuss how to connect the two graphs for $\mathcal{X}$ and $\mathcal{R}$ (green edges in Figure1). For such connection, we are inspired by connecting query (keyphrase in our case) and document, using relevance feedbacks, such as clicks on matching query-document pair. As we have no such feedback between each keyphrase $r_j \in \mathcal{R}$ and $\mathcal{X}$ , we can adopt zero-shot query log synthesis (Ma et al., 2021), by using pseudo-relevance feedback (Rocchio, 1971): We treat supporting documents $S_{r_j}$ as feedback documents with pseudo-relevance to $r_j$ , to connect $r_j$ with $\mathcal{X}$ using top- $M$ overlapped words, denoted by $S_{r_j}^*$ , between $S_{r_j}$ and $\mathcal{X}$ . For selecting top- $M$ , an unsupervised signal frequently used is tfidf, to favor words appearing frequently in $S_{r_j}$ (i.e., representative words) but infrequently in other documents (i.e., discriminative words) (Xu and Croft, 2017). Alternatively, query generators can be supervised as a separate task, requiring additional training data, so we adopt the former.
|
| 161 |
+
|
| 162 |
+
Given $S_{r_j}^*$ , we construct an edge between $x_i$ and $r_j$ , if and only if $x_i$ is included in $S_{r_j}^*$ , then we enable the encoder to estimate a proper edge weight $\overleftrightarrow{\mathbf{A}}_{ij}$ , using graph attention network (Veličković et al., 2018) $^4$ , such that only relevant contexts are exchanged between $\mathcal{X}$ and $\mathcal{R}$ .
|
| 163 |
+
|
| 164 |
+
$$
|
| 165 |
+
\overleftrightarrow {\mathbf {A}} _ {i j} = f \left(\overleftrightarrow {\mathbf {v}} ^ {\top} \left[ \overleftrightarrow {\mathbf {W}} \mathbf {H} _ {i, l} ^ {\mathcal {X}} \right| \left| \overleftrightarrow {\mathbf {W}} \mathbf {H} _ {j, l} ^ {\mathcal {R}} \right]\right) \tag {6}
|
| 166 |
+
$$
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
\mathbf {C} _ {l} ^ {\mathcal {X} \rightarrow \mathcal {R}} = \operatorname {s o f t m a x} \left(\stackrel {\leftrightarrow} {\mathbf {A}} ^ {\top}\right) \stackrel {\leftrightarrow} {\mathbf {W}} \mathbf {H} _ {l} ^ {\mathcal {X}} \in \mathbb {R} ^ {K \times D} \tag {7}
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+
$$
|
| 173 |
+
\mathbf {C} _ {l} ^ {\mathcal {R} \rightarrow \mathcal {X}} = \operatorname {s o f t m a x} (\overleftrightarrow {\mathbf {A}}) \overleftrightarrow {\mathbf {W}} \mathbf {H} _ {l} ^ {\mathcal {R}} \in \mathbb {R} ^ {N _ {\mathcal {X}} \times D}, \tag {8}
|
| 174 |
+
$$
|
| 175 |
+
|
| 176 |
+
where $f(\cdot)$ is LeakyReLU nonlinearity (Maas et al., 2013), and $\lvert\lvert\rvert$ denotes concatenation. In addition, we further leverage pseudo-relevance feedbacks, to augment contexts of $r_j$ , by using $\mathcal{S}_{r_j}$ to initialize node features for $r_j$ : $\mathbf{H}_{1,j}^{\mathcal{R}} = \mathbf{E}^\top f(\mathcal{S}_{r_j}) \in \mathbb{R}^D$ , where $\mathbf{E}$ is a trainable word embedding matrix, and $f$ weighs each word in $\mathcal{S}_{r_j}$ . For $f$ , we adopt tfidf5.
|
| 177 |
+
|
| 178 |
+
Finally, we add all gathered contexts and com
|
| 179 |
+
|
| 180 |
+
bine these with $\mathbf{H}_l^{[\mathcal{X} / \mathcal{R}]}$ , similar to Eq (3).
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
\begin{array}{l} \mathbf {H} _ {l + 1} ^ {\mathcal {X}} = \mathbf {H} _ {l} ^ {\mathcal {X}} + \mathbf {C} _ {l} ^ {\mathcal {X}} \times \sigma (\mathbf {G} _ {l} ^ {\mathcal {X}}) \\ + \mathbf {C} _ {l} ^ {\mathcal {R} \rightarrow \mathcal {X}} \times \sigma \left(\mathbf {G} _ {l} ^ {\mathcal {R} \rightarrow \mathcal {X}}\right) \\ \end{array}
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
$$
|
| 187 |
+
\begin{array}{l} \mathbf {H} _ {l + 1} ^ {\mathcal {R}} = \mathbf {H} _ {l} ^ {\mathcal {R}} + \mathbf {C} _ {l} ^ {\mathcal {R}} \times \sigma (\mathbf {G} _ {l} ^ {\mathcal {R}}) \\ + \mathbf {C} _ {l} ^ {\mathcal {X} \rightarrow \mathcal {R}} \times \sigma (\mathbf {G} _ {l} ^ {\mathcal {X} \rightarrow \mathcal {R}}), \\ \end{array}
|
| 188 |
+
$$
|
| 189 |
+
|
| 190 |
+
where the $\mathbf{G}\mathbf{s}$ are obtained in the same way to Cs but with different learnable parameters.
|
| 191 |
+
|
| 192 |
+
# 3.2.4 GSEnc for open set $\mathcal{V}$
|
| 193 |
+
|
| 194 |
+
Targeting open set keyphrases, we jointly contextualize word nodes from both $\mathcal{X}$ and $\mathcal{R}$ .
|
| 195 |
+
|
| 196 |
+
Since nodes for $\mathcal{X}$ and $\mathcal{R}$ have the same granularity (i.e., word-level nodes), instead of connecting two graphs (for $\mathcal{X}$ and $\mathcal{R}$ ) using edges, we construct a single integrated graph, by merging a node for $\mathcal{X}$ and a node for $\mathcal{R}$ whenever the two nodes correspond to the same word (green nodes in Figure1). Such integration enables contexts scattered across the two fields to be effectively gathered into the merged node, from which other nodes connected to the merged node also can exchange their contexts with each other through the merged node. Though sharing nodes, we use separate edges for $\mathcal{X}$ and $\mathcal{R}$ , for structure-aware encoding. That is, the merged graph becomes a multigraph; we connect a pair of nodes with two types of edges (black edges for $\mathcal{X}$ and blue edges for $\mathcal{R}$ in Figure1). We denote the contextualized features for nodes on the merged graph, including nodes from both $\mathcal{X}$ and $\mathcal{R}$ , by $\mathbf{H}_l^{\mathcal{X}^+_{\mathrm{merged}}}$ .
|
| 197 |
+
|
| 198 |
+
As in Eq (2), using graph convolution and the two types of edges, we aggregate neighbor contexts from $\mathcal{X}$ and $\mathcal{R}$ , into $\mathbf{C}_l^{\mathcal{X}_{\mathrm{merged}}}$ and $\mathbf{C}_l^{\mathcal{R}_{\mathrm{merged}}}$ respectively, while obtaining $\mathbf{G}_l^{\mathcal{X}_{\mathrm{merged}}}, \mathbf{G}_l^{\mathcal{R}_{\mathrm{merged}}}$ similarly. For adjacency matrix for keywords in $\mathcal{R}$ , we use position-based proximity between two keywords within each keyphrase in $\mathcal{R}$ , as in Eq (1). Then, we combine both contexts to update $\mathbf{H}_l^{\mathcal{X}_{\mathrm{merged}}^{+}}$ .
|
| 199 |
+
|
| 200 |
+
$$
|
| 201 |
+
\begin{array}{l} \mathbf {H} _ {l + 1} ^ {\mathcal {X} _ {\text {m e r g e d}} ^ {+}} = \mathbf {H} _ {l} ^ {\mathcal {X} _ {\text {m e r g e d}} ^ {+}} \\ + \mathbf {C} _ {l} ^ {\mathcal {X} _ {\text {m e r g e d}}} \times \sigma \left(\mathbf {G} _ {l} ^ {\mathcal {X} _ {\text {m e r g e d}}}\right) \tag {11} \\ + \mathbf {C} _ {l} ^ {\mathcal {R} _ {\mathrm {m e r g e d}}} \times \sigma (\mathbf {G} _ {l} ^ {\mathcal {R} _ {\mathrm {m e r g e d}}}). \\ \end{array}
|
| 202 |
+
$$
|
| 203 |
+
|
| 204 |
+
Given the contextualized node features at the last GCN layer, such as $(\mathbf{H}_L^{\mathcal{X}},\mathbf{H}_L^{\mathcal{R}})$ or $\mathbf{H}_L^{\mathcal{X}^+}$ , for closed set $\mathcal{V}$ or open set $\mathcal{V}$ respectively, we feed the features into the decoder, to generate keyphrases.
|
| 205 |
+
|
| 206 |
+
# 3.3 Decoder
|
| 207 |
+
|
| 208 |
+
The goal of the decoder is to generate a target keyphrase $\mathcal{V} = [y_1,\dots ,y_T]$ with length $T$ , based on the contextualized features on $\mathcal{X}^+$ from the encoder. While standard KG models either copy words from $\mathcal{X}$ or generate words from the predefined vocabulary $\mathcal{V}$ , we have $\mathcal{R}$ as an additional source, which provides valid keyphrase candidates already used for similar documents. To leverage $\mathcal{R}$ for decoding, depending on the application, we allow the decoder to copy either (a) keyphrases (closed set $\mathcal{V}$ ) or (b) words (open set $\mathcal{V}$ ), from $\mathcal{R}$ .
|
| 209 |
+
|
| 210 |
+
(a) Closed set $\mathcal{V}$ : copying keyphrases In social media posts, a few keyphrases (e.g., trending hashtags) cover most of the potential target keyphrases. Thus, when $\mathcal{V}$ is included in $\mathcal{R}$ , copying a keyphrase (e.g., "natural language processing" in Figure 1) from $\mathcal{R}$ makes efficient decoding.
|
| 211 |
+
|
| 212 |
+
To copy relevant keyphrases, we compute relevance score $\phi_j$ of each $r_j \in \mathcal{R}$ to $\mathcal{X}$ , using inner product between $\mathbf{H}_{L,j}^{\mathcal{R}}$ and the summarized features for $\mathcal{X}$ , denoted by $\tilde{\mathbf{h}}^{\mathcal{X}}$ :
|
| 213 |
+
|
| 214 |
+
$$
|
| 215 |
+
\phi_ {j} = \mathbf {H} _ {L, j} ^ {\mathcal {R}} ^ {\top} \tilde {\mathbf {h}} ^ {\mathcal {X}}, \tilde {\mathbf {h}} ^ {\mathcal {X}} = \sum_ {i = 1} ^ {N _ {\mathcal {X}}} \alpha_ {i} \mathbf {H} _ {L, i} ^ {\mathcal {X}} \tag {12}
|
| 216 |
+
$$
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
\alpha_ {i} = \operatorname {s o f t m a x} _ {i} \left(\mathbf {v} _ {\text {p o o l}} ^ {\top} \tanh \left(\mathbf {W} _ {\text {p o o l}} \mathbf {H} _ {L, i} ^ {\mathcal {X}}\right)\right). \tag {13}
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
Given $\{\phi_j\}_{j = 1}^K$ , we copy top-ranked keyphrases among $\mathcal{R}$ , regarding $\{\phi_j\}_{j = 1}^K$ . For training, we use mean square error (MSE) as the objective function: $\mathcal{L}_{\mathrm{MSE}} = \sum_{j = 1}^{K}||\phi_{j} - \phi_{j}^{*}||_{2}^{2}$ where $\phi_j^* = 1$ if $r_j = \mathcal{V}$ and $\phi_j^* = 0$ otherwise.
|
| 223 |
+
|
| 224 |
+
(b) Open set $\mathcal{V}$ : copying keywords On the other hand, in scientific publications, copying a word from $\mathcal{R}$ (e.g., "element", "method" in Figure 1) enables the decoder to generate novel keyphrases (e.g., "energetic Galerkin boundary element method"), by combining the word with words from the other two sources (e.g., "energetic Galerkin" from $\mathcal{X}$ ).
|
| 225 |
+
|
| 226 |
+
We adopt a single layer GRU decoder equipped with copy mechanism (See et al., 2017). For simplicity, we denote $\mathbf{H}_L^{\chi_{\mathrm{merged}}^+}$ by $\mathbf{H}$ and the number of nodes in the merged graph by $N$ . For $t$ -th word (i.e., $y_{t}$ ) decoding, copy scores $p_t^{\mathrm{copy}}$ are computed using attention: $p_{t,k}^{\mathrm{copy}} = \mathrm{softmax}(\mathbf{v}_1^\top \mathbf{W}_1[\mathbf{H}_k||\mathbf{o}_t])$ ,
|
| 227 |
+
|
| 228 |
+
where $\mathbf{o}_t$ denotes the decoder hidden state. However, $p_t^{\mathrm{copy}}$ only covers $y_{t}$ present in $\mathcal{X}^{+}$ . To predict arbitrary $y_{t}$ using $\nu$ , generation scores $p_t^{\mathrm{gen}}$ are computed by $p_t^{\mathrm{gen}} = \mathrm{softmax}(\mathbf{E}_{\mathcal{V}}(\mathbf{W}_2[\hat{\mathbf{h}}_t||\mathbf{o}_t])$ , where $\mathbf{E}_{\mathcal{V}}\in \mathbb{R}^{|\mathcal{V}|\times D}$ is a learnable word embedding matrix for $\nu$ , and $\hat{\mathbf{h}}_t$ ( $= \sum_{k = 1}^{N}p_{t,k}^{\mathrm{copy}}\mathbf{H}_k$ ) summarizes relevant contexts from $\mathcal{X}^{+}$ , using $p_t^{\mathrm{copy}}$ as relevance scores. The final score $p_t^{\mathrm{final}}$ is computed as a combination of the two scores using a gate value $z_{t}$ : $p_t^{\mathrm{final}} = p_t^{\mathrm{copy}}\times z_t + p_t^{\mathrm{gen}}\times (1 - z_t)$ , and $z_{t} = \sigma (\mathbf{v}_{3}^{\top}[\hat{\mathbf{h}}_{t}||\mathbf{o}_{t}])$ . Once $y_{t}$ is decoded according to $p_t^{\mathrm{final}}$ , we update the decoder hidden state $\mathbf{o}_t$ : $\mathbf{o}_{t + 1} = \mathrm{GRU}(\mathbf{y}_t,\mathbf{o}_t)$ , where $\mathbf{y}_t\in \mathbb{R}^D$ is the feature vector for the decoded token $y_{t}$ .
|
| 229 |
+
|
| 230 |
+
For $\mathbf{y}_t$ , previous work uses a word embedding matrix. However, when $y_t$ is a rare word, which is often replaced by "[UNK]" symbol, $\mathbf{y}_t$ from the embedding matrix contains little information on the word. We thus leverage structure-aware representation $\mathbf{H}$ , to capture the meaning of $y_t$ based on the contexts within $\mathcal{X}^+$ . Specifically, when $y_t$ is copied from $\mathcal{X}^+$ , similar to $p_t^{\mathrm{final}}$ , we compute $\mathbf{y}_t$ as combination of $\mathbf{H}$ and $\mathbf{E}_{\mathcal{V}}$ from $\mathcal{X}^+$ and $\mathcal{V}$ respectively: $\mathbf{y}_t = \mathbf{H}_{y_t \in \mathcal{X}^+} \times z_t + \mathbf{E}_{y_t \in \mathcal{V}} \times (1 - z_t)$ , where $\mathbf{H}_{y_t \in \mathcal{X}^+}$ , $\mathbf{E}_{y_t \in \mathcal{V}}$ are corresponding vectors for $y_t$ from $\mathbf{H}$ and $\mathbf{E}_{\mathcal{V}}$ respectively.
|
| 231 |
+
|
| 232 |
+
Following convention (Meng et al., 2017), to predict multiple keyphrases, we use beam search with beam size 200, and then use top-ranked keyphrases as final predictions. For training, we use cross entropy loss on $y_{t}$ as the objective function.
|
| 233 |
+
|
| 234 |
+
# 4 Experiment
|
| 235 |
+
|
| 236 |
+
# 4.1 Dataset
|
| 237 |
+
|
| 238 |
+
<table><tr><td>Dataset</td><td># of D</td><td># of unique KP</td><td># of KP per D</td><td>% of abs KP</td></tr><tr><td>Twitter</td><td>44K</td><td>4K</td><td>1.13</td><td>71.4</td></tr><tr><td>Weibo</td><td>46K</td><td>2K</td><td>1.06</td><td>75.7</td></tr><tr><td>SE</td><td>49K</td><td>12K</td><td>2.43</td><td>54.3</td></tr><tr><td>KP20k</td><td>510K</td><td>670K</td><td>2.94</td><td>36.7</td></tr></table>
|
| 239 |
+
|
| 240 |
+
Table 2: Statistics for three social datasets and a scientific publication dataset. "D" and "KP" are short for document and keyphrases respectively. "abs KP" denotes absent keyphrases. SE denotes StackExchange.
|
| 241 |
+
|
| 242 |
+
We conducted experiments on social media posts and scientific publication, with missing or incomplete structures. We present statistics on the datasets in Table 2.
|
| 243 |
+
|
| 244 |
+
For social media posts, we used three public datasets including not only microblog posts such
|
| 245 |
+
|
| 246 |
+
as Twitter and Weibo, but also a Q&A platform such as StackExchange (Wang et al., 2019). In the Twitter and Weibo datasets, user-assigned hashtags are treated as keyphrases of a corresponding post. Hashtags in the middle of a post were treated as present keyphrases, and hashtags either before or after a post were treated as absent keyphrases and are removed from the post. For the StackExchange dataset, a given document is a question, and keyphrases are manually annotated by users. Different from microblogs, for each question, there is a title and a description such that the given document is a concatenation of the title and the description for the question. For training and evaluation, document-keyphrase pairs are partitioned into train, validation, and test splits consisting of $80\%$ , $10\%$ , and $10\%$ of the entire data respectively.
|
| 247 |
+
|
| 248 |
+
As in (Wang et al., 2019), we adopted macroaveraged F1@k and mean average precision (mAP) as evaluation metrics. To compute F1@k, we count the number of correct keyphrases among the top-k predictions (denoted by hit@k), then, precision and recall are computed as hit@k divided by the number of predictions (i.e., k) and the number of gold keyphrases respectively. We report F1@1/3 for Twitter/Weibo and F1@3/5 for StackExchange considering the average number of keyphrases in datasets (1.13, 1.06, and 2.43 respectively). For all datasets, we report mAP over the top-5 predictions.
|
| 249 |
+
|
| 250 |
+
For scientific publication, we use KP20k dataset (Meng et al., 2017). Since the original dataset includes duplicates between train/test documents, we use a preprocessed dataset without duplicates, released by (Chen et al., 2019a) $^{8}$ . The dataset has 510K, 20K, 20K documents for train, validation, and test datasets respectively. As in the baselines, we use F1@5/10 as evaluation metrics.
|
| 251 |
+
|
| 252 |
+
For all datasets, following (Meng et al., 2017), we applied stemming using Porter Stemmer (Porter, 1980) as preprocessing, where duplicate keyphrases were removed after stemming.
|
| 253 |
+
|
| 254 |
+
# 4.2 Baselines
|
| 255 |
+
|
| 256 |
+
We compared our models with previous state-of-the-art KG baselines as well as KE baselines.
|
| 257 |
+
|
| 258 |
+
For KE baselines, we use TextRank (Mihalcea and Tarau, 2004) and TF-IDF which are the most
|
| 259 |
+
|
| 260 |
+
popular unsupervised keyword ranking models, and a neural sequence tagging model (Zhang et al., 2016) (denoted by Seq-Tag) that predicts keyphrase spans within the given document.
|
| 261 |
+
|
| 262 |
+
For KG baselines, we use CopyRNN (Meng et al., 2017) and CorrRNN (Chen et al., 2018) in common for both social media posts and scientific publication. CopyRNN adopts standard encoder-decoder architecture with copy mechanism. CorrRNN exploits correlation between keyphrases to predict diverse keyphrases. We compare our proposed model with the previous state-of-the-art baselines, including TAKG (Wang et al., 2019) for social media post datasets, that augments contexts of the given posts using topic modeling, and KG-KEKR-M (Chen et al., 2019a) for KP20k, that uses the retrieved keyphrases $\mathcal{R}$ to provide the decoder with additional contexts. Note that, different from ours, KG-KE-KR-M separately encodes $\mathcal{X}$ and $\mathcal{R}$ , thus do not enjoy structure-aware representations.
|
| 263 |
+
|
| 264 |
+
To validate the effectiveness of joint contextualization of $\mathcal{X}$ and $\mathcal{R}$ on the graph, we also conduct an ablation study, where we compare our proposed model to the ablation model that separately encodes the graph for $\mathcal{X}$ and the graph for $\mathcal{R}$ (denoted by w/o integration). For social media posts, we exclude all edges between $\mathcal{X}$ and $\mathcal{R}$ (green edges in Figure 1). For scientific publication, we separately encode two graphs (each for $\mathcal{X}$ or $\mathcal{R}$ ) instead of a merged multigraph. The ablation model is similar to KG-KE-KR-M that also separately encodes $\mathcal{X}$ and $\mathcal{R}$ , while differing in the encoder (graph encoder, instead of sequence encoder).
|
| 265 |
+
|
| 266 |
+
# 4.3 Implementation Details
|
| 267 |
+
|
| 268 |
+
For fair comparisons, we use the same hyperparameters and training strategy to the baselines, such as the size of the predefined vocabulary $\mathcal{V}$ , batch size of 64, Adam optimizer (Kingma and Ba, 2015) with 0.001 initial learning rate, and gradient clipping (Pascanu et al., 2013) with 1.0 threshold.
|
| 269 |
+
|
| 270 |
+
As exceptions, we set the best value for $D$ , $L$ , $K$ , and $M$ , based on validation performance. The best $D$ , among $\{150,300\}$ , was 300 for all datasets. The best $L$ , among $\{2,3,4,5\}$ , was 2 for social datasets and 3 for KP20k. The best $K$ , among $\{10,20,30,40,50\}$ , was 20/20/30, for Twitter/Weibo/StackExchange respectively. Because of the larger number of keyphrases per document in StackExchange (2.43) than Twitter (1.13) and Weibo (1.06), $K$ should be larger in StackEx
|
| 271 |
+
|
| 272 |
+
<table><tr><td rowspan="3">Model</td><td colspan="9">Social media post</td><td colspan="2">Scientific articles</td></tr><tr><td colspan="3">Twitter</td><td colspan="3">Weibo</td><td colspan="3">StackExchange</td><td colspan="2">KP20k</td></tr><tr><td>F1@1</td><td>F1@3</td><td>mAP</td><td>F1@1</td><td>F1@3</td><td>mAP</td><td>F1@3</td><td>F1@5</td><td>mAP</td><td>F1@5</td><td>F1@10</td></tr><tr><td>KE baselines</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TF-IDF</td><td>1.2</td><td>1.1</td><td>1.9</td><td>1.9</td><td>1.5</td><td>2.5</td><td>13.5</td><td>12.7</td><td>12.6</td><td>8.7</td><td>11.3</td></tr><tr><td>TextRank</td><td>1.7</td><td>1.9</td><td>1.9</td><td>0.2</td><td>0.5</td><td>0.6</td><td>6.0</td><td>8.3</td><td>4.8</td><td>15.1</td><td>13.2</td></tr><tr><td>Seq-Tag</td><td>22.83</td><td>12.32</td><td>22.43</td><td>16.32</td><td>9.01</td><td>16.53</td><td>17.616</td><td>12.812</td><td>19.013</td><td>-</td><td>-</td></tr><tr><td>KG w/o structure</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CopyRNN</td><td>36.611</td><td>26.85</td><td>43.112</td><td>32.03</td><td>22.72</td><td>38.01</td><td>31.53</td><td>27.42</td><td>33.51</td><td>30.61</td><td>27.30</td></tr><tr><td>CorrRNN</td><td>35.08</td><td>26.14</td><td>41.65</td><td>31.67</td><td>22.25</td><td>37.58</td><td>30.93</td><td>27.02</td><td>32.96</td><td>29.12</td><td>26.42</td></tr><tr><td>KG-KE-KR-M</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>31.70</td><td>28.20</td></tr><tr><td>KG w/ structure</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TAKG (topic)</td><td>38.53</td><td>27.80</td><td>45.12</td><td>35.03</td><td>24.42</td><td>41.34</td><td>33.42</td><td>29.21</td><td>35.51</td><td>-</td><td>-</td></tr><tr><td>TGNet (title)</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>32.03</td><td>27.83</td><td>34.14</td><td>31.43</td><td>28.13</td></tr><tr><td>KG w/ structure (ours)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>GSEnc (keyphrase)</td><td>38.87</td><td>28.12</td><td>45.56</td><td>42.86</td><td>29.53</td><td>50.04</td><td>35.23</td><td>30.92</td><td>37.83</td><td>32.93</td><td>29.02</td></tr><tr><td>w/o integration</td><td>36.84</td><td>27.05</td><td>43.32</td><td>38.64</td><td>27.03</td><td>45.73</td><td>33.23</td><td>29.32</td><td>35.52</td><td>31.93</td><td>27.92</td></tr></table>
|
| 273 |
+
|
| 274 |
+
Table 3: Keyphrase prediction performance. Bold-face indicates the best performance with significance $(p < 0.05$ using Student's paired t-test). We report average performance with standard deviation with different random seeds of 5 runs (e.g., $29.4_{1}$ indicates $29.4\pm 0.1$ ).
|
| 275 |
+
|
| 276 |
+
change. For fair comparison with KG-KE-KR-M that uses the retrieved keyphrases, we used the same $\mathcal{R}$ used in KG-KE-KR-M, for KP20k. For $M$ for social media posts (§3.2.3), we search the best value among $\{10, 25, 50, 100\}$ . The best $M$ was 50 for both Twitter and Weibo, while it was 25 for StackExchange. Since documents are longer in StackExchange (88 words on average) than Twitter (20) and Weibo (33) with length limitation, smaller $M$ makes more conservative edge construction.
|
| 277 |
+
|
| 278 |
+
Our experiments were conducted using a single GeForce RTX 2080Ti NVIDIA GPU. We used Pytorch (Paszke et al., 2019) for implementation.
|
| 279 |
+
|
| 280 |
+
# 4.4 Evaluation
|
| 281 |
+
|
| 282 |
+
In this section, we confirm the effectiveness of structures in documents for KG, and validate the superiority of the proposed structure over other structures. Results are shown in Table 3.
|
| 283 |
+
|
| 284 |
+
Since large portion of ground-truth keyphrases are absent keyphrases (i.e., context-scarce $\mathcal{X}$ ), KE models show significantly worse performances compared to KG models, on both datasets.
|
| 285 |
+
|
| 286 |
+
Among KG models, structures in document significantly improve performances, for both datasets, where TAKG with latent topics and TGNet with title significantly outperform the other KG models without structures, except KG-KE-KR-M on KP20k. However, both a small number of latent topics and short titles have limited information. In contrast, by retrieving relevant keyphrases from existing keyphrases, we augment the given document with sufficient topical information. As a result, GSEnc outperforms all baselines, except TAKG on
|
| 287 |
+
|
| 288 |
+
Twitter with comparable performance.
|
| 289 |
+
|
| 290 |
+
For social datasets, in addition to having superior or comparable performance over baselines, our proposed model, by avoiding sequential decoding, requires much lower computational costs than other KG models. Regarding computational efficiency, our model can process each text in about $22\mathrm{ms}$ (21 ms for retrieving $\mathcal{R}$ and less than 1 ms for the rest) while other KG approaches consume about $90~\mathrm{ms}$ .
|
| 291 |
+
|
| 292 |
+
Meanwhile, we stress that it is important to jointly contextualize $\mathcal{X}$ and $\mathcal{R}$ , to enjoy mutual benefits between them; we found that performance significantly decrease on all datasets, when we separately encode them (w/o integration in Table 3).
|
| 293 |
+
|
| 294 |
+
4.4.1 Integrating $\mathcal{R}$ with given titles
|
| 295 |
+
|
| 296 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">Input</td><td>KP20k</td><td>SE</td></tr><tr><td>F1@3</td><td>F1@5</td></tr><tr><td>TGNet</td><td>X+T</td><td>31.4</td><td>32.0</td></tr><tr><td rowspan="2">GSEnc (ours)</td><td>X+R</td><td>32.9</td><td>35.4</td></tr><tr><td>X+R+T</td><td>32.9</td><td>36.3</td></tr></table>
|
| 297 |
+
|
| 298 |
+
Table 4: Evaluation results using different structures: SE denotes for StackExchange dataset.
|
| 299 |
+
|
| 300 |
+
When titles are available, we can use $\mathcal{R}$ , to complement concise, but incomplete titles (high precision, low recall), by providing missing terms in the title (increasing recall). In this section, we explain how to integrate $\mathcal{R}$ and title (denoted by $\mathcal{T}$ ), for better structured documents, and evaluate the effectiveness of such integration. We use KP20k and StackExchange datasets where titles of documents are written by the authors of the documents.
|
| 301 |
+
|
| 302 |
+
Since the title words are already represented as nodes in $\mathcal{X}$ , we can simply add another edge type,
|
| 303 |
+
|
| 304 |
+
as similarly done in §3.2.4, to make three types of edges for the same node pair: edges from $\mathcal{X}$ , $\mathcal{R}$ , and the given title respectively. As in edges for $\mathcal{X}$ , we use position-based proximity between title words, for edge weights. Given the title edges, we use contexts gathered from the title, to update contextualized representations, similar to Eq (3,9). The results are shown in Table 4.
|
| 305 |
+
|
| 306 |
+
We observe that $\mathcal{R}$ is more representative in KP20k than StackExchange, where the F1 accuracy of $\mathcal{R}$ on gold keywords was 22.3 and 11.5, for KP20k and StackExchange respectively. This can be explained by the document length difference: When $\mathcal{R}$ is less relevant, for shorter documents in StackExchange, titles with high precision capture relevant keyphrases in $\mathcal{R}$ , such that $\mathcal{X} + \mathcal{R} + \mathcal{T}$ outperforms $\mathcal{X} + \mathcal{R}$ , while $\mathcal{X} + \mathcal{R}$ is sufficiently accurate, otherwise. Our proposed approach, by leveraging both fields, work well in both cases, outperforming TGNet that uses only title structure.
|
| 307 |
+
|
| 308 |
+
# 4.4.2 Future work
|
| 309 |
+
|
| 310 |
+
<table><tr><td rowspan="2">Model (Input)</td><td>ID test</td><td>OOD test</td></tr><tr><td>KP20k</td><td>Inspec</td></tr><tr><td>CopyRNN(X)</td><td>30.6</td><td>25.1</td></tr><tr><td>GSEnc(X+R)</td><td>32.9</td><td>24.4</td></tr></table>
|
| 311 |
+
|
| 312 |
+
Table 5: Different effects of leveraging $\mathcal{R}$ , for in-distribution (ID) and out-of-distribution (OOD) test datasets. We present F1@5 performance of CopyRNN and GSEnc (ours), that uses $\mathcal{X}$ and $\mathcal{X} + \mathcal{R}$ as inputs, respectively.
|
| 313 |
+
|
| 314 |
+
Leveraging existing keyphrases in train set is specifically effective when test distribution is similar to the train distribution, i.e., in-distribution test set, as we validated in our experiments. On the other hand, for out-of-distribution test set, where train/test distributions are different from each other, existing keyphrases may not be helpful. We empirically tested different effects of leveraging $\mathcal{R}$ by training models using KP20k training dataset and evaluating the models on KP20k test set (in-distribution) and Inspec (Hulth, 2003) test set (out-of-distribution). While, in KP20k datasets, keyphrases are labeled by authors of documents, keyphrases in Inspec are labeled by third-party annotators. In Table 5, we can observe that $\mathcal{R}$ does not improve on out-of-distribution test set, while showing significant improvements on indistribution test set.
|
| 315 |
+
|
| 316 |
+
To overcome, as a future work, our retriever can be extended to use external sources such as
|
| 317 |
+
|
| 318 |
+
open-domain knowledge graphs (Shi et al., 2017) or Wikipedia texts (Yu and Ng, 2018), that generalize well to out-of-distribution data. However, such external sources will be less effective than internal sources (e.g., existing keyphrases), when most of target documents are in-distribution documents. We will explore effective integration strategies between internal/external sources, to enjoy complementary strengths of those, for better performance on both in-distribution and out-of-distribution documents.
|
| 319 |
+
|
| 320 |
+
# 5 Conclusion
|
| 321 |
+
|
| 322 |
+
We studied the problem of KG for scientific text and social posts, representing context-scarce scenarios with open and closed keyphrase set, respectively. Our work is two-phased, for augmenting and encoding missing/incomplete structure. Empirical evaluation results validate that our proposed model outperforms the state-of-the-art in both problems.
|
| 323 |
+
|
| 324 |
+
# Acknowledgments
|
| 325 |
+
|
| 326 |
+
This work is supported by IITP grants (ITRC, 2021-2020-0-01789, 2021-2016-0-00464) and SNU AI Graduate School Program (2021-0-01343).
|
| 327 |
+
|
| 328 |
+
# References
|
| 329 |
+
|
| 330 |
+
Jun Chen, Xiaoming Zhang, Yu Wu, Zhao Yan, and Zhoujun Li. 2018. Keyphrase generation with correlation constraints. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4057-4066, Brussels, Belgium. Association for Computational Linguistics.
|
| 331 |
+
Wang Chen, Hou Pong Chan, Piji Li, Lidong Bing, and Irwin King. 2019a. An integrated approach for keyphrase generation via exploring the power of retrieval and extraction. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 2846-2856, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 332 |
+
Wang Chen, Yifan Gao, Jiani Zhang, Irwin King, and Michael R Lyu. 2019b. Title-guided encoding for keyphrase generation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 6268-6275.
|
| 333 |
+
Kyunghyun Cho, Bart van Merrienboer, Caglar Gul- cehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proceedings of
|
| 334 |
+
|
| 335 |
+
the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1724-1734, Doha, Qatar. Association for Computational Linguistics.
|
| 336 |
+
Yann N Dauphin, Angela Fan, Michael Auli, and David Grangier. 2017. Language modeling with gated convolutional networks. In International conference on machine learning, pages 933-941.
|
| 337 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778.
|
| 338 |
+
Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735-1780.
|
| 339 |
+
Anette Hulth. 2003. Improved automatic keyword extraction given more linguistic knowledge. In Proceedings of the 2003 conference on Empirical methods in natural language processing, pages 216-223.
|
| 340 |
+
Jihyuk Kim, Young-In Song, and Seung-won Hwang. 2021. Web document encoding for structure-aware keyphrase extraction. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 1823-1827.
|
| 341 |
+
Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings.
|
| 342 |
+
Thomas N. Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulouse, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net.
|
| 343 |
+
Decong Li, Sujian Li, Wenjie Li, Wei Wang, and Weiguang Qu. 2010. A semi-supervised key phrase extraction approach: learning from title phrases through a document semantic network. In Proceedings of the ACL 2010 conference short papers, pages 296-300.
|
| 344 |
+
Jimmy Lin, Xueguang Ma, Sheng-Chieh Lin, Jheng-Hong Yang, Ronak Pradeep, and Rodrigo Nogueira. 2021. Pyserini: An easy-to-use python toolkit to support replicable in research with sparse and dense representations. arXiv preprint arXiv:2102.10073.
|
| 345 |
+
Ji Ma, Ivan Korotkov, Yinfei Yang, Keith Hall, and Ryan McDonald. 2021. Zero-shot neural passage retrieval via domain-targeted synthetic question generation. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1075-1088.
|
| 346 |
+
|
| 347 |
+
Andrew L Maas, Awni Y Hannun, and Andrew Y Ng. 2013. Rectifier nonlinearities improve neural network acoustic models. In Proc. icml, volume 30, page 3. Citeseer.
|
| 348 |
+
Rui Meng, Xingdi Yuan, Tong Wang, Sanqiang Zhao, Adam Trischler, and Daqing He. 2021. An empirical study on neural keyphrase generation. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4985-5007, Online. Association for Computational Linguistics.
|
| 349 |
+
Rui Meng, Sanqiang Zhao, Shuguang Han, Daqing He, Peter Brusilovsky, and Yu Chi. 2017. Deep keyphrase generation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 582-592, Vancouver, Canada. Association for Computational Linguistics.
|
| 350 |
+
Rada Mihalcea and Paul Tarau. 2004. Textrank: Bringing order into text. In Proceedings of the 2004 conference on empirical methods in natural language processing, pages 404-411.
|
| 351 |
+
Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. 2013. On the difficulty of training recurrent neural networks. In Proceedings of the 30th International Conference on International Conference on Machine Learning - Volume 28, ICML'13, page III-1310-III-1318. JMLR.org.
|
| 352 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024-8035. Curran Associates, Inc.
|
| 353 |
+
Martin F Porter. 1980. An algorithm for suffix stripping. Program.
|
| 354 |
+
Stephen E Robertson and Steve Walker. 1994. Some simple effective approximations to the 2-poisson model for probabilistic weighted retrieval. In SI-GIR'94, pages 232-241. Springer.
|
| 355 |
+
Joseph Rocchio. 1971. Relevance feedback in information retrieval. The Smart retrieval system-experiments in automatic document processing, pages 313-323.
|
| 356 |
+
Abigail See, Peter J. Liu, and Christopher D. Manning. 2017. Get to the point: Summarization with pointer-generator networks. In Proceedings of the 55th Annual Meeting of the Association for Computational
|
| 357 |
+
|
| 358 |
+
Linguistics (Volume 1: Long Papers), pages 1073-1083, Vancouver, Canada. Association for Computational Linguistics.
|
| 359 |
+
Wei Shi, Weiguo Zheng, Jeffrey Xu Yu, Hong Cheng, and Lei Zou. 2017. Keyphrase extraction using knowledge graphs. Data Science and Engineering, 2(4):275-288.
|
| 360 |
+
Zhiqing Sun, Jian Tang, Pan Du, Zhi-Hong Deng, and Jian-Yun Nie. 2019. Divgraphpointer: A graph pointer network for extracting diverse keyphrases. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 755-764.
|
| 361 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104-3112.
|
| 362 |
+
Petar Velicković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. 2018. Graph attention networks. In International Conference on Learning Representations.
|
| 363 |
+
Yue Wang, Jing Li, Hou Pong Chan, Irwin King, Michael R. Lyu, and Shuming Shi. 2019. Topi- aware neural keyphrase generation for social media language. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2516-2526, Florence, Italy. Association for Computational Linguistics.
|
| 364 |
+
Jinxi Xu and W Bruce Croft. 2017. Query expansion using local and global document analysis. In Acm SIGIR forum, volume 51, pages 168-175. ACM New York, NY, USA.
|
| 365 |
+
Jiacheng Ye, Tao Gui, Yichao Luo, Yige Xu, and Qi Zhang. 2021. One2Set: Generating diverse keyphrases as a set. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 4598-4608, Online. Association for Computational Linguistics.
|
| 366 |
+
Yang Yu and Vincent Ng. 2018. Wikirank: Improving keyphrase extraction based on background knowledge. arXiv preprint arXiv:1803.09000.
|
| 367 |
+
Xingdi Yuan, Tong Wang, Rui Meng, Khushboo Thaker, Peter Brusilovsky, Daqing He, and Adam Trischler. 2020. One size does not fit all: Generating and evaluating variable number of keyphrases. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7961-7975, Online. Association for Computational Linguistics.
|
| 368 |
+
Qi Zhang, Yang Wang, Yeyun Gong, and Xuanjing Huang. 2016. Keyphrase extraction using deep recurrent neural networks on twitter. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 836-845,
|
| 369 |
+
|
| 370 |
+
Austin, Texas. Association for Computational Linguistics.
|
structureaugmentedkeyphrasegeneration/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:572bf259531d20e70583de00e93d4e62f092445873a9b62290523696f7b22d29
|
| 3 |
+
size 419155
|
structureaugmentedkeyphrasegeneration/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8dc92e937b1d655811e48ba07829a752ff9a41c6bddef193e9c65c828f141eed
|
| 3 |
+
size 585116
|
structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6c1a70013d8e507eeb3802be90ea4ed7d2a42be8b35675f56019773cd0b4f7a
|
| 3 |
+
size 85052
|
structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f80cdd4b379109fcb42f1b59180a939b72ee4a37dfdc1466f0fc7a5f009ee980
|
| 3 |
+
size 101172
|
structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/8ee69b83-999f-4f47-a84f-559768ef01eb_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f2f1a0b03091b94d11dbfe7cc63269acb0198278f258f4b845291ced60c0571
|
| 3 |
+
size 342301
|
structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/full.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Structure-aware Fine-tuning of Sequence-to-sequence Transformers for Transition-based AMR Parsing
|
| 2 |
+
|
| 3 |
+
Jiawei Zhou\* Tahira Naseem\* Ramón Fernandez Astudillo\* Young-Suk Lee\* Radu Florian\* Salim Roukos\*
|
| 4 |
+
|
| 5 |
+
$^{\text{a}}$ Harvard University $^{\text{b}}$ IBM Research
|
| 6 |
+
|
| 7 |
+
$\spadesuit$ jzhou02@g.harvard.edu $\diamond$ ramon ASTUDillo@ibm.com
|
| 8 |
+
|
| 9 |
+
$\diamondsuit$ {tnaseem, ysuklee, raduf, roukos}@us.ibm.com
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
Predicting linearized Abstract Meaning Representation (AMR) graphs using pre-trained sequence-to-sequence Transformer models has recently led to large improvements on AMR parsing benchmarks. These parsers are simple and avoid explicit modeling of structure but lack desirable properties such as graph well-formedness guarantees or built-in graph-sentence alignments. In this work we explore the integration of general pre-trained sequence-to-sequence language models and a structure-aware transition-based approach. We depart from a pointer-based transition system and propose a simplified transition set, designed to better exploit pre-trained language models for structured fine-tuning. We also explore modeling the parser state within the pre-trained encoder-decoder architecture and different vocabulary strategies for the same purpose. We provide a detailed comparison with recent progress in AMR parsing and show that the proposed parser retains the desirable properties of previous transition-based approaches, while being simpler and reaching the new parsing state of the art for AMR 2.0, without the need for graph re-categorization.
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
The task of Abstract Meaning Representation (AMR) parsing translates a natural sentence into a rooted directed acyclic graph capturing the semantics of the sentence, with nodes representing concepts and edges representing their relations (Banarescu et al., 2013). Recent works utilizing pretrained encoder-decoder language models show great improvements in AMR parsing results (Xu et al., 2020; Bevilacqua et al., 2021). These approaches avoid explicit modeling of the graph structure. Instead, they directly predict the linearized AMR graph treated as free text. While the use of pre-trained Transformer encoders is widely extended in AMR parsing, the use of pre-trained
|
| 18 |
+
|
| 19 |
+
Transformer decoders is recent and has shown to be very effective, maintaining current state-of-the-art results (Bevilacqua et al., 2021).
|
| 20 |
+
|
| 21 |
+
These approaches however lack certain desirable properties. There are no structural guarantees of graph well-formedness, i.e. the model may predict strings that can not be decoded into valid graphs, and post-processing is required. Furthermore, predicting AMR linearizations ignores the implicit alignments between graph nodes and words, which provide a strong inductive bias and are useful for downstream AMR applications (Mitra and Baral, 2016; Liu et al., 2018; Vlachos et al., 2018; Kapanipathi et al., 2021; Naseem et al., 2021).
|
| 22 |
+
|
| 23 |
+
On the other hand, transition-based AMR parsers (Wang et al., 2015; Ballesteros and Al-Onaizan, 2017a; Astudillo et al., 2020; Zhou et al., 2021) operate over the tokens of the input sentence, generating the graph incrementally. They implicitly model graph structural constraints through transitions and yield alignments by construction, thus guaranteeing graph well-formedness.<sup>1</sup> However, it remains unclear whether explicit modeling of structure is still beneficial for AMR parsing in the presence of powerful pre-trained language models and their strong free text generation abilities.
|
| 24 |
+
|
| 25 |
+
In this work, we integrate pre-trained sequence-to-sequence (seq-to-seq) language models with the transition-based approach for AMR parsing, and explore to what degree they are complementary. To fully utilize the generation power of the pre-trained language models, we propose a transition system with a small set of basic actions – a generalization of the action-pointer transition system of Zhou et al. (2021). We use BART (Lewis et al., 2019) as our pre-trained language model, since it has shown significant improvements in linearized AMR generation (Bevilacqua et al., 2021). Unlike previous approaches that directly fine-tune the model with
|
| 26 |
+
|
| 27 |
+
linearized graphs, we modify the model structure to work with our transition system, and encode parser states in BART's attention mechanism (Astudillo et al., 2020; Zhou et al., 2021). We also explore different vocabulary strategies for action generation. These changes convert the pre-trained BART to a transition-based parser where graph constraints and alignments are internalized.
|
| 28 |
+
|
| 29 |
+
We provide a detailed comparison with top-performing AMR parsers and perform ablation experiments showing that our proposed transition system and BART modifications are both necessary to achieve strong performance. Although BART has great language generation capacity, it still benefits from parser state encoding with hard attention, and can efficiently learn structural output. Our model establishes a new state of the art for AMR 2.0 while maintaining graph well-formedness guarantees and producing built-in alignments.
|
| 30 |
+
|
| 31 |
+
# 2 Intricacies of AMR Parsers
|
| 32 |
+
|
| 33 |
+
A frequent complaint about AMR parsers is that they involve combining many different techniques and hand-crafted rules, resulting in complex pipelines that are hard to analyze and generalize poorly. This situation has notably improved in the past few years but there are still two main sources of complexity present in almost all recent parsers: graph re-categorization and subgraph actions.
|
| 34 |
+
|
| 35 |
+
Graph re-categorization (Wang and Xue, 2017; Lyu and Titov, 2018; Zhang et al., 2019a) normalizes the graph prior to learning. This includes joining certain subgraphs such as entities, dates and other constructs into single nodes, removing special types of nodes like polarity and normalizing propbank names. An example of common normalizations is displayed in Figure 1. Training and decoding of models using this technique happens in this re-categorized space. Re-categorized graphs are expanded to normal valid AMR graphs in a post-processing stage. The type and number of subgraphs normalized vary across implementations, but most high performing approaches (Cai and Lam, 2020; Bevilacqua et al., 2021) utilize the re-categorization described in Appendix A.1 of Zhang et al. (2019a). This version requires of an external Named Entity Recognition (NER) system to anonymize named entities, both at train time and test time. It also makes use of look-up tables for nominalizations (e.g. English to England) and other hand-crafted rules. Graph re-categorization
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 1: AMR graph of the sentence I have no opinion on the New York Mets. Examples of subgraphs for entity anonymization, collapsing of verbalized nouns and removal of the polarity node and edge.
|
| 39 |
+
|
| 40 |
+
has been criticised for its lack of generalization to new domains, such as biomedical domain or even the AMR 3.0 corpus (Bevilacqua et al., 2021). Recent top performing systems e.g. Cai and Lam (2020); Bevilacqua et al. (2021) also provide results without re-categorization, but this is shown to hurt performance notably on the AMR 2.0 corpus.
|
| 41 |
+
|
| 42 |
+
Subgraph actions (Ballesteros and Al-Onaizan, 2017b) are used in transition-based systems and play a role similar to re-categorization. Instead of normalizing and reverting, transition-based parsers apply a subgraph action that generates an entire subgraph at once. This subgraph action coincides with many of the subgraphs collapsed in re-categorization. Subgraph actions bring however fewer external dependencies, since the parser learns to segment and identify subgraphs during training. They still suffer however from data sparsity since some subgraphs appear very few times. As in re-categorization, subgraph actions also make use of lookup tables for nominalization and similar constructs that hinder generalization. Furthermore, they create the problem of unattachable nodes. This was addressed in Zhou et al. (2021) by ignoring subgraphs for a set of heuristically determined cases. Subgraph actions have been used in all transition-based AMR systems (Naseem et al., 2019; Astudillo et al., 2020; Zhou et al., 2021).
|
| 43 |
+
|
| 44 |
+
Aside from NER, past AMR parsers have other external dependencies such as POS taggers (Zhang et al., 2019a; Cai and Lam, 2020) and lemmatizers (Cai and Lam, 2020; Naseem et al., 2019; Astudillo et al., 2020).
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
Figure 2: From top to bottom: graph (solid lines), sentence (source), addressable action positions and action sequence (target) for the sentence Employees liked their Boston trip, aligned (dotted lines) to its AMR graph. Arc-creating actions are displayed vertically due to space constraints. Words are repeated in grey to indicate the word under cursor for each action. The node Boston in dotted box is created by copying the token under cursor via COPY action at position 13. LA(1,ARG0) creates a left arc with label ARG0 from the top concept like-01 to the concept person at position 1. For the concept trip-03, LA(1,ARG0) is a co-reference (re-entrancy) to the concept person.
|
| 48 |
+
|
| 49 |
+
# 3 A Simplified Transition System
|
| 50 |
+
|
| 51 |
+
In this section we propose a transition system for AMR parsing designed with two objectives: maximize the use of strong pre-trained decoders such as BART, and minimize the complexity and dependencies of the transition system compared to previous approaches. Similarly to Zhou et al. (2021), we scan the sentence from left to right and use a token cursor to point to a source token at each step. Parser actions can either shift the cursor one token forward or generate any number of nodes and edges while the cursor points to the same token. The proposed set of actions is as follows:
|
| 52 |
+
|
| 53 |
+
SHIFT moves token cursor one word to the right.
|
| 54 |
+
|
| 55 |
+
<string> creates node of name <string>.
|
| 56 |
+
|
| 57 |
+
COPY creates node where the node name is the token under the current cursor position.
|
| 58 |
+
|
| 59 |
+
LA(j,LBL) creates an arc with label LBL from the last generated node to the node generated at the $j_{th}$ transition step.
|
| 60 |
+
|
| 61 |
+
$\mathbf{RA}(\mathbf{j}, \mathbf{LBL})$ same as LA but with arc direction reversed.
|
| 62 |
+
|
| 63 |
+
ROOT declares the last predicted node as the root.
|
| 64 |
+
|
| 65 |
+
Unlike previous transition-based approaches, we do not use a reserved action, such as PRED (Zhou et al., 2021) or CONFIRM (Ballesteros and Al
|
| 66 |
+
|
| 67 |
+
Onaizan, 2017b), to predict nodes; instead we directly use the node name as the action symbol generating that node. This opens the possibility of utilizing BART's target side pre-trained vocabulary. We avoid using any copy actions that involve copying from lemmatizer outputs or lookup tables. Our COPY action is limited to copying the lower cased word. We also eliminate the use of SUBGRAPH (Zhou et al., 2021) or ENTITY (Ballesteros and Al-Onaizan, 2017b) actions producing multiple connected nodes simultaneously, as well as MERGE action creating spans of words. In previous approaches these actions were derived from alignments or hand-crafted. They thus did not cover all possible cases limiting the scalability of the approach. Finally, we discard the REDUCE action previously used to delete a source token. The effect can be achieved by simply using SHIFT without performing any other action. Figure 2 shows an example sentence with an action sequence and the corresponding graph. This can be compared with the handling of verbalization and named entities in Figure 1.
|
| 68 |
+
|
| 69 |
+
To train a parser with a transition system, we need an action sequence for each training sentence that will produce the gold graph when executed. This action sequence then serves as the target for seq-to-seq models. A simple rule-based oracle algorithm creates these ground-truth sequences given
|
| 70 |
+
|
| 71 |
+
a sentence, its AMR graph and node-to-word alignments. At each step, the oracle tries the following possibilities in the order of listing and performs the first one that applies:
|
| 72 |
+
|
| 73 |
+
1. Create next gold arc between last created node and previously created nodes;
|
| 74 |
+
2. Create next gold node aligned to token under cursor;
|
| 75 |
+
3. If not at sentence end, SHIFT source cursor;
|
| 76 |
+
4. Finish oracle.
|
| 77 |
+
|
| 78 |
+
If possible, nodes are generated by COPY and otherwise with <string> actions. Arcs are generated with LA and RA, connecting the nodes closer to the current node before the ones that are farther away. Note that the arcs are created by pointing to positions in the action history, where a graph node is represented by the action that creates it, following Zhou et al. (2021). Multiple nodes can be generated at a single source word before the cursor is moved by SHIFT. When multiple nodes are aligned to the same token, these nodes are generated in a predetermined topological order of graph traversal, interleaved by edge creation actions. ROOT is applied as soon as the root node is generated.
|
| 79 |
+
|
| 80 |
+
The above oracle circumvents the problem of unattachable nodes by avoiding the use of subgraph actions. This implies that the oracle will always produce a unique action sequence that fully recovers the gold graph as long as every node in the graph is aligned to some token. To guarantee that all nodes are aligned, we improve upon the alignment system from Naseem et al. (2019); Astudillo et al. (2020), which aligns a large majority, but not all AMR nodes.<sup>3</sup> In order to do this, we apply a heuristic based on graph proximity to maintain local correspondences between graph nodes and sentence words. If a node is not aligned, we copy the alignment from its first child node, if existing, and otherwise the alignment from its first parent node. For example, in Figure 2 if the node person was not provided with an alignment, our oracle would have assigned it to the aligned token of its child node employ-01. This is a recursive procedure – as long as there are some alignments to start with and the ground-truth graph is connected, all the nodes will get aligned.
|
| 81 |
+
|
| 82 |
+
Our proposed transition system makes better use of BART pre-trained decoder compared to previous transition-based approaches (see Section 6) while greatly simplifying the transition set. It also naturally produces node-to-word alignments via source token cursor in the meantime.
|
| 83 |
+
|
| 84 |
+
# 4 Parsing Model
|
| 85 |
+
|
| 86 |
+
We build our model on top of the pre-trained seq-to-seq Transformer, BART (Lewis et al., 2019). We modify its architecture to incorporate a pointer network and internalize parser states induced by our transition system, and fine-tune for sentence-to-action generation.
|
| 87 |
+
|
| 88 |
+
# 4.1 Structure-aware Architecture
|
| 89 |
+
|
| 90 |
+
We adopt similar modifications on the Transformer architecture as in Zhou et al. (2021) since our transition system is based on the same action-pointer mechanism. The modifications do not introduce new modules or extra parameters, which naturally fit our need to adapt BART into a transition-based parser with internal graph well-formedness.
|
| 91 |
+
|
| 92 |
+
In particular, the target actions are factored into two parts: bare action symbols (containing labels when presented) and pointer values for edges. We use the BART standard output for the former, and a pointer network for the latter. As the pointing happens on the actions history, essentially a self-attention mechanism, we re-purpose one decoder self-attention head as the pointer network. It is supervised with additional cross entropy loss during fine-tuning and decoded for building graph edges at inference.
|
| 93 |
+
|
| 94 |
+
We encode the monotonic action-source alignments induced by the parser state with hard attention, i.e. by masking some decoder cross-attention heads to only focus on aligned words. Since BART processes source sentences with subwords, we apply an additional average pooling layer on top of its encoder to return states of original source words, used for the decoder layers for our hard attention. At last, as the possible valid actions are constrained with transition rules and states at every step, we restrict the decoder output space via hard masking of the BART final softmax layer. For simplicity, we do not incorporate the GNN-style (Li et al., 2019) step-wise decoder graph embedding technique in Zhou et al. (2021) as their gain was shown to be modest.
|
| 95 |
+
|
| 96 |
+
# 4.2 Action Generation
|
| 97 |
+
|
| 98 |
+
According to how we treat the target-side vocabulary for action generation, we propose two variations of the model. The first one is to use a completely separate vocabulary for target actions, where the decoder input side and output side use stand-alone embeddings for actions, separate from the pre-trained BART subword embeddings. We denote this setup as our sep-voc model (abbreviated as StructBART-S).
|
| 99 |
+
|
| 100 |
+
However, this might not fully utilize the power of the pre-trained BART since it is an encoder-decoder model with a single vocabulary and all embeddings shared. Although our generation targets are action symbols, the node generating actions are closely related to natural words in their surface forms, which are what BART was pre-trained on. Therefore, we propose a second variation where we use a joint vocabulary for both the source tokens and target actions. Naively relying on the original BART subword vocabulary would end up splitting action symbols blindly, which is not desired as the structures such as alignments and edge pointers would be disrupted. Inspired by Bevilacqua et al. (2021), we add frequent node-creating actions to the vocabulary, in order to capture common AMR concepts intact, and split the remaining concepts with BART subword vocabulary. Non-node-creating actions such as SHIFT and COPY are added as-is to the BART vocabulary.
|
| 101 |
+
|
| 102 |
+
In this setup, a single node string can potentially be generated with multiple steps; we modify the arc transitions to always point to the beginning position of a node string for attachment. With joint vocabulary setup, the model could learn to generate unseen nodes with BART's subword vocabulary, eliminating potential out-of-vocabulary problems. We refer to this setup as our joint-voc model (abbreviated as StructBART-J).
|
| 103 |
+
|
| 104 |
+
# 4.3 Training and Inference
|
| 105 |
+
|
| 106 |
+
We load the pre-trained BART parameters except for the standalone vocabulary embeddings for sep-voc model and the extended embeddings for the joint-voc model. We then fine-tune the model with the updated structure-aware architectures on sentence-action pairs with addition of pointer loss.
|
| 107 |
+
|
| 108 |
+
For decoding, we use similar constrained beam
|
| 109 |
+
|
| 110 |
+
search algorithm as in Zhou et al. (2021), but with our own transition set and rules. We run a state machine on the side to get parser states used by the model. Note that for our joint-voc model, we only allow subword split for node (<string>) actions. As our fine-tuned model is already structure-aware, the graph well-formedness is always guaranteed and no post-processing is needed to return valid graphs, unlike Xu et al. (2020); Bevilacqua et al. (2021). The only post-processing we use is to add wikification nodes as used in all previous parsers. $^5$
|
| 111 |
+
|
| 112 |
+
# 5 Experimental Setup
|
| 113 |
+
|
| 114 |
+
Datasets We evaluate our models on 3 AMR benchmark datasets, namely AMR 1.0 (LDC2014T12), AMR 2.0 (LDC2017T10), and AMR 3.0 (LDC2020T02). They have around 10K, 37K, and 56K sentence-AMR pairs for training, respectively. Both AMR 2.0 and AMR 3.0 have wikification nodes but AMR 1.0 does not.
|
| 115 |
+
|
| 116 |
+
Evaluation We assess our models with SMATCH (F1) scores $^{7}$ (Cai and Knight, 2013). We also report the fine-grained evaluation metrics (Damonte et al., 2016) to further investigate different aspects of parsing results, such as concept identification, entity recognition, re-entrancies, etc.
|
| 117 |
+
|
| 118 |
+
Model Configuration We follow the original BART configuration (Lewis et al., 2019) and code. We use the large model configuration as default, and also the base model for ablation studies. The pointer network is always tied with one head of the decoder top layer, and the pointer loss is added to the model cross-entropy loss with 1:1 ratio for training. Transition alignments are used to mask cross-attention in 2 heads of all decoder layers. For sep-voc model, we build separate embedding matrices for target actions from the training data for decoder input and output space. For joint-voc model, we add new embedding vectors for non-node action symbols and node action strings with a default minimum frequency of 5 (only accounts for about one third of all nodes due to sparsity).
|
| 119 |
+
|
| 120 |
+
<table><tr><td rowspan="2">ID</td><td rowspan="2">Model</td><td rowspan="2">Pre-trained Model</td><td rowspan="2">Collapse Subgraph</td><td colspan="3">External Dependency</td><td rowspan="2">Extra Data</td><td rowspan="2">Train Align.</td><td colspan="3">SMATCH F1 (%)</td></tr><tr><td>POS</td><td>NER</td><td>Lemm.</td><td>AMR 1.0</td><td>AMR 2.0</td><td>AMR 3.0</td></tr><tr><td>1</td><td>Naseem et al. (2019)</td><td>BERT</td><td>S.A.</td><td></td><td></td><td>✓</td><td></td><td>✓</td><td>-</td><td>75.5</td><td>-</td></tr><tr><td>2</td><td>Zhang et al. (2019a)</td><td>BERT</td><td>G.R.</td><td>✓</td><td>✓</td><td></td><td></td><td></td><td>70.2 ±0.1</td><td>76.3 ±0.1</td><td>-</td></tr><tr><td>3</td><td>Zhang et al. (2019b)</td><td>BERT</td><td>G.R.</td><td>✓</td><td>✓</td><td></td><td></td><td></td><td>71.3 ±0.1</td><td>77.0 ±0.1</td><td>-</td></tr><tr><td>4</td><td>Cai and Lam (2020)</td><td>BERT</td><td></td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td>74.0</td><td>78.7</td><td>-</td></tr><tr><td>5</td><td>Cai and Lam (2020)</td><td>BERT</td><td>G.R.</td><td>✓</td><td>✓</td><td>✓</td><td></td><td></td><td>75.4</td><td>80.2</td><td>-</td></tr><tr><td>6</td><td>Astudillo et al. (2020)</td><td>RoBERTa</td><td>S.A.</td><td></td><td></td><td>✓</td><td></td><td>✓</td><td>76.9 ±0.1</td><td>80.2 ±0.0</td><td>-</td></tr><tr><td>7</td><td>Lyu et al. (2020)</td><td>RoBERTa</td><td>G.R.</td><td></td><td>✓</td><td>✓</td><td></td><td></td><td>-</td><td>-</td><td>75.8</td></tr><tr><td>8</td><td>Bevilacqua et al. (2021)</td><td>BART†</td><td></td><td></td><td></td><td></td><td></td><td></td><td>-</td><td>83.8</td><td>83.0</td></tr><tr><td>9</td><td>Bevilacqua et al. (2021)</td><td>BART†</td><td>G.R.</td><td></td><td>✓</td><td></td><td></td><td></td><td>-</td><td>84.5</td><td>80.2</td></tr><tr><td>10</td><td>Zhou et al. (2021)</td><td>RoBERTa</td><td>S.A.</td><td></td><td></td><td>✓</td><td></td><td>✓</td><td>78.3 ±0.1</td><td>81.7 ±0.1</td><td>80.3 ±0.1</td></tr><tr><td>11</td><td>Xu et al. (2020)</td><td>Custom†</td><td></td><td></td><td></td><td></td><td>4M</td><td></td><td>-</td><td>81.4</td><td>-</td></tr><tr><td>12</td><td>Lee et al. (2020)</td><td>RoBERTa</td><td>S.A.</td><td></td><td></td><td>✓</td><td>85K</td><td>✓</td><td>78.2 ±0.1</td><td>81.3 ±0.0</td><td>-</td></tr><tr><td>13</td><td>Bevilacqua et al. (2021)</td><td>BART†</td><td></td><td></td><td></td><td></td><td>200K</td><td></td><td>-</td><td>84.3</td><td>83.0</td></tr><tr><td>14</td><td>Zhou et al. (2021)</td><td>RoBERTa</td><td>S.A.</td><td></td><td></td><td>✓</td><td>70K</td><td>✓</td><td>-</td><td>82.6 ±0.1</td><td>-</td></tr><tr><td>15</td><td>StructBART-S</td><td>BART†</td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>81.6 ±0.1</td><td>84.0 ±0.1</td><td>82.3 ±0.0</td></tr><tr><td>16</td><td>StructBART-J</td><td>BART†</td><td></td><td></td><td></td><td></td><td></td><td>✓</td><td>81.7 ±0.2</td><td>84.2 ±0.1</td><td>82.0 ±0.0</td></tr><tr><td>17</td><td>StructBART-S</td><td>BART†</td><td></td><td></td><td></td><td></td><td>47K</td><td>✓</td><td>-</td><td>-</td><td>82.7 ±0.1</td></tr><tr><td>18</td><td>StructBART-J</td><td>BART†</td><td></td><td></td><td></td><td></td><td>47K</td><td>✓</td><td>-</td><td>84.7 ±0.1</td><td>82.6 ±0.1</td></tr><tr><td>19</td><td>StructBART-S ensem.</td><td>BART†</td><td></td><td></td><td></td><td></td><td>47K</td><td>✓</td><td>-</td><td>-</td><td>83.1</td></tr><tr><td>20</td><td>StructBART-J ensem.</td><td>BART†</td><td></td><td></td><td></td><td></td><td>47K</td><td>✓</td><td>-</td><td>84.9</td><td>-</td></tr></table>
|
| 121 |
+
|
| 122 |
+
Table 1: SMATCH (%) scores on AMR 1.0, 2.0, and 3.0 test data, associated with each model's dependency on various resources. 1-10/11-14: previous models without/with extra data; 15-18: our models (-S/-J for separate/joint vocabularies for source and target); 19-20: our models with ensemble decoding. Symbols indicate: G.R. - graph re-categorization, S.A. - subgraph action used in transition-based parsers (both detailed in Section 2), POS - part of speech tagger, NER - named entity recognizer, Lemm. - lemmatizer, Align. - alignments (only used at training time). $\dagger$ indicates fine-tuning on top of pre-trained model. All models rely on a external wikification method (omitted). Our results are average of 3 runs with different random seeds. We also report standard deviation and provide ensemble results for the 3 seed combination.
|
| 123 |
+
|
| 124 |
+
<table><tr><td>ID</td><td>Model</td><td>SMATCH</td><td>Unlabel</td><td>NoWSD</td><td>Concepts</td><td>NER</td><td>Negation</td><td>Wiki.</td><td>Re-entrancy</td><td>SRL</td></tr><tr><td>1</td><td>Naseem et al. (2019)</td><td>75.5</td><td>80</td><td>76</td><td>86</td><td>83</td><td>67</td><td>80</td><td>56</td><td>72</td></tr><tr><td>4</td><td>Cai and Lam (2020)</td><td>78.7</td><td>81.5</td><td>79.2</td><td>88.1</td><td>87.1</td><td>66.1</td><td>81.3</td><td>63.8</td><td>74.5</td></tr><tr><td>6</td><td>Astudillo et al. (2020)</td><td>80.2</td><td>84.2</td><td>80.7</td><td>88.1</td><td>87.5</td><td>64.5</td><td>78.8</td><td>70.3</td><td>78.2</td></tr><tr><td>8</td><td>Bevilacqua et al. (2021)</td><td>83.8</td><td>86.1</td><td>84.4</td><td>90.2</td><td>90.6</td><td>74.4</td><td>84.4</td><td>70.8</td><td>79.6</td></tr><tr><td>10</td><td>Zhou et al. (2021)</td><td>81.8</td><td>85.5</td><td>82.3</td><td>88.7</td><td>88.5</td><td>69.7</td><td>78.8</td><td>71.1</td><td>80.8</td></tr><tr><td>15</td><td>StructBART-S</td><td>84.1</td><td>87.5</td><td>84.4</td><td>90.4</td><td>92.2</td><td>71.0</td><td>79.6</td><td>73.9</td><td>83.0</td></tr><tr><td>16</td><td>StructBART-J</td><td>84.3</td><td>87.9</td><td>84.7</td><td>90.6</td><td>92.1</td><td>72.5</td><td>80.8</td><td>74.3</td><td>83.4</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Table 2: Fine-grained F1 scores on the AMR 2.0 test set, among models that do not use extra silver data and graph re-categorization. The model IDs are matched with those in Table 1 for detailed model features. We report results with our single best model (selected on development data) for fair comparison.
|
| 127 |
+
|
| 128 |
+
Implementation Details Our models are trained with Adam optimizer with batch size 2048 tokens and gradient accumulation of 4 steps. Learning rate is $1\mathrm{e} - 4$ with 4000 warm-up steps using the inverse-sqrt scheduling scheme (Vaswani et al., 2017). The hyper-parameters are fixed and not tuned for different models and datasets, as we found results are not sensitive within small ranges. We train sep-voc models for 100 epochs and joint-voc models for 40 epochs as the latter is found to converge faster. The best 5 checkpoints based on development set SMATCH from greedy decoding are averaged, and
|
| 129 |
+
|
| 130 |
+
default beam size of 10 is used for decoding for our final parsing scores. We implement our model with the FAIRSEQ toolkit (Ott et al., 2019). More details can be found in the Appendix.
|
| 131 |
+
|
| 132 |
+
# 6 Results
|
| 133 |
+
|
| 134 |
+
Main Results We present parsing performances of our model (StructBART) in comparison with previous approaches in Table 1. For each model, we also list its features such as utilization of pre
|
| 135 |
+
|
| 136 |
+
<table><tr><td rowspan="2">Transition System</td><td colspan="3">Features</td><td colspan="2">Model Results on AMR 2.0</td><td colspan="2">Model Results on AMR 3.0</td></tr><tr><td>#BaseActions</td><td>DistantEdges</td><td>SpecialSubgraph</td><td>APT*(Zhou et al., 2021)</td><td>StructBARTsep-voc</td><td>APT*(Zhou et al., 2021)</td><td>StructBARTsep-voc</td></tr><tr><td>Astudillo et al. (2020)</td><td>12</td><td>SWAP</td><td>merge</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Zhou et al. (2021)</td><td>10</td><td>pointer</td><td>merge</td><td>81.5 ±0.1</td><td>83.4 ±0.1</td><td>79.8 ±0.1</td><td>81.6 ±0.0</td></tr><tr><td>Ours</td><td>6</td><td>pointer</td><td>no</td><td>81.6 ±0.1</td><td>84.0 ±0.1</td><td>79.6 ±0.0</td><td>82.3 ±0.1</td></tr></table>
|
| 137 |
+
|
| 138 |
+
Table 3: Transition system comparison, including their effects on different parsing models. * we adopt the cited model without graph structure embedding to compare and run on our proposed oracle.
|
| 139 |
+
|
| 140 |
+
<table><tr><td>Transition System</td><td>Avg. #actions</td><td>Oracle SMATCH</td></tr><tr><td>Astudillo et al. (2020)</td><td>76.2</td><td>98.0</td></tr><tr><td>Zhou et al. (2021)</td><td>41.6</td><td>98.9</td></tr><tr><td>Ours</td><td>45.6</td><td>99.9</td></tr></table>
|
| 141 |
+
|
| 142 |
+
Table 4: Average action sequence length and oracle coverage on AMR 2.0 training data from different transition systems. Average source sentence length is 18.9.
|
| 143 |
+
|
| 144 |
+
trained language models and graph simplification methods such as re-categorization. This gives a comprehensive overview of how systems compare in terms of complexity aside from performance.
|
| 145 |
+
|
| 146 |
+
All recent systems rely on pre-trained language models, either as fixed features or through finetuning. The pre-trained BART is particularly beneficial due to its encoder-decoder structure. Among all the models, the graph linearization models (Xuet al., 2020; Bevilacqua et al., 2021) have the least number of extra dependencies when not using graph re-categorization. Our model only requires aligned training data, a trait common to all transition-based approaches. This bears the advantage of producing reliable alignments at decoding time, which are useful for downstream tasks and as explanation of the graph constructing process.
|
| 147 |
+
|
| 148 |
+
Both our sep-voc and joint-voc model variations work well on all datasets. Without using extra silver data, our model achieves the SMATCH score of $84.2 \pm 0.1$ on AMR 2.0, which is the same as the previous best model (Bevilacqua et al., 2021) with 200K silver data. With the input of only 47K silver data (consisting of $\sim 20\mathrm{K}$ example sentences of propbank frames and randomly selected $\sim 27\mathrm{K}$ SQuAD-2.0 context sentences), we achieve the highest score of $84.7 \pm 0.1$ for AMR 2.0. We also attain the high score of $81.7 \pm 0.2$ on the smallest AMR 1.0 benchmark, and the second best score of $82.7 \pm 0.1$ on the largest AMR 3.0 benchmark. Ensemble of the 3 models from the silver training further improves the performances to 84.9 for AMR
|
| 149 |
+
|
| 150 |
+
# 2.0 and 83.1 for AMR 3.0.
|
| 151 |
+
|
| 152 |
+
Fine-grained Results We further examine the fine-grained parsing results on AMR 2.0 in Table 2. We compare models not relying on extra data nor graph re-categorization since silver data sets differ across methods, and re-categorization comes with limitations outlined in Section 2. Our models achieve the highest scores across most of the categories, except for negation and wikification. The former may be due to alignment errors and the latter is solved as a separate post-processing step independent of the parser. Compared with the closely related model from Bevilacqua et al. (2021) which also fine-tunes BART but directly on linearized graphs, we achieve significant gains on re-entrancy and SRL (:ARG-I arcs), proving our model generate AMR graphs more faithful to their topological structures.
|
| 153 |
+
|
| 154 |
+
# 7 Analysis
|
| 155 |
+
|
| 156 |
+
Transition System Table 3 and Table 4 compare different transition systems used by recent transition-based AMR parsers with strong performances. Our proposed system has the smallest set of base actions, utilizes the action-side pointer mechanism for flexible edge creation as in Zhou et al. (2021), but does not rely on special treatment of certain subgraphs such as named entities and dates. This results in slightly longer action sequences compared to Zhou et al. (2021), but with almost $100\%$ coverage<sup>11</sup> (Table 4). Our transition system and oracle can always find action sequences with full recovery of the original AMR graph, regardless of graph topology and alignments.
|
| 157 |
+
|
| 158 |
+
To assess whether our proposed transition system helps integration with pre-trained BART, we train both the APT model from Zhou et al. (2021) and our sep-voc model on the transition system of
|
| 159 |
+
|
| 160 |
+
<table><tr><td rowspan="2">Model Variation</td><td colspan="2">SMATCH (%)</td></tr><tr><td>sep-voc</td><td>joint-voc</td></tr><tr><td>Ours (hard attention)</td><td>84.0 ±0.1</td><td>84.2 ±0.1</td></tr><tr><td>No align. modeling</td><td>83.5 ±0.0</td><td>83.4 ±0.2</td></tr><tr><td>Align. soft supervision</td><td>82.9 ±0.0</td><td>83.0 ±0.0</td></tr><tr><td>Align. add src emb.</td><td>83.9 ±0.0</td><td>84.1 ±0.0</td></tr><tr><td>No COPY action</td><td>83.1 ±0.1</td><td>84.1 ±0.0</td></tr></table>
|
| 161 |
+
|
| 162 |
+
Zhou et al. (2021) and the one introduced in this work (Table 3 last 4 columns). The APT model, based on fixed RoBERTa features, does not benefit from the proposed transition system. However, our proposed model gains 0.6 on AMR 2.0 and 0.7 on AMR 3.0. This confirms the hypothesis that the proposed transitions are better able to exploit BART's powerful language generation ability.
|
| 163 |
+
|
| 164 |
+
Structural Alignment Modeling In Table 5, we evaluate the effects of our structural modeling of parser states within BART during fine-tuning. Action-source alignments are natural byproduct of the parser state, providing structural information of where and how to generate the next graph component. Our default use of hard attention to encode such alignments works the best. We explore two other strategies for modeling alignments. One is to supervise cross-attention distributions for the same heads with inferred alignments during training, inspired by Strubell et al. (2018). The other is to directly add the aligned source contextual embeddings from the encoder top layer to the decoder input at every generation step. The former hurts the model performance, indicating the model is unable to learn the underlying transition logic to infer correct alignments, while the latter does equally well as our default model. These results justify the modeling of structural constraints, even when finetuning strong pre-trained models such as BART.
|
| 165 |
+
|
| 166 |
+
We also ablate the use of COPY action in our transition system. The sep-voc model suffers but the joint-voc model is not affected. Without COPY action, the joint-voc model would rely more on BART's pre-trained subword embeddings to split node concepts more frequently, while the sep-vocab model would need to learn to generate more rare concepts from scratch. This indicates that BART's strong generation power is fully used to tackle concept sparsity problems with its subwords.
|
| 167 |
+
|
| 168 |
+

|
| 169 |
+
Figure 3: Effect of special AMR node names added to the BART vocabulary in joint-voc model on AMR 2.0 dataset. Remaining AMR concepts are split and generated with BART subwords and sense numbers.
|
| 170 |
+
|
| 171 |
+
Table 5: Ablation study of structure modeling with transition alignments. Results are on AMR 2.0 test data.
|
| 172 |
+
|
| 173 |
+
<table><tr><td rowspan="2">#</td><td colspan="4">Model Initialization</td><td colspan="2">SMATCH (%)</td></tr><tr><td>src emb</td><td>encoder</td><td>decoder</td><td>tgt emb</td><td>Base</td><td>Large</td></tr><tr><td>1</td><td></td><td></td><td></td><td></td><td>71.2</td><td>72.7</td></tr><tr><td>2</td><td>✓</td><td></td><td></td><td>✓</td><td>71.7</td><td>72.8</td></tr><tr><td>3</td><td>✓</td><td>✓</td><td></td><td>✓</td><td>81.4</td><td>82.8</td></tr><tr><td>4</td><td>✓</td><td></td><td>✓</td><td>✓</td><td>69.2</td><td>9.5*</td></tr><tr><td>5</td><td>✓</td><td></td><td></td><td></td><td>71.2</td><td>72.8</td></tr><tr><td>6</td><td>✓</td><td>✓</td><td></td><td></td><td>80.9</td><td>82.5</td></tr><tr><td>7</td><td>✓</td><td>✓</td><td>✓</td><td></td><td>82.2</td><td>83.9</td></tr><tr><td>8</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>82.7</td><td>84.1</td></tr><tr><td>9</td><td colspan="4">freeze BART src emb</td><td>82.6</td><td>84.0</td></tr><tr><td>10</td><td colspan="4">freeze BART src emb + encoder</td><td>80.9</td><td>81.8</td></tr></table>
|
| 174 |
+
|
| 175 |
+
Table 6: Effects of pre-trained BART parameters. Results are with our sep-voc model on AMR 2.0 data. * failed to converge with a range of hyper-parameters.
|
| 176 |
+
|
| 177 |
+
Special Nodes in Joint-Voc In Figure 3, we show the joint-voc model performance with different sized (joint) vocabularies. The vocabulary size is controlled by specifying the minimum frequency of occurrence needed for an AMR concept to be added to the vocabulary. For instance, when the minimum frequency is 1, all 12475 AMR concepts from the training data are added onto the BART vocabulary. The number of added concepts decreases as we increase the minimum frequency threshold. On model performance side, we only observe $\pm 0.2$ score variations resulting from vocabulary expansion. More interestingly, the model can work equally well when no special concepts are added to the BART vocabulary (minimum node frequency is $\infty$ ) – where all the node names are split and generated with BART subword tokens. Although our default setup uses frequency threshold of 5 in joint-voc expansion, following Bevilacqua et al. (2021), it seems unnecessary in terms of achieving good performance. This highlights the efficacy of utilizing the pre-trained BART's lan
|
| 178 |
+
|
| 179 |
+
guage generation power for AMR concepts even with relatively small annotated training datasets.
|
| 180 |
+
|
| 181 |
+
Pre-trained Parameters We study the contribution of different pre-trained BART components in Table 6. With our sep-voc model, we decompose the whole seq-to-seq Transformer into four components for BART initialization, i.e. the source embedding (mapped with BART shared embedding), encoder, decoder, and the separate target embedding (initialized with the average subword embeddings from BART shared embedding). We run both the StructBART base model and the StructBART large model with different combinations of parameter initialization, on the top part of Table 6. We can see that a randomly initialized model of the same size (#1) performs badly. There is an accumulative effect of BART initialization in helping the model performance, except that BART decoder can not work alone well without its encoder (#4). The encoder gives the largest performance gains (#3 vs. #2, #6 vs. #5) of about 10 points. Adding the decoder further gives around 1.4 points on top (#7 vs. #6), justifying its importance as well.
|
| 182 |
+
|
| 183 |
+
We also experiment with freezing BART parameters during training in the bottom part of Table 6. Our results of freezing the BART encoder are on similar levels of previous best RoBERTa feature based models, which is behind the full fine-tuning. Overall, full initialization from BART with structure-aware fine-tuning (#8) works the best.
|
| 184 |
+
|
| 185 |
+
# 8 Related Work
|
| 186 |
+
|
| 187 |
+
Using seq-to-seq to predict linearized graph sequences for parsing was proposed in Vinyals et al. (2015) and is currently a very extended approach (Van Noord and Bos, 2017; Ge et al., 2019; Rongali et al., 2020). However, it is only recently with the rise of pre-trained Transformer decoders, that these techniques have become dominant in semantic parsing. Xu et al. (2020) proposed custom multi-task pre-training and fine-tuning approach for conventional Transformer models (Vaswani et al., 2017). The massively pre-trained transformer BART (Lewis et al., 2019) was used for executable semantic parsing in Chen et al. (2020) and AMR parsing in Bevilacqua et al. (2021). The importance of strongly pre-trained decoders seems also justified as BART gains popularity in various semantic generation tasks (Chen et al., 2020; Shi et al., 2020). Our work aims at capitalizing on the outstanding performance shown by BART, while
|
| 188 |
+
|
| 189 |
+
providing a more structured approach that guarantees well-formed graphs and yields other desirable sub-products such as alignments. We show that this is not only possible but also attains state-of-the-art parsing results without graph re-categorization. Our analysis also shows that contrary to Xu et al. (2020), vocabulary sharing is not necessary for strong performance for our structural fine-tuning.
|
| 190 |
+
|
| 191 |
+
Encoding of the parser state into neural parsers has been undertaken in various works, including seq-to-seq RNN models (Liu and Zhang, 2017; Zhang et al., 2017; Buys and Blunsom, 2017), encoder-only Transformers (Ahmad et al., 2019), seq-to-seq Transformers (Astudillo et al., 2020; Zhou et al., 2021) and pre-trained language models (Qian et al., 2021). Here we explore the application of these approaches to pre-trained seq-to-seq Transformers. Borrowing ideas from Zhou et al. (2021), we encode alignment states into the pre-trained BART attention mechanism, and re-purpose its self-attention as a pointer network. We also rely on a minimal set of actions targeted to utilize BART's generation with desirable guarantees, such as no unattachable nodes and full recovery of all graphs. We are the first to explore transition-based parsing applied on fine-tuning strongly pre-trained seq-to-seq models, and we demonstrate that parser state encoding is still important for performance, even when implemented inside of a powerful pre-trained decoder such as BART.
|
| 192 |
+
|
| 193 |
+
# 9 Conclusion
|
| 194 |
+
|
| 195 |
+
We explore the integration of pre-trained sequence-to-sequence language models and transition-based approaches for AMR parsing, with the purpose of retaining the high performance of the former and structural advantages of the latter. We show that both approaches are complementary, establishing the new state of the art for AMR 2.0. Our results indicate that instead of simply converting the structured data into unstructured sequences to fit the need of the pre-trained model, it is possible to effectively re-purpose a generic pre-trained model to a structure-aware one achieving strong performance. Similar principles can be applied to adapt other powerful pre-trained models such as T5 (Raffel et al., 2019) and GPT-2 (Radford et al., 2019) for structured data predictions. It is worth exploring thoroughly the pros and cons of introducing structure to the model compared to removing structure from the data (linearization) in various scenarios.
|
| 196 |
+
|
| 197 |
+
# References
|
| 198 |
+
|
| 199 |
+
Wasi Ahmad, Zhisong Zhang, Xuezhe Ma, Eduard Hovy, Kai-Wei Chang, and Nanyun Peng. 2019. On difficulties of cross-lingual transfer with order differences: A case study on dependency parsing. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 2440-2452, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 200 |
+
Ramon Fernandez Astudillo, Miguel Ballesteros, Tahira Naseem, Austin Blodgett, and Radu Florian. 2020. Transition-based parsing with stack-transformers. arXiv preprint arXiv:2010.10669.
|
| 201 |
+
Miguel Ballesteros and Yaser Al-Onaizan. 2017a. AMR parsing using stack-LSTMs. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1269-1275, Copenhagen, Denmark. Association for Computational Linguistics.
|
| 202 |
+
Miguel Ballesteros and Yaser Al-Onaizan. 2017b. Amr parsing using stack-lstms. arXiv preprint arXiv:1707.07755.
|
| 203 |
+
Laura Banarescu, Claire Bonial, Shu Cai, Madalina Georgescu, Kira Griffitht, Ulf Hermjakob, Kevin Knight, Philipp Koehn, Martha Palmer, and Nathan Schneider. 2013. Abstract meaning representation for sembanking. In Proceedings of the 7th linguistic annotation workshop and interoperability with discourse, pages 178-186.
|
| 204 |
+
Michele Bevilacqua, Rexhina Blloshmi, and Roberto Navigli. 2021. One spring to rule them both: Symmetric amr semantic parsing and generation without a complex pipeline.
|
| 205 |
+
Jan Buys and Phil Blunsom. 2017. Robust incremental neural semantic graph parsing. arXiv preprint arXiv:1704.07092.
|
| 206 |
+
Deng Cai and Wai Lam. 2020. AMR parsing via graph- sequence iterative inference. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1290-1301, Online. Association for Computational Linguistics.
|
| 207 |
+
Shu Cai and Kevin Knight. 2013. Smatch: an evaluation metric for semantic feature structures. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 748-752.
|
| 208 |
+
Xilun Chen, Asish Ghoshal, Yashar Mehdad, Luke Zettlemoyer, and Sonal Gupta. 2020. Low-resource domain adaptation for compositional task-oriented semantic parsing. arXiv preprint arXiv:2010.03546.
|
| 209 |
+
Marco Damonte, Shay B Cohen, and Giorgio Satta. 2016. An incremental parser for abstract meaning representation. arXiv preprint arXiv:1608.06111.
|
| 210 |
+
|
| 211 |
+
DongLai Ge, Junhui Li, Muhua Zhu, and Shoushan Li. 2019. Modeling source syntax and semantics for neural amr parsing. In *IJCAI*, pages 4975-4981.
|
| 212 |
+
Pavan Kapanipathi, Ibrahim Abdelaziz, Srinivas Ravishankar, Salim Roukos, Alexander Gray, Ramón Fernández Astudillo, Maria Chang, Cristina Cornelio, Saswati Dana, Achille Fokoue, Dinesh Garg, Alfio Gliozzo, Sairam Gurajada, Hima Karanam, Naweed Khan, Dinesh Khandelwal, Young-Suk Lee, Yunyao Li, Francois Luus, Ndivhuwo Makondo, Nandana Mihindukulasooriya, Tahira Naseem, Sumit Neelam, Lucian Popa, Revanth Gangi Reddy, Ryan Riegel, Gaetano Rossiello, Udit Sharma, G P Shrivatsa Bhargav, and Mo Yu. 2021. Leveraging Abstract Meaning Representation for knowledge base question answering. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 3884-3894, Online. Association for Computational Linguistics.
|
| 213 |
+
Young-Suk Lee, Ramon Fernandez Astudillo, Tahira Naseem, Revanth Gangi Reddy, Radu Florian, and Salim Roukos. 2020. Pushing the limits of amr parsing with self-learning. arXiv preprint arXiv:2010.10673.
|
| 214 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. 2019. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461.
|
| 215 |
+
Michael Lingzhi Li, Meng Dong, Jiawei Zhou, and Alexander M Rush. 2019. A hierarchy of graph neural networks based on learnable local features. arXiv preprint arXiv:1911.05256.
|
| 216 |
+
Fei Liu, Jeffrey Flanigan, Sam Thomson, Norman Sadeh, and Noah A Smith. 2018. Toward abstractive summarization using semantic representations. arXiv preprint arXiv:1805.10399.
|
| 217 |
+
Jiangming Liu and Yue Zhang. 2017. Encoder-decoder shift-reduce syntactic parsing. In Proceedings of the 15th International Conference on Parsing Technologies, pages 105-114, Pisa, Italy. Association for Computational Linguistics.
|
| 218 |
+
Chunchuan Lyu, Shay B Cohen, and Ivan Titov. 2020. A differentiable relaxation of graph segmentation and alignment for amr parsing. arXiv preprint arXiv:2010.12676.
|
| 219 |
+
Chunchuan Lyu and Ivan Titov. 2018. AMR parsing as graph prediction with latent alignment. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 397-407, Melbourne, Australia. Association for Computational Linguistics.
|
| 220 |
+
Arindam Mitra and Chitta Baral. 2016. Addressing a question answering challenge by combining statistical methods with inductive rule learning and reasoning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 30.
|
| 221 |
+
|
| 222 |
+
Tahira Naseem, Srinivas Ravishankar, Nandana Mihindukulasooriya, Ibrahim Abdelaziz, Young-Suk Lee, Pavan Kapanipathi, Salim Roukos, Alfio Gliozzo, and Alexander Gray. 2021. A semantics-aware transformer model of relation linking for knowledge base question answering. ACL.
|
| 223 |
+
Tahira Naseem, Abhishek Shah, Hui Wan, Radu Florian, Salim Roukos, and Miguel Ballesteros. 2019. Rewarding Smatch: Transition-based AMR parsing with reinforcement learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4586-4592, Florence, Italy. Association for Computational Linguistics.
|
| 224 |
+
Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. fairseq: A fast, extensible toolkit for sequence modeling. arXiv preprint arXiv:1904.01038.
|
| 225 |
+
Peng Qian, Tahira Naseem, Roger Levy, and Ramón Fernandez Astudillo. 2021. Structural guidance for transformer language models. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 3735-3745, Online. Association for Computational Linguistics.
|
| 226 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
|
| 227 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. 2019. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683.
|
| 228 |
+
Subendhu Rongali, Luca Soldaini, Emilio Monti, and Wael Hamza. 2020. Don't parse, generate! a sequence to sequence architecture for task-oriented semantic parsing. In Proceedings of The Web Conference 2020, pages 2962-2968.
|
| 229 |
+
Peng Shi, Patrick Ng, Zhiguo Wang, Henghui Zhu, Alexander Hanbo Li, Jun Wang, Cicero Nogueira dos Santos, and Bing Xiang. 2020. Learning contextual representations for semantic parsing with generation-augmented pre-training. arXiv preprint arXiv:2012.10309.
|
| 230 |
+
Emma Strubell, Patrick Verga, Daniel Andor, David Weiss, and Andrew McCallum. 2018. Linguistically-informed self-attention for semantic role labeling. arXiv preprint arXiv:1804.08199.
|
| 231 |
+
Rik Van Noord and Johan Bos. 2017. Neural semantic parsing by character-based translation: Experiments with abstract meaning representations. arXiv preprint arXiv:1705.09980.
|
| 232 |
+
|
| 233 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008.
|
| 234 |
+
Oriol Vinyals, Łukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey Hinton. 2015. Grammar as a foreign language. In Advances in neural information processing systems, pages 2773-2781.
|
| 235 |
+
Andreas Vlachos et al. 2018. Guided neural language generation for abstractive summarization using abstract meaning representation. arXiv preprint arXiv:1808.09160.
|
| 236 |
+
Chuan Wang and Nianwen Xue. 2017. Getting the most out of amr parsing. In Proceedings of the 2017 conference on empirical methods in natural language processing, pages 1257-1268.
|
| 237 |
+
Chuan Wang, Nianwen Xue, and Sameer Pradhan. 2015. A transition-based algorithm for amr parsing. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 366-375.
|
| 238 |
+
Dongqin Xu, Junhui Li, Muhua Zhu, Min Zhang, and Guodong Zhou. 2020. Improving amr parsing with sequence-to-sequence pre-training. arXiv preprint arXiv:2010.01771.
|
| 239 |
+
Sheng Zhang, Xutai Ma, Kevin Duh, and Benjamin Van Durme. 2019a. Amr parsing as sequence-to-graph transduction. arXiv preprint arXiv:1905.08704.
|
| 240 |
+
Sheng Zhang, Xutai Ma, Kevin Duh, and Benjamin Van Durme. 2019b. Broad-coverage semantic parsing as transduction. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3784–3796, Hong Kong, China. Association for Computational Linguistics.
|
| 241 |
+
Zhirui Zhang, Shujie Liu, Mu Li, Ming Zhou, and Enhong Chen. 2017. Stack-based multi-layer attention for transition-based dependency parsing. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1677-1682, Copenhagen, Denmark. Association for Computational Linguistics.
|
| 242 |
+
Jiawei Zhou, Tahira Naseem, Ramón Fernandez Astudillo, and Radu Florian. 2021. Amr parsing with action-pointer transformer. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5585-5598, Online. Association for Computational Linguistics.
|
| 243 |
+
|
| 244 |
+
# A Dataset Statistics
|
| 245 |
+
|
| 246 |
+
We list the dataset sizes of AMR benchmarks in Table 7. The sizes increase with the release version number. AMR 2.0 is the most used by far. AMR 2.0 shares the same set of sentences for development and test data with AMR 1.0, but with revised annotations and wikification links. AMR 3.0 is released most recently, which is under-explored.
|
| 247 |
+
|
| 248 |
+
Our silver data originate from two sources. First, we use $\sim 20\mathrm{K}$ example sentences ( $\sim 386\mathrm{K}$ tokens) from the propbank frames included in the AMR 3.0 distribution. Second, we use randomly selected $\sim 27\mathrm{K}$ sentences ( $\sim 620\mathrm{K}$ tokens) from SQuAD 2.0 context sentences available from https://rajpurkar.github.io/SQuAD-explorer/.
|
| 249 |
+
|
| 250 |
+
<table><tr><td>Data Split</td><td>AMR 1.0</td><td>AMR 2.0</td><td>AMR 3.0</td></tr><tr><td>Training</td><td>10,312</td><td>36,521</td><td>55,635</td></tr><tr><td>Development</td><td>1,368</td><td>1,368</td><td>1,722</td></tr><tr><td>Test</td><td>1.371</td><td>1.371</td><td>1,898</td></tr></table>
|
| 251 |
+
|
| 252 |
+
# B Details of Model Structures and Number of Parameters
|
| 253 |
+
|
| 254 |
+
In Table 8, we list the detailed model configuration and number of parameters of the official pre-trained BART models. Our fine-tuned StructBART is with different action vocabulary strategies which builds additional embedding vectors for certain action symbols. The numbers vary from training dataset. We list the detailed number of parameters of our fine-tuned model in Table 9. The fine-tuned model only increases about $3\% - 8\%$ more parameters for sep-voc model and $0.4\% - 1\%$ more parameters for joint-voc model.
|
| 255 |
+
|
| 256 |
+
# C Implementation Details
|
| 257 |
+
|
| 258 |
+
We use the Adam optimizer with $\beta_{1} = 0.9$ and $\beta_{2} = 0.98$ . Batch size is set to 2048 maximum number of tokens, and gradient is accumulated over 4 steps. The learning rate schedule is the same as Vaswani et al. (2017), where we use the maximum learning rate of $1\mathrm{e} - 4$ with 4000 warm-up steps. Dropout of rate 0.2 and label smoothing of rate 0.01 are used. These hyperparameters are fixed and not tuned for different models and datasets, as we found results are not
|
| 259 |
+
|
| 260 |
+
Table 7: Number of sentence-AMR instances in the AMR benchmark datasets.
|
| 261 |
+
|
| 262 |
+
<table><tr><td>Configuration</td><td>BART Base</td><td>BART Large</td></tr><tr><td>Encoder layers</td><td>6</td><td>12</td></tr><tr><td>Heads per layer</td><td>12</td><td>16</td></tr><tr><td>Hidden size</td><td>768</td><td>1024</td></tr><tr><td>FFN size</td><td>3072</td><td>4096</td></tr><tr><td>Size of vocab</td><td>51201*</td><td>50265</td></tr><tr><td>Size of emb. matrix</td><td>39,322,368</td><td>51,471,360</td></tr><tr><td>#parameters trained</td><td>140,139,266</td><td>406,291,458</td></tr></table>
|
| 263 |
+
|
| 264 |
+
Table 8: Original model configurations of pre-trained BART from FAIRSEQ (https://github.com/pytorch/fairseq/tree/v0.10.2/examples/bart). The embeddings for source, decoder input and output are all shared and thus the same (not counted as extra in training parameters). *vocabulary for the base model is larger due to additional paddings at the end, but effective vocabulary symbols are the same as the large model.
|
| 265 |
+
|
| 266 |
+
<table><tr><td>Model</td><td>Param.</td><td>AMR 1.0</td><td>AMR 2.0</td><td>AMR 3.0</td></tr><tr><td rowspan="3">sep-voc</td><td>Src vocab size</td><td>50265</td><td>50265</td><td>50265</td></tr><tr><td>Tgt vocab size</td><td>6976</td><td>12752</td><td>16180</td></tr><tr><td>#param. trained</td><td>420,578,304</td><td>432,407,552</td><td>439,436,288</td></tr><tr><td rowspan="2">joint-voc</td><td>joint vocab size</td><td>51921</td><td>53487</td><td>54388</td></tr><tr><td>#param. trained</td><td>407,987,200</td><td>409,590,784</td><td>410,517,504</td></tr></table>
|
| 267 |
+
|
| 268 |
+
Table 9: Model parameters of our StructBART (large model). The sizes differ based on the target side vocabulary, which is dependent on different training data. Addition of silver training data adds only a fraction of the parameters to the benchmark datasets.
|
| 269 |
+
|
| 270 |
+
sensitive within small ranges. Without silver data, we train sep-voc models for 100 (AMR 1.0 & 2.0) or 120 (AMR 3.0) epochs and joint-voc models for 40 epochs as the latter is found to converge faster. The best 5 (AMR 1.0 & 2.0) or 10 (AMR 3.0) checkpoints among the last 40/30 epochs are selected based on development set SMATCH from greedy decoding and averaged over the model parameters as our final model. With the 50K silver data, we train both sep-voc and joint-voc models for 20 epochs and select the best 10 checkpoints for model parameter averaging. We use a default beam size of 10 for decoding for our final parsing scores. Our models are implemented with the FAIRSEQ toolkit (Ott et al., 2019), trained and tested on a single Nvidia Tesla V100 GPU with 32GB memory. We use fp16 mixed precision training whenever possible, with which training a large model on AMR 2.0 takes about 10 hours for sep-vocab models and 7 hours for joint-vocab models, and the time varies proportionally with data size for other datasets and with silver data.
|
structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:418c49393c16e2e8fb5a435c5af01b1c6d40df138fe5fb24fda88e26f4213ad5
|
| 3 |
+
size 444482
|
structureawarefinetuningofsequencetosequencetransformersfortransitionbasedamrparsing/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:07279f83561fc57ff653ec3b248354a964deb6caf9d800e4139e3ecceaffdf5d
|
| 3 |
+
size 315847
|
structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cab4b3780b7e1043b40b59dec9dd74860e60f8eb7aee91f7bbab459f72531843
|
| 3 |
+
size 120323
|
structuredcontextandhighcoveragegrammarforconversationalquestionansweringoverknowledgegraphs/bdb13c27-8873-4c32-91c4-a17e9907e78f_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:243d3613df3adeb71e2c0333bc9f2f4aabe85747a1211700deb0a8472562862b
|
| 3 |
+
size 138408
|