Is it possible to apply SHAP to the MarkupLM model where the model expects text in combination with XPath? #3608
Unanswered
fischerfel
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have fine-tuned the MarkupLM for binary classification. It takes as inputs HTML text alongside the parsed XPath of the HTML. I tried to simply create an explainer by passing the MarkupLMTokenizer.
However, SHAP already throws an error when it tries to figure out the null token of the tokenizer. SHAP does this by calling the given tokenizer with an empty string. However, the MarkupLMTokenizer expects additional XPath input and therefore throws an error. I tried to pass the MarkupLMProcessor instead of the tokenizer, which solved the error but led to another error which is very low-level and I did not try to comprehend. This is probably bc SHAP can't handle the return of the processor.
Anyway, it would be great to know if there is another way SHAP can be used out-of-the-box for MarkupLM or if it can somehow be modified and where to start.
Beta Was this translation helpful? Give feedback.
All reactions