arXiv:2409.09007cs.LGcs.AI2024-09被引 2

单层图Transformer实现线性复杂度,无需近似即可处理大规模图数据。

SGFormer: Single-Layer Graph Transformers with Approximation-Free Linear Complexity

  • 用单层全局注意力替代多层堆叠,保留图表示能力。
  • 在ogbn-papers100M上实现推理速度提升数量级,且标签数据有限时仍具竞争力。
  • 无需近似即可全连接交互,适合大规模图场景的高效建模。

在大规模图上学习表示是一个长期挑战,源于节点间的相互依赖性。尽管近期基于注意力机制的Transformer在小规模图上表现优异,但现有方法通常沿用语言与视觉任务中的深层堆叠结构,导致效率受限。本文分析了一种融合全局注意力与图传播的通用混合层,证明多层传播可简化为单层,而表达能力不变。由此提出简化版单层图Transformer(SGFormer),其核心为单层全局注意力,计算复杂度与图规模呈线性关系,且无需任何近似即可建模所有节点对的交互。实验表明,SGFormer成功扩展至web规模的ogbn-papers100M数据集,在中等规模图上推理速度远超同类Transformer,并在少量标注数据下表现良好。

原文摘要 · Abstract (English)

Learning representations on large graphs is a long-standing challenge due to the inter-dependence nature. Transformers recently have shown promising performance on small graphs thanks to its global attention for capturing all-pair interactions beyond observed structures. Existing approaches tend to inherit the spirit of Transformers in language and vision tasks, and embrace complicated architectures by stacking deep attention-based propagation layers. In this paper, we attempt to evaluate the necessity of adopting multi-layer attentions in Transformers on graphs, which considerably restricts the efficiency. Specifically, we analyze a generic hybrid propagation layer, comprised of all-pair attention and graph-based propagation, and show that multi-layer propagation can be reduced to one-layer propagation, with the same capability for representation learning. It suggests a new technical path for building powerful and efficient Transformers on graphs, particularly through simplifying model architectures without sacrificing expressiveness. As exemplified by this work, we propose a Simplified Single-layer Graph Transformers (SGFormer), whose main component is a single-layer global attention that scales linearly w.r.t. graph sizes and requires none of any approximation for accommodating all-pair interactions. Empirically, SGFormer successfully scales to the web-scale graph ogbn-papers100M, yielding orders-of-magnitude inference acceleration over peer Transformers on medium-sized graphs, and demonstrates competitiveness with limited labeled data.

图神经网络Transformer线性复杂度大规模图

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。