LS-Tree: Model Interpretation When the Data Are Linguistic

Jianbo Chen, Michael I. Jordan

Introduction

As deep learning models for Natural Language Processing (NLP) grow in complexity, the challenge of interpreting their decision-making processes becomes more acute. Traditional model-agnostic tools like LIME or SHAP often treat input features (words) as independent entities, failing to account for the inherently compositional nature of language. In NLP, meaning is derived from how words combine into phrases and sentences according to syntactic rules. This paper introduces LS-Tree, a novel interpretation framework that leverages syntactic parse trees to assign importance scores and quantify interactions between words in a principled, game-theoretic manner.

The LS-Tree Framework

LS-Tree provides a way to explain black-box NLP models by grounding feature attribution in linguistic structure. The method follows a three-step process:

  1. Syntactic Decomposition: For a given input sentence, the method generates a constituency parse tree. This tree defines the "valid" coalitions of words that the model will evaluate.
  2. Least Squares Attribution: The authors define the LS-Tree value, which uses least-squares regression to find the best linear approximation of a model's output across the sub-trees. Mathematically, they prove this value is equivalent to the Banzhaf value from coalitional game theory, restricted to the coalitions permitted by the syntax.
  3. Interaction Detection: To identify where a model deviates from simple linear addition (e.g., handling negations or complex clauses), the authors introduce an interaction score inspired by Cook's distance. This metric measures the influence of a parent node by calculating the change in the linear approximation when that node is excluded.
Example of an LS-Tree attribution on a syntactic parse tree, where node colors indicate sentiment contribution.

Quantifying Linguistic Interactions

A key advantage of LS-Tree is its ability to measure the "nonlinearity" of a model. By analyzing the depth of the nodes that contribute most to a prediction, researchers can determine if a model relies on individual words (shallow/linear) or complex phrases (deep/nonlinear).

This approach is particularly effective at highlighting how models handle adversative relations. For instance, in a sentence containing "but" or "not," LS-Tree can distinguish whether a model simply associates the word "not" with negative sentiment or correctly captures the interaction where "not" flips the sentiment of the following phrase.

Experimental Results

The authors evaluated LS-Tree across three sentiment analysis datasets: the Stanford Sentiment Treebank (SST), IMDB Movie Reviews, and Yelp Reviews. They compared four architectures: Bag-of-Words (BoW), CNN, LSTM, and BERT.

  • BERT's Complexity: Across all datasets, BERT emerged as the most nonlinear model, consistently capturing interactions at much greater depths in the parse tree than LSTMs or CNNs.
  • Data Volume and Compositionality: While BERT excels at adversative relations on smaller datasets (SST/IMDB), CNNs and LSTMs show improved ability to capture these complex interactions when trained on the massive Yelp dataset, suggesting that sheer data volume can partially compensate for architectural limitations in capturing syntax.
Average node depth across models and datasets (a), alongside a histogram of intersection scores (b) showing the divergence between train and test sets during overfitting.

Overfitting and Diagnostic Utility

Beyond simple interpretation, LS-Tree serves as a diagnostic tool for model health. The authors discovered that the variance of interaction scores between the training and test sets begins to diverge significantly as a model starts to overfit. By applying a permutation test to these interaction scores, the authors demonstrated an unsupervised method for early stopping. This statistical test can trigger a warning (p-value < 0.05) precisely when the test loss begins to rise, potentially allowing for model optimization without the need for a dedicated validation set.

Conclusion

LS-Tree bridges the gap between game-theoretic feature attribution and linguistic theory. By constraining interpretations to syntactic structures, it produces explanations that are both mathematically sound and human-readable. While the method is currently limited by its dependence on the accuracy of external constituency parsers, it offers a powerful new lens for understanding how deep learning models navigate the complexities of human language.

Summary updated

BibTeX
@inproceedings{chen2020ls,
  author = {Jianbo Chen and Michael I. Jordan},
  title = {{LS-Tree: Model Interpretation When the Data Are Linguistic}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i04.5749},
}
Figure