A convolutional layer applies shared learned weights to neighboring feature representations, preserving structural relationships while producing more useful representations. In graph neural networks, graph convolutional networks use this operation to combine node features with local graph structure, supporting inductive embedding of unseen nodes or graphs. section 11.3.1
A graph convolutional layer is used to:
- Generate node embeddings from features and edge structure. section 11.3.1
- Stack transformations with activation and dropout between layers. section 11.3.1
- Support classification by mapping learned node representations to class outputs. section 11.3.1
Two-layer GCN
A PyTorch Geometric model uses GCNConv to transform input node features into 16 hidden features, applies ReLU and dropout, then maps them to the dataset’s class count. Training uses Adam for 200 epochs on the Cora dataset. section 11.3.1
class GCN(torch.nn.Module):
def __init__(self):
super(GCN, self).__init__()
self.conv1 = GCNConv(dataset.num_node_features, 16)
self.conv2 = GCNConv(16, dataset.num_classes)
self.dropout = torch.nn.Dropout(0.5)
def forward(self, data):
x, edge_index = data.x, data.edge_index
x = self.conv1(x, edge_index)
x = F.relu(x)
x = F.dropout(x, training=self.training)
x = self.conv2(x, edge_index)
return x
Inspect the compact GCN definition showing convolutional layers, activation, dropout, node features, and edge indices. section 11.3.1













