Neural networks that speak calculus
A Julia package that trains neural networks to solve differential equations by penalizing them for violating the laws of physics.

What it does NeuralPDE.jl solves ODEs, SDEs, RODEs, and PDEs by encoding the governing equations directly into the neural network’s loss function. You write the differential equation symbolically—boundary conditions, domains, and all—and the package generates a training problem that punishes the network wherever it violates the physics. It sits on top of Lux.jl and Flux.jl, so GPU acceleration is available, and it plugs into the broader SciML ecosystem in Julia.
The interesting bit The package doesn’t just do vanilla PINNs. It supports quadrature training strategies (sampling the loss more intelligently than random points), adaptive loss weighting, and neural adapters that can accelerate convergence. It also mixes in data fitting: you can combine traditional scientific machine learning with the physics-informed approach, and even blend in DeepONets or Fourier Neural Operators from NeuralOperators.jl.
Key highlights
- Symbolic PDE specification via ModelingToolkit; no hand-rolled loss functions required
- Handles integro-differential and stochastic equations, not just standard PDEs
- TensorBoard logging built in for training diagnostics
- Compatible with both Flux.jl and Lux.jl neural network layers
- Can combine neural operators (FNO, GNO, etc.) with physics-informed losses
Caveats
- The README’s “greatly increased generality compared with classical methods” is stated but not quantified; no benchmarks against finite element or spectral methods are shown
- The 2D Poisson example uses a tiny 16-neuron hidden layer and 6,000 total iterations—suggesting either impressive efficiency or that harder problems need more tuning (the sources don’t clarify which)
Verdict Worth a look if you’re already in Julia’s SciML orbit and need a flexible way to throw neural networks at irregular geometries or inverse problems where classical solvers struggle. If you’re committed to Python’s DeepXDE or need battle-tested convergence guarantees for production engineering, this is more experimental toolkit than drop-in replacement.