This paper presents a significant step forward in making high-order "fast direct solvers" practical for modern computing hardware. By leveraging GPUs and the JAX framework, the authors demonstrate how to solve complex partial differential equations (PDEs) with unprecedented speed and the added benefit of automatic differentiation.
TL;DR
The authors introduce a JAX-based framework to accelerate Hierarchical Poincaré–Steklov (HPS) solvers on GPUs for 2D and 3D elliptic PDEs. By trading redundant computation for reduced data transfer and implementing 3D adaptive refinement, they achieve massive speedups and enable the first seamless integration of these solvers with automatic differentiation for inverse problems.
What Problem Does This Paper Address?
Many scientific fields—from medical imaging to molecular biology—rely on solving elliptic PDEs (like the Poisson or Helmholtz equations). While iterative solvers are common, fast direct solvers like HPS are often preferred because they compute a "solution operator" that can be reused to solve the same system with different data almost instantly.
However, HPS algorithms have a massive memory footprint. They work by breaking a domain into a tree-like hierarchy; at every level, they compute and store large matrices. On traditional CPUs, this is fine, but GPUs—which are much faster at math—have very limited memory and slow "pipes" (PCIe lanes) connecting them to the rest of the computer. Standard HPS implementations quickly saturate GPU memory or spend all their time moving data back and forth, wasting the GPU's computational power.
Methods
The authors propose a "hardware-aware" rethink of the HPS algorithm using two primary strategies:
- Subtree Recomputation (2D): The authors observed that on modern GPUs, computation is "cheap" while data movement is "expensive." Instead of saving every intermediate matrix to the computer's main RAM (which involves a slow transfer), they process entire subtrees of the hierarchy directly on the GPU. They then delete the intermediate results and simply recompute them later when needed. This redundant math actually makes the solver faster by eliminating the communication bottleneck.
- Adaptive Discretization (3D): In 3D, memory requirements explode. To fix this, the authors extended an adaptive refinement technique to 3D. Instead of a uniform grid, the solver uses a "smart" octree that places more points where the solution changes rapidly (like near a wavefront) and fewer points in smooth regions. This keeps the "interface matrices"—the primary memory bottleneck—small enough to fit on a GPU.
- JAX Implementation: By writing the solver in JAX, the authors gain "embarrassingly parallel" batching and, crucially, Automatic Differentiation (AD). This allows the solver to be used as a component in machine learning or optimization loops where gradients are required.
Datasets
The paper evaluates the method using several numerical benchmarks rather than static datasets:
- 2D Benchmarks: Variable-coefficient Poisson and Helmholtz equations, and high-frequency wave scattering problems involving complex "Gaussian bump" potentials.
- 3D Benchmarks: A "wavefront" problem with sharp gradients and the Linearized Poisson-Boltzmann equation, a standard model used to calculate the electrostatic properties of molecules in biology.
Key Insights and Ideas
- The "Compute vs. Communication" Trade-off: The most counterintuitive insight is that doing the same math twice is often faster than moving the answer across a wire. This "kernel fusion" philosophy is common in deep learning but is a novel application here for high-order PDE solvers.
- Differentiability as a First-Class Citizen: Because the solver is integrated with JAX, researchers can now perform "inverse scattering"—calculating the properties of an object based on how waves bounce off it—using standard gradient-based optimization (like Gauss-Newton) without deriving complex adjoint equations by hand.
- Adaptivity is a Hardware Requirement: In 3D, the authors show that adaptive refinement isn't just a trick for accuracy; it is the only way to fit high-accuracy 3D problems into the 80GB of memory found on high-end GPUs like the H100.
Key Results
- Speed: The GPU implementation provides massive speedups over 64-core CPU nodes. The subtree recomputation strategy reached 20% of peak double-precision FLOPS on an Nvidia H100, which is exceptionally high for this class of non-matrix-multiplication-heavy algorithms.
- Inverse Problems: The authors solved an inverse scattering problem (recovering a hidden potential) in just 75 seconds on a single GPU.
- 3D Efficiency: The adaptive strategy reduced the size of the bottleneck matrices by more than 50% compared to uniform grids while maintaining the same level of accuracy.
Limitations and Future Work
- AD Memory Constraints: While JAX enables automatic differentiation, it requires storing the full "computational graph" in memory. This currently prevents the use of the "recomputation strategy" during optimization, limiting the size of inverse problems that can be solved.
- Geometry: The current framework is limited to square and cubic domains. The authors suggest that extending this to unstructured meshes (complex, non-box shapes) is a necessary but challenging next step.
- Hybrid Solvers: The authors propose that future versions could combine these dense direct solvers with sparse solvers to handle even larger, multi-million degree-of-freedom problems.
Open Source Note: The implementation is publicly available at https://github.com/meliao/jaxhps.
Summary updated