3. Message passing and graph convolutional operators
In crash deformation prediction, the finite element (FE) model is naturally a graph: shell and solid elements become nodes, and structural connectivity becomes edges. Each node carries geometric and material features (initial coordinates, thickness, yield stress, section type) and, at inference time, must output a scalar or vector describing its residual deformation — displacement magnitude, plastic strain, or a displacement vector in the vehicle coordinate frame. The operator that turns local neighborhoods into node-level regression targets is the message-passing layer. This section compares the three operators most commonly used for that job — GCN, GraphSAGE, and GAT — at the level of their exact formulations, their inductive biases for deformation fields, and their practical behavior on crash graphs.
3.1 The shared message-passing skeleton
All three operators fit the same generic update rule. For node i with feature vector h_i^(l) at layer l, and neighbor set N(i):
m_i^(l) = AGG_{j ∈ N(i)} M( h_i^(l), h_j^(l), e_ij )
h_i^(l+1) = U( h_i^(l), m_i^(l) )
The operators differ in the message function M, the aggregation AGG, and whether edge weights are learned. For deformation regression, the readout is a per-node linear head: ŷ_i = W_out · h_i^(L) + b, where ŷ_i ∈ R^3 is the predicted displacement vector. Because the target is per-node, no graph-level pooling is used; the loss is typically a masked MSE over nodes with valid ground truth (crash simulations often leave rigid-body or constrained nodes without meaningful deformation labels).
3.2 GCN: symmetric normalized propagation
Graph Convolutional Networks (Kipf & Welling, 2017) use a first-order spectral approximation that reduces to a symmetric normalized adjacency propagation:
H^(l+1) = σ( D̃^(-1/2) Ã D̃^(-1/2) H^(l) W^(l) )
à = A + I, D̃_ii = Σ_j Ã_ij
The self-loop I ensures a node retains its own features; the degree normalization prevents high-degree nodes (e.g., nodes at the B-pillar-to-rocker junction, which may have 8–12 neighbors) from dominating the update. For deformation regression, GCN's fixed, non-learned weights are both a strength and a limitation. The strength: the operator is parameter-efficient and stable, which matters when labeled crash simulations are scarce. The limitation: the normalized aggregation is isotropic — every neighbor contributes according to degree, not according to its mechanical relevance. A node on a bending-dominated rocker receives the same weighting scheme as a node in a membrane-dominated panel, even though the deformation transfer differs. GCN therefore tends to over-smooth displacement fields across stiff-to-soft transitions, producing blurred hinge lines.
3.3 GraphSAGE: sampling and learned aggregation
GraphSAGE (Hamilton et al., 2017) replaces fixed normalization with a learned aggregator and, critically, supports inductive sampling:
h_N(i)^(l) = AGG_{j ∈ S(i)} h_j^(l) # S(i) ⊆ N(i), |S(i)| = k
h_i^(l+1) = σ( W^(l) · [ h_i^(l) ‖ h_N(i)^(l) ] )
where ‖ denotes concatenation and AGG may be mean, max-pooling, or an LSTM. Two properties make GraphSAGE attractive for crash graphs. First, the concatenation of self and neighborhood features preserves the node's own state explicitly, which helps when a node's deformation is dominated by its local geometry rather than its neighbors. Second, neighbor sampling with fixed fan-out k bounds computation per node, which is essential when a full vehicle model has 1–3 million elements and full-batch GCN propagation would exceed GPU memory. In practice, k = 10–25 with two-hop sampling is a reasonable starting point for a 1.5M-node model. The max-pooling aggregator is often preferred for deformation because it preserves peak values — a neighbor with large plastic strain should not be averaged away.
3.4 GAT: attention-weighted neighborhoods
Graph Attention Networks (Veličković et al., 2018) learn per-edge attention coefficients:
e_ij = LeakyReLU( a^T · [ W h_i ‖ W h_j ] )
α_ij = softmax_j( e_ij ) over j ∈ N(i) ∪ {i}
h_i^(l+1) = σ( Σ_j α_ij · W h_j^(l) )
For deformation regression, attention is the most physically expressive of the three: the coefficient α_ij can learn to up-weight neighbors that lie along the load path (e.g., along a longitudinal rail during frontal impact) and down-weight neighbors across a spot-weld interface that transmits little bending. Multi-head attention (typically 4–8 heads) lets different heads specialize — one head may capture membrane continuity, another hinge-line rotation. The cost is parameter count and sensitivity to initialization; on small crash datasets, GAT overfits more readily than GCN and requires dropout on attention coefficients (0.1–0.3) and weight decay.
3.5 Choosing an operator for deformation regression
The three operators are not interchangeable, and the choice should follow the data regime and the physical structure of the target field. The table below summarizes the decision-relevant differences; the "typical use" column reflects common practice in crash-ML literature and is a starting heuristic, not a rule.
| Property | GCN | GraphSAGE | GAT |
|---|---|---|---|
| Edge weights | Fixed (degree-normalized) | Fixed (aggregator-defined) | Learned per edge |
| Self-feature handling | Via self-loop in à | Explicit concatenation | Via self-attention term |
| Inductive / large graphs | Full-batch, memory-bound | Sampling, bounded cost | Full or sampled, attention cost |
| Parameters per layer | Lowest | Moderate | Highest (multi-head) |
| Over-smoothing risk | High | Moderate | Lower (anisotropic) |
| Typical use in crash ML | Baseline, small datasets | Large FE models, inductive transfer | Load-path-sensitive fields |
A practical default for a first deformation model is a two-layer GraphSAGE with mean or max-pooling aggregation and fan-out k = 15, because it trains on million-node graphs without custom batching and its concatenation preserves the node's own geometric state. GAT is the better second iteration when validation error shows systematic under-prediction along hinge lines — a symptom that the model is averaging across mechanically distinct neighbors. GCN is best kept as a fast baseline to confirm the pipeline (graph construction, feature normalization, masked loss) is correct before adding capacity.
3.6 A minimal implementation check
The following PyTorch Geometric snippet shows the three operators side by side for a node-level regression head. It is a structural template, not a trained result; the layer widths and dropout are starting values to be tuned.
import torch
import torch.nn.functional as F
from torch_geometric.nn import GCNConv, SAGEConv, GATConv
class DeformNet(torch.nn.Module):
def __init__(self, in_dim, hidden=64, out_dim=3, kind="sage", heads=4):
super().__init__()
if kind == "gcn":
self.c1 = GCNConv(in_dim, hidden)
self.c2 = GCNConv(hidden, hidden)
elif kind == "sage":
self.c1 = SAGEConv(in_dim, hidden, aggr="max")
self.c2 = SAGEConv(hidden, hidden, aggr="max")
elif kind == "gat":
self.c1 = GATConv(in_dim, hidden // heads, heads=heads, dropout=0.2)
self.c2 = GATConv(hidden, hidden, heads=1, concat=False, dropout=0.2)
self.head = torch.nn.Linear(hidden, out_dim)
def forward(self, x, edge_index):
x = F.relu(self.c1(x, edge_index))
x = F.dropout(x, p=0.1, training=self.training)
x = F.relu(self.c2(x, edge_index))
return self.head(x) # shape: [num_nodes, 3]
# masked MSE over nodes with valid deformation labels
def masked_mse(pred, target, mask):
return F.mse_loss(pred[mask], target[mask])
Two implementation details matter for correctness. First, feature normalization must be computed on the training split only and applied identically at inference; crash features such as thickness and yield stress differ by orders of magnitude, and unnormalized inputs cause GAT attention logits to saturate. Second, the mask must exclude constrained and rigid-body nodes, otherwise the model learns to predict near-zero displacement everywhere and the validation loss looks deceptively low while hinge-line error remains large. A useful diagnostic is to report mean absolute error separately on nodes with target displacement above and below 5 mm; a model that performs well only on the low-displacement subset is under-fitting the deformation field regardless of its aggregate loss.