From classical methods to SciML

Finite differences, finite elements and Runge–Kutta methods are among the great achievements of applied mathematics. So why learn anything else? This chapter is the bridge: what classical methods do best, where they struggle, and how scientific machine learning connects to — and builds on — them.

⏱ 30 minNeeds: Chapters 3–84 simulations
In plain words

Classical methods are like a perfectly engineered road network: reliable, well understood, with guaranteed travel times — as long as you travel where roads exist. Scientific machine learning (SciML) is like adding aircraft: it can reach places without roads (very high dimensions, sparse data, unknown physics), but it is newer, needs more care, and for a short trip down a good road the car is still faster. A good scientist knows both, and increasingly combines them.

You will learn
Level 1 · basicAI, ML, DL and SciML; what classical methods do well Level 2 · standardWhere classical methods struggle; data + physics Level 3 · advancedThe classical ↔ SciML dictionary; hybrids; honest limits
Simplest example first · 10 points per direction

Suppose 10 grid points per direction are enough. A line needs $10$ points, a square $10 \times 10 = 100$, a cube $10^3 = 1000$. A problem with 10 variables needs $10^{10}$ — ten billion — and one with 20 variables needs $10^{20}$, more than any computer can store. That one multiplication, $n^d$, is the "curse of dimensionality", and it is the simplest reason why new methods are needed for some problems.

The big picture: AI, machine learning, deep learning and SciML

Before comparing methods, place them on one map. Artificial intelligence (AI) contains machine learning (ML); ML contains neural networks; neural networks contain deep learning; deep learning contains transformers and the large language models (LLMs) behind chatbots such as ChatGPT. Scientific computing — everything in Chapters 2–8 — is a separate field that overlaps ML. That overlap is scientific machine learning (SciML), and physics-informed neural networks (PINNs) and neural operators sit where it meets deep learning. Click the map to explore.

1. What classical methods do superbly

For a PDE (Partial Differential Equation) with known coefficients on a domain in one to three space dimensions, classical methods offer what no learning method yet offers in general:

Brenner & Scott, The Mathematical Theory of Finite Element Methods, 3rd ed., Springer (2008), chapter 2 (Céa's lemma); Grossmann, Komorowska, Latz & Schönlieb, "Can physics-informed neural networks beat the finite element method?", IMA J. Appl. Math. 89(1) (2024) 143–174; McGreivy & Hakim, "Weak baselines and reporting biases lead to overoptimism in machine learning for fluid-related partial differential equations", Nature Machine Intelligence 6 (2024) 1256–1269.
The honest starting point

SciML does not replace classical numerical analysis. It is most valuable exactly where classical methods are expensive or awkward — and its best methods use classical ideas inside them. Everything you learned in Chapters 2–8 remains essential.

2. Where classical methods struggle

Animation: ten grid points per direction give 10, 100 and 1000 points in one, two and three dimensions.
Watch: The curse of dimensionality: grids that are cheap in 1-D become impossible in 6-D or 100-D.

①High dimensions

A grid with $n$ points per direction has $n^d$ points. Fine in 3D; impossible in 10D or 100D (option pricing with many assets, many-particle quantum mechanics, uncertainty with many random inputs).

SciML ideasample points instead of grids; let a network represent the solution (Han, Jentzen & E, PNAS 115(34), 2018, 8505–8510).

②Inverse problems and sparse data

Finding unknown coefficients or sources from a few noisy measurements needs many forward solves, adjoint codes and regularisation. Data cannot easily be "added" to a finite-difference code.

SciML ideaput data and equation in one loss; unknown parameters become trainable (PINNs, Chapter 16).

③Many-query tasks

Design optimisation, uncertainty quantification, real-time control and history matching of reservoirs call the solver thousands of times. Each call starts from scratch; nothing is learned between calls.

SciML idealearn the solution operator once, then evaluate in milliseconds (neural operators, Chapter 18).

④Unknown or incomplete physics

Classical solvers need a complete model. Often part of it is unknown: turbulence closures, constitutive laws of new materials, reaction rates, multiphase flow in rock.

SciML idealearn the missing term from data while keeping the known physics (closure learning, equation discovery such as SINDy (Sparse Identification of Nonlinear Dynamics): Brunton, Proctor & Kutz, PNAS 113(15), 2016, 3932–3937).

⑤Complex geometry and meshing

Generating a good mesh for a complicated 3D domain can take more engineer time than the simulation itself; moving boundaries make it worse.

SciML ideamesh-free formulations: PINNs only need points inside the domain and on its boundary.

⑥Stability limits and stiffness

Explicit schemes need tiny steps ($\Delta t \propto \Delta x^2$ for heat, CFL (Courant–Friedrichs–Lewy) for waves); implicit schemes need large linear solves at every step (Chapters 6, 8).

SciML idealearn coarse-grid corrections or time-steppers that take larger steps (Kochkov et al., PNAS 118(21), 2021, e2101784118).

⑦Combining heterogeneous data

Satellite images, sensors, experiments and simulations at different resolutions are hard to merge into one discretised model.

SciML ideanetworks take any inputs; the loss can weight each data source (multi-fidelity learning).

⑧Every new case is a new computation

Change a parameter, boundary condition or geometry and the whole solve is repeated, even though the solutions are similar.

SciML ideaparametric surrogates and reduced-order models reuse what earlier solves taught (Benner, Gugercin & Willcox, SIAM Review 57(4), 2015, 483–531).

The curse of dimensionalityhow many grid points does a grid need?
grid points nᵈa sampling method with 10⁶ random points (any d)memory needed for one number per point
Each extra dimension multiplies the grid by $n$. Monte Carlo error decreases like $N^{-1/2}$ whatever the dimension (Chapter 3), and neural networks can sometimes represent high-dimensional solutions with far fewer parameters than a grid has points — the main reason SciML is attractive for high-dimensional PDEs. (Sampling is no free lunch: its accuracy is low, and how well networks do depends on the structure of the problem.)

3. Data + physics: the central idea

Animation: a curve fitted only to four early measurements dives away, while the curve that uses the decay law follows the truth.
Watch: Four measurements, two predictions. The pure curve fit (red) has no idea what happens after the data; the law $u' = -1.2u$ (green) does.

Pure data fitting knows nothing between and beyond the data points. A pure physics solve cannot use measurements and needs every coefficient. SciML combines them in one objective: $$\min_\theta\ \underbrace{\sum_i \big(u_\theta(x_i) - d_i\big)^2}_{\text{fit the data}} \;+\; \lambda\,\underbrace{\sum_m \big|\mathcal N[u_\theta](x_m)\big|^2}_{\text{obey the equation}}.$$ The physics term acts as a regulariser — the same role that smoothness penalties play in classical inverse problems (Tikhonov regularisation). The simulation uses no neural network at all — just a degree-8 polynomial — to show that the idea is older and more general than PINNs.

Physics as a regulariser6 noisy measurements of a decay process; model: polynomial of degree 8; physics: u′ = −u
true solution e⁻ˣmeasurements (only for x ≤ 1.5)fitted modelcollocation points where u′ + u is penalised
With $\lambda \approx 0$ (data only), the flexible polynomial chases the noisy points and behaves badly beyond them — overfitting, and useless extrapolation to $x > 1.5$. Increase $\lambda$: the equation fills the gaps and the model follows $e^{-x}$ even where there is no data. The data, in turn, fixes what the equation alone cannot: the constant $C$ in $u = Ce^{-x}$.

4. When does a learned surrogate pay off?

Training a neural operator costs many classical solves (to make training data) plus training time. After that, each new query is almost free. Whether that is worth it depends on how many queries you need:

Total cost: classical solver vs learned surrogateadjust the numbers for your problem
classical: Q × solve timesurrogate: data generation + training + Q × query time
For a handful of queries, the classical solver always wins. For uncertainty quantification with $10^5$ samples or real-time control, a surrogate can win by orders of magnitude — if its accuracy is acceptable over the whole range of queries, which must be checked against the solver.

5. A dictionary: classical idea ↔ SciML idea

Almost every SciML concept has a classical ancestor. Seeing the connection makes both easier to understand.

Classical numerical analysisScientific machine learningConnection
grid / mesh nodescollocation (training) pointswhere the equation is enforced (Ch. 8 ↔ Ch. 13)
basis functions (hat functions, polynomials, sines)neurons $\sigma(\mathbf w\cdot\mathbf x + b)$a network is a linear combination of adaptive basis functions (Ch. 11)
residual of the discrete equationsPINN lossthe same residual, squared and averaged (Ch. 3, 13)
least squares / Galerkin methodsminimising the lossPINNs are nonlinear least-squares collocation methods; variational PINNs use weak forms
Newton's method, quasi-NewtonAdam (Adaptive Moment Estimation), L-BFGS (Limited-memory Broyden–Fletcher–Goldfarb–Shanno method)optimisers for the parameters (Ch. 10)
finite-difference derivativeautomatic differentiationexact derivatives, no step size (Ch. 2, 12)
stencil applied over a gridconvolutional layera convolution kernel is a stencil (Ch. 8)
explicit Euler stepresidual network layer$\mathbf x_{k+1} = \mathbf x_k + h f(\mathbf x_k)$ (Ch. 6, 11)
Green's function / solution operatorneural operator (DeepONet (Deep Operator Network), FNO (Fourier Neural Operator))a learned map from data to solution (Ch. 14)
Fourier / spectral methodsFourier neural operator, Fourier featureswork with frequencies (Ch. 7, 14)
reduced-order models (POD (Proper Orthogonal Decomposition))autoencoders, DeepONet trunk basislow-dimensional representations of solutions
Tikhonov regularisationphysics term in the loss, weight decayconstrain an ill-posed fit (this chapter)
stability and conditioningtraining stability, loss conditioningstep-size limits, narrow valleys (Ch. 6, 10)
convergence under mesh refinementerror vs. network size and training pointsstill being developed for SciML — an open research area

6. Remedies: combine, don't replace

The most reliable progress comes from hybrid methods that keep a classical solver where it is strong and use learning where it is weak:

7. What SciML still struggles with

IssueWhat it means
AccuracyPINNs typically reach relative errors of $10^{-3}$–$10^{-4}$; classical solvers reach $10^{-8}$ or better when needed.
GuaranteesError bounds exist in some settings, but there is no general, computable "halve $h$, error ÷ 4" rule yet.
TrainingNon-convex optimisation can stall or fail (Chapter 16, Section 4); results depend on hyperparameters.
GeneralisationLearned operators can fail silently on inputs unlike their training data (Chapter 18).
ReportingComparisons against weak baselines have made some published gains look larger than they are (McGreivy & Hakim, 2024). Compare against strong classical solvers.
Which approach suits my problem?tick what describes your problem — a rough guide, not a rule

8. Why learn SciML — and how

Your roadmap through the rest of this book

Chapter 10 gradient descent from scratch (the apple example) → Chapter 11 optimisation → Chapter 12 the perceptron and neural networks → Chapter 13 training networks → Chapter 14 automatic differentiation: forward and backward propagation → Chapter 15 famous results: overfitting, No Free Lunch, garbage in–garbage out → Chapter 16 PINNs: equations as loss functions → Chapter 17 PINNs step by step with 1, 2, 3 points → Chapter 18 neural operators → Chapter 19 a pendulum, from physics to PINN → Chapter 20 hands-on Python → Chapter 21 theory and open problems → Chapter 22 applications, growth and research directions.

You need to solve the 2D heat equation once, on a square, with known coefficients, to six correct digits. The best tool is most likely…

Right. A single, well-posed, low-dimensional forward problem with high accuracy requirements is classical territory.

You must estimate an unknown, spatially varying permeability from 20 pressure sensors, with the flow equation known. Which statement is best?

Right. Classical adjoint-based inversion also works; physics-informed learning offers a flexible alternative that merges data and equation in one loss.

Key takeaways

Further reading