[Roadmap] Temporal Graph Support 🚀
See original GitHub issue- Let
torch_geometric.data.TemporalData
inherit fromtorch_geometric.data.BaseData
- Add documentation to
TemporalData
-
MakeTemporalData
work withtorch_geometric.data.DataLoader
(https://github.com/pyg-team/pytorch_geometric/pull/2625) -
TemporalLoader
for creating time-dependent mini-batches - Snapshot capabilities:
TemporalData.snapshot(start=None, end=None)
produces atorch_geometric.data.Data
object that represents the graph as a static snapshot - Allow conversion from
Data
objects to a stream of events/TemporalData
format based on a given temporal property, e.g.:Data.to_temporal(time_attr='time')
-
TemporalData.update(...)
for allowing incremental updates - Support for temporal GNN layers and models (including examples)
Issue Analytics
- State:
- Created 2 years ago
- Comments:42 (42 by maintainers)
Top Results From Across the Web
An Effective Graph Learning based Approach for Temporal ...
The WSDM Cup 2022 seeks for solutions that predict the existence probabilities of edges within time spans over temporal graph. This paper ...
Read more >The Graph R&D Roadmap - The Graph Blog
The Graph Client is a dedicated tool to make it easier to build dapps with subgraphs by wrapping and abstracting all operations supported...
Read more >Temporal Graph Networks | Memgraph Docs
Temporal Graph Networks. Description. The temporal_graph_networks (TGNs) are a type of graph neural network (GNN) for dynamic graphs.
Read more >TGL: A general framework for temporal GNN training on billion ...
Temporal Graph Neural Networks capture temporal information as well as ... create technical roadmaps, and drive production level projects that will support ......
Read more >Algorithms for optimal min hop and foremost paths in interval ...
Min hop paths problem in a temporal graph is the problem of finding time respecting paths from ... The roadmap of this paper...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi folks! Sorry for the absence last months.
@EdisonLeeeee thanks for your contributions! I would say that after the PRs #3867 and #3985, the
TemporalData
class is almost what you callContinuousTemporalData
. We also planned aTemporalData.snapshot(start=None, end=None)
which appears to be similar to theat
method you suggested. Furthermore, I would say that the plannedData.to_temporal(time_attr='time')
method will cover the need of theto_continuous()
one. Wdyt?I would say that one of the main contributions of the implementation of this task is to easily convert between continuous and discrete graph representations. To convert to a continuous graph, we require a
time
attribute. In the other hand, to convert from a continuous graph to a discrete, we need to take snapshots of the graph on each step.When representing a discrete graph as a list of graphs, I would say it is more trivial to think of a list of snapshots (scenario (i) in your description). It avoids the complications regarding nodes and edges removal and updates. I was checking some DTDG datasets, and it seems they are always using snapshots. Thus, it guides us to the limitation you’ve mentioned:
There are two options here:
start
andend
. In this case, it can be done by anslice
of the array of snapshots.start
to instantend
. It is not so common to have this need in DTDG models and different strategies of merging may be requested depending on the problem (how to deal with nodes and edges removal and updates or missing nodes/edges, for instance). In most cases, I would say the resulting graph will be the one in theend
instant, without the edges (and orphan nodes) of thestart
instant. Am I right?Someone can also merge the steps (using their on merge strategy) creating a
TemporalData
object (or aData
object and then usingData.to_temporal
) and getting the needed graph by using theTemporalData.snapshot(start=None, end=None)
method. Makes sense?Hi @Padarn, I would say that here we will have a more generic approach and elements in a way that
pytorch-geometric-temporal
or other derivated libs can take advantage of. But, it is better to confirm with the maintainers (@rusty1s, for instance).Hi @rusty1s, I’ve created the first PR with items 1 and 2 of the Roadmap. Item 3 will need some refactoring in the
JODIEDataset
and other classes. This dataset seems to be not supporting the DataLoader yet (we need to deal with the data param in the model since there is no train/val/test dataset split). I’m thinking to refactor this dataset to have asplit
param in its constructor turning possible to have 3 (train/val/test) DataLoaders in the model example file.Also, some classes (such as the DataLoader) expects an Union of
Data
andHeteroData
as a param (Union[List[Data], List[HeteroData]]
orUnion[Data, HeteroData]
). I’m refactoring where is needed toBaseData
.