Do Transformers Really Perform Bad for Graph Representation?

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.

https://arxiv.org/abs/2106.05234

Transformer架构已经成为自然语言处理和机器视觉等任务的主要模型之一。然而,它依然没有在图级的排行榜上展现出有竞争力的性能。所以,Transformer在图表示学习领域依然有需要探索的空间。在本文中,我们提出了Graphormer,这是一种基于标准Transformer的架构,可以实现在图表示学习任务上优秀的性能。模型的关键是如何有效的将图信息编码进架构中。最后,我们还提出了几个简单但有效的编码架构用于帮助Graphormer更好得建模图架构数据。另外,我们从数学角度分析了Graphormer架构的表达能力以及我们编码方式,许多受欢迎的GNN架构都可以转换成特殊形式的Graphormer.

发表评论

邮箱地址不会被公开。 必填项已用*标注