Home/AI/ML Notes/Deep Learning and Machine Learning/Model Interpretability
⌂ Main Page
Deep Learning and Machine Learning

Model Interpretability

Interpreting models: feature importance, SHAP-style reasoning, and trade-offs.

Model Interpretability

  1. Transformer interpret library for BERT-like models:

Transformer interpret is based on Captum library

From the video (see References)

Easy to extend this library to add perturbation and other algos. The library already uses SHAP and other algos in addition to Integrated Gradients

If we want to get attributions for input features with respect to target 0:

It is also possible to attribute target 0 to a certain layer, for example the second linear layer. All steps are similar, but the attributions are for the layer

From the blog (see References)

References (Interpretability)

1. Main article: Axiomatic Attribution for Deep Networks

2. Video with explanations: https://www.youtube.com/watch?v=iVSIFm0UN9I&ab_channel=PyTorch

3. Great blog: https://jalammar.github.io/explaining-transformers/