Solving Nonlinear Conservation Laws of Partial Differential Equations Using Graph Neural Networks


  • Qing Li University of Stavanger
  • Jiahui Geng University of Stavanger
  • Steinar Evje University of Stavanger
  • Chunming Rong University of Stavanger



Nonlinear Conservation Laws, Partial Differential Equations, Graph Neural Networks


Nonlinear Conservation Laws of Partial Differential Equations (PDEs) are widely used in different domains. Solving these types of equations is a significant and challenging task. Graph Neural Networks (GNNs) have recently been established as fast and accurate alternatives for principled solvers when applied to standard equations with regular solutions. There have been few investigations on GNNs implemented for complex PDEs with nonlinear conservation laws. Herein, we explore GNNs to solve the following problem

ut + f(u, β)x = 0 

where f(u, β) is the nonlinear flux function of the scalar conservation law, u is the main variable, and β is the physical parameter. The main challenge of nonlinear conservation laws is that solutions typically create shocks. That is, one or several jumps in the form (uL, uR) with uLuR moving in space and probably changing over time such that information about f(u) in the interval associated with this jump is not present in the observation data. We demonstrate that GNNs could achieve accurate estimates of PDEs solutions based on new initial conditions and physical parameters within a specific parameter range. 


P. Bauer, A. Thorpe, and G. Brunet. The quiet revolution of numerical weather prediction. Nature, 525(7567):47–55, 2015. doi:

J. Brandstetter, D. E. Worrall, and M. Welling. Message passing neural PDE solvers. In The Tenth International Conference on Learning Representations, ICLR 2022, Virtual Event, April 25-29, 2022., 2022. doi: URL

T. D. Economon, F. Palacios, S. R. Copeland, T. W. Lukaczyk, and J. J. Alonso. Su2: An open-source suite for multiphysics simulation and design. Aiaa Journal, 54(3):828–846, 2016. doi:

O. Fuks and H. A. Tchelepi. Limitations of physics informed machine learning for nonlinear two-phase transport in porous media. Journal of Machine Learning for Modeling and Computing, 1(1), 2020. doi: 10.1615/JMachLearnModelComput.2020033905.

H. Gao, M. J. Zahr, and J.-X. Wang. Physics-informed graph neural galerkin networks: A unified framework for solving pde-governed forward and inverse problems. Computer Methods in Applied Mechanics and Engineering, 390:114502, 2022. doi:

H. Holden and N. Risebro. Front tracking for hyperbolic conservation laws. Springer, Berlin, 2011.

V. Iakovlev, M. Heinonen, and H. Lahdesmaki. Learning continuous-time pdes from sparse data with graph neural networks. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021., 2021. doi: URL

R. LeVeque. Finite volume methods for hyperbolic problems. Cambridge Texts in Applied Mathematics, 2007. doi:

Q. Li and S. Evje. Learning the nonlinear flux function of a hidden scalar conservation law from data. Network Heterogeneous Media, 18, 2023. doi: 10.3934/nhm.2023003.

Z. Li, N. Kovachki, K. Azizzadenesheli, B. Liu, K. Bhattacharya, A. Stuart, and A. Anandkumar. Neural operator: Graph kernel network for partial differential equations. arXiv preprint arXiv:2003.03485, 2020.

Z. Long, Y. Lu, X. Ma, and B. Dong. Pde-net:Learning PDEs from data. In International Conference on Machine Learning, pages 3208–3216. PMLR, 2018. doi:

Z. Long, Y. Lu, and B. Dong. PDE-Net 2.0:Learning PDEs from data with a numeric-symbolic hybrid deep network. Journal of Computational Physics, 399:108925, 2019. doi:

D. Pardo, L. Demkowicz, C. Torres-Verdin, and M. Paszynski. A self-adaptive goal oriented hp-finite element method with electromagnetic applications. part ii: Electro-dynamics. Computer methods in applied mechanics and engineering, 196(37-40):3585–3597, 2007. doi:

T. Pfaff, M. Fortunato, A. Sanchez-Gonzalez, and P. W. Battaglia. Learning mesh-based simulation with graph networks. arXiv preprint arXiv:2010.03409, 2020. doi:

M. Raissi, P. Perdikaris, and G. E. Karniadakis. Physics-informed neural networks: A deep learning framework for solving forward and inverse prvoblems involving nonlinear partial differential equations. Journal of Computational Physics, 378:686–707, 2019. doi:

R. Ramamurti and W. Sandberg. Simulation of flow about flapping airfoils using finite element incompressible flow solver. AIAA journal, 39(2):253–260, 2001. doi:

C. Schwarzbach, R.-U. Borner, and K. Spitzer. Three-dimensional adaptive higher order finite element simulation for geo-electromagnetics—a marine csem example. Geophysical Journal International, 187(1):63–74, 2011. doi:

S. Seo, C. Meng, and Y. Liu. Physics-aware difference graph networks for sparselyobserved dynamics. In International Conference on Learning Representations, 2019.

H. Skadsem and S. Kragset. A numerical study of density-unstable reverse circulation displacement for primary cementing. J. Energy Resour. Technol, 144, 2022. doi:

N. Thuerey, K. Weißenow, L. Prantl, and X. Hu. Deep learning methods for reynolds-averaged navier–stokes simulations of airfoil flows. AIAA Journal, 58(1):25–36, 2020. doi:

N. Wandel, M. Weinmann, and R. Klein. Learning incompressible fluid dynamics from scratch - towards fast, differentiable fluid models that generalize. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021., 2021. doi: URL

Q. Zhao, D. B. Lindell, and G. Wetzstein. Learning to solve pde-constrained inverse problems with graph networks. In K. Chaudhuri, S. Jegelka, L. Song, C. Szepesv´ari, G. Niu, and S. Sabato, editors, International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pages 26895–26910. PMLR, 2022. doi: 2206.00711. URL