Closed jasperzhong closed 2 years ago
论文基本没讲什么东西..
说了下他们采用的数据结构是discrete temporal snapshot. 节点数量要求不能变. 考虑了三种情况
看样子他这里的说的signal,应该是node features.
3.2.1说了他们提供了一个Spatiotemporal Signal Iterator
的接口. 每次迭代这个iterator返回一个graph snapshot.
具体例子
没太懂为啥用edge_index和edge_attr作为模型输入. 得看代码.
另外paper提到了incremental和Cumulative两种训练方式. 害,前者就是每个snapshot就更新一次模型,后者是每个epoch遍历完了整个dataset再更新一次模型. 后者对显存要求更高,而且从实验效果来看,效果也不好. 如下图中的Wikipedia数据集.
https://pytorch-geometric-temporal.readthedocs.io/en/latest/notes/introduction.html
https://github.com/benedekrozemberczki/pytorch_geometric_temporal
每个snapshot就是一个pytorch_geometric.data.Data
,包括
data.x
: Node feature matrix with shape [num_nodes, num_node_features]data.edge_index
: Graph connectivity in COO format with shape [2, num_edges] and type torch.longdata.edge_attr
: Edge feature matrix with shape [num_edges, num_edge_features]data.y
: Target to train against (may have arbitrary shape), e.g., node-level targets of shape [num_nodes, ] or graph-level targets of shape [1, ]
https://arxiv.org/pdf/2104.07788.pdf