[Paper Review] Automatic Rule Extraction from Long Short Term Memory Networks
The authors introduce word-importance scores for LSTMs to extract representative phrases and build a simple rule-based classifier that closely approximates LSTM outputs on sentiment analysis and WikiMovies QA.
Although deep learning models have proven effective at solving problems in natural language processing, the mechanism by which they come to their conclusions is often unclear. As a result, these models are generally treated as black boxes, yielding no insight of the underlying learned patterns. In this paper we consider Long Short Term Memory networks (LSTMs) and demonstrate a new approach for tracking the importance of a given input to the LSTM for a given output. By identifying consistently important patterns of words, we are able to distill state of the art LSTMs on sentiment analysis and question answering into a set of representative phrases. This representation is then quantitatively validated by using the extracted phrases to construct a simple, rule-based classifier which approximates the output of the LSTM.
Motivation & Objective
- Motivate interpretability of LSTMs in NLP by identifying input patterns that drive predictions.
- Extract consistent phrases from trained LSTMs that reflect learned patterns.
- Validate extracted phrases by constructing a simple, interpretable rule-based classifier.
- Demonstrate applicability to both sentiment analysis and a complex QA dataset (WikiMovies).
Proposed method
- Decompose LSTM outputs into multiplicative and additive terms that quantify word contributions to class probabilities (equations 8–12).
- Define additive cell decomposition to account for forget-gate effects on downstream predictions (equations 9–12).
- Extract candidate phrases by scoring patterns with respect to their class-specific contributions (equations 13–16).
- Evaluate patterns by constructing a rules-based classifier that uses prioritized phrases for prediction.
- Adapt the approach to WikiMovies by conditioning word representations on the question and treating entity predictions as binary classification tasks (sections 5.3.2–5.3.4).
- Compare three importance measures (additive cell decomposition, cell difference, gradient) to assess interpretability and predictive alignment.
Experimental results
Research questions
- RQ1Can LSTM outputs be decomposed to yield word-level contributions that are interpretable?
- RQ2Do consistently important phrases exist that summarize what an LSTM has learned for sentiment and QA tasks?
- RQ3Can a rule-based classifier using extracted phrases approximate LSTM performance in sentiment analysis and WikiMovies?
- RQ4Which word-importance measures yield the most stable and meaningful phrase patterns?
- RQ5How well do extracted patterns generalize across tasks of increasing complexity (sentiment vs. QA)?
Key findings
- Additive cell decomposition provides robust, interpretable word-importance scores that outperform simple cell-difference or gradient measures.
- Extracted phrases align with human intuition (e.g., sentiment-bearing expressions; movie-related patterns) and can be used to predict classes with reasonable accuracy.
- A rules-based classifier built from top-scoring phrases closely approximates LSTM performance on sentiment datasets (Yelp, SST).
- On WikiMovies, the LSTM achieves higher accuracy than baselines, and pattern-based approximations approach within a small error margin (cell decomposition yielding strongest results among patterns).
- Pattern quality varies by dataset; additive decomposition yields clearer, less noisy patterns than alternative measures.
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.