Part III: Discovery Through Data and Models
Chapter 33: Scientific Machine Learning

Scientific Machine Learning

"I have memorized every PDE in the textbook. Unfortunately, the universe keeps writing new ones."

A Physics-Informed Neural Network With Boundary Conditions

Overview

Classical scientific computing solves partial differential equations on grids. The finite element method, spectral methods, and molecular dynamics simulations have powered physics, chemistry, and engineering for half a century. But they share a common bottleneck: computational cost scales steeply with accuracy. A high-fidelity turbulence simulation can consume millions of CPU hours. A single density functional theory (DFT) calculation for a moderate protein takes days. The question driving this chapter is: can neural networks learn the structure of physical laws well enough to accelerate these simulations by orders of magnitude, without sacrificing scientific validity?

Scientific machine learning (SciML) answers with a qualified yes. The qualification matters. Naive neural networks ignore conservation laws, symmetries, and boundary conditions. They extrapolate poorly outside their training distribution. And they produce predictions without uncertainty estimates. The methods in this chapter address each of these failures by building physical knowledge directly into network architectures and training procedures.

We begin with physics-informed neural networks (PINNs), which encode partial differential equations as training losses so the network learns solutions that satisfy known physics. We then move to neural operators (DeepONet, Fourier Neural Operator) that learn mappings between function spaces, enabling zero-shot generalization to new initial conditions and forcings. Next, we cover equivariant neural networks that respect the symmetry groups (E(3), SE(3), O(3)) governing molecular and physical systems, with architectures like MACE, NequIP, GemNet, and EquiformerV2. Finally, we put everything together by training a universal force field on molecular data, benchmarking against DFT calculations.

These ideas connect directly to the representation learning foundations of Chapter 26, the scientific foundation models of Chapter 27, and the differentiable programming framework of Chapter 42. They also feed forward into the domain-specific applications in Chapter 49: Chemistry and Materials and Chapter 50: Physics and Engineering.

Prerequisites

Readers should be comfortable with Chapter 26: Representation Learning for neural network fundamentals and Chapter 5: Discovery Through Data, Models, and Simulation for the simulation concepts we accelerate here. Basic familiarity with partial differential equations (the heat equation, wave equation) and molecular energy concepts (potential energy surfaces, forces as gradients) is helpful; Appendix A covers the necessary calculus and linear algebra. No prior experience with computational physics software is assumed.

Learning Outcomes

Sections

33.1 Physics-Informed Neural Networks

PDE residual losses, boundary condition enforcement, and the PINN training loop. Solving the heat equation, Burgers' equation, and Navier-Stokes with DeepXDE and JAX. Failure modes: spectral bias, causal training, and when PINNs struggle.

33.2 Neural Operators

Learning maps between function spaces with DeepONet (branch-trunk architecture) and the Fourier Neural Operator (spectral convolutions in frequency space). Zero-shot generalization to new initial conditions. The NeuralOperator library.

33.3 Equivariant Neural Networks

E(3), SE(3), and O(3) symmetry groups for molecular and physical systems. Spherical harmonics and irreducible representations. MACE, NequIP, GemNet, and EquiformerV2 architectures. GNoME and FairChem for materials discovery.

33.4 Building a Universal Force Field

Recipe: train a MACE model on molecular energy and force data, benchmark against DFT calculations, and deploy for molecular dynamics. Differentiable simulation with torchdiffeq. Integration with the Discovery Workbench.

What's Next

Scientific ML teaches neural networks to respect physical laws. Chapter 34: Generative Models for Discovery takes the next step: using neural networks to generate new scientific objects (molecules, materials, protein structures) that satisfy desired properties. Where this chapter accelerates simulation of known physics, the next chapter uses generative models to explore the space of possible structures, turning ML from a computational shortcut into a creative discovery engine.

Bibliography

Foundational Papers

Merchant, A., et al. (2023). Scaling deep learning for materials discovery. Nature, 624, 80-85.

GNoME: Google DeepMind's graph network that predicted 2.2 million stable crystal structures, validated by experimental synthesis.

Tools & Libraries

Lu, L., Meng, X., Mao, Z., & Karniadakis, G. E. (2021). DeepXDE: A deep learning library for solving differential equations. SIAM Review, 63(1), 208-228.

The most mature PINN library, supporting forward and inverse problems with multiple backends (TensorFlow, PyTorch, JAX).

NeuralOperator library (2023). Neural operator architectures in PyTorch.

Reference implementations of FNO, DeepONet, and related operator learning architectures.

MACE: Fast and accurate machine learning interatomic potentials.

The production MACE implementation used in Section 33.4 for training universal force fields.

Chen, R. T. Q., Rubanova, Y., Bettencourt, J., & Duvenaud, D. (2018). Neural ordinary differential equations. NeurIPS.

The torchdiffeq library for differentiable ODE solvers, enabling gradient-based optimization through simulation.

Bradbury, J., et al. (2018). JAX: Composable transformations of Python+NumPy programs.

JAX provides automatic differentiation and JIT compilation, making it the natural substrate for differentiable scientific computing.

Datasets & Benchmarks

FairChem / Open Catalyst Project (2020-2024). Datasets and benchmarks for catalysis and materials.

Large-scale molecular datasets (OC20, OC22) with DFT-computed energies and forces for training and evaluating interatomic potentials.