Abstract
As natural language processing (NLP) models increase in complexity, the demand for post-hoc interpretability tools has grown. This paper evaluates the consistency and accuracy of two prominent explanation paradigms: feature attribution (represented by LIME) and rule extraction (represented by Anchors). By testing these methods against "transparent" models where ground-truth feature importance is known, the study reveals a significant disconnect. While LIME consistently identifies the most influential features, Anchors often prioritizes "sufficient" but incomplete subsets of words, leading to lower fidelity and higher computational costs.
Introduction
Modern NLP architectures, such as BERT and GPT-3, are often described as "black boxes" due to their multi-layered complexity. In high-stakes domains like healthcare or legal analysis, understanding why a model reached a specific conclusion is as important as the conclusion itself. To address this, researchers have developed various interpretability tools.
Two of the most popular approaches are:
- Feature Attribution (e.g., LIME): This method assigns a numerical score to every input feature (word) based on its contribution to the final prediction.
- Rule Extraction (e.g., Anchors): This method identifies a minimal set of features—a "rule"—that is sufficient to guarantee the model's prediction with high probability.
Despite their widespread use, it remains unclear whether these two approaches provide consistent explanations for the same model decisions. This paper investigates the alignment between these methods and introduces a novel metric to quantify their fidelity to the underlying model.
Methodological Framework
To evaluate these explainers objectively, the researchers utilized "transparent" models—logistic regression and decision trees—where the mathematical importance of each word is explicitly defined by internal coefficients. This allowed for a direct comparison between the explainer's output and the "ground truth."
The $\ell$-index
The authors propose the $\ell$-index, a metric based on Jaccard similarity. It measures the overlap between the top-ranked words identified by an explainer and the actual most important words according to the model's internal logic. A score of 1.0 indicates perfect alignment, while 0.0 indicates no shared features.
Explanation Strategies
- LIME: Operates by perturbing a document (randomly removing words) and observing the change in prediction. It then fits a local linear model to these perturbations to estimate word importance.
- Anchors: Searches for a subset of words such that, if those words are present, the prediction remains stable regardless of the other words in the document.
Experimental Setup
The study utilized three standard sentiment analysis datasets from Kaggle to provide a range of document lengths and vocabularies:
- Restaurants: Short, concise reviews.
- Yelp: Mid-length business reviews.
- IMDB: Long-form movie reviews.
Key Findings: The Divergence of Sufficiency and Importance
1. The Sufficiency vs. Importance Gap
The primary discovery is that a "sufficient" set of words (an Anchor) is rarely the "most important" set. For example, if a model relies on three positive words (A, B, and C) to classify a review as "Positive," but word C alone triggers that classification 95% of the time, Anchors will return only {C}. LIME, by contrast, correctly identifies the influence of A, B, and C. This makes Anchors a potentially misleading tool for users who assume the explanation captures all relevant factors.
2. The Multiplicity Trap
Anchors proved highly sensitive to word frequency. The researchers found that simply repeating a word within a document could cause other, more significant features to be omitted from the Anchor rule. LIME demonstrated robustness to this "multiplicity" issue because it perturbs all occurrences of a word simultaneously, whereas Anchors treats each instance as an independent variable during its sampling phase.
3. Quantitative Performance and Efficiency
In tests on logistic regression models, LIME achieved an $\ell$-index between 0.94 and 0.96 across all datasets, indicating near-perfect identification of the model's logic. Anchors performed significantly worse, dropping to an $\ell$-index of 0.22 on the IMDB dataset.
Furthermore, LIME was found to be more computationally efficient. On the IMDB dataset, LIME generated an explanation in approximately 0.73 seconds, whereas Anchors required an average of 33.87 seconds per explanation.
Discussion and Limitations
The study highlights a qualitative failure in rule extraction: Anchors may fail to highlight the defining logic of a model if a shorter, "accidental" rule is discovered during the sampling process. However, the current evaluation is limited by its reliance on simple models where ground truth is easily calculated.
Future research should focus on:
- Adapting the $\ell$-index for complex Transformer-based models.
- Modifying the Anchors sampling strategy to treat multiple occurrences of a word as a single feature, potentially resolving the multiplicity trap.
- Conducting user studies to determine if humans prefer the brevity of "sufficient" rules over the technical accuracy of feature attribution, even when the rules are incomplete.
Conclusion
While both LIME and Anchors are valuable tools in the interpretability toolkit, they are not interchangeable. LIME provides a more faithful representation of a model's internal weights and is significantly faster. Anchors, while providing easy-to-understand rules, often sacrifices accuracy for brevity and can be easily misled by document structure. Practitioners should exercise caution when using rule extraction for high-stakes model auditing.
Summary updated