-
Hi! I have tried to generate explanations for NER models but I haven't found any description of how to implement this, so I have tried to extrapolate what is been already done for other tasks, such as multi-class classification. I have followed the approach described in the Captum tutorial to interpret BERT in which a custom forward function that allows to access a particular position of the prediction using the I have generated two types of visualizations:
A notebook with these two visualizations can be found in this repo. I would like to know if my approach makes sense, or, if not, what I should do to correctly visualize explanations for NER models. Once I am sure my approach is right, I would like to contribute to Transformers Interpret implementing the support for NER models. Thank you in advance for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @pabvald, Thank you very much for putting the time into looking into this. I'd love to get the NER explainer finished to round out the capabilities of the text part of the package. I think the approach you are taking for the first visualization is the right way to go. For most people my assumption is that they will want to just explore why a certain word was given a NER label, if there are requests for exploring all possible classes we could explore that at a later time, but the first use case seems like the most practical. Your approach seems to be right from what I've looked at so far, would be delighted if you were up for contributing this feature, it'd be a major boost for the package. If you take a look at this Multi-Label Explainer If you need any help at all with this let me know. Thanks again, |
Beta Was this translation helpful? Give feedback.
Hi @pabvald,
Thank you very much for putting the time into looking into this. I'd love to get the NER explainer finished to round out the capabilities of the text part of the package.
I think the approach you are taking for the first visualization is the right way to go. For most people my assumption is that they will want to just explore why a certain word was given a NER label, if there are requests for exploring all possible classes we could explore that at a later time, but the first use case seems like the most practical.
Your approach seems to be right from what I've looked at so far, would be delighted if you were up for contributing this feature, it'd be a major boost for the pack…