Imposing Relation Structure in Language-Model Embeddings Using Contrastive Learning

Christos Theodoropoulos, James Henderson, Andrei C. Coman, Marie-Francine Moens
9/2/2021
cs.CLcs.AI
contrastive-ssl

Official code: christos42/CLDR_CLNER_models (28 stars, Python, MIT, last commit 2023-04-28).

Abstract

Though language model text embeddings have revolutionized NLP research, their ability to capture high-level semantic information, such as relations between entities in text, is limited. In this paper, we propose a novel contrastive learning framework that trains sentence embeddings to encode the relations in a graph structure.

Show full abstract

Given a sentence (unstructured text) and its graph, we use contrastive learning to impose relation-related structure on the token-level representations of the sentence obtained with a CharacterBERT (El Boukkouri et al.,2020) model. The resulting relation-aware sentence embeddings achieve state-of-the-art results on the relation extraction task using only a simple KNN classifier, thereby demonstrating the success of the proposed method. Additional visualization by a tSNE analysis shows the effectiveness of the learned representation space compared to baselines. Furthermore, we show that we can learn a different space for named entity recognition, again using a contrastive learning objective, and demonstrate how to successfully combine both representation spaces in an entity-relation task.

View on arXivView PDF

Code Implementations(1)

MIT

Though language model text embeddings have revolutionized NLP research, their ability to capture high-level semantic information, such as relations between entities in text, is limited. In this paper, we propose a novel contrastive learning framework that trains sentence embeddings to encode the relations in a graph structure. Given a sentence (unstructured text) and its graph, we use contrastive learning to impose relation-related structure on the token level representations of the sentence obtained with a CharacterBERT (El Boukkouri et al., 2020) model. The resulting relation-aware sentence embeddings achieve state-of-the-art results on the relation extraction task using only a simple KNN classifier, thereby demonstrating the success of the proposed method. Additional visualization by a tSNE analysis shows the effectiveness of the learned representation space compared to baselines. Furthermore, we show that we can learn a different space for named entity recognition, again using a contrastive learning objective, and demonstrate how to successfully combine both representation spaces in an entity-relation task.

283PythonOct 4, 20213 years agoMIT
contrastive-learningdeep-learninggraphsinformation-extractionknowledge-extraction+3 more

Similar Papers

Cite this paper

@article{theodoropoulos2021imposing,
  title  = {Imposing Relation Structure in Language-Model Embeddings Using Contrastive Learning},
  author = {Christos Theodoropoulos and James Henderson and Andrei C. Coman and Marie-Francine Moens},
  year   = {2021},
  eprint = {2109.00840},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.00840}
}

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/2109.00840.svg)](https://codeofpaper.com/paper/2109.00840)

Discussion