Graph Generative Pre-trained Transformer
About
Graph generation is a critical task in numerous domains, including molecular design and social network analysis, due to its ability to model complex relationships and structured data. While most modern graph generative models utilize adjacency matrix representations, this work revisits an alternative approach that represents graphs as sequences of node set and edge set. We advocate for this approach due to its efficient encoding of graphs and propose a novel representation. Based on this representation, we introduce the Graph Generative Pre-trained Transformer (G2PT), an auto-regressive model that learns graph structures via next-token prediction. To further exploit G2PT's capabilities as a general-purpose foundation model, we explore fine-tuning strategies for two downstream applications: goal-oriented generation and graph property prediction. We conduct extensive experiments across multiple datasets. Results indicate that G2PT achieves superior generative performance on both generic graph and molecule datasets. Furthermore, G2PT exhibits strong adaptability and versatility in downstream tasks from molecular design to property prediction. Code available at https://github.com/tufts-ml/G2PT,
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Molecular property prediction | MoleculeNet BBBP (scaffold) | ROC AUC71 | 158 | |
| Molecular property prediction | MoleculeNet SIDER (scaffold) | ROC-AUC0.619 | 136 | |
| Molecular property prediction | MoleculeNet BACE (scaffold) | ROC-AUC82.3 | 126 | |
| Molecular property prediction | MoleculeNet MUV (scaffold) | ROC-AUC0.745 | 107 | |
| Molecular property prediction | HIV (scaffold split) | ROC-AUC76.3 | 56 | |
| Molecular property prediction | Tox21 scaffold split | ROC-AUC75 | 56 | |
| Graph generation | SBM Graphs (test) | Degree0.0035 | 25 | |
| Molecular Graph Generation | MOSES | Uniqueness100 | 23 | |
| Synthetic Graph Generation | Tree Dataset | Degree Similarity0.002 | 21 | |
| Molecular property prediction | ClinTox scaffold split | ROC-AUC0.821 | 16 |