marcoancona / DeepExplain

A unified framework of perturbation and gradient-based attribution methods for Deep Neural Networks interpretability. DeepExplain also includes support for Shapley Values sampling. (ICLR 2018)
https://arxiv.org/abs/1711.06104
MIT License
729 stars 133 forks source link

LSTM text classification with LRP #61

Open doppler21 opened 4 years ago

doppler21 commented 4 years ago

I am trying to use DeepExplain to get attribution scores for my LSTM inputs directly using LRP.

I am feeding inputs that are feature vectors of dimension 500 to a BiLSTM (I am using max sequence length of 30) then using some dense layers and a Softmax activation at the end.

Suppose I want to explain an input with sequence length 25, each of these 25 are 500 dimension feature vector. The 25 sequence length will be padded to the max sequence length of 30. The issue is I do not have any embedding lookup in the model. I want to get the attribution scores for each feature vector (as there are no tokens/words as input in my model).

How do I do this?