# 时间图卷积网络

时间图卷积网络是一种神经架构，它在时变图上施加图卷积，以学习时空表示，最突出的应用是交通预测。它以一系列图快照为输入，每个快照携带传感器读数等节点特征，并输出对未来节点值的预测。经典T-GCN模型将编码路网拓扑的图卷积网络（GCN）与编码信号如何随时间演化的[门控循环单元](https://www.edgepedia.org/zh/gated-recurrent-unit)（GRU）结合，并通过全连接层产生结果。<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup> 更宽泛的文献解读将时间图神经网络（TGNN）视为分解 \( h_t = f_{\mathrm{T}}(f_{\mathrm{S}}(\mathcal{G}_t), h_{t-1}, \ldots, h_1) \)，其中 \( f_{\mathrm{S}} \) 是空间（图）学习函数，\( f_{\mathrm{T}} \) 是从LSTM、GRU、TCN、回声状态网络和Transformer中选择的时间学习函数。<sup>[2](https://dl.acm.org/doi/10.1145/3771693)</sup> 时变图有两种形式：基于快照的离散时间动态图和基于事件的连续时间动态图，这一区分驱动不同的算法路径。<sup>[3](https://export.arxiv.org/pdf/2302.01018v4.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 输入/输出 | 图节点上的n条历史时间序列；空间特征来自GCN，时间特征来自GRU，经全连接层预测<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup> |
| 经典论文 | 赵、宋、张、刘、王、林、邓、李（Zhao, Song, Zhang, Liu, Wang, Lin, Deng, Li），IEEE T-ITS，2019年8月22日发表，第21卷第9期，2020年9月，第3848–3858页<sup>[4](https://ieeexplore.ieee.org/document/8809901)</sup> |
| 核心机制 | GCN捕获路网拓扑结构以获得空间特征；GRU捕获时间动态；结果经全连接层产生<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup> |
| 基准提升（15分钟） | 15分钟预测的RMSE相较HA降低约50.6%<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup> |
| 训练协议 | 80%训练/其余测试，使用Adam<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup>；PEMS变体使用学习率1e-2的Adam<sup>[5](https://github.com/PaddlePaddle/PaddleScience/blob/develop/docs/en/examples/tgcn.md)</sup> |
| 已知失效模式 | 高峰时段速度峰值被平滑，因为GCN滤波器在图域中起低通滤波器作用<sup>[6](https://arxiv.org/abs/1811.05320)</sup> |

## 工作原理

空间阶段使用谱图卷积。在T-GCN和A3T-GCN采用的表述中，信号 \( x \) 与学习得到的滤波器 \( g_{\theta} \) 的卷积为 \( g_{\theta}(L) \ast x = U \cdot g_{\theta}(\Lambda) \cdot U^{T} x \)，其中 \( L \) 是图拉普拉斯矩阵（编码图连通性的矩阵，谱卷积的基础），\( U \) 是其特征向量矩阵，\( \Lambda \) 是其特征值矩阵。<sup>[7](https://ar5iv.labs.arxiv.org/html/2006.11583)</sup> 两层GCN学习空间特征，计算 \( f(X, A) = \sigma(\hat{A} \cdot \mathrm{ReLU}(\hat{A} \cdot X \cdot W_0) \cdot W_1) \)。底层GCN层是传播规则 \( f(H^{(l)}, A) = \sigma(\hat{D}^{-1/2} \cdot \hat{A} \cdot \hat{D}^{-1/2} \cdot H^{(l)} \cdot W^{(l)}) \)，其中 \( \hat{A} = A + I \)，基普夫和韦林将其提出为Weisfeiler-Lehman算法的一种可微、参数化变体。<sup>[8](https://tkipf.github.io/graph-convolutional-networks/)</sup>

时间阶段随后建模动态。在T-GCN中，带空间特征的时间序列进入GRU，动态变化通过单元间信息传递获得，产生隐藏状态 \( h_t \)。<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup> 选择GRU而非LSTM，因为GRU结构更简单、参数更少、训练更快。<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup> 训练最小化 \( \mathrm{loss} = \lVert Y_t - \hat{Y}_t \rVert + \lambda L_{\mathrm{reg}} \)，其中 \( \lambda \) 是控制正则化的超参数。替代方案将循环单元换成时间卷积或注意力，如“变体”部分所述。

## 实施方式

在时空数据集上训练时间GCN遵循一套常见流程。第一，构建图快照和邻接关系：节点是传感器或实体，边编码物理或学习到的连接，每个快照携带一个时间步的节点特征。第二，通过堆叠图卷积模块、时间模块（GRU、TCN或注意力）和预测头来构建架构。第三，按时间划分数据：原始T-GCN将80%数据用于训练、其余用于测试，并用[Adam优化器](https://www.edgepedia.org/zh/adam-optimizer)训练。<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup> PEMS风格流程使用学习率1e-2的Adam训练。<sup>[5](https://github.com/PaddlePaddle/PaddleScience/blob/develop/docs/en/examples/tgcn.md)</sup> PyTorch Geometric Temporal等库提供StaticGraphTemporalSignal等迭代器，用于静态图上定义的时间信号，并强制按时间进行训练-测试划分，即较早快照用于训练、较晚快照用于测试，从而在现实场景中评估预测。<sup>[9](https://pytorch-geometric-temporal.readthedocs.io/en/latest/notes/introduction.html)</sup> 在连续时间设置中，通过用上一批次而非当前批次的缓存消息更新节点记忆，来防止信息泄漏。<sup>[10](https://www.vldb.org/pvldb/vol18/p956-yang.pdf)</sup>

## 起源

T-GCN架构由赵玲（Ling Zhao）等人在《T-GCN：一种用于交通预测的时间图卷积网络》（T-GCN: A Temporal Graph Convolutional Network for Traffic Prediction）中提出，发表于2019年《[IEEE智能交通系统汇刊](https://www.edgepedia.org/zh/ieee-transactions-on-intelligent-transportation-systems)》（IEEE Transactions on Intelligent Transportation Systems）。<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup><sup> • </sup><sup>[4](https://ieeexplore.ieee.org/document/8809901)</sup> 它建立在一系列早期工作之上：托马斯·基普夫（Thomas Kipf）和[马克斯·韦林](https://www.edgepedia.org/zh/max-welling)（Max Welling）的图卷积网络（2016），T-GCN采用了其逐层传播规则；<sup>[8](https://tkipf.github.io/graph-convolutional-networks/)</sup> 米夏埃尔·德费拉尔（Michaël Defferrard）、泽维尔·布雷松（Xavier Bresson）和皮埃尔·范德盖恩斯特（Pierre Vandergheynst）的切比雪夫多项式谱滤波（2016），降低了图卷积复杂度；<sup>[11](https://doi.org/10.48550/arxiv.1606.09375)</sup> 李亚光（Yaguang Li）、罗斯·余（Rose Yu）、赛勒斯·沙哈比（Cyrus Shahabi）和刘燕（Yan Liu）的扩散卷积循环神经网络（2017），通过图上随机游走捕获空间特征，并通过编码器-解码器架构捕获时间特征；<sup>[12](https://doi.org/10.48550/arxiv.1707.01926)</sup> 以及于冰（Bing Yu）、尹浩腾（Haoteng Yin）和朱占星（Zhanxing Zhu）的时空图卷积网络（2017）。<sup>[13](https://doi.org/10.48550/arxiv.1709.04875)</sup>

## 变体

具名变体主要区别在时间模块以及注意力或邻接关系的处理方式。

- **T-GCN**将两层GCN与一个GRU单元结合，其中线性变换被图卷积替换。<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup>
- **A3T-GCN**增加软注意力机制，重新加权历史隐藏状态的影响，以捕获全局时间变化趋势。<sup>[7](https://ar5iv.labs.arxiv.org/html/2006.11583)</sup>
- **STGCN**完全用卷积结构构建预测，在“三明治”ST-Conv块中将谱图卷积与门控时间卷积（一维因果卷积加GLU）结合，避免循环单元。<sup>[14](https://www.ijcai.org/proceedings/2018/0505.pdf)</sup>
- **DCRNN**使用扩散卷积（图上随机游走）和编码器-解码器循环架构。<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup>
- **ASTGCN**在三个组件中建模近期、日周期和周周期依赖，其输出加权融合，每个组件都将时空注意力与图卷积结合。<sup>[15](https://ojs.aaai.org/index.php/AAAI/article/download/3881/3759)</sup>
- **基于TCN的TGCN**（PaddleScience）交替使用GCN模块提取空间特征和TCN模块提取时间特征。<sup>[5](https://github.com/PaddlePaddle/PaddleScience/blob/develop/docs/en/examples/tgcn.md)</sup>
- **TARGCN**用图卷积替换GRU内部的标准矩阵乘法，使GRU获得空间和局部时间相关性。<sup>[16](https://link.springer.com/article/10.1007/s40747-024-01601-1)</sup>
- **EvolveGCN**用RNN在每个时间步更新GCN参数，因此模型规模不随时间步数增长，适应性也不受节点是否存在约束。<sup>[3](https://export.arxiv.org/pdf/2302.01018v4.pdf)</sup><sup> • </sup><sup>[17](https://doi.org/10.1609/aaai.v34i04.5984)</sup>
- **DySAT**用自注意力将图注意力推广到快照时序图。<sup>[3](https://export.arxiv.org/pdf/2302.01018v4.pdf)</sup>
- **基于事件的模型**，如时间图网络（Temporal Graph Networks, TGN）和APAN，作用于以带时间的事件列表表示的连续时间动态图，将记忆模块与基于图的算子结合。<sup>[18](https://doi.org/10.48550/arxiv.2006.10637)</sup><sup> • </sup><sup>[19](https://doi.org/10.48550/arxiv.2011.11545)</sup>

T-GCN官方代码库托管T-GCN和A3T-GCN的源代码。<sup>[20](https://github.com/lehaifeng/t-gcn)</sup>

## 应用

交通预测是核心应用，在路网速度和流量数据集上评估。<sup>[1](https://doi.org/10.1109/tits.2019.2935152)</sup> 同一套时空GNN机制也被应用于电力网络和银行间链路。<sup>[21](https://kdd-milets.github.io/milets2022/papers/MILETS_2022_paper_3020.pdf)</sup> PyTorch Geometric Temporal中的一个案例研究在维基百科数学网页流量数据集上训练门控循环图卷积模型，达到MSE 0.5264。<sup>[9](https://pytorch-geometric-temporal.readthedocs.io/en/latest/notes/introduction.html)</sup> 一篇2026年综述将EvolveGCN、T-GCN、JODIE和TGN列为将时间信息与GNN融合的动态GNN，应用于社交网络分析、时间序列预测和交通流量预测。<sup>[22](https://ieeexplore.ieee.org/document/11202740)</sup>

## 局限与替代方案

已记录的失效模式很具体。T-GCN倾向于平滑高峰时段的交通速度峰值，因为GCN滤波器在图域中起低通滤波器作用。在深圳（Shenzhen）出租车轨迹数据集上，无论预测步长如何，T-GCN的表现与普通FC-GRU相似，其评估者将此归因于基于拓扑的无向图卷积算子的局限；一个有向变体（T-DGCN）使15分钟预测的RMSE降低约6%。<sup>[23](https://www.mdpi.com/2220-9964/10/9/624)</sup>

与纯序列模型相比，图阶段提供了LSTM和GRU单独缺乏的拓扑结构；与STGCN等全卷积模型相比，循环单元使计算串行化。TARGCN的作者指出，顺序连接的GRU单元限制并行化，影响交通模式变化时的实时重训练。<sup>[16](https://link.springer.com/article/10.1007/s40747-024-01601-1)</sup> 训练深度时间GNN比训练深度静态GNN更难，因为长期依赖加剧了过平滑和过挤压问题，而且高阶结构内存消耗高，时序图通常比静态图有更多节点，使这一问题更严重。<sup>[3](https://export.arxiv.org/pdf/2302.01018v4.pdf)</sup>

可扩展性补救措施包括邻居采样，将聚合限制在子集 \( \mathcal{S}_v \) 且 \( |\mathcal{S}_v| \le q \lt n \)，以防止密集连接节点上的计算爆炸；<sup>[2](https://dl.acm.org/doi/10.1145/3771693)</sup> 索引批处理，降低训练时空GNN的内存成本且不影响精度，并使完整PeMS数据集无需图划分即可训练；<sup>[9](https://pytorch-geometric-temporal.readthedocs.io/en/latest/notes/introduction.html)</sup> 以及周鸿桥（Hongkiao Zhou）等人（2022）的TGL框架，用于十亿规模图上的时间GNN训练。<sup>[24](https://doi.org/10.48550/arxiv.2203.14883)</sup> 在卷积替代方案中，吴宗汉（Zonghan Wu）等人（2019）的Graph WaveNet通过节点嵌入学习自适应邻接矩阵，并使用堆叠膨胀因果卷积；它训练比DCRNN快，但比STGCN慢两倍，一次运行生成12个预测，使其在比较的模型中推理最高效。<sup>[25](https://www.ijcai.org/proceedings/2019/0264.pdf)</sup> 关于快照与事件之争，一项统一评估发现，基于快照的方法在测试推理时至少比大多数基于事件的方法快一个数量级，而TGN和GraphMixer等基于事件的模型相较基于快照的模型没有明显性能优势。<sup>[26](https://raw.githubusercontent.com/mlresearch/v269/main/assets/huang25a/huang25a.pdf)</sup> 将快照批次转换为事件流存在数据泄漏风险，因为流式模型在批次结束时更新表示，快照的一部分边会被用于预测其他同时出现的边。<sup>[26](https://raw.githubusercontent.com/mlresearch/v269/main/assets/huang25a/huang25a.pdf)</sup>

## References

1. [Ling Zhao and colleagues (2019). T-GCN: A Temporal Graph Convolutional Network for Traffic Prediction. IEEE Transactions on Intelligent Transportation Systems.](https://doi.org/10.1109/tits.2019.2935152)
2. [A Primer on Temporal Graph Learning (ACM Computing Surveys)](https://dl.acm.org/doi/10.1145/3771693)
3. [Graph Neural Networks for Temporal Graphs: State of the Art, Open Challenges, and Opportunities (Longa et al., survey)](https://export.arxiv.org/pdf/2302.01018v4.pdf)
4. [T-GCN: A Temporal Graph Convolutional Network for Traffic Prediction (IEEE Xplore record)](https://ieeexplore.ieee.org/document/8809901)
5. [PaddleScience TGCN example](https://github.com/PaddlePaddle/PaddleScience/blob/develop/docs/en/examples/tgcn.md)
6. [T-GCN: A Temporal Graph Convolutional Network for Traffic Prediction (alphaXiv overview)](https://arxiv.org/abs/1811.05320)
7. [A3T-GCN: Attention Temporal Graph Convolutional Network for Traffic Forecasting](https://ar5iv.labs.arxiv.org/html/2006.11583)
8. [Graph Convolutional Networks | Thomas Kipf](https://tkipf.github.io/graph-convolutional-networks/)
9. [PyTorch Geometric Temporal introduction notes](https://pytorch-geometric-temporal.readthedocs.io/en/latest/notes/introduction.html)
10. [Evaluations and Conclusions after 10,000 GPU Hours (TGNN benchmark, VLDB Vol. 18)](https://www.vldb.org/pvldb/vol18/p956-yang.pdf)
11. [Defferrard, Michaël, Bresson, Xavier, Vandergheynst, Pierre (2016). Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1606.09375)
12. [Li, Yaguang and colleagues (2017). Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1707.01926)
13. [Yu, Bing, Yin, Haoteng, Zhu, Zhanxing (2017). Spatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1709.04875)
14. [Spatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting (STGCN, IJCAI 2018)](https://www.ijcai.org/proceedings/2018/0505.pdf)
15. [Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting (ASTGCN, AAAI)](https://ojs.aaai.org/index.php/AAAI/article/download/3881/3759)
16. [TARGCN: temporal attention recurrent graph convolutional neural network for traffic prediction](https://link.springer.com/article/10.1007/s40747-024-01601-1)
17. [Pareja, Aldo and colleagues (2020). EvolveGCN: Evolving Graph Convolutional Networks for Dynamic Graphs. AAAI Publications (The Association for the Advancement of Artificial Intelligence (AAAI)).](https://doi.org/10.1609/aaai.v34i04.5984)
18. [Rossi, Emanuele and colleagues (2020). Temporal Graph Networks for Deep Learning on Dynamic Graphs. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2006.10637)
19. [Wang, Xuhong and colleagues (2020). APAN: Asynchronous Propagation Attention Network for Real-time Temporal Graph Embedding. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2011.11545)
20. [lehaifeng/T-GCN (official code repository)](https://github.com/lehaifeng/t-gcn)
21. [Time-Series Forecasting using Dynamic Graphs: Case Studies with Dyn-STGCN and Dyn-GWN (KDD MILETS 2022)](https://kdd-milets.github.io/milets2022/papers/MILETS_2022_paper_3020.pdf)
22. [A Comprehensive Survey of Dynamic Graph Neural Networks (IEEE TKDE, Vol. 38, Issue 1, January 2026)](https://ieeexplore.ieee.org/document/11202740)
23. [A Temporal Directed Graph Convolution Network for Traffic Forecasting Using Taxi Trajectory Data (T-DGCN)](https://www.mdpi.com/2220-9964/10/9/624)
24. [Zhou, Hongkuan and colleagues (2022). TGL: A General Framework for Temporal GNN Training on Billion-Scale Graphs. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2203.14883)
25. [Graph WaveNet for Deep Spatial-Temporal Graph Modeling (IJCAI 2019)](https://www.ijcai.org/proceedings/2019/0264.pdf)
26. [UTG: Towards a Unified View of Snapshot and Event Based Models for Temporal Graphs (PMLR v269)](https://raw.githubusercontent.com/mlresearch/v269/main/assets/huang25a/huang25a.pdf)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Sep 30, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Neural networks and deep learning › Neural network architectures › Graph neural network architectures

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/temporal-graph-convolutional-network

English original: https://www.edgepedia.org/temporal-graph-convolutional-network
