Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Graph Tokenization for Bridging Graphs and Transformers

About

The success of large pretrained Transformers is closely tied to tokenizers, which convert raw input into discrete symbols. Extending these models to graph-structured data remains a significant challenge. In this work, we introduce a graph tokenization framework that generates sequential representations of graphs by combining reversible graph serialization, which preserves graph information, with Byte Pair Encoding (BPE), a widely adopted tokenizer in large language models (LLMs). To better capture structural information, the graph serialization process is guided by global statistics of graph substructures, ensuring that frequently occurring substructures appear more often in the sequence and can be merged by BPE into meaningful tokens. Empirical results demonstrate that the proposed tokenizer enables Transformers such as BERT to be directly applied to graph benchmarks without architectural modifications. The proposed approach achieves state-of-the-art results on 14 benchmark datasets and frequently outperforms both graph neural networks and specialized graph transformers. This work bridges the gap between graph-structured data and the ecosystem of sequence models. Our code is available at \href{https://github.com/BUPT-GAMMA/Graph-Tokenization-for-Bridging-Graphs-and-Transformers}{\color{blue}here}.

Zeyuan Guo, Enmao Diao, Cheng Yang, Chuan Shi• 2026

Related benchmarks

TaskDatasetResultRank
Graph ClassificationDD
Accuracy79.6
273
Graph RegressionZINC
MAE0.131
105
Graph ClassificationMolHIV
ROC AUC87.4
88
Graph ClassificationPeptides func
AP73.1
41
Classificationcolors3
Accuracy100
10
ClassificationTwitter
Accuracy65.7
10
ClassificationPROTEINS
Accuracy79.1
10
Graph ClassificationCOIL-DEL
Accuracy89.6
7
Showing 8 of 8 rows

Other info

Follow for update