DSREG: USING DISTANT SUPERVISION
Year: 2019

Abstract:
In this paper, we aim at tackling a general issue in NLP tasks where some of the negative examples are highly similar to the positive examples, i.e., hard-negative examples). We propose the distant supervision as a regularizer (DSReg) approach to tackle this issue. We convert the original task to a multi-task learning problem, in which we first utilize the idea of distant supervision to retrieve hard-negative examples. The obtained hard-negative examples are then used as a regularizer, and we jointly optimize the original target objective of distinguishing positive examples from negative examples along with the auxiliary task objective of distinguishing soften positive examples (comprised of positive examples and hard-negative examples) from easy-negative examples. In the neural context, this can be done by feeding the final token representations to different output layers. Using this unbelievably simple strategy, we improve the performance of a range of different NLP tasks, including text classification, sequence labeling and reading comprehension.

heading: 1 INTRODUCTION
text: Consider the following sentences in a text-classification task, in which we want to identify text describing hotels with good service/staff (as depicted as aspect-level sentiment classification in Tang et al. (2015); Li et al. (2016); Lei et al. (2016)):
• S1: the staff are great. (positive) • S2: the location is great but the staff are surly and unhelpful .. (hard-negative) • S3: the staff are surly and unhelpful. (easy-negative)
S1 is a positive example since it describes a hotel with good staff. Both S2 and S3 are negative because staff are unhelpful. However, since S2 is lexically and semantically similar with S1, standard models can be easily confused. As another example, in reading comprehension tasks like NarrativeQA Kočiskỳ et al. (2018), truth answers are human-generated ones and might not have exact matches in the original passage. A commonly adopted strategy is to first locate similar sequences from the original passage using a pre-defined threshold (using metrics like ROUGE-L) and then treat them as positive training examples. Sequences that are semantically similar but right below this specific threshold will be treated as negative examples and will thus inevitably introduce massive labeling noise in training. This problem is ubiquitous in a wide range of NLP tasks, i.e., some of the negative examples are highly similar to positive examples. We refer to these negative examples as hard-negative examples for the rest of this paper. Similarly, the negative examples that are not similar to the positive examples are refered to as easy-negative examples. Hard-negative examples can cause big trouble in model training, because the nuance between positive examples and hard-negative examples can cause confusion for a model trained from scratch. To make things worse, when there is a class-balance problem where the number of negative examples are overwhelmingly larger than that of positive examples (which is true in many real-world use cases), the model will be at loose ends because positive features are buried in the sea of negative features.
To tackle this issue, we propose using the idea of distant supervision (e.g., Mintz et al. (2009); Riedel et al. (2010)) to regularize training. We first harvest hard-negative examples using distant supervision. This process can be done by a method as simple as using word overlapping metrics (e.g., ROUGE, BLEU or whether a sentence contains some certain keywords). With the harvested hard-negative examples, we transform the original binary classification setting to a multi-task learning setting, in which we jointly optimize the original target objective of distinguishing positive examples
from negative examples along with an auxiliary objective of distinguishing soften positive examples (comprised of positive examples and hard-negative examples) from easy-negative examples. For a neural network model, this goal can be easily achieved by using different output layers to readout the final-layer representations. In this way, the features that are shared between positive examples and hard negative examples can be captured by the model. Models can easily tell which features that can distinguish positive examples the most. Using this unbelievably simple strategy, we improve the performance of in a range of different NLP tasks, including text classification, sequence labeling and reading comprehension.
The key contributions of this work can be summarized as follows:
• We study a general situation in NLP, where a subset of the negative examples are highly similar to the positive examples. We analyze why it is a problem and how to deal with it. • We propose a general strategy that utilize the idea of distant supervision to harvest hard-
negative training examples, and transform the original task to a multi-task learning problem. The strategy is widely applicable for a variaty of tasks. • Using this unbelievably simple strategy, we can obtain significant improvement on the tasks
of text-classification, sequence-labeling and reading comprehension.

heading: 2 RELATED WORK
text: Distant Supervision Mintz et al. (2009); Riedel et al. (2010); Hoffmann et al. (2011); Surdeanu et al. (2012) It is proposed to address the data sparsity issue in relation extraction. Suppose that we wish to extract sentences expressing the ISCAPITAL relation, distant supervision augments the positve training set by first aligning unlabeled text corpus with all entity pairs between which the ISCAPITAL relation holds and then treating all aligned texts as positive training examples. The idea has been extended to other domains such as sentiment analysis Go et al. (2009), computer security event Ritter et al. (2015), life event extraction Li et al. (2014) and image classification Chen and Gupta (2015). Deep leaning techniques have significantly improved the results of distant supervision for relation extraction Zeng et al. (2017); Luo et al. (2017); Lin et al. (2017); Toutanova et al. (2015).
Multi-Task Learning (MTL) The idea of using data harvested via distant supervision as auxiliary supervision signals is inspired by recent progress on multi-task learning: models for auxiliary tasks share hidden states or parameters with models for the main task and act as regularizers. In addition, neural models often celebrate performance boost when jointly trained for multiple tasks Collobert et al. (2011); Chen et al. (2017); Hashimoto et al. (2017); FitzGerald et al. (2015). For instance, Luong et al. (2015) use sequence-to-sequence model to jointly train machine translation, parsing and image caption generation models. Dong et al. (2015) adopt an alternating training approach for different language pairs, i.e., they optimize each task objective for a fixed number of parameter updates (or mini-batches) before switching to a different language pair. Swayamdipta et al. (2018) propose using syntactic tasks to regularize semantic tasks like semantic role labeling. Hashimoto et al. (2017) improve universal syntactic dependency parsing using a multi-task learning approach.

heading: 3 MODELS
text: In this section, we discuss the details of the proposed model. We focus on two different types of NLP tasks, text classification and sequence labeling.

heading: 3.1 TEXT CLASSIFICATION
text: Suppose that we have text-label pairs D = {xi, yi}. xi consists of a sequence of tokens xi = {wi,1, wi,2, ..., wi,ni}, where ni denotes the number of tokens in xi. Each text xi is paired with a binary label yi ∈ {0, 1}. The training set can be divided into a positive set D+ and a negative set D−. Let ŷi denote the model prediction. The standard training objective can be given as follows:
L1 =− ∑
(xi,yi)∈D
logP (ŷi = yi|xi)
=− ∑
(xi,yi)∈D+ logP (ŷi = 1|xi)− ∑ (xi,yi)∈D− logP (ŷi = 0|xi) (1)
LetDhard-neg denote the hard-negative examples retrieved using distant supervision. Here we introduce a new label z: z = 1 for instances in Dhard-neg ∪D+, and z = 0 for instances in D− −Dhard-neg. We regularize L1 using an additional objective L2:
L2 =− ∑
(xi,zi)∈D+∪Dhard-neg
logP (ẑi = 1|xi)− ∑
(xi,zi)∈D−−Dhard-neg
logP (ẑi = 0|xi) (2)
L2 can be thought as an objective to capture the shared features in positive examples and hardnegative examples. Equ.2 can also be extended to another similar form, distinguishing between Dhard-pos∪D− (i.e., the union of positive examples that are similar to negative and negative examples) and D+ −Dhard-pos. Empirically, we also find that adding one more three-class classification objective L3, which separates positive vs hard-negative vs easy-negative introduces additional performance boost. We suggest that adding this three-class classification will additionally highlight the difference between hard negative examples and easy negative examples for the model. The label is denoted by l, where l = 0 for easy negative examples, l = 1 for positive examples and l = 2 for hard negative examples. This leads the final objective function at test time to be :
L = λ1L1 + λ2L2 + λ3L3 (3) where λ1 + λ2 + λ3 = 1 are used to control the relative importance of each loss. For a neural classification model, p(z|x), p(y|x) and p(l|x) share the same model structure. The input text x is first mapped to a d-dimensional vector representation hx using suitable contextualization strategy, such as LSTMs Hochreiter and Schmidhuber (1997), CNNs Kim (2014) or transformers Vaswani et al. (2017). Then hx is fed to three fully connected layers with softmax activation function to compute p(y|x), p(z|x) and p(l|x) respectively:
p(y|x) = softmax(Wyhx) p(z|x) = softmax(Wzhx) p(l|x) = softmax(Wlhx)
(4)
where Wy,Wz ∈ R2×d, Wl ∈ R3×d.

heading: 3.2 SEQUENCE LABELING
text: In sequence labeling tasks Lafferty et al. (2001); Ratinov and Roth (2009); Collobert et al. (2011); Huang et al. (2015); Ma and Hovy (2016); Chiu and Nichols (2016), a model is trained to assign
labels to each of the tokens in a text sequence. Suppose that we are to assign labels to all tokens in a chunk of text D = {x1, x2, ..., xnD} where nD denotes the number of tokens in D. Let us consider a simple case where we only have one type of tag and we will use the standard IOB (short for inside, outside, beginning) sequence labeling format. In this case, it is a three-class classification problem, assigning yi ∈ (B, I,O) to each token. We treat tokens with label B and I as D+ and tokens with label O as D−. The objective function for the vanilla sequence labeling task is given as follows:
L1 =− logP (y1:nD |x1:nD ) (5) P (y1:nD |x1:nD ) can be computed using standard sequence tagging models such as CRF Lafferty et al. (2001), hybrid CRF+neural models Huang et al. (2015); Ma and Hovy (2016); Chiu and Nichols (2016); Ye and Ling (2018) or purely neural models Collobert et al. (2011); Devlin et al. (2018).
To take into account negative examples that are highly similar to positive ones, we use the idea of distant supervision to first retrieve the set of hard-negative dataset Dhard-neg. Akin to the text classification task, we introduce a new label zi ∈ (B, I,O), indicating whether the current token belongs to Dhard-neg. To incorporate the collected hard-negative examples into the model, again we introduce an auxiliary objective of assigning correct z labels to different tokens:
L2 =− logP (z1:nD |x1:nD ) (6) Similar to the text classification task, we also want to separate hard negative examples, easy negative examples and positive examples, so we associate each example with a label l. We thus have distinct “outside” and “beginning” labels for positive examples and hard-negative examples, i.e., l ∈ (Bpos, Ipos, Bhard-neg, Ihard-neg, O). Labels for different categories regarding y and z are shown in Table 2. The final objective function is thus as follows:
L = λ1L1 + λ2L2 + λ3L3 (7) Again λ1 + λ2 + λ3 = 1. At the training time, the two functions are simultaneously trained. At the test time, we only use P (yi|x1:nD ) to predict yi as the final decision. For CRF-based models Huang et al. (2015); Ma and Hovy (2016); Chiu and Nichols (2016), neural representations are fed to the CRF layer and used as features for decision making. As in Ma and Hovy (2016), neural representation hxi is computed for each token/position using LSTMs and CNNs, and then forwarded to the CRF layer. The key issue with CRF-based models is that the CRF model is only
able to output one single label. This rules out the possibility of directly feeding hx to three readout layers to simultaneously predict y, z and l. We propose the following solution: we use three separate CRFs to predict y (for L1), z (for L2) and l (for L3), denoted by CRFy, CRFz and CRFl. The three CRFs use the same hidden representation hx obtained from the same neural model as inputs, but independently learn their own features weights. We iteratively perform gradient descent on the three CRF s, and the error from the three CRF s are back-propagated to the neural model iteratively.

heading: 4 EXPERIMENTS

heading: 4.1 TEXT CLASSIFICATION
text: For the text classification task, we used three datasets, the Stanford Sentiment Treebank dataset (SST) Socher et al. (2013), the hotel review dataset for aspect-specific sentiment analysis in Lei et al. (2016) and the financial statement dataset that we created.
The Stanford Sentiment Treebank (SST) Dataset associates each phrase within a sentence with a sentiment label. The task is originally further divided into two-class coarse-grained classification and five-class fine-grained classification. We only report binary classification results. For baseline, we used BERT-large Devlin et al. (2018). The representation for CLS is output to the softmax layer for classification. We used distant supervision to retrieve hard-negative examples: similar to Mintz et al. (2009), we employed a simple strategy, in which we treat negative reviews that contain positive sentiment lexicons as hard-negative examples. Positive sentiment words are retrieved using the MPQA corpus Wilson et al. (2005).
The Hotel Review Dataset contains roughly 50,000 reviews with an average length of 120 words. Each review contains ranking scores (integers from 1 to 5) for different aspects of the hotel, such as service, cleanliness, location, rooms, etc. The dataset is constructed in a way that each review might contain diverse sentiments towards different aspects, and it is interesting to see how a model manages or fails to identify these different aspects and their associated scores when entangled with other aspects. Following Li et al. (2016), the task is divided into four sub-tasks, each of which classifies the sentiment of one of the following four aspects: we focus on four aspects: value, rooms, service and location. We filtered neutral reviews (with score 3) and treat those with score 1 and 2 as negative ones, 4 and 5 as positive one. The task is thus transformed to a binary classification task. The same review can thus carries positive sentiment regarding one aspect, but negative for the other. We report average accuracy for the four tasks. For fair comparison, we used the baseline in Li et al. (2016). The model combines Bi-LSTMs with a memory-network structure Sukhbaatar et al. (2015) at both the word level and the sentence level to obtain document-level representations, which are then fed to a sigmoid function for binary classification. Hard-negative examples are retrieved is the same way as in the SST dataset.
The Financial Statement Dataset is a dataset created by us. It consists 97,736 sentences, each of which contains labels for the values of financial statement items (FSI) for individual businesses or services from annual reports of listed companies (Statistics shown in Table 6). The goal is to extract:
• the [value] of [which financial statement item] of [which business or service] of a listed company
The dataset can be used for both text classification and sequence labeling. For the task of text classification, the goal to identify whether a sentence contains useful FSI information, i.e., whether a sentence contains the FSI of interest and the corresponding value. Sentences with annotated financial statement items and the corresponding values as positive examples, and the rest are negative examples.
We used the following distant-supervision pattern to retrieve hard-negative examples: we treat texts in negative examples that contain more than one mention of financial statement items as hard-negative examples. For example, the sentence Benefiting from the decline in raw material costs and the further improvement of the company’s management skills, the profit of the company increased during the reporting period is a hard-negative example. Particularly, it is a negative example since it does not specifically indicate the value of the profit and thus is not of interest. But this sentence is a hard-negative one because it contains the FSI keyword profit.
For the ease of notations, we use Pos and Neg to denote positive and negative examples, HardNeg to denote hard-negative examples and EasyNeg to denote easy-negative examples. We compare performances of the following models:
• L1: the vanilla classification model to distinguish between positive examples (Pos) and negative examples. • Pos∪HardNeg|EasyNeg→ Pos|HardNeg: a hierarchical model that involves two states: 1)
distinguishing between easy-negative (EasyNeg) and the union of positive and hard-negative (Pos∪HardNeg) 2) distinguishing positive (Pos) from hard-negative (HardNeg) examples. • L3: a three-class classification model to distinguish Pos, HardNeg and EasyNeg. • L1 + L2: the proposed multi-task learning model that jointly trains two objective functions:
distinguishing Pos from Neg and positive+easy negative (Pos∪HardNeg) from hard negative (EasyNeg) examples. • L1 + L3: combining the standard classification objective with the three class classification
objective. • L1 + L2 + L3: combining the three.
Results Table 3 shows results for text classification tasks. As can be seen, three versions of the proposed DSReg models, i.e., L1+L2, L1+L3 andL1+L2+L3, outperform the binary classification model and the pipelined model, which aligns with our expectation. For the pipelined model, since the error accumulates over stages, it underperforms not only the DSReg models, but also the binary classification model. By using both the three-class classification (L3) and Pos∪HardNeg|EasyNeg (L2) as regulations, the L1 + L2 + L3 setting leads to the best performance.

heading: 4.2 SEQUENCE LABELING
text: For the sequence labeling task, again we used the Financial Statement Dataset. The task can be transformed to assigning IOB (short for inside, outside, beginning) of each label category to each word. Labels to extract include financial statement items (FSI), unit, value, the change of FSI (FSIchange), time, business & service (B&S), bases of comparison (BoC), as illustrated in the following example: The (O) revenue (B-FSI) of education (B-B&S) sector (I-B&S) increased (B-FSI-change) by 25% (B-value) over (O) the (B-BoC) same (I-BoC) period (I-BoC-I) of (I-BoC) the (I-BoC) previous (I-BoC) year (I-BoC) . (O)
We used the keyword matching strategy to retrieve hard-negative examples. We report statistics at the word-level in Table 4. The three-class classification model (L3) Pos|HardNeg|EasyNeg and the pipelined model Pos∪HardNeg|EasyNeg→ Pos|HardNeg significantly underperform the others, and their results are omitted due to space limitations. From Table 4, we can see that the proposed L1 + L2 + L3 model significantly outperforms the Pos|Neg baseline by (+1.79).

heading: 4.3 READING COMPREHENSION
text: The narrativeQA dataset Kočiskỳ et al. (2018) consists of 1,567 stories with 46,765 question-answer pairs. Following Kočiskỳ et al. (2018), we conduct experiments on both the summary setting and the full version setting. For the summary setting, answer spans need to be extracted from story summaries, and for the full version setting, they need to be extracted from the entire books or movie scripts. We followed the routines of the neural benchmarks in Kočiskỳ et al. (2018), in which we first retrieve relevant chunks from the story using an IR system. Then we concatenate the selected chunks. Since the answer for each query is manually annotated, a large proportion of answers do not have corresponding spans in the original passage that can be exactly matched. In Kočiskỳ et al. (2018), the span that achieves the highest ROUGE-L score with respect to the reference answer are used as gold spans. The start and end indices are predicted using BiDAF Seo et al. (2016). As in Kočiskỳ et al. (2018), spans with highest ROUGE-L scores are treated as positive examples. Suppose that for a gold answer a, text span a′ has the highest ROUGE-L score of ROUGE(a, a′), and is thus treated as the positive training example. Since documents and passages in this task are very similar, there are many text spans that are highly similar to the gold answer. These spans are treated as hard-negative examples. Specifically, we treat spans whose ROUGE-L scores are greater than α× ROUGE(a, a′) as hard-negative examples, where α ∈ (0, 1) is the parameter to tune on the development set. We followed the criteria in Kočiskỳ et al. (2018) to train a vanilla BiDAF model. We used the splits of positive examples, hard-negative examples and easy-negative examples to train DSReg models, using both the three-class classification and the (positive+hard-neg) vs. easy-neg as regulations. We report scores for BLEU-1, BLEU-4 Papineni et al. (2002), Meteor Denkowski and Lavie (2011) and ROUGE-L scores Lin (2004). Results are shown in Table 5. When combined with BiDAF, the proposed DSReg model outperforms the standard BiDAF model in both settings. As discussed in Kočiskỳ et al. (2018), the span prediction model performs the best in the summary setting. This sets new state-of-the-art results for the summary setting on the NarrativeQA dataset.

heading: 5 ABLATION STUDY AND VISUALIZATION
text: 5.1 THE EFFECT OF L2: POS∪HARDNEG|EASYNEG
We examine the influence of the parameter λ at the interval of 0.1 in the objectiveL = (1−λ)L1+λL2 on the hotel review dataset. It is worth noticing that λ cannot take the value of 1 here, since we are not able to make decisions purely based on L2. Results are shown in Figure 3. The performance first goes up when λ is smaller than 0.4, and then declines dramatically. It accords with our expectation that these losses are complementary to each other.
5.2 THE EFFECT OF L3: POS|HARDNEG|EASYNEG
We examine the influence of the parameter λ at the interval of 0.1 in the objectiveL = (1−λ)L1+λL3 on the hotel review dataset. Results are shown in Figure 3. Best performance is obtained when λ is set to 0.3.

heading: 5.3 VISUALIZATION
text: For visualization, we use FIRST DERIVATIVE SALIENCY to unveil why DSReg helps. First Derivative Saliency is a commonly adopted visualization technique to see how much each input unit contributes to the final decision using first-order derivatives Erhan et al. (2009); Li et al. (2015); Simonyan et al. (2013). Given word embedding E = {e}, where e denotes the value of each embedding dimension, and a class label c, the trained model associates the pair (e, c) with a log likelihood S(c, e). For neural models, the class score S(c, e) is a highly non-linear function. S(c, e) is approximated with a linear function of e by computing the first-order Taylor expansion
S(c, e) ≈ w(c, e)T e+ b (8) where w(c, e) is the derivative of S(c, e) with respect to the embedding dimension e.
w(c, e) = ∂S(c, e)
∂e |e (9)
The magnitude (absolute value) of the derivative indicates the sensitiveness of the final decision to the change in one particular dimension, telling us how much one specific dimension of the word
embedding contributes to making the decision c. The saliency score of a specific word E is the average of the absolute value of w(c, e):
S(c, E) = 1 |E| ∑ e∈E |w(c, e)| (10)
We use the example “I hate the movie though the plot is interesting” in SST and “Location is nice. Staff very surly and un helpful” in aspect sentiment identification to show the working mechanism of different constituents in DSREG to illustrate why it works better. Both examples consist of two clauses with opposite sentiments, which inevitably makes a model confused.
Figure 4 shows saliency maps regarding each word output from different models. Vanilla denotes the baseline classification model, the objective of which consists of only L1. As can be seen from S(pos, E) of Vanilla-L1 , though the model emphasizes more on hate in the first clause, but attaches significant amount of importance to ”interesting” in the second clause. This issue is largely alleviated in S(pos, E) of DSREG-L1, which offers a clearer focus on the first clause than the second one. The reason why this happens can be explained by the saliency map from S(pos∪hardNeg, E) of DSREG-L1: the example is hard-negative (it is negative but contains positive lexicon ”interesting”) and the sentiment from the distracting word “interesting” is captured in the S(pos∪hardNeg, E), making S(pos, E) more easily focus on the truly positive clause.

heading: 6 CONCLUSION
text: In this paper, we tackle a general problem in NLP, i.e., the situation in which a subset of the negative examples are highly similar to the positive ones. We propose the DSReg: a model that utilizes distant supervision as a regularizer. We transform the original task to a multi-task learning problem, in which we first utilize distant supervision to retrieve hard-negative examples, which are then used as a regularizer. We show that the proposed strategy lead to significant performance boost text classification, sequence labeling and machine reading comprehension tasks.

heading: 7 APPENDIX

Review summaries:
This paper proposes to improve performance of NLP tasks by focusing on negative examples that are similar to positive examples (e.g. hard negatives). This is achieved by regularizing the model using extra output classifiers trained to classify examples into up to three classes: positive, negative-easy, and negative-hard. Since those labels are not provided in the original data, examples are classified using heuristics (e.g. negative examples that contain a lot of features predictive of a positive class will be considered as hard-negative examples), which are used to provide distant supervision. This general approach is evaluated on phrase classification tasks, one information extraction task, and one MRCQA task.

This paper is aimed at tackling a general issue in NLP: Hard-negative training data (negative but very similar to positive) can easily confuse standard NLP model. To solve this problem, the authors first applied distant supervision technique to harvest hard-negative training examples and then transform the original task to a multi-task learning problem by splitting the original labels to positive, hard-negative, and easy-negative examples. The authors consider using 3 different objective functions: L1, the original cross entropy loss; L2, capturing the shared features in positive and hard-negative examples as regularizer of L1 by introducing a new label z; L3, a three-class classification objective using softmax.