nn
Module for neural network architectures implemented in PathPyG.
DBGNN
¶
Implementation of the time-aware graph neural network DBGNN for time-resolved data on dynamic graph.
The De Bruijn Graph Neural Network (DBGNN) is a time-aware graph neural network architecture designed for dynamic graphs that captures temporal-topological patterns through causal walks — temporally ordered sequences that represent how nodes influence each other over time. The architecture uses multiple layers of higher-order De Bruijn graphs for message passing, where nodes represent walks of increasing length, enabling the model to learn non-Markovian patterns in the causal topology of dynamic graphs.
Reference
Proposed by Qarkaxhija, Perri, and Scholtes at the first Learning on Graphs Conference (LoG) in 20221. The paper can be found here.
-
Qarkaxhija, L., Perri, V. & Scholtes, I. De Bruijn Goes Neural: Causality-Aware Graph Neural Networks for Time Series Data on Dynamic Graphs. in LoG vol. 198 51 (PMLR, 2022). ↩
Source code in src/pathpyG/nn/dbgnn.py
__init__
¶
Initialize the DBGNN model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_classes
|
int
|
Number of classes for the classification task |
required |
num_features
|
tuple[int, int]
|
Number of features for first order and higher order nodes, i.e. |
required |
hidden_dims
|
list[int]
|
Number of hidden dimensions per layer in the both GNN parts (first-order and higher-order) |
required |
p_dropout
|
float
|
Drop-out probability for the dropout layers. |
0.0
|
Source code in src/pathpyG/nn/dbgnn.py
forward
¶
Forward pass of the DBGNN.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
torch_geometric.data.Data
|
Input data object containing the graph structure and node features. |
required |