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 →
Also covered in
- Fight Fraud with Machine LearningIn early access (MEAP)
- Graph Algorithms for Data Science
- Machine Learning Algorithms in Depth
What to know first
- convolutional neural networkA convolutional neural network is a neural-network architecture that processes structured inputs with convolutional operations, typically using learned local filters to capture patterns.
- f-scoreAn F-score is a classification metric that combines precision and recall through a weighted harmonic mean; F1 weights them equally.
- classifierA classifier is a predictive model that assigns an input to one or more discrete classes or categories.
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.
- 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.
- semi-supervised learninguses · Semi-supervised learning is a machine-learning approach that trains models using both labeled and unlabeled data.
- signaluses · A signal is an observable value, pattern, event, or attribute that conveys information about a condition, behavior, or phenomenon.
- vectorizationused by · Vectorization is the transformation of data or computations into vector form so they can be processed collectively by vector-oriented operations.
Questions about node classification
What is node classification?
Node classification is a graph-learning task that predicts one or more discrete category labels for individual nodes in a graph.
Which Manning books explain node classification?
Knowledge Graphs and LLMs in Action and Graph Neural Networks in Action.
What should I know before learning node classification?
Manning books that teach node classification usually introduce convolutional neural network, f-score, social network and classifier first.
What is the difference between node classification and graph classification?
Node classification is a graph-learning task that predicts one or more discrete category labels for individual nodes in a graph. Graph classification is a machine-learning task that assigns a label or category to an entire graph.
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.

