[Paper Review] PinnDE: Physics-Informed Neural Networks for Solving Differential Equations
PinnDE is an open-source Python library that simplifies solving ordinary and partial differential equations using physics-informed neural networks (PINNs) and deep operator networks (DeepONets). It provides a low-code, user-friendly interface with minimal implementation effort, enabling researchers and educators to efficiently solve PDEs and ODEs with both hard-constrained PINNs and soft-constrained DeepONets, achieving high accuracy on benchmark problems like the Burgers' and heat equations.
In recent years the study of deep learning for solving differential equations has grown substantially. The use of physics-informed neural networks (PINNs) and deep operator networks (DeepONets) have emerged as two of the most useful approaches in approximating differential equation solutions using machine learning. Here, we introduce PinnDE, an open-source Python library for solving differential equations with both PINNs and DeepONets. We give a brief review of both PINNs and DeepONets, introduce PinnDE along with the structure and usage of the package, and present worked examples to show PinnDE's effectiveness in approximating solutions of systems of differential equations with both PINNs and DeepONets.
Motivation & Objective
- To address the lack of accessible, low-code software tools for physics-informed machine learning in solving differential equations.
- To reduce the barrier to entry for researchers and collaborators outside the field of scientific machine learning by providing intuitive, minimal-code implementations.
- To support both PINN and DeepONet architectures with consistent, easy-to-use APIs for solving forward and inverse problems.
- To enable educational use and rapid prototyping through clear, readable code and comprehensive documentation.
- To facilitate future integration of advanced techniques like adaptive collocation points and meta-learned optimization.
Proposed method
- PinnDE implements PINNs using automatic differentiation in TensorFlow and JAX, enforcing PDEs, initial, and boundary conditions via a composite loss function.
- It supports both hard-constrained and soft-constrained PINN training, where boundary conditions are either embedded in the network architecture or penalized in the loss.
- For DeepONets, the library learns the solution operator by conditioning on initial and boundary conditions, enabling generalization across different inputs without retraining.
- The package uses Latin hypercube sampling to distribute collocation points across the domain for loss computation in both PINN and DeepONet training.
- It provides modular components for defining PDEs, boundary conditions, and initial conditions, abstracting away low-level neural network construction.
- The library is built with extensibility in mind, supporting future integration of advanced architectures like LoRa, SVD-regularized DeepONets, and meta-learned optimizers.
Experimental results
Research questions
- RQ1Can a low-code, user-friendly Python library effectively support the implementation of both PINNs and DeepONets for solving differential equations?
- RQ2How well do PINNs and DeepONets implemented in PinnDE perform on standard benchmark PDEs like Burgers' and the heat equation?
- RQ3To what extent does PinnDE reduce the implementation barrier for non-experts in scientific machine learning?
- RQ4Can PinnDE efficiently support both hard-constrained and soft-constrained training for PINNs and DeepONets with minimal user code?
- RQ5How does the library's design enable integration of emerging techniques such as adaptive collocation points and meta-learned optimizers?
Key findings
- PinnDE successfully solved the Burgers' equation using a PINN with 5 hidden layers and 40 neurons per layer, achieving convergence after 5000 epochs with 10,000 collocation points.
- The PINN solution achieved high accuracy, with the mean squared error between predicted and analytical solutions remaining low across the domain.
- For the heat equation, the DeepONet solution matched the analytical solution $ u(t,x) = \exp(\nu\pi^2 t)\sin\pi x $ with a mean squared error below acceptable thresholds after 3000 epochs.
- The DeepONet was trained on 30,000 initial condition samples and used 100 boundary points and 10,000 collocation points, demonstrating robust generalization.
- The library's modular design allowed for clear, readable code with minimal user input, supporting rapid deployment and educational use.
- PinnDE's architecture enables future extensibility, with planned support for adaptive sampling, advanced DeepONet variants, and multiple backends.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.