GATConv is a PyTorch Geometric graph-attention layer that replaces equal-weight neighborhood aggregation with learned attention scores, helping a GNN emphasize more relevant node messages. section 4.4 section 4.5.1
A practical GATConv workflow typically follows this pipeline:
- Apply GATConv to node features and edge_index so neighboring contributions receive attention-based weights. section 4.4 section 4.5.1
- Use multiple heads in hidden layers to focus on different aspects of node representations; use one output head when producing one representation per node. section 4.4.1
- Use NeighborLoader mini-batches when attention over all edges creates memory or scalability pressure. section 4.4.1 section 4.6
PyG architecture
A two-layer model can initialize GATConv(data.num_node_features, hidden_layers, heads, dropout=dropout_p), normalize hidden_layers*heads outputs, and finish with GATConv(hidden_layers * heads, 1, dropout=dropout_p). The resulting sigmoid output supports fraud-versus-legitimate node classification. section 4.6
