arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.03481cs.LG

AnchorGT:面向可扩展图Transformer的高效灵活注意力架构

AnchorGT: Efficient and Flexible Attention Architecture for Scalable Graph Transformers

Peking University(北京大学);Alibaba Group(阿里巴巴集团)

Wenhao Zhu, Guojie Song, Liang Wang, Shaoguo Liu

AI总结:

AnchorGT提出一种基于$k$-支配节点集锚点的注意力架构,以几乎线性复杂度保留全局感受野,可灵活替换多种图Transformer模型中的注意力模块,在提升可扩展性和效率的同时保持甚至增强表达能力。

摘要:

图Transformer(GTs)通过克服消息传递图神经网络(GNNs)的局限性,展现出良好的性能与表达能力,显著推动了图表示学习领域的发展。然而,GTs中自注意力机制的二次复杂度限制了其可扩展性,此前解决该问题的方法往往存在表达能力下降或缺乏通用性的问题。为解决这一问题,我们提出AnchorGT,这是一种面向GTs的新型注意力架构,具有全局感受野和几乎线性的复杂度,可作为灵活的构建模块,用于提升多种GT模型的可扩展性。受基于锚点的GNNs启发,我们采用结构重要的$k$-支配节点集作为锚点,并设计了一种注意力机制,该机制关注单个节点与锚点之间的关系,同时为所有节点保留全局感受野。凭借其直观的设计,AnchorGT可以轻松替换具有不同网络架构和结构编码的各种GT模型中的注意力模块,从而在不牺牲性能的情况下降低计算开销。此外,我们从理论上证明AnchorGT注意力可以严格比Weisfeiler-Lehman测试更具表达能力,表明其在表示图结构方面的优越性。我们在三个最先进的GT模型上的实验表明,它们的AnchorGT变体可以在速度更快且内存效率显著更高的同时取得更好的结果。

英文摘要:

Graph Transformers (GTs) have significantly advanced the field of graph representation learning by overcoming the limitations of message-passing graph neural networks (GNNs) and demonstrating promising performance and expressive power. However, the quadratic complexity of self-attention mechanism in GTs has limited their scalability, and previous approaches to address this issue often suffer from expressiveness degradation or lack of versatility. To address this issue, we propose AnchorGT, a novel attention architecture for GTs with global receptive field and almost linear complexity, which serves as a flexible building block to improve the scalability of a wide range of GT models. Inspired by anchor-based GNNs, we employ structurally important $k$-dominating node set as anchors and design an attention mechanism that focuses on the relationship between individual nodes and anchors, while retaining the global receptive field for all nodes. With its intuitive design, AnchorGT can easily replace the attention module in various GT models with different network architectures and structural encodings, resulting in reduced computational overhead without sacrificing performance. In addition, we theoretically prove that AnchorGT attention can be strictly more expressive than Weisfeiler-Lehman test, showing its superiority in representing graph structures. Our experiments on three state-of-the-art GT models demonstrate that their AnchorGT variants can achieve better results while being faster and significantly more memory efficient.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑