2. Graph representation of industrial systems
Before any graph neural network can localize a fault, the plant itself must be translated into a graph. This translation is not a neutral preprocessing step — it is a modeling decision that determines what the GNN can and cannot learn. A poor graph representation will silently cap localization accuracy no matter how deep or well-tuned the model becomes. This section establishes a disciplined mapping from physical industrial assets to graph elements, and shows how process topology constrains the edges you are allowed to draw.
From Physical Assets to Graph Elements
The core mapping is straightforward in principle: physical components become nodes, and physical or logical connections between them become edges. In practice, the granularity of that mapping is the first real decision. Consider a simplified water treatment loop with a feed pump, a storage tank, a heat exchanger, a control valve, and a discharge line. You could model the entire pump as one node, or split it into motor, impeller, and bearing nodes. Finer granularity gives the GNN more spatial resolution for localization but demands more sensors and produces a larger, sparser graph that is harder to train on limited fault data.
A practical rule: node granularity should match the smallest replaceable or independently diagnosable unit. If maintenance replaces a bearing separately from the motor, the bearing deserves its own node. If a valve is always serviced as a unit, keep it as one node.
Nodes carry two categories of information:
- Static attributes — asset type (pump, valve, tank, sensor), nominal operating range, manufacturer, installation date, and physical location. These are fixed and typically encoded as categorical or normalized numeric features.
- Dynamic features — the time-series measurements associated with that node at each timestep: pressure, temperature, flow rate, vibration RMS, valve position, motor current. These form the node feature matrix
X ∈ ℝ^(N×F), whereNis the number of nodes andFthe number of measured channels per node.
Sensors and Actuators Are Not Ordinary Nodes
A common modeling error is to treat sensors and actuators as interchangeable with process equipment. They are not, and conflating them degrades fault localization in a specific way: a sensor fault and a process fault can produce identical measurement patterns, but they require completely different maintenance responses.
The cleanest approach is to separate the physical process graph from the instrumentation graph:
- Process nodes represent the material and energy domain — tanks, pipes, pumps, heat exchangers. Edges between them represent physical flow of mass or energy, and are directed along the flow direction.
- Sensor nodes are attached to a process node by a monitoring edge. A sensor does not participate in flow; it observes. Its feature vector is the measurement it produces.
- Actuator nodes (control valves, variable-frequency drives, heaters) are attached to a process node by a control edge. Their feature vector is the commanded setpoint plus the realized position or output, and the discrepancy between the two is itself a powerful fault indicator.
This separation lets the GNN learn distinct message-passing behaviors: flow edges propagate physical disturbances, while monitoring and control edges propagate information and commands. A stuck valve, for example, shows up as a persistent gap between commanded and realized position on a control edge, while the downstream pressure anomaly propagates along flow edges.
Process Topology and Edge Semantics
Edges are where most of the engineering knowledge lives. In industrial systems, edges are rarely homogeneous. A realistic graph typically contains several edge types, and a GNN that ignores edge type will blur physically distinct relationships. The table below summarizes the edge taxonomy used throughout this course.
| Edge type | Connects | Direction | Physical meaning |
|---|---|---|---|
| Flow (hydraulic) | Process → Process | Directed, along flow | Mass transport; pressure and flow propagate downstream |
| Thermal | Process → Process | Directed or undirected | Heat conduction, convection, or radiation coupling |
| Monitoring | Sensor → Process | Sensor to asset | Measurement attachment; defines observability |
| Control | Actuator → Process | Actuator to asset | Commanded manipulation of a process variable |
| Signal / data | Sensor → Controller | Directed | Control loop wiring and communication links |
Direction matters for fault propagation. In a feed-forward line, a pump degradation propagates downstream to the heat exchanger and the discharge valve, but not upstream to the feed tank. If you draw undirected edges everywhere, the GNN must learn direction from data alone, which is sample-inefficient and often wrong under distribution shift. Encode known direction explicitly.
Building the Graph: A Worked Example
Consider a cooling circuit with the following assets and instruments:
P1— circulation pump (process node)HX1— plate heat exchanger (process node)V1— control valve on the bypass line (actuator node)FT1— flow transmitter downstream of P1 (sensor node)TT1— temperature transmitter at HX1 outlet (sensor node)PT1— pressure transmitter at HX1 inlet (sensor node)
The resulting graph has six nodes and the following edges:
# Edge list (source, target, type)
P1 -> HX1 : flow
HX1 -> V1 : flow
V1 -> P1 : flow # bypass return
FT1 -> P1 : monitoring
PT1 -> HX1 : monitoring
TT1 -> HX1 : monitoring
V1 -> HX1 : control # valve modulates HX1 bypass
In PyTorch Geometric, this becomes an edge_index tensor of shape [2, E] plus an edge_type vector. Node features are stacked in a fixed channel order, for example [pressure, temperature, flow, vibration_rms, valve_position], with missing channels masked rather than zero-filled — zero-filling a missing pressure reading is indistinguishable from a genuine zero-pressure fault.
Adjacency, Normalization, and Physical Consistency
Once edges are defined, the adjacency matrix A encodes connectivity. For message passing, normalize it to prevent high-degree nodes (such as a central header or manifold) from dominating aggregation:
A_hat = D^(-1/2) * (A + I) * D^(-1/2)
where D is the degree matrix and I adds self-loops so each node retains its own features. For multi-type graphs, compute a separate normalized adjacency per edge type and aggregate with type-specific weight matrices.
Two consistency checks are worth performing before training:
- Reachability check — verify that every process node is reachable from at least one sensor through monitoring edges. An unobserved node cannot be localized, only guessed.
- Directional sanity check — confirm that flow edges follow the P&ID (piping and instrumentation diagram) flow direction. A reversed edge will invert the learned propagation and produce systematically wrong upstream/downstream attributions.
The figure below summarizes how physical assets, instruments, and topology combine into a typed graph ready for GNN input.
Practical Takeaways
Three principles should guide every industrial graph construction:
- Separate process, sensor, and actuator nodes. They carry different semantics and different fault signatures. Collapsing them destroys diagnostic resolution.
- Type your edges and respect direction. Flow, monitoring, and control edges propagate information differently. Encode this explicitly rather than hoping the model infers it.
- Validate observability and direction before training. A reachability check and a P&ID direction audit catch the two most damaging structural errors early, when they are cheap to fix.
With a well-constructed typed graph in hand, the next step is to define how features flow across it — the message-passing mechanism that turns this static structure into a fault-localization engine.