Uniform Discretized Integrated Gradients: An effective attribution based method for explaining large language models

Swarnava Sinha Roy, Ayan Kundu
12/5/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Integrated Gradients is a well-known technique for explaining deep learning models. It calculates feature importance scores by employing a gradient based approach computing gradients of the model output with respect to input features and accumulating them along a linear path. While this works well for continuous features spaces, it may not be the most optimal way to deal with discrete spaces like word embeddings. For interpreting LLMs (Large Language Models), there exists a need for a non-linear path where intermediate points, whose gradients are to be computed, lie close to actual words in the embedding space. In this paper, we propose a method called Uniform Discretized Integrated Gradients (UDIG) based on a new interpolation strategy where we choose a favorable nonlinear path for computing attribution scores suitable for predictive language models. We evaluate our method on two types of NLP tasks- Sentiment Classification and Question Answering against three metrics viz Log odds, Comprehensiveness and Sufficiency. For sentiment classification, we have used the SST2, IMDb and Rotten Tomatoes datasets for benchmarking and for Question Answering, we have used the fine-tuned BERT model on SQuAD dataset. Our approach outperforms the existing methods in almost all the metrics.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{roy2024uniform,
  title  = {Uniform Discretized Integrated Gradients: An effective attribution based method for explaining large language models},
  author = {Swarnava Sinha Roy and Ayan Kundu},
  year   = {2024},
  eprint = {2412.03886},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.03886v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.03886.svg)](https://codeofpaper.com/paper/2412.03886)

Discussion