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

Register now:
PyG/Use Case11 min read

Supplier Risk: GNN on Bill-of-Materials Graphs

Supply chain disruptions cost the average Fortune 500 company $184M annually. Direct supplier monitoring catches surface-level risks. Here is how to build a GNN that maps multi-tier dependencies and surfaces hidden vulnerabilities.

PyTorch Geometric

TL;DR

  • 1Supply chain risk is a graph propagation problem. Disruptions at Tier-3 suppliers cascade through the BOM graph to affect finished products. GNNs propagate risk signals through these multi-tier dependencies.
  • 2SAGEConv on the supplier-component-product graph aggregates financial health, geographic risk, and structural vulnerability into a unified risk score per supplier and product.
  • 3On RelBench benchmarks, GNNs achieve 75.83 AUROC vs 62.44 for flat-table LightGBM. Multi-tier dependency analysis accounts for the improvement.
  • 4The PyG model is ~35 lines, but production supply chain systems need ERP integration, real-time risk monitoring, and scenario planning capabilities.
  • 5KumoRFM predicts supplier risk with one PQL query (76.71 AUROC zero-shot), automatically mapping multi-tier dependencies from your supply chain data.

The business problem

McKinsey research shows that supply chain disruptions cost the average Fortune 500 company $184 million annually. The global semiconductor shortage, Suez Canal blockage, and pandemic-era supply chain failures demonstrated that most companies have poor visibility into their multi-tier supply networks. They know their direct (Tier-1) suppliers but not the Tier-2 and Tier-3 dependencies that create hidden single points of failure.

Why flat ML fails

  • No multi-tier visibility: Flat models assess each supplier independently. They cannot see that Supplier A and Supplier B both depend on the same Tier-2 raw material provider, creating a hidden concentration risk.
  • No cascade modeling: A disruption at a critical Tier-3 supplier can halt production of hundreds of finished products. Flat models assess direct supplier risk, not the cascading impact through the BOM hierarchy.
  • Alternative supplier blindness: Risk depends on whether alternatives exist. A single-source component is critical; a commodity with 5 qualified suppliers is not. The graph captures this structural context.
  • Geographic concentration: Multiple suppliers in the same geographic region share disaster risk. The graph reveals this concentration even when suppliers appear independent at the surface level.

The relational schema

schema.txt
Node types:
  Product   (id, category, revenue_impact, lead_time)
  Component (id, type, criticality, alt_source_count)
  Supplier  (id, country, financial_score, quality_rating)
  Region    (id, disaster_risk, political_risk, logistics_score)

Edge types:
  Product   --[contains]-->    Component (quantity, substitutable)
  Component --[supplied_by]--> Supplier  (lead_time, cost)
  Supplier  --[located_in]-->  Region
  Supplier  --[depends_on]-->  Supplier  (material_type)

The BOM hierarchy (product-contains-component) combined with supplier dependencies creates a multi-tier risk graph.

PyG architecture: SAGEConv for risk propagation

supplier_risk_model.py
import torch
import torch.nn.functional as F
from torch_geometric.nn import SAGEConv, HeteroConv, Linear

class SupplierRiskGNN(torch.nn.Module):
    def __init__(self, hidden_dim=64):
        super().__init__()
        self.product_lin = Linear(-1, hidden_dim)
        self.component_lin = Linear(-1, hidden_dim)
        self.supplier_lin = Linear(-1, hidden_dim)
        self.region_lin = Linear(-1, hidden_dim)

        # 3 layers for multi-tier propagation
        self.convs = torch.nn.ModuleList()
        for _ in range(3):
            conv = HeteroConv({
                ('product', 'contains', 'component'): SAGEConv(
                    hidden_dim, hidden_dim),
                ('component', 'supplied_by', 'supplier'): SAGEConv(
                    hidden_dim, hidden_dim),
                ('supplier', 'located_in', 'region'): SAGEConv(
                    hidden_dim, hidden_dim),
                ('supplier', 'depends_on', 'supplier'): SAGEConv(
                    hidden_dim, hidden_dim),
            }, aggr='sum')
            self.convs.append(conv)

        self.risk_head = torch.nn.Sequential(
            Linear(hidden_dim, 32),
            torch.nn.ReLU(),
            Linear(32, 1),
        )

    def forward(self, x_dict, edge_index_dict):
        x_dict['product'] = self.product_lin(x_dict['product'])
        x_dict['component'] = self.component_lin(
            x_dict['component'])
        x_dict['supplier'] = self.supplier_lin(x_dict['supplier'])
        x_dict['region'] = self.region_lin(x_dict['region'])

        for conv in self.convs:
            x_dict = {k: F.relu(v) for k, v in
                      conv(x_dict, edge_index_dict).items()}

        # Risk score per supplier
        return torch.sigmoid(
            self.risk_head(x_dict['supplier']).squeeze(-1))

3-layer SAGEConv propagates risk through multi-tier dependencies. Geographic risk from regions flows to suppliers, then through the BOM hierarchy to products.

Expected performance

  • Supplier scorecard (heuristic): ~55 AUROC
  • LightGBM (flat-table): 62.44 AUROC
  • GNN (3-layer SAGEConv): 75.83 AUROC
  • KumoRFM (zero-shot): 76.71 AUROC

Or use KumoRFM in one line

KumoRFM PQL
PREDICT disruption_risk FOR supplier
USING supplier, component, product, region, purchase_order

One PQL query. KumoRFM maps multi-tier dependencies, propagates geographic and financial risk signals, and scores each supplier.

Frequently asked questions

Why are GNNs effective for supply chain risk assessment?

Supply chains are deeply nested graphs: your Tier-1 supplier depends on Tier-2 suppliers, who depend on Tier-3 raw material providers. A disruption at Tier-3 can cascade through the network and halt your production. GNNs propagate risk signals through these multi-tier dependencies, surfacing hidden vulnerabilities that direct-supplier analysis misses.

What is a BOM graph?

A Bill of Materials (BOM) graph represents the component hierarchy of manufactured products. Nodes are products, components, and raw materials. Edges represent 'contains' or 'requires' relationships with quantity information. Combined with supplier assignments, it shows exactly which suppliers affect which products.

How do you quantify supplier risk in a graph?

Combine supplier-level features (financial health, geographic risk, lead time variability) with network position features (number of dependent products, alternative supplier availability, BOM criticality). The GNN aggregates both: a financially weak supplier in a critical, single-source position is higher risk than one with healthy alternatives.

Can GNNs predict supply chain disruptions before they happen?

GNNs can identify structural vulnerabilities (single points of failure, geographic concentration) and combine them with temporal signals (declining quality metrics, increasing lead times). This predictive combination identifies at-risk supply chains before actual disruptions occur.

How does KumoRFM handle supply chain risk?

KumoRFM takes your supply chain tables (suppliers, components, BOMs, purchase orders) and predicts disruption risk with one PQL query. It automatically maps the multi-tier dependency graph and propagates risk signals through the supply chain network.

Learn more about graph ML

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