Graph Language Models

Moritz Plenz, Anette Frank
1/13/2024
cs.CLcs.AIcs.LG

No official code found. Best implementation: Heidelberg-NLP/GraphLanguageModels (77 stars, last commit 2024-08-30). 1 more below.

Abstract

While Language Models (LMs) are the workhorses of NLP, their interplay with structured knowledge graphs (KGs) is still actively researched. Current methods for encoding such graphs typically either (i) linearize them for embedding with LMs -- which underutilize structural information, or (ii) use Graph Neural Networks (GNNs) to preserve the graph structure -- but GNNs cannot represent text features as well as pretrained LMs. In our work we introduce a novel LM type, the Graph Language Model (GLM), that integrates the strengths of both approaches and mitigates their weaknesses. The GLM parameters are initialized from a pretrained LM to enhance understanding of individual graph concepts and triplets. Simultaneously, we design the GLM's architecture to incorporate graph biases, thereby promoting effective knowledge distribution within the graph. This enables GLMs to process graphs, texts, and interleaved inputs of both. Empirical evaluations on relation classification tasks show that GLM embeddings surpass both LM- and GNN-based baselines in supervised and zero-shot setting, demonstrating their versatility.

View on arXivView PDF

Code Implementations(2)

Code for our paper "Graph Language Models"

7711Shell, PythonJan 10, 20242 years ago
MIT

Small Project to compare the Graph Language Model approach (https://arxiv.org/abs/2401.07105) with Think on Graph (https://arxiv.org/abs/2307.07697)

00Shell, PythonSep 20, 20241 years agoMIT

Similar Papers

Cite this paper

@article{plenz2024graph,
  title  = {Graph Language Models},
  author = {Moritz Plenz and Anette Frank},
  year   = {2024},
  eprint = {2401.07105},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.07105v3}
}

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

Discussion