liveBook · Manning

Transductive learning

As explained in Graph Neural Networks in Action

A transductive embedding method directly learns representations for nodes in a fixed graph and does not naturally generalize to unseen nodes or graphs.

Transductive learning is useful when the graph you want to analyze is known and relatively stable. A transductive embedding method learns a representation for each node in that fixed graph, using its structure during training. The resulting vectors can become inputs to classification, recommendation, or clustering tasks. section 2.4.2 section 2.1.4

Node2Vec (N2V) shows the workflow:

  • Start with the graph’s nodes and edges. Their connections provide the context for learning, so check that the graph represents the relationships relevant to the task. section 2.1.4
  • Simulate walks through the graph to capture which nodes occur near one another, then learn a dense vector for each node in the training graph. section 2.1.4 section 2.4.2
  • Use those vectors as features for a downstream task. Because the method optimized representations for known nodes rather than learning a general embedding function, a new node cannot naturally receive an embedding without retraining. section 2.1.4 section 2.4.2

Choosing between a fixed and a changing graph

In a political-books co-purchase graph, N2V embeddings could help predict a known book’s political leaning or recommend related books. For community detection in a social network, a transductive method can exploit the available graph, including labeled and unlabeled nodes. Incoming-email spam detection is a poor fit: retraining for each new batch would be impractical. section 2.1.4 section 2.4.2

The trade-off is specificity versus adaptability. Access to the complete, stable graph lets transductive methods capture detailed relationships, and random-walk methods can work from graph structure without additional node features. But they are costly at large scale and do not naturally extend to unseen nodes or graphs. Inductive methods such as GraphSAGE and other graph neural networks instead learn from features and local structure to generate embeddings for new data. N2V extensions can also support inductive settings, so the distinction describes the method’s learning approach, not an absolute limit on every variant. section 2.1.4 section 2.4.2 section 2.2

Table 2.5 Different methods of graph representation
Representation
Description
Examples
Basic data representations
• Great for analytical methods that involve network traversal
• Useful for some node classification algorithms
• Information provided: Node and edge neighbors
• Adjacency list
• Edge list
• Adjacency matrix
Transductive (shallow) embeddings
• Useless for data not trained on
• Difficult to scale
• DeepWalk
• N2V
• TransE
• RESCAL
• Graph factorization
• Spectral techniques
Inductive embeddings
• Models can be generalized to new and structurally different graphs
• Represents data as vectors in continuous space
• Learns a mapping from data (new and old) to positions within the continuous space
• GNNs can be used to inductively generate embeddings
• Transformers
• N2V with feature concatenation

Compare transductive embeddings with basic graph representations and inductive embeddings when deciding whether unseen data and scaling matter. section 2.4.2

How Graph Neural Networks in Action covers it

How deep it goes
Defines per-node optimization and full-graph training, then explains retraining and scaling trade-offs without deriving the optimization.
Examples
Uses political-books recommendations, social-network community detection, and incoming-email spam detection to illustrate suitable and unsuitable settings.
What it assumes
Introduces graph proximity and embeddings before comparing learning methods; assumes no specific node features for random-walk embeddings.
What you can do after
Evaluate/understand when fixed-graph embeddings fit a task and when unseen nodes favor an inductive method.
How it connects
Contrasts Node2Vec and DeepWalk with inductive graph neural networks, including GraphSAGE, through random walks, node features, and generalization.

Also explained in

Compare how 3 books explain transductive learning →

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.