Deep learning has revolutionized how we approach Partial Differential Equations (PDEs), but a stubborn hurdle remains: complex geometry. While models like Fourier Neural Operators (FNOs) excel on neat, rectangular grids, the real world is full of car-shaped boundaries, twisting blood vessels, and jagged airfoils.
Standard Transformers can handle irregular points, but they often ignore the underlying geometric structure or drown in the computational cost of attending to tens of thousands of mesh points. At NeurIPS 2025, researchers from Xi’an Jiaotong University introduced SpiderSolver, a geometry-aware Transformer that uses a clever "spiderweb" partitioning strategy to bridge the gap between deep learning and complex physical domains.
TL;DR
SpiderSolver is a novel Transformer architecture designed to solve PDEs on irregular, complex geometries. By partitioning space into "spiderweb-like" patches guided by boundary shapes and using multi-grained attention, it achieves state-of-the-art accuracy and superior generalization on tasks ranging from automotive aerodynamics to cardiovascular simulations.
What Problem Does This Paper Address?
In fields like aerospace or medicine, solving PDEs (like the Navier-Stokes equations for fluid flow) is essential. Traditional numerical methods are computationally expensive and require painstaking mesh generation.
Recent "Neural Operators" aim to speed this up, but they have a "regularity" problem. FNOs require uniform grids. Graph Neural Networks (GNNs) handle irregular meshes but often struggle with long-range global interactions. Transformers are great at global context but have quadratic complexity—meaning they slow down drastically as the number of mesh points increases. Furthermore, most existing models don't explicitly "understand" the relationship between a boundary (like the surface of a wing) and the surrounding fluid, which is where the most critical physics usually happens.
Methods
The authors introduce two primary innovations to make Transformers "geometry-aware":
1. Spiderweb Tokenization
Instead of treating mesh points as a random cloud, SpiderSolver organizes them into patches based on the domain's geometry:
- Boundary Clustering: It uses spectral clustering to divide the object's surface (e.g., a car) into meaningful regions.
- Radial Partitioning: It then groups interior points based on which surface cluster they are closest to and their distance from that surface (using a Signed Distance Function).
- Alignment: To ensure the model can generalize across different shapes (e.g., a sedan vs. an SUV), they use Optimal Transport to align every shape to a common "template." This ensures that "Token #5" always represents a similar physical region (like the front windshield) across different samples.
2. Multi-Grained Attention
Once the space is "tokenized" into these spiderweb patches, the model uses two types of attention:
- Coarse-grained Attention: This captures global interactions between the spiderweb tokens. Because the number of tokens is much smaller than the number of raw points, this is highly efficient.
- Fine-grained Attention: This specifically refines the interaction between the boundary surface and the "boundary layer" (the points immediately adjacent to it). This is crucial for calculating forces like drag and lift, which are highly sensitive to near-surface physics.
Datasets
The researchers put SpiderSolver through a gauntlet of seven diverse datasets:
- Industrial Design: Shape-Net Car (aerodynamics) and AirfRANS (NACA airfoils).
- Biomedical: Blood Flow in a human thoracic aorta.
- Canonical Physics: Bounded Navier-Stokes (flow around pillars), Darcy Flow, and Elasticity/Plasticity equations.
Key Insights and Ideas
- Geometry as a Prior: The "aha moment" here is that we shouldn't make the model learn the geometry from scratch. By baking the distance-from-boundary and surface-clustering into the tokenization process, the model starts with a physical "map" of the domain.
- Boundary Layers Matter: In fluid dynamics, the most complex behavior happens near the surface. The inclusion of a specific "Fine-grained Attention" block for boundary-interior interactions is a direct nod to classical fluid mechanics.
- Template Alignment: By aligning different geometries to a template, the model learns a consistent representation. This is why SpiderSolver generalizes so well to "Out-of-Distribution" (OOD) scenarios, such as higher speeds or steeper angles of attack than it saw during training.
Key Results
SpiderSolver consistently outperformed 18 other baselines, including popular models like GINO, Geo-FNO, and the recent Transolver.
- Accuracy: On the AirfRANS airfoil dataset, it reduced the error in volume and surface physics fields by 32.0% and 46.3% respectively compared to the previous state-of-the-art.
- Generalization: In OOD tests (unseen Reynolds numbers and angles), SpiderSolver maintained significantly lower error rates than its competitors.
- Speed: While traditional CFD simulations for a car can take 50 minutes, SpiderSolver provides an inference in just 0.058 seconds—a massive speedup for real-time design iteration.
Limitations and Future Work
While impressive, SpiderSolver has a few constraints:
- Closed Domains: It currently requires a well-defined, closed boundary and isn't yet applicable to open-boundary problems.
- Single Category: The current alignment strategy works best when all shapes belong to one class (e.g., all cars). Extending this to handle a mix of vastly different objects (cars, planes, and buildings all in one model) is a future goal.
- Equivariance: The authors note that the model is not yet fully equivariant to general geometric transformations (like rotation), which is a common frontier in geometric deep learning.
For those interested in the implementation, the code is available on GitHub.
Summary updated