BrikerMan / Kashgari

Kashgari is a production-level NLP Transfer learning framework built on top of tf.keras for text-labeling and text-classification, includes Word2Vec, BERT, and GPT2 Language Embedding.
http://kashgari.readthedocs.io/
Apache License 2.0
2.39k stars 441 forks source link

Add integrated gradients for more interpretability #448

Closed AliAshraf14 closed 3 years ago

AliAshraf14 commented 3 years ago

Is your feature request related to a problem? Please describe. I'm always fond of tools that allow researchers to interpret their models' outputs such as Grad Cam and Captum. Unfortunately, there are no similar tools implemented natively in this framework Describe the solution you'd like Adding integrated gradients to the framework will improve the interpretability of the models built using it, while also holding up to the "Production-ready, Human-ready" standards. Describe alternatives you've considered I have tried Captum. Unfortunately, it only works with Pytorch. I also tried to implement the proposed solution, but I ran into some issues such as the solution requires an exact layer-which I was able to solve-, and the solution requires the input to have the same embedding and padding done in the training function-which I was not able to solve-. Additional context If this feature is successfully added to the framework, it will be grand. But if it's not feasible, any tips with the problems stated above will be very much appreciated while I implement it myself.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.