Open rusty1s opened 3 years ago
Thanks @rusty1s!
I can update the TemporalData
class in torch_geometric/data/temporal.py
and submit a pull request?
(Unless there's already some work on this but I am not aware of any at the moment).
Sounds wonderful, thank you!
Done!
Thanks, @SalvishGoomanee!
Could you please link the PR?
Yes here it is: https://github.com/pyg-team/pytorch_geometric/pull/7573
@rusty1s Support for temporal GNN layers and models (including examples) would like to work on thsi if anyone is not working!
Cool :) We are currently targeting to provide better support for "Temporal Graph Benchmark (TGB)" in PyG, but no ones has started to work on this yet.
Cool :) We are currently targeting to provide better support for "Temporal Graph Benchmark (TGB)" in PyG, but no ones has started to work on this yet.
Okay Would Work on this from Monday! I know how to code it.. would you just tell me where I can Exactly Put the code? locations of the file. which files to edit?
I'm working on merging TemporalData
with Data
/HeteroData
. Draft PR available here: #8454
For now, when dealing with CTDG, is it ok to use TemporalData
, TemporalDataLoader
, and TGN
?
Or do you recommend using Data
instead of TemporalData
?
We are very slowly migrating away from TemporalData
to a world where Data
is also the preferred choice of class to represent temporal graphs. For now, however, you are ok with using TemporalData
.
Updated on Nov 27th.
This is a roadmap towards better temporal data and temporal GNN support in PyG (targeted for v2.5), which spans across data handling, data loading, models and examples.
Data Handling
Previously, we used
TemporalData
as our abstraction to represent temporal graphs. However, this data structure is limited, i.e. it can only hold a stream of events, it mixes homogeneous and heterogeneous data, it cannot naturally deal with node features, etc. As such, we want to deprecateTemporalData
and move time handling toData
andHeteroData
explicitly.TemporalData
data.time
support toData
/HeteroData
:time
as a propertydata.up_to(time) -> Data
anddata.snapshot(start_time, end_time)
data.sort_by_time
(or similar)TemporalData
Data.update(data)
/HeteroData.update(data)
in order to add new incoming edges.Open Questions:
Data Loading
With
Data
andHeteroData
having time support, we can utilize PyG's data loaders to take care of temporal subgraph sampling. Importantly,NeighborLoader
andLinkNeighborLoader
have been already equipped with temporal sampling support.TemporalDataLoader
NeighborLoader
LinkNeighborLoader
Models
Currently, we only expose
TGN
as a temporal GNN model, which currently operates onTemporalData
and its own sampler implementation.TGN
to be able to operate onData
/HeteroData
while utilizingNeighborLoader
/LinkNeighborLoader
TGN
to support multi-hop sampling (currently capped tonum_hops=1
)GraphMixer
implementation (#8304)MLPMixer
inGraphMixer
into anAggregation
moduleEdgeBank
implementation (#7966)NAT
modelExamples and Tutorials
Afterwards, we need clear and descriptive examples and tutorials on how to leverage PyG for node-level and link-level temporal applications.
GraphMixer
for temporal node-level predictions on TGB datasetEdgeBank
for temporal link-level predictions on TGB datasetAdvanced Features
One current limitation of most temporal GNN models is that they learn an embedding per node, which gets updated over time. However, it is not necessarily scalable to keep this embedding on the GPU due to memory constraints. As such, advanced features may include data-structures to query and train these embeddings on CPU, with efficient asynchronous device transfers to avoid host2device/device2host bottlenecks. An example of such a data-structure may be inspired by the GNNAutoScale paper.