Exploring Distantly-Labeled Rationales in Neural Network Models (2021)

Abstract: Recent studies strive to incorporate various human rationales into neural networks to improve model performance, but few pay attention to the quality of the rationales. Most existing methods distribute their models’ focus to distantly-labeled rationale words entirely and equally, while ignoring the potential important non-rationale words and not distinguishing the importance of different rationale words. In this paper, we propose two novel auxiliary loss functions to make better use of distantly-labeled rationales, which encourage models to maintain their focus on important words beyond labeled rationales (PINs) and alleviate redundant training on non-helpful rationales (NoIRs). Experiments on two representative classification tasks show that our proposed methods can push a classification model to effectively learn crucial clues from non-perfect rationales while maintaining the ability to spread its focus to other unlabeled important words, thus significantly outperform existing methods.

## introduction recent studies have shown an increasing interest in incorporating human knowledge into neural network models @xcite @xcite @xcite . for many natural language processing (nlp) tasks, such domain knowledge often refers to salient words annotated by human experts, which are also called rationales. nonetheless, careful, case-by-case rationale annotations inevitably involve large amounts of manual efforts, and are often extravagant or not even available. in practice, distantly-labeled rationales serve as a plausible alternative. instead of labelling case by case, annotators could design heuristic rules to generate rationales for the whole dataset. for instance, in sentiment analysis, annotators can collect words with strong sentiment polarity (positive or negative) to construct a sentiment lexicon, with which they can automatically annotate rationales in a short time through word matching, such as painful and riveting in the bottom case of however, just as researchers apply auxiliary measures to enforce higher concentration on distantlylabeled rationales and expect substantial model gains, potential flaws in the quality of those rationales quietly arise to hinder the model from benefiting from human priors. specifically, as discussed in the sample annotations, we find there are, among others, mainly two types of quality issues lying in distantly-labeled rationales: insufficiency. since distantly-labeled rationales do not include case-specific checking and only contain universally helpful words according to predefined rules/lexicons, such rationales may not provide sufficient supporting evidence in individual cases, and more information from non-rationale words may be necessary towards the final classification. given an instance with distantly-labeled rationales, we call the unlabeled words that are contributing to the final prediction as potential important non-rationales, or pins for short, e.g., but and rewarded in the bottom of indiscrimination. although distantly-labeled rationale words are often universally helpful, given a specific context, different rationale words may exhibit varied importance. if those distantly-labeled rationales are applied in a 0-1 form to all instances and treated equally important, the tremendous diversity of actual importance in individual cases is just ignored. we refer to the distantly-labeled rationale words that are not helpful in a specific instance as non-important rationales, or noirs for short. although many existing works have attempted to incorporate automatically-obtained rationales in different ways and achieved promising results in various applications @xcite @xcite , they do not explicitly examine the quality issues of distantly-labeled rationales, nor formally consider them during modeling, except @xcite , which incorporate vague feature feedback into a linear classifier. on the one hand, most existing methods try to apply strict constraints to require model focus to conform to rationales, often encouraging those words to share all the model focus @xcite . however, as distantlylabeled rationales are often insufficient to draw correct conclusions, the rigid requirements may turn out to incorrectly ignore the pins. on the other hand, rationale words are often expected to share equal importance, which is not the case in practice and can falsely lift the focus on noirs. in this paper, we seek better ways to exploit distantly-labeled rationales, and analyze to what extent the aforementioned quality issues can be alleviated with our methods. we propose two novel gradient-based schemes, namely order loss and gate loss, to handle the insufficiency and indiscrimination problems, respectively. order loss presents a relaxed constraint on rationales by requiring them to have higher gradients than nonrationales, instead of occupying the entire model focus. gate loss introduces an early stop mechanism, which prevents over training that enhances the significance of non-helpful rationales. we evaluated our methods on two nlp tasks, sentiment analysis and event detection, and the experimental results show that our methods can better exploit non-perfect distantly-labeled rationales, paying attention to pins while avoiding over-training on noirs, thus outperforms competitive counterparts. our main contributions are as follows: (1) we formally address the quality issues of distantlylabeled rationales, namely insufficiency and indiscrimination, and propose two novel loss functions to push the model training process while taking the potential important non-rationales (pins) and nonimportant rationales (noirs) into account. the two new losses can also be jointly used and lead to further improvement. (2) we conduct comprehensive evaluations on two classification tasks and our analysis shows that our proposed methods can better deal with automatically-annotated rationales, even in a lower quality. ## word salience before elaborating on our proposed methods, we first introduce the definition of word salience, a measure of the importance of words, which is widely applied in previous works @xcite @xcite given a model f and an input word sequence @xmath0, x 2 , ..., x n ), the word salience is a vector @xmath1, s 2 , ..., s n ) that denotes the importance of every word in x, where s i indicates how much x i contributes to the model f . prior works have explored different methods to determine word salience @xcite . among them, we choose gradientbased methods since they are model-agnostic and easy to obtain. moreover, since gradient-based word salience is differentiable with respect to model parameters, taking it as part of the objective makes it more convenient to optimize the loss. for a function f , the magnitude (absolute value) of its gradients with respect to input x indicates how sensitive the final decision is to the change of x @xcite . in most nlp settings, the gradient of a word is the sum of gradients for each dimension of word embeddings. formally, the gradient of an input word x i to a function f can be calculated as: for gradient-based methods, we use the normalized gradients to calculate word salience, which represents the proportion of a word's contribution in a sentence: there exist more complicated gradient-based methods for calculating word salience @xcite . here, we base the salience on the vanilla gradient method, for the following reasons: ## our methods to incorporate human rationales into neural models, most existing works introduce an auxiliary loss to impel the neural network model to put more emphasis on rationale annotations. formally, for a multi-class classification problem, the joint objective can be formalized as: we start with a discussion on a base loss currently in use, which suffers from the insufficiency and indiscrimination of non-perfect rationales. alternatively, we introduce two methods, namely order loss and gate loss, which help models to minimize the influence of noirs and leave enough space for pins as well. ## experiments we evaluate our methods on two sentence classification tasks, sentiment analysis and event trigger detection, on stanford sentiment treebank (sst) and ace-2005, respectively, which have been considered as a suitable testbed to investigate how additional rationales can help to improve a base model. stanford sentiment treebank (sst) @xcite includes 10,662 sentences tagged with sentiment on a scale of 1 (most negative) to 5 (most positive). we filter out neutral instances and divide the remaining sentences into positive (4, 5) and negative (1, 2), making it a binary classification task. there are 6920 sentences in training set, 872 sentences in validation set and 1821 sentences in test set. in sst, words are labeled with 5 levels of sentiment polarity. we take the words with extreme positive polarity (label 1) or negative polarity (label 5) as our sentiment lexicon, which is used to automatically annotate rationale words in each sentence. 56.7% training instances have at least one rationale word. there are 0.85 annotated rationale words per sentence on average, and the average sentence length for training is 19.3 words. ace-2005 @xcite is an event detection (ed) dataset. following previous works in event detection @xcite , we consider event trigger detection as a classification task. that is, for every token in a given sentence, we aim to predict whether the current token is an event trigger or not. here, we do not consider identifying event types and formulate it as a binary classification task for ease of exposure. previous studies show that trigger words are strong, universal features that can indicate events of specific types. therefore, in each sentence, we automatically label a word as rationale if and only if it has been labelled at least once as a trigger in the training set. we use the same split as @xcite , with 14,849 sentences for training, 836 for validation, and 672 for testing. 88.7% of training sentences have been annotated with at least one rationale word. on average, there are 4.66 rationale words per sentence. evaluation metrics following previous works, we use accuracy (acc) and f1-scores (f1) as the evaluation metrics on sst. we use f1-score as the only metrics on ace-2005 and do not examine accuracy, since this dataset is extremely unbalanced, where a model predicting all instances into negative can achieve over 97.5% acc. we run each setting 5 times and report mean and standard deviations. implementation details our basic classification model is a convolutional neural network (cnn) @xcite . the input tokens are first transformed to word embeddings, which are 300-dimension glove vectors @xcite in sst, and the combination of a 300dimension glove embedding and a 50-dimension entity (originally labeled) embedding in ace-2005. then, a convolution layer with 200 kernels, viz. 50 kernels with width 2, 3, 4 and 5 respectively, is used to extract local features, followed by a feed forward neural network to gain hidden representations of words. we then calculate the sentence representation using the attention mechanism, and feed it into a softmax regression to obtain estimated probability distribution. all activation functions are tanh, the dropout rate is 0.5, and the batch size is 512 for sst and 256 for ace. we optimize the model with adam (kingma and ba, 2015) with learning @xmath2, β 1 = 0.9, β 2 = 0.999 @xmath3. the l 2 -normalization rate is set to 10 -4 . for instances without any annotated rationale words, we do not apply auxiliary losses to them. ## related works incorporating human priors has been well studied in different nlp applications with different forms of rationales. @xcite attains a more reliable support vector machine by adding contrast training examples, which mask out important substrings. @xcite exploit pre-annotated rationales to train an extractor and use the extracted words for classification. @xcite concatenates information of regular expressions to word embeddings for spoken language understanding. @xcite uses an rnn to model regular expressions for text classification tasks. most of these works provide effective ways to utilize word-level knowledge, but none of them formally considers the quality issues with the distantly-labeled rationales. additionally, @xcite discuss the insufficiency issue in the feature feedback framework, and try to incorporate vague feature feedback into a linear classifier. as a widely-used explanation method, the attention mechanism is often applied with constraints to guide model focus towards the significant part of inputs @xcite @xcite . our proposed methods are currently based on gradient-based salience calculation, which is easier to obtain and model-agnostic, thus can be applied to a wider range with ease. but our methods do not depend on specific calculation methods for word salience, and can be easily transplanted to attention-based constraints, which we will leave for future work. recent studies have provided various techniques to constrain gradient-based word salience. @xcite forces the gradient of features, which are annotated non-helpful, to be zero, to alter the decision boundary of the model. @xcite calculates l 2 distance between path integrated gradients attribution for selected tokens and a target value in the objective function, to mitigate unintended bias in toxic comment classification and improve classifier performance in scarce settings. @xcite requires the gradients of all rationales to be positive to encourage the model to focus on salient words. the success of these works motivates us to further explore the impact of distantly-labeled rationales, which are easier to obtain but will bring challenges to previous methods as we have shown in experiments. in our method, we formally consider the insufficiency and indiscrimination issues, and design two losses to not only push the classification model to take care of those potentially important non-rationales, but also discriminatively focus on rationales to avoid overtraining on those non-helpful annotations. there is another line of works that try to explicitly produce human-readable rationales during model learning. @xcite use reinforcement learning to identify keywords as rationales to improve model interpretability. deyoung et al. (2020) further constructs a benchmark dataset to engage the research about interpretable model de-sign. while, our work is to examine how to better incorporate non-perfect rationales into neural network models, which is orthogonal to that line of research. ## conclusions while distantly-labeled rationales are easy to obtain, they are often insufficient and indiscriminative, compared with high quality expert annotations. in this paper, we provide new perspectives on how to deal with such rationales, and propose two novel methods to guide a classification model to learn from potentially important non-rationales while avoiding over-training on noisy annotations. experiments on two nlp classification tasks show that our methods can effectively tackle the mentioned quality issues and are robust enough to exploit the non-perfect rationales even in more tough situations. our methods are not limited to specific salience calculations, we hope to explore more forms of word salience and rationales in the future. we also expect our approaches to be beneficial in other scenarios where rationales are noisy and incomplete. this even includes scenarios when rationales are not distantly labeled, e.g., crowdsourced human annotations with low agreement @xcite .