alibi icon indicating copy to clipboard operation
alibi copied to clipboard

[IntegratedGradients] Pytorch models

Open jklaise opened this issue 3 years ago • 1 comments

Our IntegratedGradients method is for TensorFlow models only, for feature parity it would be desirable to extend it to PyTorch models as well.

There are a few options and some design decisions to make. The captum library has PyTorch methods for all kinds of gradient-based attribution methods. The easiest thing would be to just wrap this but it has downsides:

  • dependency on torch - for alibi we want this to be optional
  • temptation to wrap all captum methods at the cost of abandoning feature parity with tensorflow

So it likely makes sense to implement this from scratch.

This could also be an opportunity for a much larger project, designing the public and private API for all kinds of gradient-based methods not just IG, but the priority should be on getting a PyTorch IG going.

jklaise avatar Jul 15 '21 10:07 jklaise

As a side note, kserve supports TorchServe which offers explainability via captum. So this issue also affects SC (v2) feature parity with kserve at this level.

sakoush avatar Jan 18 '23 10:01 sakoush