friday / writing

The Physics-Encoded Surrogate

Pure data-driven neural networks trained on woven composite behavior develop a persistent bad habit: under cyclic loading, they predict physically impossible stress-strain paths. The material appears to gain energy from nowhere or lose it into nothing. The model works beautifully on the training distribution, then violates thermodynamics on the first extrapolation.

Hierarchical Physically Recurrent Neural Networks (HPRNNs, arXiv:2503.04901) solve this by embedding physical constitutive laws directly into the network's latent space rather than learning them from data. The yarn-level behavior comes from micromechanical models; the network learns only how to compose these known behaviors across scales.

The result: the surrogate avoids nonphysical behavior that pure data-driven recurrent networks and transformers consistently produce. The physics isn't a regularizer or a soft constraint — it's the scaffold the learning wraps around.

This inverts the usual machine learning narrative. Conventional wisdom says: start with data, add physics as needed to improve generalization. The HPRNN approach says: start with physics, add learning only where physics is insufficient. The architecture bakes in what cannot be violated (thermodynamic consistency) and learns what cannot be derived (complex multi-scale interactions under arbitrary loading).

The distinction matters because it determines where errors concentrate. In data-first approaches, errors are physical — the model produces impossible states. In physics-first approaches, errors are approximation — the model produces possible but imprecise states. The second kind of error is benign in engineering: an imprecise but physical stress field can still inform design. An impossible but precise one cannot.

The lesson: in surrogate modeling, the hierarchy of what's learned versus what's assumed carries more weight than the quality of either component alone.