question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Roadmap] Temporal Graph Support 🚀

See original GitHub issue
  • Let torch_geometric.data.TemporalData inherit from torch_geometric.data.BaseData
  • Add documentation to TemporalData
  • Make TemporalData work with torch_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 a torch_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:open
  • Created 2 years ago
  • Comments:42 (42 by maintainers)

github_iconTop GitHub Comments

2reactions
otaviocxcommented, Aug 18, 2022

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 call ContinuousTemporalData. We also planned a TemporalData.snapshot(start=None, end=None) which appears to be similar to the at method you suggested. Furthermore, I would say that the planned Data.to_temporal(time_attr='time') method will cover the need of the to_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.

What’s the meaning of each data object in this list? (i) A graph where edges occurred until now? (ii) Or a graph where edges occurred at present? For (i), it is less flexible if someone wants to get the edges occurred between start and end. For (ii), it is inconvenient for users who want to get a graph snapshot.

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:

it is less flexible if someone wants to get the edges occurred between start and end.

There are two options here:

  • Someone needs the steps of the DTDG graph between steps start and end. In this case, it can be done by an slice of the array of snapshots.
  • Someone needs a single graph with all the nodes and edges from instant start to instant end. 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 the end instant, without the edges (and orphan nodes) of the start instant. Am I right?

Someone can also merge the steps (using their on merge strategy) creating a TemporalData object (or a Data object and then using Data.to_temporal) and getting the needed graph by using the TemporalData.snapshot(start=None, end=None) method. Makes sense?

2reactions
otaviocxcommented, Jan 16, 2022

I wasn’t aware of https://pytorch-geometric-temporal.readthedocs.io/en/latest/index.html earlier - Is it fair to say we want to bring most of this functionality inside of pytorch geometric?

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).

sorry for the delay in sending the PRs

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 a split 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 and HeteroData as a param (Union[List[Data], List[HeteroData]] or Union[Data, HeteroData]). I’m refactoring where is needed to BaseData.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found