Command Palette
Search for a command to run...
Chengxuan Ying; Tianle Cai; Shengjie Luo; Shuxin Zheng; Guolin Ke; Di He; Yanming Shen; Tie-Yan Liu

Abstract
The Transformer architecture has become a dominant choice in many domains, such as natural language processing and computer vision. Yet, it has not achieved competitive performance on popular leaderboards of graph-level prediction compared to mainstream GNN variants. Therefore, it remains a mystery how Transformers could perform well for graph representation learning. In this paper, we solve this mystery by presenting Graphormer, which is built upon the standard Transformer architecture, and could attain excellent results on a broad range of graph representation learning tasks, especially on the recent OGB Large-Scale Challenge. Our key insight to utilizing Transformer in the graph is the necessity of effectively encoding the structural information of a graph into the model. To this end, we propose several simple yet effective structural encoding methods to help Graphormer better model graph-structured data. Besides, we mathematically characterize the expressive power of Graphormer and exhibit that with our ways of encoding the structural information of graphs, many popular GNN variants could be covered as the special cases of Graphormer.
Code Repositories
Benchmarks
| Benchmark | Methodology | Metrics |
|---|---|---|
| graph-classification-on-imdb-b | Graphormer | Accuracy: 77.500±2.646 |
| graph-classification-on-nci1 | Graphormer | Accuracy: 77.032±1.393 |
| graph-classification-on-nci109 | Graphormer | Accuracy: 74.879±1.183 |
| graph-property-prediction-on-ogbg-molhiv | Graphormer | Ext. data: Yes Number of params: 47183040 Test ROC-AUC: 0.8051 ± 0.0053 Validation ROC-AUC: 0.8310 ± 0.0089 |
| graph-property-prediction-on-ogbg-molhiv | Graphormer + FPs | Ext. data: No Number of params: 47085378 Test ROC-AUC: 0.8225 ± 0.0001 Validation ROC-AUC: 0.8396 ± 0.0001 |
| graph-property-prediction-on-ogbg-molhiv | Graphormer (pre-trained on PCQM4M) | Ext. data: Yes Number of params: 47183040 Test ROC-AUC: 0.8051 ± 0.0053 Validation ROC-AUC: 0.8310 ± 0.0089 |
| graph-property-prediction-on-ogbg-molpcba | Graphormer | Number of params: 119529664 Test AP: 0.3140 ± 0.0032 Validation AP: 0.3227 ± 0.0024 |
| graph-property-prediction-on-ogbg-molpcba | Graphormer (pre-trained on PCQM4M) | Ext. data: Yes Number of params: 119529664 Test AP: 0.3140 ± 0.0032 Validation AP: 0.3227 ± 0.0024 |
| graph-regression-on-esr2 | Graphormer | R2: OOM RMSE: OOM |
| graph-regression-on-f2 | Graphormer | R2: OOM RMSE: OOM |
| graph-regression-on-kit | Graphormer | R2: OOM RMSE: OOM |
| graph-regression-on-lipophilicity | Graphormer | R2: 0.607±0.048 RMSE: 0.791±0.048 |
| graph-regression-on-parp1 | Graphormer | R2: OOM RMSE: OOM |
| graph-regression-on-pcqm4m-lsc | Graphormer | Test MAE: 13.28 Validation MAE: 0.1234 |
| graph-regression-on-pcqm4mv2-lsc | Graphormer | Test MAE: - Validation MAE: 0.0864 |
| graph-regression-on-pgr | Graphormer | R2: OOM RMSE: OOM |
| graph-regression-on-zinc-500k | Graphormer-SLIM | MAE: 0.122 |
| graph-regression-on-zinc-full | Graphormer | Test MAE: 0.036±0.002 |
| molecular-property-prediction-on-esol | Graphormer | R2: 0.908±0.021 RMSE: 0.618±0.068 |
| molecular-property-prediction-on-freesolv | Graphormer | R2: 0.927±0.005 RMSE: 1.065±0.039 |
Build AI with AI
From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.