How to incorporate DGL in sequential models?

Maybe this has been already asked and answered. If that’s the case, I’d appreciate if you can point me in the right direction :slightly_smiling_face:

I have sequential data where each element of the sequence is a graph. I would like to create a representation of the graphs using the RGCN model and feed those representations to an LSTM or a transformer model at each time step. Is this possible with DGL and any pointers on how?


I think LSTM and transformer are quite different. Can you elaborate a bit? A transformer is in fact a graph neural network over a complete graph.

I can imagine a pipeline as follows:

  1. Use RGCN to update node representations.
  2. Optionally, you may want to compute graph-level representations out of node representations, which can be done using readout functions here.
  3. Use LSTM to update node/graph representations.

Absolutely right. LSTM and transformer are quite different.

I have a sequence of graphs (for example, each graph could represent multiple financial transactions by an individual…and we have a sequence of these, at day1, day2 etc). Each graph is different and may contain different types of transactions and actions. Hence why RGCN. So, what I would like to do is to create a graph level representation of each of the graph. Then feed that representation to an LSTM to create a representation of the history of transactions.

Then it sounds like the pipeline I proposed is exactly what you want. Do you have any further questions?

that’s pretty cool. Thank you!