4. Graph pooling and hierarchical architectures
Crash energy absorption is inherently a multi-scale phenomenon. At the component level, a thin-walled front rail folds into local plastic hinges; at the sub-assembly level, those folds interact with the bumper beam and the shotgun; at the vehicle level, the accumulated crush force determines the deceleration pulse transmitted to the occupant compartment. A flat graph neural network that operates on a single fixed mesh resolution can only see one of these scales at a time. Graph pooling solves this by learning coarsened graphs, so that a GNN can propagate information from fine finite-element nodes up through sub-assemblies to the full body-in-white. This chapter examines the three pooling families most relevant to crash modeling — DiffPool, TopK pooling, and edge pooling — and shows how to assemble them into a hierarchical surrogate that predicts energy absorption at multiple scales.
Why pooling is not optional for crash surrogates
A typical crash model discretized for a GNN surrogate contains 50,000–500,000 nodes. Message passing over that graph for 20–30 layers is both memory-bound and prone to over-smoothing: node embeddings converge, and the sharp strain gradients at fold initiators are washed out. Pooling addresses both problems. It reduces the node count geometrically, increases the receptive field per retained node, and — critically for crash — creates a hierarchy that mirrors the physical one: element → panel → sub-assembly → vehicle. The design question is not whether to pool, but how to pool without destroying the topological information that governs collapse mode.
Three properties matter when selecting a pooling operator for crash data:
- Differentiability. The assignment must be learnable end-to-end so that the network discovers which regions coarsen together, rather than relying on hand-defined part groupings.
- Topology preservation. Folding is a topological event; a pooling scheme that merges nodes across disconnected panels will fabricate spurious load paths.
- Feature fidelity. Energy absorption is computed from nodal forces and displacements, so pooled node features must remain interpretable as aggregated physical quantities, not arbitrary latent vectors.
DiffPool: soft assignment with a learned cluster matrix
DiffPool (Differentiable Pooling) learns a soft assignment matrix S at each layer. Given node features X and adjacency A, a GNN encoder produces embeddings Z, and a separate pooling GNN produces S = softmax(GNN_pool(A, X)) with shape N × K, where K is the number of clusters at the next level. The coarsened graph is then
X' = Sᵀ Z # (K × d) pooled features
A' = Sᵀ A S # (K × K) coarsened adjacency
L_aux = ‖A − S Sᵀ‖_F / N # link prediction auxiliary loss
The auxiliary loss is essential in practice. Without it, S collapses to a near-uniform matrix and every cluster becomes a global average, erasing the local fold pattern. In a crash surrogate, a useful configuration is K = 0.25N at the first pooling layer, then 0.5 of the previous level thereafter, with the auxiliary loss weighted at 0.1–0.3 of the total loss. DiffPool's strength is that it can express overlapping clusters — a node on the rail-to-bumper weld legitimately belongs to both the rail cluster and the bumper cluster — which matches how crash energy flows across joints. Its weakness is memory: the N × K assignment matrix and the Sᵀ A S product are dense, so DiffPool is typically applied only after an initial edge-convolution or GraphSAGE stage has reduced the graph to a few thousand nodes.
S. Rows with entropy near log K are unassigned; if more than ~15% of rows are in this state, increase the auxiliary loss weight or reduce the first-level K.TopK pooling: keep the nodes that carry the load
TopK pooling takes a different stance: instead of merging nodes, it selects the k nodes with the highest projected score and drops the rest. A learnable vector p scores each node as y = X p / ‖p‖; the top k indices are retained, and the adjacency is sliced accordingly. Because selection is a hard operation, gradients flow only through the retained nodes, which keeps the computation sparse and cheap.
For crash modeling, TopK has a natural physical reading: the retained nodes are the ones the network believes are structurally significant — fold initiators, spot-weld rows, gusset corners. This makes the pooled graph interpretable, and it is common to visualize the retained node set against the undeformed mesh as a sanity check. The risk is that TopK is non-injective: dropped nodes contribute nothing to the coarser representation, so a low-score region that later becomes a fold trigger is lost. A practical mitigation is to run TopK with a residual connection that adds the pre-pool features back to the pooled graph via a scatter operation, or to interleave TopK with a soft pooling layer so that no region is permanently discarded.
A reproducible example: take a front-rail sub-assembly mesh with 8,400 nodes and 24,900 edges. Apply two GraphSAGE layers (hidden width 64), then TopK with k = 2,100 (ratio 0.25), then two more GraphSAGE layers, then global mean pooling and an MLP head that regresses peak crush force and total absorbed energy. On a held-out set of 40 impact simulations, a well-tuned model of this shape typically reaches an R² of 0.90–0.95 on absorbed energy; if R² stalls below 0.85, the usual cause is that k is too small and the fold-initiation nodes are being dropped before the second message-passing block sees them.
Edge pooling: contracting the edges that matter
Edge pooling (EdgePool) scores edges rather than nodes and contracts the highest-scoring edges, merging their endpoint pairs into single nodes. Because contraction is defined on the graph structure itself, EdgePool preserves connectivity exactly: no node is dropped, and no spurious edge is created. This is attractive for crash meshes, where the connectivity graph encodes the load path through welds and adhesives, and where fabricating an edge between two panels that are not physically joined would produce a non-physical force path.
The EdgePool score for edge (i, j) is e_ij = σ(aᵀ[z_i ‖ z_j] + b), and edges are contracted greedily in descending score order, with each node participating in at most one contraction per layer. The pooled node feature is a weighted sum of the two endpoints. In practice, EdgePool is the best choice for the first pooling stage on a raw crash mesh, because it respects the weld topology and produces a coarsened graph whose edges still correspond to real structural connections. DiffPool and TopK are then applied at higher levels, where the graph has already been abstracted into sub-assembly clusters.
Assembling the hierarchy
The three operators are complementary, and the strongest crash surrogates use them in sequence rather than choosing one. The pipeline above reflects a configuration that has proven robust across front-rail and bumper sub-assemblies: EdgePool first, because it respects weld connectivity and halves the node count without discarding any region; TopK second, because by this point the network has enough context to identify fold initiators and can safely prune the rest; DiffPool last, because soft clustering is the right tool for merging sub-assemblies into vehicle-level clusters where overlap is physically meaningful. Each stage is followed by two message-passing layers, and the pooled features at every level are routed to a shared readout so that the final prediction head sees fine, medium, and coarse representations simultaneously.
Two implementation details determine whether this hierarchy trains. First, the auxiliary link-prediction loss from DiffPool must be scaled relative to the regression loss; a weight of 0.2 on the auxiliary term is a reasonable starting point, and it should be reduced if the pooled adjacency becomes too dense. Second, the TopK residual scatter must be applied before the next pooling stage, not after, otherwise the dropped-node information cannot influence the coarser assignment. A minimal PyTorch Geometric sketch of the TopK stage with residual scatter is shown below; the scatter call restores the pre-pool features to the retained nodes so that no region is permanently lost.
from torch_geometric.nn import TopKPooling, SAGEConv
import torch
class TopKBlock(torch.nn.Module):
def __init__(self, in_dim, ratio=0.25):
super().__init__()
self.conv1 = SAGEConv(in_dim, 64)
self.pool = TopKPooling(64, ratio=ratio)
self.conv2 = SAGEConv(64, 64)
def forward(self, x, edge_index, batch):
x = self.conv1(x, edge_index).relu()
x_res, edge_index, _, batch, perm, _ = self.pool(x, edge_index, None, batch)
x_res = x_res + x[perm] # residual scatter
x_out = self.conv2(x_res, edge_index).relu()
return x_out, edge_index, batch
Reading the results and diagnosing failures
Once the hierarchy is trained, the pooled graphs themselves become diagnostic objects. Plot the retained TopK nodes on the undeformed mesh: they should cluster around fold initiators, spot-weld rows, and gusset corners. If they scatter uniformly across flat panels, the scoring projection has not learned anything structural, and the usual fix is to increase the width of the pre-pooling message-passing layer or to add a node-level auxiliary loss that supervises the score with a curvature proxy. For DiffPool, inspect the cluster assignment matrix: clusters that span two physically disconnected panels indicate that the auxiliary link loss is too weak, and the coarsened adjacency will contain edges that do not correspond to real load paths. For EdgePool, verify that no contracted edge crosses a free boundary — if it does, the edge scorer is over-weighting geometric proximity and needs a feature channel that encodes connectivity type (weld, adhesive, free edge).
The practical payoff of hierarchical pooling is not just accuracy. Because each level of the hierarchy corresponds to a physical scale, the pooled representations can be inspected, compared across designs, and reused as features for downstream tasks such as gauge optimization or joint placement. A DiffPool cluster that consistently absorbs the largest share of energy is a direct signal about where material should be added — which is exactly the kind of design guidance a flat, single-resolution GNN cannot provide.