Skip to main content
QUICK REVIEW

[论文解读] TransGNN: Harnessing the Collaborative Power of Transformers and Graph Neural Networks for Recommender Systems

Peiyan Zhang, Yuchen Yan|arXiv (Cornell University)|Aug 28, 2023
Advanced Graph Neural Networks被引用 4
一句话总结

TransGNN 提出了一种混合模型,通过交替整合 Transformer 和图神经网络(GNN)层,以克服推荐系统中 GNN 的感受野有限和对噪声敏感的问题。通过在 Transformer 中使用结构化位置编码并采样相关节点,TransGNN 在保持低内存和 FLOP 使用量的同时,实现了比 NGCF 快 30–40% 的训练和推理速度,达到最先进性能。

ABSTRACT

Graph Neural Networks (GNNs) have emerged as promising solutions for collaborative filtering (CF) through the modeling of user-item interaction graphs. The nucleus of existing GNN-based recommender systems involves recursive message passing along user-item interaction edges to refine encoded embeddings. Despite their demonstrated effectiveness, current GNN-based methods encounter challenges of limited receptive fields and the presence of noisy "interest-irrelevant" connections. In contrast, Transformer-based methods excel in aggregating information adaptively and globally. Nevertheless, their application to large-scale interaction graphs is hindered by inherent complexities and challenges in capturing intricate, entangled structural information. In this paper, we propose TransGNN, a novel model that integrates Transformer and GNN layers in an alternating fashion to mutually enhance their capabilities. Specifically, TransGNN leverages Transformer layers to broaden the receptive field and disentangle information aggregation from edges, which aggregates information from more relevant nodes, thereby enhancing the message passing of GNNs. Additionally, to capture graph structure information effectively, positional encoding is meticulously designed and integrated into GNN layers to encode such structural knowledge into node attributes, thus enhancing the Transformer's performance on graphs. Efficiency considerations are also alleviated by proposing the sampling of the most relevant nodes for the Transformer, along with two efficient sample update strategies to reduce complexity. Furthermore, theoretical analysis demonstrates that TransGNN offers increased expressiveness compared to GNNs, with only a marginal increase in linear complexity. Extensive experiments on five public datasets validate the effectiveness and efficiency of TransGNN.

研究动机与目标

  • 解决基于 GNN 的推荐系统中基于边的消息传递带来的感受野有限和噪声问题。
  • 克服深层 GNN 中的过度平滑问题,该问题限制了对三跳以外邻域的建模能力。
  • 利用 Transformer 的全局注意力机制,捕捉用户-物品交互中的长程序列依赖关系。
  • 通过设计专用的位置编码,将图的结构信息整合到 Transformer 中。
  • 通过有针对性的节点采样和更新策略,提升大规模图的计算效率。

提出的方法

  • 在 GNN 和 Transformer 层之间交替,联合优化用户和物品嵌入。
  • 引入三种位置编码(结构型、邻近型和注意力型),将图结构信息注入 Transformer 层。
  • 应用节点采样,将自注意力计算限制在最相关的节点上,降低计算复杂度。
  • 提出两种高效的采样更新策略:动态采样和增量更新,以在训练过程中保持采样相关性。
  • 采用双流消息传递机制,其中 Transformer 聚合长程上下文信息,而 GNN 优化局部、依赖边的特征。
  • 设计一种混合架构,其中 GNN 负责局部结构传播,而 Transformer 执行全局、自适应的聚合。

实验结果

研究问题

  • RQ1将 Transformer 与 GNN 结合是否能在不增加计算成本的前提下,提升 GNN 在协同过滤中的感受野?
  • RQ2如何有效将图结构信息编码到 Transformer 的自注意力机制中,以用于推荐任务?
  • RQ3高效的采样策略是否能降低 Transformer 在大规模交互图上的计算负担,同时保持性能?
  • RQ4GNN 与 Transformer 层交替的架构是否比独立模型带来更好的表征学习效果?
  • RQ5与 NGCF、SHT 和 HyRec 等现有最先进模型相比,TransGNN 在效率和表达能力方面表现如何?

主要发现

  • TransGNN 在五个公开数据集上达到最先进性能,在 Yelp 数据集上 Recall@20 达到 0.0927,优于 NGCF(0.0294)、HyRec(0.0472)和 SHT(0.0651)。
  • 与 NGCF 相比,Yelp 数据集上的训练时间减少了 30–40%,推理时间也减少了 30–40%。
  • TransGNN 的 GPU 内存使用量比 SHT 和 HyRec 少 20–30%,在 Yelp 数据集上仅需 1.79GB。
  • TransGNN 的 FLOPs(3.74×10⁶)在所有基线模型中最低,表明其计算效率更优。
  • t-SNE 可视化显示,TransGNN 生成的聚类比 NGCF、HyRec 和 SHT 更为分离,表明其表征更具判别性。
  • 理论分析证实,TransGNN 的表达能力高于 GNN,且线性复杂度仅略有增加。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。