Abstract

This paper studies few-shot relation classification under domain shift, which is quite a challenging inductive task in practice. Previous work focusing on few-shot relation classification usually adopted prototypical networks, whose performance dramatically dropped when adapting to diverse domains. Some researches introduced large pretrained language models, which consume massive time and computation resources. To address the above issues, we propose cost-effective CNNs-based prototypical networks in this paper. Specifically, a multichannel encoder (MCE) is adopted to capture general domain invariant features respectively from the entity and the context, then they are aggregated according to relation classes. When encoding the context, we propose an attention mechanism based on the dependency trees of sentences to effectively select helpful grams. To get further improvements, we leverage the unlabeled data from the target domain by pseudo-labeling and introduce a method to select instances with high confidence via information entropy. We conducted experiments on two public datasets: FewRel 2.0 and FewTAC. The results demonstrate that our approaches not only largely enhance the effectiveness of original prototypical networks, but also achieve competitive results with large pretrained models with faster speeds and much fewer computational costs.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call