Heterogeneous Graph Transformer

3 Mar 2020  ·  Ziniu Hu, Yuxiao Dong, Kuansan Wang, Yizhou Sun ·

Recent years have witnessed the emerging success of graph neural networks (GNNs) for modeling structured data. However, most GNNs are designed for homogeneous graphs, in which all nodes and edges belong to the same types, making them infeasible to represent heterogeneous structures. In this paper, we present the Heterogeneous Graph Transformer (HGT) architecture for modeling Web-scale heterogeneous graphs. To model heterogeneity, we design node- and edge-type dependent parameters to characterize the heterogeneous attention over each edge, empowering HGT to maintain dedicated representations for different types of nodes and edges. To handle dynamic heterogeneous graphs, we introduce the relative temporal encoding technique into HGT, which is able to capture the dynamic structural dependency with arbitrary durations. To handle Web-scale graph data, we design the heterogeneous mini-batch graph sampling algorithm---HGSampling---for efficient and scalable training. Extensive experiments on the Open Academic Graph of 179 million nodes and 2 billion edges show that the proposed HGT model consistently outperforms all the state-of-the-art GNN baselines by 9%--21% on various downstream tasks.

PDF Abstract

Datasets


Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Node Property Prediction ogbn-mag HGT (TransE embs) Test Accuracy 0.4982 ± 0.0013 # 25
Validation Accuracy 0.5124 ± 0.0046 # 25
Number of params 26877657 # 11
Ext. data No # 1
Node Property Prediction ogbn-mag HGT (LADIES Sample) Test Accuracy 0.4927 ± 0.0061 # 27
Validation Accuracy 0.4989 ± 0.0047 # 27
Number of params 21173389 # 12
Ext. data No # 1

Methods