Appropriate scores for cut off

#3
by sgjohnson - opened

I'm wondering what the appropriate score would be above which i can consider the text actually falling under a given label. I used the model and it came up with a fairly high, unwarranted score for a label. Here's the text:

A fully differential calculation in perturbative quantum chromodynamics is presented for the production of massive photon pairs at hadron colliders. All next-to-leading order perturbative contributions from quark-antiquark, gluon-(anti)quark, and gluon-gluon subprocesses are included, as well as all-orders resummation of initial-state gluon radiation valid at next-to-next-to-leading logarithmic accuracy. The region of phase space is specified in which the calculation is most reliable. Good agreement is demonstrated with data from the Fermilab Tevatron, and predictions are made for more detailed tests with CDF and DO data. Predictions are shown for distributions of diphoton pairs produced at the energy of the Large Hadron Collider (LHC). Distributions of the diphoton pairs from the decay of a Higgs boson are contrasted with those produced from QCD processes at the LHC, showing that enhanced sensitivity to the signal can be obtained with judicious selection of events.

This is an arXiv abstract. This model's results for "deep learning" was 0.927. The article has nothing to do with deep learning, but that score seems fairly high. Not sure how these models work. Was "logarithmic" a "hit," for example? Should the threshold be higher? Advice appreciated, or show me where I can find some.

Just entered the text into the Inference API on the model card. Got a completely different number that seems more reasonable. Only 0.656. Why would I be getting different numbers between a colab notebook and the API?

Seems I wasn't using the hypothesis_template as in the examples. The scores make more sense now. Would still be interested in understanding how these work and any discussions on appropriate thresholds.

  1. What were the different labels you provided as options?
  2. Did you use multi_label=True or multi_label=False?
    If you provide labels=["deep learning", "politics", "environment"] and you use multi_label=False, the model is forced to decide on one label and is forced to give an unreasonably high score. In this case you should set multi_label=True
  1. What were the different labels you provided as options?
  2. Did you use multi_label=True or multi_label=False?
    If you provide labels=["deep learning", "politics", "environment"] and you use multi_label=False, the model is forced to decide on one label and is forced to give an unreasonably high score. In this case you should set multi_label=True

OK. Yeah, that was clearly it. I actually recall now trying to find the source code for zero-shot-classification to see what the default parameter for multi_label is, then getting side-tracked. Thank you.

sgjohnson changed discussion status to closed

Sign up or log in to comment