We propose DyGFormer, a new Transformer-based architecture for dynamic graph learning that solely learns from the sequences of nodes' historical first-hop interactions. DyGFormer incorporates two distinct designs: a neighbor co-occurrence encoding scheme that explores the correlations of the source node and destination node based on their sequences; a patching technique that divides each sequence into multiple patches and feeds them to Transformer, allowing the model to effectively and efficiently benefit from longer histories. We also introduce DyGLib, a unified library with standard training pipelines, extensible coding interfaces, and comprehensive evaluating protocols to promote reproducible, scalable, and credible dynamic graph learning research. By performing extensive experiments on thirteen datasets from various domains for transductive/inductive dynamic link prediction and dynamic node classification tasks, we observe that: DyGFormer achieves state-of-the-art performance on most of the datasets, demonstrating the effectiveness of capturing nodes' correlations and long-term temporal dependencies; the results of baselines vary across different datasets and some findings are inconsistent with previous reports, which may be caused by their diverse pipelines and problematic implementations. We hope our work can provide new insights and facilitate the development of the dynamic graph learning field. All the resources including datasets, data loaders, algorithms, and executing scripts are publicly available at https://github.com/yule-BUAA/DyGLib.
翻译:我们提出了DyGFormer,一种基于Transformer的新型动态图学习架构,该架构仅从节点历史一阶交互序列中学习。DyGFormer包含两种独特设计:一种邻居共现编码方案,通过源节点和目标节点的序列探索其相关性;一种分块技术,将每个序列划分为多个块并输入Transformer,使模型能够有效且高效地从更长历史中获益。我们还推出了DyGLib,一个统一的库,包含标准训练流程、可扩展编码接口和全面评估协议,以促进可重复、可扩展且可信的动态图学习研究。通过在来自不同领域的十三个数据集上,针对直推式/归纳式动态链接预测和动态节点分类任务进行广泛实验,我们发现:DyGFormer在大多数数据集上实现了最先进的性能,展示了捕获节点相关性和长时时间依赖的有效性;基线结果在不同数据集间存在差异,且部分发现与先前报告不一致,这可能是由于它们不同的流程和有问题的实现所致。我们希望我们的工作能够提供新见解并促进动态图学习领域的发展。所有资源,包括数据集、数据加载器、算法和执行脚本,均公开于https://github.com/yule-BUAA/DyGLib。