Pretraining Language Models with Text-Attributed Heterogeneous Graphs

Tao Zou, Le Yu, Yifei Huang, Leilei Sun, Bowen Du
10/19/2023
cs.CLcs.AI

Official code: Hope-Rita/THLM (16 stars, last commit 2023-10-13).

Abstract

In many real-world scenarios (e.g., academic networks, social platforms), different types of entities are not only associated with texts but also connected by various relationships, which can be abstracted as Text-Attributed Heterogeneous Graphs (TAHGs). Current pretraining tasks for Language Models (LMs) primarily focus on separately learning the textual information of each entity and overlook the crucial aspect of capturing topological connections among entities in TAHGs. In this paper, we present a new pretraining framework for LMs that explicitly considers the topological and heterogeneous information in TAHGs. Firstly, we define a context graph as neighborhoods of a target node within specific orders and propose a topology-aware pretraining task to predict nodes involved in the context graph by jointly optimizing an LM and an auxiliary heterogeneous graph neural network. Secondly, based on the observation that some nodes are text-rich while others have little text, we devise a text augmentation strategy to enrich textless nodes with their neighbors' texts for handling the imbalance issue. We conduct link prediction and node classification tasks on three datasets from various domains. Experimental results demonstrate the superiority of our approach over existing methods and the rationality of each design. Our code is available at https://github.com/Hope-Rita/THLM.

View on arXivView PDF

Code Implementations(1)

Hope-Rita/THLMOfficial100%

Codes for Pretraining Language Models with Text-Attributed Heterogeneous Graphs

161PythonOct 13, 20233 years ago

Similar Papers

Cite this paper

@article{zou2023pretraining,
  title  = {Pretraining Language Models with Text-Attributed Heterogeneous Graphs},
  author = {Tao Zou and Le Yu and Yifei Huang and Leilei Sun and Bowen Du},
  year   = {2023},
  eprint = {2310.12580},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.12580v2}
}

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

Discussion