Transformers are efficient hierarchical chemical graph learners

Zihan Pengmei, Zimu Li, Chih-chan Tien, R. Kondor, A. Dinner

Main figure for Transformers are efficient hierarchical chemical graph learners

Abstract

Transformers, adapted from natural language processing, are emerging as a leading approach for graph representation learning. Contemporary graph transformers often treat nodes or edges as separate tokens. This approach leads to computational challenges for even moderately-sized graphs due to the quadratic scaling of self-attention complexity with token count. In this paper, we introduce SubFormer, a graph transformer that operates on subgraphs that aggregate information by a message-passing mechanism. This approach reduces the number of tokens and enhances learning long-range interactions. We demonstrate SubFormer on benchmarks for predicting molecular properties from chemical structures and show that it is competitive with state-of-the-art graph transformers at a fraction of the computational cost, with training times on the order of minutes on a consumer-grade graphics card. We interpret the attention weights in terms of chemical structures. We show that SubFormer exhibits limited over-smoothing and avoids over-squashing, which is prevalent in traditional graph neural networks.

Benchmark Results

Tested on 1 dataset 1 baseline value reported too low

Tables show presented results in global context (best 3 papers + GCN + MLP).

LRGB

#ModelMAE ↓Paper
1
GCN
actual #1 vs paper #183 182 places worse
0.2421 ±0.0016
best reported
actual #1 vs paper #183 182 places worse
paper 0.3496 ±0.0013
paper 0.3496 ±0.0013 Δ at pub 0.1036 Δ today 0.1075
2
IPR-MPNN
0.2422 ±0.0007
3
TANGO-GPS
0.2422 ±0.0014
5
GIN
actual #5 vs paper #184 179 places worse
0.2429 ±0.0019
best reported
actual #5 vs paper #184 179 places worse
paper 0.3547 ±0.0045
paper 0.3547 ±0.0045 Δ today 0.1118
73
MP
0.2487 ±0.0009
This paper
112
GT
0.2529 ±0.0016
This paper
124
SAN
0.2545 ±0.0012
This paper
201
MLP
0.4351 ±0.0008
SOTA performance (not significantly different from the best) Proposed method (this paper) Baseline / comparison (this paper) Global context (other papers) Best at pub — reported result worse than the best known when published (best reported in green) Best today — OK at publication; today's leaderboard best is elsewhere