Manuscript Offprint
arXiv:2610.17483Structure-preserving fidelity diagnostics for partial differential equations
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Kyriakos Flouris
MRC Biostatistics Unit, University of Cambridge, Cambridge, United Kingdom
King's College, University of Cambridge, Cambridge, United Kingdom
Machine learning surrogates of partial differential equations (PDEs) are commonly trained on data generated by numerical solvers. Therefore, the training data obey not the PDE but the modified equation of the numerical scheme, and the test loss, computed on data from the same solver, cannot distinguish a model that learned the physics from one that learned the discretization error. Here, we show that the difference is nevertheless visible in the trained model. We propose a suite of structure-preserving fidelity diagnostics, simple scores that measure whether a learned model respects one known property of the physics, such as a conserved quantity, a symmetry or a Hamiltonian structure, without access to the training data or the governing equation. Over five systems, the diagnostics track the error with respect to the true dynamics with a rank correlation of up to 0.94, while the test loss is uncorrelated or anti-correlated with it. For the Burgers, Korteweg–de Vries and Navier–Stokes equations, the diagnostics separate numerical schemes that the test loss ranks as equivalent, including schemes of the same order.
I. INTRODUCTION
Machine learning models of physical systems described by partial differential equations (PDEs) have become a standard tool, either as fast surrogates of the solution [1–3] or as a means to discover the governing equation from data [4, 5]. Since experimental data are scarce, such models are in most cases trained on data generated by numerical solvers. A numerical solver, however, only approximates the PDE. In fact, a consistent scheme of order q on a grid of spacing h solves exactly a slightly different equation, the modified equation of the scheme [6, 7], which differs from the PDE by terms of order . For example, first-order upwinding of the Burgers equation adds an artificial viscosity proportional to h. Consequently, a model that fits the training data well learns the modified equation rather than the PDE. For time integrators of ordinary differential equations this effect has been observed and corrected for when the scheme is known [8, 9].
In practice, however, the scheme is often not known to the user of a trained model, and the standard validation of a machine learning model, the test loss, cannot reveal it: the test data are generated by the same solver as the training data, so the test loss measures how well the model reproduces the solver, not the physics. As we show in Section IV B, three models of the Burgers equation trained on data from three different solvers have test losses within a factor of 1.7 of each other, while their errors with respect to the true dynamics differ by a factor of 71. The test loss ranks a model that learned an artificial viscosity as good as the model that learned the physics. Alternatively, checks that compare the model with the governing equation require the equation and all its coefficients, which are not available in most applications of learned surrogates.
We postulate that the information is nevertheless stored in the trained model. Numerical schemes typically break some structural property of the physics, such as a conserved quantity, a symmetry or a Hamiltonian structure, at the order of their discretization error. A model that learned the modified equation inherits this violation, while a model that learned the physics does not. To this end, we propose fidelity diagnostics, simple scores of a trained model that are zero if the model respects a given structural property and positive otherwise. The diagnostics require only the name of the property, not the governing equation, and are evaluated on the trained model alone, without the training data and in most cases without a rollout. We collect them in a diagnostic suite, Table I, which lists for each diagnostic what it requires and what it detects, and which can be applied to other learned models in the same way.
We test the diagnostics on the viscous Burgers equation, the Korteweg–de Vries (KdV) equation and two-dimensional (2D) Navier–Stokes flow, each discretized by several schemes that generate the training data of otherwise identical models. We show that the test loss fails to indicate the error of the models while the diagnostics track it, that the learned models reproduce the discretization error of their solver quantitatively, and that different diagnostics detect different schemes. Furthermore, we show which diagnostics cannot work: linear conserved quantities and self-consistency checks of learned time-steppers, including the recently proposed semigroup consistency [10]. Finally, we report a case in which the diagnostics do not indicate the rollout error.
First, we discuss related work in Section II. We introduce the modified equation, the learned models and the diagnostics in Section III. In Section IV the experiments and results are presented. The paper finishes with a discussion of the limitations and a summary. The appendix contains the derivations, the details of the experimental setup and additional results.
Physics-informed learning. Physical knowledge is often imposed during training, as a penalty on the PDE residual [1, 15] or through the architecture [16], which requires the equation or fixes the structure by construction. In contrast, we test structural properties after training.
Modified equations. The modified equation is a standard tool for the analysis of numerical schemes [6, 7]. For ordinary differential equations learned from time series, it has been shown that the learned vector field approximates the modified equation of the integration scheme used in training, and that this can be corrected when the scheme is known [8, 9]. Similarly, sparse regression methods for equation discovery [4, 5] recover the modified equation when the data are simulated. Our setting differs in two respects: the scheme is not known, and the question is asked of the trained model alone.
Self-consistency. Learned time-steppers can be checked without labels by testing whether they compose correctly over time, used as a training constraint [17] and recently as a diagnostic for learned simulators [10]. We show in Section IV E that such checks cannot detect a discretization error.
III. BACKGROUND AND METHOD
A. Modified equation
Consider a PDE and a numerical scheme with grid spacing . Taylor expansion of the discrete operator gives the modified equation [6]
where is the order of the scheme and is the leading error term. For example, for the Burgers equation with second-order central differences, , a dispersive error. A solution computed with the scheme satisfies Eq. (1) more accurately than the PDE. Hence, training data generated by the scheme are samples of , and a learned model that minimizes the training loss approximates . The same holds for time integrators, where the step size takes the role of [7].
B. Learned models
Each model maps a state u to its time derivative and is trained by minimizing the mean squared error on pairs , with estimated from snapshots by a fourth-order finite difference in time. Every scheme is observed identically: the same snapshot interval, number of samples and observation noise. The models are stencils with polynomial terms in u, linear in their parameters and fitted in closed form, so that no optimizer variance enters the comparison. Each model class contains the modified equation of every compared scheme; schemes outside the class are reported but excluded from the claims (Appendix C).
C. Fidelity diagnostics
A fidelity diagnostic measures the violation of one structural property P of the physics by the trained model,
where is a residual that vanishes if holds, a normalization of the same size as the terms entering , and the average over probe states that are drawn independently of the training data.
The diagnostic suite is summarized in Table I. It consists of three families. The conservation diagnostic measures whether the model changes a quantity at the rate prescribed by the physics, for example zero for a conserved momentum or for the energy of a viscous flow; the drift diagnostic measures the same along a rollout of the model. The symmetry diagnostic measures whether the model commutes with a symmetry of the physics, for example a Galilean boost or time reversal. The structure diagnostic measures whether the Jacobian of the model has the form required by the physics, for example the symmetry implied by a Hamiltonian structure, and the recovery diagnostic fits a sparse equation to the model's own output and measures the terms that do not belong to the physics. Each diagnostic requires only the property it tests, and all except are evaluated without a rollout. If a scheme violates the property at order , then while . Whether a learned model inherits this value is the question we test.
To evaluate the diagnostics, every model is also scored by its transfer error , the root-mean-square relative deviation of a rollout of the model from an accurate reference solution of the PDE over a time horizon T. The transfer error is available here only because the data are synthetic. It is the quantity a diagnostic should indicate in practice, where the true solution is unknown.
D. Limits of detection
Not every structural property is broken by a numerical scheme. Two simple observations determine in advance which diagnostics can respond; derivations are given in Appendix B.
Linear conserved quantities. If a quantity that is linear in the state, such as the total mass , is conserved by the PDE, it is conserved exactly by every Runge–Kutta time integrator and by every spatial scheme in flux form. Consequently, the corresponding diagnostic is zero for every scheme and cannot separate them. We use such diagnostics as negative controls, which must not separate the models. Quadratic quantities, such as energy, are in general not preserved [7], and their diagnostics can respond.
Self-consistency. A learned time-stepper , which advances a state by a time , can be checked for self-consistency without any knowledge of the physics. For in-
TABLE I. The diagnostic suite. Each diagnostic is computed from the trained model alone, Eq. (2), and requires only the listed property of the physics. Last column: what the diagnostic detects in this work, with its spread (largest over smallest value) across the learned models of each system. The last two rows are diagnostics that cannot detect a solver (Section III D).
| diagnostic | tests whether the model | requires | rollout | detects, spread across learned models |
|---|---|---|---|---|
| Conservation | ||||
| changes a quantity at the rate of the physics | and its rate | no | artificial viscosity and dispersion, Burgers ; non-conservative forms, KdV 123; energy–enstrophy pair, Navier–Stokes 5.6; Euler schemes, oscillators | |
| keeps along its own rollout | yes | non-symplectic schemes, oscillators | ||
| Symmetry | ||||
| commutes with a symmetry | the symmetry | no | dispersive error, Burgers (blind to viscosity); time reversal, oscillators | |
| Structure | ||||
| has a Jacobian of the required form, e.g. Hamiltonian | the structure | no | non-symplectic schemes, oscillators ; KdV 3.9 (limited by the fit) | |
| contains no terms outside a sparse equation | candidate terms | no | Burgers ; spurious terms exactly zero except for Euler schemes, oscillators | |
| Cannot detect a solver | ||||
| conserves a linear quantity (mass, circulation) | no | negative control, silent: spread | ||
| and other self-consistency checks | composes consistently in time | nothing | no | detects invalid time-steppers, not solvers: spread 1.04–1.08 across solvers |
stance, the semigroup error [10]
measures whether two consecutive steps agree with a single step of the combined length. However, the one-step map of a numerical scheme is, to all orders in , the exact time- map of its modified equation [7]. A model that learned the modified equation therefore learned a valid time evolution, only of a different equation, and satisfies every self-consistency check as well as a model that learned the physics. Self-consistency checks thus test the learner, not the physics.
IV. EXPERIMENTS AND RESULTS
A. Test loss and diagnostics
We first compare the test loss and the diagnostics over all systems, before discussing each system in turn. For every system, models are trained on data from several schemes of the same equation, and each model is scored by its test loss, its transfer error and the largest diagnostic of the suite. In addition to the three PDEs, we include the two Hamiltonian oscillators of Appendix D, where the error comes from the time integrator.
Figure 1(a) shows that the test loss is nearly the same for all models of a system, within a factor of 2.9, while their transfer errors span more than two orders of magnitude. The rank correlation of the test loss with the transfer error lies between and [Fig. 1(c)]. It is even negative on four of the five systems, which we attribute to the reference scheme being the hardest one for a local model to fit (Appendix D). Consequently, the test loss does not indicate which models learned the physics. In contrast, the largest diagnostic grows with the transfer error [Fig. 1(b)], with a rank correlation between 0.71 and 0.94 on Burgers, KdV and the two oscillators. The diagnostics thus expose the models that learned a solver artifact, while the test loss ranks them as equivalent. The exception is Navier–Stokes, where the diagnostic is anti-correlated with the transfer error (; Section IV D). Across schemes, the strongest diagnostic varies by factors between 5.6 (Navier–Stokes) and (Burgers), compared with at most 2.9 for the test loss.
B. Burgers equation
We consider the viscous Burgers equation on a periodic domain with , grid points and smooth random initial conditions. The training data are generated by four schemes: a pseudo-spectral reference, which stands in for the physics; second-order central differences; central differences with an added artificial viscosity , a standard stabilization in shock-capturing schemes; and first-order upwinding, which adds an effective viscosity . The
(a)

(b)
(c)
FIG. 1. Test loss against fidelity diagnostics. Each marker is one learned model (scheme and seed); both axes are relative to the model trained on the reference scheme ( for Navier–Stokes). (a) Test loss and (b) the largest diagnostic of the suite against the transfer error. (c) Spearman rank correlation with the transfer error per system, for the test loss (open) and the diagnostic (filled). Navier–Stokes (grey) is discussed in Section IV D.
model is a stencil of radius 5, quadratic in u. It contains the first three schemes exactly. The upwind scheme switches with the sign of u and is outside the model class; it is shown for completeness only.
The test losses of the three representable models are , and , while their transfer errors are , and : the model trained with artificial viscosity fits its data as well as the reference model and predicts the true dynamics 71 times worse.
The trained model shows why. Linearizing around a uniform state gives, for each wavenumber , an effective viscosity and a phase speed . For the PDE, and . For central differences, and , and the artificial viscosity replaces by (Appendix A). Figure 2 compares these analytic values with the learned models. Each learned model follows the scheme that generated its data, not the PDE. For the learned effective viscosity deviates from that of its scheme by at most 1.5%, while the artificial viscosity raises it by 41% above the physical value; the learned phase speed deviates from that of its scheme by at most 0.04%, while the scheme deviates from the PDE by up to 4.5%. Reading the excess viscosity directly from the model gives , compared with the analytic value , a ratio of 0.997 for each of the three training seeds. The model has learned the modified equation of its solver to within the accuracy of the fit. For the upwind scheme, which the model can only represent on average, the ratio to the averaged prediction varies between 0.77 and 1.45 over seeds.
The diagnostics inherit this difference. The energy diagnostic , which uses the energy decay rate of the PDE and thus requires , separates the three representable models by a factor of . The Galilean symmetry diagnostic , which requires only the transformation , , separates them by . However, cannot distinguish the central scheme from its artificially viscous vari-
(a)

(b)
FIG. 2. Linearized learned Burgers models. (a) Effective viscosity at ; (b) relative error of the phase speed at . Markers: learned models trained on data from each scheme (median over three seeds). Lines: analytic values of the scheme; dashed: the PDE. The upwind line (grey, dotted) is the averaged prediction . Shaded: wavenumbers at which the training data carry less than of the peak power, so the model is not constrained by the data.
ant and , since a viscosity term is Galilean invariant while the dispersive error is not. Different diagnostics detect different schemes, so a single diagnostic is not sufficient.
C. Korteweg-de Vries equation
A diagnostic that only measured accuracy would rank schemes by their order. To test whether the diagnostics measure structure instead, we use the KdV equation with on grid points [18]. KdV conserves mass , momentum and the energy , and it is Hamiltonian, which implies a symmetry condition on the Jacobian of the right-hand side that measures directly (Appendix A). The nonlinear term can be discretized with the same second-order central stencil in three forms: the flux form , the advective form , and the skew-symmetric combination of 2/3 flux and 1/3 advective form. All three conserve mass, but only the skew-symmetric form conserves momentum (Appendix A). We compare these three forms, a fourth-order skew-symmetric form and a pseudo-spectral reference.
Table II shows the diagnostics of the numerical operators. Mass is conserved by every scheme, as expected from Section III D, so serves as a negative control. Momentum separates the three second-order forms completely, from round-off for the skew-symmetric form to and for the flux and advective forms. The structure diagnostic is at round-off for the pseudo-spectral reference and between and for the finite-difference schemes.
We train a quadratic stencil model of radius 5 on data from each scheme. The test losses of the five models are within a factor of 2.0 of each other, while their transfer errors differ by a factor of 61. The momentum diagnostic separates the learned models by a factor of 123, with the skew-symmetric form lowest (last column of Table II), and the energy diagnostic by a factor of 77. Thus, the diagnostics separate schemes of the same order, which differ only in structure, by two orders of magnitude.
Notably, also revealed an error in our own reference solver. On a grid with an even number of points, the highest Fourier mode is ambiguous, the quadratic term aliases into it, and the pseudo-spectral derivative is no longer exactly antisymmetric. of the reference operator is at , compared with round-off at . Therefore, we use an odd number of grid points throughout.
D. Two-dimensional Navier–Stokes flow
We consider 2D incompressible flow in vorticity form, with , on a periodic grid with . The nonlinear term has three second-order central discretizations, (advective form), (flux form in ) and (flux form in ), which agree in the continuum but not on the grid. Their average conserves both energy and enstrophy [19]. The Poisson solve and the viscous term are spectral for every scheme, so the nonlinear term is the only difference. The model is a stencil with terms quadratic in , which contains all four schemes.
Figure 3(a) shows the energy and enstrophy diagnostics of the four schemes. conserves only enstrophy, only energy, both and neither, in agreement with the classical result [19]. Importantly, neither diagnostic alone identifies the correct scheme: the energy diagnostic cannot distinguish from , and the enstrophy diagnostic cannot distinguish it from . Only the combination isolates it.
Figure 3(b) repeats the measurement on the learned models. The test losses of the four models are equal (1.0× spread). The pattern of panel (a) is preserved, but the separation shrinks from round-off against to a factor of 5.6 for enstrophy and 3.3 for energy.
On Navier–Stokes, unlike Burgers and KdV, the ranking of the diagnostics does not agree with that of the transfer error. The model has the lowest diagnostics but the third-lowest transfer error, at every horizon up to [Fig. 3(c)]. Hence, in this viscous flow the diagnostics identify the scheme with the correct structure, but they do not indicate the rollout error.
E. Self-consistency checks
To test the second observation of Section III D, we compare the semigroup error, Eq. (3), with the fidelity diagnostics on the same learned time-steppers. The model is a time-stepper , which also provides the vector field for the diagnostics [17]. Fitting such a model with a polynomial library in the full state is only feasible in low dimensions, so this test uses two Hamiltonian oscillators, a coupled harmonic and an anharmonic one (Appendix D). We vary two factors independently: the solver that generates the data, for a fixed model class, and the model class, for fixed data.
Figure 4 shows the result for the harmonic system. Across solvers, the semigroup error changes by less than 4%, from to . Across model classes, it changes by a factor of , so the measurement works and detects models that are not valid time-steppers. On the same models, the energy and structure diagnostics separate explicit Euler from the reference by . The anharmonic system gives the same picture (semigroup error across solvers, energy diagnostic ). For a linear system the statement is exact: the time-stepper that reproduces explicit Euler for a rotation with step 0.25 corresponds to a vector field that is 12% wrong, and has a semigroup error of (Appendix B). Consequently, self-consistency checks and fidelity diagnostics are complementary: the former test the learner, the latter test the physics.
V. LIMITATIONS
The diagnostics require one structural property of the physics, which must be known. On learned PDE models they are limited by the fit error of the model: separations of more than ten orders of magnitude between the numerical operators shrink to factors of 4 to 6 for the KdV structure diagnostic and the Navier–Stokes conservation diagnostics. Additionally, on
TABLE II. KdV, . Diagnostics of the numerical operators for the structure , mass , momentum and energy , averaged over 16 probe states. Values below are round-off. Last column: momentum diagnostic of the model trained on data from each scheme (median over three seeds).
| scheme | of the learned model | ||||
|---|---|---|---|---|---|
| spectral | |||||
| skew, 4th | |||||
| skew, 2nd | |||||
| flux, 2nd | |||||
| advective, 2nd |
(a) operators

(b) learned
(c)
FIG. 3. 2D Navier–Stokes, , . (a) Energy and enstrophy diagnostics of the four second-order schemes and the spectral reference; values below (shaded) are round-off and shown at . (b) The same diagnostics for models trained on data from each scheme (median over three seeds). (c) Transfer error of the learned models against the rollout horizon . The model with the correct structure (, black) has the third-lowest error at every horizon.
Navier–Stokes the diagnostics did not indicate the rollout error. The models used here are linear in their parameters, which isolates the effect of the solver from that of the optimization; deep networks, which add optimization error, remain to be tested. Finally, with five schemes per system the rank correlations describe orderings; a systematic variation of h at fixed order is needed to measure the expected scaling directly.
VI. SUMMARY AND OUTLOOK
In this work we studied what a learned model of a PDE learns when its training data are generated by a numerical solver. Over five systems, the test loss, computed on data from the same solver, is uncorrelated or anti-correlated with the error with respect to the physics. We showed that the model learns the modified equation of the solver quantitatively, and that an artificial viscosity is recovered from a learned Burgers model to within 0.4%. We proposed a suite of fidelity diagnostics, Table I, which measure whether a trained model respects one structural property of the physics and require neither the training data nor the governing equation. The diagnostics track the error on four of the five systems and separate schemes of the same order for the KdV equation. For Navier–Stokes, they identify the scheme that conserves both energy and enstrophy, but they do not indicate the rollout error. Furthermore, we showed that linear conserved quantities and self-consistency checks, such as the semigroup error, cannot detect a solver.
Notably, different diagnostics detect different schemes, and already for Navier–Stokes a single property is not sufficient: only the combination of energy and enstrophy identifies the conservative scheme. More complex equations, for example turbulent or multi-physics flows, or PDEs whose invariants are not known in closed form, will therefore require more elaborate diagnostics, combining several properties, resolving them by scale, or deriving them from the symmetries of the equation. Developing such diagnostics, and testing them on deep neural surrogates, is the subject of future work. We anticipate that fidelity diagnostics can serve as a simple validation step for learned surrogates and discovered equations, in particular when the origin of the training data is not known.

(a)
(b)
learner (data fixed)
FIG. 4. Semigroup error and fidelity diagnostics on the same learned time-steppers, coupled harmonic oscillators, median over three seeds. (a) Data from four solvers, one model class: the semigroup error is constant, while the energy diagnostic and the structure diagnostic separate explicit Euler by more than four orders of magnitude. (b) One data set, three model classes, of which only the first is a valid time-stepper: the semigroup error separates them.
[1] M. Raissi, P. Perdikaris, and G. E. Karniadakis, Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations, J. Comput. Phys. 378, 686 (2019).
[2] Z. Li, N. Kovachki, K. Azizzadenesheli, B. Liu, K. Bhattacharya, A. Stuart, and A. Anandkumar, Fourier neural operator for parametric partial differential equations, in International Conference on Learning Representations (ICLR) (2021) arXiv:2010.08895.
[3] D. Kochkov, J. A. Smith, A. Alieva, Q. Wang, M. P. Brenner, and S. Hoyer, Machine learning–accelerated computational fluid dynamics, Proc. Natl. Acad. Sci. U.S.A. 118, e2101784118 (2021).
[4] S. L. Brunton, J. L. Proctor, and J. N. Kutz, Discovering governing equations from data by sparse identification of nonlinear dynamical systems, Proc. Natl. Acad. Sci. U.S.A. 113, 3932 (2016).
[5] S. H. Rudy, S. L. Brunton, J. L. Proctor, and J. N. Kutz, Data-driven discovery of partial differential equations, Sci. Adv. 3, e1602614 (2017).
[6] R. F. Warming and B. J. Hyett, The modified equation approach to the stability and accuracy analysis of finite-difference methods, J. Comput. Phys. 14, 159 (1974).
[7] E. Hairer, C. Lubich, and G. Wanner, Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations, 2nd ed., Springer Series in Computational Mathematics, Vol. 31 (Springer, Berlin, 2006).
[8] A. Zhu, P. Jin, B. Zhu, and Y. Tang, Inverse modified differential equations for discovery of dynamics (2020), arXiv:2009.01058 [math.NA].
[9] R. T. Keller and Q. Du, Discovery of dynamics using linear multistep methods, SIAM J. Numer. Anal. 59, 429 (2021), arXiv:1912.12728.
[10] L. J. Shikhman, Semigroup consistency as a diagnostic for learned physics simulators (2026), AI4Physics Workshop at
ICML 2026, arXiv:2605.26324.
[11] L. Lu, P. Jin, G. Pang, Z. Zhang, and G. E. Karniadakis, Learning nonlinear operators via DeepONet based on the universal approximation theorem of operators, Nat. Mach. Intell. 3, 218 (2021).
[12] J. Brandstetter, D. E. Worrall, and M. Welling, Message passing neural PDE solvers, in International Conference on Learning Representations (ICLR) (2022) arXiv:2202.03376.
[13] M. Takamoto, T. Praditia, R. Leiteritz, D. MacKinlay, F. Alessiani, D. Pflüger, and M. Niepert, PDEBench: An extensive benchmark for scientific machine learning, in Advances in Neural Information Processing Systems 35, Datasets and Benchmarks Track (2022) arXiv:2210.07182.
[14] N. McGreivy and A. Hakim, Weak baselines and reporting biases lead to overoptimism in machine learning for fluid-related partial differential equations, Nat. Mach. Intell. 6, 1256 (2024).
[15] G. E. Karniadakis, I. G. Kevrekidis, L. Lu, P. Perdikaris, S. Wang, and L. Yang, Physics-informed machine learning, Nat. Rev. Phys. 3, 422 (2021).
[16] S. Greydanus, M. Dzamba, and J. Yosinski, Hamiltonian neural networks, in Advances in Neural Information Processing Systems 32 (2019) arXiv:1906.01563.
[17] J. Chen and K. Wu, Deep-OSG: Deep learning of operators in semigroup, J. Comput. Phys. 493, 112498 (2023), arXiv:2302.03358.
[18] N. J. Zabusky and M. D. Kruskal, Interaction of “solitons” in a collisionless plasma and the recurrence of initial states, Phys. Rev. Lett. 15, 240 (1965).
[19] A. Arakawa, Computational design for long-term numerical integration of the equations of fluid motion: Two-dimensional incompressible flow. Part I, J. Comput. Phys. 1, 119 (1966).
Appendix A: Schemes and their errors
8
Burgers. With the central differences and , Taylor expansion gives and , from which the error term in Section III follows. Inserting into and keeping terms linear in gives the growth rate , i.e. the phase speed and effective viscosity quoted in the text. The artificial viscosity replaces by at every . Upwinding replaces by a one-sided difference in the direction of , which adds to leading order. A stencil with fixed coefficients can represent this only on average, .
KdV. Let be the central difference matrix, which is antisymmetric on a periodic grid, . The rate of change of the discrete momentum due to the nonlinear term is , where is the discretized term. With one finds for the flux form and for the advective form. A combination with weight on the flux form gives , which vanishes for , the skew-symmetric form. The dispersive term is antisymmetric as well and conserves for every form. Mass is conserved by every form, because each is a difference of fluxes, , and .
The Hamiltonian structure of KdV, , implies that the Jacobian of the right-hand side satisfies: is symmetric on states with zero mean. is the relative size of the antisymmetric part of , with applied in Fourier space.
Navier–Stokes. The three forms are , and , each discretized with central differences on the block, and [19]. The energy and enstrophy production of the nonlinear term alone, and (median over 16 probe states), is and for , and for , and for , and and for .
Appendix B: Derivations
Linear conserved quantities. One step of a Runge–Kutta method is , where each stage is an evaluation of the right-hand side at some state. If for every state , then for every stage, and exactly. Since this holds for every step size, the modified equation conserves as well, and so does a model that learned it. For a quadratic quantity the same argument fails, and only a special class of implicit methods conserves it [7].
Self-consistency. Let be the one-step map of the scheme and its modified vector field, so that is the time-h map of to all orders in [7]. A time-steper trained on data from at multiples of approximates the time- map of . Every time evolution satisfies and , so the semigroup error and the reversibility defect vanish for exactly as for the true field . The remaining errors of a learned model come from its approximation of , not from the choice of field. For a linear system with explicit Euler, and with . For a rotation generator and , deviates from by 12.3%, while the semigroup error and the reversibility defect of are and .
Appendix C: Experimental setup
Data. Snapshots of every scheme, including the reference, are recorded at the same interval and is estimated from them by a fourth-order central difference in time. Gaussian noise of relative size (KdV) and (Navier–Stokes) is added to the snapshots; the noise must remain below the discretization error, since at the time differencing amplifies it above the KdV discretization error and all diagnostics read . The Burgers data are noise free. The flows are resolved, with a cell Reynolds number of order one; otherwise all schemes are inaccurate and the test loss separates them for that reason.
Models. Burgers: stencil of radius 5, quadratic in u, ridge penalty . KdV: quadratic stencil of radius 5; a smaller radius cannot represent the nonlocal pseudo-spectral reference, which then fits worst (test-loss spread at radius 3 against at radius 5). Navier–Stokes: stencil with all quadratic terms in , with obtained from by the spectral Poisson solve. The pseudo-spectral Navier–Stokes reference is not representable by a local stencil and is excluded from the comparison of the learned models.
Diagnostics. The diagnostics are averaged over 64 (Burgers) or 16 (KdV, Navier–Stokes) probe states drawn independently of the training data. The normalization in Eq. (2) is for , the size of the transformed output for , and the norm of the Jacobian for , which is computed by finite differences.
Transfer error. From eight probe states, the model is integrated with a fourth-order Runge–Kutta method with step , and the PDE with the same method and a 20 times smaller step. The relative error is averaged in the root-mean-square sense over steps and initial states up to the horizon . All reported values are medians over three seeds.
Controls. Diagnostics that must not separate the schemes, according to Section III D or by construction, are fixed in advance as negative controls: KdV mass and translation symmetry, and Navier–Stokes circulation, point inversion and reflection combined with . All controls remain silent, with spreads across schemes between 1.07 and 4.5.
Appendix D: Hamiltonian oscillators
Setup. A coupled harmonic system (frequencies 1.0 and 1.7, coupling 0.4) and an anharmonic oscillator (quartic coefficient 0.6). The data are generated by a fine-step reference
and by explicit Euler, second- and fourth-order Runge–Kutta and symplectic Euler at . The models are polynomial in the state, with the degree of the true system, and the snapshots carry observation noise of relative size .
Same-order schemes. Explicit and symplectic Euler are both first order. Their test losses are equal (ratio 0.90 and 0.35 for the two systems), their transfer errors differ by factors of 27 and 31, and the energy diagnostic differs only by factors of 1.9 and 2.9, since both schemes have an energy error of order per step. The structure diagnostic , which tests the Hamiltonian form of the Jacobian, separates them by factors of and .
Time-steppers. The time-stepper of Section IV E is cubic in the state and in , fitted at lags of one to three snapshot intervals without noise; the alternatives, linear in and a fixed-step map, are not valid time-steppers. The reversibility defect and the equal-split semigroup error change by at most across solvers on both systems.
Other metrics. On the two oscillators we compared 31 metrics by their mean absolute rank correlation with the transfer error: the energy diagnostic reaches 0.90, a metric that requires the full equation with its parameters 0.89, an ensemble of models 0.68, and every metric computed from held-out data at most 0.42 (test loss 0.19). We attribute the negative correlation of the test loss in Fig. 1(c) to the fact that the reference is the hardest scheme for a local model to fit.