Repository metrics
- Stars
- (19,985 stars)
- PR merge metrics
- (Avg merge 35d 1h) (14 merged PRs in 30d)
Description
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 deprecate TemporalData and move time handling to Data and HeteroData explicitly.
- Deprecate
TemporalData - Bring
data.timesupport toData/HeteroData:- Expose
timeas a property - Support
data.up_to(time) -> Dataanddata.snapshot(start_time, end_time) - Support
data.sort_by_time(or similar)
- Expose
- Convert all datasets that currently utilize
TemporalData - Support node-level training labels: This requires a data-structure for which we can query the label efficiently given a node ID and seed timestamp.
- Support
Data.update(data)/HeteroData.update(data)in order to add new incoming edges.
Open Questions:
- How do we represent changing node features over time?
Data Loading
With Data and HeteroData having time support, we can utilize PyG's data loaders to take care of temporal subgraph sampling. Importantly, NeighborLoader and LinkNeighborLoader have been already equipped with temporal sampling support.
- Deprecate
TemporalDataLoader - Support node-level/edge-level temporal sampling in
NeighborLoader - Support node-level/edge-level temporal sampling in
LinkNeighborLoader
Models
Currently, we only expose TGN as a temporal GNN model, which currently operates on TemporalData and its own sampler implementation.
- Re-factor
TGNto be able to operate onData/HeteroDatawhile utilizingNeighborLoader/LinkNeighborLoader - Re-factor
TGNto support multi-hop sampling (currently capped tonum_hops=1) - Finish our
GraphMixerimplementation (#8304)- Out-source
MLPMixerinGraphMixerinto anAggregationmodule
- Out-source
- Finish our
EdgeBankimplementation (#7966) - Add the
NATmodel
Examples and Tutorials
Afterwards, we need clear and descriptive examples and tutorials on how to leverage PyG for node-level and link-level temporal applications.
- An example of
GraphMixerfor temporal node-level predictions on TGB dataset - An example of
EdgeBankfor temporal link-level predictions on TGB dataset - A tutorial on PyG's temporal GNN support
Advanced 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.