SeldonIO / alibi

Algorithms for explaining machine learning models
https://docs.seldon.io/projects/alibi/en/stable/
Other
2.42k stars 252 forks source link

Saving/Loading CounterfactualRL Explainer #802

Open barnardp opened 2 years ago

barnardp commented 2 years ago

Hi,

Thanks for the great package! I've recently been exploring the CounterfactualRL approach. One problem I've noticed is that whenever I save a trained explainer and then load it back later, the success rate (measured in terms of how well the explainer is able to produce counterfactuals that actually lead the model to change its prediction to the target class) of the loaded explainer reduces dramatically. For example, my original explainer tends to get a success rate of over 95%, while that of the loaded one typically falls under 50%. Is there any way in which this can be avoided?

Cheers, Pieter

RobertSamoilescu commented 2 years ago

Hi @barnardp,

Thanks for opening this issue. I ran some experiments locally for the Tensorflow backend. The loading and saving functionalities seem to work well, but there might be two things that I can think of which can cause that drop in performance:

If none of the above cause this drop in performance, it would be great if you can share the script or the notebook with us so we can replicate the issue locally and address it. Thank you!