[论文解读] Gophormer: Ego-Graph Transformer for Node Classification
Gophormer 提出了一种新颖的图Transformer模型,该模型将自注意力机制应用于以单个节点为中心的自我图(ego-graphs)而非整个图,显著提升了在节点分类任务中的可扩展性和性能。通过结合 Node2Seq 进行自我图采样、增强邻近性的注意力机制、一致性正则化以及多样本推理,Gophormer 在六个基准数据集上实现了最先进性能,证明了尽管面临数据稀缺和结构噪声的挑战,Transformer 依然可在图学习中有效应用。
Transformers have achieved remarkable performance in a myriad of fields including natural language processing and computer vision. However, when it comes to the graph mining area, where graph neural network (GNN) has been the dominant paradigm, transformers haven't achieved competitive performance, especially on the node classification task. Existing graph transformer models typically adopt fully-connected attention mechanism on the whole input graph and thus suffer from severe scalability issues and are intractable to train in data insufficient cases. To alleviate these issues, we propose a novel Gophormer model which applies transformers on ego-graphs instead of full-graphs. Specifically, Node2Seq module is proposed to sample ego-graphs as the input of transformers, which alleviates the challenge of scalability and serves as an effective data augmentation technique to boost model performance. Moreover, different from the feature-based attention strategy in vanilla transformers, we propose a proximity-enhanced attention mechanism to capture the fine-grained structural bias. In order to handle the uncertainty introduced by the ego-graph sampling, we further propose a consistency regularization and a multi-sample inference strategy for stabilized training and testing, respectively. Extensive experiments on six benchmark datasets are conducted to demonstrate the superiority of Gophormer over existing graph transformers and popular GNNs, revealing the promising future of graph transformers.
研究动机与目标
- 解决现有图Transformer在对整个图应用全注意力机制时面临的可扩展性与过拟合问题。
- 通过利用注意力机制的长程建模能力,克服消息传递GNN的局限性,如过度平滑与过度压缩问题。
- 通过一致性正则化与多样本推理策略,缓解自我图采样不确定性带来的负面影响。
- 通过将自我图采样视为一种有效的数据增强技术,提升低数据场景下的性能表现。
- 证明当以结构归纳偏差进行合理设计时,图Transformer可在节点分类任务中超越GNN及现有图Transformer模型。
提出的方法
- 引入 Node2Seq 模块,为每个节点采样其自我图,将输入规模从 |V| 降低至 |V_E|,从而实现在大规模图上的高效训练。
- 设计一种增强邻近性的注意力机制,通过在自我图中编码节点邻近度与边类型,提升局部归纳偏差。
- 在训练过程中应用一致性正则化,对同一节点的多个采样子图的预测结果进行对齐,以在采样不确定性下稳定学习过程。
- 在推理阶段实施多样本推理策略,通过聚合多个采样子图的预测结果,降低方差并提升模型鲁棒性。
- 在每个自我图中引入 $n_g$ 个共享的全局节点,以注入全局结构信息,同时不增加每个节点的参数量。
- 采用堆叠的 Gophormer 层结构,结合残差连接与层归一化,通过多头自注意力与前馈网络逐步优化节点表示。
实验结果
研究问题
- RQ1基于自我图的图Transformer模型是否能在数据稀缺与大规模设置下,优于全图Transformer与GNN?
- RQ2自我图采样如何影响模型泛化能力?在采样引起的不确定性下,哪些策略可稳定训练与推理?
- RQ3在基于自我图的图Transformer中,为平衡性能与泛化能力,最优的全局节点数量与Transformer层数是多少?
- RQ4与基于特征的标准注意力机制相比,自我图中的邻近性增强注意力机制是否能提升性能?
- RQ5相较于单样本或全自我图推理,多样本推理在多大程度上提升了模型的鲁棒性与准确性?
主要发现
- Gophormer 在六个基准节点分类数据集(包括 Cora、Citeseer 和 PubMed)上实现了最先进性能,优于GNN与现有图Transformer模型。
- 多样本推理策略显著优于单样本与全自我图推理,性能在 k=5 个样本时达到峰值,并在更高采样数下趋于稳定。
- 训练阶段的一致性正则化通过对齐同一节点的多个采样子图输出,显著提升了预测的稳定性与准确性。
- 最优的全局节点数量 ($n_g$) 为 2–3,性能在 $n_g=2$ 或 $n_g=3$ 时达到峰值,更高值则因过拟合与参数量增加而下降。
- 对于小型图(如 Cora、Citeseer),最优的 Gophormer 层数量 ($L$) 为 2–3;对于大型图(如 Reddit、Photo),则为 3–4;更深的模型易出现过拟合。
- 邻近性增强注意力机制能有效捕捉局部结构模式,相较于标准注意力机制,在自我图中显著提升了性能。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。