Learning Variational Word Masks to Improve the Interpretability of Neural Text Classifiers (2020)

Abstract: To build an interpretable neural text classifier, most of the prior work has focused on designing inherently interpretable models or finding faithful explanations. A new line of work on improving model interpretability has just started, and many existing methods require either prior information or human annotations as additional inputs in training. To address this limitation, we propose the variational word mask (VMASK) method to automatically learn task-specific important words and reduce irrelevant information on classification, which ultimately improves the interpretability of model predictions. The proposed method is evaluated with three neural text classifiers (CNN, LSTM, and BERT) on seven benchmark text classification datasets. Experiments show the effectiveness of VMASK in improving both model prediction accuracy and interpretability.

## introduction neural network models have achieved remarkable performance on text classification due to their capacity of representation learning on natural language texts @xcite @xcite . however, the lack of understanding of their prediction behaviors has become a critical issue for reliability and trustworthiness and hindered their applications in the real world @xcite @xcite ). many explanation methods have been proposed to provide post-hoc explanations for neural networks @xcite @xcite , but they are only able to explain model predictions and cannot help improve their interpretability. in this work, we consider interpretability as an intrinsic property of neural network models. furthermore, we hypothesize that neural network models with similar network architectures could have specifically, we propose variational word masks (vmask) that are inserted into a neural text classifier, after the word embedding layer, and trained jointly with the model. vmask learns to restrict the information of globally irrelevant or noisy wordlevel features flowing to subsequent network layers, hence forcing the model to focus on important features to make predictions. experiments in section 5 show that this method can improve model interpretability and prediction performance. as vmask is deployed on top of the word-embedding layer and the major network structure keeps unchanged, it is model-agnostic and can be applied to any neural text classifiers. the contribution of this work is three-fold: (1) we proposed the vmask method to learn global task-specific important features that can improve both model interpretability and prediction accuracy; (2) we formulated the problem in the framework of information bottleneck (ib) @xcite and derived a lower bound of the objective function via the variational ib method @xcite ; and (3) we evaluated the proposed method with three neural network models, cnn @xcite , lstm @xcite , and bert @xcite , on seven text classification tasks via both quantitative and qualitative evaluations. our implementation is available at https:// github.com/uva-nlp/vmask. ## related work various approaches have been proposed to interpret dnns, ranging from designing inherently interpretable models @xcite , to tracking the inner-workings of neural networks @xcite , to generating post-hoc explanations @xcite . beyond interpreting model predictions, the explanation generation methods are also promising in improving model's performance. we propose an information-theoretic method to improve both prediction accuracy and interpretability. explanation from the information-theoretic perspective. a line of works that motivate ours leverage information theory to produce explana-tions, either maximizing mutual information to recognize important features @xcite , or optimizing the information bottleneck to identify feature attributions @xcite . the information-theoretic approaches are efficient and flexible in identifying important features. different from generating post-hoc explanations for well-trained models, we utilize information bottleneck to train a more interpretable model with better prediction performance. improving prediction performance via explanations. human-annotated explanations have been utilized to help improve model prediction accuracy @xcite . recent work has been using post-hoc explanations to regularize models on prediction behaviors and force them to emphasize more on predefined important features, hence improving their performance @xcite @xcite . different from these methods that require expert prior information or human annotations, the vmask method learns global important features automatically during training and incorporate them seamlessly on improving model prediction behaviors. ## method this section introduces the proposed vmask method. for a given neural text classifier, the only modification on the neural network architecture is to insert a word mask layer between the input layer (e.g., word embeddings) and the representation learning layer. we formulate our idea within the information bottleneck framework @xcite , where the word mask layer restricts the in-formation from words to the final prediction. ## experiment setup the proposed method is evaluated on seven text classification tasks, ranging from sentiment analysis to topic classification, with three typical neural network models, a long short-term memories @xcite , a convolutional neural network @xcite , and bert @xcite . ## results and discussion we trained the three models on the seven datasets with different training strategies. to echo the purpose of improving model interpretability, the rest of this section will focus on evaluating the model interpretability quantitatively and qualitatively. ## conclusion in this paper, we proposed an effective method, vmask, learning global task-specific important features to improve both model interpretability and prediction accuracy. we tested vmask with three different neural text classifiers on seven benchmark datasets, and assessed its effectiveness via both quantitative and qualitative evaluations.