UniGLM: Training One Unified Language Model for Text-Attributed Graph Embedding

Yi Fang, Dongzhe Fan, Sirui Ding, Ninghao Liu, Qiaoyu Tan

Main figure for UniGLM: Training One Unified Language Model for Text-Attributed Graph Embedding

Abstract

Representation learning on text-attributed graphs (TAGs), where nodes are associated with textual descriptions, is crucial for textual and relational knowledge systems, such as social media and recommendation scenarios. However, state-of-the-art embedding methods for TAGs primarily focus on fine-tuning pre-trained language models (PLMs) using structure-aware training objectives. While effective, these methods are tailored for individual TAG and cannot generalize across various graph scenarios. Given the shared textual space, leveraging multiple TAGs for joint fine-tuning, aligning text and graph structure from different aspects, would be more beneficial. Therefore, we propose the Unified Graph Language Model (UniGLM), a novel foundation model pretrained over multiple TAGs from a variety of domains, which can generalize well to both in-domain and cross-domain graph scenarios. Specifically, UniGLM fine-tunes well-established PLMs (e.g., Sentence-BERT) using a domain-aware contrastive learning objective that unifies structure heterogeneity and node statistics across various domains with an adaptive and learnable positive sample selection scheme. Additionally, a lazy updating module is introduced to speed up training by reducing repetitive encoding of positive samples. Extensive datasets across multiple domains, downstream tasks (node classification and link prediction), and a spectrum of graph backbones (supervised and self-supervised graph models) are conducted to compare UniGLM with state-of-the-art baselines. Our empirical observations suggest that UniGLM can generate informative representations for cross-domain graphs observed in the training. More importantly, UniGLM also exhibits competitive transfer ability in encoding unseen TAGs that are not used for training. This study provides deep insights into how to adapt PLMs to graph data and demonstrates the potential of building foundation model for graph representation learning.

Proposed method: UniGLM

Benchmark Results

Tested on 3 datasets 1 baseline value reported too low

Tables show presented results in global context (best 3 papers + GCN + MLP).

Classic

#ModelAccuracy ↑Paper
1
GraphTARIF
0.9703 ±0.0019
2
GAT
0.9669 ±0.0014
3
GAT+T
0.9660 ±0.0007
7
SAGE
0.9643 ±0.0027
390
MLP
0.9128 ±0.0063
534
PATTON
actual #534 vs paper #547 13 places worse
0.7860 ±0.0015
best reported
actual #534 vs paper #547 13 places worse
paper 0.7598 ±0.0014
paper 0.7598 ±0.0014 Δ today 0.0262
535
UniGLM
0.7855 ±0.0010
This paper
560
BERT
actual #560 vs paper #564 4 places worse
0.6882
best reported
actual #560 vs paper #564 4 places worse
paper 0.5518 ±0.0089
paper 0.5518 ±0.0089 Δ today 0.1364
561
SE
0.6334 ±0.0027
This paper
564
GIA
0.5839 ±0.0032
This paper
#ModelAccuracy ↑Paper
1
GraphTARIF
0.9461 ±0.0017
2
GCN
0.9412 ±0.0008
3
GAT
0.9398 ±0.0022
8
SAGE
0.9351 ±0.0006
320
MLP
0.8463
386
UniGLM
0.8290 ±0.0011
This paper
420
GIANT
0.8103 ±0.0012
This paper
429
PATTON
0.7998 ±0.0015
This paper
444
MixGIA
0.7722 ±0.0042
This paper
446
Sentence-mpnet
0.7640 ±0.0011
This paper
450
BERT
0.7543 ±0.0008
This paper
453
DeBERTa
0.7482 ±0.0016
This paper
469
SE
0.7102 ±0.0027
This paper

OGB

#ModelAccuracy ↑Paper
1
Jacobi
0.8968
2
GPR
0.8953
3
LEMP4HG
0.8939
4
SAGE
0.8933
223
BERT
actual #223 vs paper #346 123 places worse
0.7764 ±0.0008
best reported
actual #223 vs paper #346 123 places worse
paper 0.6752 ±0.0031
paper 0.6752 ±0.0031 Δ at pub 0.1012
230
UniGLM
0.7708 ±0.0006
This paper
245
PATTON
0.7591 ±0.0005
This paper
309
GIA
0.7321 ±0.0015
This paper
351
MLP
0.6605 ±0.0020
361
SE
0.6412 ±0.0005
This paper
SOTA performance (not significantly different from the best) Proposed method (this paper) Baseline / comparison (this paper) Global context (other papers) Best at pub — reported result worse than the best known when published (best reported in green) Best today — OK at publication; today's leaderboard best is elsewhere