1
$\begingroup$

I am trying to apply integrated gradients (using library captum) on a text generation model. Specifically, it is a model that generates patches for input buggy code. I want to know if applying the integrated gradients method to a text generation task is possible.

As I understood, the integrated gradients method uses a baseline. It generates a set of data points between the baseline and the input we want to interpret. Then it calculates and integrates the gradients for each feature along all the data points.

If we consider a text generation task, we can just focus on one token in the output and try to find the input attribution for that token. Is this correct? The problem is can we find an attribution only for that token?

I have seen an example of applying integrated gradients on a text classification task. I think it is possible because anyway, the output is a single value (the probability of class).

$\endgroup$

0

You must log in to answer this question.

Browse other questions tagged .