Neural Network-Assisted Refinement of Traditional Schemes for One-Dimensional Scalar Conservation Laws
Authors: Imre Fekete, Ferenc Izsák, Vendel P. Kupás
Organizations: Department of Applied Analysis and Computational Mathematics, ELTE Eötvös Loránd University, Budapest, Hungary · Department of Network and Data Science, Central European University, Vienna, Austria · Department of Applied Analysis and Computational Mathematics and NumNet HUN-REN–ELTE Research Group, ELTE Eötvös Loránd University, Budapest, Hungary
A clear link is established between conventional numerical methods and neural network approximations for solving one-dimensional scalar conservation laws. The focus is on the construction of an appropriate flux term in the case of convex flux functions for improving the classical schemes. The first neural network developed here is able to rediscover Godunov's method, while the second one emulates the behavior of a second-order slope-limiter function. In this way, by merging them, second-order reconstruction-based schemes can be developed. The networks presented here employ a minimal number of parameters, significantly reducing the complexity compared to previous approaches. These networks can also be linked consecutively to get a deep one corresponding to multiple time steps. Training them with an appropriate loss leads to stable schemes, improving even the classical methods without increasing their complexity.
Figures & tables
Figure 1: The piecewise linear, continuous function Φ with breakpoints x0=0<x1<x2<x3<x4=1 . Function values Φ(xi) are shown at each node, with slopes mk on each interval.
Figure 2: The residual block for computing a single time step using a skip connection.
Figure 3: The neural network for the fully discretized numerical solution corresponding to ( 2 ).
Figure 4: Partition of the first quadrant into regions T0 to T3 based on linear inequalities for a and b in ( 9 ).
Figure 5: A diagram showing the subnetwork, which generates the reconstructed slopes with s=s1+s3 .
Figure 6: Learning the Godunov scheme. Left: the Frobenius norm of the difference of the matrix A in Proposition 2 and the one in the training process. Right: training and validation losses over 100 epochs.
Figure 7: Result of the full simulation corresponding to Figure 2 using the initial matrix A0 and the final one after 100 epochs. The trigonometric test problem was used, with the simulation run for 0.1875 time units after the shock developed.
Number/size of
Problem
Method
Computer
Input & output
Layers
Para- meters
Epochs
Time
Burgers
Godunov
Laptop
128
64
4
100
355 s
Burgers
Godunov
HPC
128
64
4
100
235 s
LWR
Godunov
Laptop
128
64
4
100
477 s
LWR
Godunov
HPC
128
64
4
100
315 s
Burgers
reconstruction
Laptop
128
64
5
20
240 s
Table 1: Summary of the main characteristics of neural networks and performance of the learning process for getting optimal conservative schemes in case of the Burgers and the LWR equation.
Figure 8: Variation of slope limiters in the training procedure using two different initial parameters over 20 epochs. Left: starting from the superbee limiter, right: starting from the minmax limiter. In both cases, we used the parameters nx = 129 and δ=640.25 .
Figure 9: Learned slope limiters obtained with fixed spatial discretization nx = 257 (left) and with fixed CFL number 0.25 (right).
Figure 10: Learned slope limiters obtained for trigonometric initial conditions (left) and fixed final time dt=0.5 (right).
CFL
Limiter
nx
33
65
129
257
0.5
Minmod
9.20
5.90
4.01
2.71
MC
9.35
7.33
5.91
4.82
Superbee
12.35
10.35
8.17
6.40
Learned
7.68
4.81
3.19
2.18
0.25
Minmod
10.23
6.08
3.73
2.26
Table 2: Discrete L2 errors for different limiters and CFL numbers. The reported values are scaled by 10−3 .
Initial condition
Limiter
Δt
0.25
0.5
1.0
Riemann
Minmod
5.51
5.07
4.65
MC
4.72
5.31
6.31
Superbee
5.90
7.53
9.65
Learned
4.65
4.53
4.31
Linear
Minmod
2.93
3.55
3.48
Table 3: Experimental comparison of different slope limiters: discrete L2 errors for various initial conditions and final times. Entries are given in units of 10−3 .
Figure 11: Comparison of the neural network-based limiter with the exact solution, the Godunov scheme, and classical flux limiters for a Riemann problem.
CFL
Method
nx
101
201
401
0.5
CNN_FLOW
17.40
11.81
8.22
NN_R
8.06
5.87
4.60
NN
8.13
5.86
4.52
0.25
CNN_FLOW
20.09
13.71
9.52
NN_R
7.72
4.81
3.15
Table 4: Discrete L2 errors obtained by different neural network-based methods. Entries are given in units of 10−3 .
Ref.
Basic approach
Number/size of
layers
neurons per layer
parameters
Remark
[ 26 ]
PINN
3
20
∼ 1,300
also: comparison
[ 23 ]
PINN
4
different
1200
foundational work
[ 6 ]
PINN
5
50
10401
based on weak form
[ 15 ]
FNO
3
40
3441
foundational work
[ 3 ]
FNO
5
20
1761
special treatment for discontinuities
Table 5: A summary of some neural network methods, architectures, and computational complexity for solving the one-dimensional Burgers equation.
A second order finite volume scheme rests on two local quantities: a gradient reconstructed in each cell, and a limiter which scales it down where the reconstruction would overshoot. Both are set by fixed formulas, and on coarse unstructured meshes a small network can supply better values. But a network is free to output anything, and the usual safeguard is a penalty in the training loss, which discourages inadmissible states without preventing them. We replace the penalty by a hard constraint. The network still sets both quantities, and every value it can produce lies inside safe bounds: its stencil weights cannot cancel a neighbour, and its limiter is capped by the local flow. The flux, the wall treatment and the time step are not learned and carry their own guarantees. Admissibility therefore holds for every value of the weights rather than as an outcome of training, and no negative density or pressure occurred in any computation reported here. Because the scheme is safe whatever the network does, we could ask what the network contributes. We test it on supersonic channel flow over an obstacle, including the forward facing step of Woodward and Colella. Learning lowers the error by 38% on an unseen geometry and 29% on an unseen obstacle topology, measured against the same scheme with the network switched off. The method aims at the accuracy of a fine mesh for the cost of a coarse one, and refining once improves the error fourfold while multiplying the run time by eight. Learning secures half of this improvement for a sixth of this time. All of this comes from one of the two quantities the network sets. The gradient reconstruction reproduces the full effect on its own, and the limiter accounts for about a tenth as much. This also explains why the gain fades beyond the Mach numbers the weights were trained on.
Denis Gueyffier
ONERA -- Institut Polytechnique de Paris · Direction Scientifique G´en´erale, ONERA · Institut Polytechnique de Paris, Palaiseau, France
We propose an architecture that augments the Flux Neural Operator (Flux NO), which combines the classical finite volume method (FVM) with neural operators, with ViT-based context injection. Our model is formulated as a hypernetwork: it extracts solution dynamics over a finite temporal window, encodes them with a recurrent Vision Transformer, and generates the parameters of a context-conditioned neural operator. This enables the model to infer and solve conservation laws without explicit access to the governing equation or PDE coefficients. Experimentally, we show that the proposed method preserves the robustness, generalization ability, and long-time prediction advantages of Flux NO over standard neural operators, while delivering reliable numerical solutions across a broad range of conservative systems, including previously unseen fluxes. Our code is available at https://github.com/xx257xx/CONTEXT_FLUX_NO.
Taeyoung Kim, Joon-Hyuk Ko
Center for AI and Natural Sciences Korea Institute for Advanced Study Seoul, South Korea 02455
We develop and compare enhanced neural-network solvers for one-dimensional ground-state profiles, which are solutions of Q′′=bQ−γQp,Q>0,p>1,b,γ>0, the stationary profile equation for the nonlinear Schrödinger, generalized Korteweg-de Vries, and nonlinear Klein-Gordon equations. Its explicit sech-type solutions serve as exact reference for error computation and benchmark hyperparameter selection. We improve on the standard Adam-trained physics-informed neural network (PINN) baseline by introducing higher-order optimization via Gauss-Newton/Levenberg-Marquardt and L-BFGS refinements, as well as Fourier-feature PINNs, and constrained Deep Ritz (DR) formulations. In DR approaches we introduce two new neural-network formulations, which implement two classical variational characterizations: a Nehari-constrained Deep Ritz method, in which the height is learned by projecting onto the Nehari/Pokhozhaev manifold, and a Weinstein Deep Ritz method, in which a normalized profile minimizes the Weinstein quotient. The Deep Ritz formulations perform best overall, in particular, the Weinstein variant gives the best error-runtime balance. The neural-network based solvers remain less accurate and efficient than classical Petviashvili iteration in 1D, however, the current study provides a proof of concept: the mesh-free formulation, non-reliance on exact profiles or the related features make them promising in higher dimensions and for more complicated nonlinearities and dispersive operators.
Chandler Haight, Alex D Rodriguez, Svetlana Roudenko