Skip to main content
QUICK REVIEW

[Paper Review] Applying physics-based loss functions to neural networks for improved generalizability in mechanics problems

Samuel Raymond, David B. Camarillo|arXiv (Cornell University)|Apr 30, 2021
Model Reduction and Neural NetworksPhysics and Astronomy18 citations
TL;DR

This paper proposes a physics-based loss function that enforces energy conservation in neural networks for mechanical systems, improving generalization across different energy states. By combining mean-squared error with an energy difference penalty, the method enables accurate, energy-conserving predictions of pendulum motion without complex derivative layers, significantly outperforming standard loss functions in preserving system dynamics.

ABSTRACT

Physics-Informed Machine Learning (PIML) has gained momentum in the last 5 years with scientists and researchers aiming to utilize the benefits afforded by advances in machine learning, particularly in deep learning. With large scientific data sets with rich spatio-temporal data and high-performance computing providing large amounts of data to be inferred and interpreted, the task of PIML is to ensure that these predictions, categorizations, and inferences are enforced by, and conform to the limits imposed by physical laws. In this work a new approach to utilizing PIML is discussed that deals with the use of physics-based loss functions. While typical usage of physical equations in the loss function requires complex layers of derivatives and other functions to ensure that the known governing equation is satisfied, here we show that a similar level of enforcement can be found by implementing more simpler loss functions on specific kinds of output data. The generalizability that this approach affords is shown using examples of simple mechanical models that can be thought of as sufficiently simplified surrogate models for a wide class of problems.

Motivation & Objective

  • To address the brittleness of standard neural networks in predicting mechanical system dynamics, especially across varying energy states.
  • To improve generalizability in physics-informed machine learning by embedding conservation laws directly into the loss function.
  • To develop a computationally efficient alternative to traditional Physics-Informed Neural Networks (PINNs) that avoids complex derivative computations.
  • To demonstrate that simple, universal physical constraints—like energy conservation—can significantly enhance prediction accuracy and robustness in mechanical systems.

Proposed method

  • The method uses a hybrid loss function combining standard mean-squared error (MSE) with a penalty term based on the difference in total mechanical energy between input and output states.
  • The network is trained to predict the next time step of a pendulum’s motion, not the full time history, enabling temporal generalization.
  • The energy conservation term is computed as the absolute difference between input and predicted output energy, added to the MSE loss.
  • The approach avoids complex layer-wise derivative computation by directly enforcing physical constraints on output states rather than enforcing the full governing PDE.
  • The method is applicable to any system where energy or other conservation laws can be quantified, enabling broad use across mechanical problems.
  • The training uses simulated data from pendulum systems raised to different initial angles (π/2, π/3, π/6), representing varying energy levels.

Experimental results

Research questions

  • RQ1Can a simple physics-based loss term that enforces energy conservation improve generalization in neural network predictions of mechanical systems?
  • RQ2How does a hybrid loss function combining MSE and energy difference perform compared to standard MSE loss when training on diverse energy states?
  • RQ3Does enforcing energy conservation via a loss function term outperform conventional training in preserving system dynamics across different initial conditions?
  • RQ4To what extent can this approach reduce mode collapse in neural networks trained on data with varying energy levels?
  • RQ5Can this method be applied broadly to mechanical systems without requiring complex derivative computation or PDE enforcement?

Key findings

  • The standard MSE loss alone led to mode collapse, where the network preferred predicting the lowest-energy state regardless of initial conditions.
  • The hybrid loss function incorporating energy conservation significantly improved prediction accuracy across all initial energy states (π/2, π/3, π/6).
  • The energy-conserving network preserved total mechanical energy over time much more effectively than the baseline model.
  • Despite slightly increased prediction error in individual values, the energy-conserving model produced more physically plausible and stable trajectories.
  • The method achieved better generalization across different energy levels without requiring complex derivative layers or PDE enforcement.
  • The approach is computationally efficient and broadly applicable to any system where energy or other conservation laws can be quantified.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.