wikillm

Paper · 2020-05-25 · cs.LG, physics.comp-ph, stat.ML

Thermodynamics-based Artificial Neural Networks for constitutive modeling

Thermodynamics-based neural networks (TANNs) for strain-rate-independent material models. A network predicts a free-energy potential and internal-variable increments; stress and dissipation follow by automatic differentiation, so the first law holds by construction. On 1D and 3D elasto-plastic tests, the authors report better accuracy and generalization than a standard ANN.

Physics-informed neural networkSurrogate modelingAutomatic differentiationmaterialsconstitutive-modelingthermodynamicsplasticity

arXivPDFMarkdown12 min read

AI-compiled by claude-haiku-5-5 on 2026-10-31, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Engineers who simulate bridges, soils or metal parts need a rule that says how a material responds when it is pushed: how much stress builds up for a given strain, and what happens to the material's internal state. Such rules are usually hand-written formulas with parameters fitted to tests. A neural network can learn the rule from data instead, but a plain network has no notion of physics. It can predict energy being created from nothing, and nothing stops it from doing so on inputs it has not seen.

This paper builds two basic laws of thermodynamics into the network's shape. The network does not output the stress directly. It outputs a stored-energy function and the changes of a few hidden state variables. The stress and the energy lost to friction-like effects are then computed as derivatives of that energy function, using the automatic differentiation that deep-learning libraries already provide. Because of this structure, the first law is satisfied however the network was trained. The network learns a stored-energy function and how the hidden state changes, and the authors argue this needs less data and trains more reliably.

The idea is tested on simple elasto-plastic materials, which bend elastically and then yield, with hardening or softening, in one and three dimensions. The authors report that the predictions are more accurate than those of a standard network and stay physically consistent for loads beyond the training range.

TL;DR

Thermodynamics-based ANNs (TANNs) predict a Helmholtz free-energy potential and internal-variable increments, and derive stress and dissipation by differentiating the network §3.3 eq. 13. The first law holds by construction, and the second law holds only in the sense that the training data has non-negative dissipation and the predictions follow it §5.1.2. On the authors' 1D and 3D elasto-plastic test cases the reported accuracy and generalization beat a standard ANN §5.1.4 §5.2.3. All numbers are author-reported.

Problem

Constitutive models relate stress and strain at a material point. Hand-made models need calibration, and micromechanical simulations are too costly to run inside large finite-element analyses §1. Standard ANNs used as constitutive models act as black boxes. They need large, clean data sets, and nothing guarantees that their predictions respect thermodynamics, especially for inputs outside the training range §1.

The method targets strain-rate-independent processes at the material point level, in the small-strain regime §2.3, with the experiments run in the isothermal case §2.4 §4.1. It assumes an incremental, updated-Lagrangian setting, and the authors state that finite-strain extensions were not developed §2.3.

Method

Thermodynamic basis §2. The derivation starts from the local energy balance eq. 1 and the Clausius-Duhem inequality eq. 2. Subtracting gives a non-negative mechanical dissipation rate D (with the thermal part removed) §2.2. With small strains, an energy E(S, ε, Z) and a dissipation D(S, ε, Z, Ż) as functions of entropy S, strain ε and internal variables Z §2.3 [eqs. 6–7], the energy balance gives the stress, the temperature and the thermodynamic forces χ_i = −∂E/∂ζ_i [eqs. 10a–11]. The dissipation then equals Σ χ_i · ζ̇_i eq. 12.

For the isothermal case, the Helmholtz free energy F = E − Sθ is used §2.4. The relations are:

S = -\partial F/\partial \theta, \quad \sigma = \partial F/\partial \varepsilon, \quad D = -\sum_i \partial F/\partial \zeta_i \cdot \dot{\zeta}_i eq. 13

These three relations are what the network hard-wires: stress and dissipation are derivatives of the predicted energy F §3.3, steps 5–6.

Network structure §3.3. A TANN has three sub-networks: sNN_ζ predicts the internal-variable increments Δζ, sNN_θ predicts the temperature increment Δθ (it can be removed for isothermal processes fig. 7b), and sNN_F predicts the free energy F. Stress increment and dissipation are not network outputs; they are derivatives of sNN_F. The network input is I = (ε^t, Δε, σ^t, θ^t, ζ^t, Δt) §3. Primary outputs are (Δζ, Δθ, F^{t+Δt}); secondary outputs, obtained by differentiation, are (Δσ, D^{t+Δt}) §3.

For the isothermal case the update is:

Pseudocode
# Isothermal TANN update for one material point  [§3.3] [fig. 7b]
# Inputs: strain, strain_increment, stress, zetas (internal variables), dt
# Outputs: stress_increment, dissipation, energy at time t + dt
# partial(f, x): derivative of network output f w.r.t. its input x

def tann_update(strain, strain_increment, stress, zetas, dt, nets):
    # 1. Updated strain  [§3.3, step 1]
    strain_next = strain + strain_increment
    # 2. Predict internal-variable increments with sNN_zeta  [§3.3, step 2]
    zeta_increments = nets.zeta(strain_next, strain_increment, stress, zetas)
    # 3. Updated internal variables and their rates  [§3.3, step 3]
    zetas_next = zetas + zeta_increments
    zeta_rates = zeta_increments / dt
    # 4. Predict the energy potential with sNN_F  [§3.3, step 4]
    energy = nets.F(strain_next, zetas_next)
    # 5. Dissipation from the energy potential  [§3.3, step 5] [eq. 13]
    dissipation = -dot(partial(energy, zetas_next), zeta_rates)
    # 6. Stress from the energy potential, and its increment  [§3.3, step 6]
    stress_next = partial(energy, strain_next)
    stress_increment = stress_next - stress
    return stress_increment, dissipation, energy

Activation choice §3.2. Because the stress is a derivative of the network, the loss that compares derivatives with data (the stress increments) depends on the second derivatives of the activation functions. The authors call the resulting failure the second-order vanishing gradient [eqs. 19–21d] and show it with a toy network that maps x to x² and 2x fig. 5 tab. 2. Activations whose second derivative vanishes over part of their range, such as ReLU_z and ELU_z, fit the second output poorly tab. 2. The energy network uses ELU_{z²}, whose second derivative is nonzero for all z tab. 1 §5.1.1 §5.2.1.

Training loss §3.1. Each output has a mean absolute error, summed over N samples eq. 16. The outputs are weighted by "regularized weights" so their magnitudes match; the weight values are not stated §5.1.1.

Training data §4. The data are generated from the thermodynamic model itself rather than from measured load paths §4.2. A random initial state (stress, thermodynamic stress, internal variables, strain) and a random strain increment are drawn from distributions with zero mean (the paper says "standard distributions") and a problem-specific standard deviation. The standard deviations are chosen so that 50–60% of the samples lie on the yield surface §4.2 fig. 8. The incremental equations [eqs. 22–24] are integrated with an explicit solver, cited as bogacki19893, over one step of length Δt = 1 §4.2. The data assume Ziegler's orthogonality condition §4.1 [app. A, after eq. 32]; the authors note that the network itself does not require it §4.

Reference models.

  • 1D elasto-plasticity with kinematic hardening (a spring-slider) §5.1:

F = \tfrac{E}{2}(\varepsilon-\zeta)^2 + \tfrac{H}{2}\zeta^2, \quad D = k\,|\dot{\zeta}|, \quad y = \frac{|\sigma - H\zeta|}{k} - 1 \le 0 eq. 25

  • 3D von Mises elasto-plasticity with kinematic hardening §5.2: the energy and dissipation are given in tensor form eq. 26, with the yield function eq. 27.

Applications. Three 1D cases (perfect plasticity, hardening, softening) and three 3D cases share the same structure §5.1 §5.2 tab. 3 tab. 5. The 1D network has sNN_ζ with one hidden layer of 6 leaky-ReLU neurons and sNN_F with one hidden layer of 9 ELU_{z²} neurons, and a total of 72 hyper-parameters §5.1.1. The 3D network is larger §5.2.1.

Hyperparameters

Values are as stated in the paper. Every "not stated" item is a gap an implementer must decide.

NameValueWhereNotes
sNN_ζ, 1D, hidden layers1 layer, 6 neurons, leaky ReLU§5.1.1slope not stated
sNN_F, 1D, hidden layers1 layer, 9 neurons, ELU_{z²}§5.1.1
sNN_ζ, 3D, hidden layers2 layers, 48 neurons each, leaky ReLU§5.2.1three output heads, one per principal component
sNN_F, 3D, hidden layers1 layer, 36 neurons, ELU_{z²}§5.2.1
Output layerslinear, biases set to zero§5.1.1 §5.2.1
Trainable hyper-parameters, 1D72§5.1.1count given by the authors; see Pitfalls for how it reconciles
Trainable hyper-parameters, 3D≈ 3000§5.2.1
Samples per 1D case2000: 1000 train, 500 validation, 500 test§5.1.1
Samples, 3D6000 random increments plus uniaxial and biaxial paths; split 50/25/25§5.2.1number of extra path samples not stated
OptimizerAdam with Nesterov's accelerated gradient, cited as dozat2016incorporating§5.1.1learning rate and decay not stated
Batch size, 1D10§5.1.13D batch size not stated
Epochsnot statedearly stopping is used, see Pitfalls
LossMAE per output, "regularized" weightseq. 16 §5.1.1weight values not stated
Input and output normalizationnot statedthe toy example is normalized to [-1, 1] §3.2.1
Time step Δt, data generation1§4.2
Standard deviation of initial stress and thermodynamic stress2 σ_yfig. 8for the 1D case 1D-1 only
Standard deviation of strain and internal variable1e-2fig. 8for the 1D case 1D-1 only
Standard deviation of strain increment1e-3fig. 8for the 1D case 1D-1 only
Fraction of samples on yield surface50–60%§4.2target, not a constraint on the code
Explicit integratorcited as bogacki19893§4.2method order and tolerances not stated
1D material, E / k / H200 GPa / 200 MPa / 0, 10, −10 GPatab. 3H in GPa, k in MPa: see Pitfalls on units
1D cyclic test pathε_max = 2e-3, Δε = 1e-4§5.1.2
1D input ranges during trainingsee tabletab. 4
3D material, K / G / k167 GPa / 77 GPa / 140 MPatab. 5H = 0, 10, −10 GPa in the three cases
3D loading pathsuniaxial, biaxial, triaxial with ε_max = 2e-3 to 2 and Δε = 1e-4 to 1eq. 28 §5.2.3
Toy activation study6 hidden nodes, learning rate 1e-5, 1000 train, 500 validation, 500 test samples§3.2.1

Results

Author-reported. Setup: synthetic data generated from the reference models above §4.2 §5. Compared against a standard ANN with a matched number of hyper-parameters §5.1.4 §5.2.3. Hardware not stated. The main text reports the toy activation comparison in full tab. 2. The application results are mostly plots, described below.

Toy problem, learning x² and 2x with one hidden layer of 6 nodes, errors in units of 1e-4 tab. 2:

Activation ALL_OL_∇Ono. epochs
ReLU_z1521.2205.981315.18920
ReLU_{0.5z²+z}762.493.58668.858054
ReLU_{z²}0.0610.02410.0371148
ELU_e127.226.83100.3819477
ELU_z108.5612.1296.4417280
ELU_{0.5z²+z}65.510.9154.6312178
ELU_{z²}0.130.0670.06788
ELU_{z⁴}65.3633.7531.6120051
ELU_{z⁴+0.5z²+z}12.941.8111.139683

Application results, described from the figures:

  • 1D, cyclic loading for cases 1D-1, 1D-2 and 1D-3. TANN predicts stress, internal variable, free energy and dissipation, and the predicted dissipation stays positive fig. 10 §5.1.2.
  • 1D, generalization. For strain increments beyond the training range, accuracy drops, but the dissipation stays positive and the tangent (Jacobian) is still well predicted fig. 11 §5.1.3.
  • 1D, versus standard ANN. The standard ANN gives the wrong energy and dissipation, violating both laws, and generalizes worse on cyclic and random paths fig. 14 fig. 15 §5.1.4.
  • 3D, cyclic, uniaxial, biaxial, triaxial. For uniaxial cyclic loading, TANN agrees with the reference model across increment sizes, with less accuracy at the largest increments. The standard ANN is accurate only close to its training increment fig. 16 fig. 18 fig. 20 fig. 22 §5.2.2 §5.2.3. The authors report larger errors for TANN in the mean and deviatoric stress §5.2.3.

Supplementary figures for the hardening and softening cases, and the 3D loss curves, are referenced to a supplementary file that is not part of the arXiv source §5.1.2 §5.2.1.

Paper vs code

No official code for this paper. Searches done:

  1. Paper body, abstract and the arXiv abstract page (no comments, no code link). The paper says "All code accompanying this manuscript is available on request" §1.
  2. No project page is linked.
  3. GitHub search: the method name with "thermodynamics" and "constitutive", the first author's name as a user, and "TANN thermodynamics". One related repository was found: filippo-masi/TANN-multiscale (CC0-1.0, commit 6b391995c7a8c3d9d7010160e7ff7bd7f479fbc2). It belongs to the first author, and its README names the 2022 CMAME paper (Masi and Stefanou, DOI 10.1016/j.cma.2022.115190) as the work it supports, not this paper. It does not contain training scripts or configs for the 1D or 3D cases here. It has a lattice finite-element script for data generation and a user-material wrapper that loads a trained TensorFlow model. The wrapper's docstring gives an input of shape (1, 36) for a full 3D material [code: TANN - Numerical Geolab/numerical_geolab/Numerical_Geolab/ngeoAI/AI_material.py#L51-L53]. This paper's 3D network takes 12 principal-component inputs §5.2.3. Because the repository is for a different paper, it is not cited as this paper's code, and no code field is set.

Pitfalls

  • Second-order vanishing gradient. Any network whose derivatives appear in the loss needs activations with a nonzero second derivative §3.2 [eqs. 21a–21d]. The text says ReLU_z and ELU_z "fail" §3.2.1. The table shows ELU_z converging to L = 108.56 × 10⁻⁴ after 17,280 epochs tab. 2. Use the table numbers, not the word "fail". The application networks use leaky ReLU, which is piecewise linear and so has a zero second derivative, in sNN_ζ §5.1.1 §5.2.1. The paper does not say whether the §3.2 rule applies to that network.
  • Partial, not total, derivatives. Stress and dissipation are written as partial derivatives of sNN_F with respect to its ε and ζ inputs §3.3 [steps 5–6]. But ζ^{t+Δt} is itself a function of ε^{t+Δt} through sNN_ζ. A total derivative would include that path and change the tangent. The paper does not say which one it uses. The pseudocode above uses the partial reading, which is the reading the step list supports. This is an interpretation.
  • Units are mixed. The 1D yield function eq. 25 combines H in GPa with σ and k in MPa tab. 3. Without conversion, H ζ and σ are on different scales (10 GPa = 10⁴ MPa). The paper gives no unit system. Pick one and convert all inputs and targets consistently.
  • The second law is trained, not enforced. The authors state the architecture does not explicitly guarantee the second principle. They say it holds because the data have non-negative dissipation §5.1.2. The first law holds by construction §2 §5.1.2. Claims of thermodynamic consistency for unseen inputs are supported by the examples only §5.1.3.
  • Index errors in the step list. Step 3(b) writes ζ^{t+1} := ζ^t + Δζ^t, and step 3(a) writes ζ̇^{t+1}; the other steps use t+Δt. Step 2 writes Δε^t in sNN_ζ and Δε in sNN_θ §3.3. Use t+Δt and Δt throughout.
  • Early-stopping criterion conflicts. The application section says training stops when the test error starts to rise §5, while §3.2.1 and §5.1.1 use a validation set. Use validation for early stopping, and keep the test set for the final numbers §5.1.1.
  • Training details are missing. Not stated: learning rate, epochs, weight values in the "regularized" loss, leaky-ReLU slope, batch size for 3D, initialization, normalization, and integrator tolerance. The toy example uses learning rate 1e-5 §3.2.1, which does not apply to the applications (not stated).
  • Hyper-parameter count (my check, not stated). The 72 hyper-parameters for 1D §5.1.1 are reproduced if sNN_ζ takes the four isothermal inputs (ε, Δε, σ, ζ) and sNN_F takes two (ε, ζ), with zero output biases: 36 + 36 = 72. The paper does not list the inputs of each sub-network in the isothermal case.
  • Sampling rule is under-specified. The sampling standard deviations depend on the problem §4.2. The paper says samples are kept with y ≤ 0, but not how: reject, or project onto the yield surface. The fraction on the surface is a target, not a rule. The data assume associated flow (Ziegler's orthogonality) §4 app. A eq. 32. The architecture does not need it, but the training data do.
  • Training data costs. Each training pair needs the free energy and dissipation at t+Δt §1. For these examples both come from the analytic models §4.2 §5. For real materials they must come from micromechanical simulation or experiment, which the paper does not show.
  • Out-of-range accuracy. TANN accuracy drops for increments beyond the training range §5.1.3 §5.2.3. The claim that the tangent (Jacobian) is better predicted outside the range is supported by plots only §5.1.3 §6.
  • Dimensionality is restricted. The 3D examples are converted to principal axes §5.2.1 and use three principal-component outputs. The paper does not show a full-tensor version.
  • Applications are isothermal. The input list includes temperature and time step, but the examples are isothermal, and the non-isothermal architecture fig. 7a is not tested.
  • "Without modification" is untested. The claim that the architecture extends to damage or viscosity without modification is not tested here [§5 intro] §6.
  • Quantitative results are limited. Only the toy table tab. 2 has numbers in the main text. Other comparisons are plots, and the hardening and softening cases are in the unavailable supplement.

Lineage

  • Builds on: Physics-informed neural networks, which use automatic differentiation of a network with respect to its inputs §1 (raissi2019physics). Also builds on the thermodynamic framework cited as houlsby2007principles §2 and the hyperplasticity framework cited as einav2007coupled §4.1.
  • Compared against: standard feed-forward ANN constitutive models, cited as ghaboussi1991 and lefik2003artificial §5.1.4.
  • Related later work by the first author, named in the companion repository's README (not stated in the paper): Masi and Stefanou (2022), multiscale TANN for inelastic materials, DOI 10.1016/j.cma.2022.115190.
  • The arXiv abstract page lists a related journal DOI, 10.1016/j.jmps.2020.104277. This card follows arXiv v1 only.

Source and license

Adapted from “Thermodynamics-based Artificial Neural Networks for constitutive modeling” by Filippo Masi, Ioannis Stefanou, Paolo Vannucci, Victor Maffi-Berthier (arXiv:2005.12183), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.