A graph isomorphism network (GIN) is a graph neural network architecture for learning from molecular or protein graphs. It repeatedly sums neighboring node features, combines that sum with the node’s own features, and applies a multilayer perceptron (MLP). Sum aggregation preserves more structural information than mean aggregation, while the learned ε parameter controls the contribution of the node’s existing features. section 11.4 section 11.5.4
A GIN-based prediction workflow typically follows these steps:
- Represent molecules or proteins as graphs with node features, edge connectivity, and optional edge features. section 11.4
- Pass neighborhood information through several GINConv layers so each node captures progressively larger chemical or structural contexts. section 11.4 section 11.5.4
- Use the resulting graph representations in a dual-graph neural network for drug-target affinity prediction, then compare GIN with GCN and GAT variants. section 11.5.4 section 11.6
mol_nn1 = nn.Sequential(
nn.Linear(num_features_mol, num_features_mol),
nn.ReLU(),
nn.Linear(num_features_mol, num_features_mol)
)
self.mol_conv1 = GINConv(mol_nn1)A compact PyTorch definition shows how an MLP is supplied to GINConv, making the architecture directly implementable. section 11.5.4
