[Paper Review] Learning Variational Word Masks to Improve the Interpretability of Neural Text Classifiers
This paper proposes Variational Word Masks (Vmask), a method that learns task-specific, global word importance by applying variational inference to suppress irrelevant or noisy word features in neural text classifiers. By integrating Vmask into the input layer of models like CNN, LSTM, and BERT, the approach improves both prediction accuracy and interpretability without requiring human annotations or prior attributions, achieving superior local and global explanation quality across seven benchmark datasets.
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.
Motivation & Objective
- To improve the interpretability of neural text classifiers by learning task-specific, global word importance without relying on human-annotated explanations or prior knowledge.
- To address the limitation of post-hoc explanation methods that cannot improve model interpretability, by embedding interpretability directly into the model training process.
- To develop a model-agnostic method that enhances both prediction performance and explanation fidelity through a differentiable, trainable masking mechanism.
- To demonstrate that models with similar architectures can differ significantly in interpretability, and that this difference can be systematically improved via Vmask.
Proposed method
- Vmask is inserted after the word embedding layer and learns a variational posterior distribution over word masks to suppress irrelevant or noisy features.
- The method is formulated within the information bottleneck (IB) framework, using a variational approximation to minimize the mutual information between input words and model predictions while preserving predictive information.
- A lower bound of the IB objective is derived using variational inference, enabling end-to-end training of the model and Vmask parameters jointly.
- The word mask for each token is sampled from a Bernoulli distribution parameterized by a differentiable gate, allowing backpropagation through the masking process.
- The method is applied to three architectures—CNN, LSTM, and BERT—without modifying their core structures, making it model-agnostic.
- Post-hoc explanations are generated using LIME and SP-LIME to evaluate local and global interpretability, respectively.
Experimental results
Research questions
- RQ1Can a differentiable, trainable masking mechanism improve the interpretability of neural text classifiers without requiring human-annotated explanations?
- RQ2Does learning task-specific word importance via Vmask lead to more faithful and reliable post-hoc explanations compared to standard models?
- RQ3To what extent does Vmask improve prediction accuracy while reducing reliance on low-importance or high-frequency words?
- RQ4Can Vmask be effectively applied across diverse architectures (CNN, LSTM, BERT) and text classification tasks?
Key findings
- Vmask improved prediction accuracy across all seven benchmark datasets, with significant gains on IMDB, Subj, and Yelp, indicating enhanced generalization and robustness.
- Post-hoc LIME explanations for Vmask-based models consistently highlighted sentiment keywords (e.g., 'excellent', 'brilliant', 'thrilling'), while base models selected irrelevant words like 'plot' or 'to'.
- SP-LIME global importance analysis showed that Vmask-based models selected only topic-relevant words (e.g., 'favorite', 'powerful'), whereas base models highlighted semantically irrelevant terms such as 'performances' or 'butcher'.
- The Pearson correlation between word frequency and Vmask importance was not significant, confirming that Vmask does not simply prioritize high-frequency words.
- Word cloud visualizations confirmed that Vmask-selected words were semantically coherent with the task (e.g., 'funnest' for sentiment, 'spaceport' for news), unlike the IBA baseline which selected irrelevant terms like 'undress' or 'slurred'.
- The expectation of word masks showed that sentiment words, even low-frequency ones like 'craveable' or 'funnest', received high mask values (>0.8), while high-frequency words had mask values near 0.5, indicating selective attention to meaningful features.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.