{"id":131,"date":"2026-11-18T14:09:42","date_gmt":"2026-11-18T14:09:42","guid":{"rendered":"https:\/\/evoxia.online\/?p=131"},"modified":"2026-11-18T14:09:42","modified_gmt":"2026-11-18T14:09:42","slug":"physics-informed-neural-networks-training-a-network-on-the-equation-instead-of-only-the-data","status":"publish","type":"post","link":"https:\/\/evoxia.online\/?p=131","title":{"rendered":"Physics-Informed Neural Networks: Training a Network on the Equation Instead of Only the Data"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Equations We Already Have<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most machine learning starts from ignorance. A model that classifies photographs knows nothing about cats before training, so everything it learns has to come from examples. Physics and engineering are in a different position. The motion of a fluid, the spread of heat through a metal plate and the vibration of a bridge are described by partial differential equations that have been known and tested for more than a century. The Navier-Stokes equations do not need to be rediscovered from data every time someone wants to model airflow.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What is often missing is everything around the equation. The initial state may be known only at a few sensor locations. A material coefficient may be unknown. The geometry may be awkward enough that building a good mesh for a classical solver takes days. Measurements are noisy and sparse. A purely data-driven network trained on such measurements will happily produce predictions that violate conservation of mass, because nothing told it that mass is conserved.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Physics-informed neural networks (PINNs) are an attempt to put both sources of knowledge into one training objective. The network is fitted to whatever data exists, and it is also penalized wherever its output fails to satisfy the governing equation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>An Idea From 1998<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The basic idea is older than the name. In 1998, Isaac Lagaris, Aristidis Likas and Dimitrios Fotiadis of the University of Ioannina published \u00abArtificial Neural Networks for Solving Ordinary and Partial Differential Equations\u00bb in IEEE Transactions on Neural Networks. They wrote the solution as a trial function with two parts. One part had no free parameters and was built to satisfy the boundary or initial conditions exactly. The other part was a small feedforward network multiplied by a factor that vanished on the boundary, so it could change the interior without breaking the conditions. The network&#8217;s weights were then trained so the differential equation held at a set of points inside the domain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They compared the results against the Galerkin finite element method on several test problems. The work stayed fairly niche for almost two decades. Computing derivatives of a network with respect to its inputs had to be done by hand for each architecture, and the hardware and software to train larger networks did not exist yet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The Residual as a Loss Term<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The modern version came from Maziar Raissi, Paris Perdikaris and George Em Karniadakis at Brown University. Their preprints appeared in late 2017, and the combined paper, \u00abPhysics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations,\u00bb was published in the Journal of Computational Physics in 2019.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The setup is simple to describe. A fully connected network takes coordinates as input, for example a position x and a time t, and outputs the value of the physical field at that point, say a velocity u(x, t). Because modern frameworks like TensorFlow and PyTorch support automatic differentiation, the derivatives of u with respect to x and t can be computed exactly for any input, with no finite difference grid. Plug those derivatives into the PDE and you get a residual: the amount by which the equation fails at that point. For a correct solution the residual is zero everywhere.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Training then minimizes a sum of terms. One term measures the mismatch with observed data or with the initial and boundary conditions. Another measures the squared residual at thousands of \u00abcollocation points\u00bb scattered through the domain. Those points need no labels. The equation itself supplies the target, which is zero. In the paper the authors tested this on Burgers&#8217; equation, the Schr\u00f6dinger equation, the Allen-Cahn equation and the Korteweg-de Vries equation, among others.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Inverse Problems<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The more interesting half of that paper concerns what the authors called data-driven discovery. Suppose the form of the equation is known but one of its coefficients is not, such as a viscosity or a diffusion constant. In a classical workflow you would guess the coefficient, run a solver, compare with measurements and repeat inside an outer optimization loop. With a PINN the unknown coefficient is simply another trainable parameter. Gradient descent adjusts it together with the network weights, and the value that makes the data and the equation agree is what training converges to.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is where the method is easiest to defend. A finite element solver needs a fully specified problem. A PINN can work with a partially specified one, where some boundary conditions are missing and some measurements are present in the interior, because the loss function does not care where its information comes from.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Case: Smoke, Dye and a Hidden Pressure Field<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The best known demonstration is \u00abHidden fluid mechanics: Learning velocity and pressure fields from flow visualizations,\u00bb by Raissi, Alireza Yazdani and Karniadakis, published in Science in 2020. The input was only the concentration of a passive scalar, the kind of thing you see when dye or smoke is carried along by a flow. Velocity and pressure were never observed directly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The network was asked to output concentration, velocity and pressure at every point in space and time. The loss rewarded matching the observed concentration and penalized violations of the transport equation for the scalar and of the Navier-Stokes equations. Since the dye moves with the fluid, the only velocity and pressure fields consistent with both the images and the physics are the real ones (up to what the data can resolve). The authors showed examples including flow past a cylinder and blood flow in an intracranial aneurysm, and reported that the method tolerated low resolution and substantial noise in the input. In the aneurysm setting, quantities like wall shear stress are clinically relevant and hard to measure directly, which is the reason anyone would want to infer them from images.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Competing Loss Terms<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">People who tried PINNs on harder problems soon found that training often failed quietly. The network would fit the boundary conditions and settle on a smooth, wrong solution, or it would satisfy the PDE residual while ignoring the boundaries.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sifan Wang, Yujun Teng and Perdikaris traced part of this to the loss itself in \u00abUnderstanding and Mitigating Gradient Flow Pathologies in Physics-Informed Neural Networks\u00bb (SIAM Journal on Scientific Computing, 2021). The residual term contains high-order derivatives of the network, and its gradients can be much larger than those of the boundary term. Gradient descent then spends almost all its effort on the residual, and the boundary conditions, which are what make the solution unique, barely get learned. Their remedy adapts the weight of each loss term during training using statistics of the back-propagated gradients, and they reported accuracy gains of roughly 50 to 100 times on several benchmark problems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Smooth Functions Come First<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A second difficulty comes from a general property of neural networks. Nasim Rahaman and colleagues showed in \u00abOn the Spectral Bias of Neural Networks\u00bb (ICML 2019) that networks learn low-frequency components of a function much faster than high-frequency ones. For image classification this is often harmless. For physics it is a problem, because shocks, thin boundary layers and fast oscillations are exactly the high-frequency features that matter.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Aditi Krishnapriyan, Amir Gholami, Shandian Zhe, Robert Kirby and Michael Mahoney examined this in \u00abCharacterizing possible failure modes in physics-informed neural networks\u00bb (NeurIPS 2021). On simple one-dimensional convection, reaction and diffusion problems, a standard PINN worked for mild coefficients and broke down as the coefficients grew. They argued that the network was large enough to represent the solution and that the failure came from optimization: the PDE residual term made the loss landscape harder to navigate. Two fixes helped. Curriculum regularization starts training on an easy version of the equation and gradually increases the coefficient. A sequence-to-sequence formulation solves the problem in short time windows, one after another. Both reduced error by one to two orders of magnitude compared with ordinary PINN training.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The Comparison With Finite Elements<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Early enthusiasm sometimes described PINNs as a replacement for classical solvers. Direct comparisons have not supported that. Tamara Grossmann, Urszula Julia Komorowska, Jonas Latz and Carola-Bibiane Sch\u00f6nlieb asked the question plainly in \u00abCan physics-informed neural networks beat the finite element method?\u00bb (IMA Journal of Applied Mathematics, 2024). On Poisson, Allen-Cahn and semilinear Schr\u00f6dinger equations the finite element method was faster and more accurate at producing the solution. PINNs had one advantage: once trained, evaluating the solution at new points could be quicker.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A broader warning came from Nick McGreivy and Ammar Hakim of the Princeton Plasma Physics Laboratory in Nature Machine Intelligence (2024). They reviewed papers claiming that a machine learning method outperformed a standard numerical method on fluid-related PDEs and found that 79% of them (60 of 76) compared against a weak baseline, for example a solver run at much higher accuracy than needed, or a method that is not the efficient standard for that problem. They also found evidence of publication bias: negative results, where the network does worse, are rarely written up. This does not apply only to PINNs, but PINNs are a large share of that literature.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Closing Thought<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The fair reading of these results is that a PINN is a poor solver and a good fitting method. When the problem is fully specified, decades of numerical analysis have produced tools that are faster, more accurate and come with error bounds that a trained network does not offer. The case for a PINN starts when the problem is not fully specified: a coefficient is unknown, the boundary is partly unobserved, and the only data are a few noisy measurements or a video of dye. In that situation a classical solver has nothing to start from, and the equation becomes what it is in the PINN loss, a strong prior on which explanations of the data are physically possible. Judged as a way to regularize a model with known physics, rather than as a faster way to solve equations we can already solve, the method has a clear place.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By: Max Johnson B.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Equations We Already Have Most machine learning starts from ignorance. A model that classifies photographs knows nothing about cats before training, so everything it learns has to come from examples. Physics and engineering are in a different position. The motion of a fluid, the spread of heat through a metal plate and the vibration of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-131","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/evoxia.online\/index.php?rest_route=\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/evoxia.online\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/evoxia.online\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/evoxia.online\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/evoxia.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=131"}],"version-history":[{"count":0,"href":"https:\/\/evoxia.online\/index.php?rest_route=\/wp\/v2\/posts\/131\/revisions"}],"wp:attachment":[{"href":"https:\/\/evoxia.online\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/evoxia.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/evoxia.online\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}