Automated discovery of finite volume schemes using Graph Neural Networks

Paul Garnier · 2025

Read Automated discovery of finite volume schemes using Graph Neural Networks by Paul Garnier (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-19052.txt.

Introduction

Paul Garnier, Jonathan Viquerat, and Elie Hachem present a 2025 computing paper on teaching neural networks to invent numerical schemes. Graph neural networks can imitate the solutions of physical systems, but whether they generalize to new meshes is doubtful. The authors use them for a different job: deriving the scheme itself.

A network trained only on tiny two-node graphs managed to act out a first-order finite volume scheme for the heat equation. The team proves that the scheme's error tracks the network's training loss. Symbolic regression then showed the network had rediscovered the exact classic formula. A second version learned from a physics-based loss alone, with no sample answers. Wider networks went on to find second-order corrections on their own.

Catalog record

CREATORPaul Garnier
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE77 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2508-19052

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Automated discovery of finite volume schemes using Graph Neural Networks Paul Garnier Abstract Graph Neural Networks (GNNs) have deeply modified the landscape of numerical simulations by demonstrating strong capabilities in approximating solutions of physical systems. However, their ability to extrapolate beyond their training domain ( e.g. larger or structurally different graphs) remains uncertain. In this work, we establish that GNNs can serve purposes beyond their traditional role, and be exploited to generate numerical schemes, in conjunction with symbolic regression. First, we show numerically and theoretically that a GNN trained on a dataset consisting solely of two-node graphs can extrapolate a first-order Finite Volume (FV) scheme for the heat equation on out-of-distribution, unstructured meshes. Specifically, if a GNN achieves a loss ε \varepsilon on such a dataset, it implements the FV scheme with an error of 𝒪 ⁡ ( ε ) \mathcal{O}(\varepsilon) . Using symbolic regression, we show that the network effectively rediscovers the exact analytical formulation of the standard first-order FV scheme. We then extend this approach to an unsupervised context: the GNN recovers the first-order FV scheme using only a residual loss similar to Physics-Informed Neural Networks (PINNs) with no access to ground-truth data. Finally, we push the methodology further by considering higher-order schemes: we train (i) a 2-hop and (ii) a 2-layers GNN using the same PINN loss, that autonomously discover (i) a second-order correction term to the initial scheme using a 2-hop stencil, and (ii) the classic second-order midpoint scheme. These findings follows a recent paradigm in scientific computing: GNNs are not only strong approximators, but can be active contributors to the development of novel numerical methods. 1 Introduction Simulation as a grand challenge From weather forecasting and climate science to aeronautical design and the discovery of new materials, the reliable prediction of continuous physical processes is a key challenge for Artificial Intelligence. Usually, simulating such physics involves solving partial differential equations (PDE) over complex domains represented as unstructured meshes [ 17 ] . Classical solvers such as the finite-volume method (FVM) remain a very strong strategy, yet deriving high-order, geometry-aware schemes that scale on modern hardware is not a straightforward task. Such methods are usually computationally intensive, and accurate simulations of realistic physical problems can typically require tens of thousands of core-hours on distributed architectures. Moreover, each new simulation is performed independently, disregarding insights gained from previous runs, which motivates the integration of machine learning (ML) techniques for physics simulation. [ 24 , 34 , 4 , 14 ] Can neural networks inherit the guarantees of classical solvers? To address this, graph neural networks (GNNs) emerged as a natural fit for unstructured meshes, with message-passing architectures (MPS) offering a strong analogy with traditional PDE solvers. An MPS GNN will update at each layer the embedding of each node, using the current embedding of said node, and its edges. At the same time, each edge sees its embedding being updated using the nodes it is related to. This allows the information to flow from one node to another at each step of the network. More precisely, we define one update step as: h\leftarrow h+f^{\text{up}}\left(h,\displaystyle\sum_{\tilde{h}\in\mathcal{N}(h)}f^{\text{agg}}(e,h,\tilde{h})\right) (1) where the functions f are neural networks, h is a node embedding, \mathcal{N}(h) is the set of neighbours for the current node, and e is the edge between the current node and one of its neighbour. In comparison, a first-order FV scheme solves the heat equation by updating the temperature at each step using: T\leftarrow T+\displaystyle\sum_{\tilde{T}\in\mathcal{N}(T)}\phi(T,\tilde{T})(\tilde{T}-T) (2) where T is the current temperature, \tilde{T} the temperature of a neighbouring cell in the mesh, and \phi a geometric-based function that depends on each cell. By comparing updates ( 1 ) and ( 2 ), it is easy to see how the message-passing paradigm mirrors the local flux exchanges of conservative PDE discretisations. Recent empirical evidence shows that carefully constructed GNNs can approximate time-evolution operators, accelerate implicit schemes, and act as learned preconditioners [ 38 , 35 , 2 , 15 ] . Yet two fundamental questions remain open: • Can GNNs extrapolate to meshes, timesteps, or boundary conditions that lie far outside the training distribution? • Can we interpret what the network has learned from the perspective of classical FV theory? Neural algorithmic alignment meets scientific computing To provide answer to these two questions, we draw inspiration from the emerging concept of neural algorithmic alignment : the idea that a network which structurally approaches a classical algorithm will inherit its generalisation properties. While prior work has primarily investigated alignment with dynamic programming algorithms on combinatorial graphs, we extend the concept to continuous physics. Specifically, we design a sparse message-passing GNN that precisely learns a first-order finite-volume scheme. Training on a set of 2-cells simulations is enough to recover the flux coefficients of the reference solver with provable accuracy: if the empirical loss is \varepsilon , the error of the induced numerical method is bounded by \mathcal{O}(\varepsilon) on any unseen mesh. Notably, the majoration constant depends on \Delta t^{-1} [ 42 , 43 , 11 , 33 ] . PINNS and symbolic regression A complementary approach is to embed physical knowledge directly into the learning objective. Physics-Informed Neural Networks (PINNs) aim at minimizing PDE residuals [ 36 , 19 , 25 ] , while operator-learning approaches such as the Fourier Neural Operator (FNO) and its graph-based variants achieve mesh-independent generalisation by learning mappings between infinite-dimensional function spaces [ 29 , 30 , 22 , 31 ] . Physics-informed GNNs extend these ideas to unstructured meshes, enforcing discrete conservation laws via finite-volume residuals [ 27 , 28 , 10 ] . While PINNs can improve the performancess and create more physically-accurate outputs, models trained in this fashion are usually considered as complete black boxes. In parallel, advances in symbolic regression have shown that proper symbolic representations could be distilled directly from data [ 39 , 40 ] . Using specific structures such as GNNs, recent work have been able to re-discover physical laws, and even discover new ones [ 7 , 26 ] , suggesting a pathway toward models that both simulate and explain 1 1 1 something that would probably not have been possible without a GNN structure, given that a large modern transformers can’t achieve such results [ 41 ] . From approximation to automated discovery Similar to other approaches where a PINN is used to discover unknown solutions [ 45 , 23 , 44 ] , our construction unlocks a path toward self-supervised discovery of numerical methods . By searching in a richer parameter space and increasing the GNN’s hop size or number of layers, the same alignment principles allows us to rediscover high-order schemes. Contributions and outline. In this paper, we showcase a strong connection between GNNs and traditional FV methods. Our contributions are threefold. 1. First, we show numerically and theoretically that a GNN trained in a supervised manner on a minimal dataset of two-cell graphs can learn the fundamental principles of the heat equation and generalize to solve it on entirely out-of-distribution unstructured meshes. By applying symbolic regression to the components of the trained GNN, we show that the network learns the exact corresponding first-order FV scheme, effectively rediscovering the known numerical method; 2. Second, we discover that the

Read the complete text