The norm, not the labels: training and evaluating finite-element surrogates for stress analysis in the energy norm
Authors: Ruifeng Cao, Xidan Song
Organizations: School of Engineering, The University of Manchester, Oxford Road, Manchester, M13 9PL, United Kingdom · School of Computer Science, Wuhan University, 299 Bayi Road, Wuchang District, Wuhan, 430072, China
Finite-element surrogates predict the stresses of a new design in one evaluation, but are usually trained on solutions with a displacement loss and compared by it, although engineering decisions rest on stresses. Application in engineering: stress analysis of perforated plates and solids with cavities, parametric families in which holes concentrate stress. Contribution to artificial intelligence: training and evaluating such surrogates in the energy norm, with or without solutions, and screening their predictions without solutions. For linear elastostatics, minimising the assembled discrete potential energy is exactly supervised regression in this norm: the energy gap of a prediction is the strain energy of its stress error. A displacement loss under-weights the stiff modes that carry the strains. In pre-registered comparisons, changing only the norm of the supervised loss cut a three-dimensional transformer's median energy-norm error 7.5-fold and its median von Mises error 6.1-fold; in two dimensions it more than halved the von Mises error, also on held-out instances. In three dimensions, the transformer trained on the energy alone came within a factor of 1.3 of the energy-norm-supervised one in median energy-norm and von Mises error. It was more accurate than the displacement-supervised one on all five metrics in every seed. Given the stiffness matrix, a Ritz projection was more accurate than the label-free transformer, in the seed means, on every metric but peak stress. No network transferred to a substantially finer mesh. The energy ranks predictions of a load case, and its sign flags those worse than the zero field.
Figures & tables
Figure 1: The norm of the loss against the labels, in three dimensions (left) and two (right). The same transformer is trained on the solutions of 1,024 instances with the relative displacement error (top left) or the relative energy-norm error (bottom left), and on their energy without the solutions (bottom right). Label-free training also changes the weighting of the load cases and the learning rate ( Section 6 ); a displacement loss needs the solutions (top right). Each cell: relative energy-norm and von Mises errors, medians over the 256 validation instances averaged over three seeds.
Model
Displacement error
Relative energy gap
von Mises error
Peak stress error
Critical-region recall
Worse than zero field
Label-free
0.0300 ± 0.0028
0.00912 ± 0.00228
0.0554 ± 0.0045
0.0807 ± 0.0134
0.793 ± 0.022
0/768
Supervised, displacement
0.0470 ± 0.0038
31.2 ± 53.5
0.370 ± 0.140
0.784 ± 0.807
0.619 ± 0.005
18/768
Supervised, displacement + energy term
0.0470 ± 0.0122
0.116 ± 0.050
0.128 ± 0.008
0.115 ± 0.026
0.730 ± 0.006
2/768
Supervised, energy norm
0.0227 ± 0.0022
0.00504 ± 0.00022
0.0440 ± 0.0014
0.0386 ± 0.0011
0.858 ± 0.001
0/768
Graph network, displacement
0.0168 ± 0.0001
0.447 ± 0.084
0.296 ± 0.010
0.488 ± 0.011
0.679 ± 0.009
28/768
Nearest-neighbour field
0.382
1.22
0.717
1.23
0.509
88/256
Table 1: Three-dimensional solids: every metric on the 256 validation instances, four load cases each, for the networks trained on 1,024 instances (the label-free transformer on the same instances without their solutions) and for the baselines. Trained networks: mean ± sample standard deviation over three seeds. Metrics as in Section 4.4 ; lower is better except in critical-region recall.
Model
Displacement error
Relative energy gap
von Mises error
Peak stress error
Critical-region recall
Worse than zero field
Label-free
0.0634 ± 0.0031
0.0383 ± 0.0019
0.123 ± 0.002
0.128 ± 0.001
0.753 ± 0.001
0/768
Supervised, displacement
0.0505 ± 0.0023
0.133 ± 0.014
0.235 ± 0.015
0.141 ± 0.007
0.668 ± 0.015
0/768
Supervised, energy norm
0.0547 ± 0.0094
0.0290 ± 0.0125
0.106 ± 0.020
0.0947 ± 0.0356
0.804 ± 0.055
0/768
Graph network, displacement
0.0499 ± 0.0003
0.825 ± 0.020
0.578 ± 0.009
0.321 ± 0.011
0.517 ± 0.006
187/768
Nearest-neighbour field
0.404
0.959
0.735
0.643
0.515
94/256
Scaled polynomial
1.42
873
11.4
30.8
0.159
256/256
Table 2: Two-dimensional plates: every metric on the 256 validation instances, four load cases each, for the networks trained on 1,024 instances (the label-free transformer on the same instances without their solutions) and for the baselines. Trained networks: mean ± sample standard deviation over three seeds. Metrics as in Section 4.4 ; lower is better except in critical-region recall.
Figure 2: Where the errors lie in the spectrum of the stiffness matrix (two dimensions, networks trained on 1,024 instances; post hoc). Left: normalised Rayleigh quotient ρ of the error against the relative displacement error δ , one point per seed, validation instance and load case; large markers: medians; dashed lines: equal relative energy gap g=ρδ2 . Right: median share of the error’s squared energy norm in the eigenmodes with λm/R(U∗) at or above the abscissa ( λm : eigenvalue; R(U∗) : the solution’s Rayleigh quotient); dashed curve: the solution’s share.
Figure 3: Seed-mean relative displacement error (top) and relative energy gap (bottom) of the supervised networks against the number of labelled training instances, in three dimensions (left) and two (right). Horizontal line: the label-free transformer, trained on the same 1,024 instances without their solutions.
Figure 4: Relative von Mises error against relative displacement error for every validation instance and seed (768 points per network): three dimensions, networks trained on 1,024 instances.
Figure 5: Validation instance No. 107, seed 0, under the downward body force: displacement magnitude (top) and von Mises stress (bottom) of the reference solution and of three networks trained on 1,024 instances, on the three visible faces of the box; one colour scale per row, set by the reference (values above its maximum saturate). Above each network: its relative displacement error δ , its relative energy gap g and the sign of its potential energy Πh(u) on this load case (positive: worse than the zero field, Corollary 3 ).
Figure 6: Distribution of the relative energy gap over the 768 validation instance-seed pairs, each the mean over the instance’s four load cases: networks trained on 1,024 instances, in three dimensions (left) and two (right). Markers: medians; right of the dashed line: worse than the zero field.
Claim
Statement
Validation
Holdout
Outcome
T1 (3D)
Label-free transformer better than the displacement-supervised transformer on all five metrics, each seed and the seed mean
20 of 20
20 of 20
replicated
T2 (3D)
Graph network: lower displacement error than the label-free transformer on most instances, each seed; higher von Mises error on at least 95% of the pairs
84.4%–92.6%; 99.9%
86.3%–95.8%; 100%
replicated
T3 (3D)
Load cases worse than the zero field, displacement-supervised transformer and graph network, each with a positive energy
126 and 106 of 3,072
340 and 237 of 8,232
replicated
H1 (2D)
Label-free below the displacement-supervised transformer in relative energy gap, beyond the guard
− 71.3% (guard 12.4%)
− 71.3% (guard 11.5%)
replicated
H2a (2D)
Energy-norm-supervised below the displacement-supervised transformer in relative energy gap, beyond the guard
− 78.2% (guard 16.4%)
− 42.9% (guard 47.4%)
not replicated
H2b (2D)
The same in von Mises error
− 54.9% (guard 12.3%)
− 52.8% (guard 12.9%)
replicated
Table 3: The claims of the comparisons that the pre-registered holdout evaluation read again on the held-out instances ( Section 8 ), with the same stored networks and as its adjudicator recorded them, beside their values on the validation instances. T1 and D2: comparisons that hold, five metrics in each seed and in the seed mean; T2: the range of the shares over the seeds, then the share of the instance-seed pairs; H1 to H3: the relative difference rel and its noise guard ( A ).
2D
3D
3D, fine mesh
Instances (load cases)
32 (128)
32 (128)
8 (32)
Nodes, median
562
4,960
38,156
Surrogate, first call
3.2 ms
49 ms
2.15 s
Surrogate, repeated call
2.4 ms
49 ms
2.16 s
Sparse direct solve
3.8 ms
1.22 s
133 s
CG from the zero field
28 ms
1.72 s
26.1 s
Table 4: Wall time per instance of the label-free transformer’s inference, on one GPU, and of solves of the same systems on the same machine’s CPU, all load cases together and without the assembly, with the surrogate’s accuracy. CG: unpreconditioned conjugate gradients; its iterations (from the zero field / to the prediction’s accuracy) and its displacement error are medians over the load cases, the other times and errors medians over the instances. c∗ : energy-optimal amplitude ( 14 ). Protocol in supplementary Section S10.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Run
Criterion
Measured
Outcome
July run (2D), 16 July 2026
K5: conjugate gradients from the prediction of a label-free network (64 validation instances) save < 20% of the iterations from zero
− 0.9%
triggered
Three-dimensional comparison, 28 September 2026
G2 (a), budgets ≥ 64 (amendment): displacement-supervised transformer with the energy term at least 3 times better than the zero field in displacement, and better than both naive baselines
3.9 / 12.0 / 21.3 times; naive beaten
met
G2 (a), every budget (the registered form, reported for reference)
2.71 times at 16 labels
not met
G2 (b): label-free displacement error within +10% of the displacement-supervised transformer’s at 1,024 labels, and relative energy-gap advantage ≥ 40% at every budget
− 36.3%; 99.95% / 99.85% / 98.86% / 99.97%
met
G2 (c): finer mesh, zero-shot displacement error ≤ 1.25 times in-band, and better than both naive baselines
8.62 times; best naive 0.401 against 0.258
not met
Gate G2 = (a) and ((b) or (c)), amended
GO
Appendix
Table 1: The pre-registered claims of the comparisons reported in this paper, with the outcomes that the code recorded at the time.
Supervised training of finite-element (FE) surrogate models requires reference solutions, and each reference solution is obtained by solving the system that the surrogate is intended to replace. The assembled discrete potential energy provides a training signal that requires no reference solution. This note records, with proofs, the identities that make this signal exact for linear elastostatics: the difference between the energy of a prediction and the energy of the reference solution equals one half of the squared stiffness-norm error, and the gradient of the energy equals the stiffness-weighted error. Label-free discrete-energy minimisation and supervised regression in the stiffness norm therefore have the same unique minimiser and identical gradients at every point. Around this central result, the note states a conditioning lemma that bounds the displacement error by the energy gap, a modewise contraction identity that explains why the Euclidean displacement error is an unsuitable primary metric, the Chebyshev bound that governs conjugate-gradient post-processing of surrogate predictions, and a conditional latent-separation proposition for joint-embedding predictive architecture (JEPA) pretraining on a shared stiffness operator, with an explicit numerical counterexample that delimits its scope. Every claim with numeric content is implemented as an executable falsification check; the checks were executed twice, on synthetic test problems and on a probe set of 16 instances from the validation split of a pre-registered experimental run, and every inequality holds, with the measured tightness reported. A closing section explains why the construction does not extend to elastodynamics through direct minimisation of the action functional, and which time-discrete formulation restores exactness.
Ruifeng Cao, Xidan Song
The University of Manchester · The University of Manchester, Manchester, United Kingdom · Wuhan University +1
Finite element analysis (FEA) is essential for structural design but remains computationally expensive, particularly when evaluating multiple design iterations or load scenarios. Machine learning surrogate models offer a promising alternative, yet most approaches struggle with a critical limitation: generalizing across varying geometries. This work presents a mesh graph network (MGN) for predicting von Mises stress fields in 2D structural components with arbitrary hole geometries. Unlike traditional machine learning approaches that use absolute node coordinates as features, the proposed model builds on existing MGN frameworks that encode node types (e.g., fixed boundary, free surface, hole edge), relative edge features (distance between neighbors), and global features (applied load). This architecture is inherently translation- and rotation-invariant, enabling generalization to unseen geometries without retraining. The MGN was trained on 11 plate geometries under 20 load conditions and evaluated on 7 unseen geometries and 3 unseen loads. In the most favorable case, the model achieves R2≥0.97 on an unseen geometry and unseen load, compared to R2≈0.01--0.86 for conventional models (Random Forest, Gradient Boosting , K-Nearest Neighbors) trained on identical data. However, even in less favorable cases, the MGN model still outperforms conventional models. This work extends the mesh-based simulation framework of Pfaff et al. (arXiv:2010.03409) to structural mechanics, demonstrating that graph neural networks can serve as efficient surrogates for finite element analysis across varying geometries.
Josiah D. Kunz, Kamal Choudhary
Illinois College, Jacksonville, IL, USA · Department of Materials Science and Engineering, Whiting School of Engineering, The Johns Hopkins University, Baltimore, MD 21218, USA
Accurate prediction of stress and strain fields in hierarchical composite microstructures is critical for physics-informed material design, yet conventional finite element method (FEM) simulations are computationally prohibitive at scale, requiring minutes to days per evaluation. In this work, we propose a hybrid UNet-Transformer architecture that predicts complex mechanical field distributions directly from composite microstructure geometry images, serving as an efficient surrogate for FEM across ten distinct stress and strain field types spanning diverse two-phase composite configurations including square, hexagonal, and triangular tessellations, multiple boundary conditions, and high-resolution geometries. Results demonstrate that the proposed architecture achieves strong predictive performance across the majority of subdatasets, with peak accuracy on periodic tessellation geometries reaching R2=0.9991, SSIM=0.9936, and MAE=0.0050 on the boundary condition subdataset and the triangular tessellation subdataset respectively. Across six of the eight evaluated subdatasets, MAE remains below 0.05 on the normalized [0,1] pixel scale. Encoder attention analysis via Grad-CAM and Grad-CAM++ confirms that the model develops physically meaningful internal representations, localizing attention at mechanically critical regions including phase boundaries, ligament junctions, and indenter contact zones without explicit structural supervision. Performance degrades on irregular square-grid geometries with sparse soft-phase inclusions, with the S11 normal stress subdataset yielding R2=0.7735 and SSIM=0.7126, consistent with the known limitation of smooth-loss image translation models in reproducing sharp stress discontinuities.
Shrey Patel
University of Maryland-College Park United States of America