-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Lime class always returns empty attributions #679
Comments
Hi @caesar-one , the issue is likely related to the default alpha of 1.0 used in Lime, the regularization used when training the Lasso surrogate interpretable model may be too high and causing all weights to go to 0. Can you try setting the interpretable model with a smaller alpha like this:
|
Thank you @vivekmig ! It works :) |
@vivekmig then this is a common issue. I also struggled with this for a while to figure out the reason when making the tutorial Maybe use a simple |
Yes, this is a good point, we've noticed similar issues in other use-cases as well, I think we should either lower the default alpha (keeping Lime) or alternatively switch the default o ordinary least squares regression. |
Summary: The default regularization coefficient of alpha=1.0 has been too high in many use-cases, causing attributions to become 0. This reduces the default regularization to 0.01 to reduce such issues (e.g. #679 ). Pull Request resolved: #689 Reviewed By: aobo-y, miguelmartin75 Differential Revision: D29340812 Pulled By: vivekmig fbshipit-source-id: b233492f672fdab9c8591d00fd022f46cc11f1d5
This has been addressed in the release of version 0.4. |
🐛 Bug
I have tried to use the Lime class, without success, maybe I'm doing something wrong. It always returns empty attributions. I have tried with BERT, but the same happens with a very simple example. I attach the example that basically I copy-pasted from the documentation, to reproduce the behaviour.
To Reproduce
Code to reproduce the behavior:
Expected behavior
It should ideally return a tensor with attributions, at least with some non-zero values.
Environment
Describe the environment used for Captum
Additional context
Other methods are working (as of now I tried Layer Integrated Gradients). Scikit-Learn is installed and working properly (version 0.24.2)
The text was updated successfully, but these errors were encountered: