liveBook · Manning

Node classification

As explained in Graph Neural Networks in Action

Node classification is a graph-learning task that assigns labels or categories to individual nodes.

Node classification assigns one of several labels to each graph node. An end-to-end graph neural network learns node embeddings and class predictions together rather than treating embeddings as fixed inputs. section 2.3.3

A practical implementation follows this pipeline:

  • Prepare the graph for PyTorch Geometric, optionally initializing node features randomly or with Node2Vec embeddings. section 2.3.3
  • Pass node features through graph convolutional layers, then apply log softmax to produce a class distribution for every node. section 2.3.3

Feature and depth comparison

On the books_gml three-label task, a four-layer GNN with Node2Vec features reaches 88.99% accuracy and an 89.29% F1 score, outperforming the randomized-feature variants.

How Graph Neural Networks in Action covers it

How deep it goes
Implements preprocessing, architecture changes, masked training, and performance comparison, but does not derive the underlying optimization mathematically.
Examples
Uses the books_gml dataset, randomized or Node2Vec features, two- and four-layer GNNs, and a masked training loop.
What it assumes
Assumes familiarity with graph data, node features, embeddings, supervised labels, and basic neural-network training.
What you can do after
Build it from scratch with PyTorch Geometric using graph convolutions, log softmax outputs, training masks, and iterative optimization.
How it connects
Connects graph neural networks, node embeddings, Node2Vec, graph convolutional networks, and random forest classification.

Also explained in

Compare how 2 books explain node classification →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Neural Networks in Action. The section links point to the parts of the book it draws on.