[Paper Review] Sequential Integrated Gradients: a simple but effective method for explaining language models
This paper proposes Sequential Integrated Gradients (SIG), a method that computes feature attributions for language models by sequentially perturbing one word at a time while keeping all others fixed, ensuring interpolated sentences retain semantic coherence. SIG outperforms Integrated Gradients and Discretized Integrated Gradients across multiple models and datasets, particularly when using the learned 'mask' token as baseline, demonstrating superior faithfulness and robustness in explanation quality.
Several explanation methods such as Integrated Gradients (IG) can be characterised as path-based methods, as they rely on a straight line between the data and an uninformative baseline. However, when applied to language models, these methods produce a path for each word of a sentence simultaneously, which could lead to creating sentences from interpolated words either having no clear meaning, or having a significantly different meaning compared to the original sentence. In order to keep the meaning of these sentences as close as possible to the original one, we propose Sequential Integrated Gradients (SIG), which computes the importance of each word in a sentence by keeping fixed every other words, only creating interpolations between the baseline and the word of interest. Moreover, inspired by the training procedure of several language models, we also propose to replace the baseline token "pad" with the trained token "mask". While being a simple improvement over the original IG method, we show on various models and datasets that SIG proves to be a very effective method for explaining language models.
Motivation & Objective
- To address the issue of interpolated sentences in path-based explanation methods like Integrated Gradients (IG) losing semantic coherence when multiple words are perturbed simultaneously.
- To improve the faithfulness of feature attributions in language models by ensuring interpolated inputs remain semantically close to the original sentence.
- To investigate whether using the learned 'mask' token instead of 'pad' as a baseline improves explanation quality in sequential attribution methods.
- To evaluate the effectiveness of SIG across diverse language models (BERT, RoBERTa, DistilBERT) and datasets (SST-2, IMDB, Rotten Tomatoes) in comparison to existing methods.
- To assess the trade-off between computational cost and explanation quality, especially when reducing the number of interpolation steps.
Proposed method
- SIG computes feature attributions by sequentially perturbing one word at a time along a straight-line path from baseline to input, while keeping all other words fixed.
- For each word, the method integrates gradients along the path from a baseline (e.g., 'pad' or 'mask') to the actual word embedding, computing the integrated gradient as the attribution.
- The method normalizes attributions across all words in the sequence to ensure interpretability and consistency.
- The baseline is replaced with the learned 'mask' token when possible, as it is semantically and embedding-wise more aligned with the training procedure of modern language models.
- The approach is compatible with both auto-regressive and bidirectional models, with a sequential processing order that preserves context during attribution.
- Computational efficiency is improved via batched gradient computation and reduction of interpolation steps without sacrificing performance.

Experimental results
Research questions
- RQ1Does sequentially perturbing one word at a time while fixing others lead to more semantically coherent interpolated sentences than simultaneous perturbation in path-based methods?
- RQ2How does using the learned 'mask' token as baseline compare to 'pad' in terms of explanation quality for language models?
- RQ3Can SIG achieve better faithfulness and consistency than Integrated Gradients (IG) and Discretized Integrated Gradients (DIG) on standard NLP benchmarks?
- RQ4What is the trade-off between computational cost and explanation quality when reducing the number of interpolation steps in SIG?
- RQ5Is SIG robust across different model architectures (e.g., BERT, RoBERTa, DistilBERT) and downstream tasks (e.g., sentiment analysis)?
Key findings
- SIG achieves the lowest LRP (LO) and highest completeness (Comp) scores on the SST-2 dataset, outperforming IG and DIG across all three models (DistilBERT, RoBERTa, BERT).
- On the IMDB dataset, SIG achieves the lowest LO score of -2.12 for BERT and the highest completeness score of 0.364, significantly outperforming IG and DIG.
- SIG reduces the average attribution error by 30–50% compared to IG on longer sentences, where IG produces semantically inconsistent interpolated inputs.
- Using the 'mask' token as baseline improves explanation quality over 'pad', especially in IG, with SIG achieving a sufficiency score of 0.00409 on IMDB, the lowest among all methods.
- Despite higher computational cost, SIG maintains superior performance even when the number of interpolation steps is reduced, outperforming IG with more steps.
- The method demonstrates robustness across different model architectures and tasks, suggesting broad applicability in NLP explanation.
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.