Distilling Relation Embeddings from Pretrained Language Models

Asahi Ushio, Jose Camacho-Collados, Steven Schockaert


Abstract
Pre-trained language models have been found to capture a surprisingly rich amount of lexical knowledge, ranging from commonsense properties of everyday concepts to detailed factual knowledge about named entities. Among others, this makes it possible to distill high-quality word vectors from pre-trained language models. However, it is currently unclear to what extent it is possible to distill relation embeddings, i.e. vectors that characterize the relationship between two words. Such relation embeddings are appealing because they can, in principle, encode relational knowledge in a more fine-grained way than is possible with knowledge graphs. To obtain relation embeddings from a pre-trained language model, we encode word pairs using a (manually or automatically generated) prompt, and we fine-tune the language model such that relationally similar word pairs yield similar output vectors. We find that the resulting relation embeddings are highly competitive on analogy (unsupervised) and relation classification (supervised) benchmarks, even without any task-specific fine-tuning. Source code to reproduce our experimental results and the model checkpoints are available in the following repository: https://github.com/asahi417/relbert
Anthology ID:
2021.emnlp-main.712
Volume:
Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing
Month:
November
Year:
2021
Address:
Online and Punta Cana, Dominican Republic
Editors:
Marie-Francine Moens, Xuanjing Huang, Lucia Specia, Scott Wen-tau Yih
Venue:
EMNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
9044–9062
Language:
URL:
https://aclanthology.org/2021.emnlp-main.712
DOI:
10.18653/v1/2021.emnlp-main.712
Bibkey:
Cite (ACL):
Asahi Ushio, Jose Camacho-Collados, and Steven Schockaert. 2021. Distilling Relation Embeddings from Pretrained Language Models. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 9044–9062, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
Cite (Informal):
Distilling Relation Embeddings from Pretrained Language Models (Ushio et al., EMNLP 2021)
Copy Citation:
PDF:
https://aclanthology.org/2021.emnlp-main.712.pdf
Video:
 https://aclanthology.org/2021.emnlp-main.712.mp4
Code
 asahi417/relbert
Data
ConceptNetEVALution