DTFormer: A Transformer-Based Method for Discrete-Time Dynamic Graph Representation Learning

📄 arXiv: 2407.18523v1 📥 PDF

作者: Xi Chen, Yun Xiong, Siwei Zhang, Jiawei Zhang, Yao Zhang, Shiyang Zhou, Xixi Wu, Mingyang Zhang, Tengfei Liu, Weiqiang Wang

分类: cs.LG

发布日期: 2024-07-26

备注: 11 pages, 3 figures


💡 一句话要点

提出DTFormer,一种基于Transformer的离散时间动态图表示学习方法

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 动态图表示学习 Transformer 图神经网络 时间序列分析 注意力机制

📋 核心要点

  1. 现有GNN+RNN架构在动态图表示学习中存在过平滑、难捕获长期依赖、扩展性差等问题。
  2. DTFormer利用Transformer架构,通过注意力机制同时处理拓扑信息和时间动态,克服GNN和RNN的局限性。
  3. 在六个动态图数据集上实验表明,DTFormer达到了SOTA性能,验证了其有效性。

📝 摘要(中文)

离散时间动态图(DTDGs)在现实世界中普遍存在,并且易于数据获取,受到了学术研究人员和行业从业者的广泛关注。DTDG的表示学习已广泛应用于建模时间变化的实体及其演变连接的动态。目前,DTDG表示学习主要依赖于GNN+RNN架构,这体现了图神经网络(GNN)和循环神经网络(RNN)的固有局限性。GNN存在过平滑问题,而RNN难以有效地捕获长期依赖关系。GNN+RNN架构也难以扩展到大型图和长序列。此外,这些方法通常单独计算节点表示,并且仅关注单个节点特征,从而忽略了两个节点之间的行为交叉,例如两个节点出现在同一上下文中或共享共同邻居的情况。本文提出了一种新的DTDG表示学习方法DTFormer,从传统的GNN+RNN框架转向基于Transformer的架构。我们的方法利用注意力机制来同时处理每个时间戳内图中的拓扑信息以及沿时间戳的图的时间动态,从而避免了GNN和RNN的上述基本弱点。此外,我们通过结合节点之间的交叉关系和集成多块模块来增强模型的表达能力。在六个公共动态图基准数据集上进行的大量实验证实了我们模型的有效性,实现了SOTA性能。

🔬 方法详解

问题定义:论文旨在解决离散时间动态图(DTDGs)的表示学习问题。现有方法主要依赖GNN+RNN架构,但GNN存在过平滑问题,RNN难以捕捉长期依赖,且二者均难以扩展到大型图和长序列。此外,现有方法忽略了节点间的行为交叉关系,仅关注单个节点特征。

核心思路:论文的核心思路是利用Transformer架构替代传统的GNN+RNN架构。Transformer的注意力机制能够同时处理图的拓扑信息和时间动态,避免了GNN的过平滑和RNN的长期依赖问题。同时,通过引入节点间的交叉关系,增强模型对节点间交互行为的建模能力。

技术框架:DTFormer的整体架构包含以下几个主要模块:1) 输入嵌入层:将节点特征和时间戳信息嵌入到向量空间中。2) Transformer编码器:利用多层Transformer编码器同时处理图的拓扑信息和时间动态。3) 节点交叉模块:显式地建模节点间的交叉关系。4) 多块模块:增强模型的表达能力。5) 输出层:预测节点之间的连接关系。

关键创新:最重要的技术创新点在于使用Transformer架构进行动态图表示学习,并引入节点交叉模块。与传统的GNN+RNN架构相比,Transformer能够更好地捕捉图的时序信息和节点间的依赖关系。节点交叉模块则能够显式地建模节点间的交互行为,从而提高预测精度。

关键设计:论文中使用了多头注意力机制,以捕捉不同类型的节点关系。损失函数采用二元交叉熵损失,用于衡量预测结果与真实标签之间的差异。多块模块的具体实现方式未知,但其目的是增强模型的表达能力,可能采用了类似图像处理中的patch embedding方法。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

DTFormer在六个公共动态图基准数据集上进行了实验,结果表明其性能优于现有的GNN+RNN方法,达到了SOTA水平。具体的性能提升幅度未知,但论文强调了DTFormer在处理动态图表示学习方面的有效性。

🎯 应用场景

DTFormer可应用于社交网络分析、交通流量预测、金融风险评估等领域。通过学习动态图中节点和边的表示,可以更好地理解实体间的演变关系,从而为决策提供支持。该研究的未来影响在于推动动态图表示学习的发展,并为相关应用提供更有效的解决方案。

📄 摘要(原文)

Discrete-Time Dynamic Graphs (DTDGs), which are prevalent in real-world implementations and notable for their ease of data acquisition, have garnered considerable attention from both academic researchers and industry practitioners. The representation learning of DTDGs has been extensively applied to model the dynamics of temporally changing entities and their evolving connections. Currently, DTDG representation learning predominantly relies on GNN+RNN architectures, which manifest the inherent limitations of both Graph Neural Networks (GNNs) and Recurrent Neural Networks (RNNs). GNNs suffer from the over-smoothing issue as the models architecture goes deeper, while RNNs struggle to capture long-term dependencies effectively. GNN+RNN architectures also grapple with scaling to large graph sizes and long sequences. Additionally, these methods often compute node representations separately and focus solely on individual node characteristics, thereby overlooking the behavior intersections between the two nodes whose link is being predicted, such as instances where the two nodes appear together in the same context or share common neighbors. This paper introduces a novel representation learning method DTFormer for DTDGs, pivoting from the traditional GNN+RNN framework to a Transformer-based architecture. Our approach exploits the attention mechanism to concurrently process topological information within the graph at each timestamp and temporal dynamics of graphs along the timestamps, circumventing the aforementioned fundamental weakness of both GNNs and RNNs. Moreover, we enhance the model's expressive capability by incorporating the intersection relationships among nodes and integrating a multi-patching module. Extensive experiments conducted on six public dynamic graph benchmark datasets confirm our model's efficacy, achieving the SOTA performance.