Preferences for Zero Shot Classification Result Display #40
-
Hi everyone, I'm currently working on an implementation of an explainer for zero shot classification tasks as previously discussed in #19. I find myself at an interesting crossroads with regards to one particular design decision relating to the classification and how to display both the word attributions and visualization. For those not familiar with the trick employed by Hugging Face to achieve zero shot classification the way this works is by exploiting the "entailment" label of NLI models. So if we have the sentence:
And want to classify it with one the labels:
The way this explainer will work is similar to how the zero shot pipeline does in the transformers package - it will test out all three labels as hypothesis with the original text and measure which scores highest for entailment. The hypothesis texts might look something like:
In this case technology would score highest. So this brings me to the issue of this new explainer which is related to the "entailment trick" which is that there are two ways I can represent the classification:
Of course I could make both of these options available via an argument of some sort to the method call but it still leaves me with the decision of which would be be the default. I have my own preference but I'd love to hear some thoughts or suggestions on what seems the most natural choice to make here. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thank you Charles for detailed explanation and looking into this. Not related to this task but just want to share another repo which showing visualisation in different ways. You might find interesting https://github.com/sergioburdisso/pyss3 |
Beta Was this translation helpful? Give feedback.
Thank you Charles for detailed explanation and looking into this.
To me [2] looks good but again it is personal choice :)
Not related to this task but just want to share another repo which showing visualisation in different ways. You might find interesting https://github.com/sergioburdisso/pyss3