Abstract: Nonlinear differential equations are challenging to solve numerically and are important to understanding the dynamics of many physical systems. Deep neural networks have been applied to help alleviate the computational cost that is associated with solving these systems. We explore the performance and accuracy of various neural architectures on both linear and nonlinear differential equations by creating accurate training sets with the spectral element method. Next, we implement a novel Legendre-Galerkin Deep Neural Network (LGNet) algorithm to predict solutions to differential equations. By constructing a set of a linear combination of the Legendre basis, we predict the corresponding coefficients, $\alpha_i$ which successfully approximate the solution as a sum of smooth basis functions $u \simeq \sum_{i=0}^{N} \alpha_i \varphi_i$. As a computational example, linear and nonlinear models with Dirichlet or Neumann boundary conditions are considered.
Introduction
Solving nonlinear partial differential equations (PDEs) is a cornerstone of physical modeling but remains computationally expensive. While Physics-Informed Neural Networks (PINNs) have gained popularity, they often struggle with numerical noise from high-order differentiation and the strict enforcement of boundary conditions. This paper introduces LGNet, a hybrid approach that integrates the representational power of deep learning with the mathematical rigor of classical spectral methods to address these challenges.
The LGNet Framework
The core innovation of this work is the LGNet algorithm. Unlike standard neural solvers that predict point-wise solution values $u(x)$, LGNet shifts the objective to predicting the coefficients ($\alpha_i$) of a Legendre polynomial basis expansion.
By representing the solution as $u(x) \approx \sum \alpha_i \phi_i(x)$, where $\phi_i$ are basis functions designed to satisfy boundary conditions automatically, the model ensures the predicted solution is mathematically sound and infinitely differentiable. Furthermore, the authors implement a weak formulation loss. By applying integration by parts, the order of derivatives required in the loss function is reduced, effectively using integration as a smoothing operator to stabilize training against numerical noise.
Neural Architectures and Data Generation
The researchers explored various Convolutional Neural Network (CNN) architectures to map input forcing functions $f$ to the coefficients $\alpha_i$. For linear equations, a simple linear architecture was found to be sufficient. However, for nonlinear problems like Burgers' equation, deeper architectures (NetA, NetC) were required.
To train these models, "pristine" synthetic datasets were generated using the Spectral Element Method (SEM) and Picard iteration. This ensured high-quality ground truth data with tolerances as low as $10^{-9}$, providing a rigorous benchmark for the neural solver's accuracy.
Key Results and Insights
The LGNet demonstrated high-order accuracy across several test cases. For linear Convection-Diffusion equations, the model achieved a mean relative $\ell^2$ error of $1.26 \times 10^{-6}$. For the nonlinear Burgers' equation, the NetC architecture using the Swish activation function ($x \cdot \text{sigmoid}(x)$) performed best, yielding an error of $8.81 \times 10^{-4}$. The choice of Swish was critical for nonlinear PDEs as its smoothness and non-monotonicity allow for more stable gradient flow compared to ReLU.
| Equation | Model Type | Epochs | Mean Relative $\ell^2$ Error |
|---|---|---|---|
| Convection-Diffusion | Linear | 100,000 | $1.26 \times 10^{-6}$ |
| Helmholtz | Linear | 100,000 | $4.57 \times 10^{-5}$ |
| Burgers' (Nonlinear) | NetC (Swish) | 25,000 | $8.81 \times 10^{-4}$ |
Conclusion
LGNet successfully bridges the gap between black-box deep learning and classical numerical analysis. By predicting spectral coefficients and utilizing a weak-form loss, the method achieves high accuracy and robustness. Future work will focus on extending the framework to 2D and 3D problems and implementing enriched basis methods to handle "stiff" equations where solutions exhibit sharp, localized transitions.
Summary updated