Discretized Integrated Gradients for Explaining Language Models

Soumya Sanyal, Xiang Ren


Abstract
As a prominent attribution-based explanation algorithm, Integrated Gradients (IG) is widely adopted due to its desirable explanation axioms and the ease of gradient computation. It measures feature importance by averaging the model’s output gradient interpolated along a straight-line path in the input data space. However, such straight-line interpolated points are not representative of text data due to the inherent discreteness of the word embedding space. This questions the faithfulness of the gradients computed at the interpolated points and consequently, the quality of the generated explanations. Here we propose Discretized Integrated Gradients (DIG), which allows effective attribution along non-linear interpolation paths. We develop two interpolation strategies for the discrete word embedding space that generates interpolation points that lie close to actual words in the embedding space, yielding more faithful gradient computation. We demonstrate the effectiveness of DIG over IG through experimental and human evaluations on multiple sentiment classification datasets. We provide the source code of DIG to encourage reproducible research.
Anthology ID:
2021.emnlp-main.805
Volume:
Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing
Month:
November
Year:
2021
Address:
Online and Punta Cana, Dominican Republic
Editors:
Marie-Francine Moens, Xuanjing Huang, Lucia Specia, Scott Wen-tau Yih
Venue:
EMNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
10285–10299
Language:
URL:
https://aclanthology.org/2021.emnlp-main.805
DOI:
10.18653/v1/2021.emnlp-main.805
Bibkey:
Cite (ACL):
Soumya Sanyal and Xiang Ren. 2021. Discretized Integrated Gradients for Explaining Language Models. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 10285–10299, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
Cite (Informal):
Discretized Integrated Gradients for Explaining Language Models (Sanyal & Ren, EMNLP 2021)
Copy Citation:
PDF:
https://aclanthology.org/2021.emnlp-main.805.pdf
Video:
 https://aclanthology.org/2021.emnlp-main.805.mp4
Code
 ink-usc/dig +  additional community code
Data
IMDb Movie ReviewsSSTSST-2