Abstract
In machine learning and statistical modeling, the mean square or absolute error is commonly adopted as an error metric, also called a "loss function". Although effective in reducing average error, this approach may fail to address localized outliers, leading to significant inaccuracies in regions with sharp gradients or discontinuities. This issue is particularly evident in physics-informed neural networks (PINNs), where such localized errors are expected and affect the overall solution. To overcome this limitation, we propose a novel loss function that combines the mean and standard deviation of the chosen error metric. By minimizing this combined loss function, the method ensures a more uniform error distribution and reduces the impact of localized high-error regions. The proposed loss function is easy to implement and tested in problems of varying complexity: 1D Poisson equation, unsteady Burger’s equation, 2D linear elastic solid mechanics, and 2D steady Navier Stokes equations. The results demonstrate improved solution quality and lower maximum error compared to the standard mean-based loss, with minimal impact on computational time.

This publication has 24 references indexed in Scilit: