【提示学习】Automatic Multi-Label Prompting: Simple and Interpretable Few-Shot Classification

Paper information

name content
paper title Automatic Multi-Label Prompting: Simple and Interpretable Few-Shot Classification
Paper address https://arxiv.org/abs/2204.06305
field of study NLP, text classification, hint learning
proposed model AMuLaP
source NAACL 2022 (main conference)

read summary

insert image description here

  The article proposes a simple and efficient way to build verbalization:

  1.For each label yi ∈ Y y_i∈YyiY , iterate over all training samplesxj ∈ D train x_j∈D_{train}xjDtrain x j x_j xjThe ground truth label of is also yi y_iyi. Use the model to predict [MASK]the labeling probability of the marker, and take the average of the predicted probabilities of these n samples as zi z_izi,in which zi z_iziis a vector over the entire vocabulary representing the average probability for each word in the vocabulary.

  2.For each yi ∈ Y y_i∈YyiY , initialize an empty candidate token setS ( yi ) S(yi)S ( y i ) .

  3.For every v ∈ V v∈VvV , whereVVV is the vocabulary of the model, we start fromthe zi z_iziRetrieve vv inThe probability value of v zivz^v_iziv

  4.Iterate through all tags, each tag has a zzz , traversing each position, willvvv assigns the most probable token set S ( ym ) S(y_m)of the mth classS ( andm),其中 m = a r g m a x i z i v m = argmax_i z^v_i m=argmaxiziv

Suppose there are 3 labels and the vocabulary has 2000, then the shape of Z is 3*2000, and then traverse the vocabulary [0-1999], we compare the probability of each word on the 3 labels, take the largest and then put Enter the S ( y ) S(y) corresponding to this labelS ( y ) .

  5.对于yi ∈ Y y_i∈YyiY , we start fromS ( yi ) S(yi)Select the top-k tokens with the largest probability z^v_i in S ( y i ) , and get the truncated word setS ( yi ) S(yi)S ( y i ) .

Guess you like

Origin blog.csdn.net/qq_43592352/article/details/130541542