Polynormer: Polynomial-Expressive Graph Transformer in Linear Time

2 Mar 2024  ·  Chenhui Deng, Zichao Yue, Zhiru Zhang ·

Graph transformers (GTs) have emerged as a promising architecture that is theoretically more expressive than message-passing graph neural networks (GNNs). However, typical GT models have at least quadratic complexity and thus cannot scale to large graphs. While there are several linear GTs recently proposed, they still lag behind GNN counterparts on several popular graph datasets, which poses a critical concern on their practical expressivity. To balance the trade-off between expressivity and scalability of GTs, we propose Polynormer, a polynomial-expressive GT model with linear complexity. Polynormer is built upon a novel base model that learns a high-degree polynomial on input features. To enable the base model permutation equivariant, we integrate it with graph topology and node features separately, resulting in local and global equivariant attention models. Consequently, Polynormer adopts a linear local-to-global attention scheme to learn high-degree equivariant polynomials whose coefficients are controlled by attention scores. Polynormer has been evaluated on $13$ homophilic and heterophilic datasets, including large graphs with millions of nodes. Our extensive experiment results show that Polynormer outperforms state-of-the-art GNN and GT baselines on most datasets, even without the use of nonlinear activation functions.

PDF Abstract

Results from the Paper


Task Dataset Model Metric Name Metric Value Global Rank Benchmark
Node Classification amazon-ratings Polynormer Accuracy (%) 54.81±0.49 # 1
Node Classification minesweeper Polynormer AUCROC 97.46±0.36 # 1
Node Property Prediction ogbn-arxiv Polynormer Test Accuracy 0.7346 ± 0.0016 # 42
Validation Accuracy 0.7459 ± 0.0010 # 44
Number of params 1806160 # 19
Ext. data No # 1
Node Property Prediction ogbn-products Polynormer Test Accuracy 0.8382 ± 0.0011 # 26
Validation Accuracy 0.9239 ± 0.0005 # 31
Number of params 2383654 # 15
Ext. data No # 1
Node Classification pokec Polynormer Accuracy 86.10±0.05 # 1
Node Classification questions Polynormer AUCROC 78.92±0.89 # 1
Node Classification roman-empire Polynormer Accuracy (% ) 92.55±0.37 # 1
Node Classification tolokers Polynormer AUCROC 85.91±0.74 # 1

Methods