Add Batch a077b0c2-7841-4a65-9c59-7838483b29da
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/ee58b6ac-f8e7-41c8-ab56-cf0d4e9e51b4_content_list.json +3 -0
- adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/ee58b6ac-f8e7-41c8-ab56-cf0d4e9e51b4_model.json +3 -0
- adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/ee58b6ac-f8e7-41c8-ab56-cf0d4e9e51b4_origin.pdf +3 -0
- adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/full.md +217 -0
- adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/images.zip +3 -0
- adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/layout.json +3 -0
- analyzingwrapupeffectsthroughaninformationtheoreticlens/51f2d462-fad2-4fea-96d3-cac1240ec5de_content_list.json +3 -0
- analyzingwrapupeffectsthroughaninformationtheoreticlens/51f2d462-fad2-4fea-96d3-cac1240ec5de_model.json +3 -0
- analyzingwrapupeffectsthroughaninformationtheoreticlens/51f2d462-fad2-4fea-96d3-cac1240ec5de_origin.pdf +3 -0
- analyzingwrapupeffectsthroughaninformationtheoreticlens/full.md +189 -0
- analyzingwrapupeffectsthroughaninformationtheoreticlens/images.zip +3 -0
- analyzingwrapupeffectsthroughaninformationtheoreticlens/layout.json +3 -0
- ananalysisofnegationinnaturallanguageunderstandingcorpora/64cc0d9a-60ca-46fe-844a-4ffb0a2a2689_content_list.json +3 -0
- ananalysisofnegationinnaturallanguageunderstandingcorpora/64cc0d9a-60ca-46fe-844a-4ffb0a2a2689_model.json +3 -0
- ananalysisofnegationinnaturallanguageunderstandingcorpora/64cc0d9a-60ca-46fe-844a-4ffb0a2a2689_origin.pdf +3 -0
- ananalysisofnegationinnaturallanguageunderstandingcorpora/full.md +183 -0
- ananalysisofnegationinnaturallanguageunderstandingcorpora/images.zip +3 -0
- ananalysisofnegationinnaturallanguageunderstandingcorpora/layout.json +3 -0
- anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/38547c9c-8e95-4764-b53b-b8bf8c17acc0_content_list.json +3 -0
- anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/38547c9c-8e95-4764-b53b-b8bf8c17acc0_model.json +3 -0
- anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/38547c9c-8e95-4764-b53b-b8bf8c17acc0_origin.pdf +3 -0
- anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/full.md +258 -0
- anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/images.zip +3 -0
- anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/layout.json +3 -0
- areshortestrationalesthebestexplanationsforhumanunderstanding/722701f2-34ec-47c8-8c91-7cc24a512cde_content_list.json +3 -0
- areshortestrationalesthebestexplanationsforhumanunderstanding/722701f2-34ec-47c8-8c91-7cc24a512cde_model.json +3 -0
- areshortestrationalesthebestexplanationsforhumanunderstanding/722701f2-34ec-47c8-8c91-7cc24a512cde_origin.pdf +3 -0
- areshortestrationalesthebestexplanationsforhumanunderstanding/full.md +305 -0
- areshortestrationalesthebestexplanationsforhumanunderstanding/images.zip +3 -0
- areshortestrationalesthebestexplanationsforhumanunderstanding/layout.json +3 -0
- ariskaversemechanismforsuicidalityassessmentonsocialmedia/ca8787e4-1f35-4b21-9cdc-1d165ab91c31_content_list.json +3 -0
- ariskaversemechanismforsuicidalityassessmentonsocialmedia/ca8787e4-1f35-4b21-9cdc-1d165ab91c31_model.json +3 -0
- ariskaversemechanismforsuicidalityassessmentonsocialmedia/ca8787e4-1f35-4b21-9cdc-1d165ab91c31_origin.pdf +3 -0
- ariskaversemechanismforsuicidalityassessmentonsocialmedia/full.md +214 -0
- ariskaversemechanismforsuicidalityassessmentonsocialmedia/images.zip +3 -0
- ariskaversemechanismforsuicidalityassessmentonsocialmedia/layout.json +3 -0
- asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/573baed7-2e3b-439a-b9d0-84ca585b4797_content_list.json +3 -0
- asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/573baed7-2e3b-439a-b9d0-84ca585b4797_model.json +3 -0
- asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/573baed7-2e3b-439a-b9d0-84ca585b4797_origin.pdf +3 -0
- asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/full.md +257 -0
- asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/images.zip +3 -0
- asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/layout.json +3 -0
- aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/e5bec732-3b60-4b90-b779-fa06267d17a8_content_list.json +3 -0
- aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/e5bec732-3b60-4b90-b779-fa06267d17a8_model.json +3 -0
- aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/e5bec732-3b60-4b90-b779-fa06267d17a8_origin.pdf +3 -0
- aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/full.md +366 -0
- aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/images.zip +3 -0
- aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/layout.json +3 -0
- augmentingdocumentrepresentationsfordenseretrievalwithinterpolationandperturbation/ceab5cff-0f5a-4f11-9565-7a0ac81c3e7a_content_list.json +3 -0
- augmentingdocumentrepresentationsfordenseretrievalwithinterpolationandperturbation/ceab5cff-0f5a-4f11-9565-7a0ac81c3e7a_model.json +3 -0
adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/ee58b6ac-f8e7-41c8-ab56-cf0d4e9e51b4_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2cefcabd469205a7841b2b94931ac51ae5dccb93e7368007ebd8e7ce29d7c13f
|
| 3 |
+
size 54918
|
adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/ee58b6ac-f8e7-41c8-ab56-cf0d4e9e51b4_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1684c1eb3f913b527f1cae25db272cf37dddfaefc14c25fa2f34dcd9450e2f53
|
| 3 |
+
size 68412
|
adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/ee58b6ac-f8e7-41c8-ab56-cf0d4e9e51b4_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4e905d2b37c7c68594bd6743459b4b9d47ea87e591f843278753389f8a43d2c7
|
| 3 |
+
size 407896
|
adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/full.md
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Adjusting the Precision-Recall Trade-Off with Align-and-Predict Decoding for Grammatical Error Correction
|
| 2 |
+
|
| 3 |
+
Xin Sun Houfeng Wang
|
| 4 |
+
|
| 5 |
+
MOE Key Lab of Computational Linguistics, School of Computer Science, Peking University
|
| 6 |
+
|
| 7 |
+
{sunx5, wanghf}@pku.edu.cn
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Modern writing assistance applications are always equipped with a Grammatical Error Correction (GEC) model to correct errors in user-entered sentences. Different scenarios have varying requirements for correction behavior, e.g., performing more precise corrections (high precision) or providing more candidates for users (high recall). However, previous works adjust such trade-off only for sequence labeling approaches. In this paper, we propose a simple yet effective counterpart - Align-and-Predict Decoding (APD) for the most popular sequence-to-sequence models to offer more flexibility for the precision-recall trade-off. During inference, APD aligns the already generated sequence with input and adjusts scores of the following tokens. Experiments in both English and Chinese GEC benchmarks show that our approach not only adapts a single model to precision-oriented and recall-oriented inference, but also maximizes its potential to achieve state-of-the-art results. Our code is available at https://github.com/AutoTemp/Align-and-Predict.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Modern writing assistance applications (e.g., Microsoft Office Word $^1$ , Google Docs $^2$ and Grammarly $^3$ ) always contain Grammatical Error Correction (GEC) modules (Ge et al., 2018; Omelianchuk et al., 2020; Stahlberg and Kumar, 2021) to correct errors in user-entered sentences. Such applications usually require GEC models to perform different correction tendencies and behaviors according to practical scenarios and user preferences (Chen et al., 2020). For instance, as shown in Table 1, conservative GEC models provide precise corrections with high confidence and avoid unnecessary edits for better user experience. In contrast,
|
| 16 |
+
|
| 17 |
+
<table><tr><td>Input</td><td>I believe we have the experience of suddenly forget how to write a word we should know.</td></tr><tr><td>Conservative GEC</td><td>I believe we have the experience of suddenly [forgetting]0 how to write a word we should know.</td></tr><tr><td>Aggressive GEC</td><td>I believe [most of us]0 [had]1 the [experiences]2 of suddenly [forgetting]3 how to write a word [that]4 we should know.</td></tr></table>
|
| 18 |
+
|
| 19 |
+
Table 1: Examples of corrections generated by the conservative (precision-oriented) and aggressive (recall-oriented) GEC models. The rewritten tokens are within the blue blocks. Conservative GEC tends to adhere to the input sentence, while aggressive GEC provides more edited spans.
|
| 20 |
+
|
| 21 |
+
aggressive GEC models could provide more correction candidates to users or a following decision system for further measurement.
|
| 22 |
+
|
| 23 |
+
Although recent studies witness the tremendous success of sequence-to-sequence (seq2seq) generation approaches in GEC, the trade-off of these two tendencies still largely depends on the pre-defined model architecture, training data and labor-consuming post-processing (Liang et al., 2020). Hotate et al. (2020) proposes a diverse local beam search method to obtain diverse corrections but is specifically designed for copy-augmented GEC models and cannot perform precision-oriented decoding. Instead of seq2seq generation, Omelianchuk et al. (2020) proposes an efficient sequence tagger for GEC by token-level transformations to map input tokens to target corrections. They introduce two confidence thresholds for inference to force the model to perform more precise corrections. Chen et al. (2020) first identifies incorrect spans with a tagging model and then sets a probability threshold to adjust the precision-recall trade-off.
|
| 24 |
+
|
| 25 |
+
Inspired by these lightweight tweaking methods for sequence labeling approaches, we propose a simple yet effective counterpart - Align-
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
Figure 1: The overview of align-and-predict decoding. Our approach aligns already generated sequences with input tokens for all hypotheses and re-scores the next tokens (i.e., we and $a$ highlighted in orange) at the aligned positions (highlighted with the orange dashed lines). Specifically, since the suffixes of hypothesis are word, word and write, which are unique in the input sentence, we select the corresponding following words – we, we and $a$ . By decreasing or increasing corresponding scores (rectangles highlighted in orange), our approach adapts the precision-recall trade-off to aggressive or conservative inference. Dist denotes Distribution.
|
| 29 |
+
|
| 30 |
+
and-Predict Decoding (APD) for the seq2seq GEC models. Our approach could not only adapt the precision-recall trade-off of a single seq2seq GEC model to various application scenarios, but also be used as a simple trick to improve its overall $F_{0.5}$ performance.
|
| 31 |
+
|
| 32 |
+
During inference, APD aligns the already generated sequence with the input tokens to specify the position which the model has reached. By tweaking the score of the next token, the model changes its preference between copy and edit operation, leading to a different degree of adherence to the input sentence. The experimental results in both English and Chinese GEC benchmarks show our approach could effectively control the precision-recall trade-off and achieve state-of-the-art results. Our contributions are summarized as follows:
|
| 33 |
+
|
| 34 |
+
- We propose a novel and simple decoding approach, allowing us to adapt the precision-recall trade-off of a seq2seq GEC model.
|
| 35 |
+
- Our methods achieve state-of-the-art results in both English and Chinese GEC benchmarks.
|
| 36 |
+
|
| 37 |
+
# 2 Align-and-Predict Decoding
|
| 38 |
+
|
| 39 |
+
Beam search (Lowerre, 1976; Och and Ney, 2004; Sutskever et al., 2014) is a widely used algorithm for decoding sequences on all generation tasks, such as translation (Vaswani et al., 2017; Ott et al.,
|
| 40 |
+
|
| 41 |
+
2018), dialogue (Kulikov et al., 2019), etc. Multiple modifications to beam search that force the outputs to include pre-defined lexical constraints (i.e., words and phrases) have been proposed (Hokamp and Liu, 2017; Hu et al., 2019).
|
| 42 |
+
|
| 43 |
+
Fortunately, the input and output sentences of GEC overlap significantly and the input tokens are natural constraints for correction generation. This assumption is an objective characteristic of GEC and has been made in many previous works (Zhao et al., 2019; Malmi et al., 2019; Stahlberg and Kumar, 2020; Sun et al., 2021). Thus, we propose a novel decoding approach - Align-and-Predict Decoding (APD), which leverage the characteristic of GEC to adjust behavior and tendencies of inference. The overview of APD is shown in Figure 1.
|
| 44 |
+
|
| 45 |
+
Given an input sentence $\mathbf{x} = (x_{1},\ldots ,x_{n})$ , we maintain $K$ hypotheses at the time step $t$ during inference as beam search does:
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\begin{array}{l} \boldsymbol {H} _ {t} = \left\{\boldsymbol {h} _ {\leq t} ^ {1}, \dots , \boldsymbol {h} _ {\leq t} ^ {K} \right\} \tag {1} \\ = \left\{\left(y _ {1} ^ {1}, \dots , y _ {t} ^ {1}\right), \dots , \left(y _ {1} ^ {K}, \dots , y _ {t} ^ {K}\right) \right\} \\ \end{array}
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $\pmb{h}_{\leq t}^{i}, i \in [1, K]$ denotes the $i$ -th hypothesis with $t$ already generated tokens.
|
| 52 |
+
|
| 53 |
+
Since the output of GEC is highly constrained by the input sequence, we assume that $h_{\leq t}^i$ should be almost the same as part of the input sentence $x$ . Then, we match the suffix of each hypothesis $h_{\leq t}^i$ with the input $x$ to identify the position which the inference has reached. If there exists a unique
|
| 54 |
+
|
| 55 |
+
substring $x_{k - j},\ldots ,x_{k}(j\geq 0)$ of the input $\pmb{x}$ identical to the suffix $y_{t - j}^{i},\dots,y_{t}^{i}$ , the next token of the hypothesis $h_{\leq t}^{i}$ is very likely to be $x_{k + 1}$ , which we store in the set $N_t^i$ . Formally,
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
N _ {t} ^ {i} = \left\{ \begin{array}{l l} \left\{x _ {k + 1} \right\} & \exists ! k, x _ {k - j \dots k} = y _ {t - j \dots t} ^ {i}; \\ \emptyset & o t h e r w i s e. \end{array} \right. \tag {2}
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
As beam search does, we expand current hypotheses and construct possible candidates for the next time step $t + 1$ with all tokens in the vocabulary. The candidate $\hat{h}_{t,v}^{i}$ of the $i$ -th hypothesis is obtained as follows:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\hat {\boldsymbol {h}} _ {t, v} ^ {i} = \operatorname {C A T} \left(\boldsymbol {h} _ {\leq t} ^ {i}, v\right) = \left(y _ {1} ^ {i}, \dots , y _ {t} ^ {i}, v\right) \tag {3}
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
where we concatenate the already generated sequence $\pmb{h}_{\leq t}^{i}$ with any token $v$ in the vocabulary. The corresponding score is calculated by:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\begin{array}{l} \operatorname {S C O R E} \left(\hat {\boldsymbol {h}} _ {t, v} ^ {i}\right) = \operatorname {S C O R E} \left(\boldsymbol {h} _ {\leq t} ^ {i}\right) \tag {4} \\ + w _ {t, v} ^ {i} \cdot \log P (v | y _ {1} ^ {i}, \dots , y _ {t} ^ {i}) \\ \end{array}
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
where $P$ is the output distribution predicted by the seq2seq GEC model and $w_{t,v}^{i}$ is a penalty factor that depends on whether the token $v$ is the next token $x_{k + 1}$ at the aligned position. Specifically,
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
w _ {t, v} ^ {i} = \left\{ \begin{array}{l l} \lambda & v \in N _ {t} ^ {i} \\ 1. 0 & v \notin N _ {t} ^ {i} \end{array} \right. \tag {5}
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $\lambda$ is a hyperparameter to control the adherence to the input sequence. If $\lambda > 1.0$ , inference penalizes the score of the original next token and tends to perform modification; if $\lambda < 1.0$ , it is likely to copy the token. The new hypotheses are selected by:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\boldsymbol {H} _ {t + 1} = \underset {i, v} {\arg \operatorname {t o p}} \mathrm {K} \left(\operatorname {S C O R E} \left(\hat {\boldsymbol {h}} _ {t, v} ^ {i}\right)\right) \tag {6}
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
# 3 Experiments
|
| 86 |
+
|
| 87 |
+
# 3.1 Experimental Setting
|
| 88 |
+
|
| 89 |
+
We conduct our experiments in the restricted training setting of BEA-2019 GEC shared task (Bryant et al., 2019), with Lang-8 Corpus of Learner English (Mizumoto et al., 2011), NUCLE (Dahlmeier et al., 2013), FCE (Yannakoudakis et al., 2011) and
|
| 90 |
+
|
| 91 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">BEA-2019</td></tr><tr><td>P</td><td>R</td><td>F0.5</td></tr><tr><td>Omelianchuk et al. (2020)</td><td>79.2</td><td>53.9</td><td>72.4</td></tr><tr><td>Kaneko et al. (2020)</td><td>67.1</td><td>60.1</td><td>65.6</td></tr><tr><td>Wan et al. (2020)</td><td>66.9</td><td>60.6</td><td>65.5</td></tr><tr><td>Lichtarge et al. (2020)</td><td>67.6</td><td>62.5</td><td>66.5</td></tr><tr><td>Stahlberg and Kumar (2021)</td><td>72.1</td><td>64.4</td><td>70.4</td></tr><tr><td>gT5 xxl (Rothe et al., 2021)</td><td>-</td><td>-</td><td>69.8</td></tr><tr><td>T5 x1 (Rothe et al., 2021)♣</td><td>-</td><td>-</td><td>73.9</td></tr><tr><td>T5 xxl (Rothe et al., 2021)♣</td><td>-</td><td>-</td><td>75.9</td></tr><tr><td>Yuan et al. (2021)</td><td>73.3</td><td>61.5</td><td>70.6</td></tr><tr><td>Sun et al. (2021)</td><td>-</td><td>-</td><td>72.9</td></tr><tr><td>Seq2Seq (w/o pretraining)</td><td>57.4</td><td>41.8</td><td>53.4</td></tr><tr><td>+ Precision-oriented(λ = 0.45)</td><td>63.6</td><td>32.9</td><td>53.6</td></tr><tr><td>+ Recall-oriented(λ = 1.95)</td><td>51.4</td><td>47.6</td><td>50.5</td></tr><tr><td>+ Balance(λ = 0.75)</td><td>59.8</td><td>39.0</td><td>54.0</td></tr><tr><td>Seq2Seq (w/ pretraining)</td><td>66.7</td><td>62.3</td><td>65.8</td></tr><tr><td>+ Precision-oriented(λ = 0.20)</td><td>78.5</td><td>43.0</td><td>67.4</td></tr><tr><td>+ Recall-oriented(λ = 1.85)</td><td>61.9</td><td>65.6</td><td>62.6</td></tr><tr><td>+ Balance(λ = 0.45)</td><td>72.6</td><td>55.4</td><td>68.3</td></tr><tr><td>12+2 BART (Sun et al., 2021)</td><td>76.1</td><td>65.6</td><td>73.8</td></tr><tr><td>+ Precision-oriented(λ = 0.25)</td><td>88.1</td><td>44.8</td><td>73.8</td></tr><tr><td>+ Recall-oriented(λ = 2.50)</td><td>67.7</td><td>72.0</td><td>68.5</td></tr><tr><td>+ Balance(λ = 0.75)</td><td>78.7</td><td>63.2</td><td>75.0</td></tr></table>
|
| 92 |
+
|
| 93 |
+
Table 2: Performance of our approach compared with previous work in BEA-2019 test set. Note that we only compare single models without ensemble. $\lambda$ is selected based on BEA-2019 development set. It is notable that the models with $\clubsuit$ are not comparable here because they use a much larger model capacity (up to 11B parameters), and their training data is different from ours: they use cleaned LANG-8 Corpus.
|
| 94 |
+
|
| 95 |
+
W&I+LOCNESS (Granger; Bryant et al., 2019) as training data. We use BEA-2019 development set to choose the best model and select $\lambda$ between 0.1 and 2.5 with 0.05 intervals based on $F_{0.3}$ , $F_{0.5}$ and $F_{1.0}$ for precision-oriented, balance and recall-oriented models, respectively<sup>6</sup>. We evaluate the performance on BEA-2019 test set by ERRANT (Bryant et al., 2017).
|
| 96 |
+
|
| 97 |
+
To validate the effectiveness of our approach for the state-of-the-art seq2seq GEC models, we follow previous work (Grundkiewicz et al., 2019; Zhang et al., 2019) to construct 300M error-corrected sentence pairs in the same way for pretraining. We use Transformer (big) model (Vaswani et al., 2017) in the fairoq and a vocabulary with size of 32K Byte Pair Encoding (Sennrich et al., 2016) tokens. We also use one of the models trained by the prior work (Sun et al., 2021) which utilizes a pretrained model BART (Lewis et al., 2019) to initialize a GEC model which has a 12-layer encoder and 2-
|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
Figure 2: The performance of the seq2seq model (w/ pretraining) over varying $\lambda$ in BEA-2019 dev set.
|
| 101 |
+
|
| 102 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">NLPCC-2018</td></tr><tr><td>P</td><td>R</td><td>F0.5</td></tr><tr><td>Fu et al. (2018)</td><td>35.2</td><td>18.6</td><td>29.9</td></tr><tr><td>Zhou et al. (2018)</td><td>41.0</td><td>13.8</td><td>29.4</td></tr><tr><td>Ren et al. (2018)</td><td>47.2</td><td>12.6</td><td>30.6</td></tr><tr><td>Wang et al. (2020b)</td><td>41.9</td><td>22.0</td><td>35.5</td></tr><tr><td>Wang et al. (2020a)</td><td>39.4</td><td>22.8</td><td>34.4</td></tr><tr><td>Zhao and Wang (2020)</td><td>44.4</td><td>22.4</td><td>37.0</td></tr><tr><td>Our Implementation</td><td>41.5</td><td>25.7</td><td>36.9</td></tr><tr><td>+ Precision-oriented(λ = 0.25)</td><td>52.9</td><td>12.8</td><td>32.6</td></tr><tr><td>+ Recall-oriented(λ = 2.50)</td><td>34.2</td><td>34.6</td><td>34.3</td></tr><tr><td>+ Balance(λ = 0.75)</td><td>44.6</td><td>22.7</td><td>37.4</td></tr></table>
|
| 103 |
+
|
| 104 |
+
layer decoder, following Li et al. (2021).
|
| 105 |
+
|
| 106 |
+
In addition, we evaluate our approach on NLPCC-18 Chinese GEC shared task (Zhao et al., 2018) by official Max-Match scorer<sup>8</sup> to prove our approach is language-independent. We use a base Transformer model and construct a character-level vocabulary consisting of 7K tokens. We train the model using MaskGEC (Zhao and Wang, 2020).
|
| 107 |
+
|
| 108 |
+
The models decode with a beam size of 5. We show more details of training in the Appendix.
|
| 109 |
+
|
| 110 |
+
# 3.2 Experimental Result
|
| 111 |
+
|
| 112 |
+
As shown in Table 2, our approach can control the precision-recall trade-off of inference for any seq2seq GEC models by tweaking a single hyperparameter $\lambda$ . After inference tweaks, pretrained GEC models could achieve much better precision with comparable or even better overall performance. For instance, our approach increases the precision of pretrained models by over 10 points. In contrast, the recall improvement is smaller than precision,
|
| 113 |
+
|
| 114 |
+
Table 3: Performance of our approach in the NLPCC-2018 Chinese benchmark. Note that the models compared here are not pretrained, except for Wang et al. (2020a).
|
| 115 |
+
|
| 116 |
+
<table><tr><td>Input</td><td>In my opinion, the car isn’t necessary when you have crashed in the street, in that moment you realized the importance of a public transport.</td></tr><tr><td>λ = 0.20</td><td>In my opinion, the car isn’t necessary when you have crashed in the street[.]0 [At]1 that moment you realized the importance of []2 public transport.</td></tr><tr><td>λ = 1.85</td><td>In my opinion, [a]0 car isn’t necessary when you have crashed in the street[.]1 [At]2 that moment [,]3 you [realize]4 the importance of []5 public transport.</td></tr><tr><td>Input</td><td>we can see that there are lots of serious and frequently weather disaster happened in decades, such as typhoon, hurricane, wild fire and mud slide.</td></tr><tr><td>λ = 0.20</td><td>we can see that there are lots of serious and frequently weather disaster happened in decades, such as typhoon, hurricane, wild fire and mud slide.</td></tr><tr><td>λ = 0.35</td><td>we can see that there are lots of serious and frequently weather [disasters]0 [that]1 [have]2 happened in decades, such as typhoon, hurricane, wild fire and mud slide.</td></tr><tr><td>λ = 1.85</td><td>[We]0 can see that [many]1 serious and [frequent]2 weather [disasters]3 [have]4 happened in decades, such as [typhoons]5, [hurricanes]6, [wildfires]7 and [mudslides]8.</td></tr></table>
|
| 117 |
+
|
| 118 |
+
Table 4: Examples of corrections generated by seq2seq model (w/ pretraining) with different $\lambda$ . The rewritten tokens are within the blue blocks.
|
| 119 |
+
|
| 120 |
+
i.e., an increment of about 6 points for pretrained models, since it depends mainly on error-corrected patterns that the model itself has learned. The final system has achieved competitive performance (73.8 $F_{0.5}$ ) and align-and-predict decoding improves it to a new state-of-the-art result - 75.0 $F_{0.5}$ in the BEA-2019 test set by a slight tendency towards precision.
|
| 121 |
+
|
| 122 |
+
We further look into the performance of the pretrained seq2seq model over varying $\lambda$ in BEA-2019 development set, which is shown in Figure 2. It is obvious that the conservative inference $(\lambda < 1.0)$ with fewer edits tends to achieve higher precision since it only provides the most confident corrections, while recall of aggressive inference $(\lambda > 1.0)$ has an upper bound. This is because the motivation of our approach is to simply display error-corrected patterns that the model has learned with different orientation rather than to improve its capability and complement more patterns. Meanwhile, it is observed that $F_{0.5}$ does not peak around $\lambda = 1.0$ , which makes it possible to adapt the precision-recall trade-off for better overall performance.
|
| 123 |
+
|
| 124 |
+
As shown in Table 3, our approach also performs well in Chinese GEC, which demonstrates that it is language-independent. We present concrete exam
|
| 125 |
+
|
| 126 |
+
plies with different $\lambda$ in our validation set in Table 4. It is consistent with our intuition that with larger $\lambda$ , the inference tends to heavily edit the input tokens; on the other hand, it adheres to the input sequence with smaller $\lambda$ .
|
| 127 |
+
|
| 128 |
+
# 4 Conclusion
|
| 129 |
+
|
| 130 |
+
We propose a novel language-independent decoding approach to offer more flexibility to adjust the precision-recall trade-off of inference for seq2seq GEC models, making it adaptive to various real-world application scenarios. It can not only adapt a single model to precision-oriented and recall-oriented inference, but also be used as a simple trick for better overall performance. On both English and Chinese GEC benchmarks, our approach further improves the state-of-the-art seq2seq GEC model by precision-recall trade-off. In the future, we plan to apply it to other sentence rewriting tasks, such as paraphrasing and style transfer.
|
| 131 |
+
|
| 132 |
+
# Acknowledgments
|
| 133 |
+
|
| 134 |
+
We thank all the reviewers for their valuable comments to improve our paper. We thank Tao Ge in Microsoft Research Asia for the valuable suggestions. The work is supported by National Natural Science Foundation of China under Grant No.62036001 and PKU-Baidu Fund (No.2020BD021). The corresponding author of this paper is Houfeng Wang.
|
| 135 |
+
|
| 136 |
+
# References
|
| 137 |
+
|
| 138 |
+
Christopher Bryant, Mariano Felice, Øistein E Andersen, and Ted Briscoe. 2019. The bea-2019 shared task on grammatical error correction. In Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications, pages 52-75.
|
| 139 |
+
Christopher Bryant, Mariano Felice, and Ted Briscoe. 2017. Automatic annotation and evaluation of error types for grammatical error correction. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 793-805.
|
| 140 |
+
Mengyun Chen, Tao Ge, Xingxing Zhang, Furu Wei, and Ming Zhou. 2020. Improving the efficiency of grammatical error correction with erroneous span detection and correction. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7162-7169.
|
| 141 |
+
Daniel Dahlmeier, Hwee Tou Ng, and Siew Mei Wu. 2013. Building a large annotated corpus of learner
|
| 142 |
+
|
| 143 |
+
english: The nus corpus of learner english. In Proceedings of the eighth workshop on innovative use of NLP for building educational applications, pages 22-31.
|
| 144 |
+
Kai Fu, Jin Huang, and Yitao Duan. 2018. Youdao's winning solution to the nlpcc-2018 task 2 challenge: a neural machine translation approach to chinese grammatical error correction. In CCF International Conference on Natural Language Processing and Chinese Computing, pages 341-350. Springer.
|
| 145 |
+
Tao Ge, Furu Wei, and Ming Zhou. 2018. Fluency boost learning and inference for neural grammatical error correction. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1055-1065.
|
| 146 |
+
Sylviane Granger. The computer learner corpus: a versatile new source of data for SLA research.
|
| 147 |
+
Roman Grundkiewicz, Marcin Junczys-Dowmunt, and Kenneth Heafield. 2019. Neural grammatical error correction systems with unsupervised pre-training on synthetic data. In Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications, pages 252-263.
|
| 148 |
+
Chris Hokamp and Qun Liu. 2017. Lexically constrained decoding for sequence generation using grid beam search. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1535-1546.
|
| 149 |
+
Kengo Hotate, Masahiro Kaneko, and Mamoru Komachi. 2020. Generating diverse corrections with local beam search for grammatical error correction. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2132-2137.
|
| 150 |
+
J Edward Hu, Huda Khayrallah, Ryan Culkin, Patrick Xia, Tongfei Chen, Matt Post, and Benjamin Van Durme. 2019. Improved lexically constrained decoding for translation and monolingual rewriting. 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 839-850.
|
| 151 |
+
Masahiro Kaneko, Masato Mita, Shun Kiyono, Jun Suzuki, and Kentaro Inui. 2020. Encoder-decoder models can benefit from pre-trained masked language models in grammatical error correction. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4248-4254.
|
| 152 |
+
Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
|
| 153 |
+
Ilia Kulikov, Alexander Miller, Kyunghyun Cho, and Jason Weston. 2019. Importance of search and evaluation strategies in neural dialogue modeling. In Proceedings of the 12th International Conference on Natural Language Generation, pages 76-87.
|
| 154 |
+
|
| 155 |
+
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.
|
| 156 |
+
Yanyang Li, Ye Lin, Tong Xiao, and Jingbo Zhu. 2021. An efficient transformer decoder with compressed sub-layers. arXiv preprint arXiv:2101.00542.
|
| 157 |
+
Deng Liang, Chen Zheng, Lei Guo, Xin Cui, Xiuzhang Xiong, Hengqiao Rong, and Jinpeng Dong. 2020. Bert enhanced neural machine translation and sequence tagging model for chinese grammatical error diagnosis. In Proceedings of the 6th Workshop on Natural Language Processing Techniques for Educational Applications, pages 57-66.
|
| 158 |
+
Jared Lichtarge, Chris Alberti, and Shankar Kumar. 2020. Data weighted training strategies for grammatical error correction. Transactions of the Association for Computational Linguistics, 8:634-646.
|
| 159 |
+
Bruce T Lowerre. 1976. The harpy speech recognition system. Carnegie Mellon University.
|
| 160 |
+
Eric Malmi, Sebastian Krause, Sascha Rothe, Daniil Mirylenka, and Aliaksei Severyn. 2019. Encode, tag, realize: High-precision text editing. 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 5054-5065.
|
| 161 |
+
Tomoya Mizumoto, Mamoru Komachi, Masaaki Nagata, and Yuji Matsumoto. 2011. Mining revision log of language learning sns for automated japanese error correction of second language learners. In Proceedings of 5th International Joint Conference on Natural Language Processing, pages 147-155.
|
| 162 |
+
Franz Josef Och and Hermann Ney. 2004. The alignment template approach to statistical machine translation. Computational linguistics, 30(4):417-449.
|
| 163 |
+
Kostiantyn Omelianchuk, Vitaliy Atrasevych, Artem Chernodub, and Oleksandr Skurzhanskyi. 2020. Gector-grammatical error correction: Tag, not rewrite. arXiv preprint arXiv:2005.12592.
|
| 164 |
+
Myle Ott, Sergey Edunov, David Grangier, and Michael Auli. 2018. Scaling neural machine translation. arXiv preprint arXiv:1806.00187.
|
| 165 |
+
Hongkai Ren, Liner Yang, and Endong Xun. 2018. A sequence to sequence learning for chinese grammatical error correction. In CCF International Conference on Natural Language Processing and Chinese Computing, pages 401-410. Springer.
|
| 166 |
+
Sascha Rothe, Jonathan Mallinson, Eric Malmi, Sebastian Krause, and Aliaksei Severyn. 2021. A simple recipe for multilingual grammatical error correction. arXiv preprint arXiv:2106.03830.
|
| 167 |
+
|
| 168 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1715-1725.
|
| 169 |
+
Felix Stahlberg and Shankar Kumar. 2020. Seq2 edits: Sequence transduction using span-level edit operations. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5147-5159.
|
| 170 |
+
Felix Stahlberg and Shankar Kumar. 2021. Synthetic data generation for grammatical error correction with tagged corruption models. In Proceedings of the 16th Workshop on Innovative Use of NLP for Building Educational Applications, pages 37-47.
|
| 171 |
+
Xin Sun, Tao Ge, Furu Wei, and Houfeng Wang. 2021. Instantaneous grammatical error correction with shallow aggressive decoding. arXiv preprint arXiv:2106.04970.
|
| 172 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. Advances in neural information processing systems, 27.
|
| 173 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. 2016. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818-2826.
|
| 174 |
+
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.
|
| 175 |
+
Zhaohong Wan, Xiaojun Wan, and Wenguang Wang. 2020. Improving grammatical error correction with data augmentation by editing latent representation. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2202-2212.
|
| 176 |
+
Chencheng Wang, Liner Yang, Yingying Wang, Yongping Du, and Erhong Yang. 2020a. Chinese grammatical error correction method based on transformer enhanced architecture. Journal of Chinese Information Processing, 34(6):106.
|
| 177 |
+
Hongfei Wang, Michiki Kurosawa, Satoru Katsumata, and Mamoru Komachi. 2020b. Chinese grammatical correction using bert-based pre-trained model. arXiv preprint arXiv:2011.02093.
|
| 178 |
+
Helen Yannakoudakis, Ted Briscoe, and Ben Medlock. 2011. A new dataset and method for automatically grading esol texts. In Proceedings of the 49th annual meeting of the association for computational linguistics: human language technologies, pages 180-189.
|
| 179 |
+
Zheng Yuan, Shiva Taslimipoor, Christopher Davis, and Christopher Bryant. 2021. Multi-class grammatical error detection for correction: A tale of two systems.
|
| 180 |
+
|
| 181 |
+
In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 8722-8736.
|
| 182 |
+
|
| 183 |
+
Yi Zhang, Tao Ge, Furu Wei, Ming Zhou, and Xu Sun. 2019. Sequence-to-sequence pre-training with data augmentation for sentence rewriting. arXiv preprint arXiv:1909.06002.
|
| 184 |
+
|
| 185 |
+
Wei Zhao, Liang Wang, Kewei Shen, Ruoyu Jia, and Jingming Liu. 2019. Improving grammatical error correction via pre-training a copy-augmented architecture with unlabeled data. 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 156-165.
|
| 186 |
+
|
| 187 |
+
Yuanyuan Zhao, Nan Jiang, Weiwei Sun, and Xiaojun Wan. 2018. Overview of the nlpcc 2018 shared task: Grammatical error correction. In CCF International Conference on Natural Language Processing and Chinese Computing, pages 439-445. Springer.
|
| 188 |
+
|
| 189 |
+
Zewei Zhao and Houfeng Wang. 2020. Maskgec: Improving neural grammatical error correction via dynamic masking. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 1226-1233.
|
| 190 |
+
|
| 191 |
+
Junpei Zhou, Chen Li, Hengyou Liu, Zuyi Bao, Guangwei Xu, and Linlin Li. 2018. Chinese grammatical error correction using statistical and neural models. In CCF International Conference on Natural Language Processing and Chinese Computing, pages 117-128. Springer.
|
| 192 |
+
|
| 193 |
+
# A Hyper-parameters
|
| 194 |
+
|
| 195 |
+
The hyper-parameters for Chinese GEC are listed in Table 5. The hyper-parameters of training the models for English GEC are listed in Table 6 and Table 7.
|
| 196 |
+
|
| 197 |
+
<table><tr><td>Configurations</td><td>Values</td></tr><tr><td colspan="2">Train From Scratch</td></tr><tr><td>Model Architecture</td><td>Transformer (base)</td></tr><tr><td>Training Strategy</td><td>MaskGEC(Zhao and Wang, 2020)</td></tr><tr><td>Devices</td><td>4 Nvidia V100 GPU</td></tr><tr><td>Max tokens per GPU</td><td>5120</td></tr><tr><td>Update Frequency</td><td>[2, 4]</td></tr><tr><td>Optimizer</td><td>Adam(β1=0.9, β2=0.98, ε=1 × 10-8)(Kingma and Ba, 2014)</td></tr><tr><td>Learning rate</td><td>[5 × 10-4, 7 × 10-4]</td></tr><tr><td>Learning rate scheduler</td><td>inverse sqrt</td></tr><tr><td>Warmup</td><td>4000</td></tr><tr><td>weight decay</td><td>0.0</td></tr><tr><td>Loss Function</td><td>label smoothed cross entropy label-smoothing=0.1)(Szegedy et al., 2016)</td></tr><tr><td>Dropout</td><td>0.3</td></tr></table>
|
| 198 |
+
|
| 199 |
+
<table><tr><td>Configurations</td><td>Values</td></tr><tr><td colspan="2">Pretrain</td></tr><tr><td>Model Architecture</td><td>Transformer (big)</td></tr><tr><td>Number of epochs</td><td>10</td></tr><tr><td>Devices</td><td>8 Nvidia V100 GPU</td></tr><tr><td>Max tokens per GPU</td><td>5120</td></tr><tr><td>Update Frequency</td><td>8</td></tr><tr><td>Learning rate</td><td>3 × 10-4</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td></td><td>(β1=0.9, β2=0.98, ε=1 × 10-8)</td></tr><tr><td>Learning rate scheduler</td><td>inverse sqrt</td></tr><tr><td>Weight decay</td><td>0.0</td></tr><tr><td>Loss Function</td><td>label smoothed cross entropy
|
| 200 |
+
label-smoothing=0.1)</td></tr><tr><td>Warmup</td><td>8000</td></tr><tr><td>Dropout</td><td>0.3</td></tr><tr><td colspan="2">Fine-tune</td></tr><tr><td>Number of epochs</td><td>60</td></tr><tr><td>Devices</td><td>4 Nvidia V100 GPU</td></tr><tr><td>Update Frequency</td><td>4</td></tr><tr><td>Learning rate</td><td>3 × 10-4</td></tr><tr><td>Warmup</td><td>4000</td></tr><tr><td>Dropout</td><td>0.3</td></tr></table>
|
| 201 |
+
|
| 202 |
+
Table 6: Hyper-parameters values of pretraining and fine-tuning for English GEC.
|
| 203 |
+
|
| 204 |
+
<table><tr><td>Configurations</td><td>Values</td></tr><tr><td colspan="2">Pretrain</td></tr><tr><td>Model Architecture</td><td>BART 12+2 Init</td></tr><tr><td>Number of steps</td><td>400000 with early stopping</td></tr><tr><td>Devices</td><td>32 Nvidia V100 GPU</td></tr><tr><td>Max tokens per GPU</td><td>8000</td></tr><tr><td>Update Frequency</td><td>4</td></tr><tr><td>Learning rate</td><td>1 × 10-4</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td></td><td>(β1=0.9, β2=0.999, ε=1 × 10-8)</td></tr><tr><td>Learning rate scheduler</td><td>polynomial decay</td></tr><tr><td>Weight decay</td><td>0.01</td></tr><tr><td>Loss Function</td><td>label smoothed cross entropy
|
| 205 |
+
label-smoothing=0.1)</td></tr><tr><td>Warmup</td><td>16000</td></tr><tr><td>Dropout</td><td>0.3</td></tr><tr><td colspan="2">Fine-tune</td></tr><tr><td>Training Strategy</td><td>Multi-stage fine-tuning</td></tr><tr><td></td><td>(Stahlberg and Kumar, 2020)</td></tr><tr><td>Devices</td><td>8 Nvidia V100 GPU</td></tr><tr><td>Learning rate</td><td>5 × 10-5</td></tr><tr><td>Warmup</td><td>4000</td></tr><tr><td>Dropout</td><td>0.2</td></tr></table>
|
| 206 |
+
|
| 207 |
+
Table 7: Hyper-parameters values of the BARTinitialized model for English GEC.
|
| 208 |
+
|
| 209 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">Time (in second)</td></tr><tr><td>1</td><td>16</td><td>64</td></tr><tr><td>Seq2Seq (w/ pretraining)</td><td>218</td><td>37</td><td>20</td></tr><tr><td>+ λ = 0.20</td><td>225</td><td>41</td><td>23</td></tr><tr><td>+ λ = 1.85</td><td>229</td><td>42</td><td>23</td></tr></table>
|
| 210 |
+
|
| 211 |
+
Table 8: The total inference time of the seq2seq model (w/ pretraining) under various batch sizes (1/16/64) using 1 NVIDIA Titan RTX GPU with CUDA 11.1 in the first 1000 sentences of the BEA-2019 dev set.
|
| 212 |
+
|
| 213 |
+
Table 5: Hyper-parameters values for Chinese GEC.
|
| 214 |
+
|
| 215 |
+
# B Efficiency
|
| 216 |
+
|
| 217 |
+
Table 8 shows the total latency of the seq2seq model (w/ pretraining) under various batch sizes. Our approach incurs about $5\%$ extra latency in the online inference setting (i.e., batch size=1) and is suitable for practical GEC systems.
|
adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a1cdad6d43c0d2117b510be5f0a6fd5c8f817f858bc2061df599d2d3fd1b8d1
|
| 3 |
+
size 572819
|
adjustingtheprecisionrecalltradeoffwithalignandpredictdecodingforgrammaticalerrorcorrection/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9aabb9c8731dec0e1974ee252928140aadbc86cfa4dc2e6dab8665e30c2d22f4
|
| 3 |
+
size 273751
|
analyzingwrapupeffectsthroughaninformationtheoreticlens/51f2d462-fad2-4fea-96d3-cac1240ec5de_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5ed4b5aed1b8795a53e7617bad46a847d020cbc534f4cabdc252fd39b47c75e
|
| 3 |
+
size 51056
|
analyzingwrapupeffectsthroughaninformationtheoreticlens/51f2d462-fad2-4fea-96d3-cac1240ec5de_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e18c103541c473d08e9e2a3fc01e4f9b0023fabd2f44187a011db62ab88c0d0e
|
| 3 |
+
size 63822
|
analyzingwrapupeffectsthroughaninformationtheoreticlens/51f2d462-fad2-4fea-96d3-cac1240ec5de_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6c6f8a82bf308c060467f86ca33a2087f6b95c59588406a3462d20631370ecb
|
| 3 |
+
size 3610595
|
analyzingwrapupeffectsthroughaninformationtheoreticlens/full.md
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Analyzing Wrap-Up Effects through an Information-Theoretic Lens
|
| 2 |
+
|
| 3 |
+
Clara Meister Tiago Pimentel Thomas Hikaru Clark Ryan Cotterell Roger Levy
|
| 4 |
+
|
| 5 |
+
ETH Zürich University of Cambridge Massachusetts Institute of Technology clara.meister@inf.ethz.ch tp472@cam.ac.uk thclark@mit.edu rryan.cotterell@inf.ethz.ch rplevy@mit.edu
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Numerous analyses of reading time (RT) data have been implemented—all in the effort to better understand the cognitive processes driving reading comprehension. However, data measured on words at the end of a sentence—or even at the end of a clause—is often omitted due to the confounding factors introduced by so-called "wrap-up effects," which manifests as a skewed distribution of RTs for these words. Consequently, the community's understanding of the cognitive processes that might be involved in these wrap-up effects is limited. In this work, we attempt to learn more about these processes by examining the relationship between wrap-up effects and information-theoretic quantities, such as word and context surprisesals. We find that the distribution of information in prior contexts is often predictive of sentence- and clause-final RTs (while not of sentence-medial RTs). This lends support to several prior hypotheses about the processes involved in wrap-up effects.
|
| 10 |
+
|
| 11 |
+

|
| 12 |
+
|
| 13 |
+
https://github.com/rycolab/ wrap-up-effects
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
Reading puts the unfolding of linguistic input in the hands—or, really, the eyes—of the reader. Consequently, it presents a unique opportunity to gain a better understanding of how humans comprehend written language. The rate at which humans choose to read text (and process its information) should be determined by their goal of understanding it. Ergo, examining where a reader spends their time should help us to understand the nature of language comprehension processes themselves. Indeed, studies analyzing reading times have been employed to explore a number of psycholinguistic theories (e.g., Smith and Levy, 2013; Futrell et al., 2020; Van Schijndel and Linzen, 2021).
|
| 18 |
+
|
| 19 |
+
One behavior revealed by such studies is the
|
| 20 |
+
|
| 21 |
+
tendency for humans to spend more time<sup>1</sup> on the last word of a sentence or clause. While the existence of such wrap-up effects is well-known (Just et al., 1982; Hill and Murray, 2000; Rayner et al., 2000; Camblin et al., 2007), the cognitive processes giving rise to them are still not fully understood. This is likely (at least in part) due to the dearth of analyses targeting naturalistic sentence-final reading behavior. First, most studies of online processing omit data from these words to explicitly control for the confounding factors wrap-up effects introduce (e.g., Smith and Levy, 2013; Goodkind and Bicknell, 2018). Second, the few studies on wrap-up effects rely on small datasets, none of which analyze naturalistic text (Just and Carpenter, 1980; Rayner et al., 2000; Kuperberg et al., 2011). This work addresses this gap, using several large corpora of reading time data. Specifically, we study whether information-theoretic concepts (such as surprisal) provide insights into the cognitive processes that occur at a sentence's boundary. Notedly, information-theoretic approaches have been proven effective for analyzing sentence-medial reading time behavior.
|
| 22 |
+
|
| 23 |
+
We follow the long line of work that has connected information-theoretic measures and psychometric data (Frank et al., 2015; Goodkind and Bicknell, 2018; Wilcox et al., 2020; Meister et al., 2021, inter alia), employing similar methods to build models of sentence- and clause-final RTs. Using surprisal estimates from state-of-the-art language models, we search for a link between wrap-up effects and the information content within a sentence. We find that the distribution of surprisals of prior context is often predictive of sentence- and clause-final reading times (RTs), while not adding significant predictive power to models of sentence-medial RTs. This result suggests that the nature of cognitive processes involved during the reading
|
| 24 |
+
|
| 25 |
+
of these boundary words may indeed be different than those at other positions. Such findings lend support to several prior hypotheses regarding which processes may underlie wrap-up effects (e.g., the resolution of prior ambiguities) while providing evidence against other speculations (e.g., that the time spent at sentence boundaries can be quantified with a constant factor, independent of the processing difficulty of the text itself).
|
| 26 |
+
|
| 27 |
+
# 2 The Process of Reading
|
| 28 |
+
|
| 29 |
+
Decades of research on reading behavior have improved our understanding of the cognitive processes involved in reading comprehension (Just and Carpenter, 1980; Rayner and Clifton, 2009, inter alia). Here, we will briefly describe overarching themes that are relevant for understanding wrap-up effects.
|
| 30 |
+
|
| 31 |
+
# 2.1 Incrementality and its Implications
|
| 32 |
+
|
| 33 |
+
It is widely accepted that language processing is incremental, i.e., readers process text one word at a time (Hale, 2001, 2006; Rayner and Clifton, 2009; Boston et al., 2011, inter alia). Consequently, much can be uncovered about reading comprehension via studies that analyze cognitive processing at the word level. Many psycholinguistic studies make use of this notion, taking per-word RTs in self-paced reading (SPR) or eye-tracking studies to be a direct reflection of the processing load of that word (e.g., Smith and Levy, 2013; Van Schijndel and Linzen, 2021). This RT-processing effort relationship then allows us to identify relationships between a word's processing load and its attributes (e.g., surprisal or length)—which in turn hints at the underlying cognitive processes involved in comprehension. One prominently studied attribute is word predictability; a notion naturally quantified by surprisal (also known as Shannon's (1948) information content). Formally, the surprisal of a word $w$ is defined as $s(w) \stackrel{\text{def}}{=} -\log p(w \mid w_{<t})$ , i.e., a unit's negative log-probability given the prior sentential context $w_{<t}$ . Notedly, this operationalization provides a way of quantifying how our prior expectations can affect our ability to process a linguistic signal.
|
| 34 |
+
|
| 35 |
+
There are several hypotheses about the mathematical nature of the relationship between perword surprisal and processing load.2 While there
|
| 36 |
+
|
| 37 |
+
has been much empirical proof that surprisal estimates serve as a good predictor of word-level RTs (Smith and Levy, 2013; Goodkind and Bicknell, 2018; Wilcox et al., 2020), the data observed from sentence-final words appears not to follow the same relationship. Specifically, in comparison to sentence-medial words, sentence- or clause-final words are associated with increased RTs in self-paced studies (Just et al., 1982; Hill and Murray, 2000) and both increased fixation and regression times in eye-tracking studies (Rayner et al., 2000; Camblin et al., 2007). Such behavior has also been observed in controlled settings—for example, Rayner et al. (1989) found that readers fixated longer on a word when it ended a clause than when the same word did not end a clause.
|
| 38 |
+
|
| 39 |
+
Such widespread experimental evidence suggests sentence-final and sentence-medial reading behaviors differ from each other, and that other cognitive processes (besides standard word-level processing) effort may be at play. Yet unfortunately, these wrap-up effects have received relatively little attention in the psycholinguistic community: Most reading time studies simply exclude sentence-final (or even clause-final) words from their analyses, claiming that the (poorly understood) effects are confounding factors in understanding the reading process (e.g., Frank et al., 2013, 2015; Wilcox et al., 2020). Rather, we believe this data can potentially provide new insights in their own right.
|
| 40 |
+
|
| 41 |
+
# 2.2 Wrap-up Effects
|
| 42 |
+
|
| 43 |
+
It remains unclear what exactly occurs in the mind of the reader at the end of a sentence or clause. Which cognitive processes are encompassed by the term wrap-up effects? Several theories have been posited. First, Just and Carpenter (1980) hypothesize that wrap-up effects include actions such as "the constructions of inter-clause relations." Second, Rayner et al. (2000) suggest they might involve attempts to resolve previously postponed comprehension problems, which could have been deferred in the hope that upcoming words would resolve the problem. Third, Hirotani et al. (2006) posit the hesitation when crossing clause boundaries is out of efficiency (Jarvella, 1971); readers do not want to have to return to the clause later, so they take the extra time to make sure there are no inconsistencies in the prior text.
|
| 44 |
+
|
| 45 |
+
While some prior hypotheses have been largely dismissed (see Stowe et al., 2018 for a more
|
| 46 |
+
|
| 47 |
+
detailed summary) due to, e.g., the wide-spread support of theories of incremental processing, most others lack formal testing in naturalistic reading studies. We attempt to address this gap. Concretely, we posit the relationship between text's information-theoretic attributes and its observed wrap-up times can indicate the presence (or lack) of several cognitive processes that are potentially a part of sentence wrap-up. For example, highsurprisal words in the preceding context may correlate with the presence of ambiguities in the text; they may also correlate with complex linguistic relationships of the current text with prior sentences—which are two driving forces in the theories given above. Consequently, in this work, we ask whether the reading behavior observed at the end of a sentence or clause can be described (at least partially) by the distribution of information content in the preceding context, $^{3}$ as this may give insights for several prior hypotheses about wrap-up effects.
|
| 48 |
+
|
| 49 |
+
# 3 Language Models as Predictors of Psychometric Data
|
| 50 |
+
|
| 51 |
+
Formally, a language model $q$ is a probability distribution over natural language sentences, i.e., over $\mathcal{V}^*$ for an alphabet $\mathcal{V}$ of linguistic units (typically words). In the case when $q$ is locally normalized, which is the predominant case for today's neural language models, $q$ is defined as the product of conditional probability distributions, i.e., for $\boldsymbol{w} \in \mathcal{V}^*$ , we have $q(\boldsymbol{w}) = q(\mathrm{EOS} \mid \boldsymbol{w}) \prod_{t=1}^{|\boldsymbol{w}|} q(w_t \mid \boldsymbol{w}_{<t})$ , where each $q(\cdot \mid \boldsymbol{w}_{<t})$ is a distribution over $\mathcal{V} \cup \{\mathrm{EOS}\}$ . The symbol EOS is a special end-of-string token not in $\mathcal{V}$ . Consequently, we can use $q$ to estimate the probability of individual words in context. The model parameters are typically estimated by minimizing the negative log-likelihood of a corpus of natural language strings $\mathcal{C}$ , i.e., minimizing $\mathcal{L}(q) = -\sum_{\boldsymbol{w} \in \mathcal{C}} \log q(\boldsymbol{w})$ with respect to $q$ .
|
| 52 |
+
|
| 53 |
+
One widely embraced technique in information-theoretic psycholinguistics is the use of these language models to estimate the probabilities required for computing surprisal (Hale, 2001; Demberg and Keller, 2008; Mitchell et al., 2010; Fernandez Monsalve et al., 2012). It has even been observed that a language model's perplexity<sup>4</sup> correlates negatively
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
Figure 1: Distributions of residuals when predicting either clause-final or non-clause-final times using our baseline linear models. Models are fit to (the log-transform of) non-clause-final average RTs. Outlier times (according to log-normal distribution) are excluded. The top-level datasets contain eye-tracking data while the bottom contain SPR data. Full distributions of RTs are shown in App. B, where we also show models fit to regression times, rather than full reading times.
|
| 57 |
+
|
| 58 |
+
with the psychometric predictive power provided by its surprisal estimates (Frank and Bod, 2011; Goodkind and Bicknell, 2018; Wilcox et al., 2020). If these language models keep improving at their current fast pace (Radford et al., 2019; Brown et al., 2020), exciting new results in computational psycholinguistics may follow, connecting reading behavior to the statistics of natural language.
|
| 59 |
+
|
| 60 |
+
Predicting Reading Times. In the computational psycholinguistics literature, the RT-surprisal relationship is typically studied using predictive models: RTs are predicted using surprisal estimates (along with other attributes such as number of characters) for the current word. The predictive power of these models, together with the structure of the model itself (which defines a specific relationship between RTs and surprisal), is then used as evidence of the studied effect. While this paradigm is successful in modeling sentence-medial RTs (Smith and Levy, 2013; Goodkind and Bicknell, 2018; Wilcox et al., 2020), its effectiveness for modeling sentence- and clause-final times is largely unknown due to the omission of this data from the majority of RT analyses.
|
| 61 |
+
|
| 62 |
+
A priori, we might expect per-word surprisal to be a similarly powerful predictor of sentence and clause-final RTs. Yet in Fig. 1, we see that when our baseline linear model (described more precisely in §4) is fit to sentence-medial RTs, the residuals for predictions of clause-final RTs appear to be neither normally distributed nor centered around 0.
|
| 63 |
+
|
| 64 |
+
Further, these trends appear to be different for eyetracking and SPR data, where the latter are skewed towards lower values for all datasets. These results provide further confirmation that clause-final data does not adhere to the same relationship with RT as sentence-medial data, a phenomenon that may perhaps be accounted for by additional factors at play in the comprehension of clause-final words. Thus, we ask whether taking into account information from the entire prior context can give us a better model of these clause-final RTs.
|
| 65 |
+
|
| 66 |
+
To this end, we operationalize the information content INF in text $\boldsymbol{w}$ (of length $T$ ) as:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\operatorname {I N F} ^ {(k)} (\boldsymbol {w}) \stackrel {\text {d e f}} {=} \sum_ {t = 1} ^ {T} s \left(w _ {t}\right) ^ {k} \quad (k \geq 0) \tag {1}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where $\pmb{w}$ may be an entire sentence or only its first $T$ words. Notably, the case of $k = 0$ returns $T$ ; under $k = 1$ , we get the total information content of $\pmb{w}$ . For $k > 1$ , moments of high surprisal will disproportionately drive up the value of $\mathrm{INF}^{(k)}(\pmb{w})$ . Such words may indicate, e.g., moments of ambiguity or uneven distributions of information in text. Thus, how well $\mathrm{INF}^{(k)}(\pmb{w})$ (as a function of $k$ ) predicts model sentence- and clause-final RTs may indicate which attributes of prior text (if any) can be linked to the additional cognitive processes involved in wrap-up effects.
|
| 73 |
+
|
| 74 |
+
# 4 Experiments
|
| 75 |
+
|
| 76 |
+
Data. We use reading time data from 5 corpora over 2 modalities: the Natural Stories (Futrell et al., 2018), Brown (Smith and Levy, 2013), and UCL (SP) (Frank et al., 2013) Corpora, which contain SPR data, as well as the Provo (Luke and Christianson, 2018), Dundee (Kennedy et al., 2003) and UCL (ET) (Frank et al., 2013) Corpora, which contain eye movements during reading. All corpora are in English. For eye-tracking data, we take reading time to be the sum of all fixation times on that word. We provide an analysis of regression (a.k.a. go-past) time in App. B. We provide further details regarding pre-processing in App. A.
|
| 77 |
+
|
| 78 |
+
Estimating Surprisal. We obtain surprisal estimates from three language models: GPT-2 (Radford et al., 2019), TransformerXL (Dai et al., 2019)
|
| 79 |
+
|
| 80 |
+
and a 5-gram model, estimated using Modified Kneser-Essen-Ney Smoothing (Ney et al., 1994). We compute per-word surprisal as the sum of subword surprisals, when applicable. Additionally, punctuation is included in these estimates, although see App. B for results omitting punctuation, which are qualitatively the same. More details are given in App. A.
|
| 81 |
+
|
| 82 |
+
Evaluation. Following Wilcox et al. (2020) and Meister et al. (2021), we quantify the predictive power of a variable of interest as the mean difference in log-likelihood $\Delta \mathrm{LL}$ of data points under models with and without access to that variable. A positive $\Delta \mathrm{LL}$ value indicates the model with this predictor fits the observed data more closely than a model without this predictor. We use 10-fold cross-validation to compute $\Delta \mathrm{LL}$ values, taking the mean across the held-out folds as our final metric. Our baseline model for predicting RTs contains predictors for surprisal, unigram log-frequency, character length, and the interaction of the latter two. These values, albeit computed on the previous word, are also included to account for spill-over effects (Smith and Levy, 2013). Surprisal from two words back is included for SPR datasets. Unless otherwise stated, GPT-2 estimates are used for baseline surprisal estimates in all models.
|
| 83 |
+
|
| 84 |
+
Results. Here we explore the additional predictive power that $\mathrm{INF}^{(k)}$ gives us when modeling clause-final RTs. In Fig. 2, we observe that often the additional information provided by $\mathrm{INF}^{(k)}(\boldsymbol{w})$ indeed leads to better models of clause-final RTs. Note that the estimated coefficients for $\mathrm{INF}^{(k)}$ are always positive when $\Delta \mathrm{LL} > 0$ (see App. B.2), suggesting that higher values of $\mathrm{INF}^{(k)}(\boldsymbol{w})$ correspond to longer wrap-up times. This finding is in line with other information-theoretic analyses of RTs (discussed in §2.1), which have consistently found positive relationships between information content and RT.
|
| 85 |
+
|
| 86 |
+
In most cases, $\mathrm{INF}^{(k)}$ at some value of $k > 0$ leads to larger gains in predictive power than $k = 0$ . Ergo, the information content of the preceding text is more indicative of wrap-up behavior than length alone. Further, while often within standard error, $\mathrm{INF}^{(k)}(\pmb{w})$ at $k > 1$ provides more predictive power than at $k = 1$ across the majority of datasets. This indicates that unevenness in the distribution of surprisal is stronger than the total surprisal content alone as a predictor of clause-final RTs. The
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
Figure 2: Mean $\Delta$ LL as a function of the exponent $k$ in $\mathrm{INF}^{(k)}$ for models of sentence and clause-final (top row) and sentence-medial (bottom row) RTs using surprisal estimates from different language models. The shaded region connects standard error estimates. Vertical intercepts at $k = 0,1$ are for reference. We see that our information-theoretic predictors contribute much less modeling power to the prediction of sentence-medial RTs in comparison to sentence- and clause-final RTs.
|
| 90 |
+
|
| 91 |
+
same experiments for sentence-medial words show these quantities are less helpful when modeling their RTs. Note that these effects hold above and beyond the spill-over effects from the window immediately preceding the sentence boundary. The effect of the distribution of surprisal throughout the sentence is stronger for eye-tracking data than for SPR; further, the trends are even more pronounced when measuring regression times for eye-tracking data (see App. B).
|
| 92 |
+
|
| 93 |
+
Notably, we see some variation in trends across datasets. Due to the nature of psycholinguistic studies, it is natural to expect some variation due to, e.g., data collection procedures or inaccuracies from measurement devices. Another (perhaps more influential) factor in the difference in trends comes from the variation in dataset sizes. We see that with the smaller datasets (e.g., UCL and Provo), there may not be enough data to learn accurate model parameters. This artifact may manifest as the noisiness or a lack of a significant increase in log-likelihood (on a held-out test set) over the baseline that we observe in some cases.
|
| 94 |
+
|
| 95 |
+
When considering prior theories of wrap-up processes, these results have several implications. For example, they can be interpreted as supporting and extending Rayner et al.'s (2000) hypothesis, which suggests the extra time at sentence boundaries is spent resolving prior ambiguities. In this case, the observed correlation between wrap-up times and $\mathrm{INF}^{(k)}(\pmb{w})$ may potentially be linked to two factors: (1) contextual ambiguities increasing variation in per-word information content, and (2)
|
| 96 |
+
|
| 97 |
+
contextual ambiguities being resolved at clause ends. On the other hand, these results provide evidence against the hypothesis that the cognitive processes occurring during the comprehension of sentence-medial and clause-final words are the same. Further, it also goes against Hirotani et al.'s (2006) hypothesis (discussed in §2.2), as the differences in sentence-medial and clause-final times cannot be purely quantified by a constant factor.
|
| 98 |
+
|
| 99 |
+
# 5 Conclusion
|
| 100 |
+
|
| 101 |
+
We attempt to shed light on the nature of wrap-up effects by exploring the relationship between clause-final RTs and information-theoretic attributes of text. We find that operationalizations of the information contained in the preceding context lead to better predictions of these RTs, while not adding significant predictive power for sentence-medial RTs. This suggests that information-theoretic attributes of text can shed light on the cognitive processes happening during the comprehension of clause-final words. Further, these processes may indeed be different in nature than those required for sentence-medial words. In short, our results provide evidence (either in support or against) about several theories of the nature of wrap-up processes.
|
| 102 |
+
|
| 103 |
+
# Ethics Statement
|
| 104 |
+
|
| 105 |
+
All studies involving human evaluations were conducted outside of the scope of this paper. The authors foresee no ethical concerns with the work presented in this paper.
|
| 106 |
+
|
| 107 |
+
# Acknowledgments
|
| 108 |
+
|
| 109 |
+
RC acknowledges support from the Swiss National Science Foundation (SNSF) as part of the "The Forgotten Role of Inductive Bias in Interpretability" project. TP is supported by a Facebook Fellowship Award. RPL acknowledges support from NSF grant 2121074.
|
| 110 |
+
|
| 111 |
+
# References
|
| 112 |
+
|
| 113 |
+
Marisa Ferrara Boston, John T. Hale, Shravan Vasishth, and Reinhold Kliegl. 2011. Parallel processing and sentence comprehension difficulty. Language and Cognitive Processes, 26(3):301-349.
|
| 114 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D. Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877-1901.
|
| 115 |
+
C. Christine Camblin, Peter C. Gordon, and Tamara Y. Swaab. 2007. The interplay of discourse congruence and lexical association during sentence processing: Evidence from ERPs and eye tracking. Journal of Memory and Language, 56(1):103-128.
|
| 116 |
+
Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. 2019. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2978-2988, Florence, Italy. Association for Computational Linguistics.
|
| 117 |
+
Vera Demberg and Frank Keller. 2008. Data from eyetracking corpora as evidence for theories of syntactic processing complexity. Cognition, 109(2):193-210.
|
| 118 |
+
Irene Fernandez Monsalve, Stefan L. Frank, and Gabriella Vigliocco. 2012. Lexical surprisal as a general predictor of reading time. In Proceedings of the 13th Conference of the European Chapter of the Association for Computational Linguistics, pages 398-408, Avignon, France. Association for Computational Linguistics.
|
| 119 |
+
Stefan L. Frank and Rens Bod. 2011. Insensitivity of the human sentence-processing system to hierarchical structure. Psychological Science, 22(6):829-834.
|
| 120 |
+
Stefan L. Frank, Irene Fernandez Monsalve, Robin L. Thompson, and Gabriella Vigliocco. 2013. Reading time data for evaluating broad-coverage models
|
| 121 |
+
|
| 122 |
+
of English sentence processing. Behavior Research Methods, 45:1182-1190.
|
| 123 |
+
Stefan L. Frank, Leun J. Otten, Giulia Galli, and Gabriella Vigliocco. 2015. The ERP response to the amount of information conveyed by words in sentences. *Brain and Language*, 140:1-11.
|
| 124 |
+
Richard Futrell, Edward Gibson, and Roger P. Levy. 2020. Lossy-context surprisal: An information-theoretic model of memory effects in sentence processing. Cognitive Science, 44:e12814.
|
| 125 |
+
Richard Futrell, Edward Gibson, Harry J. Tily, Idan Blank, Anastasia Vishnevetsky, Steven Piantadosi, and Evelina Fedorenko. 2018. The Natural Stories Corpus. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation. European Language Resources Association.
|
| 126 |
+
Adam Goodkind and Klinton Bicknell. 2018. Predictive power of word surprisal for reading times is a linear function of language model quality. In Proceedings of the 8th Workshop on Cognitive Modeling and Computational Linguistics, pages 10-18.
|
| 127 |
+
John Hale. 2001. A probabilistic Earley parser as a psycholinguistic model. In Second Meeting of the North American Chapter of the Association for Computational Linguistics. Association for Computational Linguistics.
|
| 128 |
+
John Hale. 2006. Uncertainty about the rest of the sentence. Cognitive Science, 30(4):643-672.
|
| 129 |
+
Kenneth Heafield. 2011. KenLM: Faster and smaller language model queries. In Proceedings of the Sixth Workshop on Statistical Machine Translation, pages 187-197, Edinburgh, Scotland. Association for Computational Linguistics.
|
| 130 |
+
Robin Hill and Wayne Murray. 2000. *Commas and Spaces: Effects of Punctuation on Eye Movements and Sentence Parsing*, pages 565-590. Elsevier.
|
| 131 |
+
Masako Hirotani, Lyn Frazier, and Keith Rayner. 2006. Punctuation and intonation effects on clause and sentence wrap-up: Evidence from eye movements. Journal of Memory and Language, 54(3):425-443.
|
| 132 |
+
Robert J. Jarvella. 1971. Syntactic processing of connected speech. Journal of Verbal Learning and Verbal Behavior, 10(4):409-416.
|
| 133 |
+
Marcel Adam Just and Patricia A. Carpenter. 1980. A theory of reading: From eye fixations to comprehension. Psychological Review, 87 4:329-54.
|
| 134 |
+
Marcel Adam Just, Patricia A. Carpenter, and Jacqueline D. Woolley. 1982. Paradigms and processes in reading comprehension. Journal of Experimental Psychology: General, 111:228-238.
|
| 135 |
+
Alan Kennedy, Robin Hill, and Joel Pynte. 2003. The Dundee Corpus. In Proceedings of the 12th European Conference on Eye Movements.
|
| 136 |
+
|
| 137 |
+
Gina R. Kuperberg, Martin Paczynski, and Tali Ditman. 2011. Establishing Causal Coherence across Sentences: An ERP Study. Journal of Cognitive Neuroscience, 23(5):1230-1246.
|
| 138 |
+
Steven G. Luke and Kiel Christianson. 2018. The Provo Corpus: A large eye-tracking corpus with predictability norms. Behavior Research Methods, 50(2):826-833.
|
| 139 |
+
Clara Meister, Tiago Pimentel, Patrick Haller, Lena Jäger, Ryan Cotterell, and Roger Levy. 2021. Revisiting the uniform information density hypothesis. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, Online. Association for Computational Linguistics.
|
| 140 |
+
Jeff Mitchell, Mirella Lapata, Vera Demberg, and Frank Keller. 2010. Syntactic and semantic factors in processing difficulty: An integrated measure. In Proceedings of the 48th Annual Meeting of the Association for Computational Linguistics, pages 196-206, Uppsala, Sweden. Association for Computational Linguistics.
|
| 141 |
+
Hermann Ney, Ute Essen, and Reinhard Kneser. 1994. On structuring probabilistic dependences in stochastic language modelling. Computer Speech and Language, 8(1):1-38.
|
| 142 |
+
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.
|
| 143 |
+
Keith Rayner and Charles Clifton. 2009. Language processing in reading and speech perception is fast and incremental: Implications for event-related potential research. Biological Psychology, 80(1):4-9.
|
| 144 |
+
Keith Rayner, Gretchen Kambe, and Susan A. Duffy. 2000. The effect of clause wrap-up on eye movements during reading. *The Quarterly Journal of Experimental Psychology Section A*, 53(4):1061-1080.
|
| 145 |
+
Keith Rayner, Sara C. Sereno, Robin K. Morris, A. Réne Schmauder, and Charles Clifton Jr. 1989. Eye movements and on-line language comprehension processes. Language and Cognitive Processes, 4(3-4):SI21-SI49.
|
| 146 |
+
Claude E. Shannon. 1948. A mathematical theory of communication. The Bell System Technical Journal, 27(3):379-423.
|
| 147 |
+
Nathaniel J. Smith and Roger Levy. 2013. The effect of word predictability on reading time is logarithmic. Cognition, 128(3):302-319.
|
| 148 |
+
Laurie A. Stowe, Edith Kaan, Laura Sabourin, and Ryan C. Taylor. 2018. The sentence wrap-up dogma. Cognition, 176:232-247.
|
| 149 |
+
Marten Van Schijndel and Tal Linzen. 2021. Single-stage prediction models do not explain the magnitude of syntactic disambiguation difficulty. Cognitive Science, 45(6):e12988.
|
| 150 |
+
|
| 151 |
+
Ethan Gotlieb Wilcox, Jon Gauthier, Jennifer Hu, Peng Qian, and Roger Levy. 2020. On the predictive power of neural language models for human real-time comprehension behavior. In Proceedings of the 42nd Annual Meeting of the Cognitive Science Society, pages 1707-1713. Cognitive Science Society.
|
| 152 |
+
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38-45, Online. Association for Computational Linguistics.
|
| 153 |
+
|
| 154 |
+
# A Experimental Setup
|
| 155 |
+
|
| 156 |
+
# A.1 Data Pre-processing
|
| 157 |
+
|
| 158 |
+
We use the Moses decoder $^{9}$ tokenizer and punctuation normalizer to pre-process all text data. Some of the Hugging Face tokenizers for respective neural models performed additional tokenization; we refer the reader to the library documentation for more details. We determine clause-final words as all those ending in punctuation. Capitalization was kept intact albeit the lowercase versions of words were used in unigram probability estimates. We estimate unigram log-probabilities on WikiText-103 using the KenLM (Heafield, 2011) library with default hyperparameters. We removed outlier word-level reading times (specifically those with a $z$ -score $>3$ when the distribution was modeled as log-linear).
|
| 159 |
+
|
| 160 |
+
# A.2 Surprisal Estimates
|
| 161 |
+
|
| 162 |
+
We use pre-trained neural language models to compute most surprisal estimates. For reproducibility, we employ the model checkpoints provided by Hugging Face (Wolf et al., 2020). Specifically, for GPT-2, we use the default OpenAI version (gpt2); for TransformerXL, we use a version of the model (architecture described in Dai et al. (2019)) that has been fine-tuned on WikiText-103 (transfo-x1-wt103); for BERT, we use the bert-base-cased version. Notably, BERT models the probability of a word given both prior and later context, which means it can only give us pseudo estimates of surprisal. Both GPT-2 and BERT use sub-word tokenization. We additionally use surprisal estimates from a 5-gram model trained on WikiText-103 using the KenLM (Heafield, 2011) library with default hyperparameters for Kneser-Essen-Ney smoothing.
|
| 163 |
+
|
| 164 |
+
# B Additional Results
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 3: Distributions of average RTs for clause-final and non-clause-final words. Outlier times (according to log-normal distribution) are excluded from averages for both graphs. The top-level datasets contain eye-tracking data while the bottom contain SPR data.
|
| 168 |
+
|
| 169 |
+

|
| 170 |
+
Figure 4: Version of Fig. 1 where surprisal estimates do not include the surprisal assigned to punctuation, which is often a large contributor to clause-final surprisal estimates. We see very little qualitative difference with Fig. 1.
|
| 171 |
+
|
| 172 |
+
# B.1 Regression Times Analysis
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
Figure 5: Version of (a) Fig. 3 and (b) Fig. 1 for regression times for clause-final and non-clause-final words. Only applicable for eye-tracking datasets
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
(b)
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
Figure 6: Same setup as Fig. 2 albeit predicting regression times. Results are only applicable for eye-tracking datasets. (a) shows results for predicting clause-final words, while (b) shows results for predicting sentence-medial words.
|
| 184 |
+
Figure 7: Same setup as Fig. 2 albeit using respective model estimates for the baseline per-word surprisal estimate. (a) shows results for predicting clause-final words, while (b) shows results for predicting sentence-medial words. Results follow similar trends to those seen in Fig. 2.
|
| 185 |
+
|
| 186 |
+
# B.2 Predictor Coefficients
|
| 187 |
+
|
| 188 |
+

|
| 189 |
+
Figure 8: Estimated coefficients for $\mathrm{INF}^{(k)}$ predictors used in in Fig. 2 (a).
|
analyzingwrapupeffectsthroughaninformationtheoreticlens/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:696666860f3d214f325df0ece0b2a40f31b6b8b926f153517843afa9ca451770
|
| 3 |
+
size 419024
|
analyzingwrapupeffectsthroughaninformationtheoreticlens/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:15a2677ac8112a5f27b27108e39ddc321eccd594a390769587a19ae574f3d4e1
|
| 3 |
+
size 243656
|
ananalysisofnegationinnaturallanguageunderstandingcorpora/64cc0d9a-60ca-46fe-844a-4ffb0a2a2689_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6824e788de6f016c9d5deff31dbb12be66032cf9e0fc88632045187a7d09fbf
|
| 3 |
+
size 53628
|
ananalysisofnegationinnaturallanguageunderstandingcorpora/64cc0d9a-60ca-46fe-844a-4ffb0a2a2689_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2cde8bdbb37b9c81670865de2730a9ce7d37bae04e4ed05fd03cc2177df6e8c4
|
| 3 |
+
size 63178
|
ananalysisofnegationinnaturallanguageunderstandingcorpora/64cc0d9a-60ca-46fe-844a-4ffb0a2a2689_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bace6bdc6baf09df95cf7b54ea77526f97ce5309d0b646353d998218c9f4cd84
|
| 3 |
+
size 198465
|
ananalysisofnegationinnaturallanguageunderstandingcorpora/full.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# An Analysis of Negation in Natural Language Understanding Corpora
|
| 2 |
+
|
| 3 |
+
Md Mosharaf Hossain, $^{a}$ Dhivya Chinnappa, $^{b}$ and Eduardo Blanco $^{c}$
|
| 4 |
+
|
| 5 |
+
$^{\mathrm{a}}$ Department of Computer Science and Engineering, University of North Texas
|
| 6 |
+
|
| 7 |
+
$^{\mathrm{a}}$ Thomson Reuters
|
| 8 |
+
|
| 9 |
+
$^{3}$ School of Computing and Augmented Intelligence, Arizona State University
|
| 10 |
+
|
| 11 |
+
mdmosharafhossain@my.unt.edu dhivya.infant@gmail.com eduardo.blanco@asu.edu
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
This paper analyzes negation in eight popular corpora spanning six natural language understanding tasks. We show that these corpora have few negations compared to general-purpose English, and that the few negations in them are often unimportant. Indeed, one can often ignore negations and still make the right predictions. Additionally, experimental results show that state-of-the-art transformers trained with these corpora obtain substantially worse results with instances that contain negation, especially if the negations are important. We conclude that new corpora accounting for negation are needed to solve natural language understanding tasks when negation is present.
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
Natural language understanding (NLU) is an umbrella term used to refer to any task that requires text understanding. For example, question answering (Rajpurkar et al., 2016), information extraction (Stanovsky et al., 2018), coreference resolution (Wu et al., 2020), and machine reading (Yang et al., 2019), among many others, are tasks that fall under natural language understanding. The threshold for claiming that a system understands natural language is ever-moving. New corpora are often justified by pointing out that state-of-the-art models do not obtain good results. After years of steady improvements, more powerful models eventually obtain so-called human performance, and at that point new, more challenging corpora are created.
|
| 20 |
+
|
| 21 |
+
Many corpora for natural language understanding tasks contain language generated by annotators rather than retrieved from texts written independently of the corpus creation process. These corpora are certainly useful and have facilitated tremendous progress. Annotator-generated examples, however, carry the risk of evaluating systems with synthetic language that is not representative of language in the wild. For example, annotators are
|
| 22 |
+
|
| 23 |
+
likely to use negation when asked to write a text that contradicts something despite contradictions in the wild need not have a negation (Gururangan et al., 2018). Recently, Kwiatkowski et al. (2019) present a large corpus for question answering that consists of natural questions (i.e., asked by somebody with a real information need) in order to encourage research in a more realistic scenario. This contrasts with previous corpora, where the questions were written by annotators after being told the answer (Rajpurkar et al., 2016).
|
| 24 |
+
|
| 25 |
+
In this paper, we explore the role of negation in eight corpora for six popular natural language understanding tasks. Our goal is to check whether negation plays the role it deserves in these tasks. To our surprise, we conclude that negation is virtually ignored by answering the following questions:
|
| 26 |
+
|
| 27 |
+
1. Do NLU corpora contain as many negations as general-purpose texts? (they don't);
|
| 28 |
+
2. Do the (few) negations in NLU corpora play a role in solving the tasks? (they don't); and
|
| 29 |
+
3. Do state-of-the-art transformers trained with NLU corpora face challenges with instances that contain negation? (they do, especially if the negation is important).
|
| 30 |
+
|
| 31 |
+
# 2 Background and Related Work
|
| 32 |
+
|
| 33 |
+
We work with the eight corpora covering six tasks summarized below and exemplified in Table 2.
|
| 34 |
+
|
| 35 |
+
We select two corpora for question answering: CommonsenseQA (Talmor et al., 2019) and COPA (Roemmle et al., 2011). CommonsenseQA consists of multi-choice questions (5 candidate answers) that require some degree of commonsense. COPA presents a premise (e.g., The man broke his toe) and a question (e.g., What was the cause of this?) and the system must choose between two plausible alternatives (e.g. He got a hole in his sock or He dropped a hammer on his foot).
|
| 36 |
+
|
| 37 |
+
For textual similarity and paraphrasing, we select $\mathrm{QQP^2}$ and STS-B (Cer et al., 2017). QQP consists of pairs of questions and the task is to determine whether they are paraphrases. STS-B consists of pairs of texts and the task is to determine how semantically similar they are with a score from 0 to 5.
|
| 38 |
+
|
| 39 |
+
We select one corpus for the remaining tasks. For inference, we work with QNLI (Rajpurkar et al., 2016), which consists in determining whether a text is a valid answer to a question. We use WiC (Pilehvar and Camacho-Collados, 2019) for word sense disambiguation. WiC consists in determining whether two instances of the same word (in two sentences; italicized in Table 2) are used with the same meaning. For coreference resolution, we choose WSC (Levesque et al., 2012), which consists in determining whether a pronoun and a noun phrase are co-referential (italicized in Table 2). Finally, we work with SST-2 (Socher et al., 2013) for sentiment analysis. The task consists in determining whether a sentence from a collection of movie reviews has positive or negative sentiment.
|
| 40 |
+
|
| 41 |
+
For convenience, we work with the formatted versions of these corpora in the GLUE (Wang et al., 2018) and SuperGLUE (Wang et al., 2019) benchmarks. The only exception is CommonsenseQA, which is not part of these benchmarks.
|
| 42 |
+
|
| 43 |
+
Related Work Previous work has shown that SNLI (Bowman et al., 2015) and MNLI (Williams et al., 2018) have annotation artifacts (e.g., negation is a strong indicator of contradictions) (Gururan-gan et al., 2018). The literature has also shown that simple adversarial attacks including negation cues are very effective (Naik et al., 2018; Wallace et al., 2019). Kovatchev et al. (2019) analyze 11 paraphrasing systems and show that they obtain substantially worse results when negation is present.
|
| 44 |
+
|
| 45 |
+
More recently, Ribeiro et al. (2020) show that negation is one of the linguistic phenomena commercial sentiment analysis struggle with. Several previous works have investigated the (lack of) ability of transformers to make inferences when negation is present. For example, Ettinger (2020) conclude that BERT is unable to complete sentences when negation is present. BERT also faces challenges solving the task of natural language inference (i.e., identifying entailments and contradictions) with monotonicity and negation (Geiger et al., 2020; Yanaka et al., 2019). Warstadt et al.
|
| 46 |
+
|
| 47 |
+
<table><tr><td></td><td>#sents.</td><td>% w/ neg.</td></tr><tr><td colspan="3">Question Answering</td></tr><tr><td>CommonsenseQA</td><td>12,102</td><td>14.5</td></tr><tr><td>COPA</td><td>1,000</td><td>0.8</td></tr><tr><td colspan="3">Similarity and Paraphrasing</td></tr><tr><td>QQP</td><td>1,590,482</td><td>8.1</td></tr><tr><td>STS-B</td><td>17,256</td><td>7.1</td></tr><tr><td colspan="3">Inference</td></tr><tr><td>QNLI</td><td>231,338</td><td>8.7</td></tr><tr><td colspan="3">Word Sense Disambiguation</td></tr><tr><td>WiC</td><td>14,932</td><td>8.2</td></tr><tr><td colspan="3">Coreference Resolution</td></tr><tr><td>WSC</td><td>804</td><td>26.2</td></tr><tr><td colspan="3">Sentiment Analysis</td></tr><tr><td>SST-2</td><td>70,042</td><td>16.0</td></tr><tr><td colspan="3">General-purpose English</td></tr><tr><td>all sentences</td><td>8,300,000</td><td>22.6–29.9</td></tr><tr><td>only questions</td><td>456,214</td><td>15.8–20.2</td></tr></table>
|
| 48 |
+
|
| 49 |
+
Table 1: Number of sentences and percentage of sentences containing negation in natural language understanding corpora. All but WSC contain substantially fewer negations than general-purpose English texts.
|
| 50 |
+
|
| 51 |
+
(2019) show the limitations of BERT making acceptability judgments with sentences that contain negative polarity items. Most related to out work, Hossain et al. (2020) analyze the role of negation in three natural language inference corpora: RTE (Dagan et al., 2006; Bar-Haim et al., 2006; Giampiccolo et al., 2007; Bentivogli et al., 2009), SNLI and MNLI. In this paper, we present a similar analysis, but we move beyond natural language inference and work with eight corpora spanning six natural language understanding tasks.
|
| 52 |
+
|
| 53 |
+
# 3 Research Questions and Analysis
|
| 54 |
+
|
| 55 |
+
Q1: Do natural language understanding corpora contain as many negations as general-purpose English texts? In order to automatically identify negation cues, we train a negation cue detector with the largest corpus available, ConanDoyle-neg (Morante and Daelemans, 2012). The cue detector is based on the RoBERTa pretrained language model (Liu et al., 2019); we provide details about the architecture and training process in Appendix A. Our cue detector obtains the best results to date: F1: 93.79 vs. 92.94 (Khandelwal and Sawant, 2020). ConanDoyle-neg (and thus our cue detector) identifies common negation cues such as no, not, n't and never, affixal negation cues such as impossible and careless, and lexical negations such as deny and avoid.
|
| 56 |
+
|
| 57 |
+
<table><tr><td></td><td>Example</td><td></td><td>Important?</td></tr><tr><td rowspan="2">CmmnsQA</td><td>[...] he (John) never saw the lady before. They were what?
|
| 58 |
+
A) pay debts, B) slender, C) unacquainted, D) free flowing, E) sparse</td><td>C</td><td>✓</td></tr><tr><td>When you travel you should what in case of unexpected costs?
|
| 59 |
+
A) go somewhere, B) energy, C) spend frivolously, D) fly in airplane, E) have money</td><td>E</td><td>x</td></tr><tr><td rowspan="2">QQP</td><td>What are some not-so-boring baby shower games ?
|
| 60 |
+
What are some baby shower games that are actually fun?</td><td>yes</td><td>✓</td></tr><tr><td>Who was philosophical guru of Shivaji Maharaj?
|
| 61 |
+
What are the unknown facts of shivaji maharaj?</td><td>no</td><td>x</td></tr><tr><td rowspan="2">STS-B</td><td>Colin Powell, the Secretary of State, said contacts with Iran would not stop.
|
| 62 |
+
Secretary of State Colin Powell said yesterday that contacts with Iran would continue.</td><td>4.3</td><td>✓</td></tr><tr><td>Well for one a being could have a non-physical existence and yet not even be in your mind.
|
| 63 |
+
The difference is huge, as not all non-physical things exist in minds.</td><td>3.4</td><td>x</td></tr><tr><td rowspan="2">QNLI</td><td>Who did BSkyB team up with as it was not part of consortium?
|
| 64 |
+
While BSkyB had been excluded from being a part of the [...] BSkyB was able to join ITV Digital's free-to-air replacement, Freeview, in which it holds an equal stake [...]</td><td>yes</td><td>✓</td></tr><tr><td>In what year did Lavoisier publish his work on combustion?
|
| 65 |
+
In one experiment, Lavoisier observed that there was no overall increase in weight when tin and air were heated in a closed container.</td><td>no</td><td>x</td></tr><tr><td rowspan="2">SST-2</td><td>It's not the ultimate depression-era gangster movie.</td><td>neg.</td><td>✓</td></tr><tr><td>Whaley's determination to immerse you in sheer, unrelenting wretchedness is exhausting.</td><td>neg.</td><td>x</td></tr><tr><td>WiC</td><td>The intention of this legislation is to boost the economy.
|
| 66 |
+
Good intentions are not enough.</td><td>same</td><td>x</td></tr><tr><td>WSC</td><td>Sam and Amy are passionately in love, but Amy's parents are unhappy about it, because they are only fifteen.</td><td>yes</td><td>x</td></tr></table>
|
| 67 |
+
|
| 68 |
+
Table 2: Examples containing negation (underlined) from the validation datasets of the natural language understanding corpora we work with. The third column presents the expected answer for the example (a choice, judgment, or score depending on the task). The last column indicates whether the negation is important.
|
| 69 |
+
|
| 70 |
+
Table 1 presents the percentage of sentences that contain negation in (a) the eight corpora we work with and (b) general-purpose English. We take the latter percentage (all sentences) from Hossain et al. (2020), who run a negation cue detector in online reviews, conversations, and books. Additionally, we also present the percentages in questions. Negation is much less common in all natural language understanding corpora but WSC $(0.8\% -16\%)$ than in general-purpose English $(22.6\% -29.9\%)$ . Note that negation is also underrepresented in corpora that primarily contain questions (general-purpose: $15.8\% -20.2\%$ ; COPA: $0.8\%$ , QQP: $8.1\%$ ).
|
| 71 |
+
|
| 72 |
+
Q2: Do the (few) negations in natural language understanding corpora play a role in solving the tasks? After showing that negation in underrepresented in natural language understanding corpora, we explore whether the few negations they contain are important. Given an instance from any of the corpora, we consider a negation important if removing it changes the ground truth. In other words, a negation is unimportant if one can ignore
|
| 73 |
+
|
| 74 |
+
it and still solve the task at hand. Table 2 presents examples of important and unimportant negations.
|
| 75 |
+
|
| 76 |
+
We manually examine the negations in all instances containing negation from the validation split of each corpus except QQP, for which we examine 1,000 (out of 5,196). Note that COPA does not have any negations in the validation split, and many corpora have few instances containing negation (CommonsenseQA: 184, STS-B: 225, QNLI: 852, WiC: 99, WSC: 52, and SST-2: 263). We choose to work with the validation set because we want to compare results when negation is and is not important (Q3), and the ground truth for the test splits of some corpora are not publicly available.
|
| 77 |
+
|
| 78 |
+
We observe that (a) all negations in WiC and WSC are unimportant, and (b) the percentages of unimportant negations in CommonsenseQA, SST-2, QQP, STS-B, and QNLI are substantial: $45.1\%$ , $63\%$ , $97.4\%$ , $95.6\%$ , and $97.7\%$ , respectively. These percentages indicate that one can safely ignore (almost) all negations and still solve the benchmarks. Despite the fact that negations are
|
| 79 |
+
|
| 80 |
+
<table><tr><td colspan="2"></td><td>Example</td><td colspan="2">Important?</td></tr><tr><td rowspan="8">CommonsenseQA</td><td rowspan="4">Syntactic</td><td>Where would a person live if they wanted no neighbors?</td><td>D</td><td>✓</td></tr><tr><td>A) housing estate, B) neighborhood, C) mars, D) woods, E) suburbs</td><td></td><td></td></tr><tr><td>The teacher doesn't tolerate noise during a test in their what?</td><td>E</td><td>✗</td></tr><tr><td>A) movie theatre, B) bowling alley, C) factory, D) store, E) classroom</td><td></td><td></td></tr><tr><td rowspan="4">Morpho.</td><td>What might result in an unsuccessful suicide attempt?</td><td>B</td><td>✓</td></tr><tr><td>A) die, B) interruption, C) bleed, D) hatred, E) dying</td><td></td><td></td></tr><tr><td>How are the conditions for someone who is living in a homeless shelter?</td><td>A</td><td>✗</td></tr><tr><td>A) sometimes bad, B) happy, C) respiration, D) growing older, E) death</td><td></td><td></td></tr><tr><td rowspan="4">STS-2</td><td rowspan="2">Syntactic</td><td>Despite the evocative aesthetics evincing the hollow state of modern love life, the film never percolates beyond a monotonous whine.</td><td>neg.</td><td>✓</td></tr><tr><td>Even if you don't think (kissinger's) any more guilty of criminal activity than most contemporary statesmen, he'd sure make a courtroom trial great fun to watch.</td><td>pos.</td><td>✗</td></tr><tr><td rowspan="2">Morpho.</td><td>Makes for a pretty unpleasant viewing experience.</td><td>neg.</td><td>✓</td></tr><tr><td>For anyone unfamiliar with pentacostal practices in general and theatrical phenomenon of hell houses in particular, it's an eye-opener.</td><td>pos.</td><td>✗</td></tr></table>
|
| 81 |
+
|
| 82 |
+
Table 3: Examples containing syntactic and morphological negation (underlined) from the validation datasets of CommonsenseQA and SST-2.
|
| 83 |
+
|
| 84 |
+
<table><tr><td></td><td>CmmnsnsQA</td><td>COPA</td><td>QQP</td><td>STS-B</td><td>QNLI</td><td>WiC</td><td>WSC</td><td>SST-2</td></tr><tr><td>validation w/o neg</td><td>0.60</td><td>0.73</td><td>0.90</td><td>0.92 / 0.91</td><td>0.93</td><td>0.67</td><td>0.63</td><td>0.94</td></tr><tr><td>validation w/ neg</td><td>0.53</td><td>n/a</td><td>0.91</td><td>0.85 / 0.84</td><td>0.91</td><td>0.64</td><td>0.59</td><td>0.93</td></tr><tr><td>important (sample from Q2)</td><td>0.47</td><td>n/a</td><td>0.73</td><td>0.57 / 0.62</td><td>0.67</td><td>n/a</td><td>n/a</td><td>0.86</td></tr><tr><td>unimportant (sample from Q2)</td><td>0.62</td><td>n/a</td><td>0.92</td><td>0.85 / 0.84</td><td>0.92</td><td>0.64</td><td>0.59</td><td>0.95</td></tr></table>
|
| 85 |
+
|
| 86 |
+
Table 4: Results obtained with RoBERTa evaluating against (a) all instances with and without negation, and (b) the sample of instances with negation we analyze in detail (important and unimportant). Since the datasets are unbalanced, we report macro F1-score for all tasks except STS-B, for which we report Pearson and Spearman correlations. Results are slightly lower with negation, and substantially lower with important negations.
|
| 87 |
+
|
| 88 |
+
not important in WSC and WiC, they do affect the experimental results (details in Q3).
|
| 89 |
+
|
| 90 |
+
We also analyze the role of two major types of negation: syntactic (not, no, never, etc.) and morphological (i.e., affixes such as un-, im-, and -less). To this end, we work with CommonsenseQA and SST-2, which have lower percentages of unimportant negations (45.1% and 63%) than the other corpora we use (97.4%-100%). Table 3 provides examples of these two negation types. Perhaps unsurprisingly, syntactic negations are much more common than morphological negations (CommonsenseQA: 88.6% vs 11.4%, SST-2: 71.9% vs 28.1%). More importantly, syntactic negations are more often important in SST-2 (42.3% vs 23%), but both syntactic and morphological negation are roughly equally important in CommonsenseQA (55.2% vs 52.4%).
|
| 91 |
+
|
| 92 |
+
Q3: Do state-of-the-art transformers trained with NLU corpora face challenges with instances that contain negation? We conduct experiments with RoBERTa (Liu et al., 2019). More specifically,
|
| 93 |
+
|
| 94 |
+
we use the implementation by Phang et al. (2020) and train a model with the training split of each corpus. We refer the readers to the Appendix B for the details about these models and hyperparameters. We chose RoBERTa over other transformers because 4 out of the 10 best submissions to the SuperGLUE benchmark use it. $^3$
|
| 95 |
+
|
| 96 |
+
Table 4 presents the results evaluating the models with the corresponding validation splits. RoBERTa obtains slightly worse results with the validation instances that have negation in all corpora; the only exception is QQP (F1: 0.90 vs. 0.91). These results lead to the conclusion that negation may only pose a small challenge to state-of-the-art transformers.
|
| 97 |
+
|
| 98 |
+
The results obtained evaluating with the important and unimportant negations from the samples analyzed in Question 2, however, provide a different picture. Indeed, we observe substantial drops in results in all tasks that have both kinds of negations. More specifically, we obtain $27\%$ lower results
|
| 99 |
+
|
| 100 |
+
with instances containing important negations in QNLI (F1: 0.92 vs. 0.67), $33\% / 26\%$ lower in STS-B, $24\%$ lower in CommonsenseQA, $21\%$ lower in QQP, and $9\%$ lower in SST. Further, even though all negations are unimportant in WiC and WSC, we observe a drop in performance for the instances with negation compared to the instances without negation (WiC: 0.64 vs 0.67 and WSC: 0.59 vs 0.63). We conclude that transformers trained with existing NLU corpora face challenges with instances that contain negation. These results raise two important questions for future research: Is negation an inherently challenging phenomenon for RoBERTa? How many instances with negation are required to solve a natural language understanding task?
|
| 101 |
+
|
| 102 |
+
# 4 Conclusions
|
| 103 |
+
|
| 104 |
+
We have analyzed the role of negation in eight natural language understanding corpora covering six tasks. Our analyses show that (a) all but WSC contain almost no negations or around $31\% - 54\%$ of the negations found in general-purpose texts, (b) the few negations in these corpora are usually unimportant, and (c) RoBERTa obtains substantially worse results when negation is important.
|
| 105 |
+
|
| 106 |
+
Our analyses also provide some evidence that creating models to properly deal with negation may require both new corpora and more powerful models. The need for new corpora stems from the answers to Questions 1 and 2. The justification for powerful models is more subtle. We point out that the percentage of unimportant negations (Section 3) is only a weak indicator of the drop in results with important negations (Table 4). For example, we observe a $24\%$ and $21\%$ drop in results with important negations from CommonsenseQA and QQP despite $45\%$ and $97\%$ of negations are unimportant.
|
| 107 |
+
|
| 108 |
+
Negation reverses truth values thus solutions to any natural language understanding task should be robust when negation is present and important. To this end, our future work includes two lines of research. First, we plan to create benchmarks for the six tasks consisting of instances containing negation (50/50 split important/unimportant). Second, we plan to conduct probing experiments to investigate whether (and where) pretrained transformers capture the meaning of negation. Doing so may help us discover potential solutions to understand negation and make inferences.
|
| 109 |
+
|
| 110 |
+
# Acknowledgements
|
| 111 |
+
|
| 112 |
+
This material is based upon work supported by the National Science Foundation under Grant No. 1845757. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the NSF. The Titan Xp used for this research was donated by the NVIDIA Corporation. Computational resources were also provided by the UNT office of High-Performance Computing. Further, we utilized computational resources from the Chameleon platform (Keahey et al., 2020). We also thank the reviewers for insightful comments.
|
| 113 |
+
|
| 114 |
+
# References
|
| 115 |
+
|
| 116 |
+
Roy Bar-Haim, Ido Dagan, Bill Dolan, Lisa Ferro, Danilo Giampiccolo, Bernardo Magnini, and Idan Szpektor. 2006. The second pascal recognising textual entailment challenge. In Proceedings of the second PASCAL challenges workshop on recognising textual entailment, volume 6, pages 6-4. Venice.
|
| 117 |
+
Luisa Bentivogli, Peter Clark, Ido Dagan, and Danilo Giampiccolo. 2009. The fifth pascal recognizing textual entailment challenge.
|
| 118 |
+
Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 632-642, Lisbon, Portugal. Association for Computational Linguistics.
|
| 119 |
+
Daniel Cer, Mona Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. 2017. SemEval-2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 1-14, Vancouver, Canada. Association for Computational Linguistics.
|
| 120 |
+
Ido Dagan, Oren Glickman, and Bernardo Magnini. 2006. The pascal recognising textual entailment challenge. In Proceedings of the First International Conference on Machine Learning Challenges: Evaluating Predictive Uncertainty Visual Object Classification, and Recognizing Textual Entailment, MLCW'05, pages 177-190, Berlin, Heidelberg. Springer-Verlag.
|
| 121 |
+
Allyson Ettinger. 2020. What BERT is not: Lessons from a new suite of psycholinguistic diagnostics for language models. Transactions of the Association for Computational Linguistics, 8:34-48.
|
| 122 |
+
Atticus Geiger, Kyle Richardson, and Christopher Potts. 2020. Neural natural language inference models
|
| 123 |
+
|
| 124 |
+
partially embed theories of lexical entailment and negation. In Proceedings of the Third BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP, pages 163-173, Online. Association for Computational Linguistics.
|
| 125 |
+
Danilo Giampiccolo, Bernardo Magnini, Ido Dagan, and Bill Dolan. 2007. The third PASCAL recognizing textual entailment challenge. In Proceedings of the ACL-PASCAL Workshop on Textual Entailment and Paraphrasing, pages 1-9, Prague. Association for Computational Linguistics.
|
| 126 |
+
Suchin Gururangan, Swabha Swayamdipta, Omer Levy, Roy Schwartz, Samuel Bowman, and Noah A. Smith. 2018. Annotation artifacts in natural language inference data. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 107-112, New Orleans, Louisiana. Association for Computational Linguistics.
|
| 127 |
+
Md Mosharaf Hossain, Venelin Kovatchev, Pranoy Dutta, Tiffany Kao, Elizabeth Wei, and Eduardo Blanco. 2020. An analysis of natural language inference benchmarks through the lens of negation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 9106-9118, Online. Association for Computational Linguistics.
|
| 128 |
+
Kate Keahey, Jason Anderson, Zhuo Zhen, Pierre Riteau, Paul Ruth, Dan Stanzione, Mert Cevik, Jacob Colleran, Haryadi S. Gunawi, Cody Hammock, Joe Mambretti, Alexander Barnes, François Halbach, Alex Rocha, and Joe Stubbs. 2020. Lessons learned from the chameleon testbed. In Proceedings of the 2020 USENIX Annual Technical Conference (USENIX ATC '20). USENIX Association.
|
| 129 |
+
Aditya Khandelwal and Suraj Sawant. 2020. NegBERT: A transfer learning approach for negation detection and scope resolution. In Proceedings of the 12th Language Resources and Evaluation Conference, pages 5739-5748, Marseille, France. European Language Resources Association.
|
| 130 |
+
Venelin Kovatchev, M. Antonia Marti, Maria Salamo, and Javier Beltran. 2019. A qualitative evaluation framework for paraphrase identification. In Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2019), pages 568-577, Varna, Bulgaria. INCOMA Ltd.
|
| 131 |
+
Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452-466.
|
| 132 |
+
|
| 133 |
+
Hector J. Levesque, Ernest Davis, and Leora Morgenstern. 2012. The winograd schema challenge. In Proceedings of the Thirteenth International Conference on Principles of Knowledge Representation and Reasoning, KR'12, page 552-561. AAAI Press.
|
| 134 |
+
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.
|
| 135 |
+
Roser Morante and Walter Daelemans. 2012. ConanDoyle-neg: Annotation of negation cues and their scope in conan doyle stories. In Proceedings of the Eighth International Conference on Language Resources and Evaluation (LREC'12), pages 1563-1568, Istanbul, Turkey. European Language Resources Association (ELRA).
|
| 136 |
+
Aakanksha Naik, Abhilasha Ravichander, Norman Sadeh, Carolyn Rose, and Graham Neubig. 2018. Stress test evaluation for natural language inference. In Proceedings of the 27th International Conference on Computational Linguistics, pages 2340-2353, Santa Fe, New Mexico, USA. Association for Computational Linguistics.
|
| 137 |
+
Jason Phang, Phil Yeres, Jesse Swanson, Haokun Liu, Ian F. Tenney, Phu Mon Htut, Clara Vania, Alex Wang, and Samuel R. Bowman. 2020. jiant 2.0: A software toolkit for research on general-purpose text understanding models. http://jiant.info/.
|
| 138 |
+
Mohammad Taher Pilehvar and Jose Camacho-Collados. 2019. WiC: the word-in-context dataset for evaluating context-sensitive meaning representations. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 1267-1273, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 139 |
+
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2383-2392, Austin, Texas. Association for Computational Linguistics.
|
| 140 |
+
Marco Tulio Ribeiro, Tongshuang Wu, Carlos Guestrin, and Sameer Singh. 2020. Beyond accuracy: Behavioral testing of NLP models with CheckList. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4902-4912, Online. Association for Computational Linguistics.
|
| 141 |
+
Melissa Roemmele, Cosmin Adrian Bejan, and Andrew S Gordon. 2011. Choice of plausible alternatives: An evaluation of commonsense causal reasoning. In AAAI Spring Symposium: Logical Formalizations of Commonsense Reasoning, pages 90-95.
|
| 142 |
+
|
| 143 |
+
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1631-1642, Seattle, Washington, USA. Association for Computational Linguistics.
|
| 144 |
+
|
| 145 |
+
Gabriel Stanovsky, Julian Michael, Luke Zettlemoyer, and Ido Dagan. 2018. Supervised open information extraction. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 885-895, New Orleans, Louisiana. Association for Computational Linguistics.
|
| 146 |
+
|
| 147 |
+
Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. 2019. CommonsenseQA: A question answering challenge targeting commonsense knowledge. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4149-4158, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 148 |
+
|
| 149 |
+
Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. 2019. Universal adversarial triggers for attacking and analyzing NLP. 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 2153-2162, Hong Kong, China. Association for Computational Linguistics.
|
| 150 |
+
|
| 151 |
+
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 Advances in Neural Information Processing Systems 32, pages 3261-3275. Curran Associates, Inc.
|
| 152 |
+
|
| 153 |
+
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.
|
| 154 |
+
|
| 155 |
+
Alex Warstadt, Yu Cao, Ioana Grosu, Wei Peng, Hagen Blix, Yining Nie, Anna Alsop, Shikha Bordia, Haokun Liu, Alicia Parrish, Sheng-Fu Wang, Jason Phang, Anhad Mohananey, Phu Mon Htut, Paloma Jeretic, and Samuel R. Bowman. 2019. Investigating BERT's knowledge of language: Five analysis methods with NPIs. 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),
|
| 156 |
+
|
| 157 |
+
pages 2877-2887, Hong Kong, China. Association for Computational Linguistics.
|
| 158 |
+
|
| 159 |
+
Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 1112-1122. Association for Computational Linguistics.
|
| 160 |
+
|
| 161 |
+
Wei Wu, Fei Wang, Arianna Yuan, Fei Wu, and Jiwei Li. 2020. CorefQA: Coreference resolution as query-based span prediction. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6953-6963, Online. Association for Computational Linguistics.
|
| 162 |
+
|
| 163 |
+
Hitomi Yanaka, Koji Mineshima, Daisuke Bekki, Kentaro Inui, Satoshi Sekine, Lasha Abzianidze, and Johan Bos. 2019. HELP: A dataset for identifying shortcomings of neural models in monotonicity reasoning. In Proceedings of the Eighth Joint Conference on Lexical and Computational Semantics (*SEM 2019), pages 250-255, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 164 |
+
|
| 165 |
+
An Yang, Quan Wang, Jing Liu, Kai Liu, Yajuan Lyu, Hua Wu, Qiaoqiao She, and Sujian Li. 2019. Enhancing pre-trained language representations with rich knowledge for machine reading comprehension. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2346-2357, Florence, Italy. Association for Computational Linguistics.
|
| 166 |
+
|
| 167 |
+
# A Negation Cue Detection
|
| 168 |
+
|
| 169 |
+
We develop a negation cue detector (Section 3 in the paper) by utilizing the RoBERTa (base architecture; 12 layers) pre-trained model (Liu et al., 2019). We fine-tune the system on ConanDoyleneg (Morante and Daelemans, 2012) corpus. While fine-training, the negation cues are marked with BIO (B: Beginning of cue, I: Inside of cue, O: Outside of cue) tagging scheme. The contextualized representations from the last layer of RoBERTa are passed to a fully connected (FC) layer. Finally, a conditional random field (CRF) layer produces the output sequence for the labels.
|
| 170 |
+
|
| 171 |
+
Our model yields the following results on the test set: 93.26 Precision, 94.32 Recall, and 93.79 F1. The neural model takes about two hours on average to train on a single GPU of NVIDIA Tesla K80. A list of the tuned hyperparameters that the model requires to achieve the above results is provided in Table 5. The code is available at https://github.com/mosharafhossain/negation-and-nlu.
|
| 172 |
+
|
| 173 |
+
<table><tr><td colspan="2">Hyperparameter</td></tr><tr><td>Max Epochs</td><td>50</td></tr><tr><td>Batch Size</td><td>10</td></tr><tr><td>Learning Rate (RoBERTa)</td><td>1e-5</td></tr><tr><td>Learning Rate (FC, CRF)</td><td>1e-3</td></tr><tr><td>Weight Decay (RoBERTa)</td><td>0.00001</td></tr><tr><td>Weight Decay (FC)</td><td>0.001</td></tr><tr><td>Grad Clipping</td><td>5.0</td></tr><tr><td>Warmup Epochs</td><td>5</td></tr><tr><td>Patience</td><td>15</td></tr><tr><td>Dropout</td><td>0.5</td></tr></table>
|
| 174 |
+
|
| 175 |
+
Table 5: Hyperparameters used to fine-tune the cue detector with ConanDoyle-neg (Morante and Daelemans, 2012) corpus. FC and CRF refers to fully connected and conditional random field layers, respectively.
|
| 176 |
+
|
| 177 |
+
<table><tr><td></td><td>Hp-1</td><td>Hp-2</td><td>Hp-3</td></tr><tr><td>CmmnsnsQA</td><td>10</td><td>16</td><td>1e-5</td></tr><tr><td>COPA</td><td>50</td><td>16</td><td>1e-5</td></tr><tr><td>QQP</td><td>3</td><td>16</td><td>1e-5</td></tr><tr><td>STS-B</td><td>10</td><td>16</td><td>1e-5</td></tr><tr><td>QNLI</td><td>3</td><td>8</td><td>1e-5</td></tr><tr><td>WiC</td><td>10</td><td>16</td><td>1e-5</td></tr><tr><td>WSC</td><td>200</td><td>16</td><td>1e-6</td></tr><tr><td>SST-2</td><td>3</td><td>16</td><td>1e-5</td></tr></table>
|
| 178 |
+
|
| 179 |
+
Table 6: Hyperparameters used to fine-tune RoBERTa individually for each corpus. Hp-1, Hp-2, and Hp-3 refer to the number of epochs, batch size, and learning rate used in the training procedure. We use default settings for the other hyperparameters when we use the implementation by Phang et al. (2020).
|
| 180 |
+
|
| 181 |
+
# B Hyperparameters to Fine-tune the System for Each of the NLU Tasks
|
| 182 |
+
|
| 183 |
+
We use an implementation by Phang et al. (2020) and fine-tune RoBERTa (base architecture; 12 layers) (Liu et al., 2019) model separately for each of the eight corpora. We use the default settings of the hyperparameters, except for a few, when fine-tuning the model on each benchmark. Table 6 shows tuned hyperparameters for each benchmark.
|
ananalysisofnegationinnaturallanguageunderstandingcorpora/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf59fdb2efadb81959d82c2ed787f0ecb2116698bacc181aa8c07e0a9c206bde
|
| 3 |
+
size 410990
|
ananalysisofnegationinnaturallanguageunderstandingcorpora/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9614f6166839aa56cf13b5643762d371e76ba852410b60a0bdcdfaeec106dc82
|
| 3 |
+
size 202563
|
anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/38547c9c-8e95-4764-b53b-b8bf8c17acc0_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c41238ee21b661164f30c7d29654ea5295ba703840a662c45aa028d48e07bd2
|
| 3 |
+
size 62282
|
anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/38547c9c-8e95-4764-b53b-b8bf8c17acc0_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:49bd030a338675ab87df3a3f674f8b351a0f491c75a4e6f37a2aa2eff366ec9b
|
| 3 |
+
size 79347
|
anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/38547c9c-8e95-4764-b53b-b8bf8c17acc0_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e45a2fc43c9babbe86e15ff9c51ef6a3152ba6fc1c93592ea23928b521efc250
|
| 3 |
+
size 518233
|
anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/full.md
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# An Embarrassingly Simple Method to Mitigate und es IRA ble Properties of Pretrained Language Model Tokenizers
|
| 2 |
+
|
| 3 |
+
Valentin Hofmann\*, Hinrich Schütze, Janet B. Pierrehumbert
|
| 4 |
+
|
| 5 |
+
* Faculty of Linguistics, University of Oxford
|
| 6 |
+
|
| 7 |
+
$\dagger$ Department of Engineering Science, University of Oxford
|
| 8 |
+
|
| 9 |
+
‡Center for Information and Language Processing, LMU Munich
|
| 10 |
+
|
| 11 |
+
valentin.hofmann@ling-phil.ox.ac.uk
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
We introduce FLOTA (Few Longest Token Approximation), a simple yet effective method to improve the tokenization of pretrained language models (PLMs). FLOTA uses the vocabulary of a standard tokenizer but tries to preserve the morphological structure of words during tokenization. We evaluate FLOTA on morphological gold segmentations as well as a text classification task, using BERT, GPT-2, and XLNet as example PLMs. FLOTA leads to performance gains, makes inference more efficient, and enhances the robustness of PLMs with respect to whitespace noise.
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
The first step in NLP architectures using pretrained language models (PLMs) is to map text to a sequence of tokens corresponding to input embeddings. The tokenizers used to accomplish this have been shown to exhibit various undesirable properties such as generating segmentations that blur word meaning (Bostrom and Durrett, 2020; Church, 2020; Hofmann et al., 2021) and generalizing suboptimally to new domains (Tan et al., 2020; Hong et al., 2021; Sachidananda et al., 2021).
|
| 20 |
+
|
| 21 |
+
In this paper, we propose FLOTA (Few Longest Token Approximation), a simple yet effective method to mitigate some shortcomings of PLM tokenizers. FLOTA is motivated by the following hypothesis: rather than finding a segmentation that covers all characters of a word but destroys its morphological structure, it can be more beneficial to find a segmentation that does not cover all characters but preserves key aspects of the morphology. We confirm this hypothesis in this paper.
|
| 22 |
+
|
| 23 |
+
Our study investigates three PLMs and corresponding tokenizers: BERT (base, uncased; Devlin et al., 2019), which uses WordPiece (Schuster and Nakajima, 2012; Wu et al., 2016), GPT-2 (base, cased; Radford et al., 2019), which uses byte-pair encoding (BPE; Gage, 1994; Sennrich et al., 2016),
|
| 24 |
+
|
| 25 |
+
and XLNet (base, cased; Yang et al., 2019), which uses Unigram (Kudo, 2018). We find that FLOTAs increases the morphological quality of all tokenizers as evaluated on human-annotated gold segmentations as well as the performance of all PLMs on a text classification challenge set.
|
| 26 |
+
|
| 27 |
+
Contributions. We introduce FLOTA, a simple yet effective method to improve the tokenization of PLMs during finetuning. FLOTA uses the vocabulary of a standard tokenizer but tries to preserve the morphological structure of words during tokenization. We show that FLOTA has three advantages compared to standard tokenization: (i) it can increase the performance of PLMs on certain tasks, sometimes substantially; (ii) it makes inference more efficient by shortening the processed token sequences; (iii) it enhances the robustness of PLMs with respect to certain types of noise in the data. All this is achieved without requiring any additional parameters or resources compared to vanilla PLM finetuning. We also release a text classification challenge set that can serve as a benchmark for future studies on PLM tokenizers.
|
| 28 |
+
|
| 29 |
+
# 2 Few Longest Token Approximation
|
| 30 |
+
|
| 31 |
+
Let $V$ be a set of tokens that constitute the vocabulary of a tokenizer. For the tokenizers discussed in this paper, $V$ contains words, subwords, and characters. Let $\phi$ be a model used by the tokenizer to map text to a sequence of tokens from $V$ .
|
| 32 |
+
|
| 33 |
+
FLOTA (Few Longest Token Approximation) discards $\phi$ and uses $V$ in a modified way. Given a word $w$ not in $V$ , FLOTA tokenizes it by determining the longest substring $s \in V$ of $w$ , returning $s$ , and recursing on $w \setminus s$ , the string(s) remaining when $s$ is removed from $w$ . We stop after $k$ recursive calls or when the residue is null. Figure 1 provides pseudocode. For the example word undesirable and $k = 2$ , FLOTA first searches on
|
| 34 |
+
|
| 35 |
+
MAXSUBWORDSPLIT $(w,V)$
|
| 36 |
+
1 $l =$ length $(w)$
|
| 37 |
+
2 for $j = l$ downto 0
|
| 38 |
+
3 for $i = 0$ to $l - j + 1$
|
| 39 |
+
4 $s = w[i..i + j]$
|
| 40 |
+
5 if $s\in V$
|
| 41 |
+
6 $r = w[0..i]\oplus_{j}w[i + j..l]$
|
| 42 |
+
7 return $s,r,i$
|
| 43 |
+
|
| 44 |
+
FLOTATOKENIZE(w,k,V)
|
| 45 |
+
1 $s,r,i = \mathrm{MAXSUBWORDSPLIT}(w,V)$
|
| 46 |
+
2 if $k = 1$ or hyphen $(r)$
|
| 47 |
+
3 $F = \{\}$
|
| 48 |
+
4 $F[i] = s$
|
| 49 |
+
5 return F
|
| 50 |
+
6 $F = \mathrm{FLOTATOKENIZE}(r,k - 1,V)$
|
| 51 |
+
7 $F[i] = s$
|
| 52 |
+
8 return F
|
| 53 |
+
|
| 54 |
+
Figure 1: FLOTA pseudocode. FLOTA is based on a recursive function FLOTATOKENIZE that uses a hash table $F$ to store the longest substring $s$ and its index $i$ on each recursive call. $s$ and $i$ are found by means of a second function MAXSUBWORDSLPLIT, which also returns a residue $r$ . In practice, to ensure correct indexing throughout different recursive calls as well as prevent using discontinuous substrings for tokenization, we compute $r$ using an operation $\oplus_{j}$ that concatenates two strings by putting $j$ (length of $s$ ) hyphens between them. The recursion stops after $k$ recursive calls or when $r$ only consists of hyphens (determined by a boolean function hyphen). The hash table returned by FLOTATOKENIZE is converted to a tokenization using a simple wrapper function that sorts the found substrings by their indices (not shown). If MAXSUBWORDSLPLIT does not find a substring $s \in V$ , FLOTATOKENIZE returns an empty hash table (not shown).
|
| 55 |
+
|
| 56 |
+
undesirable and finds desirable, then searches on un- -and finds un, then stops (since $k = 2$ ; it would also stop for $k > 2$ since the residue is null) and returns the tokenization un, desirable. The WordPiece tokenization, on the other hand, is und, es, ira,ble.
|
| 57 |
+
|
| 58 |
+
FLOTAs guided by the following observations: many words not in $V$ are made up of smaller and typically more frequent elements that determine their meaning (e.g., they are derivatives such as undesirable); many of these elements are in $V$ .<sup>2</sup> By recursively searching for the longest substrings, we hope to recover the most important meaningful
|
| 59 |
+
|
| 60 |
+
<table><tr><td>Model</td><td>Tokenization</td><td>C</td><td>R</td><td>M</td></tr><tr><td>BERT</td><td>FIRST</td><td>.869</td><td>.817</td><td>.664</td></tr><tr><td>BERT</td><td>LONGEST</td><td>.865</td><td>.797</td><td>.664</td></tr><tr><td>BERT</td><td>FLOTA</td><td>.990</td><td>.876</td><td>.896</td></tr><tr><td>GPT-2</td><td>FIRST</td><td>.878</td><td>.674</td><td>.625</td></tr><tr><td>GPT-2</td><td>LONGEST</td><td>.874</td><td>.674</td><td>.625</td></tr><tr><td>GPT-2</td><td>FLOTA</td><td>.988</td><td>.845</td><td>.861</td></tr><tr><td>XLNet</td><td>FIRST</td><td>.886</td><td>.820</td><td>.724</td></tr><tr><td>XLNet</td><td>LONGEST</td><td>.902</td><td>.845</td><td>.756</td></tr><tr><td>XLNet</td><td>FLOTA</td><td>.992</td><td>.900</td><td>.922</td></tr></table>
|
| 61 |
+
|
| 62 |
+
Table 1: Morphological quality. $\overline{C}$ : morphological coverage ( $k = 2$ ); $\overline{R}$ : stem recall; $\overline{M}$ : full match.
|
| 63 |
+
|
| 64 |
+
elements. This is also why it makes sense to stop after $k$ recursions: if FLOTA returns the most important meaningful elements as the first few tokens, we expect to not lose much by stopping.
|
| 65 |
+
|
| 66 |
+
# 3 Evaluation on Gold Segmentations
|
| 67 |
+
|
| 68 |
+
English inflection is simple, but the language has highly complex word formation, i.e., derivation and compounding (Cotterell et al., 2017; Pierrehumbert and Granell, 2018). To evaluate the morphological quality of FLOTAs against the standard tokenizers, we thus focus on derivatives and compounds.
|
| 69 |
+
|
| 70 |
+
Data. Our evaluation uses CELEX (Baayen et al., 1995) and LADEC (Gagné et al., 2019), two large datasets of human-annotated gold segmentations of morphologically complex words. We merge both datasets and extract all words consisting of a prefix and a stem (prefix derivatives), a stem and a suffix (suffix derivatives), or two stems (compounds). We create for each PLM a subset of words where both morphological elements (i.e., stems and affixes) are in the tokenizer vocabulary, but the word itself is not in the tokenizer vocabulary. In such cases, a word needs to be segmented, and it is guaranteed that the gold segmentation is possible given the tokenizer vocabulary. This procedure results in 11,272, 11,253, 10,848 words for BERT, GPT-2, XLNet, respectively.
|
| 71 |
+
|
| 72 |
+
Experimental Setup. We define three metrics to analyze how closely FLOTA matches the gold segmentations. We compare against two alternative tokenization strategies: representing words as the $k$ first tokens returned by the standard tokenizer (FIRST) and representing words as the $k$ longest tokens returned by the standard tokenizer (LONGEST). Recall that the WordPiece tokenization of the running example undesirable is und, es, ira, ble. With $k = 3$ , FIRST is und, es, ira (i.e., it simply returns the first $k$ tokens) and LONGEST is und, ira, ble (i.e., it returns the $k$
|
| 73 |
+
|
| 74 |
+

|
| 75 |
+
Figure 2: Morphological coverage for varying $k$ .
|
| 76 |
+
|
| 77 |
+
longest tokens in the order in which they occur in the standard tokenization).
|
| 78 |
+
|
| 79 |
+
Morphological coverage. We analyze what proportion of morphological elements is covered by each tokenization strategy for varying $k$ , a measure that we call morphological coverage, $C$ . For undesirable and $k = 3$ , FIRST and LONGEST contain un ( $C = 0.5$ ) while FLOTA contains both un and desirable ( $C = 1$ ). We compute the mean morphological coverage across all words, $\overline{C}$ .
|
| 80 |
+
|
| 81 |
+
We find that for all three tokenizers, FLOTA already covers about $99\%$ of the morphological elements with just $k = 2$ , a value that FIRST and LONGEST only reach with $k = 4$ (Table 1, Figure 2), indicating that FLOTA needs considerably fewer tokens than the standard tokenization to convey the same amount of semantic and syntactic information. This can also be seen by examining the average number of tokens needed to fully tokenize a word (i.e., $k = \infty$ ), with the values for FLOTA (BERT: 2.02; GPT-2: 2.03; XLNet: 2.02) being lower than the values for the standard tokenization (BERT: 2.30; GPT-2: 2.23; XLNet: 2.26). The pairwise differences are statistically significant $(p < 0.001)$ as shown by two-tailed $t$ -tests.
|
| 82 |
+
|
| 83 |
+
Stem recall. Given its relevance for the overall lexical meaning of a word, we are interested in how often FLOTA returns the stem at $k = 1$ . We test this using a measure that we call stem recall, $R$ ( $R = 1$ if the token is the stem, $^3$ otherwise $R = 0$ ), and compute the mean stem recall $\overline{R}$ across all words. We again compare with FIRST and LONGEST. Notice the stem according to the gold segmentation is longer than the second morphological element in $97\%$ of the examined complex words, which means that LONGEST provides a close estimate of how often the full standard tokenization contains the stem (since any other element in the full standard tokenization is shorter and hence very unlikely to be the stem).
|
| 84 |
+
|
| 85 |
+
FLOTA returns the stem considerably more often than either FIRST or LONGEST, but there are clear differences between the models (Table 1): for GPT-2, FLOTA increases $\overline{R}$ by more than $15\%$ while the difference amounts to $5\%$ for XLNet.
|
| 86 |
+
|
| 87 |
+
Full match. Extending the evaluation of stem recall, we examine whether the tokenization at $k = 2$ is identical to the gold segmentation (which always has two elements) using a measure that we call full match, $M$ ( $M = 1$ if the tokenization exactly matches the gold segmentation, otherwise $M = 0$ ). We again compute the mean value $\overline{M}$ across all words. Here, the values for both FIRST and LONGEST are identical to the performance of the full standard tokenization: for the full standard tokenization to exactly match a segmentation of two elements, it must consist of two tokens, and hence it is necessarily equal to both its first two tokens and its longest two tokens. Table 1 shows that FLOTA substantially improves $\overline{M}$ .
|
| 88 |
+
|
| 89 |
+
The evaluation on gold segmentations indicates that FLOTA increases the morphological quality of PLM tokenizers compared to the standard tokenization and simple alternatives. We also find underlying differences in the morphological quality of the tokenizers, with BPE and Unigram lying at the negative and positive extremes, in line with prior work (Bostrom and Durrett, 2020). Our analysis shows that WordPiece lies in between.
|
| 90 |
+
|
| 91 |
+
# 4 Evaluation on Downstream Task
|
| 92 |
+
|
| 93 |
+
We investigate whether the enhanced quality of FLOT tokenizations translates to performance on downstream tasks. We focus on text classification as one of the most common tasks in NLP.
|
| 94 |
+
|
| 95 |
+
Data. We create two text classification challenge sets based on ArXiv, each consisting of three datasets. Specifically, for the subject areas of computer science, maths, and physics, we extract titles for the 20 most frequent subareas (e.g., Computation and Language). We then sample 100/1,000 titles per subarea, resulting in three text classification datasets of 2,000/20,000 titles each, which we bundle together as ArXiv-S/L. Our sampling
|
| 96 |
+
|
| 97 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">ArXiv-S</td><td colspan="2">ArXiv-L</td></tr><tr><td>Dev</td><td>Test</td><td>Dev</td><td>Test</td></tr><tr><td>BERT</td><td>.469</td><td>.470</td><td>.674</td><td>.659</td></tr><tr><td>+FLOTA</td><td>.491</td><td>.485</td><td>.675</td><td>.661</td></tr><tr><td>GPT-2</td><td>.329</td><td>.324</td><td>.526</td><td>.507</td></tr><tr><td>+FLOTA</td><td>.353</td><td>.382</td><td>.558</td><td>.542</td></tr><tr><td>XLNet</td><td>.435</td><td>.454</td><td>.660</td><td>.641</td></tr><tr><td>+FLOTA</td><td>.446</td><td>.428</td><td>.664</td><td>.646</td></tr></table>
|
| 98 |
+
|
| 99 |
+
ensures that ArXiv-S/L require challenging generalization from a small number of short training examples with highly complex language. See Appendix A.1 for more details.
|
| 100 |
+
|
| 101 |
+
Experimental Setup. We split the six datasets of ArXiv-S and ArXiv-L into $60\%$ train, $20\%$ dev, and $20\%$ test. We then train the three PLMs with classification heads on the six train splits, once with the standard tokenizers and once with FLOTA. See Appendix A.2 for hyperparameters. For FLOTA, we treat $k$ as an additional tunable hyperparameter. We use F1 as the evaluation metric.
|
| 102 |
+
|
| 103 |
+
Performance. The FLOTAs models perform better than the models with standard tokenization, albeit to varying degrees for the three PLMs (Table 2). The difference is most pronounced for GPT-2, with FLOTAs resulting in large performance gains of up to $5\%$ . In addition, GPT-2 performs worse than the other two PLMs on all datasets, suggesting that BPE is generally not a good fit for complex language. BERT also clearly benefits from using FLOTAs, particularly on ArXiv-S. Out of the three considered PLMs, XLNet obtains the smallest performance gain from using FLOTAs, but it still benefits in the majority of cases.
|
| 104 |
+
|
| 105 |
+
The advantage of FLOTA mirrors the differences observed in the morphological analysis, indicating that FLOTA helps close the morphological quality gap between standard tokenizations and gold segmentations. Where the gap is large, gains due to FLOTA are large (GPT-2/BPE); where it is small, gains due to FLOTA are small (XLNet/Unigram). BERT/WordPiece again lies in between.
|
| 106 |
+
|
| 107 |
+
Impact of $k$ . To test how the performance varies with $k$ , we focus on BERT and compare the FLOTA models for $k \in \{1,2,3,4\}$ with the two alternatives FIRST and LONGEST from Section 3. See Appendix A.4 for hyperparameters.
|
| 108 |
+
|
| 109 |
+
Figure 3 shows that FLOTA only drops slightly as we decrease $k$ , with the minimum F1 at $k = 1$
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
Figure 3: FLOTA is less impaired by smaller values of $k$ (maximum number of tokens per word) than FIRST/LONGEST. Results are averaged F1 of BERT on ArXiv-S (dev/test merged).
|
| 113 |
+
|
| 114 |
+
Table 2: Performance. FLOTA leads to gains in averaged F1, particularly for BERT and GPT-2. Performance breakdowns for the individual datasets forming ArXiv-S/L are provided in Appendix A.3.
|
| 115 |
+
|
| 116 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">ST</td><td colspan="4">FLOTA</td></tr><tr><td>k=1</td><td>k=2</td><td>k=3</td><td>k=4</td></tr><tr><td>BERT</td><td>12.9</td><td>8.3</td><td>10.5</td><td>11.4</td><td>11.6</td></tr><tr><td>GPT-2</td><td>12.9</td><td>8.3</td><td>10.7</td><td>11.5</td><td>11.8</td></tr><tr><td>XLNet</td><td>13.6</td><td>8.3</td><td>10.9</td><td>11.9</td><td>12.2</td></tr></table>
|
| 117 |
+
|
| 118 |
+
Table 3: Average sequence length of titles (ArXiv-L, physics). ST: standard tokenization.
|
| 119 |
+
|
| 120 |
+
(43.6%) lying less than 2% below the maximum F1 at $k = 3$ (45.4%). In contrast, FIRST and LONGEST drop substantially as we decrease $k$ ; for FIRST, the minimum F1 at $k = 1$ (38.2%) lies more than 6% below the maximum F1 at $k = 4$ (44.8%). The fact that FLOTA is more effective at preserving performance while reducing the number of tokens aligns with the observation that it covers a larger number of morphemes and hence more semantic and syntactic content than FIRST and LONGEST for small $k$ (Section 3).
|
| 121 |
+
|
| 122 |
+
Efficiency. FLOTAs allow to reduce the number of tokens used to tokenize text by varying $k$ . Since the attention mechanism scales quadratically with sequence length (Peng et al., 2021), this has beneficial effects on the computational cost involved with employing a model trained using FLOTAs. We empirically find that even for $k = 4$ (the largest value used in the experiments), token sequences generated by FLOTAs are on average shorter than the token sequences generated by the standard tokenizations. Table 3 shows for one dataset (ArXiv-L, physics) the average sequence length of titles encoded with the standard tokenization versus FLOTAs with varying $k \in \{1,2,3,4\}$ for the three PLMs.
|
| 123 |
+
|
| 124 |
+
Robustness. To examine robustness against noise, a well-known problem for PLMs (Pruthi et al., 2019), we focus on missing whitespace between words (Soni et al., 2019). We randomly drop the whitespace between two adjacent words with
|
| 125 |
+
|
| 126 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">ArXiv-S (N)</td><td colspan="2">ArXiv-L (N)</td></tr><tr><td>Dev</td><td>Test</td><td>Dev</td><td>Test</td></tr><tr><td>BERT</td><td>.428</td><td>.412</td><td>.579</td><td>.554</td></tr><tr><td>+FLOTA</td><td>.486</td><td>.447</td><td>.652</td><td>.632</td></tr><tr><td>GPT-2</td><td>.313</td><td>.315</td><td>.481</td><td>.463</td></tr><tr><td>+FLOTA</td><td>.359</td><td>.357</td><td>.541</td><td>.518</td></tr><tr><td>XLNet</td><td>.392</td><td>.397</td><td>.609</td><td>.589</td></tr><tr><td>+FLOTA</td><td>.434</td><td>.421</td><td>.641</td><td>.623</td></tr></table>
|
| 127 |
+
|
| 128 |
+
Table 4: Performance with noise (N). FLOTA clearly increases F1 on ArXiv-S/L for all PLMs when input is noisy. See Appendix A.5 for hyperparameters. Performance breakdowns for the individual datasets forming ArXiv-S/L are provided in Appendix A.6.
|
| 129 |
+
|
| 130 |
+
probability $p = 0.3$ in ArXiv-S/L. We use unseen noise, i.e., we only inject noise during evaluation, not training, which is the more realistic and challenging scenario (Xue et al., 2021).
|
| 131 |
+
|
| 132 |
+
The results show that synthetic noise increases the performance gap between FLOTAs and standard tokenization (Table 4). While there is a drop in performance for all models compared to the experiments without noise, the drop is much more pronounced for standard tokenization; e.g., BERT's performance on ArXiv-L (test) drops by $3\%$ with FLOTAs, but by $10\%$ without it.
|
| 133 |
+
|
| 134 |
+
# 5 Limitations
|
| 135 |
+
|
| 136 |
+
While we find FLOTA to work well on text classification, there are tasks for which FLOTA might prove a less suitable tokenization method: e.g., for small values of $k$ , FLOTA often discards suffixes, which can be important for tasks with a syntactic component such as POS tagging.
|
| 137 |
+
|
| 138 |
+
Similar considerations hold for transfer to languages other than English: e.g., in the case of languages with a non-linear morphology such as Arabic, FLOTA is expected to inherit the insufficiencies of the underlying tokenizer (Alkaoud and Syed, 2020; Antoun et al., 2020).
|
| 139 |
+
|
| 140 |
+
# 6 Related Work
|
| 141 |
+
|
| 142 |
+
The question how PLMs are affected by their tokenizer has attracted growing interest recently. Bostrom and Durrett (2020), Church (2020), Klein and Tsarfaty (2020), and Hofmann et al. (2021) focus on the linguistic properties of tokenizers. We contribute to this line of work by conducting the first comparative analysis of all three common PLM tokenizers and releasing a challenge set as a benchmark for future studies. Another strand of research has sought to improve PLM tokenizers by
|
| 143 |
+
|
| 144 |
+
training models from scratch (Clark et al., 2021; Si et al., 2021; Xue et al., 2021; Zhang et al., 2021) or modifying the tokenizer during finetuning, mostly by adding tokens and corresponding embeddings (Chau et al., 2020; Tan et al., 2020; Hong et al., 2021; Sachidananda et al., 2021). FLOTA crucially differs in that it can be used during finetuning but does not add any parameters to the PLM. Furthermore, there has been work improving tokenization by variously exploiting the probabilistic nature of tokenizers (Kudo, 2018; Provilkov et al., 2020; Cao and Rimell, 2021). By contrast, our method does not need access to the underlying model.
|
| 145 |
+
|
| 146 |
+
Our study also relates to computational work on derivational morphology (Cotterell et al., 2017; Vylomova et al., 2017; Cotterell and Schütze, 2018; Deutsch et al., 2018; Hofmann et al., 2020a,b,c) and word segmentation (Cotterell et al., 2016; Kann et al., 2016; Ruzsics and Samardžić, 2017; Mager et al., 2019, 2020; Seker and Tsarfaty, 2020; Amrhein and Sennrich, 2021). We are the first to systematically evaluate the segmentations of PLM tokenizers on human-annotated gold data.
|
| 147 |
+
|
| 148 |
+
Conceptually, the findings of our study are in line with evidence from the cognitive sciences that knowledge of a longer (i.e., more detailed and informative) sequence takes priority over any knowledge about smaller sequences (Caramazza et al., 1988; Laudanna and Burani, 1995; Baayen et al., 1997; Needle and Pierrehumbert, 2018).
|
| 149 |
+
|
| 150 |
+
# 7 Conclusion
|
| 151 |
+
|
| 152 |
+
We introduce FLOTA (Few Longest Token Approximation), a simple yet effective method to improve the tokenization of pretrained language models (PLMs). FLOTA uses the vocabulary of a standard tokenizer but tries to preserve the morphological structure of words during tokenization. FLOTA leads to performance gains, makes inference more efficient, and substantially enhances the robustness of PLMs with respect to whitespace noise.
|
| 153 |
+
|
| 154 |
+
# Acknowledgements
|
| 155 |
+
|
| 156 |
+
This work was funded by the European Research Council (#740516) and the Engineering and Physical Sciences Research Council (EP/T023333/1). The first author was also supported by the German Academic Scholarship Foundation and the Arts and Humanities Research Council. We thank the reviewers for their helpful comments.
|
| 157 |
+
|
| 158 |
+
# Ethical Considerations
|
| 159 |
+
|
| 160 |
+
FLOTAs shortens the average length of sequences processed by PLMs, thus reducing their energy requirements, a desirable property given their otherwise detrimental environmental footprint (Schwartz et al., 2019; Strubell et al., 2019).
|
| 161 |
+
|
| 162 |
+
# References
|
| 163 |
+
|
| 164 |
+
Mohamed Alkaoud and Mairaj Syed. 2020. On the importance of tokenization in Arabic embedding models. In Arabic Natural Language Processing Workshop (WANLP) 5.
|
| 165 |
+
Chantal Amrhein and Rico Sennrich. 2021. How suitable are subword segmentation strategies for translating non-concatenative morphology? In *Findings of the Association for Computational Linguistics: EMNLP* 2021.
|
| 166 |
+
Wissam Antoun, Fady Baly, and Hazem Hajj. 2020. AraBERT: Transformer-based model for Arabic language understanding. In Workshop on Open-Source Arabic Corpora and Processing Tools (OSACT).
|
| 167 |
+
R. Harald Baayen, Ton Dijkstra, and Robert Schreuder. 1997. Singulars and plurals in Dutch: Evidence for a parallel dual-route model. Journal of Memory and Language, 37:94-117.
|
| 168 |
+
R. Harald Baayen, Richard Piepenbrock, and Leon Gulikers. 1995. The CELEX lexical database (CD-ROM). Linguistic Data Consortium, Philadelphia, PA.
|
| 169 |
+
Kaj Bostrom and Greg Durrett. 2020. Byte pair encoding is suboptimal for language model pretraining. In *Findings of the Association for Computational Linguistics: EMNLP* 2020.
|
| 170 |
+
Kris Cao and Laura Rimell. 2021. You should evaluate your language model on marginal likelihood over tokenisations. In Conference on Empirical Methods in Natural Language Processing (EMNLP) 2021.
|
| 171 |
+
Alfonso Caramazza, Alessandro Laudanna, and Cristina Romani. 1988. Lexical access and inflectional morphology. Cognition, 28(297-332).
|
| 172 |
+
Ethan C. Chau, Lucy H. Lin, and Noah A. Smith. 2020. Parsing with multilingual BERT, a small corpus, and a small treebank. In *Findings of the Association for Computational Linguistics: EMNLP* 2020.
|
| 173 |
+
Kenneth Church. 2020. Emerging trends: Subwords, seriously? Natural Language Engineering, 26(3):375-382.
|
| 174 |
+
Jonathan H. Clark, Dan Garrette, Iulia Turc, and John Wieting. 2021. CANINE: Pre-training an efficient tokenization-free encoder for language representation. In arXiv 2103.06874.
|
| 175 |
+
|
| 176 |
+
Ryan Cotterell and Hinrich Schütze. 2018. Joint semantic synthesis and morphological analysis of the derived word. Transactions of the Association for Computational Linguistics, 6:33-48.
|
| 177 |
+
Ryan Cotterell, Tim Vieira, and Hinrich Schütze. 2016. A joint model of orthography and morphological segmentation. In Annual Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL HLT) 2016.
|
| 178 |
+
Ryan Cotterell, Ekaterina Vylomova, Huda Khayral-lah, Christo Kirov, and David Yarowsky. 2017. Paradigm completion for derivational morphology. In Conference on Empirical Methods in Natural Language Processing (EMNLP) 2017.
|
| 179 |
+
David Crystal. 1997. The Cambridge encyclopedia of the English language. Cambridge University Press, Cambridge, UK.
|
| 180 |
+
Daniel Deutsch, John Hewitt, and Dan Roth. 2018. A distributional and orthographic aggregation model for English derivational morphology. In Annual Meeting of the Association for Computational Linguistics (ACL) 56.
|
| 181 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Annual Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL HTL) 2019.
|
| 182 |
+
Philip Gage. 1994. A new algorithm for data compression. The C Users Journal, 12(2):23-38.
|
| 183 |
+
Christina L. Gagné, Thomas L. Spalding, and Daniel Schmidtke. 2019. LADEC: The large database of English compounds. Behavior Research Methods, 51(5):2152-2179.
|
| 184 |
+
Valentin Hofmann, Janet B. Pierrehumbert, and Hinrich Schütze. 2020a. DagoBERT: Generating derivational morphology with a pretrained language model. In Conference on Empirical Methods in Natural Language Processing (EMNLP) 2020.
|
| 185 |
+
Valentin Hofmann, Janet B. Pierrehumbert, and Hinrich Schütze. 2020b. Predicting the growth of morphological families from social and linguistic factors. In Annual Meeting of the Association for Computational Linguistics (ACL) 58.
|
| 186 |
+
Valentin Hofmann, Janet B. Pierrehumbert, and Hinrich Schütze. 2021. Superbizarre is not superb: Improving BERT's interpretations of complex words with derivational morphology. In Annual Meeting of the Association for Computational Linguistics (ACL) 59.
|
| 187 |
+
Valentin Hofmann, Hinrich Schütze, and Janet B. Pierrehumbert. 2020c. A graph auto-encoder model of derivational morphology. In Annual Meeting of
|
| 188 |
+
|
| 189 |
+
the Association for Computational Linguistics (ACL) 58.
|
| 190 |
+
Jimin Hong, Taehee Kim, Hyesu Lim, and Jaegul Choo. 2021. AVocaDo: Strategy for adapting vocabulary to downstream domain. In Conference on Empirical Methods in Natural Language Processing (EMNLP) 2021.
|
| 191 |
+
Katharina Kann, Ryan Cotterell, and Hinrich Schütze. 2016. Neural morphological analysis: Encoding-decoding canonical segments. In Conference on Empirical Methods in Natural Language Processing (EMNLP) 2016.
|
| 192 |
+
Diederik P. Kingma and Jimmy L. Ba. 2015. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR) 3.
|
| 193 |
+
Stav Klein and Reut Tsarfaty. 2020. Getting the ##life out of living: How adequate are word-pieces for modelling complex morphology? In Workshop on Computational Research in Phonetics, Phonology, and Morphology (SIGMORPHON) 17.
|
| 194 |
+
Taku Kudo. 2018. Subword regularization: Improving neural network translation models with multiple subword candidates. In Annual Meeting of the Association for Computational Linguistics (ACL) 56.
|
| 195 |
+
Alessandro Laudanna and Cristina Burani. 1995. Distributional properties of derivational affixes: Implications for processing. In Laurie B. Feldman, editor, Morphological aspects of language processing, pages 345-364. Lawrence Erlbaum, Hillsdale, NJ.
|
| 196 |
+
Manuel Mager, Özlem Çetinoglu, and Katharina Kann. 2019. Subword-level language identification for intra-word code-switching. In Annual Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL HTL) 2019.
|
| 197 |
+
Manuel Mager, Özlem Çetinoglu, and Katharina Kann. 2020. Tackling the low-resource challenge for canonical segmentation. In Conference on Empirical Methods in Natural Language Processing (EMNLP) 2020.
|
| 198 |
+
Jeremy M. Needle and Janet B. Pierrehumbert. 2018. Gendered associations of english morphology. Journal of the Association for Laboratory Phonology, 9(1):119.
|
| 199 |
+
Hao Peng, Jungo Kasai, Nikolaos Pappas, Dani Yogatama, Zhaofeng Wu, Lingpeng Kong, Roy Schwartz, and Noah A. Smith. 2021. ABC: Attention with bounded-memory control. In arXiv 2110.02488.
|
| 200 |
+
Janet B. Pierrehumbert and Ramon Granell. 2018. On hapax legomena and morphological productivity. In Workshop on Computational Research in Phonetics, Phonology, and Morphology (SIGMORPHON) 15.
|
| 201 |
+
|
| 202 |
+
Ivan Provilkov, Dmitrii Emelianenko, and Elena Voita. 2020. BPE-dropout: Simple and effective subword regularization. In Annual Meeting of the Association for Computational Linguistics (ACL) 58.
|
| 203 |
+
Danish Pruthi, Bhuwan Dhingra, and Zachary C. Lipton. 2019. Combating adversarial misspellings with robust word recognition. In Annual Meeting of the Association for Computational Linguistics (ACL) 57.
|
| 204 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners.
|
| 205 |
+
Tatyana Ruzsics and Tanja Samardžić. 2017. Neural sequence-to-sequence learning of internal word structure. In Conference on Computational Natural Language Learning (CoNLL) 21.
|
| 206 |
+
Vin Sachidananda, Jason S. Kessler, and Yi-An Lai. 2021. Efficient domain adaptation of language models via adaptive tokenization. In Workshop on Simple and Efficient Natural Language Processing (SustainLNP) 2.
|
| 207 |
+
Mike Schuster and Kaisuke Nakajima. 2012. Japanese and Korean voice search. In International Conference on Acoustics, Speech, and Signal Processing (ICASSP) 37.
|
| 208 |
+
Roy Schwartz, Jesse Dodge, Noah A. Smith, and Oren Etzioni. 2019. Green AI. In arXiv 1907.10597.
|
| 209 |
+
Amit Seker and Reut Tsarfaty. 2020. A pointer network architecture for joint morphological segmentation and tagging. In Findings of the Association for Computational Linguistics: EMNLP 2020.
|
| 210 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Annual Meeting of the Association for Computational Linguistics (ACL) 54.
|
| 211 |
+
Chenglei Si, Zhengyan Zhang, Yingfa Chen, Fanchao Qi, Xiaozhi Wang, Zhiyuan Liu, and Maosong Sun. 2021. SHUOWEN-JIEZI: Linguistically informed tokenizers for Chinese language model pretraining. In arXiv 2106.00400.
|
| 212 |
+
Sandeep Soni, Lauren F. Klein, and Jacob Eisenstein. 2019. Correcting whitespace errors in digitized historical texts. In Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humanities and Literature 3.
|
| 213 |
+
Emma Strubell, Ananya Ganesh, and Andrew McCallum. 2019. Energy and policy considerations for deep learning in NLP. In Annual Meeting of the Association for Computational Linguistics (ACL) 57.
|
| 214 |
+
Samson Tan, Shafiq Joty, Lav R. Varshney, and MinYen Kan. 2020. Mind your inflections! Improving NLP for non-standard Englishes with base-inflection encoding. In Conference on Empirical Methods in Natural Language Processing (EMNLP) 2020.
|
| 215 |
+
|
| 216 |
+
Ekaterina Vylomova, Ryan Cotterell, Timothy Baldwin, and Trevor Cohn. 2017. Context-aware prediction of derivational word-forms. In *Conference of the European Chapter of the Association for Computational Linguistics (EACL)* 15.
|
| 217 |
+
Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc Le V, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, Jeff Klingner, Apurva Shah, Melvin Johnson, Xiaobing Liu, Lukasz Kaiser, Stephan Gouws, Yoshikiyo Kato, Taku Kudo, Hideto Kazawa, Keith Stevens, George Kurian, Nishant Patil, Wei Wang, Cliff Young, Jason Smith, Jason Riesa, Alex Rudnick, Oriol Vinyals, Greg Corrado, Macduff Hughes, and Jeffrey Dean. 2016. Google's neural machine translation system: Bridging the gap between human and machine translation. In arXiv 1609.08144.
|
| 218 |
+
Linting Xue, Aditya Barua, Noah Constant, Rami Al-Rfou, Sharan Narang, Mihir Kale, Adam Roberts, and Colin Raffel. 2021. ByT5: Towards a token-free future with pre-trained byte-to-byte models. In arXiv 2105.13626.
|
| 219 |
+
Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V. Le. 2019. XLNet: Generalized autoregressive pretraining for language understanding. In Advances in Neural Information Processing Systems (NeurIPS) 33.
|
| 220 |
+
Xinsong Zhang, Pengshuai Li, and Hang Li. 2021. AMBERT: A pre-trained language model with multi-grained tokenization. In *Findings of the Association for Computational Linguistics: ACL* 2021.
|
| 221 |
+
|
| 222 |
+
# A Appendix
|
| 223 |
+
|
| 224 |
+
# A.1 Preprocessing
|
| 225 |
+
|
| 226 |
+
We exclude texts written in a language other than English and lowercase all words. We exclude titles with less than three and more than ten words. For each title, we compute the proportion of words starting with a productive prefix from the list provided by Crystal (1997). During sampling, we then weight titles by this proportion in order to make the language contained within the datasets as complex and challenging as possible.
|
| 227 |
+
|
| 228 |
+
# A.2 Hyperparameters
|
| 229 |
+
|
| 230 |
+
The vocabulary size is 28,996 for BERT, 50,257 for GPT-2, and 32,000 for XLNet. The number of trainable parameters is 109,497,620 for BERT, 124,455,168 for GPT-2, and 117,324,308 for XLNet. The classification head for all three models uses softmax as the activation function.
|
| 231 |
+
|
| 232 |
+
We use a batch size of 64 and perform grid search for the number of epochs $n \in \{1, \ldots, 20\}$ and the learning rate
|
| 233 |
+
|
| 234 |
+
$l \in \{1 \times 10^{-5}, 3 \times 10^{-5}, 1 \times 10^{-4}\}$ (selection criterion: F1). We tune $l$ on ArXiv-L (physics) and use the best configuration on all datasets. For the FLOTA models, we additionally tune $k \in \{1, 2, 3, 4\}$ (selection criterion: F1). Models are trained with categorical cross-entropy as the loss function and Adam (Kingma and Ba, 2015) as the optimizer. Experiments are performed on a GeForce GTX 1080 Ti GPU (11GB).
|
| 235 |
+
|
| 236 |
+
# A.3 Performance
|
| 237 |
+
|
| 238 |
+
Table 5 provides breakdowns of the performance for the individual datasets forming ArXiv-S/L.
|
| 239 |
+
|
| 240 |
+
# A.4 Hyperparameters
|
| 241 |
+
|
| 242 |
+
All hyperparameters are as for the main experiment (see Appendix A.2). For the learning rate, we use the best configuration from the main experiment. For FIRST and LONGEST, we tune $k \in \{1, 2, 3, 4\}$ (selection criterion: F1), identically to FLOTAs in the main experiment.
|
| 243 |
+
|
| 244 |
+
# A.5 Hyperparameters
|
| 245 |
+
|
| 246 |
+
All hyperparameters are as for the main experiment (see Appendix A.2). For the learning rate, we use the best configuration from the main experiment.
|
| 247 |
+
|
| 248 |
+
# A.6 Performance
|
| 249 |
+
|
| 250 |
+
Table 6 provides breakdowns of the performance for the individual datasets forming ArXiv-S/L.
|
| 251 |
+
|
| 252 |
+
<table><tr><td rowspan="3">Model</td><td colspan="6">ArXiv-S</td><td colspan="6">ArXiv-L</td></tr><tr><td colspan="3">Dev</td><td colspan="3">Test</td><td colspan="3">Dev</td><td colspan="3">Test</td></tr><tr><td>CS</td><td>MATH</td><td>PHYS</td><td>CS</td><td>MATH</td><td>PHYS</td><td>CS</td><td>MATH</td><td>PHYS</td><td>CS</td><td>MATH</td><td>PHYS</td></tr><tr><td>BERT</td><td>.546</td><td>.358</td><td>.502</td><td>.498</td><td>.407</td><td>.504</td><td>.682</td><td>.660</td><td>.679</td><td>.649</td><td>.653</td><td>.675</td></tr><tr><td>+FLOTA</td><td>.546</td><td>.414</td><td>.514</td><td>.483</td><td>.404</td><td>.567</td><td>.677</td><td>.663</td><td>.686</td><td>.652</td><td>.658</td><td>.672</td></tr><tr><td>GPT-2</td><td>.354</td><td>.281</td><td>.353</td><td>.316</td><td>.261</td><td>.395</td><td>.493</td><td>.506</td><td>.578</td><td>.465</td><td>.498</td><td>.559</td></tr><tr><td>+FLOTA</td><td>.348</td><td>.313</td><td>.398</td><td>.370</td><td>.323</td><td>.454</td><td>.520</td><td>.549</td><td>.603</td><td>.498</td><td>.540</td><td>.587</td></tr><tr><td>XLNet</td><td>.473</td><td>.357</td><td>.476</td><td>.489</td><td>.358</td><td>.515</td><td>.654</td><td>.643</td><td>.684</td><td>.627</td><td>.642</td><td>.655</td></tr><tr><td>+FLOTA</td><td>.450</td><td>.402</td><td>.486</td><td>.415</td><td>.346</td><td>.522</td><td>.660</td><td>.651</td><td>.681</td><td>.633</td><td>.641</td><td>.665</td></tr></table>
|
| 253 |
+
|
| 254 |
+
Table 5: Performance (F1). CS: computer science; MATH: mathematics; PHYS: physics.
|
| 255 |
+
|
| 256 |
+
<table><tr><td rowspan="3">Model</td><td colspan="6">ArXiv-S (N)</td><td colspan="6">ArXiv-L (N)</td></tr><tr><td colspan="3">Dev</td><td colspan="3">Test</td><td colspan="3">Dev</td><td colspan="3">Test</td></tr><tr><td>CS</td><td>MATH</td><td>PHYS</td><td>CS</td><td>MATH</td><td>PHYS</td><td>CS</td><td>MATH</td><td>PHYS</td><td>CS</td><td>MATH</td><td>PHYS</td></tr><tr><td>BERT</td><td>.479</td><td>.333</td><td>.470</td><td>.566</td><td>.566</td><td>.605</td><td>.417</td><td>.338</td><td>.481</td><td>.531</td><td>.544</td><td>.588</td></tr><tr><td>+FLOTA</td><td>.548</td><td>.400</td><td>.511</td><td>.652</td><td>.640</td><td>.664</td><td>.452</td><td>.372</td><td>.518</td><td>.631</td><td>.620</td><td>.644</td></tr><tr><td>GPT-2</td><td>.336</td><td>.261</td><td>.342</td><td>.452</td><td>.461</td><td>.530</td><td>.326</td><td>.252</td><td>.366</td><td>.423</td><td>.454</td><td>.511</td></tr><tr><td>+FLOTA</td><td>.358</td><td>.316</td><td>.402</td><td>.514</td><td>.527</td><td>.582</td><td>.370</td><td>.296</td><td>.405</td><td>.481</td><td>.511</td><td>.562</td></tr><tr><td>XLNet</td><td>.431</td><td>.311</td><td>.433</td><td>.607</td><td>.594</td><td>.625</td><td>.470</td><td>.300</td><td>.421</td><td>.587</td><td>.576</td><td>.605</td></tr><tr><td>+FLOTA</td><td>.432</td><td>.398</td><td>.474</td><td>.646</td><td>.623</td><td>.655</td><td>.435</td><td>.360</td><td>.466</td><td>.627</td><td>.612</td><td>.631</td></tr></table>
|
| 257 |
+
|
| 258 |
+
Table 6: Performance (F1) with noise (N). CS: computer science; MATH: mathematics; PHYS: physics.
|
anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4094d38165fac3be9e1ce2927c2ad97ec12ddfd863e268cc0e49da1d2433fbd3
|
| 3 |
+
size 181474
|
anembarrassinglysimplemethodtomitigateundesirablepropertiesofpretrainedlanguagemodeltokenizers/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8569f2ff37a207450e9c5381c2d0e85f818caee605729fb9521dab513e9ed26a
|
| 3 |
+
size 359045
|
areshortestrationalesthebestexplanationsforhumanunderstanding/722701f2-34ec-47c8-8c91-7cc24a512cde_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:515c6a88919b16db36bc7fb4f8821e31d3ba005304b726a3d1811421436986fb
|
| 3 |
+
size 71601
|
areshortestrationalesthebestexplanationsforhumanunderstanding/722701f2-34ec-47c8-8c91-7cc24a512cde_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:78fbd18b6f23a94c2aa52c85c73354400458d2e64f58e92aa456bb0d5d5384d8
|
| 3 |
+
size 81988
|
areshortestrationalesthebestexplanationsforhumanunderstanding/722701f2-34ec-47c8-8c91-7cc24a512cde_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59ec2efb135956209b6be4309ca313e7a341a0f97b5d5dbb509c29eac8d1ec08
|
| 3 |
+
size 1916503
|
areshortestrationalesthebestexplanationsforhumanunderstanding/full.md
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Are Shortest Rationales the Best Explanations for Human Understanding?
|
| 2 |
+
|
| 3 |
+
Hua Shen† Tongshuang Wu $\diamond$ Wenbo Guo† Ting-Hao 'Kenneth' Huang†
|
| 4 |
+
|
| 5 |
+
†College of Information Sciences and Technology, Pennsylvania State University
|
| 6 |
+
‡Paul G. Allen School of Computer Science and Engineering, University of Washington {huashen218, wzg13, txh710}@psu.edu wtshuang@cs.washington.edu
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
Existing self-explaining models typically favor extracting the shortest possible rationales — snippets of an input text "responsible for" corresponding output — to explain the model prediction, with the assumption that shorter rationales are more intuitive to humans. However, this assumption has yet to be validated. Is the shortest rationale indeed the most human-understandable? To answer this question, we design a self-explaining model, LIMTEDINK, which allows users to extract rationales at any target length. Compared to existing baselines, LIMTEDINK achieves compatible endtask performance and human-annotated rationale agreement, making it a suitable representation of the recent class of self-explaining models. We use LIMTEDINK to conduct a user study on the impact of rationale length, where we ask human judges to predict the sentiment label of documents based only on LIMTEDINK-generated rationales with different lengths. We show rationales that are too short do not help humans predict labels better than randomly masked text, suggesting the need for more careful design of the best human rationales. $^{1}$
|
| 11 |
+
|
| 12 |
+
# 1 Introduction
|
| 13 |
+
|
| 14 |
+
While neural networks have recently led to large improvements in NLP, most of the models make predictions in a black-box manner, making them indecipherable and untrustworthy to human users. In an attempt to faithfully explain model decisions to humans, various work has looked into extracting rationales from text inputs (Jain et al., 2020; Paranjape et al., 2020), with rationale defined as the "shortest yet sufficient subset of input to predict the same label" (Lei et al., 2016; Bastings et al., 2019). The underlying assumption is two-fold: (1) by retaining the label, we are extracting the texts used by predictors (Jain et al., 2020); and (2) short
|
| 15 |
+
|
| 16 |
+
<sup>1</sup>Find open-source code at: https://github.com/huashen218/LimitedInk.git
|
| 17 |
+
|
| 18 |
+

|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
(B) Contextual Rationale Generation
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
Figure 1: LIMITEDINK's rationale generation with length control: (A) control rationale generation with different lengths; (B) incorporating contextual information into rationale generation; (C) regularizing continuous rationale for human interpretability. Examples use the SST dataset for sentiment analysis (Socher et al., 2013).
|
| 27 |
+
|
| 28 |
+
rationales are more readable and intuitive for end-users, and thus preferred for human understanding (Vafa et al., 2021). Importantly, prior work has knowingly traded off some amount of model performance to achieve the shortest possible rationales. For example, when using less than $50\%$ of text as rationales for predictions, Paranjape et al. (2020) achieved an accuracy of $84.0\%$ (compared to $91.0\%$ if using the full text). However, the assumption that the shortest rationales have better human interpretability has not been validated by
|
| 29 |
+
|
| 30 |
+
human studies (Shen and Huang, 2021). Moreover, when the rationale is too short, the model has much higher chance of missing the main point in the full text. In Figure 1A, although the model can make the correct positive prediction when using only $20\%$ of the text, it relies on a particular adjective, "life-affirming," which is seemingly positive but does not reflect the author's sentiment. These rationales may be confusing when presented to end-users.
|
| 31 |
+
|
| 32 |
+
In this work, we ask: Are shortest rationales really the best for human understanding? To answer the question, we first design LIMITEDINK, a self-explaining model that flexibly extracts rationales at any target length (Figure 1A). LIMITEDINK allows us to control and compare rationales of varying lengths on input documents. Besides controls on rationale length, we also design LIMITEDINK's sampling process and objective function to be context-aware (i.e., rank words based on surrounding context rather than individually, Figure $1B_{2}$ ) and coherent (i.e., prioritize continuous phrases over discrete tokens, Figure $1C_{2}$ ). Compared to existing baselines (e.g., Sparse-IB), LIMITEDINK achieves compatible end-task performance and alignment with human annotations on the ERASER (DeYoung et al., 2020) benchmark, which means it can represent recent class of self-explaining models.
|
| 33 |
+
|
| 34 |
+
We use LIMITEDINK to conduct user studies to investigate the effect of rationale length on human understanding. Specifically, we ask MTurk participants to predict document sentiment polarities based on only LIMITEDINK-extracted rationales. By contrasting rationales at five different length levels, we find that shortest rationales are largely not the best for human understanding. In fact, humans do not perform better prediction accuracy and confidence better than using randomly masked texts when rationales are too short (e.g., $10\%$ of input texts). In summary, this work encourages a rethinking of self-explaining methods to find the right balance between brevity and sufficiency.
|
| 35 |
+
|
| 36 |
+
# 2 LIMITEDINK
|
| 37 |
+
|
| 38 |
+
# 2.1 Self-Explaining Model Definition
|
| 39 |
+
|
| 40 |
+
We start by describing typical self-explaining methods (Lei et al., 2016; Bastings et al., 2019; Paranjape et al., 2020). Consider a text classification dataset containing each document input as a tuple $(\mathbf{x},y)$ . Each input $\mathbf{x}$ includes $n$ features (e.g., sentences or tokens) as $\mathbf{x} = [x_1,x_2,\dots,x_n]$ , and $y$ is the prediction. The model typically consists
|
| 41 |
+
|
| 42 |
+
of an identifier $\mathbf{idn}(\cdot)$ to derive a boolean mask $\mathbf{m} = [m_1, m_2, \dots, m_n]$ , where $m_i \in \{1, 0\}$ indicates whether feature $x_i$ is in the rationale or not. Note that the mask $\mathbf{m}$ is typically a binary selection from the identifier's probability distribution, i.e., $\mathbf{m} \sim \mathbf{idn}(\mathbf{x})$ . Then it extracts rationales $\mathbf{z}$ by $\mathbf{z} = \mathbf{m} \odot \mathbf{x}$ , and further leverages a classifier $\mathbf{cls}(\cdot)$ to make a prediction $y$ based on the identified rationales as $y = \mathbf{cls}(\mathbf{z})$ . The optimization objective is:
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
\min _ {\theta_ {\mathrm {i d n}}, \theta_ {\mathrm {c l s}}} \underbrace {\mathbb {E} _ {\mathbf {z} \sim \mathbf {i d n} (\mathbf {x})} \mathcal {L} (\mathbf {c l s} (\mathbf {z}) , y)} _ {\text {s u f f i c i e n t p r e d i c t i o n}} + \underbrace {\lambda \Omega (\mathbf {m})} _ {\text {r e g u l a r i z a t i o n}} \tag {1}
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
where $\theta_{\mathrm{idn}}$ and $\theta_{\mathrm{cls}}$ are trainable parameters of identifier and classifier. $\Omega (\mathbf{m})$ is the regularization function on mask and $\lambda$ is the hyperparameter.
|
| 49 |
+
|
| 50 |
+
# 2.2 Generating Length Controllable Rationales with Contextual Information
|
| 51 |
+
|
| 52 |
+
We next elaborate on the definition and method of controlling rationale length in LIMTEDINK Assuming that the rationale length is $k$ as prior knowledge, we enforce the generated boolean mask to sum up to $k$ as $k = \sum_{i=1}^{n}(m_i)$ , where $\mathbf{m} = \mathbf{idn}(\mathbf{x},k)$ . Existing self-explaining methods commonly solve this by sampling from a Bernoulli distribution over input features, thus generating each mask element $m_i$ independently conditioned on each input feature $x_i$ (Paranjape et al., 2020). For example, in Figure $1B_1$ , "life affirming" is selected independent of the negation context "not" before it, which contradicts with the author's intention. However, these methods potentially neglect the contextual input information. We leverage the concrete relaxation of subset sampling technique (Chen et al., 2018) to incorporate contextual information into rationale generation process (see Figure $1B_2$ ), where we aim to select the top-k important features over all $n$ features in input $\mathbf{x}$ via Gumbel-Softmax Sampling (i.e., applying the Gumbel-softmax trick to approximate weighted subset sampling process). To further guarantee precise rationale length control, we deploy the vector and sort regularization on mask $\mathbf{m}$ (Fong et al., 2019). See more model details in Appendix A.1.
|
| 53 |
+
|
| 54 |
+
# 2.3 Regularizing Rationale Continuity
|
| 55 |
+
|
| 56 |
+
To further enforce coherent rationale for human interpretability, we employ the Fused Lasso to encourage continuity property (Jain et al., 2020; Bastings et al., 2019). The final mask regularization is:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\Omega (\mathbf {m}) = \lambda_ {1} \underbrace {\sum_ {i = 1} ^ {n} \left| m _ {i} - m _ {i - 1} \right|} _ {\text {C o n t i n u i t y}} + \lambda_ {2} \underbrace {\left\| \operatorname {v e c s o r t} (m) - \hat {m} \right\|} _ {\text {L e n g t h C o n t r o l}} \tag {2}
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
<table><tr><td rowspan="2">Method</td><td colspan="4">Movies</td><td colspan="4">BoolQ</td><td colspan="4">Evidence Inference</td><td colspan="4">MultiRC</td><td colspan="4">FEVER</td></tr><tr><td>Task</td><td>P</td><td>R</td><td>F1</td><td>Task</td><td>P</td><td>R</td><td>F1</td><td>Task</td><td>P</td><td>R</td><td>F1</td><td>Task</td><td>P</td><td>R</td><td>F1</td><td>Task</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>Full-Text</td><td>.91</td><td>-</td><td>-</td><td>-</td><td>.47</td><td>-</td><td>-</td><td>-</td><td>.48</td><td>-</td><td>-</td><td>-</td><td>.67</td><td>-</td><td>-</td><td>-</td><td>.89</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Sparse-N</td><td>.79</td><td>.18</td><td>.36</td><td>.24</td><td>.43</td><td>.12</td><td>.10</td><td>.11</td><td>.39</td><td>.02</td><td>.14</td><td>.03</td><td>.60</td><td>.14</td><td>.35</td><td>.20</td><td>.83</td><td>.35</td><td>.49</td><td>.41</td></tr><tr><td>Sparse-C</td><td>.82</td><td>.17</td><td>.36</td><td>.23</td><td>.44</td><td>.15</td><td>.11</td><td>.13</td><td>.41</td><td>.03</td><td>.15</td><td>.05</td><td>.62</td><td>.15</td><td>.41</td><td>.22</td><td>.83</td><td>.35</td><td>.52</td><td>.42</td></tr><tr><td>Sparse-IB</td><td>.84</td><td>.21</td><td>.42</td><td>.28</td><td>.46</td><td>.17</td><td>.15</td><td>.15</td><td>.43</td><td>.04</td><td>.21</td><td>.07</td><td>.62</td><td>.20</td><td>.33</td><td>.25</td><td>.85</td><td>.37</td><td>.50</td><td>.43</td></tr><tr><td>LIMITEDINK</td><td>.90</td><td>.26</td><td>.50</td><td>.34</td><td>.56</td><td>.13</td><td>.17</td><td>.15</td><td>.50</td><td>.04</td><td>.27</td><td>.07</td><td>.67</td><td>.22</td><td>.40</td><td>.28</td><td>.90</td><td>.28</td><td>.67</td><td>.39</td></tr><tr><td>Length Level</td><td colspan="4">50%</td><td colspan="4">30%</td><td colspan="4">50%</td><td colspan="4">50%</td><td colspan="4">40%</td></tr></table>
|
| 63 |
+
|
| 64 |
+
Table 1: LIMTEDINK performs compatible with baselines in terms of end-task performance (Task, weighted average F1) and human annotated rationale agreement (Precision, Recall, F1). All results are on test sets and are averaged across five random seeds. For LIMTEDINK, we report results for the best performing length level.
|
| 65 |
+
|
| 66 |
+
For BERT-based models, which use subword-based tokenization algorithms (e.g., WordPiece), we assign each token's importance score as its subtokens' maximum score to extract rationales during model inference (see Figure 1C).
|
| 67 |
+
|
| 68 |
+
# 3 Model Performance Evaluation
|
| 69 |
+
|
| 70 |
+
We first validate LIMITEDINK on two common rationale evaluation metrics, including end-task performance and human annotation agreement.
|
| 71 |
+
|
| 72 |
+
# 3.1 Experimental Setup
|
| 73 |
+
|
| 74 |
+
We evaluate our model on five text classification datasets from the ERASER benchmark (DeYoung et al., 2020). We design the identifier module in LIMTEDINK as a BERT-based model, followed by two linear layers with the ReLU function and dropout technique. The temperature for Gumbel-softmax approximation is fixed at 0.1. Also, we define the classifier module as a BERT-based sequence classification model to predict labels. We train five individual self-explaining models of different rationale lengths with training and validation sets, where we set the rationale lengths as $\{10\%, 20\%, 30\%, 40\%, 50\}$ of all input text. Then we select one out of the five models, which has the best weighted average F1 score, to compare with current baselines on end-task performance and human annotation agreement on test sets. Note that we use all models with five rationale lengths in human evaluation described in Section 4.
|
| 75 |
+
|
| 76 |
+
Baselines. We compare LIMITEDINK with four baselines. Full-Text consists of only the classifier module with full-text inputs. Sparse-N enforces shortest rationales by minimizing rationale mask length (Lei et al., 2016; Bastings et al., 2019). Sparse-C controls rationale length by penalizing the mask when its length is less than a threshold (Jain et al., 2020). Sparse-IB enables length control by minimizing the KL-divergence between
|
| 77 |
+
|
| 78 |
+
the generated mask with a prior distribution (Paranjape et al., 2020). See Appendix A.1 for more model and baseline details.
|
| 79 |
+
|
| 80 |
+
# 3.2 Evaluation Results
|
| 81 |
+
|
| 82 |
+
End-Task Performance. Following metrics in DeYoung et al. (2020), we report the weighted average F1 scores for end-task classification performance. Among five LIMITEDINK models with different rationale lengths, Table 1 reports the model with the best end-task performance on the test set. We observe that LIMITEDINK performs similarly to or better than the self-explaining baselines in all five datasets. See ablation studies in Appendix A.2.
|
| 83 |
+
|
| 84 |
+
Human-Annotated Rationale Agreement. We calculate the alignment between generated rationales and human annotations collected in the ERASER benchmark (DeYoung et al., 2020). As also shown in Table 1, we report the Token-level F1 (F1) metric along with corresponding Precision (P) and Recall (R) scores. The results show that LIMTEDINK can generate rationales that are consistent with human annotations and comparable to self-explaining baselines in all datasets.
|
| 85 |
+
|
| 86 |
+
# 4 Human Evaluation
|
| 87 |
+
|
| 88 |
+
Equipped with LIMITEDINK, we next carry out human studies to investigate the effect of rationale length on human understanding.
|
| 89 |
+
|
| 90 |
+
# 4.1 Study Design
|
| 91 |
+
|
| 92 |
+
Our goal is to quantify human performance on predicting the labels and confidence based solely on the rationales with different lengths. To do so, we control LIMITEDINK to extract rationales of different lengths, and recruit Mechanical Turk (MTurk) workers to provide predictions and confidence.
|
| 93 |
+
|
| 94 |
+
Dataset & rationale extraction. We focus on sentiment analysis in user study, and randomly sample 100 reviews from the Movie Reviews (Zaidan
|
| 95 |
+
|
| 96 |
+

|
| 97 |
+
Figure 2: Key components of the User Interface in the MTurk task HITs. Note that each HIT contains five reviews with different rationale lengths.
|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
Figure 3: The human evaluation's workflow. We (1) divide 100 movie reviews into 20 batches and (2) produce 10 HITs from each batch for ten worker groups.
|
| 101 |
+
|
| 102 |
+
and Eisner, 2008) test set that have correct model predictions. Then, we extract five rationales for each review using LIMTEDINK, with lengths from $10\%$ to $50\%$ , with an increment of $10\%$ .
|
| 103 |
+
|
| 104 |
+
Since human accuracy likely increases when participants see more words (i.e., when the lengths of rationales increase), we also create a Random rationale baseline, where we randomly select words of the same rationale length on the same documents (10% to 50%) while taking the continuity constraint into consideration. More details of Random baseline generation are in Appendix A.3.1.
|
| 105 |
+
|
| 106 |
+
Study Procedure. The study is completed in two steps. First, we posted a qualification Human Intelligence Tasks (HITs, $0.50 per assignment) on MTurk to recruit 200 qualified workers. Next, the 200 recruited workers can participate the task HIT$ (0.20 per assignment, 7 assignments posted) which contains five distinct movie reviews, with varying rationale lengths (10%-50%). In task HIT, as key components shown in Figure 2, we only display the rationales and mask all other words with ellipses of random length, such that participants can not infer the actual review length. Then partic
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 4: Human accuracy and confidence on predicting model labels given rationales with different lengths.
|
| 110 |
+
|
| 111 |
+
ipants are asked to guess the sentiment of the full review, and provide their confidence level based on a five-point Likert Scale (Likert, 1932). The full user interface is in Appendix A.3.2.
|
| 112 |
+
|
| 113 |
+
Participants recruiting and grouping. With each review having ten distinct rationales (five from LIMTEDINK and five Random), if these rationale conditions were randomly assigned, participants are likely to see the same review repeatedly and gradually see all the words. We carefully design our study to eliminate such undesired learning effect. More specifically, we group our 100 reviews into 20 batches, with five reviews in each batch (Step 1 in Figure 3). For each batch, we create five HITs for LIMTEDINK and Random, respectively, such that all the rationale lengths of five reviews are covered by these 10 HITs (Step 2 in Figure 3). Further, we make sure each participant is only assigned to one unique HIT, so that each participant can only see a review once. To do so, we randomly divide the 200 qualified workers into 10 worker groups (20 workers per group), and pair one worker group with only one HIT in each batch. This way, each HIT can only be accomplished by one worker group. As our participant control is more strict than regular data labeling tasks on MTurk, we keep the HITs open for 6 days. 110 out of 200 distinct workers participated in the main study, and they completed 1,169 of 1,400 assignments.
|
| 114 |
+
|
| 115 |
+
# 4.2 Results
|
| 116 |
+
|
| 117 |
+
We show the human prediction accuracy and confidence results in Figure 4. We find that the best explanations for human understanding are largely not the shortest rationales (10% length level): here, the human accuracy in predicting model labels is lower than for the random baseline (0.61 vs. 0.63), indicating that the shortest rationales are not the best for human understanding. There is a significant difference in human predicted labels (i.e., "positive" = 1, "negative" = 2) between LIMITEDINK (M=1.24, SD=0.71) and Random
|
| 118 |
+
|
| 119 |
+
<table><tr><td rowspan="2" colspan="2">length level (%) & Extract. method</td><td>Negative</td><td>Positive</td></tr><tr><td>P/R/F1</td><td>P/R/F1</td></tr><tr><td rowspan="2">10%</td><td rowspan="2">LIMITEDINK Random</td><td>0.66/0.56//0.61</td><td>0.70/0.58/0.64</td></tr><tr><td>0.67/0.57/0.62</td><td>0.66/0.70/0.68</td></tr><tr><td rowspan="2">20%</td><td rowspan="2">LIMITEDINK Random</td><td>0.75/0.61/0.67</td><td>0.71/0.77/0.74</td></tr><tr><td>0.69/0.60/0.64</td><td>0.68/0.74/0.71</td></tr><tr><td rowspan="2">30%</td><td rowspan="2">LIMITEDINK Random</td><td>0.74/0.76/0.75</td><td>0.81/0.78/0.79</td></tr><tr><td>0.72/0.61/0.66</td><td>0.72/0.78/0.75</td></tr><tr><td rowspan="2">40%</td><td rowspan="2">LIMITEDINK Random</td><td>0.84/0.76/0.80</td><td>0.78/0.85/0.81</td></tr><tr><td>0.79/0.63/0.70</td><td>0.65/0.79/0.71</td></tr><tr><td rowspan="2">50%</td><td rowspan="2">LIMITEDINK Random</td><td>0.78/0.78/0.78</td><td>0.85/0.84/0.85</td></tr><tr><td>0.77/0.63/0.70</td><td>0.75/0.84/0.79</td></tr></table>
|
| 120 |
+
|
| 121 |
+
Table 2: Human performance (i.e., Precision / Recall / F1 Score) on predicting model labels of each category in the Movie Reviews dataset.
|
| 122 |
+
|
| 123 |
+
$(\mathbf{M} = 1.32, \mathrm{SD} = 0.54)$ ; $t(1169) = 2.27$ , $p = 0.02$ . Table 2 shows human performance for each category.
|
| 124 |
+
|
| 125 |
+
Additionally, notice that the slope of our model's accuracy consistently flattens as the rationale increases, whereas the random baseline does not display any apparent trend and is obviously lower than our model at higher length levels (e.g., $40\%$ ). We hypothesize that this means our model is (1) indeed learning to reveal useful rationales (rather than just randomly displaying meaningless text), and (2) the amount of information necessary for human understanding only starts to saturate at around $40\%$ of the full text. This creates a clear contrast with prior work, where most studies extract $10 - 30\%$ of the text as the rationale on the same dataset (Jain et al., 2020; Paranjape et al., 2020). The eventually flattened slope potentially suggests a sweet spot to balance human understanding on rationales and sufficient model accuracy.
|
| 126 |
+
|
| 127 |
+
# 5 Discussion
|
| 128 |
+
|
| 129 |
+
By examining human prediction performance on five levels of rationale lengths, we demonstrate that the shortest rationales are largely not the best for human understanding. We are aware that this work has limitations. The findings are limited to Movie Reviews dataset, and we only evaluate human performance with rationales generated by the proposed LIMTEDINK. Still, our findings challenge the "shorter is better" assumption commonly adopted in existing self-explaining methods. As a result, we encourage future work to more cautiously define the best rationales for human understanding, and trade off between model accuracy and rationale length. More concretely, we consider that rationale models should find the right balance between
|
| 130 |
+
|
| 131 |
+
brevity and sufficiency. One promising direction could be to clearly define the optimal human interpretability in a measurable way and then learn to adaptively select rationales with appropriate length.
|
| 132 |
+
|
| 133 |
+
# 6 Related Work
|
| 134 |
+
|
| 135 |
+
Self-explaining models. Self-explaining models, which condition predictions on their rationales, are considered more trustworthy than post-hoc explanation techniques (Rajagopal et al., 2021). However, existing efforts often enforce minimal rationale length, which degrade the predictive performance (Yu et al., 2019; Bastings et al., 2019; Jain et al., 2020). Paranjape et al. (2020) improves this by proposing an information bottleneck approach to enable rationale length control at the sentence level. In this paper, LIMTEDINK further enables length control at the token level to allow more flexibility needed for our human studies.
|
| 136 |
+
|
| 137 |
+
Human-grounded evaluation. A line of studies evaluated model-generated rationales by comparing them against human-annotated explanations (Carton et al., 2020; Paranjape et al., 2020). Some other studies collect feedback from users to evaluate the explanations, such as asking people to choose a preferred model (Ribeiro et al., 2016) or to guess model predictions only based on rationales (Lertvittayakumjorn and Toni, 2019; Shen and Huang, 2020).
|
| 138 |
+
|
| 139 |
+
# 7 Conclusion
|
| 140 |
+
|
| 141 |
+
To investigate if the shortest rationales are best understandable for humans, this work presents a self-explaining model, LIMITEDINK, that achieves comparable performance with current self-explaining baselines in terms of end-task performance and human annotation agreement. We further use LIMTEDINK to generate rationales for human studies to examine how rationale length can affect human understanding. Our results show that the shortest rationales are largely not the best for human understanding. This would encourage a rethinking of rationale methods to find the right balance between brevity and sufficiency.
|
| 142 |
+
|
| 143 |
+
# 8 Acknowledgment
|
| 144 |
+
|
| 145 |
+
We thank Chieh-Yang Huang for helpful comments on the paper, Bhargavi Paranjape for technical discussion of methods, and the crowd workers for participating in this study. We also thank the anonymous reviewers for their constructive feedback.
|
| 146 |
+
|
| 147 |
+
# 9 Ethical Considerations
|
| 148 |
+
|
| 149 |
+
This work shows that the shortest rationales are often not the best for human understanding. We thus advocate for studying how users interact with machine-generated rationales. However, we are aware that using rationales to interpret model prediction could pose some risks for users. Rationales omit a significant portion of the contents (in our case, $50\%$ to $90\%$ of the words in a movie review are omitted), which could convey information incorrectly or mislead users. Furthermore, machinelearned rationales could encode some unwanted biases (Chuang et al., 2021). We believe that such risks should be explicitly communicated with users in real-world applications.
|
| 150 |
+
|
| 151 |
+
# References
|
| 152 |
+
|
| 153 |
+
Jasmijn Bastings, Wilker Aziz, and Ivan Titov. 2019. Interpretable neural predictions with differentiable binary variables. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2963-2977, Florence, Italy. Association for Computational Linguistics.
|
| 154 |
+
Samuel Carton, Anirudh Rathore, and Chenhao Tan. 2020. Evaluating and characterizing human rationales. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 9294-9307, Online. Association for Computational Linguistics.
|
| 155 |
+
Shiyu Chang, Yang Zhang, Mo Yu, and Tommi S. Jaakkola. 2020. Invariant rationalization. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 1448-1458. PMLR.
|
| 156 |
+
Jianbo Chen, Le Song, Martin J. Wainwright, and Michael I. Jordan. 2018. Learning to explain: An information-theoretic perspective on model interpretation. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholm, Sweden, July 10-15, 2018, volume 80 of Proceedings of Machine Learning Research, pages 882-891. PMLR.
|
| 157 |
+
Yung-Sung Chuang, Mingye Gao, Hongyin Luo, James Glass, Hung-yi Lee, Yun-Nung Chen, and Shang-Wen Li. 2021. Mitigating biases in toxic language detection through invariant rationalization. In Proceedings of the 5th Workshop on Online Abuse and Harms (WOAH 2021), pages 114-120, Online. Association for Computational Linguistics.
|
| 158 |
+
Jay DeYoung, Sarthak Jain, Nazneen Fatema Rajani, Eric Lehman, Caiming Xiong, Richard Socher, and Byron C. Wallace. 2020. ERASER: A benchmark to evaluate rationalized NLP models. In Proceedings
|
| 159 |
+
|
| 160 |
+
of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4443-4458, Online. Association for Computational Linguistics.
|
| 161 |
+
Ruth Fong, Mandela Patrick, and Andrea Vedaldi. 2019. Understanding deep networks via extremal perturbations and smooth masks. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 2950-2958. IEEE.
|
| 162 |
+
Sarthak Jain, Sarah Wiegrefe, Yuval Pinter, and Byron C. Wallace. 2020. Learning to faithfully rationalize by construction. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4459-4473, Online. Association for Computational Linguistics.
|
| 163 |
+
Eric Jang, Shixiang Gu, and Ben Poole. 2017. Categorical reparameterization with gumbel-softmax. In 5th International Conference on Learning Representations, ICLR 2017, Toulouse, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net.
|
| 164 |
+
Tao Lei, Regina Barzilay, and Tommi Jaakkola. 2016. Rationalizing neural predictions. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 107-117, Austin, Texas. Association for Computational Linguistics.
|
| 165 |
+
Piyawat Lertvittayakumjorn and Francesca Toni. 2019. Human-grounded evaluations of explanation methods for text classification. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 5195-5205, Hong Kong, China. Association for Computational Linguistics.
|
| 166 |
+
Rensis Likert. 1932. A technique for the measurement of attitudes. Archives of psychology.
|
| 167 |
+
Bhargavi Paranjape, Mandar Joshi, John Thickstun, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2020. An information bottleneck approach for controlling conciseness in rationale extraction. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1938-1952, Online. Association for Computational Linguistics.
|
| 168 |
+
Dheeraj Rajagopal, Vidhisha Balachandran, Eduard H Hovy, and Yulia Tsvetkov. 2021. SELFFEXPLAIN: A self-explaining architecture for neural text classifiers. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 836-850, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 169 |
+
Marco Túlio Ribeiro, Sameer Singh, and Carlos Guestrin. 2016. "why should I trust you?": Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining,
|
| 170 |
+
|
| 171 |
+
San Francisco, CA, USA, August 13-17, 2016, pages 1135-1144. ACM.
|
| 172 |
+
|
| 173 |
+
Hua Shen and Ting-Hao Huang. 2020. How useful are the machine-generated interpretations to general users? a human evaluation on guessing the incorrectly predicted labels. In Proceedings of the AAAI Conference on Human Computation and Crowdsourcing, volume 8, pages 168-172.
|
| 174 |
+
|
| 175 |
+
Hua Shen and Ting-Hao'Kenneth' Huang. 2021. Explaining the road not taken. ACM CHI 2022 Workshop on Human-Centered Explainable AI.
|
| 176 |
+
|
| 177 |
+
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1631-1642, Seattle, Washington, USA. Association for Computational Linguistics.
|
| 178 |
+
|
| 179 |
+
Keyon Vafa, Yuntian Deng, David Blei, and Alexander Rush. 2021. Rationales for sequential predictions. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 10314-10332, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 180 |
+
|
| 181 |
+
Mo Yu, Shiyu Chang, Yang Zhang, and Tommi Jaakkola. 2019. Rethinking cooperative rationalization: Introspective extraction and complement control. 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 4094-4103, Hong Kong, China. Association for Computational Linguistics.
|
| 182 |
+
|
| 183 |
+
Omar Zaidan and Jason Eisner. 2008. Modeling annotators: A generative approach to learning from annotator rationales. In Proceedings of the 2008 Conference on Empirical Methods in Natural Language Processing, pages 31-40, Honolulu, Hawaii. Association for Computational Linguistics.
|
| 184 |
+
|
| 185 |
+
# A Appendix
|
| 186 |
+
|
| 187 |
+
# A.1 Model Details and Hyperparameters
|
| 188 |
+
|
| 189 |
+
# A.1.1 Methodology Details
|
| 190 |
+
|
| 191 |
+
Concrete Relaxation of Subset Sampling Process. Given the output logits of identifier, we use Gumbel-softmax (Jang et al., 2017) to generate a concrete distribution as $\mathbf{c} = [c_1,\dots c_n]\sim$ Concrete(idn(x)), represented as a one-hot vector over $n$ features where the top important feature is 1. We then sample this process $k$ times in order to sample top-k important features, where we obtain $k$ concrete distributions as $\{\mathbf{c}^1,\dots,\mathbf{c}^k\}$ . Next we define one $n$ -dimensional random vector $\mathbf{m}$ to be the element-wise maximum of these $k$ concrete distributions along $n$ features, denoted as $\mathbf{m} = \max_j\{\mathbf{c}_i^j\}_{i = n}^{j = k}$ . Discarding the overlapping features to keep the rest, we then use $\mathbf{m}$ as the k-hop vector to approximately select the top-k important features over document $\mathbf{x}$ .
|
| 192 |
+
|
| 193 |
+
Vector and sort regularization. We deploy a vector and sort regularization on mask $\mathbf{m}$ (Fong et al., 2019), where we sort the output mask $m$ in a increasing order and minimize the $L_{1}$ norm between $m$ and a reference $\hat{m}$ consisting of $n - k$ zeros followed by $k$ ones.
|
| 194 |
+
|
| 195 |
+
# A.1.2 Model Training Details
|
| 196 |
+
|
| 197 |
+
Training and inference. During training, we select the Adam optimizer with the learning rate at 2e-5 with no decay. We set hyperparameters in Equation 5 and 2 as $\lambda = 1e - 4$ , $\nu_{1} = 0.5$ and $\nu_{2} = 0.3$ and trained 6 epochs for all models. Furthermore, we train LIMTEDINK on a set of sparsity levels as $k = \{10\%, 20\%, 30\%, 40\%, 50\}$ and choose models with optimal predictive performance on validation sets.
|
| 198 |
+
|
| 199 |
+
# A.1.3 Details of Self-Explaining Baselines
|
| 200 |
+
|
| 201 |
+
We compare our method with state-of-the-art self-explaining baseline models.
|
| 202 |
+
|
| 203 |
+
Sparse-N (Minimization Norm). This method learns the short mask with minimal $L_{0}$ or $L_{1}$ norm (Lei et al., 2016; Bastings et al., 2019), which penalizes for the total number of selected words in the explanation.
|
| 204 |
+
|
| 205 |
+
$$
|
| 206 |
+
\min \mathbb {E} _ {\mathbf {z} \sim \mathbf {i d n} (\mathbf {x})} \mathcal {L} (\mathbf {c l s} (\mathbf {z}), y) + \lambda \| m \| \tag {3}
|
| 207 |
+
$$
|
| 208 |
+
|
| 209 |
+
Sparse-C (Controlled Norm Minimization).
|
| 210 |
+
|
| 211 |
+
This method controls the mask sparsity through
|
| 212 |
+
|
| 213 |
+
a tunable predefined sparsity level $\alpha$ (Chang et al., 2020; Jain et al., 2020). The mask is penalized as below as long as the sparsity level $\alpha$ is passed.
|
| 214 |
+
|
| 215 |
+
$$
|
| 216 |
+
\min \mathbb {E} _ {\mathbf {z} \sim \mathbf {i d n} (\mathbf {x})} \mathcal {L} (\mathbf {c l s} (\mathbf {z}), y) + \lambda \max (0, \frac {\| \mathbf {m} \|}{N} - \alpha) \tag {4}
|
| 217 |
+
$$
|
| 218 |
+
|
| 219 |
+
where $\mathbf{N}$ is the input length and $\| m\|$ denotes mask penalty with $L_{1}$ norm.
|
| 220 |
+
|
| 221 |
+
Sparse IB (Controlled Sparsity with Information Bottleneck). This method introduces a prior probability of $\mathbf{z}$ , which approximates the marginal $p(\mathbf{m})$ of mask distribution; and $p(\mathbf{m}|\mathbf{x})$ is the parametric posterior distribution over $\mathbf{m}$ conditioned on input $\mathbf{x}$ (Paranjape et al., 2020). The sparsity control is achieved via the information loss term, which reduces the KL divergence between the posterior distribution $p(\mathbf{m}|\mathbf{x})$ that depends on $\mathbf{x}$ and a prior distribution $r(\mathbf{m})$ that is independent of $\mathbf{x}$ .
|
| 222 |
+
|
| 223 |
+
$$
|
| 224 |
+
\min \mathbb {E} _ {\mathbf {z} \sim \mathbf {i d n} (\mathbf {x})} \mathcal {L} (\mathbf {c l s} (\mathbf {z}), y) + \lambda K L [ p (\mathbf {m} | \mathbf {x}), r (\mathbf {m}) ] \tag {5}
|
| 225 |
+
$$
|
| 226 |
+
|
| 227 |
+
# A.2 Ablation Study on Model Components
|
| 228 |
+
|
| 229 |
+
We provide an ablation study on the Movie dataset to evaluate each loss term's influence on end-task prediction performance, including Precision, Recall, and F1 scores. The result is shown in Table 3.
|
| 230 |
+
|
| 231 |
+
<table><tr><td rowspan="2">Setup</td><td colspan="3">End-Task Prediction</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>No Sufficiency</td><td>0.25</td><td>0.50</td><td>0.34</td></tr><tr><td>No Continuity</td><td>0.82</td><td>0.81</td><td>0.81</td></tr><tr><td>No Sparsity</td><td>0.80</td><td>0.79</td><td>0.79</td></tr><tr><td>No Contextual</td><td>0.83</td><td>0.83</td><td>0.83</td></tr><tr><td>Our Model</td><td>0.91</td><td>0.90</td><td>0.90</td></tr></table>
|
| 232 |
+
|
| 233 |
+
Table 3: Ablation study of each module in our model on Movie Review dataset.
|
| 234 |
+
|
| 235 |
+
# A.3 Additional Details of Human Study
|
| 236 |
+
|
| 237 |
+
# A.3.1 Generating Random Baselines
|
| 238 |
+
|
| 239 |
+
Human accuracy likely increases when participants can see more words, i.e., when the lengths of rationales increase. If a rationale and a random text span have the same number of words, the rationale should help readers predict the label better. We created a simple baseline that generated rationales by randomly selecting words to form the rationales.
|
| 240 |
+
|
| 241 |
+
We could control (1) how many words to select and (2) how many disjoint rationales to produce. In the study, we set these two numbers to be identical to that of LIMTEDINK at each length level.
|
| 242 |
+
|
| 243 |
+
In detail, given the rationale length $k$ , we first got the count of total tokens in rationale as #tokens = $k$ . Next, we computed the average number of rationale segments $m$ , which are generated by LIMITEDINK, over the Movie dataset. We randomly selected $m$ spans with total tokens' count as #tokens from the full input texts, thus obtaining the random baselines. We evenly separated 10 worker groups to finish five random baseline HITs and LIMITEDINK HITs each. We determined that good model rationales should get higher human accuracy compared with same-length random baselines.
|
| 244 |
+
|
| 245 |
+
# A.3.2 Human Evaluation User Interface
|
| 246 |
+
|
| 247 |
+
We provide our designed user interfaces used in the human study. Specifically, we show the interface of the human study panel in Figure 5 (B). We also provide the detailed instructions for workers to understand our task, the instruction interface is shown in Figure 6.
|
| 248 |
+
|
| 249 |
+
<table><tr><td></td><td>Review1</td><td>Review2</td><td>Review3</td><td>Review4</td><td>Review5</td></tr><tr><td>Worker Group 1</td><td>Our@10%</td><td>Our@20%</td><td>Our@30%</td><td>Our@40%</td><td>Our@50%</td></tr><tr><td>Worker Group 2</td><td>Our@20%</td><td>Our@30%</td><td>Our@40%</td><td>Our@50%</td><td>Our@10%</td></tr><tr><td>Worker Group 3</td><td>Our@30%</td><td>Our@40%</td><td>Our@50%</td><td>Our@10%</td><td>Our@20%</td></tr><tr><td>Worker Group 4</td><td>Our@40%</td><td>Our@50%</td><td>Our@10%</td><td>Our@20%</td><td>Our@30%</td></tr><tr><td>Worker Group 5</td><td>Our@50%</td><td>Our@10%</td><td>Our@20%</td><td>Our@30%</td><td>Our@40%</td></tr><tr><td>Worker Group 6</td><td>Random@10%</td><td>Random@20%</td><td>Random@30%</td><td>Random@40%</td><td>Random@50%</td></tr><tr><td>Worker Group 7</td><td>Random@20%</td><td>Random@30%</td><td>Random@40%</td><td>Random@50%</td><td>Random@10%</td></tr><tr><td>Worker Group 8</td><td>Random@30%</td><td>Random@40%</td><td>Random@50%</td><td>Random@10%</td><td>Random@20%</td></tr><tr><td>Worker Group 9</td><td>Random@40%</td><td>Random@50%</td><td>Random@10%</td><td>Random@20%</td><td>Random@30%</td></tr><tr><td>Worker Group 10</td><td>Random@50%</td><td>Random@10%</td><td>Random@20%</td><td>Random@30%</td><td>Random@40%</td></tr></table>
|
| 250 |
+
|
| 251 |
+
(A) Worker Group Assignment
|
| 252 |
+
|
| 253 |
+
<table><tr><td>Instructions</td></tr><tr><td>In this HIT, you will see parts of a movie review. Read it carefully, and:</td></tr><tr><td>(1) Based on the partial content you see, try your best to guess the original movie review is Positive or Negative toward the movie (i.e., the Sentiment of the review), and</td></tr><tr><td>(2) Tell us how confident you are about the guess.</td></tr><tr><td>In this HIT, you will label five movie reviews .</td></tr><tr><td>Examples (Click to Show Examples)</td></tr></table>
|
| 254 |
+
|
| 255 |
+

|
| 256 |
+
(B) Worker Study Interface
|
| 257 |
+
Figure 5: (A) The design of the worker group assignment in our human study. (B) The worker interface of the human study.
|
| 258 |
+
|
| 259 |
+
# Instructions
|
| 260 |
+
|
| 261 |
+
# Examples (Click to Hide Examples)
|
| 262 |
+
|
| 263 |
+
Here is a movie review example, with a Positive sentiment label as ground truth:
|
| 264 |
+
|
| 265 |
+
" trees lounge is the directoral debut from one of my favorite actors , steve busce . he gave memorable performance in in the soup ,fargo , and reservoir dogs . now he tries his hand at writing , directing and acting all in the same flick . the movie starts out awfully slowwith tommy ( busce ) hanging around a local bar the " trees lounge " and him pestering his brother . it ' s obvious he a loser . but as heseys " it ' s better i ' m a loser and know i am , then being a loser and not thinking i am . " well put . the story starts to take off when hisuncle dies , and tommy , not having a job , decides to drive an ice cream truck . well , the movie starts to pick up with him finding a loveinterest in a 17 year old girl named debbie ( chloe sevi ) and . . . i liked this movie alot even though it did not reach my expectation . afteryou ' ve seen him in fargo and reservoir dogs , you know he is capable of a better performance . i think his brother , michael , did anexcellent job for his debut performance . mr . busce is off to a good career as a director ! "
|
| 266 |
+
|
| 267 |
+
In the HIT, we will hide the sentiment label and highlight part of texts in this movie review. Then you'll be asked to:
|
| 268 |
+
|
| 269 |
+
(1) guess the review's sentiment label given only highlighted content you see;
|
| 270 |
+
|
| 271 |
+
(2) tell us your confidence on the selection.
|
| 272 |
+
|
| 273 |
+
Here we provide examples explaining several different confidence levels for your reference.
|
| 274 |
+
|
| 275 |
+
# Example-1:
|
| 276 |
+
|
| 277 |
+
i liked this movie alot even though it did not reach my expectation . i think his brother , michael , did an excellent job for his debut performance . mr . busce is off to a good career as a director !"
|
| 278 |
+
|
| 279 |
+
# You Selected Label: Positive
|
| 280 |
+
|
| 281 |
+
Confidence: 5 - Very Confident - The displayed texts show clear attitude, and reflects the core sentiment (like/dislike) of the full review.
|
| 282 |
+
|
| 283 |
+
Explanation: The displayed texts clearly show the writer's sentimental opinion on the movie, such as "i liked this movie alot". You could be Very Confident to select your sentiment label in this example.
|
| 284 |
+
|
| 285 |
+
# Example-2:
|
| 286 |
+
|
| 287 |
+
it ' s obvious he a loser . but as he says " it ' s better i ' m a loser and know i am , then being a loser and not thinking i am well , the movie starts to pick up with him finding a love interest in a 17 year old girl named debbie ( chloe sevi ) and .
|
| 288 |
+
|
| 289 |
+
# You Selected Label: Positive
|
| 290 |
+
|
| 291 |
+
Confidence: 3 - Hesitating - The displayed texts seem positive/negative, but I cannot guess if it's representative of the full review.
|
| 292 |
+
|
| 293 |
+
Explanation: The displayed texts seem positive / negative, such as "finding a love interest in", "it's obvious he a loser". BUT they are describing movie plot but not direct evidence on showing writer's sentimental opinions on this movie. You might be Hesitating to select your sentiment label in this example.
|
| 294 |
+
|
| 295 |
+
# Example-3:
|
| 296 |
+
|
| 297 |
+
"......now he tries his hand at writing ......after you ' ve seen him in fargo and reservoir dogs ,....
|
| 298 |
+
|
| 299 |
+
# You Selected Label: Negative
|
| 300 |
+
|
| 301 |
+
Confidence: 1 - I Guess Randomly - The displayed texts are too trivial and does not reflect on the larger themes.
|
| 302 |
+
|
| 303 |
+
Explanation: The displayed texts don't show clear sentimental information on this movie. You might randomly guess one label and choose I Guess Randomly as your confident.
|
| 304 |
+
|
| 305 |
+
Figure 6: User Interface of the instruction in the human study.
|
areshortestrationalesthebestexplanationsforhumanunderstanding/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:42597af371d5476e400ceacd1a0e969069e108186ec3ed8eb0be8292e85f23ec
|
| 3 |
+
size 547653
|
areshortestrationalesthebestexplanationsforhumanunderstanding/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:899cc19b23a42158e80c543c7bb361b73c742a54bd1ffb058f83581f663398ad
|
| 3 |
+
size 340413
|
ariskaversemechanismforsuicidalityassessmentonsocialmedia/ca8787e4-1f35-4b21-9cdc-1d165ab91c31_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4aae836a5d4f3f3a74d8401b3195bfb15bbe3eeb7ca1638777022b3ab003ac66
|
| 3 |
+
size 53191
|
ariskaversemechanismforsuicidalityassessmentonsocialmedia/ca8787e4-1f35-4b21-9cdc-1d165ab91c31_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:12c3ef4a1ec64d2c7420be651dffa63157cba408b5c437877e9e2991a5ad3159
|
| 3 |
+
size 67026
|
ariskaversemechanismforsuicidalityassessmentonsocialmedia/ca8787e4-1f35-4b21-9cdc-1d165ab91c31_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d5e79a87d4d169013bc3c304567595f73089a2cfd8b3ba75209869845ab67b9
|
| 3 |
+
size 550875
|
ariskaversemechanismforsuicidalityassessmentonsocialmedia/full.md
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A Risk-Averse Mechanism for Suicidality Assessment on Social Media
|
| 2 |
+
|
| 3 |
+
Ramit Sawhney $^{1*}$ , Atula Tejaswi Neerkaje $^{2*}$ , Manas Gaur $^{1}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ AI Institute, University of South Carolina, SC, USA
|
| 6 |
+
|
| 7 |
+
mgaur@email.sc.edu
|
| 8 |
+
|
| 9 |
+
$^{2}$ Manipal Institute of Technology, Manipal, India
|
| 10 |
+
|
| 11 |
+
atula.neerkaje@learner.manipal.edu
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
Recent studies have shown that social media has increasingly become a platform for users to express suicidal thoughts outside traditional clinical settings. With advances in Natural Language Processing strategies, it is now possible to design automated systems to assess suicide risk. However, such systems may generate uncertain predictions, leading to severe consequences. We hence reformulate suicide risk assessment as a selective prioritized prediction problem over the Columbia Suicide Severity Risk Scale (C-SSRS). We propose SASI, a risk-averse and self-aware transformer-based hierarchical attention classifier, augmented to refrain from making uncertain predictions. We show that SASI is able to refrain from $83\%$ of incorrect predictions on real-world Reddit data. Furthermore, we discuss the qualitative, practical, and ethical aspects of SASI for suicide risk assessment as a human-in-the-loop framework.
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
Suicide is a global phenomenon responsible for $1.3\%$ of deaths worldwide (WHO, 2019). While it is the leading cause of death among 14-35 year olds in the US (Hedegaard et al., 2021), suicide rates have increased by $13\%$ in Japan between July to September 2020 (Tanaka and Okamoto, 2021). It hence becomes critical to extend clinical and psychiatric care, which relies heavily on identifying those at risk. While $80\%$ of patients do not undergo clinical treatment, $60\%$ of those who succumbed to suicide denied having suicidal thoughts to mental health experts (McHugh et al., 2019). However, studies show eight out of ten people shared suicidal thoughts on social media (Golden et al., 2009).
|
| 20 |
+
|
| 21 |
+
The advent of Natural Language Processing (NLP) shows promise for suicide risk assessment based on online user behavior (Ji et al., 2021b;
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1: End-to-end pipeline for suicide risk assessment. When SASI assesses the posts, it returns the predicted risk level along with a certainty score. With a human-in-the-loop framework, these predictions can be sorted into various risk levels. SASI assigns high priority to uncertain predictions, for an immediate review by mental health experts.
|
| 25 |
+
|
| 26 |
+
Choudhury et al., 2016), with automatic risk assessment algorithms outperforming traditional clinical methods (Coppersmith et al., 2018; Linthicum et al., 2019). Numerous deep learning methods already exist, which include leveraging suicide-related word-embeddings (Cao et al., 2019), social graphs (Mishra et al., 2019; Sinha et al., 2019; Cao et al., 2022; Sawhney et al., 2021b) and historical context (Matero et al., 2019; Gaur et al., 2019).
|
| 27 |
+
|
| 28 |
+
However, mental health is a safety-critical realm, where technological failure could lead to severe harm to users on social media (Sittig and Singh, 2015). One such case was covered by Register (2020), wherein a medical bot suggested a mock patient kill themselves, demonstrating that unintended harmful behavior can emerge from AI systems (Amodei et al., 2016; Chandler et al., 2020).
|
| 29 |
+
|
| 30 |
+
Despite the significant power of traditional NLP methods, such models are inherently designed to make a prediction even when not confident. This poses a challenge when working with critical tasks like suicide risk assessment, for which it may be hard to make a prediction due to various reasons such as task hardness or contained ambiguity. Such a system may associate a lower risk level to a user who needs urgent help. A resulting delayed response from mental health experts may lead to adverse consequences. We hence need systems that assign high priority to uncertain predictions, for immediate review and response.
|
| 31 |
+
|
| 32 |
+
Contributions: We reformulate suicide risk assessment as a prioritized prediction task which factors in uncertainty, and propose SASI: A Risk-Averse Mechanism for Suicidality Assessment on Social Media. SASI is risk-averse in the sense that it is self-aware, as it incorporates a selection function to measure uncertainty. Based on a set threshold value, SASI refrains from making a prediction when it is uncertain. We show that SASI can act as a tool to efficiently prioritize users who need immediate attention. Through a human-in-the-loop framework that involves a domain expert, SASI assigns high priority to uncertain predictions to avoid critical failure (Figure 1). We demonstrate the effectiveness of SASI using a real-world gold standard Reddit dataset. Through a series of experiments, we show SASI refrains from making $83\%$ of incorrect predictions. We further demonstrate its effectiveness through a qualitative study and discuss the ethical implications.
|
| 33 |
+
|
| 34 |
+
# 2 Methodology
|
| 35 |
+
|
| 36 |
+
# 2.1 Columbia Suicide Severity Risk Scale
|
| 37 |
+
|
| 38 |
+
The Columbia Suicide Severity Rating Scale (C-SSRS) is an authoritative questionnaire employed by psychiatrists to measure suicide risk severity (Posner et al., 2011). There are 3 items in the scale: Suicide Ideation, Suicide Behavior, and Suicide Attempt. Each C-SSRS severity class is composed of a conceptually organized set of questions that characterize the respective category. Responses to the questions across the C-SSRS classes eventually determine the risk of suicidality of an individual (Interian et al., 2018; McCall et al., 2021). One of the challenges researchers face when it comes to dealing with social media content is the disparity in the level of emotions expressed (Gaur et al., 2019). Since the C-SSRS was originally designed for use
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
Figure 2: An overview of SASI: SASI incorporates a risk-averse, self-aware mechanism to any given suicide ideation model (SIM) by training using Gambler's Loss. It refrains from predicting when uncertain.
|
| 42 |
+
|
| 43 |
+
in clinical settings, adapting the same metric to a social media platform would require changes to address the varying nature of emotions expressed. For instance, while in a clinical setting, it is typically suicidal candidates that see a clinician; on social media, non-suicidal users may participate to offer support to others deemed suicidal (Gaur et al., 2021). To address these factors, two additional classes were defined (Gaur et al., 2019) to the existing C-SSRS scale with three classes: Suicide Indicator and Supportive (Negative class).
|
| 44 |
+
|
| 45 |
+
# 2.2 Problem Formulation
|
| 46 |
+
|
| 47 |
+
Following existing work (Gaur et al., 2019; Sawhney et al., 2021a), we formulate the problem as a classification task to predict the suicidal risk of the user $u_{i} \in \{u_{1}, u_{2}, \dots, u_{N}\}$ , whose posts $P_{i} = \{p_{1}^{i}, p_{2}^{i}, \dots, p_{T}^{i}\}$ are authored over time in a chronological order, with the latest post being $p_{T}^{i}$ . We denote the label set $\mathbf{Y} = \{\text{Support (SU)}, \text{Indicator (IN)}, \text{Ideation (ID)}, \text{Behaviour (BR)}, \text{Attempt (AT)}\}$ in increasing order of severity risk, defined based on the C-SSRS. For a given Suicide Ideation Model, our goal is to expand the cardinality of the label space to $|\mathbf{Y}| + 1$ so as to enable an option to refrain when the model is uncertain.
|
| 48 |
+
|
| 49 |
+
# 2.3 Suicide Ideation Model (SIM)
|
| 50 |
+
|
| 51 |
+
Each post made by a user could provide detailed context of suicidal thought manifestation over time (Oliffe et al., 2012). To capture this property, we draw inspiration from existing state-of-the-art (SOTA) models (Gaur et al., 2019; Matero et al., 2019; Sawhney et al., 2021a; Ji et al., 2021a) which use LSTM based backbones. To encode each post $p_k^i$ , we use the 768-dimensional representation of the [CLS] token obtained from BERT (Devlin et al., 2019) as $e_k^i = \mathrm{BERT}(p_k^i)$ . As shown in Figure 2, we then pass each post embedding sequentially through a bi-directional LSTM, given as $h_k^i = \mathrm{Bi - LSTM}(e_k^i)$ . We thus obtain the sequence of hidden states, $\boldsymbol{x} = [h_1^i, h_2^i, \dots, h_T^i]$ , where $h_k^i \in \mathbb{R}^H$ , and $H$ is the hidden dimension. To filter out relevant signals from the potentially vast user history (Shing et al., 2020), we pass the hidden state sequence through an attention layer. The final layer is a multilayer perceptron (MLP) to obtain the prediction vector $\hat{\boldsymbol{y}}$ , given as:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\begin{array}{l} \hat {\boldsymbol {y}} = f (\boldsymbol {x}), \quad \text {w h e r e} \\ f (\boldsymbol {x}) = \operatorname {S o f t m a x} (\operatorname {M L P} (\operatorname {A t t e n t i o n} (\boldsymbol {x}))) \tag {1} \\ \end{array}
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
# 2.4 Self-Aware Mechanism
|
| 58 |
+
|
| 59 |
+
To make the model self-aware, we transform the model such that it makes a prediction only when certain (Liu et al., 2019). As shown in Figure 2, the model $f: \mathbb{R}^{T \times H} \to \mathbf{Y}$ is augmented with a selection function $g: \mathbb{R}^{T \times H} \to (0,1)$ , which is an extra logit. The augmented model is described as a piece-wise function, given by:
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
(f, g) (\boldsymbol {x}) := \left\{ \begin{array}{l l} \text {R e f r a i n}, & \text {i f} g \geq \tau \\ \operatorname {a r g m a x} (\hat {\boldsymbol {y}}), & \text {o t h e r w i s e} \end{array} \right. \tag {2}
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
Where the threshold $\tau \in (0,1)$ , $\operatorname{argmax}(\hat{\pmb{y}}) \in \mathbf{Y}$ . Let $p = (f,g)(\pmb{x})$ , where $p \in \mathbf{Y} \cup \{\text{Refrain}\}$ denote the final prediction by the model for a user $u_{i}$ . Human moderators can then define the level of granularity of these predictions, and sort them into priority levels as desired. As an example, moderators may choose to have only three levels of priority, where the user is high priority if $p \in \{\text{AT}, \text{BR}, \text{Refrain}\}$ , moderate if $p \in \{\text{ID}, \text{IN}\}$ and low if $p \in \{\text{SU}\}$ . With the addition of the Refrain option, uncertain predictions will have highest priority, alleviating the possibility of high-risk users being neglected.
|
| 66 |
+
|
| 67 |
+
It is essential to note that the confidence threshold $\tau$ is not utilized during training, rather as a
|
| 68 |
+
|
| 69 |
+
threshold variable to calibrate data coverage $(cov)$ during evaluation. The $cov$ fraction of total samples is what SASI predicts on, leaving out $(1 - cov)$ samples for which SASI is most uncertain. Specifically, we can choose some value $\tau$ such that there will be $(1 - cov)$ samples for which $g \geq \tau$ . The idea behind this approach is to trade-off $(1 - cov)$ samples for immediate review by mental health experts in exchange for higher model performance on the $cov$ samples about which it is confident.
|
| 70 |
+
|
| 71 |
+
# 2.5 Network Optimization
|
| 72 |
+
|
| 73 |
+
In any $m$ -class classification problem, if the model assigns a high probability score to the wrong class, then learning becomes difficult due to vanishing gradients (Ziyin et al., 2020). To account for the additional refrain option in the augmented label space, we train SASI using Gambler's Loss (Liu et al., 2019). Gambler's loss allows the gradients to propagate through $g$ instead, by abstaining from assigning weights to any of the $m$ classes. Thus, the model learns a distribution of noisy/uncertain data points characterized by the selection function $g$ . The loss function is given as:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\mathcal {L} = - \sum_ {j} ^ {| \mathbf {Y} |} y _ {j} \cdot \log (\hat {y} _ {j} \cdot r + g) \tag {3}
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $y_{j}$ is the true label, and the reward $r$ is a hyperparameter. A higher value of $r$ discourages restraint. Since the loss function directly learns $g$ , it does not depend on the coverage (Liu et al., 2019), and can be manually set to any value during evaluation.
|
| 80 |
+
|
| 81 |
+
# 3 Experimental Setup
|
| 82 |
+
|
| 83 |
+
# 3.1 Dataset
|
| 84 |
+
|
| 85 |
+
We use the dataset released by Gaur et al. (2019), which contains Reddit posts of 500 users filtered from an initial set of 270,000 users across several mental health and suicide-related subreddits, such as r/StopSelfHarm (SSH), r/selfharm (SLF), r/bipolar (BPL), r/BipolarReddit (BPR), r/BipolarSOs, r/opiates (OPT), r/Anxiety (ANX), r/addiction (ADD), r/BPD, r/SuicideWatch (SW), r/schizophrenia (SCZ), r/autism (AUT), r/depression (DPR), r/cripplingalcoholism (CRP), and r/aspergers (ASP). The posts were annotated by practicing psychiatrists into five increasing risk levels based on the Columbia Suicide Severity Risk Scale (Posner et al., 2011), leading to an acceptable
|
| 86 |
+
|
| 87 |
+
average pairwise agreement of 0.79 and a groupwise agreement of 0.73. The class distribution of each category with increasing risk level is: Supportive (20%), Indicator (20%), Ideation (34%), Behaviour (15%), Attempt (9%). On average, the number of posts made by a user is $18.25 \pm 27.45$ with a maximum of 292 posts. The average number of tokens in each post is $73.4 \pm 97.7$ .
|
| 88 |
+
|
| 89 |
+
# 3.2 Evaluation Metrics
|
| 90 |
+
|
| 91 |
+
We first describe the evaluation metrics that measure how well the model performs on the cov samples. Following Gaur et al. (2019), we use graded variants of F1 score, Precision, and Recall, where we alter the formulation of False Negatives (FN) and False Positives (FP). FN is modified as the ratio of the number of times predicted severity of suicide risk level $(k^p)$ is less than the actual risk level $(k^a)$ over $N$ number of samples. FP is the ratio of the number of times the predicted risk $(k^p)$ is greater than the actual risk $(k^a)$ , given as:
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
F N = \frac {\sum_ {i = 1} ^ {N} I \left(k _ {i} ^ {a} > k _ {i} ^ {p}\right)}{N} \tag {4}
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
F P = \frac {\sum_ {i = 1} ^ {N} I \left(k _ {i} ^ {p} > k _ {i} ^ {a}\right)}{N}
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
Let $P_{\mathrm{T}}$ denote the total number of test samples, $P_{\mathrm{corr + refrain}}$ the sum of samples that have either been correctly predicted or have been refrained, $P_{\mathrm{refrain}}$ the total number of refrained samples, and $P_{\mathrm{in}}$ the number of incorrect predictions among the refrained samples. We additionally introduce two metrics, Robustness and Fail-Safe Rejects, as:
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\text {R o b u s t n e s s} = \frac {P _ {\text {c o r r + r e f r a i n}}}{P _ {\mathrm {T}}} \tag {5}
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\text {F a i l - S a f e R e j e c t s} = \frac {P _ {\text {i n}}}{P _ {\text {r e f r a i n}}}
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
Robustness captures the fraction of samples which are correctly classified or instead sent for immediate review. Fail-Safe Rejects captures the fraction of refrained samples which were indeed erroneous. A higher Fail-Safe Rejects score hence implies that human moderators will be subjected to a lesser amounts of redundant work.
|
| 112 |
+
|
| 113 |
+
# 4 Results
|
| 114 |
+
|
| 115 |
+
# 4.1 Performance Comparison
|
| 116 |
+
|
| 117 |
+
We compare the performance of SASI with various state-of-the-art baselines in Table 1. Sequential models like Suicide Detection Model (SDM)
|
| 118 |
+
|
| 119 |
+
<table><tr><td>Model</td><td>Gr. Prec.</td><td>Gr. Recall</td><td>FScore</td><td>Robustness</td><td>Fail-Safe Rejects</td></tr><tr><td>Contextual CNN</td><td>0.65</td><td>0.52</td><td>0.59</td><td>-</td><td>-</td></tr><tr><td>SDM</td><td>0.61</td><td>0.54</td><td>0.57</td><td>-</td><td>-</td></tr><tr><td>ContextBERT</td><td>0.63</td><td>0.57</td><td>0.60</td><td>-</td><td>-</td></tr><tr><td>SISMO</td><td>0.66</td><td>0.61</td><td>0.64</td><td>-</td><td>-</td></tr><tr><td>SASI (Cov 100%)</td><td>0.67*</td><td>0.62</td><td>0.66*</td><td>0.48</td><td>-</td></tr><tr><td>SASI (Cov 85%)</td><td>0.69*</td><td>0.65*</td><td>0.67*</td><td>0.61</td><td>0.83</td></tr><tr><td>SASI (Cov 50%)</td><td>0.71*</td><td>0.69*</td><td>0.70*</td><td>0.73</td><td>0.65</td></tr></table>
|
| 120 |
+
|
| 121 |
+
Table 1: We report the median of results over 10 random seeds. * indicates the result is statistically significant with respect to SISMO ( $p < 0.005$ ) under Wilcoxon's signed-rank test. ** Bold denotes best performance while Italics denotes second best.
|
| 122 |
+
|
| 123 |
+
(Cao et al., 2019) and ContextBERT (Matero et al., 2019) generally outperform ContextualCNN (Gaur et al., 2019), which uses a bag-of-posts approach. SISMO (Sawhney et al., 2021a) shows further improvements by modeling the ordinal nature of risk labels. SASI significantly outperforms $(p < 0.005)$ these methods for various values of coverage $(cov)$ , demonstrating its ability to avoid committing to erroneous predictions by characterizing its confidence (Liu et al., 2019).
|
| 124 |
+
|
| 125 |
+

|
| 126 |
+
Figure 3: Changes in performance metrics with increasing coverage, averaged over 10 random seeds.
|
| 127 |
+
|
| 128 |
+
# 4.2 Coverage and Performance Trade-off
|
| 129 |
+
|
| 130 |
+
We further evaluate SASI for various values of target coverage $(cov)$ by calibrating the threshold $\tau$ . As shown in Figure 3, lower coverage leads to an increase in Graded Recall, Precision, and FScore (Table 1), as the model only keeps $cov$ predictions which it is highly certain about. However, we observe a decrease in Fail-Safe Rejects due to an increasingly cautious approach employed by the model, which implies an increased fraction of originally correct predictions that need to be manually reviewed. We hence observe a trade-off, wherein we must seek to achieve competitive performance on the $cov$ samples, while at the same time not overburden moderators with the $(1 - cov)$ samples. For lower coverage values (say $50\%$ ), human modera
|
| 131 |
+
|
| 132 |
+

|
| 133 |
+
Figure 4: We show SASI can be used for efficient prioritization of users during suicide risk assessment. For each user, we show the real labels next to predicted labels, while also indicating whether SASI refrained from making that prediction. We further demonstrate how SASI sorts the users into priority levels. All examples in this paper have been paraphrased as per the moderate disguise scheme (Bruckman, 2002) to protect user privacy.
|
| 134 |
+
|
| 135 |
+
tors may be overburdened by having to review a lot of redundant samples. On the other hand, we note that SASI $(85\%)$ provides more utility, as it statistically outperforms SOTA models like SISMO, while maintaining a fail-safe rejection score of $83\%$ and a competitive robustness score of $61\%$ .
|
| 136 |
+
|
| 137 |
+
# 4.3 Qualitative Analysis
|
| 138 |
+
|
| 139 |
+
The essence of SASI lies behind its ability to refrain from making misleading predictions over high-risk samples. We study five users with snippets of their posts, as shown in Figure 4. We observe the model makes erroneous predictions on high-risk users A and D. However, SASI refrains from committing to these predictions, assigning these users a high priority for immediate review and response. SASI chooses to refrain despite predicting the risk level of user B correctly, possibly because it employs a cautious approach due to phrases such as 'take my life' scattered in the user's timeline. This user, who is already of relatively high risk, is hence assigned a high priority. User E shows a very low sign of risk, which is confidently captured by SASI without needing to refrain. User C is an erroneous case wherein SASI is confident, yet makes a wrong prediction. However, the user is not high risk and gets assigned to the same priority level as the true risk label. While this example is not a cause for concern, certain situations may arise where SASI also confidently assigns a low-risk score to a high-risk user, opening avenues for future work that involves integrating and reformulating ordinal regression
|
| 140 |
+
|
| 141 |
+
over the principles of Gambler's loss.
|
| 142 |
+
|
| 143 |
+
# 5 Conclusion
|
| 144 |
+
|
| 145 |
+
With a motivation to provide a robust solution to fine-grained suicide risk assessment on social media, we present SASI, a framework that integrates the concept of selective prioritization to existing deep learning based risk-assessment techniques. SASI is self-aware, wherein it refrains from making a prediction when uncertain, and instead assigns high priority to such data samples for immediate review by mental health experts. We demonstrated the effectiveness of SASI through quantitative evaluations on real-world data, wherein SASI avoided high-risk situations by refraining from making $83\%$ of incorrect predictions. Through a qualitative analysis, we described how SASI can be used as a part of a human-in-the-loop framework, facilitating efficient responses from mental health experts.
|
| 146 |
+
|
| 147 |
+
# Acknowledgements
|
| 148 |
+
|
| 149 |
+
We thank Prof. Amit Sheth for reviewing the paper and providing valuable feedback and support. We would also like to thank the anonymous reviewers for their insightful suggestions on various aspects of this work.
|
| 150 |
+
|
| 151 |
+
# Ethical Considerations
|
| 152 |
+
|
| 153 |
+
We work within the scope of acceptable privacy practices suggested by Chancellor et al. (2019) and considerations presented by Fiesler and Proferes (2018) to avoid coercion and intrusive treat
|
| 154 |
+
|
| 155 |
+
ment. The primary source of the dataset used in this study is Reddit. Although Reddit is intended for anonymous posting, we take further precautions by performing automatic de-identification of the dataset using named entity recognition (Zirikly et al., 2019). All examples used in this paper are further been anonymized, obfuscated, and paraphrased for user privacy (Benton et al., 2017) and to prevent misuse as per the moderate disguise scheme suggested by Bruckman (2002). Taking inspiration from Benton et al. (2017), we also keep the annotation of user data separate from raw user data on protected servers linked only through anonymous IDs. Our work focuses on building an assistive tool for screening suicidal users and providing judgments purely based on observational capacity. We acknowledge that it is almost impossible to prevent abuse of released technology even when developed with good intentions (Hovy and Spruit, 2016). Hence, we ensure that this analysis is shared only selectively to avoid misuse such as Samaritan's Radar (Hsin et al., 2016).
|
| 156 |
+
|
| 157 |
+
We further acknowledge that the studied data may be susceptible to demographic, expert annotator, and medium-specific biases (Hovy and Spruit, 2016). While the essence of our work is to aid in the early detection of at-risk users and early intervention, any interventions must be well-thought, failing which may lead to counter-helpful outcomes, such as users moving to fringe platforms, making it harder to provide assistance (Kumar et al., 2015). Care should be taken to not to create stigma, and interventions must hence be carefully planned by consulting relevant stakeholders, such as clinicians, designers, and researchers (Chancellor et al., 2016), to maintain social media as a safe space for individuals looking to express themselves (Chancellor et al., 2019). It is also essential that clinicians and human moderators are not overburdened (Chancellor et al., 2019). For instance, "Alarm fatigue" is when alarms are so excessive, many of which are false positives, that healthcare providers become desensitized from alarms (Drew et al., 2014).
|
| 158 |
+
|
| 159 |
+
We also agree that suicidality is subjective (Keilp et al., 2012), wherein the interpretation may vary across individuals on social media (Puschman, 2017). We do not make any diagnostic claims, rather help prioritize the users that should be evaluated by the medical professionals first, as part of a distributed human-in-the-loop framework (de Andrade et al., 2018).
|
| 160 |
+
|
| 161 |
+
# References
|
| 162 |
+
|
| 163 |
+
Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. 2016. Concrete problems in ai safety. ArXiv preprint, abs/1606.06565.
|
| 164 |
+
Adrian Benton, Glen Coppersmith, and Mark Dredze. 2017. Ethical research protocols for social media health research. In Proceedings of the First ACL Workshop on Ethics in Natural Language Processing, pages 94-102, Valencia, Spain. Association for Computational Linguistics.
|
| 165 |
+
Amy Bruckman. 2002. Studying the amateur artist: A perspective on disguising data collected inhuman subjects research on the internet. Ethics and Inf. Technol., 4(3):217-231.
|
| 166 |
+
Lei Cao, Huijun Zhang, and Ling Feng. 2022. Building and using personal knowledge graph to improve suicidal ideation detection on social media. IEEE Transactions on Multimedia, 24:87-102.
|
| 167 |
+
Lei Cao, Huijun Zhang, Ling Feng, Zihan Wei, Xin Wang, Ningyun Li, and Xiaohao He. 2019. Latent suicide risk detection on microblog via suicide-oriented word embeddings and layered attention. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 1718-1728, Hong Kong, China. Association for Computational Linguistics.
|
| 168 |
+
Stevie Chancellor, Michael L. Birnbaum, Eric D. Caine, Vincent M. B. Silenzio, and Munmun De Choudhury. 2019. A taxonomy of ethical tensions in inferring mental health states from social media. In Proceedings of the Conference on Fairness, Accountability, and Transparency, FAT* '19, page 79-88, New York, NY, USA. Association for Computing Machinery.
|
| 169 |
+
Stevie Chancellor, Zhiyuan Lin, Erica L. Goodman, Stephanie Zerwas, and Munmun De Choudhury. 2016. Quantifying and predicting mental illness severity in online pro-eating disorder communities. In Proceedings of the 19th ACM Conference on Computer-Supported Cooperative Work & Social Computing, CSCW '16, page 1171-1184, New York, NY, USA. Association for Computing Machinery.
|
| 170 |
+
Chelsea Chandler, Peter W Foltz, and Brita Elvevag. 2020. Using machine learning in psychiatry: the need to establish a framework that nurtures trustworthiness. Schizophrenia bulletin, 46(1):11-14.
|
| 171 |
+
Munmun De Choudhury, Emre Kiciman, Mark Dredze, Glen Coppersmith, and Mrinal Kumar. 2016. Discovering shifts to suicidal ideation from mental health content in social media. In Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems, San Jose, CA, USA, May 7-12, 2016, pages 2098-2110. ACM.
|
| 172 |
+
|
| 173 |
+
Glen Coppersmith, Ryan Leary, Patrick Crutchley, and Alex Fine. 2018. Natural language processing of social media as screening for suicide risk. *Biomedical informatics insights*, 10:1178222618792860.
|
| 174 |
+
Norberto Nuno Gomes de Andrade, Dave Pawson, Dan Muriello, Lizzy Donahue, and Jennifer Guadagno. 2018. Ethics and artificial intelligence: suicide prevention on facebook. Philosophy & Technology, 31(4):669-684.
|
| 175 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 176 |
+
Barbara J Drew, Patricia Harris, Jessica K Zegre-Hemsey, Tina Mamone, Daniel Schindler, Rebecca Salas-Boni, Yong Bai, Adelita Tinoco, Quan Ding, and Xiao Hu. 2014. Insights into the problem of alarm fatigue with physiologic monitor devices: a comprehensive observational study of consecutive intensive care unit patients. PloS one, 9(10):e110274.
|
| 177 |
+
Casey Fiesler and Nicholas Proferes. 2018. "participant" perceptions of twitter research ethics. *Social Media + Society*, 4(1):2056305118763366.
|
| 178 |
+
Manas Gaur, Amanuel Alambo, Joy Prakash Sain, Ugur Kursuncu, Krishnaprasad Thirunarayan, Ramakanth Kavuluru, Amit P. Sheth, Randy S. Welton, and Jyotishman Pathak. 2019. Knowledge-aware assessment of severity of suicide risk for early intervention. In The World Wide Web Conference, WWW 2019, San Francisco, CA, USA, May 13-17, 2019, pages 514-525. ACM.
|
| 179 |
+
Manas Gaur, Vamsi Aribandi, Amanuel Alambo, Ugur Kursuncu, Krishnaprasad Thirunarayan, Jonathan Beich, Jyotishman Pathak, and Amit Sheth. 2021. Characterization of time-variant and time-invariant assessment of suicidality on reddit using c-ssrs. PloS one, 16(5):e0250448.
|
| 180 |
+
Robert N Golden, Carla Weiland, and Fred Peterson. 2009. The truth about illness and disease. Infobase Publishing.
|
| 181 |
+
Holly Hedegaard, Sally C Curtin, and Margaret Warner. 2021. Suicide mortality in the united states, 1999-2019. NCHS data brief, (398):1-8.
|
| 182 |
+
Dirk Hovy and Shannon L. Spruit. 2016. The social impact of natural language processing. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 591-598, Berlin, Germany. Association for Computational Linguistics.
|
| 183 |
+
|
| 184 |
+
Honor Hsin, John Torous, and Laura Roberts. 2016. An Adjuvant Role for Mobile Health in Psychiatry. JAMA Psychiatry, 73(2):103-104.
|
| 185 |
+
Alejandro Interian, Megan Chesin, Anna Kline, Rachael Miller, Lauren St. Hill, Miriam Latorre, Anton Shcherbakov, Arlene King, and Barbara Stanley. 2018. Use of the columbia-suicide severity rating scale (c-ssrs) to classify suicidal behaviors. Archives of suicide research, 22(2):278-294.
|
| 186 |
+
Shaoxiong Ji, Xue Li, Zi Huang, and Erik Cambria. 2021a. Suicidal ideation and mental disorder detection with attentive relation networks. *Neural Computing and Applications*.
|
| 187 |
+
Shaoxiong Ji, Shirui Pan, Xue Li, Erik Cambria, Guodong Long, and Zi Huang. 2021b. Suicidal ideation detection: A review of machine learning methods and applications. IEEE Transactions on Computational Social Systems, 8(1):214-226.
|
| 188 |
+
John G Keilp, Michael F Grunebaum, Marianne Gorlyn, Simone LeBlanc, Ainsley K Burke, Hanga Galfalyv, Maria A Oquendo, and J John Mann. 2012. Suicidal ideation and the subjective aspects of depression. Journal of affective disorders, 140(1):75-81.
|
| 189 |
+
Mrinal Kumar, Mark Dredze, Glen Coppersmith, and Munmun De Choudhury. 2015. Detecting changes in suicide content manifested in social media following celebrity suicides. In Proceedings of the 26th ACM Conference on Hypertext & Social Media, HT '15, page 85-94, New York, NY, USA. Association for Computing Machinery.
|
| 190 |
+
Kathryn P Linthicum, Katherine Musacchio Schafer, and Jessica D Ribeiro. 2019. Machine learning in suicide science: Applications and ethics. Behavioral sciences & the law, 37(3):214-222.
|
| 191 |
+
Zi Yin Liu, Zhikang Wang, Paul Pu Liang, Ruslan Salakhutdinov, Louis-Philippe Morency, and Masahito Ueda. 2019. Deep gamblers: Learning to abstain with portfolio theory. 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 10622-10632.
|
| 192 |
+
Matthew Matero, Akash Idnani, Youngseo Son, Salvatore Giorgi, Huy Vu, Mohammad Zamani, Parth Limbachiya, Sharath Chandra Guntuku, and H. Andrew Schwartz. 2019. Suicide risk assessment with multi-level dual-context language and BERT. In Proceedings of the Sixth Workshop on Computational Linguistics and Clinical Psychology, pages 39-44, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 193 |
+
William V McCall, Ben Porter, Ashley R Pate, Courtney J Bolstad, Christopher W Drapeau, Andrew D Krystal, Ruth M Benca, Meredith E Rumble, and
|
| 194 |
+
|
| 195 |
+
Michael R Nadorff. 2021. Examining suicide assessment measures for research use: Using item response theory to optimize psychometric assessment for research on suicidal ideation in major depressive disorder. Suicide and Life-Threatening Behavior, 51(6):1086-1094.
|
| 196 |
+
Catherine M McHugh, Amy Corderoy, Christopher James Ryan, Ian B Hickie, and Matthew Michael Large. 2019. Association between suicidal ideation and suicide: meta-analyses of odds ratios, sensitivity, specificity and positive predictive value. BJPsych open, 5(2).
|
| 197 |
+
Rohan Mishra, Pradyumn Prakhar Sinha, Ramit Sawhney, Debanjan Mahata, Puneet Mathur, and Rajiv Ratn Shah. 2019. SNAP-BATNET: Cascading author profiling and social network graphs for suicide ideation detection on social media. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Student Research Workshop, pages 147-156, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 198 |
+
John L Oliffe, John S Ogrodniczuk, Joan L Bottorff, Joy L Johnson, and Kristy Hoyak. 2012. "you feel like you can't live anymore": Suicide from the perspectives of canadian men who experience depression. Social science & medicine, 74(4):506-514.
|
| 199 |
+
Kelly Posner, Gregory K Brown, Barbara Stanley, David A Brent, Kseniya V Yershova, Maria A Oquendo, Glenn W Currier, Glenn A Melvin, Laurence Greenhill, Sa Shen, et al. 2011. The columbia-suicide severity rating scale: initial validity and internal consistency findings from three multisite studies with adolescents and adults. American journal of psychiatry, 168(12):1266-1277.
|
| 200 |
+
Cornelius Puschman. 2017. Bad judgment, bad ethics? Internet Research Ethics for the Social Age, page 95.
|
| 201 |
+
The Register. 2020. Researchers made an openai gpt-3 medical chatbot as an experiment. it told a mock patient to kill themselves.
|
| 202 |
+
Ramit Sawhney, Harshit Joshi, Saumya Gandhi, and Rajiv Ratn Shah. 2021a. Towards ordinal suicide ideation detection on social media. WSDM '21, page 22-30, New York, NY, USA. Association for Computing Machinery.
|
| 203 |
+
Ramit Sawhney, Harshit Joshi, Rajiv Ratn Shah, and Lucie Flek. 2021b. Suicide ideation detection via social and temporal user representations using hyperbolic learning. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2176-2190, Online. Association for Computational Linguistics.
|
| 204 |
+
Han-Chin Shing, Philip Resnik, and Douglas Oard. 2020. A prioritization model for suicidality risk assessment. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics,
|
| 205 |
+
|
| 206 |
+
pages 8124-8137, Online. Association for Computational Linguistics.
|
| 207 |
+
Pradyumna Prakhar Sinha, Rohan Mishra, Ramit Sawhney, Debanjan Mahata, Rajiv Ratn Shah, and Huan Liu. 2019. #suicidal - A multipronged approach to identify and explore suicidal ideation in twitter. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, CIKM 2019, Beijing, China, November 3-7, 2019, pages 941-950. ACM.
|
| 208 |
+
Dean F Sittig and Hardeep Singh. 2015. A new socio-technical model for studying health information technology in complex adaptive healthcare systems. In Cognitive informatics for biomedicine, pages 59–80. Springer.
|
| 209 |
+
Takanao Tanaka and Shohei Okamoto. 2021. Increase in suicide following an initial decline during the COVID-19 pandemic in japan. Nature human behaviour, 5(2):229-238.
|
| 210 |
+
|
| 211 |
+
WHO. 2019. Suicide data.
|
| 212 |
+
|
| 213 |
+
Ayah Zirikly, Philip Resnik, Ozlem Uzuner, and Kristy Hollingshead. 2019. CLPsych 2019 shared task: Predicting the degree of suicide risk in Reddit posts. In Proceedings of the Sixth Workshop on Computational Linguistics and Clinical Psychology, pages 24-33, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 214 |
+
Liu Ziyin, Blair Chen, Ru Wang, Paul Pu Liang, Ruslan Salakhutdinov, Louis-Philippe Morency, and Masahito Ueda. 2020. Learning not to learn in the presence of noisy labels. ArXiv, abs/2002.06541.
|
ariskaversemechanismforsuicidalityassessmentonsocialmedia/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76186225bc026463e499e44f72f965bdc367c8aeb085d32d8a3b9a135cd65fee
|
| 3 |
+
size 238435
|
ariskaversemechanismforsuicidalityassessmentonsocialmedia/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:525c11cc629a39850b73c1b258504b0495693f5caaf566638a239056ae33cd7f
|
| 3 |
+
size 271112
|
asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/573baed7-2e3b-439a-b9d0-84ca585b4797_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:793abb216f9d129e43615cc60436f6b0eae3effd7b631b60b9c69d1c86b61299
|
| 3 |
+
size 57213
|
asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/573baed7-2e3b-439a-b9d0-84ca585b4797_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d22012ef3b7a87a39a59d686b71bcb38f4d271948ce5a9f48820c6a6bc7b8a62
|
| 3 |
+
size 68739
|
asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/573baed7-2e3b-439a-b9d0-84ca585b4797_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f73a1947affdd54044d4d6bbf13ed1f26548cc564baa2527b1a1f5535b7f1a89
|
| 3 |
+
size 1049436
|
asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/full.md
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A Simple but Effective Pluggable Entity Lookup Table for Pre-trained Language Models
|
| 2 |
+
|
| 3 |
+
Deming Ye $^{1,2}$ , Yankai Lin $^{6}$ , Peng Li $^{6,7}$ , Maosong Sun $^{1,2,3,4,5*}$ , Zhiyuan Liu $^{1,2,3,5}$
|
| 4 |
+
|
| 5 |
+
$^{1}$ Dept. of Comp. Sci. & Tech., Institute for AI, Tsinghua University, Beijing, China
|
| 6 |
+
|
| 7 |
+
$^{2}$ Beijing National Research Center for Information Science and Technology
|
| 8 |
+
|
| 9 |
+
$^{3}$ International Innovation Center of Tsinghua University, Shanghai, China
|
| 10 |
+
|
| 11 |
+
$^{4}$ Jiangsu Collaborative Innovation Center for Language Ability, Xuzhou, China
|
| 12 |
+
|
| 13 |
+
$^{5}$ Institute Guo Qiang, Tsinghua University $^{6}$ Pattern Recognition Center, WeChat AI
|
| 14 |
+
|
| 15 |
+
$^{7}$ Institute for AI Industry Research (AIR), Tsinghua University
|
| 16 |
+
|
| 17 |
+
yedeming001@163.com
|
| 18 |
+
|
| 19 |
+
# Abstract
|
| 20 |
+
|
| 21 |
+
Pre-trained language models (PLMs) cannot well recall rich factual knowledge of entities exhibited in large-scale corpora, especially those rare entities. In this paper, we propose to build a simple but effective Pluggable Entity Lookup Table (PELT) on demand by aggregating the entity's output representations of multiple occurrences in the corpora. PELT can be compatibly plugged as inputs to infuse supplemental entity knowledge into PLMs. Compared to previous knowledge-enhanced PLMs, PELT only requires $0.2\% \sim 5\%$ pre-computation with capability of acquiring knowledge from out-of-domain corpora for domain adaptation scenario. The experiments on knowledge-related tasks demonstrate that our method, PELT, can flexibly and effectively transfer entity knowledge from related corpora into PLMs with different architectures. Our code and models are publicly available at https://github.com/thunlp/PELT.
|
| 22 |
+
|
| 23 |
+
# 1 Introduction
|
| 24 |
+
|
| 25 |
+
Recent advance in pre-trained language models (PLMs) has achieved promising improvements in various downstream tasks (Devlin et al., 2019; Liu et al., 2019). Some latest works reveal that PLMs can automatically acquire knowledge from large-scale corpora via self-supervised pre-training and then encode the learned knowledge into their model parameters (Tenney et al., 2019; Petroni et al., 2019; Roberts et al., 2020). However, due to the limited capacity of vocabulary, existing PLMs face the challenge of recalling the factual knowledge from their parameters, especially for those rare entities (Gao et al., 2019a; Wang et al., 2021a).
|
| 26 |
+
|
| 27 |
+
To improve PLMs' capability of entity understanding, a straightforward solution is to exploit
|
| 28 |
+
|
| 29 |
+
<table><tr><td>Model</td><td>#Ent</td><td>Pre-Comp.</td><td>D-Adapt</td></tr><tr><td>Zhang et al. (2019)</td><td>5.0M</td><td>~160h</td><td>No</td></tr><tr><td>Wang et al. (2021b)</td><td>4.6M</td><td>~3,400h</td><td>No</td></tr><tr><td>Yamada et al. (2020)</td><td>0.5M</td><td>~3,800h</td><td>No</td></tr><tr><td>PELT (our model)</td><td>4.6M</td><td>7h</td><td>Yes</td></tr></table>
|
| 30 |
+
|
| 31 |
+
Table 1: Comparison of recent knowledge-enhanced PLMs. We report the pre-computation of BASE models on Wikipedia entities on a V100 GPU. Pre-Comp.: Pre-computation; D-Adapt: Domain Adaptation.
|
| 32 |
+
|
| 33 |
+
an external entity embedding acquired from the knowledge graph (KG) (Zhang et al., 2019; Liu et al., 2020; Wang et al., 2020), the entity description (Peters et al., 2019), or the corpora (Pörner et al., 2020). In order to make use of the external knowledge, these models usually learn to align the external entity embedding (Bordes et al., 2013; Yamada et al., 2016) to the their original word embedding. However, previous works ignore to explore entity embedding from the PLM itself, which makes their learned embedding mapping is not available in the domain-adaptation. Other recent works attempt to infuse knowledge into PLMs' parameters by extra pre-training, such as learning to build an additional entity vocabulary from the corpora (Yamada et al., 2020; Févry et al., 2020), or adopting entity-related pre-training tasks to intensify the entity representation (Xiong et al., 2020; Sun et al., 2020; Wang et al., 2021b). However, their huge pre-computation increases the cost of extending or updating the customized vocabulary for various downstream tasks.
|
| 34 |
+
|
| 35 |
+
In this paper, we introduce a simple but effective Pluggable Entity Lookup Table (PELT) to infuse knowledge into PLMs. To be specific, we first revisit the connection between PLMs' input features and output representations for masked language modeling. Based on this, given a new corpus, we aggregate the output representations of masked tokens from the entity's occurrences, to recover
|
| 36 |
+
|
| 37 |
+
an elaborate entity embedding from a well-trained PLM. Benefiting from the compatibility and flexibility of the constructed embedding, we can directly insert them into the corresponding positions of the input sequence to provide supplemental entity knowledge. As shown in Table 1, our method merely consumes $0.2\% \sim 5\%$ pre-computation compared with previous works, and it also supports the vocabulary from different domains simultaneously.
|
| 38 |
+
|
| 39 |
+
We conduct experiments on two knowledge-related tasks, including knowledge probe and relation classification, across two domains (Wikipedia and biomedical publication). Experimental results show that PLMs with PELT can consistently and significantly outperform the corresponding vanilla models. In addition, the entity embedding obtained from multiple domains are compatible with the original word embedding and can be applied and transferred swiftly.
|
| 40 |
+
|
| 41 |
+
# 2 Methodology
|
| 42 |
+
|
| 43 |
+
In this section, we first revisit the masked language modeling pre-training objective. After that, we introduce the pluggable entity lookup table and explain how to apply it to incorporate knowledge into PLMs.
|
| 44 |
+
|
| 45 |
+
# 2.1 Revisit Masked Language Modeling
|
| 46 |
+
|
| 47 |
+
PLMs conduct self-supervised pre-training tasks, such as masked language modeling (MLM) (Devlin et al., 2019), to learn the semantic and syntactic knowledge from the large-scale unlabeled corpora (Rogers et al., 2020). MLM can be regarded as a kind of cloze task, which requires the model to predict the missing tokens based on its contextual representation. Formally, given a sequence of tokens $X = (x_{1}, x_{2}, \ldots, x_{n})$ , with $x_{i}$ substituted by [MASK], PLMs, such as BERT, first take tokens' word embedding and position embedding as input and obtain the contextual representation:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\boldsymbol {H} = \operatorname {E n c} (\text {L a y e r N o r m} (\mathbf {E} (X) + \boldsymbol {P})), \quad (1)
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $\mathrm{Enc}(\cdot)$ denotes a deep bidirectional Transformer encoder, LayerNorm( $\cdot$ ) denotes layer normalization (Ba et al., 2016), $\mathbf{E} \in \mathbb{R}^{|V| \times D}$ is the word embedding matrix, $V$ is the word vocabulary, $P$ is the absolute position embedding and $\pmb{H} = (h_1, h_2, \dots, h_n)$ is the contextual representation. After that, BERT applies a feed-forward network (FFN) and layer normalization on the con
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
Figure 1: An illustration of the our PELT.
|
| 57 |
+
|
| 58 |
+
textual representation to compute the output representation of $x_{i}$ :
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\boldsymbol {r} _ {x _ {i}} = \operatorname {L a y e r N o r m} \left(\operatorname {F F N} \left(\boldsymbol {h} _ {i}\right)\right). \tag {2}
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
Since the weights in the softmax layer and word embeddings are tied in BERT, the model calculate the product of $r_{x_i}$ and the input word embedding matrix to further compute $x_i$ 's cross-entropy loss among all the words:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\begin{array}{l} \mathcal {L} = - \sum \log \Pr \left(x _ {i} \mid \boldsymbol {r} _ {x _ {i}}\right) \\ = - \sum \log \frac {\exp \left(\mathbf {E} \left(x _ {i}\right) ^ {T} \boldsymbol {r} _ {x _ {i}}\right)}{\sum_ {w _ {j} \in V} \exp \left(\mathbf {E} \left(w _ {j}\right) ^ {T} \boldsymbol {r} _ {x _ {i}}\right)}. \tag {3} \\ \end{array}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
# 2.2 Construct Pluggable Entity Embedding
|
| 71 |
+
|
| 72 |
+
Due to the training efficiency, the vocabulary sizes in existing PLMs typically range from 30K to 60K subword units, and thus PLMs have to disperse the information of massive entities into their subword embeddings. Through revisiting the MLM loss in Eq. 3, we could intuitively observe that the word embedding and the output representation of BERT are located in the same vector space. Hence, we are able to recover the entity embedding from BERT's output representations to infuse their contextualized knowledge to the model.
|
| 73 |
+
|
| 74 |
+
To be specific, given a general or domain-specific corpus, we design to build the lookup table for entities that occurs in the downstream tasks on demand. For an entity $e$ , such as a Wikidata entity or a proper noun entity, we construct its embedding $\mathbf{E}(e)$ as follows:
|
| 75 |
+
|
| 76 |
+
Direction A feasible method to add entity $e$ to the vocabulary of PLM is to optimize its embedding $\mathbf{E}(e)$ for the MLM loss with other parameters frozen. We collect the sentences $S_{e}$ that contain entity $e$ and substitute it with [MASK]. The total influence of $\mathbf{E}(e)$ to the MLM loss in $S_{e}$ can be formulated as:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\begin{array}{l} \mathcal {L} (e) = - \sum_ {x _ {i} \in S _ {e}} \log \Pr (e | \boldsymbol {r} _ {x _ {i}}) \\ = \sum_ {x _ {i} \in S _ {e}} \log Z _ {x _ {i}} - \mathbf {E} (e) ^ {T} \sum_ {x _ {i} \in S _ {e}} \boldsymbol {r} _ {x _ {i}}, \tag {4} \\ \end{array}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $Z_{x_i} = \sum_{w_j\in V\cup \{e\}}\exp (\mathbf{E}(w_j)^T\pmb {r}_{x_i})$ $x_{i}$ is the replaced masked token for entity $e$ and $\pmb{r}_{x_i}$ is the PLM's output representation of $x_{i}$
|
| 83 |
+
|
| 84 |
+
Compared with the total impact of the entire vocabulary on $Z_{x_i}$ , $\mathbf{E}(e)$ has a much smaller impact. If we ignore the minor effect of $\mathbf{E}(e)$ on $Z_{x_i}$ , the optimal solution of $\mathbf{E}(e)$ for $\mathcal{L}(e)$ is proportional to $\sum_{x_i \in S_e} r_{x_i}$ . Hence, we set $\mathbf{E}(e)$ as:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\mathbf {E} (e) = C \cdot \sum_ {x _ {i} \in S _ {e}} \boldsymbol {r} _ {x _ {i}}, \tag {5}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
where $C$ denotes the scaling factor.
|
| 91 |
+
|
| 92 |
+
Practically, $\mathbf{E}(e)$ also serves as the negative log-likelihood of other words' MLM loss (Kong et al., 2020). However, Gao et al. (2019a) indicates that the gradient from such negative log-likelihood will push all words to a uniformly negative direction, which weakens the quality of rare words' representation. Here, we ignore this negative term and obtain the informative entity embedding from Eq. 5.
|
| 93 |
+
|
| 94 |
+
Norm We define $\pmb{p}(e)$ as the position embedding for entity $e$ . Since the layer normalization in Eq. 1 makes the norm $|\mathbf{E}(e) + \pmb{p}(e)|$ to $D^{\frac{1}{2}}$ , we find that the norm $|\mathbf{E}(e)|$ has little effect on the input feature of the encoder in use. Therefore, we set the norm of all the entity embeddings as a constant $L$ . Then, we evaluate the model with different $L$ on the unsupervised knowledge probe task and choose the best $L$ for those fine-tuning tasks.
|
| 95 |
+
|
| 96 |
+
# 2.3 Infuse Entity Knowledge into PLMs
|
| 97 |
+
|
| 98 |
+
Since the entity embedding we obtained and the original word embedding are both obtained from the masked language modeling objective, the entity can be regarded as a special input token. To infuse entity knowledge into PLMs, we apply a pair of bracket to enclose the constructed entity embedding and then insert it after the original entity's subwords. For example, the original input,
|
| 99 |
+
|
| 100 |
+
Most people with COVID-19 have a dry [MASK] they can feel in their chest.
|
| 101 |
+
|
| 102 |
+
becomes
|
| 103 |
+
|
| 104 |
+
Most people with COVID-19 (COVID-19) have a dry [MASK] they can feel in their chest.
|
| 105 |
+
|
| 106 |
+
Here, the entity COVID-19 adopts our constructed entity embedding and other words use their original embedding. We simply convey the modified input to the PLM for encoding without any additional structures or parameters, to help the model predict [MASK] as cough.
|
| 107 |
+
|
| 108 |
+
A note on entity links In previous section, we hypothesize that we know the entity linking annotations for the involved string name. In practice, we can obtain the gold entity links provided by some datasets like FewRel 1.0. For the datasets where the linking annotations are not available, we employ a heuristic string matching for entity linking<sup>1</sup>.
|
| 109 |
+
|
| 110 |
+
# 3 Experiment
|
| 111 |
+
|
| 112 |
+
# 3.1 Implementation Details
|
| 113 |
+
|
| 114 |
+
We choose RoBERTa<sub>Base</sub> (Liu et al., 2019), a well-optimized PLM, as our baseline model and we equip it with our constructed entity embedding to obtain the PELT model. For the knowledge probe task, we further experiment with another encoder-architecture model, uncased BERT<sub>Base</sub> (Devlin et al., 2019), and an encoder-decoder-architecture model, BART<sub>Base</sub> (Lewis et al., 2020).
|
| 115 |
+
|
| 116 |
+
We adopt Wikipedia and biomedical S2ORC (Lo et al., 2020) as the domain-specific corpora and split them into sentences with NLTK (Xue, 2011). For Wikipedia, we adopt a heuristic entity linking strategy with the help of hyperlink annotations. For the used FewRel 1.0 and Wiki80 datasets, we directly use the annotated linking information. For other datasets, we link the given entity name through a simple string match. For each necessary entity, we first extract up to 256 sentences containing the entity from the corpora. We adopt Wikipedia as the domain-specific corpus for FewRel 1.0, Wiki80 and LAMA, and we adopt S2ORC as the domain-specific corpus for FewRel 2.0. After that, we construct the entity embedding according to Section 2.2.
|
| 117 |
+
|
| 118 |
+
We search the norm of entity embedding $L$ among 1-10 on the knowledge probe task. We find $L = 7, 10, 3$ performs a bit better for RoBERTa, BERT and BART respectively. In the fine-tuning process, we freeze the constructed embeddings as an lookup table with the corresponding norm. After that, we run all the fine-tuning experiments with 5 different seeds and report the average score.
|
| 119 |
+
|
| 120 |
+
# 3.2 Baselines
|
| 121 |
+
|
| 122 |
+
We select three of the most representative entity-aware baselines, which adopt an external entity embedding, an entity-related pre-training task, or a trainable entity embedding: (1) ERNIE (Zhang et al., 2019) involves the entity embedding learned from Wikidata relation (Bordes et al., 2013). We
|
| 123 |
+
|
| 124 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">Ext. Pretrain</td><td colspan="4">FewRel 1.0</td><td colspan="4">FewRel 2.0</td></tr><tr><td>5-1</td><td>5-5</td><td>10-1</td><td>10-5</td><td>5-1</td><td>5-5</td><td>10-1</td><td>10-5</td></tr><tr><td>ERNIE†</td><td>✓</td><td>92.7±0.2</td><td>97.9±0.0</td><td>87.7±0.4</td><td>96.1±0.1</td><td>66.4±1.6</td><td>88.2±0.5</td><td>51.2±0.7</td><td>80.1±1.0</td></tr><tr><td>KEPLER</td><td>✓</td><td>90.8±0.1</td><td>96.9±0.1</td><td>85.1±0.1</td><td>94.2±0.1</td><td>74.0±1.0</td><td>89.2±0.2</td><td>61.7±0.1</td><td>82.1±0.1</td></tr><tr><td>LUKE</td><td>✓</td><td>91.8±0.4</td><td>97.5±0.1</td><td>85.3±0.4</td><td>95.3±0.1</td><td>64.8±1.4</td><td>89.2±0.2</td><td>46.6±0.8</td><td>80.5±0.5</td></tr><tr><td>RoBERTa</td><td>-</td><td>90.4±0.3</td><td>96.2±0.0</td><td>84.2±0.5</td><td>93.9±0.1</td><td>71.2±2.1</td><td>89.4±0.2</td><td>53.3±0.8</td><td>83.1±0.4</td></tr><tr><td>PELT</td><td>-</td><td>92.7±0.3</td><td>97.5±0.0</td><td>87.5±0.3</td><td>95.4±0.1</td><td>75.0±1.3</td><td>92.1±0.2</td><td>60.4±1.1</td><td>85.6±0.2</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Table 2: The accuracy on the FewRel dataset. $N-K$ indicates the $N$ -way $K$ -shot configuration. Both of FewRel 1.0 and FewRel 2.0 are trained on the Wikipedia domain, and FewRel 2.0 is tested on the biomedical domain. $\mathrm{ERNIE}^{\dagger}$ has seen facts in the FewRel 1.0 test set during pre-training. We report standard deviations as subscripts.
|
| 127 |
+
|
| 128 |
+
<table><tr><td>Model</td><td>1%</td><td>10%</td><td>100%</td></tr><tr><td>ERNIE</td><td>66.4±0.4</td><td>87.7±0.2</td><td>93.4±0.1</td></tr><tr><td>KEPLER</td><td>62.3±1.0</td><td>85.4±0.2</td><td>91.7±0.1</td></tr><tr><td>LUKE</td><td>63.1±1.0</td><td>86.9±0.4</td><td>92.9±0.1</td></tr><tr><td>RoBERTa</td><td>59.8±1.7</td><td>85.7±0.2</td><td>91.7±0.1</td></tr><tr><td>PELT</td><td>65.6±1.0</td><td>88.3±0.3</td><td>93.4±0.1</td></tr></table>
|
| 129 |
+
|
| 130 |
+
adopt the RoBERTa version of ERNIE provided by Wang et al. (2021b); (2) KEPLER (Wang et al., 2021b) encodes textual entity description into entity embedding and learns fact triples and language modeling simultaneously; (3) LUKE (Yamada et al., 2020) learns a trainable entity embedding to help the model predict masked tokens and masked entities in the sentences.
|
| 131 |
+
|
| 132 |
+
# 3.3 Relation Classification
|
| 133 |
+
|
| 134 |
+
Relation Classification (RC) aims to predict the relationship between two entities in a given text. We evaluate the models on two scenarios, the few-shot setting and the full-data setting.
|
| 135 |
+
|
| 136 |
+
The few-shot setting focuses on long-tail relations without sufficient training instances. We evaluate models on FewRel 1.0 (Han et al., 2018) and FewRel 2.0 (Gao et al., 2019b). FewRel 1.0 contains instances with Wikidata facts and FewRel 2.0 involves a biomedical-domain test set to examine the ability of domain adaptation. In the $N$ -way $K$ -shot setting, models are required to categorize the query as one of the existing $N$ relations, each of which contains $K$ supporting samples. We choose the state-of-the-art few-shot framework Proto (Snell et al., 2017) with different PLM encoders for evaluation. For the full-data setting, we evaluate models on the Wiki80, which contains 80 relation types from Wikidata. We also add $1\%$ and $10\%$ settings, meaning using only $1\% / 10\%$
|
| 137 |
+
|
| 138 |
+
Table 3: The accuracy on the test set of Wiki80. $1\% /10\%$ indicate using $1\% /10\%$ supervised training data respectively.
|
| 139 |
+
|
| 140 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">LAMA</td><td colspan="2">LAMA-UHN</td></tr><tr><td>G-RE</td><td>T-REx</td><td>G-RE</td><td>T-REx</td></tr><tr><td>ERNIE</td><td>10.0</td><td>24.9</td><td>5.9</td><td>19.4</td></tr><tr><td>KEPLER</td><td>5.5</td><td>23.4</td><td>2.5</td><td>15.4</td></tr><tr><td>LUKE</td><td>3.8</td><td>32.0</td><td>2.0</td><td>25.3</td></tr><tr><td>RoBERTa</td><td>5.4</td><td>24.7</td><td>2.2</td><td>17.0</td></tr><tr><td>PELT</td><td>6.4</td><td>27.5</td><td>2.8</td><td>19.3</td></tr><tr><td>BERT</td><td>13.9</td><td>34.9</td><td>8.8</td><td>26.8</td></tr><tr><td>BERT-PELT</td><td>13.3</td><td>40.7</td><td>8.9</td><td>34.5</td></tr><tr><td>BART</td><td>5.1</td><td>15.9</td><td>1.3</td><td>12.0</td></tr><tr><td>BART-PELT</td><td>6.9</td><td>24.4</td><td>2.1</td><td>14.9</td></tr></table>
|
| 141 |
+
|
| 142 |
+
Table 4: Mean P@1 on the knowledge probe benchmark. G-RE: Google-RE.
|
| 143 |
+
|
| 144 |
+
data of the training sets.
|
| 145 |
+
|
| 146 |
+
As shown in Table 2 and Table 3, on FewRel 1.0 and Wiki80 in Wikipedia domain, RoBERTa with PELT beats the RoBERTa model by a large margin (e.g. $+3.3\%$ on 10way-1shot), and it even achieves comparable performance with ERNIE, which has access to the knowledge graph. Our model also gains huge improvements on FewRel 2.0 in the biomedical domain (e.g. $+7.1\%$ on 10way-1shot), while the entity-aware baselines have little advance in most settings. Compared with most existing entity-aware PLMs which merely obtain domain-specific knowledge in the pre-training phase, our proposed pluggable entity lookup table can dynamically update the models' knowledge from the out-of-domain corpus on demand.
|
| 147 |
+
|
| 148 |
+
# 3.4 Knowledge Probe
|
| 149 |
+
|
| 150 |
+
We conduct experiments on a widely-used knowledge probe dataset, LAMA (Petroni et al., 2019). It applies cloze-style questions to examine PLMs' ability on recalling facts from their parameters. For example, given a question template Paris is the capital of [MASK], PLMs are required to predict the masked token properly. In this paper, we not only
|
| 151 |
+
|
| 152 |
+
<table><tr><td>Model</td><td>[0,10)</td><td>[10,50)</td><td>[50,100)</td><td>[100,+)</td></tr><tr><td>RoBERTa</td><td>18.1</td><td>21.1</td><td>25.8</td><td>26.1</td></tr><tr><td>PELT</td><td>21.9</td><td>24.8</td><td>29.0</td><td>28.7</td></tr></table>
|
| 153 |
+
|
| 154 |
+
Table 5: Mean P@1 on T-Rex with respect to the subject entity's frequency in Wikipedia.
|
| 155 |
+
|
| 156 |
+
use Google-RE and T-REx (ElSahar et al., 2018) which focus on factual knowledge, but also evaluate models on LAMA-UHN (Pörner et al., 2020) which filters out the easy questionable templates.
|
| 157 |
+
|
| 158 |
+
As shown in Table 4, without any pre-training, the PELT model can directly absorb the entity knowledge from the extended input sequence to recall more factual knowledge, which demonstrates that the entity embeddings we constructed are compatible with original word embeddings. We also find that our method can also bring huge improvements to both BERT and BART in the knowledge probe task, which proves our method's generalization on different-architecture PLMs.
|
| 159 |
+
|
| 160 |
+
Effect of Entity Frequency Table 5 shows the P@1 results with respect to the entity frequency. While RoBERTa performs worse on rare entities than frequent entities, PELT brings a substantial improvement on rare entities, i.e., near 3.8 mean P@1 gains on entities that occur less than 50 times.
|
| 161 |
+
|
| 162 |
+
# 4 Conclusion
|
| 163 |
+
|
| 164 |
+
In this paper, we propose PELT, a flexible entity lookup table, to incorporate up-to-date knowledge into PLMs. By constructing entity embeddings on demand, PLMs with PELT can recall rich factual knowledge to help downstream tasks.
|
| 165 |
+
|
| 166 |
+
# Acknowledgement
|
| 167 |
+
|
| 168 |
+
This work is supported by the National Key R&D Program of China (No. 2020AAA0106502), Institute Guo Qiang at Tsinghua University, and International Innovation Center of Tsinghua University, Shanghai, China. We thank Zhengyan Zhang and other members of THUNLP for their helpful discussion and feedback. Deming Ye conducted the experiments. Deming Ye, Yankai Lin, Xiaojun Xie and Peng Li wrote the paper. Maosong Sun and Zhiyuan Liu provided valuable advices to the research.
|
| 169 |
+
|
| 170 |
+
# References
|
| 171 |
+
|
| 172 |
+
Lei Jimmy Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. 2016. Layer normalization. CoRR, abs/1607.06450.
|
| 173 |
+
Antoine Bordes, Nicolas Usunier, Alberto García-Durán, Jason Weston, and Oksana Yakhnenko. 2013. Translating embeddings for modeling multirelational data. In Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013. Proceedings of a meeting held December 5-8, 2013, Lake Tahoe, Nevada, United States, pages 2787-2795.
|
| 174 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
|
| 175 |
+
Hady ElSahar, Pavlos Vougiouklis, Arslen Remaci, Christophe Gravier, Jonathon S. Hare, Frédérique Laforest, and Elena Simperl. 2018. T-rex: A large scale alignment of natural language with knowledge base triples. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation, LREC 2018, Miyazaki, Japan, May 7-12, 2018. European Language Resources Association (ELRA).
|
| 176 |
+
Thibault Févry, Livio Baldini Soares, Nicholas FitzGerald, Eunsol Choi, and Tom Kwiatkowski. 2020. Entities as experts: Sparse memory access with entity supervision. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4937-4951, Online. Association for Computational Linguistics.
|
| 177 |
+
Jun Gao, Di He, Xu Tan, Tao Qin, Liwei Wang, and TieYan Liu. 2019a. Representation degeneration problem in training natural language generation models. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.
|
| 178 |
+
Tianyu Gao, Xu Han, Hao Zhu, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. 2019b. FewRel 2.0: Towards more challenging few-shot relation classification. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 6250-6255, Hong Kong, China. Association for Computational Linguistics.
|
| 179 |
+
Xu Han, Hao Zhu, Pengfei Yu, Ziyun Wang, Yuan Yao, Zhiyuan Liu, and Maosong Sun. 2018. FewRel:
|
| 180 |
+
|
| 181 |
+
A large-scale supervised few-shot relation classification dataset with state-of-the-art evaluation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4803-4809, Brussels, Belgium. Association for Computational Linguistics.
|
| 182 |
+
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.
|
| 183 |
+
Lingpeng Kong, Cyprien de Masson d'Autume, Lei Yu, Wang Ling, Zihang Dai, and Dani Yogatama. 2020. A mutual information maximization perspective of language representation learning. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
|
| 184 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020. BART: denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020, pages 7871-7880. Association for Computational Linguistics.
|
| 185 |
+
Weijie Liu, Peng Zhou, Zhe Zhao, Zhiruo Wang, Qi Ju, Haotang Deng, and Ping Wang. 2020. K-BERT: enabling language representation with knowledge graph. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 2901-2908. AAAI Press.
|
| 186 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. RoBERTa: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692.
|
| 187 |
+
Kyle Lo, Lucy Lu Wang, Mark Neumann, Rodney Kinney, and Daniel Weld. 2020. S2ORC: The semantic scholar open research corpus. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4969-4983, Online. Association for Computational Linguistics.
|
| 188 |
+
Matthew E. Peters, Mark Neumann, Robert Logan, 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), pages 43-54, Hong Kong, China. Association for Computational Linguistics.
|
| 189 |
+
|
| 190 |
+
Fabio Petroni, Tim Rocttäschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander Miller. 2019. Language models as knowledge bases? In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 2463-2473, Hong Kong, China. Association for Computational Linguistics.
|
| 191 |
+
Nina Pörner, Ulli Waltinger, and Hinrich Schütze. 2020. E-BERT: efficient-yet-effective entity embeddings for BERT. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, Online Event, 16-20 November 2020, volume EMNLP 2020 of *Findings of ACL*, pages 803-818. Association for Computational Linguistics.
|
| 192 |
+
Adam Roberts, Colin Raffel, and Noam Shazeer. 2020. How much knowledge can you pack into the parameters of a language model? In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, Online, November 16-20, 2020, pages 5418-5426. Association for Computational Linguistics.
|
| 193 |
+
Anna Rogers, Olga Kovaleva, and Anna Rumshisky. 2020. A primer in bertology: What we know about how BERT works. Trans. Assoc. Comput. Linguistics, 8:842-866.
|
| 194 |
+
Jake Snell, Kevin Swersky, and Richard S. Zemel. 2017. Prototypical networks for few-shot learning. 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 4077-4087.
|
| 195 |
+
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, pages 3660-3670, Barcelona, Spain (Online). International Committee on Computational Linguistics.
|
| 196 |
+
Ian Tenney, Patrick Xia, Berlin Chen, Alex Wang, Adam Poliak, R. Thomas McCoy, Najoung Kim, Benjamin Van Durme, Samuel R. Bowman, Dipanjan Das, and Ellie Pavlick. 2019. What do you learn from context? probing for sentence structure in contextualized word representations. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net.
|
| 197 |
+
Cunxiang Wang, Pai Liu, and Yue Zhang. 2021a. Can generative pre-trained language models serve as knowledge bases for closed-book qa? In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, ACL/IJCNLP 2021, (Volume 1: Long Papers), Virtual Event, August 1-6, 2021, pages 3241-3251. Association for Computational Linguistics.
|
| 198 |
+
|
| 199 |
+
Ruize Wang, Duyu Tang, Nan Duan, Zhongyu Wei, Xuanjing Huang, Jianshu Ji, Guihong Cao, Daxin Jiang, and Ming Zhou. 2020. K-adapter: Infusing knowledge into pre-trained models with adapters. CoRR, abs/2002.01808.
|
| 200 |
+
Xiaozhi Wang, Tianyu Gao, Zhaocheng Zhu, Zhengyan Zhang, Zhiyuan Liu, Juanzi Li, and Jian Tang. 2021b. KEPLER: A unified model for knowledge embedding and pre-trained language representation. Trans. Assoc. Comput. Linguistics, 9:176-194.
|
| 201 |
+
Wenhan Xiong, Jingfei Du, William Yang Wang, and Veselin Stoyanov. 2020. Pretrained encyclopedia: Weakly supervised knowledge-pretrained language model. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net.
|
| 202 |
+
Nianwen Xue. 2011. Steven bird, evan klein and edward loper. Natural Language Processing with Python. o'reilly media, inc 2009. ISBN: 978-0-596-51649-9. Nat. Lang. Eng., 17(3):419-424.
|
| 203 |
+
Ikuya Yamada, Akari Asai, Hiroyuki Shindo, Hideaki Takeda, and Yuji Matsumoto. 2020. LUKE: Deep contextualized entity representations with entity-aware self-attention. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6442–6454, Online. Association for Computational Linguistics.
|
| 204 |
+
Ikuya Yamada, Hiroyuki Shindo, Hideaki Takeda, and Yoshiyasu Takefuji. 2016. Joint learning of the embedding of words and entities for named entity disambiguation. In Proceedings of the 20th SIGNLL Conference on Computational Natural Language Learning, CoNLL 2016, Berlin, Germany, August 11-12, 2016, pages 250-259. ACL.
|
| 205 |
+
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 Annual Meeting of the Association for Computational Linguistics, pages 1441-1451, Florence, Italy. Association for Computational Linguistics.
|
| 206 |
+
|
| 207 |
+
# A Heuristic String Matching for Entity Linking
|
| 208 |
+
|
| 209 |
+
For the Wikipedia, we first create a mapping from the anchor texts with hyperlinks to their referent Wikipedia pages. After that, We employ a heuristic string matching to link other potential entities to their pages.
|
| 210 |
+
|
| 211 |
+
For preparation, we collect the aliases of the entity from the redirect page of Wikipedia and the relation between entities from the hyperlink. Then, we apply spaCy ${}^{2}$ to recognize the entity name in the text. An entity name in the text may refer to
|
| 212 |
+
|
| 213 |
+
multiple entities of the same alias. We utilize the relation of the linked entity page to maintain an available entity page set for entity disambiguation.
|
| 214 |
+
|
| 215 |
+
# Algorithm 1 Heuristic string matching for entity disambiguation
|
| 216 |
+
|
| 217 |
+
$$
|
| 218 |
+
S \Leftarrow \{\text {t h e l i n k e d e n t i t y p a g e i n a n c h o r t e x t} \}
|
| 219 |
+
$$
|
| 220 |
+
|
| 221 |
+
$$
|
| 222 |
+
E \Leftarrow \{\text {p o t e n t i a l}
|
| 223 |
+
$$
|
| 224 |
+
|
| 225 |
+
# repeat
|
| 226 |
+
|
| 227 |
+
$S^{\prime}\Leftarrow \{$ the neighbor entity pages that have hyperlink or Wikidata relation with pages in $S\}$
|
| 228 |
+
|
| 229 |
+
$E^{\prime}\Leftarrow \{e|e\in E$ and $e$ can be uniquely linked to entity page in $S^{\prime}$ by string matching}
|
| 230 |
+
|
| 231 |
+
$$
|
| 232 |
+
E \Leftarrow E - E ^ {\prime}
|
| 233 |
+
$$
|
| 234 |
+
|
| 235 |
+
$$
|
| 236 |
+
S \Leftarrow E ^ {\prime}
|
| 237 |
+
$$
|
| 238 |
+
|
| 239 |
+
$$
|
| 240 |
+
\text {u n t i l} S = \phi
|
| 241 |
+
$$
|
| 242 |
+
|
| 243 |
+
Details of the heuristic string matching are shown in Algorithm 1, we match the entity name to surrounding entity page of the current page as close as possible. e will release all the source code and models with the pre-processed Wikipedia dataset.
|
| 244 |
+
|
| 245 |
+
For other datasets, we adopt a simple string matching for entity linking.
|
| 246 |
+
|
| 247 |
+
# B Training Configuration
|
| 248 |
+
|
| 249 |
+
We train all the models with Adam optimizer (Kingma and Ba, 2015), $10\%$ warming up steps and maximum 128 input tokens. Detailed training hyper-parameters are shown in Table 6.
|
| 250 |
+
|
| 251 |
+
We run all the experiments with 5 different seeds (42, 43, 44, 45, 46) and report the average score with the standard deviation. In the $1\%$ and $10\%$ settings' experiments for Wiki80, we train the model with 10-25 times epochs as that of the $100\%$ setting's experiment.
|
| 252 |
+
|
| 253 |
+
For FewRel, we search the batch size among [4,8,32] and search the training step in [1500, 2000, 2500]. We evaluate models every 250 on validation and save the model with best performance for testing. With our hyper-parameter tuning, the results of baselines in FewRel significantly outperforms that reported by KEPLER (Wang et al., 2021b).
|
| 254 |
+
|
| 255 |
+
<table><tr><td>Dataset</td><td>Epoch</td><td>Train Step</td><td>BSZ</td><td>LR</td></tr><tr><td>Wiki80</td><td>5</td><td>-</td><td>32</td><td>3e-5</td></tr><tr><td>FewRel 1.0</td><td>-</td><td>1500</td><td>32</td><td>2e-5</td></tr><tr><td>FewRel 2.0</td><td>-</td><td>1500</td><td>32</td><td>2e-5</td></tr></table>
|
| 256 |
+
|
| 257 |
+
Table 6: Training Hyper-parameters. BSZ: Batch size; LR: Learning rate.
|
asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5fa3d2057b8dc2c6191fb480a80ffd28ed079ebad49a57417579b0e834a79827
|
| 3 |
+
size 225557
|
asimplebuteffectivepluggableentitylookuptableforpretrainedlanguagemodels/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f5cbabbfd4d0305f26be5c004f623a7a76d202a19b1c5591c33289e30ce17ece
|
| 3 |
+
size 286097
|
aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/e5bec732-3b60-4b90-b779-fa06267d17a8_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4edd251deee4bbc0f1c51e5940ba0256dffa769a3e8f8229332bbf18590460f6
|
| 3 |
+
size 78090
|
aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/e5bec732-3b60-4b90-b779-fa06267d17a8_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:60c306fad6477d61ff5625fafbe98cd01250a0ffe41abcd2cf019d3a31b1b707
|
| 3 |
+
size 94570
|
aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/e5bec732-3b60-4b90-b779-fa06267d17a8_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02c42ba7f64a31c251c79fea03f8c7d6b7bc077f2666af3f86813ee3adeda648
|
| 3 |
+
size 483313
|
aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/full.md
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# As Little as Possible, as Much as Necessary: Detecting Over- and Undertranslations with Contrastive Conditioning
|
| 2 |
+
|
| 3 |
+
Jannis Vamvas<sup>1</sup> and Rico Sennrich<sup>1,2</sup>
|
| 4 |
+
|
| 5 |
+
$^{1}$ Department of Computational Linguistics, University of Zurich
|
| 6 |
+
|
| 7 |
+
$^{2}$ School of Informatics, University of Edinburgh
|
| 8 |
+
|
| 9 |
+
{vamvas,sennrich}@cl.uzh.ch
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
Omission and addition of content is a typical issue in neural machine translation. We propose a method for detecting such phenomena with off-the-shelf translation models. Using contrastive conditioning, we compare the likelihood of a full sequence under a translation model to the likelihood of its parts, given the corresponding source or target sequence. This allows to pinpoint superfluous words in the translation and untranslated words in the source even in the absence of a reference translation. The accuracy of our method is comparable to a supervised method that requires a custom quality estimation model.
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
Neural machine translation (NMT) is susceptible to coverage errors such as the addition of superfluous target words or the omission of important source content. Previous approaches to detecting such errors make use of reference translations (Yang et al., 2018) or employ a separate quality estimation (QE) model trained on synthetic data for a language pair (Tuan et al., 2021; Zhou et al., 2021).
|
| 18 |
+
|
| 19 |
+
In this paper, we propose a reference-free algorithm based on hypothetical reasoning. Our premise is that a translation has optimal coverage if it uses as little information as possible and as much information as necessary to convey the source sequence. Therefore, an addition error means that the source would be better conveyed by a translation containing less information. Conversely, an omission error means that the translation would be more adequate for a less informative source sequence.
|
| 20 |
+
|
| 21 |
+
Adapting our contrastive conditioning approach (Vamvas and Sennrich, 2021), we use probability scores of NMT models to approximate this concept of coverage. We create parse trees for both the source sequence and the translation, and treat their constituents as units of information. Omission errors are detected by systematically deleting
|
| 22 |
+
|
| 23 |
+
constituents from the source and by estimating the probability of the translation conditioned on such a partial source sequence. If the probability score is higher than when the translation is conditioned on the full source, the deleted constituent might have no counterpart in the translation (Figure 1). We apply the same principle to the detection of addition errors by swapping the source and the target sequence.
|
| 24 |
+
|
| 25 |
+
When comparing the detected errors to human annotations of coverage errors on the segment level (Freitag et al., 2021), our approach surpasses a supervised QE baseline that was trained on a large number of synthetic coverage errors. Human raters find that word-level precision is higher for omissions than additions, with $39\%$ of predicted error spans being precise for English-German translations, and $20\%$ for Chinese-English. False positive predictions can occur especially in cases where the translation has different syntax than the source. We believe our algorithm could be a useful aid whenever humans remain in the loop, for example in a post-editing workflow.
|
| 26 |
+
|
| 27 |
+
We release the code and data to reproduce our findings, including a large-scale dataset of synthetic coverage errors in English-German and Chinese-English machine translations.
|
| 28 |
+
|
| 29 |
+
# 2 Related Work
|
| 30 |
+
|
| 31 |
+
Coverage errors in NMT Addition and omission of target words have been observed by human evaluation studies in various languages, with omission as the more frequent error type (Castilho et al., 2017; Zheng et al., 2018). They are included as typical translation issues in the Multidimensional Quality Metrics (MQM) framework (Lommel et al., 2014). Addition is defined as an accuracy issue where the target text includes text not present in the source, and omission is defined as an accuracy
|
| 32 |
+
|
| 33 |
+
① Translate
|
| 34 |
+
|
| 35 |
+
$X =$ Please exit the plane after landing.
|
| 36 |
+
|
| 37 |
+
$\mathrm{Y} =$ Bette verlassen Sie das Flugzeug.
|
| 38 |
+
|
| 39 |
+
2 Extract constituents
|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
Figure 1: Example of how an omission error is detected. German translation Y leaves after landing erroneously untranslated (Step 1). Potential error spans are derived from a parse tree (Step 2). An NMT model such as mBART50 assigns a higher probability score to Y conditioned on the source with after landing deleted than to Y conditioned on the full source (Step 3). This indicates that there is an omission error (Step 4).
|
| 43 |
+
|
| 44 |
+
3 Score conditioned on partial sequences
|
| 45 |
+
|
| 46 |
+
Score(Y | Please exit the plane after landing.) = 0.34
|
| 47 |
+
|
| 48 |
+
Score(Y | Please exit the plane after landing.) = 0.14
|
| 49 |
+
|
| 50 |
+
Score(Y | Please exit the plane after landing.) = 0.20
|
| 51 |
+
|
| 52 |
+
Score(Y | Please exit the plane after landing.) = 0.72
|
| 53 |
+
|
| 54 |
+
4 Infer error spans
|
| 55 |
+
|
| 56 |
+
Please exit the plane after landing.
|
| 57 |
+
|
| 58 |
+
issue where content is missing from the translation but is present in the source.2
|
| 59 |
+
|
| 60 |
+
Freitag et al. (2021) used MQM to manually re-associate English-German and Chinese-English machine translations submitted to the WMT 2020 news translation task (Barrault et al., 2020). Their findings confirm that state-of-the-art NMT systems still erroneously add and omit target words, and that omission occurs more often than addition. Similar patterns can be found in English-French machine translations that have been annotated with fine-grained MQM labels for the document-level QE shared task (Specia et al., 2018; Fonseca et al., 2019; Specia et al., 2020).
|
| 61 |
+
|
| 62 |
+
Detecting and reducing coverage errors While reference-based approaches include measuring the n-gram overlap to the reference (Yang et al., 2018) and analyzing word alignment to the source (Kong et al., 2019), this work focuses on the reference-free detection of coverage errors.
|
| 63 |
+
|
| 64 |
+
Previous work has employed custom QE models trained on labeled parallel data. For example, Zhou et al. (2021) insert synthetic hallucinations and train a Transformer to predict the inserted spans. Similarly, Tuan et al. (2021) train a QE model on synthetically noisy translations. In this paper, we propose a method that is based on off-the-shelf NMT models only.
|
| 65 |
+
|
| 66 |
+
Other related work has focused on improving coverage during decoding or training, for example via attention (Tu et al., 2016; Wu et al., 2016; Li et al., 2018; among others). More recently, Yang et al. (2019) found that contrastive fine-tuning on
|
| 67 |
+
|
| 68 |
+
references with synthetic omissions reduces coverage errors produced by an NMT system.
|
| 69 |
+
|
| 70 |
+
# 3 Approach
|
| 71 |
+
|
| 72 |
+
Contrastive Conditioning Properties of a translation can be inferred by estimating its probability conditioned on contrastive source sequences (Vamvas and Sennrich, 2021). For example, if a certain translation is more probable under an NMT model when conditioned on a counterfactual source sequence, the translation might be inadequate.
|
| 73 |
+
|
| 74 |
+
Application to Omission Errors Figure 1 illustrates how contrastive conditioning can be directly applied to the detection of omission errors. We construct partial source sequences by systematically deleting constituents from the source. If the probability score of the translation (average token log-probability) is higher when conditioned on such a partial source, the deleted constituent is taken to be missing from the translation.
|
| 75 |
+
|
| 76 |
+
To compute the probability score for a translation $Y$ given a source sequence $X$ , we sum up the log-probabilities for every target token and normalize the sum by the number of target tokens:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\operatorname {s c o r e} (Y | X) = \frac {1}{| Y |} \sum_ {i = 0} ^ {| Y |} \log p _ {\theta} \left(y _ {i} | X, y _ {< i}\right)
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
Application to Addition Errors We apply the same method to addition detection, but swap the source and target languages. Namely, we use an NMT model for the reverse translation direction, and we score the source sequence conditioned on the full translation and a set of partial translations. $^3$
|
| 83 |
+
|
| 84 |
+
Potential Error Spans In its most basic form, our algorithm does not require any linguistic resources apart from tokenization. For a source sentence of $n$ tokens one could create $n$ partial source sequences with the $i$ th token deleted. However, such an approach would rely on a radical assumption of compositionality, treating all tokens as independent constituents.
|
| 85 |
+
|
| 86 |
+
We thus propose to extract potential error spans from parse trees, specifically from dependency trees predicted by Universal Dependency parsers (de Marneffe et al., 2021), which are widely available. This allows (a) to skip function words and (b) to include a reasonable number of multi-word spans in the set of potential error spans. Formally, we consider word spans that satisfy the following conditions:
|
| 87 |
+
|
| 88 |
+
1. A potential error span is a complete subtree of the dependency tree.
|
| 89 |
+
2. It covers a contiguous subsequence.
|
| 90 |
+
3. It contains a part of speech of interest.
|
| 91 |
+
|
| 92 |
+
For every potential error span, we create a partial sequence by deleting the span from the original sequence. This is still a simplified notion of constituency, since some partial sequences will be ungrammatical. Our assumption is that NMT models can produce reliable probability estimates despite the ungrammatical input.
|
| 93 |
+
|
| 94 |
+
# 4 Experimental Setup
|
| 95 |
+
|
| 96 |
+
In this section we describe the data and tools that we use to implement and evaluate our approach.
|
| 97 |
+
|
| 98 |
+
Scoring model We use mBART50 (Tang et al., 2021), which is a sequence-to-sequence Transformer pre-trained on monolingual corpora in many languages using the BART objective (Lewis et al., 2020; Liu et al., 2020) that was fine-tuned on English-centric multilingual MT in 50 languages. Sequence-level probability scores are computed by averaging the log-probabilities of all target tokens. We use the one-to-many mBART50 model if English is the source language, and the many-to-one model if English is the target language.
|
| 99 |
+
|
| 100 |
+
Error spans We use Stanza (Qi et al., 2020) for dependency parsing, a neural pipeline for various languages trained on data from Universal Dependencies (de Marneffe et al., 2021). We make use of universal part-of-speech tags (UPOS) to define
|
| 101 |
+
|
| 102 |
+
ditioned on the source. However, the scores might be confounded by a lack of fluency in the partial translations.
|
| 103 |
+
|
| 104 |
+

|
| 105 |
+
Figure 2: Process designed for creating machine translations with synthetic coverage errors. The full translation contains an addition error with regard to the partial source, and the partial translation contains an omission error with regard to the original source sequence.
|
| 106 |
+
|
| 107 |
+
parts of speech that might constitute potential error spans. Specifically, we treat common nouns, proper nouns, main verbs, adjectives, numerals, adverbs, and interjections as relevant parts of speech.
|
| 108 |
+
|
| 109 |
+
Gold Standard Data We use state-of-the-art English-German and Chinese-English machine translations for evaluation, which have been annotated by Freitag et al. (2021) with translation errors.4 We set aside translations by the system Online-B as a development set, and use the other systems as a test set, excluding translations by humans. The development set was used to identify the typical parts-of-speech of coverage error spans, listed in the paragraph above.
|
| 110 |
+
|
| 111 |
+
Synthetic Data We also create synthetic coverage errors, which we use for training a supervised baseline QE system. We propose a data creation process that is inspired by previous work (Yang et al., 2019; Zhou et al., 2021; Tuan et al., 2021) but is defined such that it works for both additions and omissions, and produces fluent translations.
|
| 112 |
+
|
| 113 |
+
Figure 2 illustrates the process. We start from the original source sentences and create partial sources by deleting randomly selected constituents. Specifically, we delete each constituent with a probability of $15\%$ . We then machine-translate both the original and the partial sources, yielding full and partial machine translations. We retain only samples where the full machine translation is different from the partial one, and can be constructed by addition.
|
| 114 |
+
|
| 115 |
+
This allows us to treat the full translations as overtranslations of the partial sources, and the added words as addition errors. Conversely, the partial translations are treated as undertranslations of the original sources. Negative examples are cre
|
| 116 |
+
|
| 117 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">Approach</td><td colspan="3">Detection of additions</td><td colspan="3">Detection of omissions</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td rowspan="2">EN-DE</td><td>Supervised baseline</td><td>6.9±1.9</td><td>2.9±0.9</td><td>4.0±1.3</td><td>40.3±5.2</td><td>6.1±0.1</td><td>10.6±0.2</td></tr><tr><td>Our approach</td><td>4.0</td><td>15.0</td><td>6.3</td><td>22.3</td><td>18.8</td><td>20.4</td></tr><tr><td rowspan="2">ZH-EN</td><td>Supervised baseline</td><td>4.3±0.6</td><td>4.7±0.7</td><td>4.5±0.6</td><td>49.6±0.6</td><td>9.4±1.0</td><td>15.9±1.4</td></tr><tr><td>Our approach</td><td>1.7</td><td>40.6</td><td>3.4</td><td>25.8</td><td>62.0</td><td>36.5</td></tr></table>
|
| 118 |
+
|
| 119 |
+
Table 1: Segment-level comparison of coverage error detection methods on the gold dataset by Freitag et al. (2021). We average over three baseline models trained with different random seeds, reporting the standard deviation.
|
| 120 |
+
|
| 121 |
+
ated by pairing the original sources with the full translations, and the partial sources with the partial translations.5
|
| 122 |
+
|
| 123 |
+
Our synthetic data are based on monolingual news text released for WMT. To train the baseline system, we use 80k unique source segments per language pair. Statistics are reported in Table A3.
|
| 124 |
+
|
| 125 |
+
Supervised baseline system Following the approach outlined by Moura et al. (2020), we use the OpenKiwi framework (Kepler et al., 2019) to train a separate Predictor-Estimator model (Kim et al., 2017) per language pair, based on XLM-RoBERTa (Conneau et al., 2020). The supervised task can be described as token-level binary classification. Every token is classified as either OK or BAD, similar to the word-level labels used for the QE shared tasks (Specia et al., 2020). A source token is BAD if it is omitted in the translation, and a token in the translation is BAD if it is part of an addition error. For English and German, we use the Moses tokenizer (Koehn et al., 2007) to separate the text into labeled tokens; for Chinese we label the text on the character level.
|
| 126 |
+
|
| 127 |
+
Where suitable, we use the default settings of OpenKiwi. We fine-tune the large version of XLM-RoBERTa, which results in a model of similar parameter count as the mBART50 model we use for contrastive conditioning. We train for 10 epochs with a batch size of 32, with early stopping on the validation set. For token classification we train two linear layers, separately for source and target language (which corresponds to omissions and additions, respectively). We use AdamW (Loshchilov and Hutter, 2019) with a learning rate of 1e-5, freezing the pretrained encoder for the first 1000 steps.
|
| 128 |
+
|
| 129 |
+
# 5 Evaluation
|
| 130 |
+
|
| 131 |
+
# 5.1 Segment-Level Comparison to Gold Data
|
| 132 |
+
|
| 133 |
+
The accuracy of our approach can be estimated based on the human ratings by Freitag et al. (2021).
|
| 134 |
+
|
| 135 |
+
Evaluation Design We use the MQM error types Accuracy/Addition and Accuracy/Omission, and ignore other types such as Accuracy/Mistranslation. We count a prediction as correct if any one of the human raters has marked the same error type anywhere in the segment. We exclude segments from the evaluation that might have been incompletely annotated (because raters stopped after marking five errors). For ease of implementation, we also exclude segments that consist of multiple sentences.
|
| 136 |
+
|
| 137 |
+
Results The results of the gold-standard comparison are shown in Table 1. Our approach clearly surpasses the baseline in the detection of omission errors in both language pairs. However, both approaches recognize addition errors with low accuracy, and especially the supervised baseline has low recall. Considering its high performance on a synthetic test set (Table A1 in the Appendix), it seems that the model does not generalize well to real-world coverage errors, highlighting the challenges of training a supervised QE model on purely synthetic data.
|
| 138 |
+
|
| 139 |
+
# 5.2 Human Evaluation of Precision
|
| 140 |
+
|
| 141 |
+
We perform an additional word-level human evaluation to analyze the predictions obtained via our approach in more detail. Our human raters were presented segments that had been marked as true or false positives in the above evaluation, allowing us to quantify word-level precision.
|
| 142 |
+
|
| 143 |
+
<table><tr><td></td><td></td><td>EN-DE</td><td>ZH-EN</td></tr><tr><td rowspan="2">Target</td><td>Addition errors</td><td>2.3</td><td>1.2</td></tr><tr><td>Any errors</td><td>7.4</td><td>12.0</td></tr><tr><td rowspan="2">Source</td><td>Omission errors</td><td>36.3</td><td>13.8</td></tr><tr><td>Any errors</td><td>39.4</td><td>19.5</td></tr></table>
|
| 144 |
+
|
| 145 |
+
Table 2: Human evaluation: word-level precision of the spans that were highlighted by our approach.
|
| 146 |
+
|
| 147 |
+
Evaluation Design We employed two linguistic experts per language pair as raters. Each rater was shown around 700 randomly sampled positive predictions across both types of coverage errors.
|
| 148 |
+
|
| 149 |
+
Raters were shown the source sequence, the machine translation, and the predicted error span. They were asked whether the highlighted span was indeed translated badly, and were asked to perform a fine-grained analysis based on a list of predefined answer options (Figures 3 and 4 in the Appendix).
|
| 150 |
+
|
| 151 |
+
A part of the samples were annotated by both raters. The agreement was moderate for the main question, with a Cohen's kappa of 0.54 for English-German and 0.45 for Chinese-English. Agreement on the more subjective follow-up question was lower (0.32 / 0.13).
|
| 152 |
+
|
| 153 |
+
Results The fine-grained answers allow us to quantify the word-level precision of the spans highlighted by our approach, both with respect to coverage errors in particular and to translation errors in general (Table 2). Precision is higher than expected when detecting omission errors in English-German translations, but is still low for additions. The distribution of the detailed answers (Figures 3 and 4 in the Appendix) suggests that syntactical differences between the source and target language contribute to the false positives regarding additions. Example predictions are provided in Appendix F, which include cases where all three raters of Freitag et al. (2021) had overlooked the coverage error.
|
| 154 |
+
|
| 155 |
+
Finally, Table 2 shows that many of the predicted error spans are in fact translation errors, but not coverage errors in a narrow sense. For example, more than $10\%$ of the spans marked in Chinese-English translations were classified by our raters as a different type of accuracy error, such as mistranslation.
|
| 156 |
+
|
| 157 |
+
# 6 Limitations and Future Work
|
| 158 |
+
|
| 159 |
+
We hope that the automatic detection of coverage errors could be an aid to translators and posteditors, given that manually detecting such errors is tedious. Our results on omissions are encouraging, and user studies are recommended in order to validate the usefulness of the predictions to practitioners. Further work needs to be done to improve the detection of additions, of which the real-world data contain few examples. Higher accuracy would be necessary for word-level QE to be helpful (Shenoy et al., 2021), and so with regard to detecting addition errors, the practical utility of both the baseline and of our approach remains limited.
|
| 160 |
+
|
| 161 |
+
Inference time should also be discussed. In Appendix C we perform a comparison, finding that on a long sentence pair contrastive conditioning can take up to ten times longer than a forward pass of the baseline. However, this is still a fraction of the time needed for generating a translation in the first place. In addition, restricting the potential error spans that are considered could further improve efficiency.
|
| 162 |
+
|
| 163 |
+
# 7 Conclusion
|
| 164 |
+
|
| 165 |
+
We have proposed a reference-free method to automatically detect coverage errors in translations. Derived from contrastive conditioning, our method relies on hypothetical reasoning over the likelihood of partial sequences. Since any off-the-shelf NMT model can be used to estimate conditional likelihood, no access to the original translation system or to a quality estimation model is needed. Evaluation on real machine translations shows that our approach outperforms a supervised baseline in the detection of omissions. Future work could address the low precision on addition errors, which are relatively rare in the datasets we used for evaluation.
|
| 166 |
+
|
| 167 |
+
# Acknowledgments
|
| 168 |
+
|
| 169 |
+
This work was funded by the Swiss National Science Foundation (project MUTAMUR; no. 176727). We would like to thank Xin Sennrich for facilitating the recruitment of annotators, and Chantal Amrhein as well as the anonymous reviewers for helpful feedback.
|
| 170 |
+
|
| 171 |
+
# References
|
| 172 |
+
|
| 173 |
+
Loic Barrault, Magdalena Biesialska, Ondrej Bojar, Marta R. Costa-jussa, Christian Federmann, Yvette
|
| 174 |
+
|
| 175 |
+
Graham, Roman Grundkiewicz, Barry Haddow, Matthias Huck, Eric Joannis, Tom Kocmi, Philipp Koehn, Chi-kiu Lo, Nikola Ljubesic, Christof Monz, Makoto Morishita, Masaaki Nagata, Toshiaki Nakazawa, Santanu Pal, Matt Post, and Marcos Zampieri. 2020. Findings of the 2020 conference on machine translation (WMT20). In Proceedings of the Fifth Conference on Machine Translation, pages 1-55, Online. Association for Computational Linguistics.
|
| 176 |
+
Sheila Castilho, Joss Moorkens, Federico Gaspari, Rico Sennrich, Vilelmini Sosoni, Yota Georgakopoulou, Pintu Lohar, Andy Way, Antonio Miceli Barone, and Maria Gialama. 2017. A comparative quality evaluation of PBSMT and NMT using professional translators. 16th Machine Translation Summit 2017, pages 116-131.
|
| 177 |
+
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8440-8451, Online. Association for Computational Linguistics.
|
| 178 |
+
Marie-Catherine de Marneffe, Christopher D. Manning, Joakim Nivre, and Daniel Zeman. 2021. Universal Dependencies. Computational Linguistics, 47(2):255-308.
|
| 179 |
+
Erick Fonseca, Lisa Yankovskaya, André F. T. Martins, Mark Fishel, and Christian Federmann. 2019. Findings of the WMT 2019 shared tasks on quality estimation. In Proceedings of the Fourth Conference on Machine Translation (Volume 3: Shared Task Papers, Day 2), pages 1-10, Florence, Italy. Association for Computational Linguistics.
|
| 180 |
+
Markus Freitag, George Foster, David Grangier, Viresh Ratnakar, Qijun Tan, and Wolfgang Macherey. 2021. Experts, Errors, and Context: A Large-Scale Study of Human Evaluation for Machine Translation. Transactions of the Association for Computational Linguistics, 9:1460-1474.
|
| 181 |
+
Fabio Kepler, Jonay Trénous, Marcos Treviso, Miguel Vera, and André F. T. Martins. 2019. OpenKiwi: An open source framework for quality estimation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 117-122, Florence, Italy. Association for Computational Linguistics.
|
| 182 |
+
Hyun Kim, Jong-Hyeok Lee, and Seung-Hoon Na. 2017. Predictor-estimator using multilevel task learning with stack propagation for neural quality estimation. In Proceedings of the Second Conference on Machine Translation, pages 562-568, Copenhagen, Denmark. Association for Computational Linguistics.
|
| 183 |
+
|
| 184 |
+
Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondrej Bojar, Alexandra Constantin, and Evan Herbst. 2007. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th Annual Meeting of the Association for Computational Linguistics Companion Volume Proceedings of the Demo and Poster Sessions, pages 177-180, Prague, Czech Republic. Association for Computational Linguistics.
|
| 185 |
+
Xiang Kong, Zhaopeng Tu, Shuming Shi, Eduard Hovy, and Tong Zhang. 2019. Neural machine translation with adequacy-oriented learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 6618-6625.
|
| 186 |
+
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.
|
| 187 |
+
Yanyang Li, Tong Xiao, Yinqiao Li, Qiang Wang, Changming Xu, and Jingbo Zhu. 2018. A simple and effective approach to coverage-aware neural machine translation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 292-297, Melbourne, Australia. Association for Computational Linguistics.
|
| 188 |
+
Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, and Luke Zettlemoyer. 2020. Multilingual Denoising Pre-training for Neural Machine Translation. Transactions of the Association for Computational Linguistics, 8:726-742.
|
| 189 |
+
Arle Lommel, Hans Uszkoreit, and Aljoscha Burchardt. 2014. Multidimensional quality metrics (MQM): A framework for declaring and describing translation quality metrics. *Tradumàtica*, (12):0455-463.
|
| 190 |
+
Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In International Conference on Learning Representations.
|
| 191 |
+
João Moura, Miguel Vera, Daan van Stigt, Fabio Kepler, and André F. T. Martins. 2020. ISTunbabel participation in the WMT20 quality estimation shared task. In Proceedings of the Fifth Conference on Machine Translation, pages 1029-1036, Online. Association for Computational Linguistics.
|
| 192 |
+
Peng Qi, Yuhao Zhang, Yuhui Zhang, Jason Bolton, and Christopher D. Manning. 2020. Stanza: A python natural language processing toolkit for many human languages. In Proceedings of the 58th Annual Meeting of the Association for Computational
|
| 193 |
+
|
| 194 |
+
Linguistics: System Demonstrations, pages 101-108, Online. Association for Computational Linguistics.
|
| 195 |
+
Raksha Shenoy, Nico Herbig, Antonio Krüger, and Josef van Genabith. 2021. Investigating the helpfulness of word-level quality estimation for post-editing machine translation output. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 10173-10185, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 196 |
+
Lucia Specia, Frédéric Blain, Marina Fomicheva, Erick Fonseca, Vishrav Chaudhary, Francisco Guzmán, and André F. T. Martins. 2020. Findings of the WMT 2020 shared task on quality estimation. In Proceedings of the Fifth Conference on Machine Translation, pages 743-764, Online. Association for Computational Linguistics.
|
| 197 |
+
Lucia Specia, Frédéric Blain, Varvara Logacheva, Ramón F. Astudillo, and André F. T. Martins. 2018. Findings of the WMT 2018 shared task on quality estimation. In Proceedings of the Third Conference on Machine Translation: Shared Task Papers, pages 689-709, Belgium, Brussels. Association for Computational Linguistics.
|
| 198 |
+
Yuqing Tang, Chau Tran, Xian Li, Peng-Jen Chen, Naman Goyal, Vishrav Chaudhary, Jiatao Gu, and Angela Fan. 2021. Multilingual translation from denoising pre-training. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 3450-3466, Online. Association for Computational Linguistics.
|
| 199 |
+
Zhaopeng Tu, Zhengdong Lu, Yang Liu, Xiaohua Liu, and Hang Li. 2016. Modeling coverage for neural machine translation. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 76-85, Berlin, Germany. Association for Computational Linguistics.
|
| 200 |
+
Yi-Lin Tuan, Ahmed El-Kishky, Adithya Renduchintala, Vishrav Chaudhary, Francisco Guzmán, and Lucia Specia. 2021. Quality estimation without human-labeled data. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 619-625, Online. Association for Computational Linguistics.
|
| 201 |
+
Jannis Vamvas and Rico Sennrich. 2021. Contrastive conditioning for assessing disambiguation in MT: A case study of distilled bias. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 10246-10265, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
|
| 202 |
+
Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus
|
| 203 |
+
|
| 204 |
+
Macherey, et al. 2016. Google's neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144.
|
| 205 |
+
Jing Yang, Biao Zhang, Yue Qin, Xiangwen Zhang, Qian Lin, and Jinsong Su. 2018. Otem&Utem: Over- and under-translation evaluation metric for NMT. In Natural Language Processing and Chinese Computing, pages 291–302, Cham. Springer International Publishing.
|
| 206 |
+
Zonghan Yang, Yong Cheng, Yang Liu, and Maosong Sun. 2019. Reducing word omission errors in neural machine translation: A contrastive learning approach. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6191-6196, Florence, Italy. Association for Computational Linguistics.
|
| 207 |
+
Zaixiang Zheng, Hao Zhou, Shujian Huang, Lili Mou, Xinyu Dai, Jiajun Chen, and Zhaopeng Tu. 2018. Modeling Past and Future for Neural Machine Translation. Transactions of the Association for Computational Linguistics, 6:145-157.
|
| 208 |
+
Chunting Zhou, Graham Neubig, Jiatao Gu, Mona Diab, Francisco Guzmán, Luke Zettlemoyer, and Marjan Ghazvininejad. 2021. Detecting hallucinated content in conditional neural sequence generation. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 1393-1404, Online. Association for Computational Linguistics.
|
| 209 |
+
|
| 210 |
+
# A Annotator Guidelines
|
| 211 |
+
|
| 212 |
+
You will be shown a series of source sentences and translations. One or several spans in the text are highlighted and it is claimed that the spans are translated badly. You are asked to determine whether the claim is true. The highlighted spans can be either in the source sequence or in the translation. If a span is in the source sentence, check whether it has been correctly translated. If a span is in the translation, check whether it correctly conveys the source. Sometimes, multiple spans are highlighted. In that case, focus your answer on the span that is most problematic for the translation. In a second step, you are asked to select an explanation. On the one hand, if you agree that the highlighted span is translated badly, please explain your reasoning by selecting your explanation. On the other hand, if you disagree and think that the span is well-translated, please select an explanation why the span might have been marked as badly translated in the first place. Should multiple explanations be equally plausible, select the first from the top.
|
| 213 |
+
|
| 214 |
+
<table><tr><td rowspan="2"></td><td colspan="4">Detection of additions</td><td colspan="4">Detection of omissions</td></tr><tr><td>Prec.</td><td>Recall</td><td>F1</td><td>MCC</td><td>Prec.</td><td>Recall</td><td>F1</td><td>MCC</td></tr><tr><td>EN-DE Supervised Baseline</td><td>98.8±0.4</td><td>98.0±.2</td><td>98.4±.2</td><td>96.8±.1</td><td>94.0±1.3</td><td>96.6±0.4</td><td>95.3±.5</td><td>90.5±.2</td></tr><tr><td>Ours</td><td>78.1</td><td>88.3</td><td>82.9</td><td>76.7</td><td>80.9</td><td>98.6</td><td>88.9</td><td>78.1</td></tr><tr><td>ZH-EN Supervised Baseline</td><td>87.2±1.5</td><td>75.7±.6</td><td>81.0±.3</td><td>72.6±.6</td><td>67.3±1.3</td><td>68.0±1.2</td><td>67.7±.9</td><td>53.8±.3</td></tr><tr><td>Ours</td><td>26.1</td><td>88.9</td><td>40.4</td><td>23.3</td><td>28.3</td><td>92.0</td><td>43.3</td><td>40.3</td></tr></table>
|
| 215 |
+
|
| 216 |
+
Table A1: Segment-level and word-level (MCC) evaluation based on a test set with synthetic coverage errors.
|
| 217 |
+
|
| 218 |
+
<table><tr><td></td><td colspan="3">Short sentence pair</td><td colspan="3">Long sentence pair</td></tr><tr><td></td><td>Additions</td><td>Omissions</td><td>Both</td><td>Additions</td><td>Omissions</td><td>Both</td></tr><tr><td>Supervised baseline</td><td>-</td><td>-</td><td>25 ms</td><td>-</td><td>-</td><td>25 ms</td></tr><tr><td>Our approach</td><td>40 ms</td><td>45 ms</td><td>83 ms</td><td>165 ms</td><td>197 ms</td><td>365 ms</td></tr><tr><td>- excluding parser</td><td>18 ms</td><td>21 ms</td><td>38 ms</td><td>102 ms</td><td>144 ms</td><td>239 ms</td></tr></table>
|
| 219 |
+
|
| 220 |
+
Table A2: Inference times when predicting on a short and a long sentence pair. Since we did not use a parser that is optimized for efficiency, we additionally report inference time without including the time needed for parsing.
|
| 221 |
+
|
| 222 |
+
# B Evaluation on Synthetic Errors
|
| 223 |
+
|
| 224 |
+
We used a test split held back from the synthetic data to perform an additional evaluation. On the segment level, we report Precision, Recall and F1-score. Like in Section 5.1, a prediction is treated as correct on the segment level if for a predicted coverage error there is indeed a coverage error of that type anywhere in the segment.
|
| 225 |
+
|
| 226 |
+
On the word level, we follow previous work on word-level QE (Specia et al., 2020) and report the Matthews correlation coefficient (MCC) across all the tokens in the test set.
|
| 227 |
+
|
| 228 |
+
Results Results are shown in Table A1. The supervised baseline has a high accuracy on English-German translations and a moderate accuracy on Chinese-English translations. In comparison, our approach performs clearly worse than the supervised baseline on the synthetic errors.
|
| 229 |
+
|
| 230 |
+
# C Inference Time
|
| 231 |
+
|
| 232 |
+
Inference times are reported in Table A2. We measure the time needed to run the coverage error detection methods on a short sentence pair and on a long sentence pair for English-German. The short sentence pair is taken from Figure 1 and the long sentence pair has 40 tokens in the source sequence and 47 tokens in the target sequence. We average over 1000 repetitions on RTX 2080 Ti GPUs.
|
| 233 |
+
|
| 234 |
+
The higher inference times for our approach can be explained by the number of translation probabilities that need to be estimated. On average, we compute 30 scores per sentence in the English-German MQM dataset, and 44 per sentence in the Chinese-English MQM dataset. Still, the time needed for computing all these scores is only a fraction of the time it takes to generate a translation (254 ms for the short source sentence and 861 ms for the long sentence, assuming a beam size of 5).
|
| 235 |
+
|
| 236 |
+
The required number of scores could be reduced by considering fewer potential error spans. Furthermore, scoring could be parallelized across batches of multiple translations. Finally, using a more efficient parser, or no parser at all, could speed up inference.
|
| 237 |
+
|
| 238 |
+
# D Dataset Statistics
|
| 239 |
+
|
| 240 |
+
<table><tr><td rowspan="2">Dataset split</td><td colspan="3">Number of segments</td><td colspan="4">Number of tokens</td></tr><tr><td>Total</td><td>W/ addition</td><td>W/ omission</td><td>Src. OK</td><td>Src. BAD</td><td>Tgt. OK</td><td>Tgt. BAD</td></tr><tr><td>EN-DE Train</td><td>135269</td><td>18423</td><td>18423</td><td>2185918</td><td>58378</td><td>2197843</td><td>53911</td></tr><tr><td>EN-DE Dev</td><td>16984</td><td>2328</td><td>2328</td><td>273311</td><td>7398</td><td>275156</td><td>6781</td></tr><tr><td>EN-DE Test</td><td>16984</td><td>2328</td><td>2328</td><td>273277</td><td>7701</td><td>275036</td><td>7032</td></tr><tr><td>ZH-EN Train</td><td>110195</td><td>10697</td><td>10697</td><td>2576135</td><td>62311</td><td>1866567</td><td>37730</td></tr><tr><td>ZH-EN Dev</td><td>14149</td><td>1383</td><td>1383</td><td>326743</td><td>7562</td><td>236685</td><td>4244</td></tr><tr><td>ZH-EN Test</td><td>14026</td><td>1342</td><td>1342</td><td>322000</td><td>7566</td><td>234757</td><td>4882</td></tr></table>
|
| 241 |
+
|
| 242 |
+
Table A3: Statistics for the dataset of synthetic coverage errors described in Section 4.
|
| 243 |
+
|
| 244 |
+
<table><tr><td rowspan="2">Dataset split</td><td colspan="3">Number of segments</td></tr><tr><td>Total</td><td>With an addition error</td><td>With an omission error</td></tr><tr><td>EN-DE Dev</td><td>1418</td><td>77</td><td>187</td></tr><tr><td>EN-DE Test</td><td>8508</td><td>407</td><td>1057</td></tr><tr><td>- without excluded segments</td><td>4839</td><td>162</td><td>484</td></tr><tr><td>ZH-EN Dev</td><td>1999</td><td>69</td><td>516</td></tr><tr><td>ZH-EN Test</td><td>13995</td><td>329</td><td>3360</td></tr><tr><td>- without excluded segments</td><td>8851</td><td>149</td><td>1569</td></tr></table>
|
| 245 |
+
|
| 246 |
+
Table A4: Statistics for the gold dataset by Freitag et al. (2021).
|
| 247 |
+
|
| 248 |
+
# E Examples of Synthetic Coverage Errors
|
| 249 |
+
|
| 250 |
+
# English-German Example
|
| 251 |
+
|
| 252 |
+
# Addition error
|
| 253 |
+
|
| 254 |
+
Partial source: But they haven't played.
|
| 255 |
+
|
| 256 |
+
Full machine translation: Aber sie haben nicht gegen ein Team wie uns gespielt.
|
| 257 |
+
|
| 258 |
+
# Omission error
|
| 259 |
+
|
| 260 |
+
Full source: But they haven't played against a team like us.
|
| 261 |
+
|
| 262 |
+
Partial machine translation: Aber sie haben nicht gespielt.
|
| 263 |
+
|
| 264 |
+
# Chinese-English Example
|
| 265 |
+
|
| 266 |
+
# Addition error
|
| 267 |
+
|
| 268 |
+
Partial source: 医院和企业共同研发相关检测试剂盒,惠及更多患者。
|
| 269 |
+
|
| 270 |
+
Full translation: Hospitals and enterprises jointly develop related test kits to benefit more cancer patients.
|
| 271 |
+
|
| 272 |
+
# Omission error
|
| 273 |
+
|
| 274 |
+
Full source: 医院和企业共同研发相关检测试剂盒,惠及更多肿瘤患者。
|
| 275 |
+
|
| 276 |
+
Partial translation: Hospitals and enterprises jointly develop related test kits to benefit more patients.
|
| 277 |
+
|
| 278 |
+
# F Examples of Coverage Errors Predicted by Contrastive Conditioning
|
| 279 |
+
|
| 280 |
+
# English-German Examples
|
| 281 |
+
|
| 282 |
+
# Predicted addition error
|
| 283 |
+
|
| 284 |
+
Source: He added: "It's backfired on him now, though, that's the sad thing."
|
| 285 |
+
|
| 286 |
+
Machine translation: Er fügte hinzu: "Es ist jetzt aufihn abgefeuert, aber das ist das Traurige."
|
| 287 |
+
|
| 288 |
+
Original MQM rating (Freitag et al., 2021): No related accuracy error marked by the three raters.
|
| 289 |
+
|
| 290 |
+
Answer by our human rater: The highlighted target span is not translated badly. It might have been highlighted because it is syntactically different from the source.
|
| 291 |
+
|
| 292 |
+
Meaning of highlighted span: hinzu = 'additionally'
|
| 293 |
+
|
| 294 |
+
# Predicted omission error
|
| 295 |
+
|
| 296 |
+
Source: UK's medical drug supply still uncertain in no-deal Brexit
|
| 297 |
+
|
| 298 |
+
Machine translation: Die medizinische Versorgung Großbritanniens ist im No-Deal-Brexit noch ungewiss
|
| 299 |
+
|
| 300 |
+
Original MQM rating: No accuracy error marked by the three raters.
|
| 301 |
+
|
| 302 |
+
Answer by our human rater: The highlighted source span is indeed translated badly. It contains information that is missing in the translation but can be inferred or is trivial.
|
| 303 |
+
|
| 304 |
+
# Predicted omission error
|
| 305 |
+
|
| 306 |
+
Source: The automaker is expected to report its quarterly vehicle deliveries in the next few days.
|
| 307 |
+
|
| 308 |
+
Machine translation: Der Autohersteller wird voraussichtlich in den nachsten Tagen seine vierteljährlichen Fahrzeugauslieferungen melden.
|
| 309 |
+
|
| 310 |
+
Original MQM rating: No related accuracy error marked by the three raters.
|
| 311 |
+
|
| 312 |
+
Answer by our human rater: The highlighted source span is not translated badly. The words in the span do not need to be translated.
|
| 313 |
+
|
| 314 |
+
# Chinese-English Examples
|
| 315 |
+
|
| 316 |
+
# Predicted addition error
|
| 317 |
+
|
| 318 |
+
Source: 美方指责伊朗制造了该袭击,并对伊朗实施新制裁。
|
| 319 |
+
|
| 320 |
+
Machine translation: The US accused Iran of causing the attack and imposed new sanctions on Iran.
|
| 321 |
+
|
| 322 |
+
Original MQM rating (Freitag et al., 2021): No related accuracy error marked by the three raters.
|
| 323 |
+
|
| 324 |
+
Answer by our human rater: The highlighted target span is not translated badly. No phenomenon that might have caused the prediction was identified.
|
| 325 |
+
|
| 326 |
+
# Predicted omission error
|
| 327 |
+
|
| 328 |
+
Source:目前已收到来自俄罗斯农业企业的约50项申请。
|
| 329 |
+
|
| 330 |
+
Machine translation: About 50 applications have been received from Russian agricultural enterprises.
|
| 331 |
+
|
| 332 |
+
Original MQM rating: No accuracy error marked by the three raters.
|
| 333 |
+
|
| 334 |
+
Answer by our human rater: The highlighted source span is indeed translated badly. It contains information that is missing in the translation.
|
| 335 |
+
|
| 336 |
+
Meaning of highlighted span: 目前 = 'at present'
|
| 337 |
+
|
| 338 |
+
# Predicted omission error
|
| 339 |
+
|
| 340 |
+
Source: 他说, 该系统目前在世界上有很大需求, 但俄罗斯军队也需要它,
|
| 341 |
+
|
| 342 |
+
其中包括在北极地区。
|
| 343 |
+
|
| 344 |
+
Machine translation: He said that the system is currently in great demand in the world, but the Russian army also needs it, including in the Arctic.
|
| 345 |
+
|
| 346 |
+
Original MQM rating: No accuracy error marked by the three raters.
|
| 347 |
+
|
| 348 |
+
Answer by our human rater: The highlighted source span is not translated badly. The words in the span do not need to be translated.
|
| 349 |
+
|
| 350 |
+
Meaning of highlighted span: 其中 $=$ 'among'
|
| 351 |
+
|
| 352 |
+
# G Detailed Results of Human Evaluation
|
| 353 |
+
|
| 354 |
+

|
| 355 |
+
Correctly predicted additions
|
| 356 |
+
|
| 357 |
+

|
| 358 |
+
Falsely predicted additions
|
| 359 |
+
Figure 3: Results for the human evaluation of predicted addition errors. If human raters answered that the highlighted span in the translation was indeed badly translated, they were offered the four explanation options on the left. Otherwise they chose from the four options on the right.
|
| 360 |
+
|
| 361 |
+

|
| 362 |
+
Correctly predicted omissions
|
| 363 |
+
Figure 4: Results for the human evaluation of predicted omission errors. If human raters answered that the highlighted span in the source sequence was indeed badly translated, they were offered the four explanation options on the left. Otherwise they chose from the four options on the right.
|
| 364 |
+
|
| 365 |
+

|
| 366 |
+
Falsely predicted omissions
|
aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:da8d2a781fff460384e7f8fe9efac7971dbe5058ac0ec25fa87a012ecc643a53
|
| 3 |
+
size 409659
|
aslittleaspossibleasmuchasnecessarydetectingoverandundertranslationswithcontrastiveconditioning/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:11a2f4f73807b096322a73c09743e0e727860349b74aa4789cbb8d77ce5b1f90
|
| 3 |
+
size 329429
|
augmentingdocumentrepresentationsfordenseretrievalwithinterpolationandperturbation/ceab5cff-0f5a-4f11-9565-7a0ac81c3e7a_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56290dfabd3c6d0b22215549a43c9ec3162634ea2f3c505746c5a268a2203c51
|
| 3 |
+
size 77059
|
augmentingdocumentrepresentationsfordenseretrievalwithinterpolationandperturbation/ceab5cff-0f5a-4f11-9565-7a0ac81c3e7a_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c7951069864516f4ba5939b78040f68cd2cba23abd72bb328adf7a8badcb1baf
|
| 3 |
+
size 93275
|