liveBook · Manning

Chapter 9: Machine learning on knowledge graphs: A primer approach

What you will learn in chapter 9 of Knowledge Graphs and LLMs in Action

The introduction explains why machine learning on knowledge graphs matters for intelligent advisory systems: it can use integrated graph knowledge to provide insights beyond ordinary querying and navigation.

After this chapter you will be able to

Section by section

Introduction

The introduction explains why machine learning on knowledge graphs matters for intelligent advisory systems: it can use integrated graph knowledge to provide insights beyond ordinary querying and navigation.

Key terms: knowledge graphs, holistic knowledge, advanced analytics, intelligent advisory systems, advising, machine learning, knowledge in the graphs

9.1 Machine learning on graphs: Why?

The section explains why graph-based machine learning can be a good fit for connected data and graph-shaped problems, and how GNNs and LLMs can complement each other.

Key terms: graphs, data representation, problem modeling, node classification, relationship prediction, data item dependency, independent and identically distributed, relationships, GNNs, LLMs

9.2 Machine learning on graphs: What?

This section explains why graph ML tasks are grouped by whether each data point is a node or relationship in one graph, or an entire graph, rather than only by whether labels are available.

Key terms: node-focused tasks, graph-focused tasks, data points, supervised, unsupervised, labels

9.2.1 Node classification

This section defines node classification, explains why graph relationships matter when predicting node labels, and clarifies its semisupervised and multilabel forms.

Key terms: node classification, unlabeled node, training set of nodes, label, i.i.d. assumption, node attributes, network relationships, homophily, structural equivalence, heterophily

9.2.2 Link prediction (a.k.a. relationship prediction)

This section explains what link prediction seeks to infer, why graph edges may be missing, and how existing connections and node information can support predictions.

Key terms: link prediction, co-authorship graph, nodes, edges, missing edges, evolving graphs, relationship prediction, graph completion, relational inference, semisupervised learning

9.2.3 Clustering and community detection

This section explains how community detection finds groups from graph relationships, why those groups help summarize a network, and how graph clustering differs from traditional clustering.

Key terms: community detection, graph clustering, network topology, relationships, graph description, summarization, densely connected regions, traditional clustering, K-means, DBSCAN

9.2.4 Graph classification

This section explains how whole graphs can be classified or clustered, using molecules, proteins, and programs as examples.

Key terms: graph classification, node classification, labeled graphs, i.i.d. data point, graph clustering, internal structure, features, components

9.3 Machine learning on graphs: How?

Introduces two ways to apply machine learning to graphs: use graph-specific algorithms or convert graph structure into features for conventional ML.

Key terms: collective classification, graph structure, feature vectors, feature engineering, node features, neighborhood relationships

9.3.1 Node classification and link prediction

This section walks through a karate-club node classification example to show how graph features feed a classifier and why domain-informed features can outperform simple or automatically learned representations.

Key terms: featurization, training, prediction model, node classification, link prediction, Zachary Karate Club, ground-truth labels, friendship network structure, degree, Node2Vec

9.3.2 Graph classification

This section outlines how graph classification uses whole-graph features to train a model and classify previously unlabeled graphs.

Key terms: graph classification, feature engineering, prediction phase, unclassified graphs, feature extraction, accuracy, downstream algorithm parameters

9.3.3 Graph clustering

Graph clustering finds communities directly from a graph without feature extraction or a training phase, and the section illustrates the result on a karate club network.

Key terms: graph clustering, feature extraction, representation transformation, unsupervised approach, weakly connected component (WCC), Louvain, label propagation algorithm (LPA), modularity, karate club graph, communities

9.4 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 8: NED with open LLMs and domain ontologies Chapter 10: Graph feature engineering: Manual and semiautomated approaches →

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.