Graph Neural Networks
GINet layer
Graph Interaction Networks layer
This layer is inspired by Sazan Mahbub et al. “EGAT: Edge Aggregated Graph Attention Networks and Transfer Learning Improve Protein-Protein Interaction Site Prediction”, BioRxiv 2020
Create edges feature by concatenating node feature
\[e_{ij} = LeakyReLu (a_{ij} * [W * x_i || W * x_j])\]
Apply softmax function, in order to learn to consider or ignore some neighboring nodes
\[\alpha_{ij} = softmax(e_{ij})\]
Sum over the nodes (no averaging here)
\[z_i = \sum_j (\alpha_{ij} * Wx_j + b_i)\]
Herein, we add the edge feature to the step 1)
\[e_{ij} = LeakyReLu (a_{ij} * [W * x_i || W * x_j || We * edge_{attr} ])\]
-
class deeprank_gnn.ginet.GINetConvLayer(*args: Any, **kwargs: Any)[source]
-
reset_parameters()[source]
-
forward(x, edge_index, edge_attr)[source]
-
class deeprank_gnn.ginet.GINet(*args: Any, **kwargs: Any)[source]
-
forward(data)[source]
Fout Net layer
This layer is described by eq. (1) of “Protein Interface Predition using Graph Convolutional Network”, by Alex Fout et al. NIPS 2018
\[z = x_i * Wc + 1 / Ni Sum_j x_j * Wn + b\]
-
class deeprank_gnn.foutnet.FoutLayer(*args: Any, **kwargs: Any)[source]
This layer is described by eq. (1) of
Protein Interface Predition using Graph Convolutional Network
by Alex Fout et al. NIPS 2018
- Parameters
in_channels (int) – Size of each input sample.
out_channels (int) – Size of each output sample.
bias (bool, optional) – If set to False
, the layer will not learn
an additive bias. (default: True
)
-
reset_parameters()[source]
-
forward(x, edge_index)[source]
-
class deeprank_gnn.foutnet.FoutNet(*args: Any, **kwargs: Any)[source]
-
forward(data)[source]
sGraphAttention (sGAT) layer
This is a new layer that is similar to the graph attention network but simpler
\[z_i = 1 / Ni Sum_j a_ij * [x_i || x_j] * W + b_i\]
|| is the concatenation operator: [1,2,3] || [4,5,6] = [1,2,3,4,5,6] Ni is the number of neighbor of node i Sum_j runs over the neighbors of node i \(a_ij\) is the edge attribute between node i and j