Hand-Crafted Laws as Priors: Constrained Kernel Corrections for Hyperelasticity

Engineers have long described how rubbery and soft materials resist deformation with short hand-written formulas such as Neo-Hookean or Mooney-Rivlin laws. These formulas are stable inside simulations and behave sensibly far outside the tested range, but they are too rigid to fit modern 3D-printed polymers and silicones. Neural networks fit these materials well, but only after careful architectural surgery to keep them physically admissible. We propose a middle path that fits small datasets. The hand-crafted law is kept as the baseline, and only its error is learned, using kernel regression: a method that fits a function as a weighted sum of similarity bumps centred on the data. Every physical requirement is written as a linear condition on that sum. Normalization (zero energy and zero stress in the undeformed state) and stability (energy convex and increasing in the strain measures) then become an equality-constrained quadratic or semidefinite program with a closed-form, certifiable solution.

The usual weakness of standard kernels becomes the main advantage here. A stationary kernel correction fades to zero away from the data. Its curvature fades with it, so far from the data the total model reduces to the hand-crafted law and inherits that law's growth and stability. The two other directions in this proposal enter as consequences. The kernel choice must move beyond the default Gaussian, because the guarantee needs a precisely controlled amount of smoothness. Input "feature scaling" turns out to be the same decision as the kernel's metric, and it should be set by the mechanics rather than by Min-Max or Z-score conventions.

Core Claim

A strain energy written as a calibrated analytical law plus a kernel residual has three properties. Normalization and stress-freeness at the reference state are imposed exactly. Monotonicity and convexity in the invariants are imposed at collocation points with a margin, and that margin certifies them on a whole box. Outside the box the model reverts to the analytical law. Sample by sample, such a model should match physics-augmented neural networks on held-out deformation modes and on finite element stability, while needing fewer stress-strain curves and providing calibrated uncertainty. The specific novelties are the margin-based certificate and the use of stationarity for extrapolation, not kernel regression of stress curves as such.

Concretely, let $x = (I_1, I_2, J)$ be the strain invariants of the right Cauchy-Green tensor and its determinant, as used by Neural networks meet hyperelasticity: A guide to enforcing physics. The energy model is

$$\psi(x) = \psi_0(x;\theta) + r(x), \qquad r \in \mathcal{H}_k,$$

where $\psi_0$ is a hand-calibrated law with parameters $\theta$ and $r$ lies in the space of functions generated by kernel $k$. Stress data are derivatives of $\psi$ pushed through the chain rule, so each measurement is a linear functional of $r$. Each physical condition at a collocation point is also linear: nonnegative $\partial\psi/\partial I_1$ and $\partial\psi/\partial I_2$, and either a positive semidefinite Hessian in $x$ (the polyconvex variant) or monotonicity in the isochoric invariants alone (the relaxed variant of Neural networks meet hyperelasticity: A monotonic approach). Stress-freeness at the identity state is the single linear equality $\psi_{,1} + 2\psi_{,2} + \psi_{,J}/2 = 0$ at $x_0 = (3,3,1)$, together with $\psi(x_0) = 0$. A representer argument then places the solution in the span of kernel derivatives at the data and collocation points, which makes it a finite convex program.

The certificate works as follows. If the kernel's space embeds into functions with Lipschitz second derivatives, an RKHS-norm bound on $r$ bounds that Lipschitz constant $L$. Enforcing each convexity constraint with margin $L h$, where $h$ is the collocation spacing, then guarantees the constraint everywhere on the box. For Matérn kernels of smoothness $\nu$, the space is a Sobolev space of order $\nu + d/2$ and embeds in $C^3$ when $\nu > 3$. Matérn-7/2 therefore suffices. The Gaussian kernel also suffices, but its extreme smoothness makes the norm-to-Lipschitz constant loose, which is the kernel-generalization question we test.

Research Program

The first component is the estimator. We build a solver that takes stress observations, a calibrated $\psi_0$, a kernel, and a collocation box, and returns $r$ by solving a quadratic program in the monotone variant or a small semidefinite program in the polyconvex variant. Kernel hyperparameters are chosen by marginal likelihood on the unconstrained problem and then frozen. The material tangent needed by implicit finite element solvers is an analytic sum of kernel second derivatives over a fixed set of $m$ inducing centres. This removes the nested automatic differentiation that Advanced discretization techniques for hyperelastic physics-augmented neural networks identifies as a per-integration-point cost. For parametrized materials we add the manufacturing parameter (Shore hardness, UV grayscale, mixing ratio) through a product kernel. Constraints apply only in the invariant directions, which mirrors the partial convexity of Parametrized polyconvex hyperelasticity with physics-augmented neural networks without the network.

The second component reframes feature scaling. The research file worries that centering invariants destroys the identity state. That worry applies to networks with fixed biases. For a stationary kernel a shift of the inputs changes nothing, so the only part of scaling that matters is relative length scales. We therefore predict a specific null result: once per-invariant length scales are fitted by marginal likelihood (automatic relevance determination), Min-Max, Z-score and mechanics-based coordinates give identical fits. With a single shared length scale they should differ sharply. The mechanics-based coordinates are invariant deviations divided by their first-order sensitivity to a common reference strain magnitude.

Where scaling does still matter is the nearly incompressible direction. Data barely move in $J$, so the likelihood cannot identify that length scale. Our design lets the hand-crafted law's volumetric term govern $J$, and we will measure whether that suffices.

The third component confronts the theory honestly. Physics-informed machine learning as a kernel method proves that an accurate linear-operator prior speeds kernel regression from the $n^{-2/3}$ Sobolev rate toward $n^{-1}$. That result motivates the hope that a good hand-crafted prior helps, but it constrains what we can claim: our prior is a parametric mean, not a linear operator. The analogous statement is that error scales with the RKHS norm of the true residual. We test this empirically rather than claim a rate.

We do not address billion-sample scaling. The NUFFT solver of Fast kernel methods: Sobolev, physics-informed, and additive models is limited to three dimensions or to additive models. Experimental constitutive datasets have thousands of points, not billions, so exact solves are affordable and we keep full interactions between invariants and parameters.

Baselines

The naive reference point is the hand-crafted law alone: Mooney-Rivlin, Ogden or Yeoh, calibrated by Levenberg-Marquardt on the same training curves. It is also our prior mean. The correction must reduce held-out stress error relative to it, or the method has no reason to exist.

The strongest existing competitors are the physics-augmented networks. The first is the polyconvex network of Neural networks meet hyperelasticity: A guide to enforcing physics, an input-convex network over invariants with analytic growth and normalization terms. It reports relative errors below 0.004% on its virtual 3D cavity specimen. It also maintained physical realism up to stretch 4.0 when trained on stretches 0.8–1.1, with two orders of magnitude lower error than unconstrained networks. The second is the monotonic network of Neural networks meet hyperelasticity: A monotonic approach. Trained on uniaxial data only, it converged in cylinder torsion beyond 40°, whereas the unrestricted variant failed at 6°. On the digital-material, DLP and Ecoflex datasets themselves, no reported stress-fitting error was found on Lacuna, so we will reproduce those networks ourselves. For parametric interpolation, Parametrized polyconvex hyperelasticity with physics-augmented neural networks reports mean squared error consistently below $10^{-3.5}$ for scalar parametrizations.

Fairness rules apply across all methods. All use identical invariant inputs, training curves and splits. Network baselines get a hyperparameter search over width, depth and learning rate whose wall-clock budget matches our length-scale and collocation tuning. Results are averaged over seeds, since networks are seed-sensitive and our solver is not. Beating the strongest baseline means two things. At one or two training curves per material, the method must achieve lower held-out multiaxial error than the monotonic network, with the gap closing as data grow. It must also at least match the 40° torsion stability, with intervals that cover the held-out stresses at nominal rate.

Three ablations isolate the key ingredients. Removing all constraints (a plain kernel residual) tests whether the constraints are what keeps finite element solves alive. Replacing $\psi_0$ by zero, which keeps the constraints but leaves no hand-crafted mean, tests whether the analytical law is what carries extrapolation. Swapping Matérn-7/2 for Gaussian, and diagonal length scales for a learned full metric, tests the kernel and scaling choices.

Why not just…?

Why not just fit Ogden or Mooney-Rivlin and stop? Rigid analytical forms miss real behaviour, as A Data-Driven Method for Modeling Creep-Fatigue Stress-Strain Behavior Using Neural ODEs shows for loading overshoots that conventional models cannot represent. They must also be refit whenever manufacturing settings shift. Our method contains this alternative exactly: if the learned residual is negligible, the method reports so. The naive baseline comparison measures how often that happens.

Why not just use a monotonic or polyconvex neural network? This is the real threat. With abundant data we expect parity, and we say so. Our claimed advantages are narrower. We expect better accuracy at one or two curves, uncertainty estimates, a deterministic convex solve instead of seed-dependent training, and a certificate tied to an explicit box. The data-efficiency curve and the torsion test settle it. If the network wins at small data too, the proposal's main claim fails.

Why not just run a Gaussian process with per-dimension length scales on the invariants? This fixes the scaling problem, which is precisely our predicted null result. It does nothing for admissibility, though. Its mean decays to zero away from data, so the predicted stress collapses at large stretch, much like the unconstrained models that failed in Neural networks meet hyperelasticity: A guide to enforcing physics. The unconstrained ablation measures exactly this.

Why not learn a full input metric, as PIEFS does? PIEFS: Physics-Informed Eigenfunction Features with Learnable Scaling found its learnable-scaling and rotation variants performed similarly to or worse than the fixed metric, with unstable joint training. That is negative evidence against richer metrics. We use diagonal length scales and include the full metric only as an ablation.

Why not just discover a closed form with sparse regression? That approach answers a different question, interpretability, and it depends on its dictionary. Unsupervised Constitutive Model Discovery from Sparse and Noisy Data shows plain EUCLID reaching 65.5% energy error under noise with 13 sensors, against 0.1% with state assimilation. We report it on synthetic plate-with-hole data only as context, not as a competitor.

Proposed Experiments

The first test uses synthetic data. We generate stress data from Neo-Hookean, Isihara and Haines-Wilson energies, the latter two used in The Language of Hyperelastic Materials. We train on uniaxial tension only, with a deliberately misspecified Mooney-Rivlin prior, and test on equibiaxial tension and pure shear. Following the protocol of Neural networks meet hyperelasticity: A guide to enforcing physics, we also train on stretches 0.8–1.1 and evaluate to stretch 4.0. Here the ablation without a mean should fail and the full method should track the truth.

The second test uses the digital-material, DLP, Ecoflex and DM-L datasets from Neural networks meet hyperelasticity: A monotonic approach, assuming they can be obtained. We sweep the number of training curves from one to all and measure held-out relative stress error, 90% interval coverage, and parametric interpolation across hardness or grayscale levels.

The third test is decisive: the FEniCS cylinder torsion and 3D cavity simulations. We record the maximum twist reached before Newton divergence and check for quadratic convergence. We also time tangent evaluation per integration point against network automatic differentiation, and verify the convexity certificate by dense sampling of the box.

Supporting checks cover the remaining claims. The scaling null result is tested by refitting under Min-Max, Z-score and mechanics coordinates, with and without per-dimension length scales. The kernel question is tested by comparing the certified margin required under Gaussian and Matérn-7/2 kernels at equal accuracy. Finally, we plot held-out error against the RKHS norm of the true residual across priors of varying quality, as an empirical analogue of the prior-accuracy effect in Physics-informed machine learning as a kernel method.

The proposal succeeds if the full method holds torsion stability past 40° and beats the monotonic network at the smallest data budgets. It fails cleanly if the constraint-free kernel ablation already does both, or if the network wins everywhere.