Graph Tokenization for Bridging Graphs and Transformers

Ze-Yuan Guo, Enmao Diao, Cheng Yang, Chuan Shi
3/1/2026
4 citations
transformer-attentiongnn

No official code found. Best implementation: BUPT-GAMMA/Graph-Tokenization-for-Bridging-Graphs-and-Transformers (39 stars, last commit 2026-05-25).

Abstract

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.

Show full abstract

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}.

View on arXivView PDF

Code Implementations(1)

【ICLR2026】 Graph Tokenization for Bridging Graphs and Transformers

392Feb 26, 20266 months ago
bpegraphllmtokenizertransformer

Similar Papers

Cite this paper

@article{guo2026graph,
  title  = {Graph Tokenization for Bridging Graphs and Transformers},
  author = {Ze-Yuan Guo and Enmao Diao and Cheng Yang and Chuan Shi},
  year   = {2026},
  eprint = {2603.11099},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2603.11099},
  journal = {International Conference on Learning Representations}
}

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

Discussion