[Paper Review] Interpretation of NLP models through input marginalization
This paper proposes input marginalization as a faithful interpretation method for NLP models, replacing the standard zero-erasure approach with likelihood-based marginalization using BERT's masked language model to avoid out-of-distribution (OOD) issues. The method yields more accurate attribution scores, with fine-tuned MLM modeling producing the most plausible interpretations, reducing misleading scores on irrelevant tokens like 'film' and 'movie' by over 90% compared to pre-trained models.
To demystify the "black box" property of deep neural networks for natural language processing (NLP), several methods have been proposed to interpret their predictions by measuring the change in prediction probability after erasing each token of an input. Since existing methods replace each token with a predefined value (i.e., zero), the resulting sentence lies out of the training data distribution, yielding misleading interpretations. In this study, we raise the out-of-distribution problem induced by the existing interpretation methods and present a remedy; we propose to marginalize each token out. We interpret various NLP models trained for sentiment analysis and natural language inference using the proposed method.
Motivation & Objective
- To identify the out-of-distribution (OOD) problem in existing NLP model interpretation methods that use zero-erasure of tokens.
- To propose a remedy by replacing zero-erasure with input marginalization that considers the likelihood of candidate tokens.
- To demonstrate that likelihood modeling via fine-tuned BERT MLM improves interpretation fidelity over uniform or prior-based distributions.
- To validate the method on sentiment analysis and natural language inference tasks using quantitative correlation and qualitative interpretation analysis.
- To show that adaptively truncated marginalization maintains high correlation with full marginalization while reducing computational cost.
Proposed method
- Replace each token in the input with a distribution over all possible tokens, rather than setting it to zero, to avoid OOD inputs.
- Use BERT's masked language model (MLM) to estimate the likelihood of each candidate token given the context.
- Compute attribution scores by marginalizing each token out using the estimated likelihoods, preserving distributional consistency.
- Apply adaptive truncation by selecting only high-likelihood candidates (e.g., above σ = 10⁻⁵) to reduce computation while preserving accuracy.
- Use Pearson correlation to evaluate truncated marginalization against full marginalization, optimizing for both speed and fidelity.
- Fine-tune the BERT MLM on downstream datasets (e.g., SST-2) to improve likelihood estimation for task-specific contexts.
Experimental results
Research questions
- RQ1Does the standard zero-erasure method for NLP model interpretation produce misleading results due to out-of-distribution (OOD) inputs?
- RQ2Can marginalizing out each token using likelihood-based candidate distributions improve interpretation fidelity compared to zero-erasure?
- RQ3How does the choice of likelihood modeling (uniform, prior, pre-trained MLM, fine-tuned MLM) affect the quality of attribution scores?
- RQ4To what extent can adaptive truncation reduce computational cost without sacrificing correlation to full marginalization?
- RQ5Can the proposed method produce more plausible and accurate interpretations on real-world NLP tasks like sentiment analysis and natural language inference?
Key findings
- The uniform likelihood model failed to produce meaningful interpretations, assigning high scores to irrelevant tokens.
- Prior probability modeling improved slightly but still produced misleading attributions, especially for common words like 'film' and 'movie'.
- Pre-trained BERT MLM reduced attribution scores for 'film' and 'movie' from 0.256 and 0.631 to 0.007 and 0.321, respectively, indicating improved faithfulness.
- Fine-tuned BERT MLM yielded the most accurate interpretation, with the highest correlation to full marginalization and the most plausible attribution scores.
- Adaptive truncation at σ = 10⁻⁵ achieved 0.9999 Pearson correlation with full marginalization while reducing the average number of marginalizations to 791 (from 30,522).
- Fixed truncation at top-1000 candidates showed lower correlation (0.9823) than adaptive truncation at σ = 10⁻⁵, indicating that likelihood-aware truncation is more effective.
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.