Skip to content

Comments

Make SHAP & LIME black box#856

Open
Logiquo wants to merge 7 commits intosunlabuiuc:masterfrom
Logiquo:fix/shap_lime
Open

Make SHAP & LIME black box#856
Logiquo wants to merge 7 commits intosunlabuiuc:masterfrom
Logiquo:fix/shap_lime

Conversation

@Logiquo
Copy link
Collaborator

@Logiquo Logiquo commented Feb 16, 2026

Allow SHAP & LIME to be turely black-box when use_embedding=False, will keep the behaviour the same when use_embedding=True

Fix #844

@Logiquo Logiquo changed the title Fix/shap lime Make SHAP & LIME black box Feb 16, 2026
@Logiquo
Copy link
Collaborator Author

Logiquo commented Feb 16, 2026

Test running on server.

@Logiquo
Copy link
Collaborator Author

Logiquo commented Feb 16, 2026

Result

{
   "random":{
      "comp":0.3097134712197836,
      "suff":0.28804294100286915
   },
   "shap (emb)":{
      "comp":0.5698760058365616,
      "suff":0.09969445264113008
   },
   "shap":{
      "comp":0.5698760058365616,
      "suff":0.09969445264113008
   },
   "lime (emb)":{
      "comp":0.19678775907731524,
      "suff":0.37132484801844057
   },
   "lime":{
      "comp":0.2896784844936109,
      "suff":0.3094283782137448
   }
}

Copy link
Collaborator

@jhnwu3 jhnwu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Logiquo purely just readability reasons for code. Can we rename num_tokens to vocab_size?

Num_tokens can often be conflated with sequence length in my mind. Of course, the "size" attribute can also be problematic here haha. So we may need to reconsider the naming of some of these APIs.

@Logiquo Logiquo requested a review from jhnwu3 February 22, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shap & Lime are suppose to be black-box interpreter.

2 participants