k-Nearest Neighbor Augmented Neural Networks for Text Classification
Table 5: Evaluation in the semi-supervised training and the transfer learning setups.
['Setup', 'Accuracy']
So far, we have verified that the effectiveness of the kNN retrieved from the same training set. What if we search the kNN from a dataset of a completely different task? If we consider the text (without the label) information of the kNN from a different task, then this becomes the semi-supervised training setup. If we utilize the label information of the kNN from a different task, where the definition of labels are quite different from the task at hand, then this becomes the transfer learning setup. To reveal the behavior of our model in these two setups, we take the training set of the DBPedia dataset as the corpus to find the kNN for each text in the AG’s News dataset. Here, we should notice that the “attentive-kNN-text” and the “attentive-kNN-label” features are extracted from the kNN from the DBPedia corpus, which is a different classification task. We can see that our model achieves improvements from the baseline (BiLSTM) in both the Semi-supervised Training and the Transfer Learning setups.