NPoe / neural-nlp-explanation-experiment

14 stars 1 forks source link

Query on attribution calculation for GRU #8

Open itsmemala opened 1 year ago

itsmemala commented 1 year ago

Hello, I'm attempting to calculate attributions using integrated gradients and occlusion on a 1-layer GRU with BERT embeddings at the input. I notice that the highest attributions are almost always assigned to the last few tokens (mostly padding tokens), which looks like it's due to the directional nature of RNNs. I wonder if you faced a similar issue with your models and if you have any thoughts on how to resolve this? From the example texts in your paper, it looks like attributions are correctly assigned to sentiment bearing tokens however going through the repo to figure out seems tedious.