Berlin Tech Meetup: The Future of Relational Foundation Models, Systems, and Real-World Applications

Register now:
PyG/Guide8 min read

Inductive Learning: GNNs That Generalize to Unseen Nodes and Graphs

Inductive GNNs learn a parameterized function that can compute embeddings for any node based on its features and local neighborhood. This is what makes GNNs deployable in production where new data arrives continuously.

PyTorch Geometric

TL;DR

  • 1Inductive learning means the GNN can predict on nodes and graphs not seen during training. It learns a general embedding function, not fixed per-node embeddings.
  • 2All parameterized GNN layers (GCNConv, GATConv, SAGEConv) are inherently inductive. They apply learned weight matrices to node features and neighborhood structure. GraphSAGE was explicitly designed for this setting.
  • 3Critical for production: enterprise databases change constantly. New customers, new transactions, new products. Inductive models handle this without retraining.
  • 4The model applies the same learned weights to new nodes' neighborhoods at inference time. A new customer gets an embedding immediately by aggregating their first few transactions.
  • 5KumoRFM is a foundation model that takes inductive learning further: it generalizes across entirely different relational databases, not just new nodes in the same graph.

Inductive learning in graph neural networks means the model learns a parameterized function that can compute embeddings for nodes or graphs not present during training, enabling real-time predictions on continuously evolving data. Unlike transductive approaches that learn fixed embeddings for specific nodes, inductive GNNs learn weight matrices that transform any node's features based on its local neighborhood structure. When a new node appears, the model applies the same learned function to compute its embedding on the fly.

Why it matters for enterprise data

Enterprise databases are not static. Every day:

  • New customers register and place their first orders
  • Existing customers create new transactions
  • New products are added to the catalog
  • New support tickets, claims, and interactions appear

A transductive model trained on Monday's graph cannot predict on Tuesday's new customers without retraining. An inductive model can. As soon as a new customer places their first order, the model aggregates their order features and produces an embedding. The customer gets a churn prediction, fraud score, or product recommendation immediately.

This is not optional for production. Any enterprise ML system that touches relational data must handle new entities. Inductive learning makes this architecturally guaranteed rather than requiring engineering workarounds.

How inductive learning works

An inductive GNN learns two things during training:

  1. Weight matrices (W) that transform node features
  2. Aggregation strategy (how to combine neighbor information)

At inference on a new node:

  1. Sample or collect the new node's neighbors
  2. Apply the learned weight matrices to neighbor features
  3. Aggregate using the learned strategy
  4. Produce the node embedding
inductive_inference.py
import torch
from torch_geometric.nn import SAGEConv
from torch_geometric.loader import NeighborLoader

class InductiveGNN(torch.nn.Module):
    def __init__(self, in_dim, hidden_dim, out_dim):
        super().__init__()
        self.conv1 = SAGEConv(in_dim, hidden_dim)
        self.conv2 = SAGEConv(hidden_dim, out_dim)

    def forward(self, x, edge_index):
        x = self.conv1(x, edge_index).relu()
        return self.conv2(x, edge_index)

# Train on existing graph
model = InductiveGNN(16, 64, 7)
# ... training loop on data_train ...

# New customer appears with 3 orders
# Just add them to the graph and run inference
new_data = add_new_customer(existing_graph, new_customer_features,
                             new_order_edges)
loader = NeighborLoader(new_data, num_neighbors=[10, 10],
                        input_nodes=new_customer_idx)
for batch in loader:
    pred = model(batch.x, batch.edge_index)
    # pred[0] = new customer's embedding/prediction

GraphSAGE (SAGEConv) is the canonical inductive GNN. NeighborLoader samples local neighborhoods for scalable inference on new nodes.

Concrete example: real-time fraud scoring for new accounts

A bank processes 10,000 new account openings per day. Each new account:

  • Has features: [age, income, device_fingerprint, application_channel]
  • Connects to existing entities: shared device with other accounts, shared IP address, shared phone number

An inductive GNN trained on historical fraud patterns:

  1. Takes the new account's features
  2. Aggregates features from accounts sharing the same device/IP/phone
  3. Produces a fraud probability within milliseconds
  4. No retraining needed, even though this account never existed in training data

Limitations and what comes next

  1. Cold start: New nodes with no connections have no neighbors to aggregate. Their embedding is based solely on their own features, losing the graph advantage. This improves as the node accumulates connections.
  2. Feature schema must match: The new node must have the same feature dimensions as training nodes. If the feature schema changes, the model needs updating.
  3. Distribution shift: If new nodes have fundamentally different feature distributions than training nodes (e.g., a new market segment), the learned function may not transfer well.

Foundation models like KumoRFM push inductive learning further by generalizing across different relational database schemas, achieving 76.71 zero-shot AUROC on unseen RelBench tasks.

Frequently asked questions

What is inductive learning in GNNs?

Inductive learning means the GNN can generate embeddings and make predictions for nodes or graphs that were not present during training. The model learns a general function (parameterized by neural network weights) that computes embeddings from local neighborhood structure. At inference time, this function can be applied to any new node with features and neighbors, even in entirely new graphs.

How is inductive learning different from transductive learning in GNNs?

Transductive learning requires the entire graph (including test nodes) to be present during training. The model learns fixed embeddings for specific nodes. Inductive learning learns a parameterized function that can compute embeddings for any node based on its features and local structure. Inductive models generalize to new nodes; transductive models cannot.

Which GNN layers support inductive learning?

All parameterized GNN layers (GCNConv, GATConv, SAGEConv, GINConv) are inherently inductive because they learn weight matrices applied to node features, not fixed per-node embeddings. GraphSAGE was explicitly designed for inductive settings with neighbor sampling. Methods like node2vec and DeepWalk are transductive because they learn fixed per-node embeddings.

Why does inductive learning matter for enterprise production systems?

Enterprise databases change constantly. New customers sign up, new transactions occur, new products are added. A transductive model would need to be retrained every time the graph changes. An inductive model can immediately compute embeddings for new entities by aggregating their neighbors' features, enabling real-time predictions without retraining.

Can inductive GNNs work on entirely new graphs?

Yes, if the new graph has the same feature schema. A GNN trained on one company's customer-order-product graph can potentially be applied to another company's graph with the same node/edge types and features. This is the foundation of transfer learning in GNNs and is how foundation models like KumoRFM work across different relational databases.

Learn more about graph ML

PyTorch Geometric is the open-source foundation for graph neural networks. Explore more layers, concepts, and production patterns.