Fourier PINNs: From Strong Boundary Conditions to Adaptive Fourier Bases

Madison Cooley, Da Long, Robert Kirby, Shandian Zhe

TL;DR

This paper introduces Fourier PINNs, a novel approach to Physics-Informed Neural Networks (PINNs) that significantly improves their ability to solve partial differential equations (PDEs) with high-frequency and multi-scale solutions. By augmenting standard PINNs with a dense set of pre-specified Fourier bases and an adaptive learning algorithm, Fourier PINNs can efficiently identify and capture complex frequency components, outperforming existing methods.

What Problem Does This Paper Address?

Physics-Informed Neural Networks (PINNs) are a powerful mesh-free method for solving PDEs. However, they often struggle with solutions that exhibit high-frequency or multi-scale behavior. This difficulty is attributed to an optimization challenge: the competition between the loss terms that enforce the PDE's residual and the boundary conditions. Weakly enforced boundary conditions can be overshadowed by the residual loss, leading to inaccurate solutions, especially for complex frequency content. While some methods attempt to address this by enforcing boundary conditions more strictly ("strong" boundary conditions), these approaches are often limited to specific types of boundary conditions and complex to implement.

Methods

The authors propose Fourier PINNs, an extension that addresses the limitations of standard and strong boundary condition PINNs. The core idea is to represent the PDE solution as a combination of a standard neural network (NN) and a set of pre-defined Fourier bases.

Here's a breakdown of their approach:

  • Strong Boundary Condition (BC) PINNs: As a precursor, they investigate a "strong BC" variant. This method modifies the NN architecture to inherently satisfy boundary conditions, thus removing the need for a separate boundary loss term. This helps alleviate the optimization competition.
  • Fourier Analysis: They perform a Fourier analysis on the strong BC PINNs to understand why they improve performance. They found that multiplying the NN output with a boundary function (like $(x-a)(b-x)$ for Dirichlet BCs) acts as a low-pass filter in the frequency domain, effectively weakening high-frequency components that are not part of the true solution.
  • Fourier PINNs: Building on this, they propose a more general approach. Instead of relying on specific boundary functions, Fourier PINNs augment the NN with a dense set of Fourier bases (sines and cosines with frequencies evenly sampled over a large range). The solution is then modeled as: $u(x) = N_{\theta}(x) + \sum_{n=1}^{Q} a_n \cos(2\pi\omega_n x) + b_n \sin(2\pi\omega_n x)$ where $N_{\theta}(x)$ is the neural network, $\omega_n$ are the pre-defined frequencies, and $a_n, b_n$ are coefficients to be learned.

  • Adaptive Learning and Basis Selection: A key innovation is an adaptive algorithm that jointly optimizes the NN parameters and the Fourier basis coefficients. Crucially, it also includes a mechanism to prune or weaken insignificant Fourier bases and their coefficients. This allows the model to automatically identify important frequencies and discard irrelevant ones, effectively learning the solution's power spectrum. This is achieved through alternating optimization steps and coefficient truncation.

Datasets

The paper does not introduce new datasets. Instead, it uses a set of benchmark partial differential equations (PDEs) with known analytical solutions to evaluate the performance of their proposed method. These include:

  • 1D Poisson equations
  • 1D Allen-Cahn equations
  • 2D Poisson equations
  • 2D Allen-Cahn equations

The true solutions for these PDEs are designed to exhibit varying degrees of complexity, including single-scale, multi-scale, and hybrid frequency components, to specifically test the methods' ability to handle high-frequency phenomena.

Key Insights and Ideas

  • The "Spectrum Bias" of PINNs: Standard PINNs, like many neural networks, exhibit a "spectrum bias," meaning they naturally learn low-frequency components much faster and more easily than high-frequency ones. This is a fundamental challenge for problems with complex frequency content.
  • Strong BCs as a Frequency Filter: Modifying the NN architecture to strictly enforce boundary conditions (strong BCs) can act as a form of implicit frequency filtering, helping to suppress spurious high frequencies. However, this approach is limited in its applicability.
  • Fourier Bases as Explicit Frequency Components: Augmenting PINNs with a dense set of Fourier bases provides an explicit mechanism to represent and learn high-frequency components. The key is to have a sufficiently rich set of candidate frequencies.
  • Adaptive Pruning is Crucial: Simply adding many Fourier bases isn't enough. The ability to adaptively identify and retain only the significant frequencies (and their coefficients) while pruning the rest is what makes Fourier PINNs powerful and efficient. This avoids overfitting and computational waste.
  • Generality of Fourier PINNs: Unlike strong BC PINNs, Fourier PINNs are not tied to specific boundary conditions, making them a more versatile tool for a wider range of PDE problems.

Key Results

The Fourier PINNs consistently outperformed standard PINNs and other state-of-the-art methods across various benchmark problems, particularly those involving high-frequency solutions.

  • Superior Accuracy: In all tested scenarios, Fourier PINNs achieved significantly lower relative L2 errors compared to standard PINNs, which often failed entirely.
  • Robustness: The method demonstrated robustness to the choice of the frequency range (K) for the candidate Fourier bases, as long as it was sufficiently large.
  • Comparison to RFF-PINN: While Random Fourier Feature PINNs (RFF-PINNs) also use Fourier features, their performance was highly sensitive to the selection of Gaussian variances (number and scales). Fourier PINNs, with their adaptive basis selection, were much more reliable and achieved better results across the board.
  • Quantitative Improvements: Relative L2 errors for Fourier PINNs were typically in the range of $10^{-4}$ to $10^{-2}$, whereas standard PINNs often showed errors around $1.0$ or higher for high-frequency problems.

Limitations and Future Work

  • Assumption of Dense Frequencies: The authors acknowledge that their current approach assumes a sufficiently dense sampling of candidate frequencies. They suggest that this assumption might be overly optimistic and that developing adaptive spacing for these frequencies could be a future direction.
  • Computational Cost: While efficient, the adaptive learning and basis selection process involves multiple optimization and pruning steps, which could be computationally intensive for very complex problems.
  • Extension to Higher Dimensions: The paper briefly touches upon extending to multiple inputs (higher dimensions) but notes that the number of bases can grow rapidly. Future work could explore more efficient parameterization strategies for high-dimensional problems, such as low-rank tensor decomposition.

Summary updated

BibTeX
@article{cooley2025fourier,
  author = {Madison Cooley and Da Long and Robert Kirby and Shandian Zhe},
  title = {{Fourier PINNs: From Strong Boundary Conditions to Adaptive Fourier Bases}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
}
Figure