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
The article proposes a simple and efficient way to build verbalization:
1.For each label yi ∈ Y y_i∈Yyi∈Y , iterate over all training samplesxj ∈ D train x_j∈D_{train}xj∈Dtrain, 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∈Yyi∈Y , initialize an empty candidate token setS ( yi ) S(yi)S ( y i ) .
3.For every v ∈ V v∈Vv∈V , 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∈Yyi∈Y , 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 ) .