Node classification
Node classification is a graph-learning task that predicts one or more discrete category labels for individual nodes in a graph.
Knowledge Graphs and LLMs in Action
Node classification is a graph-learning task that predicts one or more labels for each node from labeled examples and graph information.
- How it is used
- Uses graph structure and labeled nodes to support identification and decision-making in connected domains such as social networks and financial crime detection.
- How deep it goes
- Explains task formulation, feature engineering, train-validation-test masking, classifier and GNN pipelines, and metric-based evaluation.
- Examples
- Demonstrates bot detection, protein-function and document-topic classification, Karate Club affiliation, and anti-money-laundering detection.
- What you can do after
- Build it from scratch with NetworkX, Node2Vec, scikit-learn classifiers, or PyTorch Geometric GNNs, then evaluate predictions with classification metrics.
Read how Knowledge Graphs and LLMs in Action explains node classification →
Graph Neural Networks in Action
Node classification is a graph-learning task that assigns labels or categories to individual nodes.
- How it is used
- Applies graph neural networks to predict labels for individual nodes in a three-label classification problem.
- 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 you can do after
- Build it from scratch with PyTorch Geometric using graph convolutions, log softmax outputs, training masks, and iterative optimization.
Read how Graph Neural Networks in Action explains node classification →
Related concepts
- graph neural networkused by · A graph neural network is a neural-network model that learns representations or predictions from graph-structured data by combining information from connected entities.
- vectorizationused by · Vectorization is the representation of data or computations as vectors or arrays so they can be processed numerically or collectively.
- graph attention networkaddressed by · A graph attention network is a graph neural network that uses attention weights to aggregate information from neighboring nodes, allowing their contributions to differ.
- signaluses · A signal is an observable value, event, or pattern that conveys information about a condition, state, or phenomenon.
- semi-supervised learninguses · Semi-supervised learning is a machine-learning approach that trains models using both labeled and unlabeled data.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

