Distilling Relation Embeddings from Pre-trained Language Models

Asahi Ushio, Jose Camacho-Collados, Steven Schockaert
9/21/2021
cs.CL

Official code: asahi417/relbert (48 stars, Python, MIT, last commit 2024-12-02).

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.

Show full abstract

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

View on arXivView PDF

Code Implementations(1)

asahi417/relbertOfficial100%
MIT

The official implementation of "Distilling Relation Embeddings from Pre-trained Language Models, EMNLP 2021 main conference", a high-quality relation embedding based on language models.

484PythonMar 25, 20211 years agoMIT
bertnlprelation-extraction

Similar Papers

Cite this paper

@article{ushio2021distilling,
  title  = {Distilling Relation Embeddings from Pre-trained Language Models},
  author = {Asahi Ushio and Jose Camacho-Collados and Steven Schockaert},
  year   = {2021},
  eprint = {2110.15705},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.15705}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2110.15705.svg)](https://codeofpaper.com/paper/2110.15705)

Discussion